@import url("tokens.css?v=5.2.0");
/* ==========================================================================
   GROWUPHOST CLIENT PORTAL — "AURORA" DESIGN SYSTEM v3
   Bright, colourful, premium & fully responsive.
   Legacy class names are preserved so every page restyles automatically.
   ========================================================================== */


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
    width: 100%;
    min-height: 100%;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body {
    overflow-x: hidden;
    background:
        radial-gradient(1000px 520px at 100% -10%, rgba(124, 58, 237, 0.10), transparent 60%),
        radial-gradient(800px 480px at -10% 105%, rgba(6, 182, 212, 0.10), transparent 60%),
        var(--bg-base);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-hover); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(124, 58, 237, 0.2); }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.client-wrapper { display: flex; min-height: 100vh; width: 100%; position: relative; }

/* ---------- Sidebar ---------- */
.client-sidebar {
    width: var(--sidebar-width);
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    transition: transform 0.3s var(--ease);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: var(--grad-hero);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.sidebar-brand::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.35), transparent 70%);
    pointer-events: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--grad-aurora);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px -6px rgba(219, 39, 119, 0.6);
}
.brand-name { display: block; font-size: 18px; font-weight: 800; font-family: var(--font-heading); color: #ffffff; letter-spacing: -0.01em; line-height: 1.1; }
.brand-badge {
    display: inline-block;
    margin-top: 3px;
    font-size: 9.5px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-close-btn {
    display: none;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    color: #ffffff;
    cursor: pointer;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 18px 12px; scrollbar-width: thin; scrollbar-color: var(--brand-border) transparent; }

.nav-group-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0 12px 8px;
    letter-spacing: 0.12em;
}

.nav-list { list-style: none; margin-bottom: 20px; }
.nav-item { margin-bottom: 3px; }
.nav-item a {
    --chip: linear-gradient(135deg, #8b5cf6, #6366f1);
    --chip-tint: #f3efff;
    --chip-ink: #6d28d9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 12px;
    color: #4b4769;
    font-weight: 600;
    font-size: 13.2px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-link-content { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nav-link-content span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link-content svg {
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--chip-tint);
    color: var(--chip-ink);
    transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
}

/* Colour-coded icon chips per menu item */
.nav-list .nav-item:nth-child(6n+2) a { --chip: var(--grad-ocean);  --chip-tint: #e6f6ff; --chip-ink: #0369a1; }
.nav-list .nav-item:nth-child(6n+3) a { --chip: var(--grad-mint);   --chip-tint: #e6fbf3; --chip-ink: var(--success-ink); }
.nav-list .nav-item:nth-child(6n+4) a { --chip: var(--grad-gold);   --chip-tint: #fff5e1; --chip-ink: var(--warning-ink); }
.nav-list .nav-item:nth-child(6n+5) a { --chip: var(--grad-berry);  --chip-tint: #fdeef8; --chip-ink: #be185d; }
.nav-list .nav-item:nth-child(6n+6) a { --chip: var(--grad-sunset); --chip-tint: #fff0ec; --chip-ink: #c2410c; }

.nav-item:hover a { background: var(--bg-muted); color: var(--text-main); transform: translateX(2px); }
.nav-item:hover svg { transform: scale(1.06); }

.nav-item.active a {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.14), rgba(37, 99, 235, 0.06));
    color: var(--text-main);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.18);
}
.nav-item.active svg { background: var(--chip); color: #ffffff; box-shadow: 0 6px 14px -6px rgba(76, 29, 149, 0.55); }

.nav-badge { font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-full); flex-shrink: 0; letter-spacing: 0.02em; }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border-color); }
.user-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f5f3ff, #ecfeff);
    border: 1px solid #ebe5ff;
}
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--grad-berry);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 6px 14px -6px rgba(236, 72, 153, 0.6);
}
.user-meta-name { font-size: 13px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta-role { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #e11d48;
    background: var(--danger-bg);
    flex-shrink: 0;
}
.logout-btn:hover { background: var(--danger-bg); color: var(--danger-ink); }

/* ---------- Main ---------- */
.client-main { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---------- Header ---------- */
.client-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 28px;
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    flex-shrink: 0;
}
.header-greeting { min-width: 0; }
.header-greeting strong { display: block; font-family: var(--font-heading); font-size: 16px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-greeting span { font-size: 12px; color: var(--text-muted); }

.header-search { position: relative; width: 320px; max-width: 100%; }
.header-search input {
    width: 100%;
    height: 42px;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 16px 0 42px;
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}
.header-search input:focus { background: var(--surface); border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.header-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--primary); }

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

.balance-chip {
    background: linear-gradient(135deg, var(--success-bg), var(--info-bg));
    border: 1px solid #b6efd8;
    border-radius: var(--radius-full);
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    white-space: nowrap;
}
.balance-chip-label { color: var(--text-muted); font-size: 11px; font-weight: 700; }
.balance-amount { font-weight: 800; color: var(--success-ink); }

.tier-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: var(--radius-full); font-size: 11px; font-weight: 800; white-space: nowrap; }
.tier-gold { background: linear-gradient(135deg, var(--warning-bg), var(--warning-border)); color: #92400e; border: 1px solid #fcd34d; }
.tier-platinum { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #3730a3; border: 1px solid #a5b4fc; }
.tier-diamond { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #6b21a8; border: 1px solid #d8b4fe; }
.tier-silver { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #334155; border: 1px solid #cbd5e1; }
.tier-bronze { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #9a3412; border: 1px solid #fdba74; }

.header-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 15px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: #ffffff;
    font-weight: 800;
    font-size: 12.5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 18px -8px rgba(16, 185, 129, 0.75);
    transition: transform 0.2s var(--ease);
}
.header-btn-whatsapp:hover { transform: translateY(-1px); }

.header-dropdown { position: relative; }
.header-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 200;
    animation: pop-in 0.18s var(--ease);
}
.header-menu-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); padding: 6px 10px 8px; }
.header-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}
.header-menu-item:hover { background: var(--bg-muted); color: var(--text-main); }
.header-menu-item small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.header-menu-item.danger { color: #e11d48; }
.menu-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.ico-green { background: var(--success-bg); } .ico-blue { background: var(--brand-soft); } .ico-amber { background: var(--warning-bg); }
.ico-red { background: var(--danger-bg); } .ico-violet { background: var(--brand-soft); }

.header-avatar-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 0; }
.header-avatar-btn .user-avatar { width: 40px; height: 40px; }

