:root {
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-text: #111827;
    --app-muted: #64748b;
    --app-border: #e5eaf1;
    --app-navy: #0b1220;
    --app-blue: #2563eb;
    --app-blue-soft: #eff6ff;
    --app-shadow: 0 12px 34px rgba(15, 23, 42, .07);
    --app-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--app-text); background: var(--app-bg); font-family: "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { text-decoration: none; }
img { max-width: 100%; }

.app-btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s ease; white-space: nowrap; }
.app-btn:hover { transform: translateY(-1px); }
.app-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.app-btn--primary { color: #fff !important; background: linear-gradient(135deg, var(--primary-color), #3b82f6); box-shadow: 0 8px 18px rgba(37, 99, 235, .22); }
.app-btn--primary:hover { box-shadow: 0 12px 25px rgba(37, 99, 235, .3); }
.app-btn--ghost { color: #334155; border-color: #dbe3ee; background: #fff; }
.app-btn--white { color: #153054; background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .15); }
.app-btn--glass { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.app-btn--block { width: 100%; }

/* Public shell */
.site-mode { background: #fff; }
.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(226,232,240,.82); background: rgba(255,255,255,.9); backdrop-filter: blur(18px); }
.site-header__inner { width: min(1180px, calc(100% - 36px)); height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand, .app-brand a, .footer-brand a { display: inline-flex; align-items: center; gap: 10px; color: #0f172a; font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.site-brand img, .app-brand img, .footer-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: #475569; font-size: 14px; font-weight: 600; transition: .2s; }
.site-nav a:hover { color: var(--primary-color); }
.site-actions { display: flex; align-items: center; gap: 12px; }
.login-link { color: #334155; font-size: 14px; font-weight: 700; padding: 11px 6px; }
.mobile-trigger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; color: #334155; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; cursor: pointer; }
.user-avatar { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: #fff; border-radius: 12px; background: linear-gradient(145deg, #2563eb, #7c3aed); font-size: 12px; font-weight: 800; box-shadow: 0 5px 14px rgba(37,99,235,.25); }
.user-mini { display: flex; }
.site-mobile-menu { position: fixed; z-index: 90; top: 0; right: 0; width: min(330px, 88vw); height: 100vh; padding: 20px; background: #fff; transform: translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(15,23,42,.15); }
.site-mobile-menu.open { transform: translateX(0); }
.site-mobile-menu .app-brand { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid #e2e8f0; }
.site-mobile-menu button, .app-brand button { width: 38px; height: 38px; color: #64748b; border: 0; border-radius: 10px; background: #f1f5f9; cursor: pointer; }
.site-mobile-menu nav { display: grid; gap: 6px; margin-top: 18px; }
.site-mobile-menu nav a { display: flex; gap: 12px; align-items: center; padding: 13px 14px; color: #334155; border-radius: 11px; font-weight: 600; }
.site-mobile-menu nav a:hover { color: var(--primary-color); background: #eff6ff; }
.site-mobile-menu nav i { width: 20px; color: #64748b; text-align: center; }
.site-mobile-overlay, .app-sidebar-overlay { position: fixed; z-index: 80; inset: 0; display: none; background: rgba(2,6,23,.52); backdrop-filter: blur(2px); }
.site-content { min-height: 65vh; }
.site-footer { color: #cbd5e1; background: #0b1220; }
.site-footer__top { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 68px 0 48px; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 56px; }
.site-footer__top > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 11px; }
.site-footer__top h3 { margin: 0 0 9px; color: #fff; font-size: 14px; }
.site-footer__top a, .site-footer__top span { color: #94a3b8; font-size: 13px; line-height: 1.6; transition: .2s; }
.site-footer__top a:hover { color: #fff; }
.footer-brand a { color: #fff; }
.footer-brand p { max-width: 390px; margin: 18px 0 0; color: #94a3b8; font-size: 13px; line-height: 1.8; }
.site-footer__bottom { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 22px 0; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #1e293b; color: #64748b; font-size: 12px; }

/* App shell */
.app-layout { min-height: 100vh; }
.app-sidebar { position: fixed; z-index: 90; inset: 0 auto 0 0; width: 260px; display: flex; flex-direction: column; color: #cbd5e1; background: linear-gradient(180deg, #0b1220 0%, #111b2e 100%); box-shadow: 10px 0 30px rgba(2,6,23,.07); }
.app-brand { height: 78px; display: flex; flex: 0 0 78px; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.07); }
.app-sidebar .app-brand a { color: #fff; }
.app-sidebar .app-brand img { background: rgba(255,255,255,.08); }
.app-sidebar .app-brand button { display: none; color: #cbd5e1; background: rgba(255,255,255,.08); }
.app-nav { flex: 1; overflow-y: auto; padding: 18px 13px; scrollbar-width: thin; }
.app-nav__label { display: block; margin: 18px 12px 8px; color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: 1.25px; }
.app-nav__label:first-child { margin-top: 2px; }
.app-nav a { position: relative; display: flex; min-height: 44px; align-items: center; gap: 12px; margin: 3px 0; padding: 0 12px; color: #94a3b8; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 600; transition: .18s ease; }
.app-nav a i { width: 21px; color: #718198; font-size: 15px; text-align: center; transition: .18s; }
.app-nav a span { flex: 1; }
.app-nav a em { padding: 3px 6px; color: #bfdbfe; border-radius: 5px; background: rgba(59,130,246,.18); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .5px; }
.app-nav a:hover { color: #e2e8f0; background: rgba(255,255,255,.05); }
.app-nav a.is-active { color: #fff; border-color: rgba(96,165,250,.14); background: linear-gradient(90deg, rgba(37,99,235,.32), rgba(37,99,235,.12)); box-shadow: inset 3px 0 #60a5fa; }
.app-nav a.is-active i { color: #60a5fa; }
.sidebar-balance { margin: 0 14px 12px; padding: 15px; display: grid; gap: 5px; border: 1px solid rgba(96,165,250,.18); border-radius: 13px; background: rgba(37,99,235,.10); }
.sidebar-balance span { color: #94a3b8; font-size: 10px; }
.sidebar-balance strong { color: #fff; font-size: 17px; }
.sidebar-balance a { margin-top: 3px; color: #93c5fd; font-size: 10px; font-weight: 700; }
.sidebar-user { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.sidebar-user strong, .sidebar-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #e2e8f0; font-size: 11px; }
.sidebar-user small { color: #64748b; font-size: 9px; }
.sidebar-user > a { color: #64748b; padding: 8px; }
.app-main { min-height: 100vh; margin-left: 260px; display: flex; flex-direction: column; }
.app-topbar { position: sticky; z-index: 40; top: 0; height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); }
.topbar-search { width: min(420px, 42vw); height: 43px; display: flex; align-items: center; gap: 10px; padding: 0 13px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.topbar-search input { min-width: 0; flex: 1; color: #334155; border: 0; outline: 0; background: transparent; font-size: 12px; }
.topbar-search kbd { padding: 3px 6px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 5px; background: #fff; font-size: 9px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-icon { width: 41px; height: 41px; display: grid; place-items: center; color: #475569; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; }
.topbar-profile { min-width: 180px; display: flex; align-items: center; gap: 9px; margin-left: 4px; padding: 4px 8px 4px 5px; color: #334155; border-radius: 12px; transition: .2s; }
.topbar-profile:hover { background: #f1f5f9; }
.topbar-profile > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.topbar-profile strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile small { color: #64748b; font-size: 9px; }
.topbar-profile > i { color: #94a3b8; font-size: 10px; }
.app-content { width: 100%; flex: 1; }
.app-page { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 48px; }
.app-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 30px; color: #94a3b8; border-top: 1px solid #e2e8f0; background: #fff; font-size: 10px; }
.app-bottom-nav { display: none; }

/* Generic app components */
.eyebrow { display: block; margin-bottom: 7px; color: #3b82f6; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.app-panel { padding: 22px; border: 1px solid var(--app-border); border-radius: var(--app-radius); background: #fff; box-shadow: 0 8px 25px rgba(15,23,42,.045); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.panel-heading h2 { margin: 0; color: #172033; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.panel-heading a { color: #2563eb; font-size: 10px; font-weight: 700; }
.page-intro { min-height: 160px; display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 25px; padding: 32px 36px; color: #fff; border-radius: 22px; background: radial-gradient(circle at 80% 20%, rgba(96,165,250,.35), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a); overflow: hidden; }
.page-intro h1 { margin: 0 0 9px; font-size: clamp(25px, 3vw, 36px); font-weight: 800; letter-spacing: -1px; }
.page-intro p { max-width: 710px; margin: 0; color: #cbd5e1; font-size: 12px; line-height: 1.7; }
.page-intro .eyebrow { color: #93c5fd; }
.page-intro--compact { min-height: 145px; }
.balance-chip { min-width: 210px; padding: 17px 19px; display: grid; gap: 3px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.balance-chip span { color: #bfdbfe; font-size: 9px; }
.balance-chip strong { font-size: 21px; }
.balance-chip a { margin-top: 4px; color: #fff; font-size: 9px; font-weight: 700; }
.app-table-wrap { width: 100%; overflow-x: auto; }
.app-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.app-table th { padding: 11px 13px; color: #94a3b8; border-bottom: 1px solid #e5eaf1; font-size: 8px; font-weight: 800; letter-spacing: .65px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.app-table td { padding: 14px 13px; color: #475569; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.app-table tbody tr:last-child td { border-bottom: 0; }
.app-table tbody tr:hover { background: #fafcff; }
.app-table td strong { color: #1e293b; font-size: 11px; }
.app-table td small { display: block; margin-top: 3px; color: #94a3b8; font-size: 8px; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.status-active { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.status-processing { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.status-awaiting_payment { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.status-failed, .status-cancelled { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.status-expired, .status-refunded { color: #475569; border-color: #e2e8f0; background: #f8fafc; }
.empty-inline { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: #94a3b8; }
.empty-inline i { font-size: 20px; }
.empty-inline a { color: #2563eb; font-weight: 700; }
.empty-state { grid-column: 1/-1; padding: 60px 24px; color: #64748b; border: 1px dashed #cbd5e1; border-radius: 18px; background: #fff; text-align: center; }
.empty-state > span { width: 58px; height: 58px; display: grid; margin: 0 auto 16px; place-items: center; color: #3b82f6; border-radius: 16px; background: #eff6ff; font-size: 23px; }
.empty-state h2 { margin: 0 0 7px; color: #1e293b; font-size: 16px; }
.empty-state p { margin: 0; font-size: 11px; }
.empty-state--table { border: 0; box-shadow: none; }

/* Dashboard */
.dashboard-hero { position: relative; min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 23px; padding: 34px 38px; color: #fff; border-radius: 23px; background: radial-gradient(circle at 72% 14%, rgba(56,189,248,.35), transparent 28%), radial-gradient(circle at 96% 100%, rgba(139,92,246,.32), transparent 34%), linear-gradient(130deg, #0f172a 0%, #153e75 65%, #1d4ed8 100%); box-shadow: 0 18px 38px rgba(30,64,175,.16); overflow: hidden; }
.dashboard-hero:after { content: ""; position: absolute; right: 8%; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 68px rgba(255,255,255,.025); }
.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-hero .eyebrow { color: #93c5fd; }
.dashboard-hero h1 { margin: 0 0 9px; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -1.3px; }
.dashboard-hero p { margin: 0; color: #cbd5e1; font-size: 12px; }
.dashboard-hero__actions { display: flex; gap: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.metric-card { min-height: 122px; display: flex; align-items: flex-start; gap: 13px; padding: 20px; border: 1px solid var(--app-border); border-radius: 17px; background: #fff; box-shadow: 0 7px 22px rgba(15,23,42,.04); }
.metric-icon { width: 39px; height: 39px; display: grid; flex: 0 0 39px; place-items: center; color: #2563eb; border-radius: 12px; background: #eff6ff; font-size: 15px; }
.metric-icon--green { color: #059669; background: #ecfdf5; }.metric-icon--amber { color: #d97706; background: #fffbeb; }.metric-icon--violet { color: #7c3aed; background: #f5f3ff; }
.metric-card > div { min-width: 0; display: grid; gap: 3px; }
.metric-card p { margin: 0; color: #64748b; font-size: 9px; font-weight: 600; }
.metric-card strong { margin: 2px 0; color: #111827; font-size: 21px; font-weight: 800; letter-spacing: -.6px; }
.metric-card a, .metric-note { color: #94a3b8; font-size: 8px; font-weight: 600; }
.metric-card a { color: #2563eb; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .8fr); gap: 19px; margin-bottom: 19px; }
.service-shortcuts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.service-shortcuts > a { min-height: 75px; display: flex; align-items: center; gap: 12px; padding: 12px; color: #475569; border: 1px solid #e8edf4; border-radius: 13px; transition: .2s; }
.service-shortcuts > a:hover { border-color: #bfdbfe; background: #f8fbff; transform: translateY(-1px); }
.service-shortcuts > a > div { flex: 1; display: grid; gap: 3px; }
.service-shortcuts strong { color: #1e293b; font-size: 11px; }
.service-shortcuts small { color: #94a3b8; font-size: 8px; }
.service-shortcuts > a > i { color: #cbd5e1; font-size: 9px; }
.shortcut-icon { width: 39px; height: 39px; display: grid; place-items: center; color: #2563eb; border-radius: 11px; background: #eff6ff; }
.shortcut-icon--cyan { color: #0891b2; background: #ecfeff; }.shortcut-icon--violet { color: #7c3aed; background: #f5f3ff; }.shortcut-icon--orange { color: #ea580c; background: #fff7ed; }
.quick-buy { display: flex; flex-direction: column; }
.quick-buy > a { display: flex; align-items: center; gap: 11px; padding: 10px 3px; color: #475569; border-bottom: 1px solid #edf1f6; }
.quick-buy > a:last-child { border: 0; }
.quick-buy > a > i { width: 34px; height: 34px; display: grid; place-items: center; color: #2563eb; border-radius: 10px; background: #eff6ff; font-size: 12px; }
.quick-buy > a span { display: grid; gap: 2px; }.quick-buy strong { color: #1e293b; font-size: 10px; }.quick-buy small { color: #94a3b8; font-size: 8px; }

/* Auth */
.auth-shell { width: min(1080px, calc(100% - 36px)); min-height: 660px; display: grid; grid-template-columns: .92fr 1.08fr; margin: 54px auto 70px; border: 1px solid #e2e8f0; border-radius: 26px; background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.1); overflow: hidden; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 52px; color: #fff; background: radial-gradient(circle at 80% 20%, rgba(56,189,248,.32), transparent 29%), radial-gradient(circle at 15% 85%, rgba(124,58,237,.28), transparent 35%), linear-gradient(145deg, #0b1220, #1e3a8a); overflow: hidden; }
.auth-visual:after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.03), 0 0 0 85px rgba(255,255,255,.02); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual__badge { align-self: flex-start; margin-bottom: 26px; padding: 8px 11px; color: #bfdbfe; border: 1px solid rgba(147,197,253,.25); border-radius: 8px; background: rgba(59,130,246,.12); font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.auth-visual h1 { margin: 0 0 17px; font-size: clamp(30px, 4vw, 43px); font-weight: 800; line-height: 1.16; letter-spacing: -1.7px; }
.auth-visual > p { margin: 0; color: #b8c5d8; font-size: 12px; line-height: 1.8; }
.auth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 39px; }
.auth-stats div { padding: 13px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.05); }
.auth-stats strong, .auth-stats span { display: block; }.auth-stats strong { color: #fff; font-size: 12px; }.auth-stats span { margin-top: 3px; color: #93a4bb; font-size: 7px; }
.auth-security-list { display: grid; gap: 12px; margin-top: 35px; }
.auth-security-list span { display: flex; align-items: center; gap: 10px; color: #dbeafe; font-size: 10px; }
.auth-security-list i { width: 21px; height: 21px; display: grid; place-items: center; color: #6ee7b7; border-radius: 50%; background: rgba(16,185,129,.13); font-size: 8px; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 58px 70px; }
.auth-card--wide { padding-left: 52px; padding-right: 52px; }
.auth-heading { margin-bottom: 25px; }
.auth-icon { width: 43px; height: 43px; display: grid; margin-bottom: 16px; place-items: center; color: #2563eb; border-radius: 13px; background: #eff6ff; font-size: 16px; }
.auth-heading h2 { margin: 0 0 7px; color: #111827; font-size: 25px; font-weight: 800; letter-spacing: -.7px; }
.auth-heading p { margin: 0; color: #94a3b8; font-size: 10px; }
.auth-form { display: grid; gap: 16px; }
.auth-form > label, .auth-grid > label, .app-modal label { display: grid; gap: 7px; color: #475569; font-size: 9px; font-weight: 700; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-form input:not([type=checkbox]), .auth-form textarea, .input-icon, .password-field, .app-modal input, .app-modal textarea { width: 100%; min-height: 46px; color: #1e293b; border: 1px solid #dde4ee; border-radius: 11px; outline: 0; background: #fbfdff; transition: .2s; }
.input-icon, .password-field { display: flex; align-items: center; overflow: hidden; }
.input-icon > i { width: 42px; color: #94a3b8; font-size: 12px; text-align: center; }
.input-icon input, .password-field input { height: 44px; flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.password-field input { padding-left: 13px !important; }
.password-field button { width: 43px; height: 44px; color: #94a3b8; border: 0; background: transparent; cursor: pointer; }
.auth-form input:focus, .input-icon:focus-within, .password-field:focus-within, .app-modal input:focus, .app-modal textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-options a, .auth-switch a, .auth-back { color: #2563eb; font-size: 9px; font-weight: 700; }
.check-row { display: flex !important; align-items: center; gap: 8px !important; color: #64748b !important; font-size: 9px !important; font-weight: 500 !important; cursor: pointer; }
.check-row input { width: 15px; height: 15px; accent-color: #2563eb; }
.check-row--terms { align-items: flex-start; line-height: 1.5; }
.auth-switch { margin: 22px 0 0; color: #94a3b8; font-size: 9px; text-align: center; }
.password-hint { display: flex; gap: 13px; color: #a1adbd; font-size: 8px; }
.password-hint span { display: flex; align-items: center; gap: 5px; }.password-hint i { font-size: 4px; }.password-hint .is-valid { color: #059669; }
.auth-back { align-self: flex-start; margin-bottom: 28px; }

/* Marketplace */
.filter-pills { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.filter-pills a,.filter-pills button { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; color: #64748b; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; font: inherit; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.filter-pills a.is-active,.filter-pills button.is-active { color: #fff; border-color: #2563eb; background: #2563eb; box-shadow: 0 7px 16px rgba(37,99,235,.18); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-card { display: flex; flex-direction: column; border: 1px solid #e5eaf1; border-radius: 18px; background: #fff; box-shadow: 0 8px 25px rgba(15,23,42,.045); overflow: hidden; transition: .22s ease; }
.product-card:hover { border-color: #bfdbfe; transform: translateY(-3px); box-shadow: 0 16px 35px rgba(15,23,42,.09); }
.product-card__visual { position: relative; height: 155px; display: grid; place-items: center; background: #eff6ff; overflow: hidden; }
.product-card__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }.product-card:hover .product-card__visual img { transform: scale(1.04); }
.product-card__visual.is-placeholder { color: #3b82f6; background: radial-gradient(circle at 75% 20%, rgba(96,165,250,.28), transparent 32%), linear-gradient(135deg, #eff6ff, #eef2ff); font-size: 43px; }
.product-type { position: absolute; top: 12px; left: 12px; padding: 5px 8px; color: #1e40af; border: 1px solid rgba(147,197,253,.5); border-radius: 7px; background: rgba(255,255,255,.9); font-size: 8px; font-weight: 800; backdrop-filter: blur(6px); }
.product-card__body { flex: 1; padding: 18px 18px 10px; }
.product-card__body h2 { margin: 0 0 7px; color: #172033; font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.product-card__body > p { min-height: 36px; margin: 0 0 13px; color: #7b8ba3; font-size: 9px; line-height: 1.65; }
.product-card__body ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.product-card__body li { display: flex; align-items: center; gap: 7px; color: #536176; font-size: 9px; }.product-card__body li i { color: #10b981; font-size: 9px; }
.product-card__footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 15px 18px 18px; border-top: 1px solid #edf1f6; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }.product-price span { width: 100%; color: #94a3b8; font-size: 7px; }.product-price strong { color: #0f172a; font-size: 18px; font-weight: 800; }.product-price small { color: #94a3b8; font-size: 7px; }
.product-card .app-btn { min-height: 39px; padding: 0 13px; font-size: 9px; }

/* Orders */
.order-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-box { width: min(380px, 60%); height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 10px; }
.order-toolbar select { min-width: 165px; padding: 0 11px; color: #475569; border: 1px solid #e2e8f0; border-radius: 10px; outline: 0; background: #fff; font-size: 9px; }
.order-table td:nth-child(2) { min-width: 210px; display: table-cell; }.order-table td:nth-child(2) > div { display: inline-grid; vertical-align: middle; }
.order-product-icon { width: 35px; height: 35px; margin-right: 8px; place-items: center; color: #2563eb; border-radius: 10px; background: #eff6ff; }
.table-actions { text-align: right; }.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; color: #2563eb; border: 1px solid #dbeafe; border-radius: 9px; background: #eff6ff; cursor: pointer; }.icon-btn.is-disabled { color: #cbd5e1; border-color: #e2e8f0; background: #f8fafc; }

/* Account */
.security-score { min-width: 210px; display: flex; align-items: center; gap: 13px; padding: 13px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.09); }.security-score__ring { --angle: calc(var(--score) * 3.6deg); width: 55px; height: 55px; display: grid; flex: 0 0 55px; place-items: center; border-radius: 50%; background: radial-gradient(circle at center,#1c3470 59%,transparent 60%), conic-gradient(#34d399 var(--angle),rgba(255,255,255,.13) 0); }.security-score__ring strong { font-size: 14px; }.security-score__ring small { margin: -17px 0 0 24px; color: #94a3b8; font-size: 6px; }.security-score > div:last-child { display: grid; gap: 3px; }.security-score span { color: #bfdbfe; font-size: 8px; }.security-score > div:last-child strong { font-size: 12px; }
.account-grid { display: grid; grid-template-columns: 260px 1fr; align-items: start; gap: 18px; margin-bottom: 18px; }.account-summary { position: sticky; top: 98px; text-align: center; }.account-avatar { width: 78px; height: 78px; display: grid; margin: 4px auto 14px; place-items: center; color: #fff; border-radius: 22px; background: linear-gradient(145deg,#2563eb,#7c3aed); font-size: 25px; font-weight: 800; box-shadow: 0 12px 25px rgba(37,99,235,.22); }.account-summary h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }.account-summary > p { margin: 0; color: #94a3b8; font-size: 9px; }.account-meta { display: grid; gap: 0; margin-top: 20px; text-align: left; }.account-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #edf1f6; }.account-meta span { color: #94a3b8; font-size: 8px; }.account-meta strong { color: #475569; font-size: 8px; }.danger-link { width: 100%; min-height: 40px; margin-top: 18px; color: #dc2626; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; font-size: 9px; font-weight: 700; cursor: pointer; }
.account-main { display: grid; gap: 18px; }.account-section { padding: 24px; }.settings-form { display: grid; gap: 14px; }.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.settings-form label { display: grid; gap: 7px; color: #64748b; font-size: 9px; font-weight: 700; }.settings-form input { width: 100%; min-height: 43px; padding: 0 12px; color: #334155; border: 1px solid #dde4ee; border-radius: 10px; outline: 0; background: #fbfdff; }.settings-form input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }.settings-form input:disabled { color: #94a3b8; background: #f1f5f9; }.settings-form label small { color: #94a3b8; font-size: 7px; font-weight: 400; }.form-actions { display: flex; justify-content: flex-end; }.form-note { display: flex; gap: 7px; margin: 0; color: #94a3b8; font-size: 8px; }.secure-badge { padding: 5px 8px; color: #047857; border-radius: 7px; background: #ecfdf5; font-size: 7px; font-weight: 800; }
.setting-row { display: flex; align-items: center; gap: 12px; }.setting-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #2563eb; border-radius: 11px; background: #eff6ff; }.setting-row > div { flex: 1; display: grid; gap: 3px; }.setting-row strong { color: #334155; font-size: 10px; }.setting-row small { color: #94a3b8; font-size: 8px; }.switch { position: relative; width: 42px; height: 23px; }.switch input { opacity: 0; width: 0; height: 0; }.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; cursor: pointer; transition: .2s; }.switch span:before { content:""; position:absolute; width:17px; height:17px; top:3px; left:3px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(15,23,42,.18); transition:.2s; }.switch input:checked + span { background:#2563eb; }.switch input:checked + span:before { transform:translateX(19px); }
.activity-list { display: grid; }.activity-list article { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #edf1f6; }.activity-list article:last-child { border: 0; }.activity-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #2563eb; border-radius: 10px; background: #eff6ff; font-size: 11px; }.activity-list article > div { flex: 1; display: grid; gap: 3px; }.activity-list strong { color: #334155; font-size: 9px; }.activity-list small { color: #94a3b8; font-size: 7px; }.activity-list time { color: #94a3b8; font-size: 7px; white-space: nowrap; }

/* Modal + payment */
.app-modal, .payment-sheet { position: fixed; z-index: 120; inset: 0; display: none; place-items: center; padding: 20px; }
.app-modal.is-open, .payment-sheet.is-open { display: grid; }
.app-modal__backdrop, .payment-sheet__backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.68); backdrop-filter: blur(5px); }
.app-modal__dialog { position: relative; z-index: 1; width: min(470px, 100%); padding: 29px; border-radius: 20px; background: #fff; box-shadow: 0 28px 75px rgba(2,6,23,.3); }
.app-modal__close, .payment-sheet__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; color: #64748b; border: 0; border-radius: 10px; background: #f1f5f9; cursor: pointer; }
.modal-icon { width: 45px; height: 45px; display: grid; margin-bottom: 14px; place-items: center; color: #2563eb; border-radius: 13px; background: #eff6ff; }
.app-modal h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }.app-modal > div > p { margin: 0 0 20px; color: #64748b; font-size: 10px; }
.app-modal form { display: grid; gap: 14px; }.app-modal input, .app-modal textarea { min-height: 43px; padding: 11px 12px; resize: vertical; }.checkout-summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-radius: 11px; background: #f8fafc; }.checkout-summary span { color: #64748b; font-size: 9px; }.checkout-summary strong { font-size: 17px; }
.payment-sheet__dialog { position: relative; z-index: 1; width: min(760px, 100%); padding: 27px; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(2,6,23,.36); }
.payment-sheet__head { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }.payment-sheet__head > span { width: 46px; height: 46px; display: grid; place-items: center; color: #2563eb; border-radius: 13px; background: #eff6ff; font-size: 18px; }.payment-sheet__head small { color: #3b82f6; font-size: 7px; font-weight: 800; letter-spacing: 1px; }.payment-sheet__head h2 { margin: 3px 0 0; font-size: 18px; font-weight: 800; }
.payment-sheet__grid { display: grid; grid-template-columns: 260px 1fr; gap: 25px; }.qr-card { padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #e2e8f0; border-radius: 15px; background: #f8fafc; }.qr-card img { width: 225px; height: 225px; object-fit: contain; border-radius: 10px; background: #fff; }.qr-card span { margin-top: 9px; color: #94a3b8; font-size: 8px; }
.payment-details > div:first-child { margin-bottom: 15px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, #eff6ff, #eef2ff); }.payment-details > div:first-child span, .payment-details > div:first-child strong { display: block; }.payment-details > div:first-child span { color: #64748b; font-size: 8px; }.payment-details > div:first-child strong { margin-top: 3px; color: #1d4ed8; font-size: 23px; }
.payment-details dl { display: grid; grid-template-columns: 100px 1fr; gap: 10px 13px; margin: 0 0 15px; font-size: 9px; }.payment-details dt { color: #94a3b8; }.payment-details dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; color: #334155; font-weight: 700; }.payment-details dd button { color: #2563eb; border: 0; background: transparent; cursor: pointer; }.payment-reference span { color: #1d4ed8; letter-spacing: .8px; }
.payment-waiting { display: flex; align-items: center; gap: 10px; padding: 11px; color: #d97706; border: 1px solid #fde68a; border-radius: 11px; background: #fffbeb; }.payment-waiting > span { display: grid; gap: 2px; }.payment-waiting strong { font-size: 9px; }.payment-waiting small { color: #a16207; font-size: 7px; }.payment-expiry { margin-top: 9px; color: #94a3b8; font-size: 8px; text-align: center; }.payment-expiry strong { color: #475569; }

/* Improve legacy Tailwind views inside the app */
.app-mode .app-content > section { padding-top: 34px !important; padding-bottom: 44px !important; }
.app-mode .app-content .bg-white { border: 1px solid #e5eaf1; box-shadow: 0 8px 25px rgba(15,23,42,.045) !important; }
.app-mode .app-content .rounded-lg { border-radius: 15px; }
.app-mode .app-content h2, .app-mode .app-content h3 { color: #172033; letter-spacing: -.35px; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .site-nav { gap: 18px; }
}

@media (max-width: 920px) {
    body.menu-open { overflow: hidden; }
    .site-nav, .site-actions > .login-link, .site-actions > .app-btn { display: none; }
    .mobile-trigger { display: inline-flex; }
    .app-sidebar { transform: translateX(-105%); transition: transform .25s ease; }
    .app-sidebar.open { transform: translateX(0); }
    .app-sidebar.open ~ .app-sidebar-overlay, body:has(.site-mobile-menu.open) .site-mobile-overlay { display: block; }
    .app-sidebar .app-brand button { display: inline-grid; place-items: center; }
    .app-main { margin-left: 0; }
    .app-topbar { padding: 0 20px; }
    .topbar-search { margin-left: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .site-footer__top { grid-template-columns: 1.5fr 1fr 1fr; }.site-footer__top > div:last-child { grid-column: 1/-1; }
}

@media (max-width: 680px) {
    body.app-mode { padding-bottom: 72px; }
    .app-page { width: calc(100% - 24px); padding-top: 17px; }
    .app-topbar { height: 64px; padding: 0 12px; }.topbar-search { display: none; }.topbar-profile { min-width: 0; padding: 0; }.topbar-profile > div, .topbar-profile > i { display: none; }.topbar-icon { width: 38px; height: 38px; }
    .app-bottom-nav { position: fixed; z-index: 55; right: 0; bottom: 0; left: 0; height: calc(66px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; padding: 7px 10px env(safe-area-inset-bottom); border-top: 1px solid #e2e8f0; background: rgba(255,255,255,.96); backdrop-filter: blur(15px); box-shadow: 0 -8px 24px rgba(15,23,42,.06); }
    .app-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #94a3b8; font-size: 8px; font-weight: 600; }.app-bottom-nav a i { font-size: 15px; }.app-bottom-nav a.is-active { color: #2563eb; }.app-bottom-nav__buy { width: 43px; height: 43px; margin: -17px auto 0; color: #fff !important; border: 4px solid var(--app-bg); border-radius: 50%; background: linear-gradient(135deg,#2563eb,#7c3aed); box-shadow: 0 8px 18px rgba(37,99,235,.3); }
    .app-footer { display: none; }
    .dashboard-hero, .page-intro { min-height: 0; align-items: flex-start; flex-direction: column; padding: 25px 22px; border-radius: 18px; }.dashboard-hero h1, .page-intro h1 { font-size: 25px; }.dashboard-hero__actions { width: 100%; }.dashboard-hero__actions .app-btn { flex: 1; padding: 0 10px; }.balance-chip { width: 100%; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { min-height: 116px; flex-direction: column; padding: 15px; }.metric-card strong { font-size: 18px; }
    .service-shortcuts { grid-template-columns: 1fr; }.app-panel { padding: 17px; border-radius: 15px; }
    .account-grid { grid-template-columns: 1fr; }.account-summary { position: static; }.settings-grid { grid-template-columns: 1fr; }.security-score { width: 100%; }
    .product-grid { grid-template-columns: 1fr; }.product-card__visual { height: 180px; }
    .order-toolbar { flex-direction: column; }.search-box, .order-toolbar select { width: 100%; max-width: none; min-height: 41px; }.order-table { min-width: 760px; }
    .auth-shell { width: calc(100% - 24px); min-height: 0; grid-template-columns: 1fr; margin: 22px auto 38px; border-radius: 19px; }.auth-visual { display: none; }.auth-card, .auth-card--wide { padding: 32px 22px; }.auth-grid { grid-template-columns: 1fr; }.password-hint { flex-wrap: wrap; }
    .payment-sheet { align-items: end; padding: 0; }.payment-sheet__dialog { max-height: 94vh; padding: 22px 17px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; overflow-y: auto; }.payment-sheet__grid { grid-template-columns: 1fr; }.qr-card img { width: 200px; height: 200px; }.payment-sheet__head h2 { font-size: 15px; }
    .site-footer__top { grid-template-columns: 1fr 1fr; gap: 30px; padding: 45px 0 35px; }.footer-brand { grid-column: 1/-1; }.site-footer__top > div:last-child { grid-column: auto; }.site-footer__bottom { flex-direction: column; text-align: center; }
}
