
    :root {
      --bg: #f3f7f7;
      --ink: #122127;
      --muted: #5d6b70;
      --brand: #0e8f83;
      --brand-strong: #096b62;
      --accent: #ee7f3b;
      --line: rgba(18, 33, 39, 0.1);
      --shadow: 0 20px 45px rgba(9, 41, 49, 0.12);
      --card: #ffffff;
      --danger: #c0392b;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Manrope', sans-serif;
      color: var(--ink);
      background:
        radial-gradient(circle at 8% 5%, rgba(14, 143, 131, 0.15), transparent 28%),
        radial-gradient(circle at 95% 10%, rgba(238, 127, 59, 0.12), transparent 24%),
        linear-gradient(180deg, #f8fbfb 0%, var(--bg) 75%);
      min-height: 100vh;
      overflow-x: hidden;
    }

    .shell { width: min(1200px, 96%); margin: 0 auto; }

    header {
      position: sticky;
      top: 0;
      z-index: 50;
      backdrop-filter: blur(10px);
      background: rgba(248, 251, 251, 0.85);
      border-bottom: 1px solid var(--line);
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 0;
      gap: 16px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--ink);
      font-family: 'Sora', sans-serif;
      font-weight: 700;
    }

    .brand-badge {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: linear-gradient(145deg, var(--brand), #0fb8a9);
      color: #fff;
      font-weight: 800;
      font-size: 0.88rem;
    }

    nav {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 6px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    nav a {
      text-decoration: none;
      color: var(--muted);
      padding: 8px 13px;
      border-radius: 999px;
      font-size: 0.9rem;
      font-weight: 600;
      white-space: nowrap;
      transition: background 0.2s, color 0.2s;
    }

    nav a:hover,
    nav a.active {
      background: rgba(14, 143, 131, 0.13);
      color: var(--brand-strong);
    }

    .user-area {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .user-chip {
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 13px 7px 9px;
      background: var(--card);
      font-size: 0.85rem;
      font-weight: 700;
      color: #1f3840;
    }

    .avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: linear-gradient(145deg, var(--brand), #0fb8a9);
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 0.75rem;
      font-weight: 800;
    }

    .btn-logout {
      border: 1px solid rgba(192, 57, 43, 0.3);
      background: rgba(192, 57, 43, 0.08);
      color: var(--danger);
      border-radius: 999px;
      padding: 7px 13px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
    }

    main { padding: 34px 0 62px; }

    .hero {
      border: 1px solid var(--line);
      border-radius: 20px;
      background: linear-gradient(180deg, #ffffff, #f7fbfb);
      box-shadow: var(--shadow);
      padding: 22px;
      margin-bottom: 16px;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 12px;
      border-radius: 999px;
      border: 1px solid rgba(14, 143, 131, 0.26);
      color: var(--brand-strong);
      background: rgba(14, 143, 131, 0.08);
      font-weight: 700;
      font-size: 0.84rem;
      margin-bottom: 12px;
    }

    h1, h2, h3 { font-family: 'Sora', sans-serif; }

    h1 {
      font-size: clamp(1.45rem, 2.8vw, 1.95rem);
      margin-bottom: 6px;
    }

    .hero p {
      color: var(--muted);
      line-height: 1.65;
      max-width: 70ch;
    }

    .grid {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 14px;
      margin-bottom: 16px;
    }

    .stack {
      display: grid;
      gap: 14px;
    }

    .card {
      border: 1px solid var(--line);
      border-radius: 18px;
      background: var(--card);
      box-shadow: var(--shadow);
      padding: 20px;
    }

    .card h2 {
      font-size: 1.1rem;
      margin-bottom: 6px;
    }

    .card p {
      color: var(--muted);
      line-height: 1.6;
    }

    .status-row,
    .info-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 11px 0;
      border-bottom: 1px solid var(--line);
    }

    .info-row:last-child,
    .status-row:last-child { border-bottom: 0; }

    .info-row span:first-child,
    .status-row span:first-child {
      color: var(--muted);
      font-size: 0.9rem;
    }

    .info-row strong,
    .status-row strong {
      text-align: right;
      color: #183841;
      font-size: 0.93rem;
    }

    .plan-banner {
      border-radius: 18px;
      padding: 18px;
      background: linear-gradient(135deg, rgba(14, 143, 131, 0.14), rgba(14, 143, 131, 0.04));
      border: 1px solid rgba(14, 143, 131, 0.16);
      margin-bottom: 18px;
    }

    .plan-banner .price {
      display: flex;
      align-items: baseline;
      gap: 8px;
      margin: 8px 0;
    }

    .plan-banner .price strong {
      font-size: 2rem;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 5px 10px;
      font-weight: 800;
      font-size: 0.76rem;
      background: rgba(14, 143, 131, 0.14);
      color: #0a6a5f;
    }

    .invoice-list {
      display: grid;
      gap: 10px;
      margin-top: 12px;
    }

    .invoice-item {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: #fff;
      display: grid;
      gap: 6px;
    }

    .invoice-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-size: 0.9rem;
    }

    .invoice-meta {
      color: var(--muted);
      font-size: 0.84rem;
    }

    .btn-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 16px;
    }

    .btn {
      border: 0;
      padding: 10px 18px;
      border-radius: 10px;
      font-weight: 800;
      font-size: 0.9rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      transition: transform 0.2s, box-shadow 0.2s;
      text-decoration: none;
      white-space: nowrap;
    }

    .btn:hover { transform: translateY(-1px); }

    .btn-main {
      background: linear-gradient(135deg, var(--brand), #0cac9c);
      color: #fff;
      box-shadow: 0 10px 22px rgba(14, 143, 131, 0.28);
    }

    .btn-soft {
      background: rgba(14, 143, 131, 0.1);
      color: var(--brand-strong);
      border: 1px solid rgba(14, 143, 131, 0.25);
    }

    .empty-state {
      text-align: center;
      padding: 48px 18px;
      border: 1px dashed rgba(18, 33, 39, 0.16);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.82);
    }

    .empty-state h2 {
      margin-bottom: 8px;
      font-size: 1.2rem;
    }

    .empty-state p {
      color: var(--muted);
      margin-bottom: 16px;
      line-height: 1.6;
    }

    .overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(10, 25, 30, 0.45);
      z-index: 100;
      backdrop-filter: blur(3px);
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .overlay.open { display: flex; }

    .modal {
      background: var(--card);
      border-radius: 22px;
      padding: 28px;
      width: 100%;
      max-width: 480px;
      box-shadow: 0 32px 80px rgba(0,0,0,0.22);
    }

    .modal h2 {
      font-size: 1.2rem;
      margin-bottom: 4px;
    }

    .modal .sub {
      color: var(--muted);
      font-size: 0.88rem;
      margin-bottom: 18px;
    }

    .field {
      display: grid;
      gap: 6px;
      margin-bottom: 14px;
    }

    .field label {
      font-size: 0.88rem;
      font-weight: 700;
      color: #1f3840;
    }

    .field input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 11px 13px;
      font-size: 0.92rem;
      font-family: 'Manrope', sans-serif;
      outline: none;
      background: #fafcfc;
    }

    .field-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .form-feedback {
      display: none;
      border-radius: 8px;
      padding: 9px 12px;
      margin-bottom: 12px;
      font-size: 0.85rem;
    }

    .form-feedback.error {
      display: block;
      color: #8b3a18;
      background: rgba(238, 127, 59, 0.16);
      border: 1px solid rgba(238, 127, 59, 0.38);
    }

    .reveal-section {
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 0.55s ease, transform 0.55s ease;
    }

    .reveal-section.visible {
      opacity: 1;
      transform: translateY(0);
    }

    @media (max-width: 980px) {
      .grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 760px) {
      .topbar { align-items: flex-start; flex-direction: column; }
      .user-area { width: 100%; justify-content: space-between; }
      .field-row { grid-template-columns: 1fr; }
    }
  
#emptyState,
#subscriptionContent {
  display: none;
}

#planName {
  margin-top: 10px;
}