@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.impersonation-bar {
    background: var(--grad-sunset);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
}
.impersonation-bar a { color: #fff; text-decoration: underline; }

/* ---------- Content ---------- */
.client-content { flex: 1; padding: 28px; max-width: 1400px; width: 100%; animation: page-in 0.4s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.client-page-header { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.client-page-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(90deg, #1a1535 0%, #6d28d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.client-page-desc { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }

/* Hero banner */
.whmcs-hero-banner {
    background: var(--grad-hero);
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: #ffffff;
    box-shadow: 0 24px 50px -20px rgba(76, 29, 149, 0.6);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.whmcs-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(420px 260px at 85% 0%, rgba(250, 204, 21, 0.35), transparent 70%),
        radial-gradient(380px 260px at 100% 100%, rgba(236, 72, 153, 0.35), transparent 70%);
    z-index: -1;
}
.whmcs-hero-banner::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -90px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, 0.07);
    z-index: -1;
}
.whmcs-hero-banner h1 { color: #ffffff !important; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; -webkit-text-fill-color: #fff; }
.whmcs-hero-banner p { color: rgba(255, 255, 255, 0.9) !important; font-size: 14px; }
.whmcs-hero-banner .btn-secondary { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
.whmcs-hero-banner .btn-secondary:hover { background: rgba(255,255,255,0.26); color: #fff; }

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- KPI cards ---------- */
.client-kpi-grid, .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 28px; }

.client-kpi-card, .kpi-card {
    --kpi-grad: var(--primary-gradient);
    --kpi-tint: rgba(124, 58, 237, 0.10);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.client-kpi-card::before, .kpi-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--kpi-grad); }
.client-kpi-card::after, .kpi-card::after {
    content: '';
    position: absolute;
    right: -46px;
    top: -46px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--kpi-tint);
    z-index: -1;
    transition: transform 0.4s var(--ease);
}
.client-kpi-card:hover, .kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.client-kpi-card:hover::after, .kpi-card:hover::after { transform: scale(1.25); }

.kpi-blue { --kpi-grad: var(--primary-gradient); --kpi-tint: rgba(124, 58, 237, 0.10); }
.kpi-cyan { --kpi-grad: var(--grad-ocean); --kpi-tint: rgba(6, 182, 212, 0.12); }
.kpi-green { --kpi-grad: var(--grad-mint); --kpi-tint: rgba(16, 185, 129, 0.12); }
.kpi-amber { --kpi-grad: var(--grad-gold); --kpi-tint: rgba(245, 158, 11, 0.14); }
.kpi-pink { --kpi-grad: var(--grad-berry); --kpi-tint: rgba(236, 72, 153, 0.12); }
.kpi-blue, .kpi-green, .kpi-amber, .kpi-cyan { border-top: 1px solid var(--border-color); }

.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.kpi-label { font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--kpi-grad) !important;
    color: #fff !important;
    box-shadow: 0 8px 16px -8px rgba(26, 21, 53, 0.45);
}
.kpi-val { font-size: 30px; font-weight: 800; font-family: var(--font-heading); color: var(--text-main); line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.02em; }
.kpi-sub, .kpi-meta { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ---------- Cards ---------- */
.client-card, .data-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.client-card:hover { box-shadow: var(--shadow-md); }
.client-card-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.04));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.client-card-title { font-size: 16px; font-weight: 800; color: var(--text-main); }
.client-card-body { padding: 24px; }

