@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

  :root {
    --ink: #0f1117;
    --ink2: #2d3142;
    --muted: #6b7280;
    --border: #e5e7eb;
    --border2: #d1d5db;
    --bg: #f9fafb;
    --white: #ffffff;
    --green: #059669;
    --green-light: #d1fae5;
    --green-dark: #047857;
    --red: #dc2626;
    --red-light: #fee2e2;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --blue: #1d4ed8;
    --blue-light: #dbeafe;
    --accent: #1e3a5f;
    --accent2: #2563eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  }

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

  body {
    font-family: 'IBM Plex Sans', sans-serif;
    background: #eef1f7;
    color: var(--ink);
    min-height: 100vh;
    font-size: 14px;
  }

  /* ── AUTH SCREEN ─────────────────────────── */
  #auth-screen {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e293b 100%);
    padding: 24px;
  }
  #auth-screen.hidden { display: none; }

  .auth-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
  }
  .auth-card.register-mode { max-width: 560px; }

  .auth-header {
    background: var(--accent);
    color: white;
    padding: 28px 32px 24px;
    text-align: center;
  }
  .auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
  }
  .auth-header p {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 6px;
  }

  .auth-body { padding: 28px 32px 32px; }

  .auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
  }
  .auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
  }
  .auth-tab.active {
    background: var(--white);
    color: var(--accent);
    box-shadow: var(--shadow);
  }

  .auth-form { display: none; }
  .auth-form.active { display: block; }

  .auth-form .field { margin-bottom: 14px; }
  .auth-form label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.2px;
    display: block;
    margin-bottom: 5px;
  }
  .auth-form input, .auth-form textarea {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13.5px;
    padding: 10px 12px;
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    outline: none;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .auth-form input:focus, .auth-form textarea:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }
  .auth-form textarea { resize: vertical; min-height: 64px; }

  .auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .auth-error {
    background: var(--red-light);
    color: var(--red);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
  }
  .auth-error.show { display: block; }

  .auth-btn {
    width: 100%;
    padding: 13px 24px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.15s;
  }
  .auth-btn:hover {
    background: #162d4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,58,95,0.3);
  }

  .auth-hint {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
  }

  /* ── SIDEBAR ─────────────────────────────── */
  .layout { display: none; min-height: 100vh; }
  .layout.visible { display: flex; }

  .sidebar {
    width: 220px;
    background: var(--accent);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
  }

  .sidebar-logo {
    padding: 28px 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .sidebar-logo .brand {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
  }

  .sidebar-logo .sub {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 3px;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .nav { padding: 16px 12px; flex: 1; }

  .nav-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.45;
    padding: 0 8px;
    margin-bottom: 6px;
    margin-top: 16px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0.75;
    transition: all 0.15s;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
  }

  .nav-item:hover { opacity: 1; background: rgba(255,255,255,0.08); }
  .nav-item.active { opacity: 1; background: rgba(255,255,255,0.15); }

  .nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

  .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 10px;
    opacity: 0.4;
    font-family: 'IBM Plex Mono', monospace;
  }

  /* ── MAIN ─────────────────────────────────── */
  .main {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .topbar-title { font-size: 16px; font-weight: 600; color: var(--ink); }
  .topbar-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

  .topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'IBM Plex Mono', monospace;
  }
  .badge-green { background: var(--green-light); color: var(--green-dark); }
  .badge-blue { background: var(--blue-light); color: var(--blue); }

  .content { padding: 28px 32px; }

  /* ── CARDS ───────────────────────────────── */
  .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
  }

  .card-header {
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .card-body { padding: 20px 24px; }

  /* ── FORM ELEMENTS ───────────────────────── */
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 14px; }

  .field { display: flex; flex-direction: column; gap: 5px; }

  label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.2px;
  }

  input, select {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13.5px;
    padding: 9px 12px;
    border: 1.5px solid var(--border2);
    border-radius: 7px;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
  }

  input:focus, select:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }

  input[type="number"] { font-family: 'IBM Plex Mono', monospace; }

  /* ── BUTTONS ─────────────────────────────── */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    white-space: nowrap;
  }

  .btn-primary {
    background: var(--accent);
    color: white;
  }
  .btn-primary:hover { background: #162d4a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,58,95,0.3); }

  .btn-green {
    background: var(--green);
    color: white;
  }
  .btn-green:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,0.3); }

  .btn-ghost {
    background: var(--bg);
    color: var(--ink2);
    border: 1.5px solid var(--border2);
  }
  .btn-ghost:hover { background: var(--border); }

  .btn-danger {
    background: var(--red-light);
    color: var(--red);
    border: none;
  }
  .btn-danger:hover { background: #fecaca; }

  .btn-edit {
    background: var(--blue-light);
    color: var(--blue);
    border: none;
  }
  .btn-edit:hover { background: #bfdbfe; }

  .btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 6px; }

  .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
  }

  .btn-full { width: 100%; justify-content: center; padding: 13px 24px; font-size: 15px; }

  /* ── TABLE ───────────────────────────────── */
  table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

  thead th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg);
  }

  tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
  }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: #fafafa; }

  tbody td { padding: 12px 14px; color: var(--ink2); vertical-align: middle; }

  .text-right { text-align: right; }
  .text-center { text-align: center; }

  /* ── STOCK BADGES ────────────────────────── */
  .stock-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
  }
  .stock-ok { background: var(--green-light); color: var(--green-dark); }
  .stock-low { background: var(--amber-light); color: var(--amber); }
  .stock-out { background: var(--red-light); color: var(--red); }

  /* ── ITEM CARDS ──────────────────────────── */
  .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .item-card {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    background: var(--white);
    transition: all 0.15s;
    position: relative;
  }

  .item-card:hover {
    border-color: var(--accent2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.12);
  }

  .item-card.added {
    border-color: var(--green);
    background: #f0fdf4;
  }

  .item-card .item-name { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; color: var(--ink); }
  .item-card .item-hsn { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-family: 'IBM Plex Mono', monospace; }
  .item-card .item-footer { display: flex; justify-content: space-between; align-items: center; }
  .item-card .item-rate { font-weight: 700; color: var(--green); font-family: 'IBM Plex Mono', monospace; font-size: 15px; }

  /* ── TOTALS BOX ──────────────────────────── */
  .totals-box {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 280px;
  }

  .totals-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13.5px;
    color: var(--ink2);
  }

  .totals-row.grand {
    border-top: 2px solid var(--border2);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
  }

  .totals-row .val {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
  }

  .totals-row.grand .val { color: var(--green); font-size: 18px; }

  /* ── STATS ───────────────────────────────── */
  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
  }

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

  .stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 500; }
  .stat-value { font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 6px; font-family: 'IBM Plex Mono', monospace; }
  .stat-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

  /* ── SEARCH ──────────────────────────────── */
  .search-wrap { position: relative; }
  .search-wrap input { padding-left: 36px; }
  .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }

  /* ── SECTION DIVIDER ─────────────────────── */
  .section-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 16px;
  }
  .section-sep span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap; }
  .section-sep::before, .section-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }

  /* ── INVOICE QTY INPUT ───────────────────── */
  .qty-input {
    width: 70px !important;
    text-align: center;
    padding: 6px 8px !important;
  }

  /* ── TOAST ───────────────────────────────── */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--ink);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .toast.show { transform: translateY(0); opacity: 1; }
  .toast.success { background: var(--green-dark); }
  .toast.error { background: var(--red); }

  /* ── EMPTY STATE ─────────────────────────── */
  .empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
  }
  .empty .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
  .empty p { font-size: 14px; }

  /* ── TABS ────────────────────────────────── */
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* ── DETAILS/SUMMARY ─────────────────────── */
  details > summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 0 4px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  details > summary::before { content: '▶'; font-size: 9px; transition: transform 0.2s; }
  details[open] > summary::before { transform: rotate(90deg); }

  .flex-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
  .flex-between { display: flex; justify-content: space-between; align-items: center; }

  .mt-4 { margin-top: 16px; }
  .mt-2 { margin-top: 8px; }
  .mb-4 { margin-bottom: 16px; }

  /* ── MODAL ───────────────────────────────── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,17,23,0.55);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .modal-overlay.open { display: flex; }

  .modal {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
  }
  @keyframes modalIn {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .modal-title { font-size: 16px; font-weight: 700; color: var(--ink); }
  .modal-close {
    background: var(--bg);
    border: 1.5px solid var(--border2);
    border-radius: 7px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--muted);
    transition: all 0.15s;
  }
  .modal-close:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

  .modal-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
  }

  .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--bg);
  }

  /* Invoice preview inside modal */
  .inv-preview { font-size: 13px; color: var(--ink); }
  .inv-preview .inv-header { border: 2px solid var(--ink); padding: 12px; text-align: center; margin-bottom: 10px; border-radius: 4px; }
  .inv-preview .inv-co { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
  .inv-preview .inv-sub { font-size: 10px; color: var(--muted); margin-top: 4px; }
  .inv-preview .inv-title { text-align: center; font-size: 13px; font-weight: 700; border: 1px solid var(--ink); padding: 5px; margin: 8px 0; letter-spacing: 2px; border-radius: 3px; }
  .inv-preview .inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
  .inv-preview .inv-box { border: 1px solid var(--border2); padding: 8px 10px; border-radius: 5px; font-size: 12px; line-height: 1.6; }
  .inv-preview .inv-box strong { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
  .inv-preview table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
  .inv-preview th { background: var(--bg); padding: 7px 8px; text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--border); }
  .inv-preview td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
  .inv-preview .inv-totals { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-top: 10px; max-width: 300px; margin-left: auto; }
  .inv-preview .inv-t-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
  .inv-preview .inv-t-row.grand { border-top: 2px solid var(--border2); margin-top: 6px; padding-top: 8px; font-size: 15px; font-weight: 700; }
  .inv-preview .inv-t-row.grand .v { color: var(--green); }
  .inv-preview .inv-footer { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 10px; color: var(--muted); line-height: 1.7; }

  @media (max-width: 900px) {
    .sidebar { width: 60px; }
    .sidebar .brand, .sidebar .sub, .nav-item span, .nav-label, .sidebar-footer { display: none; }
    .main { margin-left: 60px; }
    .nav-item { justify-content: center; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .auth-grid-2 { grid-template-columns: 1fr; }
  }

  /* ── SUBSCRIPTION SCREEN ───────────────────── */
  #sub-screen {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e293b 100%);
    padding: 24px;
  }
  #sub-screen.visible { display: flex; }

  .sub-wrap {
    width: 100%;
    max-width: 720px;
  }
  .sub-header {
    text-align: center;
    color: white;
    margin-bottom: 28px;
  }
  .sub-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
  }
  .sub-header p {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
  }

  .plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  @media (max-width: 640px) {
    .plans-grid { grid-template-columns: 1fr; }
  }

  .plan-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
  }
  .plan-card:hover { transform: translateY(-4px); }
  .plan-card.featured {
    border: 2px solid var(--green);
  }
  .plan-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--green);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
  }
  .plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
  }
  .plan-price {
    margin: 16px 0 8px;
    font-family: 'IBM Plex Mono', monospace;
  }
  .plan-price .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--ink);
  }
  .plan-price .period {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
  }
  .plan-save {
    font-size: 12px;
    color: var(--green-dark);
    background: var(--green-light);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 16px;
  }
  .plan-features {
    list-style: none;
    margin: 12px 0 24px;
    flex: 1;
  }
  .plan-features li {
    font-size: 13.5px;
    color: var(--ink2);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .plan-features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
  }
  .plan-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
  }
  .plan-btn.monthly {
    background: var(--accent);
    color: white;
  }
  .plan-btn.monthly:hover { background: #162d4a; }
  .plan-btn.yearly {
    background: var(--green);
    color: white;
  }
  .plan-btn.yearly:hover { background: var(--green-dark); }
  .plan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .sub-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
  }
  .sub-footer button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
  }

  .sub-status-bar {
    background: var(--amber-light);
    color: var(--amber);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: none;
    text-align: center;
  }
  .sub-status-bar.show { display: block; }
  .sub-status-bar.ok {
    background: var(--green-light);
    color: var(--green-dark);
  }

  .badge-amber { background: var(--amber-light); color: var(--amber); }


