/* Castly Pro hub — dashboard, account, shared layout */

.pro-page {
  padding: 2.5rem 0 4.5rem;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(241, 100, 30, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(241, 100, 30, 0.05), transparent 50%),
    var(--surface-subtle, #faf9f6);
  min-height: calc(100vh - 78px);
}

.pro-page-hero {
  margin-bottom: 2rem;
  max-width: 42rem;
}

.pro-page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.pro-page-hero p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(241, 100, 30, 0.14), rgba(241, 100, 30, 0.06));
  border: 1px solid rgba(241, 100, 30, 0.22);
  color: var(--brand-deep, #c2410c);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pro-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.pro-dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pro-feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.65rem 1.5rem;
  border-radius: var(--radius-lg, 18px);
  background: linear-gradient(145deg, #fff 0%, #fffaf6 100%);
  border: 1px solid rgba(241, 100, 30, 0.18);
  box-shadow: 0 8px 32px rgba(241, 100, 30, 0.08);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pro-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(241, 100, 30, 0.12);
}

.pro-feature-card h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.pro-feature-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.pro-quick-links {
  display: grid;
  gap: 0.65rem;
}

.pro-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md, 14px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.pro-quick-link:hover {
  border-color: rgba(241, 100, 30, 0.28);
  background: #fffaf6;
  transform: translateX(2px);
}

.pro-quick-link span:last-child {
  color: var(--brand, #f1641e);
  font-size: 1.1rem;
}

.pro-tools-section h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--ink-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* Account page */
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 56rem;
}

.account-card {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius-lg, 18px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.account-card h2 {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.account-dl {
  display: grid;
  gap: 0.85rem;
}

.account-row dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft, #94a3b8);
}

.account-row dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  font-size: 0.82rem;
  font-weight: 700;
}

.account-status.is-lifetime {
  background: rgba(241, 100, 30, 0.1);
  color: var(--brand-deep, #c2410c);
}

/* Pro header accent */
.pro-header-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pro-header .pro-nav {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.pro-user-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: 0.35rem;
}

.pro-user-account {
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}

.pro-user-account:hover,
.pro-user-account.is-active,
.pro-user-account[aria-current="page"] {
  color: var(--brand-deep, #c2410c);
  background: rgba(241, 100, 30, 0.08);
}

.pro-signout-btn {
  padding: 0.55rem 0.95rem !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
  background: var(--surface-2, #f4f4f5) !important;
  color: var(--ink, #0f172a) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.pro-signout-btn:hover {
  background: #fff !important;
  color: var(--brand-deep, #c2410c) !important;
  border-color: rgba(241, 100, 30, 0.35) !important;
}

.pro-header .nav a[data-nav].is-active,
.pro-header .nav a[aria-current="page"],
.pro-header .pro-user-account.is-active,
.pro-header .pro-user-account[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .pro-header-inner {
    flex-wrap: nowrap;
  }

  .pro-header .pro-nav {
    order: 4;
    flex: 1 1 100%;
  }

  .pro-user-actions {
    order: 2;
    margin-left: auto;
    margin-right: 0.15rem;
  }

  .pro-header .nav-toggle {
    order: 3;
  }

  .pro-user-account {
    font-size: 0.8rem;
    padding: 0.35rem 0.55rem;
  }

  .pro-signout-btn {
    padding: 0.45rem 0.72rem !important;
    font-size: 0.76rem !important;
  }
}

@media (max-width: 860px) {
  .pro-dash-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }
}

/* Pro help floating widget */
.pro-help-widget {
  position: fixed;
  bottom: 1.35rem;
  right: 1.35rem;
  z-index: 1200;
}

.pro-help-fab {
  appearance: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border: none;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(245, 100, 0, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pro-help-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(245, 100, 0, 0.45);
}

.pro-help-fab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.pro-help-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 240px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.pro-help-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pro-help-panel__title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.pro-help-panel__note {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.pro-help-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pro-help-link:last-child {
  margin-bottom: 0;
}

.pro-help-link:hover {
  background: var(--brand-soft);
  border-color: rgba(245, 100, 0, 0.35);
  color: var(--brand-deep);
}

.pro-help-link--wa:hover {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}

.pro-help-link__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pro-help-widget {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
  }

  .pro-help-fab {
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
  }
}