/* ---------- Tables ---------- */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--brand-border) transparent; }
.client-table, .data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.client-table th, .data-table th {
    padding: 13px 20px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface-2));
    color: #6d5fa8;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
}
.client-table td, .data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 13px;
    vertical-align: middle;
    background: transparent;
}
.client-table tbody tr, .data-table tbody tr { transition: background-color 0.15s; }
.client-table tbody tr:hover, .data-table tbody tr:hover,
.client-table tbody tr:hover td { background: linear-gradient(90deg, rgba(139, 92, 246, 0.06), rgba(6, 182, 212, 0.03)); }
.client-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-ink); border-color: var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-border); }
.badge-primary { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-border); }
.badge-secondary { background: var(--surface-2); color: #5f5b7d; border-color: var(--line); }
.badge-vip { background: linear-gradient(135deg, #fdf2f8, #f5f3ff); color: #a21caf; border-color: #f5d0fe; }

/* ---------- Alerts ---------- */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    border: 1px solid transparent;
    line-height: 1.5;
}
.alert-success { background: var(--success-bg); color: var(--success-ink); border-color: var(--success-border); }
.alert-danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-border); }
.alert-info { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-border); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 17px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.18s var(--ease), box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
    font-family: var(--font-body);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.btn-primary { background: var(--primary-gradient); color: #ffffff !important; box-shadow: 0 8px 18px -8px rgba(124, 58, 237, 0.7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(124, 58, 237, 0.85); color: #ffffff !important; }

.btn-secondary { background: var(--surface); color: var(--text-main); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--brand-border); color: var(--primary); transform: translateY(-1px); }