.bs-app-root { position: relative; }
.bs-app-root.bs-fullscreen { min-height: 100vh; }

/* Contain app inside WP content area */
.bs-app-root {
  position: relative;
  isolation: isolate;
  max-width: 100%;
  overflow: hidden;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: #0f1117;
  background: #eef1f7;
  border-radius: 8px;
}
.bs-app-root.bs-fullscreen {
  min-height: 100vh;
  border-radius: 0;
}
/* Prevent theme styles from leaking into app */
.bs-app-root * {
  box-sizing: border-box;
}
.bs-app-root a { text-decoration: none; }
/* Hide theme footer collision */
.bs-app-root .layout.visible {
  min-height: 70vh;
}

.sub-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sub-back-btn {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  text-decoration: none !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  margin-right: 12px;
}
.sub-back-btn:hover {
  background: rgba(255,255,255,0.25) !important;
}
.plans-grid.yearly-only {
  grid-template-columns: 1fr;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.plan-card.hidden-plan {
  display: none !important;
}

/* Full isolation from WordPress theme */
html:has(#bs-app-root.bs-fullscreen),
body:has(#bs-app-root.bs-fullscreen) {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}
#bs-app-root.bs-fullscreen {
  position: relative;
  z-index: 1;
  min-height: 100vh !important;
  width: 100% !important;
  max-width: 100% !important;
  background: #eef1f7 !important;
}

.btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border: none !important;
}
.btn-whatsapp:hover {
  background: #1da851 !important;
}