.btn-success { background: var(--grad-mint); color: #ffffff !important; box-shadow: 0 8px 18px -8px rgba(16, 185, 129, 0.7); }
.btn-success:hover { transform: translateY(-1px); color: #ffffff !important; }
.btn-danger { background: var(--grad-sunset); color: #ffffff !important; box-shadow: 0 8px 18px -8px rgba(244, 63, 94, 0.7); }
.btn-danger:hover { transform: translateY(-1px); color: #fff !important; }
.btn-whatsapp { background: linear-gradient(135deg, #22c55e, #10b981); color: #fff !important; box-shadow: 0 8px 18px -8px rgba(16, 185, 129, 0.7); }
.btn-outline { background: transparent; border-color: var(--border-color); color: var(--text-main); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn-lg { padding: 13px 22px; font-size: 14.5px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-cpanel { background: linear-gradient(135deg, #ff7a3d, #f43f5e); color: #ffffff !important; border: none; box-shadow: 0 8px 18px -8px rgba(244, 63, 94, 0.7); }
.btn-cpanel:hover { transform: translateY(-1px); color: #ffffff !important; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--text-main); }
.form-control {
    width: 100%;
    min-height: 42px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-main);
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.form-control::placeholder { color: var(--text-light); }
.otp-input { font-size: 24px; font-weight: 800; letter-spacing: 0.4em; text-align: center; font-family: var(--font-heading); }

/* ---------- Modals ---------- */
.modal-backdrop, .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(22, 15, 51, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-backdrop.active, .modal-overlay.active { display: flex; }
.modal-card, .modal-box {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s var(--ease);
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-header { padding-bottom: 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-main); }
.modal-close { background: var(--bg-muted); border: none; width: 32px; height: 32px; border-radius: 10px; font-size: 18px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text-main); background: var(--surface-3); }
.modal-body { padding: 0; }
.modal-footer { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- Checkout (Razorpay) ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.checkout-main { padding: 28px; }
.checkout-summary { padding: 24px; position: sticky; top: calc(var(--header-height) + 20px); }
.checkout-summary .client-card-title { margin-bottom: 14px; }
.checkout-amount-hero {
    background: var(--grad-hero);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.checkout-amount-hero::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.4), transparent 70%);
    z-index: -1;
}
.checkout-amount-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.checkout-amount { font-family: var(--font-heading); font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; }
.checkout-amount small { font-size: 15px; font-weight: 700; opacity: 0.8; }
.checkout-fx { margin-top: 6px; font-size: 13px; opacity: 0.92; }
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card-hover);
}
.pay-method strong { display: block; font-size: 13.5px; }
.pay-method small { display: block; font-size: 11.5px; color: var(--text-muted); }
.pm-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: #fff; font-weight: 800; flex-shrink: 0; }
.pm-upi { background: var(--grad-mint); }
.pm-card { background: var(--primary-gradient); }
.pm-bank { background: var(--grad-ocean); }
.pm-wallet { background: var(--grad-gold); }
.checkout-note { margin-top: 14px; font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.6; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; color: var(--text-muted); border-bottom: 1px dashed var(--border-color); }
.summary-row strong { color: var(--text-main); }
.summary-total { border-bottom: none; padding-top: 14px; font-size: 17px; color: var(--text-main); }
.summary-total strong { font-family: var(--font-heading); font-size: 22px; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.trust-badges span { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: var(--radius-full); background: var(--bg-muted); color: var(--text-muted); }

/* ---------- Auth pages ---------- */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(800px 520px at 0% 0%, rgba(124, 58, 237, 0.55), transparent 60%),
        radial-gradient(700px 520px at 100% 100%, rgba(6, 182, 212, 0.45), transparent 60%),
        radial-gradient(500px 400px at 100% 0%, rgba(236, 72, 153, 0.35), transparent 60%),
        #140d30;
    position: relative;
    overflow-x: hidden;
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; pointer-events: none; }
.auth-orb-1 { width: 300px; height: 300px; background: #f97316; top: 8%; left: 40%; }
.auth-orb-2 { width: 260px; height: 260px; background: #2563eb; bottom: -40px; left: -40px; }
.auth-orb-3 { width: 220px; height: 220px; background: #db2777; top: -60px; right: -40px; }
.auth-shell {
    position: relative;
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.auth-showcase {
    padding: 44px;
    color: #fff;
    background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand-name { font-family: var(--font-heading); font-size: 22px; font-weight: 800; color: #fff; }
.auth-hero-title { font-size: 34px; line-height: 1.15; color: #fff; -webkit-text-fill-color: #fff; }
.auth-points { list-style: none; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.9); }
.auth-points li span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,0.14); flex-shrink: 0; }
.auth-card { background: var(--surface); padding: 40px; }
.auth-title { font-size: 24px; margin-bottom: 18px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-muted); border-radius: 14px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 11px; font-weight: 700; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-md); }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.auth-foot a { font-weight: 700; }

/* ---------- Sidebar backdrop ---------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 95;
}
.sidebar-backdrop.active { display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
    .header-search { width: 240px; }
    .tier-badge { display: none; }
}

@media (max-width: 1024px) {
    .client-sidebar { transform: translateX(-100%); box-shadow: none; width: 284px; max-width: 86vw; z-index: 120; }
    .client-sidebar.open { transform: translateX(0); box-shadow: 0 20px 50px rgba(22, 15, 51, 0.35); }
    .sidebar-close-btn { display: inline-flex; }
    .mobile-menu-btn { display: inline-flex; }
    .client-main { margin-left: 0; }
    .client-content { padding: 22px; }
    .header-search { display: none; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
}

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
    .auth-showcase { display: none; }
    .auth-card { padding: 30px 24px; }
}

@media (max-width: 768px) {
    .client-header { padding: 0 14px; height: 62px; }
    .header-right { gap: 6px; }
    .header-btn-whatsapp span.label { display: none; }
    .header-btn-whatsapp { padding: 0 12px; height: 38px; }
    .header-greeting span { display: none; }
    .client-content { padding: 16px 14px 90px; }
    .client-page-header { flex-direction: column; align-items: stretch; }
    .client-page-header > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
    .client-page-title { font-size: 21px; }
    .whmcs-hero-banner { padding: 22px; border-radius: 20px; }
    .whmcs-hero-banner h1 { font-size: 22px; }
    .client-kpi-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .client-kpi-card, .kpi-card { padding: 16px; }
    .kpi-val { font-size: 22px; }
    .kpi-icon { width: 36px; height: 36px; font-size: 16px; }
    .client-card-body, .checkout-main, .checkout-summary { padding: 18px; }
    .client-card-header { padding: 14px 18px; }
    .client-table th, .data-table th { padding: 11px 14px; }
    .client-table td, .data-table td { padding: 12px 14px; font-size: 12.5px; }
    .form-row, .pay-methods { grid-template-columns: 1fr; }
    .checkout-amount { font-size: 32px; }
    .header-menu { position: fixed; left: 12px; right: 12px; width: auto; top: 68px; }

    /* Collapse inline multi-column grids in page markup */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 2fr"],
    [style*="grid-template-columns: 1.5fr 1fr"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }
    [style*="padding: 40px"] { padding: 20px !important; }
    [style*="minmax(300px"], [style*="minmax(320px"], [style*="minmax(340px"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .balance-chip { display: none; }
    .client-kpi-grid, .kpi-grid { grid-template-columns: 1fr; }
    .client-page-header .btn { flex: 1 1 auto; }
    .checkout-amount-hero { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .client-sidebar, .client-header, .sidebar-backdrop, .impersonation-bar, .client-page-header .btn { display: none !important; }
    .client-main { margin-left: 0; }
    body { background: var(--surface); }
    .client-card { box-shadow: none; border-color: #ddd; }
}

/* ==========================================================================
   v3.1 UX ENHANCEMENTS — smarter grids, mobile cards, bottom navigation
   ========================================================================== */

/* Store plan cards: let the "Most Popular" ribbon sit above the card edge */
.plan-card { overflow: visible; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.plan-popular {
    border: 2px solid transparent !important;
    background: linear-gradient(#fff, #fff) padding-box, var(--primary-gradient) border-box !important;
    box-shadow: 0 24px 50px -22px rgba(124, 58, 237, 0.55) !important;
}
.plan-ribbon {
    background: var(--grad-aurora) !important;
    box-shadow: 0 8px 18px -8px rgba(219, 39, 119, 0.7);
    padding: 5px 14px !important;
    border-radius: 999px !important;
    z-index: 2;
}
.spec-grid[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* KPI grids: avoid orphan cards on wide screens */
@media (min-width: 1025px) {
    .client-kpi-grid:has(> :nth-child(3):last-child),
    .kpi-grid:has(> :nth-child(3):last-child),
    .client-kpi-grid:has(> :nth-child(6):last-child),
    .kpi-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Bottom navigation — hidden on desktop */
.bottom-nav { display: none; }

@media (max-width: 768px) {
    /* Compact two-column KPI tiles on phones */
    .client-kpi-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; margin-bottom: 20px; }
    .client-kpi-card, .kpi-card { padding: 14px; border-radius: 16px; }
    .client-kpi-card::after, .kpi-card::after { width: 96px; height: 96px; right: -34px; top: -34px; }
    .kpi-top { margin-bottom: 8px; }
    .kpi-label { font-size: 9.5px; letter-spacing: 0.05em; }
    .kpi-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
    .kpi-val { font-size: 20px; margin-bottom: 2px; }
    .kpi-sub, .kpi-meta { font-size: 11px; line-height: 1.4; }

    /* App-style bottom navigation */
    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 94;
        padding: 6px;
        background: var(--surface-glass);
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border: 1px solid var(--border-color);
        border-radius: 22px;
        box-shadow: 0 18px 40px -16px rgba(76, 29, 149, 0.35);
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        padding: 6px 0;
        border-radius: 16px;
        font-size: 10.5px;
        font-weight: 700;
        color: var(--text-subtle);
    }
    .bottom-nav-item svg { width: 22px; height: 22px; }
    .bottom-nav-item.active { color: var(--primary); background: var(--primary-light); }
    .bottom-nav-fab {
        width: 48px;
        height: 48px;
        margin-top: -26px;
        border-radius: 17px;
        display: grid;
        place-items: center;
        color: #fff;
        background: var(--grad-aurora);
        box-shadow: 0 12px 24px -10px rgba(219, 39, 119, 0.75);
        border: 3px solid #fff;
    }
    .bottom-nav-fab svg { width: 22px; height: 22px; }
    .bottom-nav-cta.active { background: none; }

    .client-content { padding-bottom: 112px; }
}

@media (max-width: 340px) {
    .client-kpi-grid, .kpi-grid { grid-template-columns: 1fr !important; }
}

/* Tables become stacked cards on small screens */
@media (max-width: 720px) {
    .table-responsive:has(> table.stack-table) { overflow: visible; }
    table.stack-table { display: block; min-width: 0 !important; white-space: normal; }
    table.stack-table thead { display: none; }
    table.stack-table tbody { display: grid; gap: 12px; padding: 12px; }
    table.stack-table tr {
        display: block;
        background: var(--surface);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 4px 14px;
        box-shadow: var(--shadow-sm);
    }
    table.stack-table tbody tr:hover, table.stack-table tbody tr:hover td { background: var(--surface); }
    table.stack-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0 !important;
        border-bottom: 1px dashed var(--border-color) !important;
        text-align: right !important;
        white-space: normal;
        font-size: 13px;
        min-width: 0;
        background: transparent !important;
    }
    table.stack-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        max-width: 45%;
        text-align: left;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--text-light);
    }
    table.stack-table td:first-child { justify-content: flex-start; text-align: left !important; padding-top: 14px !important; font-size: 14px; }
    table.stack-table td:first-child::before { display: none; }
    table.stack-table td:last-child { border-bottom: none !important; flex-wrap: wrap; justify-content: flex-end; }
    table.stack-table td:last-child::before { margin-right: auto; }
    table.stack-table td > div, table.stack-table td form { flex-wrap: wrap; justify-content: flex-end; }
    table.stack-table td.stack-full { display: block; text-align: center !important; border: none !important; }
    table.stack-table td.stack-full::before { display: none; }
    table.stack-table tr:has(> td.stack-full) { box-shadow: none; }
}

/* Card-mode cell value wrapper (added by labelTables) */
.stack-val { display: contents; }
@media (max-width: 720px) {
  table.stack-table td > .stack-val {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-align: right;
    overflow-wrap: anywhere;
  }
  table.stack-table td > .stack-val > * { max-width: 100%; }
  table.stack-table td:first-child { display: block; }
  table.stack-table td:first-child > .stack-val { display: block; text-align: left; }
  table.stack-table td * { white-space: normal !important; }
}

/* Keep short monospace IDs (CUST-1234, INV-…) on one line in desktop tables */
@media (min-width: 721px) {
  .data-table td [style*="monospace"], .client-table td [style*="monospace"] { white-space: nowrap; }
}

/* ==========================================================================
   v3.2 — STORE, CONFIGURE, INVOICE & VERIFICATION COMPONENTS
   ========================================================================== */
.currency-switch { display: flex; align-items: center; gap: 8px; }
.currency-switch label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.currency-switch .form-control { min-height: 38px; padding: 6px 12px; width: auto; }

.group-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.group-tabs::-webkit-scrollbar { display: none; }
.group-tabs a { flex-shrink: 0; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--surface); color: var(--text-main); font-weight: 700; font-size: 13px; }
.group-tabs a:hover { border-color: var(--brand-border); }
.group-tabs a.active { background: var(--primary-gradient); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.plan-card { padding: 26px; display: flex; flex-direction: column; position: relative; margin-bottom: 0; }
.plan-ribbon { position: absolute; top: -12px; right: 22px; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.plan-name { font-size: 20px; margin: 12px 0 6px; }
.plan-desc { color: var(--text-muted); font-size: 13px; min-height: 40px; margin-bottom: 14px; }
.plan-price { padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--surface-2), #f2fbff); border: 1px solid var(--border-color); margin-bottom: 16px; }
.plan-price strong { font-family: var(--font-heading); font-size: 30px; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-price span { color: var(--text-muted); font-size: 13px; margin-left: 4px; }
.plan-price small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.spec { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-color); font-size: 12px; display: flex; justify-content: space-between; gap: 6px; }
.spec span { color: var(--text-muted); }
.plan-features { list-style: none; display: grid; gap: 6px; margin-bottom: 16px; flex: 1; }
.plan-features li { font-size: 13px; padding-left: 22px; position: relative; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; min-height: 4px; }
.plan-tags span { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-muted); color: var(--text-muted); }

.checkout-main-col { min-width: 0; }
.config-step { padding: 22px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.step-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-head p { color: var(--text-muted); font-size: 13px; }
.step-no { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-gradient); color: #fff; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-glow); }
.req-pill, .opt-pill { font-family: var(--font-body); font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.req-pill { background: var(--danger-bg); color: var(--danger-ink); }
.opt-pill { background: var(--bg-muted); color: var(--text-muted); }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.option-card { position: relative; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-body { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 14px 16px; border: 2px solid var(--border-color); border-radius: 14px; background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.option-body small { color: var(--text-muted); font-size: 12px; }
.option-price { font-family: var(--font-heading); font-size: 20px; font-weight: 800; }
.option-price small { font-size: 12px; font-weight: 600; }
.option-card:hover .option-body { border-color: var(--brand-border); }
.option-card input:checked + .option-body { border-color: var(--primary); background: linear-gradient(135deg, var(--brand-soft), #f2fbff); box-shadow: 0 10px 24px -14px rgba(124, 58, 237, 0.6); }
.option-card input:focus-visible + .option-body { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.save-tag { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success-ink); }

.addon-list { display: grid; gap: 8px; }
.addon-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--border-color); border-radius: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.addon-row:hover { border-color: var(--brand-border); }
.addon-row:has(input:checked) { border-color: var(--primary); background: var(--brand-soft); }
.addon-row input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.addon-info { flex: 1; min-width: 0; }
.addon-info strong { display: block; font-size: 14px; }
.addon-info small { color: var(--text-muted); font-size: 12px; }
.addon-price { font-weight: 800; white-space: nowrap; color: var(--text-main); }
#cpFields { margin-top: 14px; }

.header-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.invoice-doc { padding: 32px; max-width: 920px; margin: 0 auto 24px; }
.invoice-doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border-color); }
.invoice-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
.invoice-brand .brand-icon { width: 34px; height: 34px; font-size: 16px; }
.invoice-muted { color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.invoice-doc-meta { text-align: right; }
.invoice-word { font-family: var(--font-heading); font-size: 28px; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.invoice-no { font-family: ui-monospace, monospace; font-weight: 700; margin: 2px 0 8px; }
.invoice-parties { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.invoice-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 4px; }
.invoice-dates { display: grid; gap: 4px; font-size: 13px; }
.invoice-dates div { display: flex; justify-content: space-between; gap: 24px; }
.invoice-dates span { color: var(--text-muted); }
.invoice-sum { margin-left: auto; width: min(320px, 100%); margin-top: 16px; }
.invoice-sum > div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-muted); font-size: 13.5px; }
.invoice-sum .grand { border-top: 1px solid var(--border-color); margin-top: 6px; padding-top: 12px; color: var(--text-main); font-weight: 800; font-size: 18px; }

.verify-hero { font-size: 56px; text-align: center; margin: 4px 0 10px; }
.verify-text { text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 44px 20px; }
.empty-icon { font-size: 42px; margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); }
.error-list { margin: 6px 0 0 18px; font-weight: 500; }

@media (max-width: 768px) {
    .plan-grid { grid-template-columns: 1fr; }
    .option-grid { grid-template-columns: 1fr 1fr; }
    .invoice-doc { padding: 20px; }
    .invoice-doc-meta { text-align: left; }
    .client-page-header .currency-switch { width: 100%; }
}
@media (max-width: 420px) {
    .option-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v4 — SOLID "HOSTING BLUE" THEME (no gradients)
   ========================================================================== */

body { background: var(--bg-base); }

/* Sidebar: white with solid blue brand bar */
.client-sidebar { background: var(--surface); backdrop-filter: none; }
.sidebar-brand { background: var(--brand-blue); }
.sidebar-brand::after { display: none; }
.brand-icon { background: rgba(255, 255, 255, 0.18); box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.35); }
.nav-item a, .nav-list .nav-item:nth-child(n) a { --chip: #1a5cff; --chip-tint: var(--brand-soft); --chip-ink: #1a5cff; }
.nav-item.active a { background: var(--brand-soft); box-shadow: none; color: var(--brand-ink); }
.nav-item.active svg { background: var(--brand-blue); box-shadow: none; }
.user-mini-card { background: var(--brand-soft); border-color: var(--brand-border); }
.user-avatar { background: var(--brand-blue); box-shadow: none; }

.client-header { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
.header-btn-whatsapp { background: #16a34a; box-shadow: none; }
.balance-chip { background: var(--success-bg); border-color: var(--success-border); }
.impersonation-bar { background: #f59e0b; }
.verify-banner-bar { background: var(--brand-blue); }

.client-page-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text-main); }

/* Hero banner: solid blue */
.whmcs-hero-banner { background: var(--brand-blue) !important; box-shadow: 0 14px 30px -18px rgba(26, 92, 255, 0.7); }
.whmcs-hero-banner::before { display: none; }

/* KPI cards: solid top bar + solid icon */
.client-kpi-card::after, .kpi-card::after { display: none; }
.kpi-blue { --kpi-grad: #1a5cff; } .kpi-cyan { --kpi-grad: #0ea5e9; } .kpi-green { --kpi-grad: #10b981; }
.kpi-amber { --kpi-grad: #f59e0b; } .kpi-pink { --kpi-grad: #6366f1; }
.kpi-icon { box-shadow: none; }

.client-card-header { background: var(--surface-2); }
.client-table th, .data-table th { background: var(--surface-2); color: #5b6b86; }
.client-table tbody tr:hover, .data-table tbody tr:hover, .client-table tbody tr:hover td { background: var(--brand-soft); }

/* Buttons — solid */
.btn-primary { background: var(--brand-blue); box-shadow: none; }
.btn-primary:hover { background: var(--brand-blue-dark); box-shadow: 0 6px 14px -6px rgba(26, 92, 255, 0.55); }
.btn-success { background: #16a34a; box-shadow: none; }
.btn-danger { background: #dc2626; box-shadow: none; }
.btn-whatsapp { background: #16a34a; box-shadow: none; }
.btn-cpanel { background: #ff6c2c; box-shadow: none; }

/* Store & checkout */
.group-tabs a.active { background: var(--brand-blue); box-shadow: none; }
.plan-popular { border: 2px solid var(--brand-blue) !important; background: var(--surface) !important; box-shadow: 0 18px 40px -24px rgba(26, 92, 255, 0.6) !important; }
.plan-ribbon { background: var(--brand-blue) !important; box-shadow: none; }
.plan-price { background: var(--brand-soft); }
.plan-price strong, .summary-total strong, .invoice-word { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--brand-blue); }
.step-no { background: var(--brand-blue); box-shadow: none; }
.option-card input:checked + .option-body { background: var(--brand-soft); border-color: var(--brand-blue); box-shadow: none; }
.addon-row:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-blue); }
.checkout-amount-hero { background: var(--brand-blue); }
.checkout-amount-hero::after { display: none; }
.pm-icon { box-shadow: none; }

/* Bottom nav */
.bottom-nav-fab { background: var(--brand-blue); box-shadow: 0 8px 18px -8px rgba(26, 92, 255, 0.7); }

/* Auth pages */
.auth-body { background: var(--brand-navy); }
.auth-orb { display: none; }
.auth-showcase { background: var(--brand-blue); backdrop-filter: none; }
.auth-tab.active { color: var(--brand-blue); }


/* ==========================================================================
   v4.1 — Domains & service lifecycle (client)
   ========================================================================== */
.seg-choice { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-muted); border-radius: 12px; margin-bottom: 12px; }
.seg-choice label { cursor: pointer; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--text-muted); }
.seg-choice input:checked + span { background: var(--surface); color: var(--brand-blue); box-shadow: var(--shadow-sm); }
.seg-choice input:focus-visible + span { outline: 2px solid var(--brand-blue); }
.domain-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.domain-result { margin-top: 10px; font-size: 13px; font-weight: 600; min-height: 4px; }
.domain-result.good { color: var(--success-ink); }
.domain-result.bad { color: #b91c1c; }
.domain-result.checking { color: var(--text-muted); }
#eppRow { margin-top: 12px; }

.domain-search-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 18px; }
.domain-search-hero .form-control { min-height: 52px; font-size: 16px; }
.domain-result-list { display: grid; }
.domain-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--border-subtle); }
.domain-row:first-child { background: var(--brand-soft); }
.domain-row:last-child { border-bottom: none; }
.domain-name strong { display: block; font-size: 15px; }
.domain-state { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.domain-state.good { color: var(--success-ink); }
.domain-state.bad { color: #b91c1c; }
.domain-price { font-weight: 800; font-size: 15px; }
.domain-price small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-muted); }
.domain-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.domain-actions .act-transfer { display: inline-flex; gap: 6px; }
.domain-actions .act-transfer[hidden], .domain-actions .act-register[hidden] { display: none !important; }
.years-select { width: auto; min-height: 34px; padding: 4px 10px; }
.epp-input { width: 120px; min-height: 34px; padding: 4px 10px; }

.service-billing-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; padding: 0; }
.service-billing-strip > div { padding: 16px 20px; border-right: 1px solid var(--border-subtle); }
.service-billing-strip > div:last-child { border-right: none; }
.service-billing-strip span { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); }
.service-billing-strip strong { font-size: 15px; }

@media (max-width: 720px) {
    .domain-row { grid-template-columns: 1fr; gap: 8px; }
    .domain-actions { justify-content: flex-start; }
    .domain-search-hero { grid-template-columns: 1fr; }
}

/* v4.2 — credit, coupons, upgrades, quotes, affiliates */
.credit-apply { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--success-border); background: var(--success-bg); border-radius: 12px; }
.credit-apply small { display: block; color: var(--text-muted); font-size: 12px; }
.coupon-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.discount-row strong { color: var(--success-ink); }
.amount-pos { color: var(--success-ink); font-weight: 700; }
.amount-neg { color: #b91c1c; font-weight: 700; }
.upgrade-card .option-grid { grid-template-columns: 1fr; }
.quote-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.affiliate-link { padding: 18px 22px; }
.affiliate-link > span { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 8px; }

/* ==========================================================================
   cPanel Cloud Hosting Launchpad & Telemetry Styles
   ========================================================================== */
.cpanel-hero-bar {
    background: linear-gradient(135deg, #090e17 0%, #111a2e 50%, #1e1333 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl, 18px);
    padding: 24px 28px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    box-shadow: 0 12px 32px -10px rgba(9, 14, 23, 0.5);
    position: relative;
    overflow: hidden;
}
.cpanel-hero-bar::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 120, 92, 0.18), transparent 70%);
    pointer-events: none;
}
.btn-cpanel-gold {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff !important;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(247, 147, 30, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cpanel-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(247, 147, 30, 0.5);
    color: #ffffff !important;
}

.cpanel-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.telemetry-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, transform 0.2s;
}
.telemetry-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.telemetry-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.telemetry-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.telemetry-metric {
    font-size: 19px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 8px;
}
.telemetry-track {
    height: 7px;
    background: var(--border-subtle, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}
.telemetry-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}
.telemetry-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.cpanel-suites-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}
.cpanel-suite-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl, 16px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.cpanel-suite-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
}
.cpanel-suite-title {
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}
.cpanel-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 20px;
}
.cpanel-tool-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle, #f1f5f9);
    background: var(--bg-base);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.cpanel-tool-item:hover {
    border-color: var(--primary);
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -4px rgba(204, 120, 92, 0.15);
}
.tool-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}
.tool-body {
    flex: 1;
    min-width: 0;
}
.tool-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.tool-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
}
.tool-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* ==========================================================================
   Client Portal Promotional Banner & Topbar Responsiveness
   ========================================================================== */
.client-dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.client-promo-banner-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.client-promo-banner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px -10px rgba(10, 15, 30, 0.55) !important;
}

.promo-banner-media img {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-promo-banner-card:hover .promo-banner-media img {
    transform: scale(1.02);
}

.promo-code-badge-box {
    transition: background 0.2s ease, border-color 0.2s ease;
}

.promo-code-badge-box:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
}

@media (max-width: 860px) {
    .client-promo-banner-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
        padding: 20px 22px !important;
    }

    .promo-banner-media {
        width: 100% !important;
        justify-content: center !important;
    }

    .promo-banner-media img {
        max-width: 100% !important;
        max-height: 180px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
}

@media (max-width: 540px) {
    .client-dashboard-topbar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .client-dashboard-topbar > div:last-child {
        width: 100%;
    }

    .client-dashboard-topbar .btn {
        flex: 1;
        justify-content: center;
    }
}
