/* =====================================================================
   Skay CRM – "Aurora" theme  (v3)
   Indigo-violet brand · midnight sidebar · floating dock on mobile
   Same class names as before, so every page keeps working.
   ===================================================================== */
:root {
    /* brand */
    --ink: #15112E;
    --ink-2: #1E1946;
    --ink-3: #2A2460;
    --primary: #6B4EFF;
    --primary-600: #5A3CF0;
    --violet: #9A5CFF;
    --pink: #FF5FA2;
    --amber: #FFB43A;
    --mint: #19C3A0;
    --grad: linear-gradient(135deg, #5B3DF5 0%, #9A5CFF 100%);
    --grad-warm: linear-gradient(135deg, #6B4EFF 0%, #B25CFF 55%, #FF6FB1 100%);

    /* legacy aliases (pages / service form still use these names) */
    --navy: var(--ink);
    --navy-2: var(--ink-2);
    --blue: var(--primary);
    --cyan: var(--mint);
    --orange: var(--mint);
    --coral: #F0506E;
    --blue-soft: #EEEAFF;
    --teal-soft: #DFF7F0;

    /* surfaces */
    --bg: #F4F3FB;
    --card: #FFFFFF;
    --text: #1B1738;
    --muted: #6E6A8C;
    --line: #E8E6F3;
    --danger: #E5484D;
    --ok: #16A34A;

    /* metrics */
    --radius: 18px;
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --bar-h: 60px;
    --tab-h: 68px;
    --sidebar: 272px;
    --shadow: 0 18px 50px rgba(30, 20, 90, .14);
    --shadow-sm: 0 1px 2px rgba(30, 20, 90, .04), 0 4px 14px rgba(30, 20, 90, .05);
    --shadow-md: 0 14px 34px rgba(30, 20, 90, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(107, 78, 255, .35); outline-offset: 2px; }
::selection { background: rgba(107, 78, 255, .22); }

/* ---------- buttons (login / install pages) ---------- */
.btn-app {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 52px; padding: 0 22px;
    border: 0; border-radius: 14px; cursor: pointer;
    font-size: 15.5px; font-weight: 800; letter-spacing: .1px; text-decoration: none;
    color: #fff; background: var(--grad);
    box-shadow: 0 10px 24px rgba(107, 78, 255, .38);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-app:hover { filter: brightness(1.07); color: #fff; box-shadow: 0 14px 30px rgba(107, 78, 255, .45); }
.btn-app:active { transform: translateY(1px) scale(.99); }
.btn-app.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-app.ghost:hover { color: var(--ink); background: #FAF9FF; box-shadow: inset 0 0 0 1.5px #D9D4F5; }
.btn-app.small { width: auto; min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; box-shadow: none; flex-shrink: 0; }
.btn-app.big { min-height: 58px; font-size: 17px; border-radius: 16px; }
.btn-app[hidden] { display: none; }

.dev-by { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.dev-by.center { text-align: center; }

/* =====================================================================
   LOGIN – midnight aurora split screen
   ===================================================================== */
.login-body { min-height: 100vh; min-height: 100dvh; background: var(--ink); }
.login-wrap {
    min-height: 100vh; min-height: 100dvh; display: flex; position: relative; overflow: hidden;
    background:
        radial-gradient(800px 520px at 12% 8%, rgba(107, 78, 255, .55), transparent 60%),
        radial-gradient(700px 520px at 95% 90%, rgba(255, 95, 162, .32), transparent 60%),
        radial-gradient(600px 400px at 70% 0%, rgba(154, 92, 255, .30), transparent 60%),
        var(--ink);
}
.login-wrap::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 65%);
            mask-image: linear-gradient(120deg, #000 0%, transparent 65%);
}

.login-hero { flex: 1 1 54%; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 56px; color: #fff; }
.hero-inner { position: relative; max-width: 500px; }
.hero-icon { border-radius: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .15); margin-bottom: 26px; }
.hero-inner h1 { margin: 0 0 14px; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -1.2px; color: #fff;
    background: linear-gradient(120deg, #fff 30%, #CDBBFF 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { margin: 0 0 30px; font-size: 17px; color: #B9B3E6; line-height: 1.6; }
.hero-points { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.hero-points li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; font-size: 14.5px; font-weight: 600; color: #E7E3FF;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); border-radius: 16px; backdrop-filter: blur(8px); }
.hero-points i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 15px; flex-shrink: 0; box-shadow: 0 8px 18px rgba(107, 78, 255, .45); }
.hero-logos { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.logo-chip { background: #fff; border-radius: 14px; padding: 9px 15px; display: inline-flex; align-items: center; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.logo-chip img { height: 32px; width: auto; max-width: 180px; display: block; }

.login-panel { flex: 1 1 46%; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 100%; max-width: 440px; background: #fff; border-radius: 28px; padding: 38px 34px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .6) inset; }
.login-card h2 { margin: 0 0 4px; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }
.login-lead { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #F0EEFA; border-radius: 15px; margin-bottom: 20px; }
.seg-btn { border: 0; background: transparent; border-radius: 11px; min-height: 44px; font-size: 14.5px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .2s ease; }
.seg-btn.active { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(30, 20, 90, .14); }
.seg-btn.active i { color: var(--primary); }

.alert-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 16px; }
.alert-box.error { background: #FFF0F2; color: #B42342; border: 1px solid #FFD3DB; }
.alert-box.info { background: #F1EEFF; color: #4B34C9; border: 1px solid #DDD5FF; }
.alert-box i { margin-top: 2px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 800; color: #3A3560; margin-bottom: 7px; letter-spacing: .1px; }
.input-icon { position: relative; }
.input-icon > i:first-child { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #A29EC2; font-size: 15px; pointer-events: none; transition: color .15s; }
.input-icon:focus-within > i:first-child { color: var(--primary); }
.input-icon input {
    width: 100%; height: 54px; padding: 0 48px 0 46px; font-size: 16px; /* 16px stops iOS zoom */
    border: 1.5px solid var(--line); border-radius: 15px; background: #FAF9FE; color: var(--text); outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-icon input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(107, 78, 255, .14); }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: #A29EC2; font-size: 16px; cursor: pointer; border-radius: 10px; }
.pw-toggle:hover { color: var(--ink); }

.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #3A3560; margin: 2px 0 20px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.install-strip { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.install-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.install-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: #F3F1FD; color: var(--ink); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background .15s; }
.install-links a:hover { background: #E8E3FC; }
.install-links i { font-size: 17px; color: var(--primary); }

@media (max-width: 860px) {
    .login-wrap { flex-direction: column; }
    .login-hero { flex: 0 0 auto; padding: calc(34px + var(--sat)) 24px 64px; text-align: center; }
    .hero-inner { max-width: none; }
    .hero-icon { width: 64px; height: 64px; margin-bottom: 14px; }
    .hero-inner h1 { font-size: 27px; margin-bottom: 6px; letter-spacing: -.6px; }
    .hero-inner h1 br { display: none; }
    .hero-sub { font-size: 14px; margin: 0; }
    .hero-points, .hero-logos { display: none; }
    .login-panel { flex: 1 1 auto; padding: 0 16px calc(24px + var(--sab)); margin-top: -40px; align-items: flex-start; }
    .login-card { padding: 28px 22px 22px; border-radius: 26px; }
    .login-card h2 { font-size: 22px; }
}

/* =====================================================================
   INSTALL PAGES
   ===================================================================== */
.install-body { background: var(--bg); min-height: 100vh; }
.ins-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: calc(56px + var(--sat)); padding: var(--sat) 12px 0; color: #fff; font-weight: 800; background: var(--ink); }
.ins-back { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: 12px; background: rgba(255, 255, 255, .10); text-decoration: none; }
.ins-top-sp { width: 40px; }
.ins-wrap { max-width: 640px; margin: 0 auto; padding: 0 16px calc(36px + var(--sab)); }

.ins-hero { margin: 0 -16px 18px; padding: 30px 22px 38px; text-align: center; color: #fff; border-radius: 0 0 32px 32px;
    background: radial-gradient(520px 280px at 90% 0%, rgba(255, 95, 162, .35), transparent 60%), radial-gradient(520px 300px at 0% 100%, rgba(154, 92, 255, .45), transparent 60%), var(--ink); }
.ins-appicon { border-radius: 22px; box-shadow: 0 16px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .15); margin-bottom: 14px; }
.ins-hero h1 { margin: 0 0 8px; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: #fff; }
.ins-hero p { margin: 0 auto 22px; max-width: 440px; color: #BDB7E8; font-size: 14.5px; line-height: 1.55; }
.ins-note { display: block; margin-top: 12px; color: #A59FD6; font-size: 12.5px; }
.ins-note.flash { color: #FFD2A8; font-weight: 700; }
.ins-hero .btn-app.big { max-width: 360px; margin: 0 auto; }

.ins-ok, .ins-warn { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: 16px; max-width: 440px; margin: 14px auto 0; }
.ins-ok { background: rgba(25, 195, 160, .16); border: 1px solid rgba(25, 195, 160, .45); }
.ins-warn { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
.ins-ok[hidden], .ins-warn[hidden], #stateReady[hidden], #stateManual[hidden] { display: none; }
.ins-ok > i, .ins-warn > i { font-size: 26px; }
.ins-ok > i { color: #3EE0BC; }
.ins-warn > i { color: #fff; }
.ins-ok div, .ins-warn div { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: #D8D3FA; }
.ins-ok b, .ins-warn b { color: #fff; font-size: 14.5px; }

.ins-card { background: #fff; border-radius: 22px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid #EFEDF8; }
.ins-card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.ins-card h2 i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--primary); font-size: 14px; }
.ins-p { margin: 0; color: #3A3560; font-size: 14.5px; line-height: 1.6; }
.ins-list { margin: 0; padding-left: 20px; color: #3A3560; font-size: 14.5px; line-height: 1.6; }
.ins-list li { margin-bottom: 6px; }

.ins-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ins-steps li { display: flex; gap: 14px; }
.ins-steps .n { flex: 0 0 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 8px 16px rgba(107, 78, 255, .32); }
.ins-steps b { font-size: 15.5px; color: var(--ink); }
.ins-steps p { margin: 4px 0 0; color: #5B5780; font-size: 14px; line-height: 1.55; }
.ins-steps > li > div { min-width: 0; flex: 1; }
.kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: #F0EEFA; color: var(--ink); }
.url { padding: 2px 8px; border-radius: 8px; background: #F0EEFA; color: var(--ink); font-weight: 700; word-break: break-all; }

.mock { margin-top: 12px; border-radius: 16px; background: #F5F4FB; border: 1px solid var(--line); overflow: hidden; }
.mock-safari { padding: 10px; }
.ms-bar { background: #fff; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: #3A3560; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.ms-bar i { color: #A29EC2; font-size: 11px; margin-right: 6px; }
.mock-toolbar { display: flex; justify-content: space-around; align-items: center; padding: 10px 6px; color: #8A86AB; font-size: 18px; }
.mock-toolbar span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; }
.mock-toolbar .hl, .sheet-row.hl, .ma-head .hl { color: #0A84FF; }
.mock-toolbar .hl { background: #fff; box-shadow: 0 0 0 3px rgba(10, 132, 255, .35), 0 6px 14px rgba(10, 132, 255, .25); animation: pulse 1.6s ease-in-out infinite; }
.mock-sheet { background: #fff; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-size: 14.5px; border-bottom: 1px solid #F0EEF8; }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row.dim { color: #A8A5C2; }
.sheet-row.hl { background: #EAF3FF; font-weight: 700; }
.mock-add { background: #fff; }
.ma-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #F0EEF8; }
.ma-head > span:first-child { color: #0A84FF; }
.ma-head .hl { font-weight: 700; }
.ma-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ma-body img { border-radius: 10px; }
.ma-body small { display: block; color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(10, 132, 255, .12), 0 6px 14px rgba(10, 132, 255, .25); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* =====================================================================
   APP SHELL (all logged-in pages)
   mobile : glass top bar + floating dock
   desktop: midnight sidebar + glass top bar
   ===================================================================== */
body.app { font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background:
        radial-gradient(900px 420px at 100% -80px, rgba(154, 92, 255, .10), transparent 70%),
        radial-gradient(700px 380px at 0% -60px, rgba(107, 78, 255, .07), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text); padding-top: calc(var(--bar-h) + var(--sat)); padding-bottom: calc(var(--tab-h) + var(--sab) + 34px); min-height: 100vh; }
body.app h1, body.app h2, body.app h3, body.app h4, body.app h5 { color: var(--ink); letter-spacing: -.25px; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; }

.nbadge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1; border: 2px solid #fff; font-family: 'Plus Jakarta Sans', sans-serif; }
.nbadge[hidden] { display: none; }

/* --- top bar --- */
.appbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; padding-top: var(--sat); background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom: 1px solid rgba(232, 230, 243, .9); }
.appbar-in { max-width: 1280px; margin: 0 auto; height: var(--bar-h); padding: 0 14px; display: flex; align-items: center; gap: 12px; }
.ab-logo img { border-radius: 11px; display: block; box-shadow: 0 4px 12px rgba(107, 78, 255, .25); }
.ab-icon { position: relative; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #fff; color: var(--ink); text-decoration: none; font-size: 17px; border: 1px solid var(--line); flex-shrink: 0; transition: background .15s, color .15s, border-color .15s; }
.ab-icon:hover { background: var(--blue-soft); color: var(--primary); border-color: #D9D1FF; }
.ab-icon .nbadge { position: absolute; top: -6px; right: -6px; }
.ab-title { min-width: 0; flex: 1; }
.ab-title h1 { margin: 0; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-title small { display: block; color: var(--muted); font-size: 12px; margin-top: -1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ab-avatar { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--grad); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 8px 18px rgba(107, 78, 255, .35); cursor: pointer; transition: transform .15s; }
.ab-avatar:hover { transform: translateY(-1px); }
.ab-nav { display: none; }

/* --- sidebar (desktop only) --- */
.sidebar { display: none; }

/* --- page container --- */
.page { max-width: 1280px; margin: 0 auto; padding: 18px 14px 0; animation: pageIn .35s ease backwards; }
/* opacity only: a transform animation on .page would turn it into the containing block of every position:fixed popup inside it */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* --- floating dock (phones / tablets) --- */
.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); z-index: 1030; max-width: 520px; margin: 0 auto; height: var(--tab-h); padding: 8px; display: flex; gap: 4px;
    background: rgba(21, 17, 46, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 26px; border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 40px rgba(21, 17, 46, .38), 0 2px 0 rgba(255, 255, 255, .05) inset; }
.tab { flex: 1 1 0; min-width: 0; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9C97C9; text-decoration: none; font-size: 10.5px; font-weight: 700; cursor: pointer; border-radius: 19px; transition: background .2s, color .2s; }
.tab-ico { position: relative; width: 36px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-size: 16px; transition: transform .2s; }
.tab.active { color: #fff; background: rgba(255, 255, 255, .09); }
.tab.active .tab-ico { background: var(--grad); box-shadow: 0 6px 16px rgba(107, 78, 255, .55); }
.tab:active .tab-ico { transform: scale(.9); }
.tabbadge { position: absolute; top: -5px; right: -2px; border-color: var(--ink); }

/* --- floating action button --- */
.fab { position: fixed; z-index: 1020; right: 16px; bottom: calc(var(--tab-h) + var(--sab) + 26px); display: inline-flex; align-items: center; gap: 9px; height: 54px; padding: 0 22px; border-radius: 27px; background: var(--grad-warm); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; box-shadow: 0 14px 30px rgba(154, 92, 255, .5); transition: transform .15s, filter .15s; }
.fab:hover { color: #fff; filter: brightness(1.06); transform: translateY(-2px); }

/* --- sheet (menu) --- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 1900; background: rgba(21, 17, 46, .55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.sheet-backdrop.show { opacity: 1; visibility: visible; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 18px calc(18px + var(--sab)); box-shadow: 0 -24px 60px rgba(21, 17, 46, .3); transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.sheet.open { transform: none; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: #D9D5EE; margin: 0 auto 12px; }
.sheet-user { display: flex; align-items: center; gap: 13px; padding: 4px 0 16px; }
.sheet-user b { display: block; font-size: 16px; color: var(--ink); }
.sheet-user small { color: var(--muted); }
.avatar-lg { width: 52px; height: 52px; border-radius: 17px; background: var(--grad); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; box-shadow: 0 10px 22px rgba(107, 78, 255, .38); }
.sheet-x { margin-left: auto; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #F2F0FB; color: var(--ink); cursor: pointer; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sg-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 20px; background: #F6F5FC; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 700; text-align: center; transition: background .15s; }
.sg-item:hover { background: var(--blue-soft); color: var(--primary); }
.sg-item.active { background: var(--blue-soft); color: var(--primary); }
.sg-ico { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: #fff; color: var(--primary); font-size: 17px; box-shadow: var(--shadow-sm); }
.sheet-links { display: grid; gap: 4px; }
.sheet-links a { display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px; }
.sheet-links a i { width: 22px; text-align: center; color: var(--primary); font-size: 17px; }
.sheet-links a:hover { background: #F6F5FC; }
.sheet-links a.danger, .sheet-links a.danger i { color: var(--coral); }
.sheet-dev { text-align: center; margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }

/* --- banner + toast --- */
.app-banner { position: fixed; z-index: 1025; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--sab) + 26px); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 16px; border-radius: 18px; background: var(--ink-2); color: #E9E6FF; font-size: 13.5px; box-shadow: var(--shadow-md); border: 1px solid rgba(255, 255, 255, .08); }
.app-banner[hidden] { display: none; }
.ab-text { flex: 1; line-height: 1.35; }
.ab-btn { border: 0; border-radius: 11px; padding: 8px 15px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; white-space: nowrap; cursor: pointer; }
.ab-x { border: 0; background: transparent; color: #A59FD6; width: 30px; height: 30px; cursor: pointer; }
.toast-stack { position: fixed; z-index: 2500; top: calc(var(--bar-h) + var(--sat) + 10px); left: 14px; right: 14px; display: grid; gap: 10px; max-width: 400px; margin-left: auto; pointer-events: none; }
.toast-card { pointer-events: auto; display: flex; gap: 12px; padding: 13px 14px; border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(21, 17, 46, .25); border: 1px solid var(--line); border-left: 4px solid var(--primary); color: var(--text); text-decoration: none; transform: translateY(-14px); opacity: 0; transition: transform .28s, opacity .28s; }
.toast-card.show { transform: none; opacity: 1; }
.tc-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--primary); flex-shrink: 0; }
.tc-body { display: flex; flex-direction: column; min-width: 0; }
.tc-body b { font-size: 14px; color: var(--ink); }
.tc-body span { font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* =====================================================================
   BUILDING BLOCKS
   ===================================================================== */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 24px 22px 24px; color: #fff; margin-bottom: 20px;
    background:
        radial-gradient(420px 240px at 100% 0%, rgba(255, 95, 162, .45), transparent 65%),
        radial-gradient(420px 260px at 0% 100%, rgba(154, 92, 255, .55), transparent 65%),
        linear-gradient(135deg, #1E1946 0%, #2A2460 100%);
    box-shadow: 0 22px 46px rgba(30, 20, 90, .30); border: 1px solid rgba(255, 255, 255, .06); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(110deg, #000, transparent 60%); mask-image: linear-gradient(110deg, #000, transparent 60%); }
.hero small { display: block; opacity: .8; font-size: 13px; font-weight: 600; position: relative; z-index: 1; color: #CFC8FF; }
.hero h2 { color: #fff !important; margin: 3px 0 16px; font-size: 24px; font-weight: 800; position: relative; z-index: 1; }
.hero-row { display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-pill { flex: 1 1 90px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 12px 14px; backdrop-filter: blur(6px); text-decoration: none; color: #fff; transition: background .15s, transform .15s; }
.hero-pill b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; }
.hero-pill span { font-size: 12px; opacity: .85; font-weight: 600; color: #DAD4FF; }
.hero-pill:hover { color: #fff; background: rgba(255, 255, 255, .17); transform: translateY(-2px); }

.card-ui { background: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 14px; border: 1px solid #EFEDF8; }
.card-ui > h3, .card-ui .card-title { margin: 0 0 14px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.card-ui .card-title i { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--primary); font-size: 13px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-head h3::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: var(--grad); }
.section-head a { color: var(--primary); font-weight: 800; font-size: 13.5px; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 6px; }
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: #fff; border: 1px solid #EFEDF8; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.stat::after { content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%; background: var(--primary); opacity: .07; pointer-events: none; }
.s-amber::after { background: #FFB43A; opacity: .12; }
.s-purple::after { background: #C25BFF; }
.s-teal::after { background: #19C3A0; }
.s-green::after { background: #16A34A; }
.s-red::after { background: #F0506E; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ink); border-color: #DDD6FA; }
.stat .s-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 16px; }
.stat b { display: block; font-size: 28px; font-weight: 800; line-height: 1; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; letter-spacing: -.5px; }
.stat span.s-lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat.active { outline: 2px solid var(--primary); outline-offset: -2px; box-shadow: 0 10px 26px rgba(107, 78, 255, .2); }
.s-blue .s-ico, .chip.blue { background: #E9E4FF; color: #5A3CF0; }
.s-amber .s-ico, .chip.amber { background: #FFF1D6; color: #B26A00; }
.s-purple .s-ico, .chip.purple { background: #F6E5FF; color: #A21CCF; }
.s-teal .s-ico, .chip.teal { background: #D9F6EE; color: #0B8F70; }
.s-green .s-ico, .chip.green { background: #DDF6E4; color: #15803D; }
.s-red .s-ico, .chip.red { background: #FFE5EA; color: #D12F52; }
.chip.gray { background: #EEEDF6; color: #5E5A80; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* pill filters */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 12px; margin: 0 -14px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #5B5780; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; transition: all .15s; }
.pill:hover { border-color: #CFC6FF; color: var(--primary); }
.pill.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(21, 17, 46, .28); }
.pill b { opacity: .75; margin-left: 4px; font-weight: 700; }

.searchbox { position: relative; margin-bottom: 12px; }
.searchbox i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #A29EC2; }
.searchbox input { width: 100%; height: 52px; padding: 0 16px 0 46px; border: 1.5px solid var(--line); border-radius: 17px; background: #fff; font-size: 16px; outline: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.searchbox input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(107, 78, 255, .13); }

.filter-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-card .full { grid-column: 1 / -1; }

/* list cards */
.list-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.enq { position: relative; background: #fff; border-radius: 22px; padding: 16px; border: 1px solid #EFEDF8; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.enq::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.enq:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #DDD6FA; }
.enq-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.enq-id { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: .3px; background: var(--blue-soft); padding: 3px 10px; border-radius: 8px; }
.enq h4 { margin: 0 0 4px; font-size: 16.5px; font-weight: 800; }
.enq .meta { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 14px; font-size: 13.5px; color: #5B5780; }
.enq .meta div { display: flex; gap: 10px; align-items: flex-start; }
.enq .meta i { width: 16px; margin-top: 3px; color: #A29EC2; text-align: center; flex-shrink: 0; }
.enq .meta a { color: var(--ink); font-weight: 700; text-decoration: none; }
.enq-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 13px; }
.enq-actions form { margin: 0; }

/* buttons */
.btn-ui { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer; background: var(--grad); color: #fff; box-shadow: 0 10px 22px rgba(107, 78, 255, .32); transition: transform .12s, filter .15s, box-shadow .15s; }
.btn-ui:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 14px 28px rgba(107, 78, 255, .4); }
.btn-ui:active { transform: scale(.98); }
.btn-ui.soft { background: var(--blue-soft); color: var(--primary-600); box-shadow: none; }
.btn-ui.soft:hover { color: var(--primary-600); background: #E1DAFF; box-shadow: none; }
.btn-ui.teal { background: var(--teal-soft); color: #0B8F70; box-shadow: none; }
.btn-ui.teal:hover { color: #0B8F70; background: #CBF1E6; box-shadow: none; }
.btn-ui.danger { background: #FFE8EC; color: #D12F52; box-shadow: none; }
.btn-ui.danger:hover { color: #D12F52; background: #FFD6DE; box-shadow: none; }
.btn-ui.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ui.ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px #CFC6FF; }
.btn-ui.sm { min-height: 38px; padding: 0 15px; font-size: 13px; border-radius: 12px; }
.btn-ui.block { width: 100%; }
.btn-ui[disabled] { opacity: .55; pointer-events: none; }

/* forms */
.f { margin-bottom: 14px; }
.f > label { display: block; font-size: 12.5px; font-weight: 800; color: #3A3560; margin-bottom: 6px; letter-spacing: .1px; }
.inp, .f input[type=text], .f input[type=email], .f input[type=tel], .f input[type=number], .f input[type=date], .f input[type=time], .f input[type=password], .f select, .f textarea {
    width: 100%; min-height: 50px; padding: 12px 15px; font-size: 16px; font-family: inherit; color: var(--text);
    border: 1.5px solid var(--line); border-radius: 15px; background: #FAF9FE; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.f textarea { min-height: 96px; resize: vertical; }
.inp:focus, .f input:focus, .f select:focus, .f textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(107, 78, 255, .14); }
.f input[readonly] { background: #F0EEFA; color: #5B5780; }
.f .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.f-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.f-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.opt span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 17px; border-radius: 999px; background: #F3F1FC; border: 1.5px solid transparent; font-weight: 700; font-size: 13.5px; color: #5B5780; transition: all .15s; }
.opt input:checked + span { background: var(--blue-soft); border-color: var(--primary); color: var(--primary-600); }

.alert-ui { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 16px; font-size: 14px; margin-bottom: 14px; }
.alert-ui.ok { background: #E0F7EA; color: #166534; }
.alert-ui.err { background: #FFE9ED; color: #B42342; }
.alert-ui.warn { background: #FFF4DA; color: #8A5A00; }
.alert-ui.info { background: var(--blue-soft); color: #4B34C9; }

.empty { text-align: center; padding: 48px 18px; color: var(--muted); }
.empty .e-ico { width: 82px; height: 82px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; background: var(--blue-soft); color: var(--primary); font-size: 30px; transform: rotate(-6deg); }
.empty h3 { font-size: 17px; margin: 0 0 4px; }
.empty p { margin: 0; font-size: 14px; }

.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #F0EEF8; font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); font-weight: 600; flex: 0 0 40%; }
.kv b { text-align: right; color: var(--ink); font-weight: 700; word-break: break-word; }

.stepper { display: flex; gap: 6px; margin: 4px 0 18px; }
.stepper i { flex: 1; height: 6px; border-radius: 3px; background: #E3DFF5; transition: background .25s; }
.stepper i.done { background: var(--grad); }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.step-title span { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 14px; box-shadow: 0 8px 16px rgba(107, 78, 255, .3); }
.form-nav { display: flex; gap: 10px; margin-top: 8px; }
.form-nav .btn-ui { flex: 1; }
.sub-title { margin: 20px 0 10px; font-size: 12px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .8px; }

.table-ui { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table-ui th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; padding: 11px 10px; border-bottom: 1px solid var(--line); background: #FAF9FE; }
.table-ui th:first-child { border-radius: 12px 0 0 12px; }
.table-ui th:last-child { border-radius: 0 12px 12px 0; }
.table-ui td { padding: 13px 10px; border-bottom: 1px solid #F0EEF8; vertical-align: middle; }
.table-ui tbody tr:hover td { background: #FBFAFF; }

.modal-content { border: 0; border-radius: 26px; box-shadow: var(--shadow); }
.modal-header { border-bottom: 0; }
.modal-footer { border-top: 0; }

/* scrollbars (desktop) */
@media (hover: hover) {
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-thumb { background: #D5D0EE; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
    ::-webkit-scrollbar-thumb:hover { background: #BDB6E3; background-clip: content-box; border: 2px solid transparent; }
}

/* compact stat cards on phones */
@media (max-width: 575.98px) {
    .stat { padding: 13px; gap: 9px; border-radius: 20px; }
    .stat .s-ico { width: 38px; height: 38px; border-radius: 12px; }
    .stat b { font-size: 24px; }
    .hero { padding: 20px 18px; border-radius: 26px; }
    .hero h2 { font-size: 21px; }
}

/* =========== tablet / desktop =========== */
@media (min-width: 576px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .f-row { grid-template-columns: 1fr 1fr; }
    .filter-card { grid-template-columns: repeat(4, 1fr); }
    .filter-card .full { grid-column: auto; }
}
@media (min-width: 768px) {
    .list-grid { grid-template-columns: repeat(2, 1fr); }
    .page { padding-top: 24px; }
}
@media (min-width: 992px) {
    :root { --bar-h: 70px; }
    body.app { padding-left: var(--sidebar); padding-bottom: 48px; }
    .tabbar { display: none; }
    .fab { bottom: 30px; right: 30px; }
    .app-banner { bottom: 24px; }
    .appbar { left: var(--sidebar); }
    .appbar-in { padding: 0 28px; }
    .ab-logo { display: none; }
    .ab-title h1 { font-size: 21px; }
    .ab-title small { font-size: 12.5px; }
    .page { padding: 28px 28px 0; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .list-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 30px 32px; }
    .hero h2 { font-size: 28px; }

    /* ---- midnight sidebar ---- */
    .sidebar { position: fixed; z-index: 1040; top: 0; bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 22px 16px 16px; color: #C9C4F0; overflow-y: auto;
        background:
            radial-gradient(360px 260px at 0% 0%, rgba(107, 78, 255, .35), transparent 70%),
            radial-gradient(320px 280px at 100% 100%, rgba(255, 95, 162, .16), transparent 70%),
            var(--ink); }
    .sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; text-decoration: none; color: #fff; }
    .sb-brand img { width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .15); }
    .sb-brand b { display: block; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; }
    .sb-brand small { display: block; font-size: 11.5px; color: #9C97C9; font-weight: 600; }
    .sb-label { padding: 10px 12px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #6F69A3; }
    .sb-nav { display: grid; gap: 4px; }
    .sb-link { position: relative; display: flex; align-items: center; gap: 13px; height: 48px; padding: 0 14px; border-radius: 15px; color: #C9C4F0; text-decoration: none; font-weight: 700; font-size: 14.5px; transition: background .15s, color .15s, transform .15s; }
    .sb-link i { width: 22px; text-align: center; font-size: 16px; color: #8F89C6; transition: color .15s; }
    .sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
    .sb-link:hover i { color: #fff; }
    .sb-link.active { background: var(--grad); color: #fff; box-shadow: 0 12px 26px rgba(107, 78, 255, .5); }
    .sb-link.active i { color: #fff; }
    .sb-link .nbadge { margin-left: auto; border-color: var(--ink); }
    .sb-link.active .nbadge { border-color: #7C55F8; }
    .sb-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
    .sb-install { display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
    .sb-install a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; color: #B6B0E6; text-decoration: none; font-size: 13px; font-weight: 700; }
    .sb-install a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
    .sb-install i { width: 18px; text-align: center; font-size: 15px; }
    .sb-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .09); }
    .sb-avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-warm); color: #fff; font-weight: 800; font-size: 16px; flex-shrink: 0; }
    .sb-user div { min-width: 0; flex: 1; }
    .sb-user b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sb-user small { display: block; color: #9C97C9; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sb-logout { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #FF8FA6; text-decoration: none; transition: background .15s; }
    .sb-logout:hover { background: rgba(240, 80, 110, .25); color: #FFB0C0; }
    .sb-dev { text-align: center; margin: 2px 0 0; font-size: 11px; color: #6F69A3; }
    .sb-dev strong { color: #9C97C9; }

    /* ---- right-hand account panel ---- */
    .sheet { left: auto; top: 0; right: 0; bottom: 0; width: 380px; max-height: none; border-radius: 28px 0 0 28px; transform: translateX(105%); }
    .sheet.open { transform: none; }
    .sheet-grip { display: none; }
    .sheet-grid { display: none; }
}
@media (min-width: 1200px) { .list-grid { grid-template-columns: repeat(3, 1fr); } .stat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1600px) { .list-grid { grid-template-columns: repeat(4, 1fr); } }

/* =====================================================================
   Notifications page
   ===================================================================== */
.np-wrap { max-width: 820px; margin: 0 auto; }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.np-actions { display: flex; gap: 8px; margin-left: auto; }
.np-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border-radius: 14px; background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid #EFEDF8; transition: all .15s; }
.np-btn:hover { background: var(--blue-soft); color: var(--primary); border-color: #D9D1FF; }
.np-btn.danger { color: #D12F52; }
.np-btn.danger:hover { background: #FFE8EC; border-color: #FFD0D9; }
.np-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #E9E6F7; border-radius: 15px; margin-bottom: 14px; }
.np-tab { border: 0; background: transparent; padding: 10px 19px; border-radius: 12px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: all .15s; }
.np-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.np-tab b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 5px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 11px; }
.np-list { display: grid; gap: 10px; }
.np-card { display: flex; align-items: flex-start; gap: 13px; padding: 15px; background: #fff; border-radius: 22px; border: 1px solid #EFEDF8; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s, opacity .2s, box-shadow .2s; }
.np-card:hover { box-shadow: var(--shadow-md); }
.np-card.unread { background: linear-gradient(90deg, #F3F0FF, #fff 65%); border-color: #DDD5FF; }
.np-card.removing { opacity: 0; transform: translateX(40px); }
.np-ico { flex: 0 0 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 18px; }
.np-ico.blue { background: var(--blue-soft); color: var(--primary); }
.np-ico.orange { background: #FFF1D6; color: #B26A00; }
.np-body { flex: 1; min-width: 0; }
.np-title { font-weight: 800; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(107, 78, 255, .18); }
.np-msg { margin-top: 3px; color: #4D4870; font-size: 14px; line-height: 1.5; word-break: break-word; }
.np-time { margin-top: 6px; color: #8D89AE; font-size: 12px; }
.np-side { display: flex; gap: 6px; flex-shrink: 0; }
.np-icon { width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; background: #F2F0FB; color: #5B5780; font-size: 14px; cursor: pointer; transition: all .15s; }
.np-icon:hover { background: var(--blue-soft); color: var(--primary); }
.np-icon.remove { color: #D12F52; background: #FFEAEE; }
.np-icon.remove:hover { background: #FFD3DC; }
.np-skel { height: 84px; border-radius: 22px; background: linear-gradient(90deg, #ECE9F8 25%, #F6F4FD 50%, #ECE9F8 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
@media (max-width: 575.98px) {
    .np-btn span { display: none; }
    .np-btn { width: 44px; justify-content: center; padding: 0; }
    .np-card { flex-wrap: wrap; }
    .np-side { width: 100%; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 8px; }
}

/* =====================================================================
   DATA TABLES (all list pages)
   ===================================================================== */
.table-wrap { background: #fff; border: 1px solid #EFEDF8; border-radius: 22px; box-shadow: var(--shadow-sm); overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin-bottom: 14px; position: relative; }
.table-wrap .table-ui { min-width: 860px; margin: 0; }
.table-wrap .table-ui th { position: sticky; top: 0; z-index: 2; white-space: nowrap; padding: 14px 12px; background: #F7F5FF; border-bottom: 1px solid var(--line); border-radius: 0 !important; font-size: 11.5px; color: #6E6A8C; }
.table-wrap .table-ui td { padding: 13px 12px; border-bottom: 1px solid #F1EFF9; font-size: 13.5px; color: #3A3560; vertical-align: middle; }
.table-wrap .table-ui tbody tr:last-child td { border-bottom: 0; }
.table-wrap .table-ui tbody tr { transition: background .12s; }
.table-wrap .table-ui tbody tr:hover td { background: #FAF8FF; }
.table-ui a:not(.btn-ui) { color: var(--primary-600); font-weight: 700; text-decoration: none; }
.table-ui a:not(.btn-ui):hover { text-decoration: underline; }
.table-ui .t-name { font-weight: 800; color: var(--ink); min-width: 110px; }
.table-ui .t-nowrap { white-space: nowrap; }
.table-ui .t-wrap { min-width: 120px; max-width: 260px; line-height: 1.45; }
.table-ui .t-ico { width: 64px; }
.table-ui .t-actions { white-space: nowrap; text-align: right; }
.table-ui td.t-actions { display: table-cell; }
.table-ui td.t-actions > * { vertical-align: middle; }
.table-ui td.t-actions .btn-ui.sm { padding: 0 12px; min-height: 36px; }
.table-ui td.t-actions .btn-ui + .btn-ui, .table-ui td.t-actions .btn-ui + .np-icon, .table-ui td.t-actions .np-icon + .np-icon { margin-left: 6px; }
.table-ui .t-select { display: flex; gap: 6px; align-items: center; margin: 0; }
.table-ui .t-select select { min-height: 38px; padding: 0 10px; font-size: 13px; font-family: inherit; border: 1.5px solid var(--line); border-radius: 11px; background: #FAF9FE; color: var(--text); outline: none; max-width: 150px; }
.table-ui .t-select select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107, 78, 255, .14); }
.table-ui .t-user { display: flex; align-items: center; gap: 12px; }
.table-ui .t-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; flex-shrink: 0; box-shadow: 0 6px 14px rgba(107, 78, 255, .3); }
.table-ui .enq-id { display: inline-block; white-space: nowrap; }
.table-ui .np-dot { display: inline-block; margin-left: 8px; vertical-align: middle; }
.table-ui .np-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }

/* notification rows */
.np-table tr.np-card { display: table-row; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; cursor: pointer; transition: opacity .2s; }
.np-table tr.np-card:hover { transform: none; box-shadow: none; }
.np-table tr.np-card.unread td { background: #F6F3FF; }
.np-table tr.np-card.unread td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.np-table tr.np-card.removing { opacity: 0; transform: none; }
.np-table .np-icon { display: inline-grid; }
.np-list { display: block; }
@media (max-width: 575.98px) {
    .np-table tr.np-card { flex-wrap: nowrap; }
    .np-side { width: auto; }
}
@media (max-width: 991.98px) {
    .table-wrap { border-radius: 18px; margin-left: -4px; margin-right: -4px; }
    .table-wrap .table-ui { min-width: 820px; }
}

/* =====================================================================
   INSTALL GUIDE (shown when the browser cannot show the install popup)
   ===================================================================== */
.guide-back { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; background: rgba(21, 17, 46, .6); backdrop-filter: blur(3px); animation: gFade .2s ease; }
.guide-box { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 22px 20px calc(22px + var(--sab)); box-shadow: 0 -24px 60px rgba(21, 17, 46, .35); animation: gUp .3s cubic-bezier(.2, .8, .2, 1); }
.guide-box h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--ink); font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; }
.guide-box > p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.guide-warn { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FFF4DA; color: #8A5A00; font-size: 13.5px; line-height: 1.45; margin-bottom: 14px; }
.guide-warn.bad { background: #FFE9ED; color: #B42342; }
.guide-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; counter-reset: g; }
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: #3A3560; counter-increment: g; }
.guide-steps li::before { content: counter(g); flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; }
.guide-steps b { color: var(--ink); }
.guide-close { width: 100%; }
@keyframes gUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gFade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 640px) { .guide-back { align-items: center; } .guide-box { border-radius: 28px; } }

.pwa-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pwa-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: #3A3560; }
.pwa-check i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.pwa-check .ok i { background: #DDF6E4; color: #15803D; }
.pwa-check .bad i { background: #FFE5EA; color: #D12F52; }
.pwa-check .wait i { background: #FFF1D6; color: #B26A00; }
.pwa-check small { display: block; color: var(--muted); font-size: 12.5px; }

/* =====================================================================
   NOTIFICATION PERMISSION POPUP + DEVICE STATUS STRIP
   ===================================================================== */
.perm-ico { width: 76px; height: 76px; margin: 4px auto 14px; border-radius: 26px; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--grad); box-shadow: 0 16px 34px rgba(107, 78, 255, .45); animation: ring 2.2s ease-in-out infinite; }
.perm-ico.ok { background: linear-gradient(135deg, #19C3A0, #16A34A); box-shadow: 0 16px 34px rgba(25, 195, 160, .4); animation: none; }
.perm-ico.bad { background: linear-gradient(135deg, #F0506E, #FF8A5C); box-shadow: 0 16px 34px rgba(240, 80, 110, .4); animation: none; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
.guide-box .text-center { text-align: center; }
.perm-result { margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.perm-result.ok { background: #DDF6E4; color: #166534; }
.perm-result.bad { background: #FFE9ED; color: #B42342; }

.push-strip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 20px; background: #fff; border: 1px solid #EFEDF8; box-shadow: var(--shadow-sm); }
.push-strip .ps-ico { flex: 0 0 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 18px; background: var(--blue-soft); color: var(--primary); }
.push-strip.ok .ps-ico { background: #DDF6E4; color: #15803D; }
.push-strip.warn .ps-ico { background: #FFF1D6; color: #B26A00; }
.push-strip.bad .ps-ico { background: #FFE5EA; color: #D12F52; }
.push-strip .ps-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.push-strip .ps-body b { font-size: 14.5px; color: var(--ink); }
.push-strip .ps-body span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.push-strip .ps-res { color: var(--primary-600) !important; font-weight: 700; margin-top: 4px; }
.push-strip .ps-btns { flex-shrink: 0; }
@media (max-width: 575.98px) { .push-strip { flex-wrap: wrap; } .push-strip .ps-btns { width: 100%; } .push-strip .ps-btns .btn-ui { width: 100%; } }

/* =====================================================================
   LISTS ON PHONES (cards with name + View) and the shared VIEW POPUP
   Used by: services, sales, team, dashboard lists  (class "mlist")
   ===================================================================== */
.mlist .col-view, .mlist .col-meta, .mlist .m-only { display: none; }
.js-name { cursor: pointer; }
.table-ui td.js-name, .table-ui .name-link { color: var(--primary-600); font-weight: 800; }
.table-ui td.js-name:hover, .table-ui .name-link:hover { text-decoration: underline; }
.table-ui .name-link { text-decoration: none; }

@media (max-width: 768px) {
    .mlist .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; border-radius: 0; margin: 0 0 14px; }
    .mlist table.table-ui, .mlist table.table-ui tbody { display: block; width: 100%; min-width: 0; }
    .mlist table.table-ui thead { display: none; }
    .mlist table.table-ui tr {
        position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center;
        margin: 0 0 12px; padding: 14px 14px 14px 20px; background: #fff; border: 1px solid #EFEDF8; border-radius: 20px; box-shadow: var(--shadow-sm);
    }
    .mlist table.table-ui tr::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
    .mlist table.table-ui tr[hidden] { display: none; }
    .mlist table.table-ui td { display: none !important; border: 0 !important; padding: 0 !important; background: transparent !important; }
    .mlist table.table-ui td.col-name { display: block !important; grid-column: 1; grid-row: 1; min-width: 0; font-weight: 800; font-size: 15.5px; word-break: break-word; }
    .mlist table.table-ui td.col-view { display: block !important; grid-column: 2; grid-row: 1; }
    .mlist table.table-ui td.col-enq { display: -webkit-box !important; grid-column: 1 / -1; grid-row: 2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13.5px; line-height: 1.45; color: #5B5780; word-break: break-word; }
    .mlist table.table-ui td.col-meta { display: flex !important; grid-column: 1 / -1; grid-row: 3; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
    .mlist td.col-enq small { display: none; }
    .mlist .m-only { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
    .mlist .t-user { gap: 10px; }
}

/* ----- popup (centered on every screen) ----- */
body.sv-lock { overflow: hidden; }
.sv-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; overscroll-behavior: contain; z-index: 3000; display: none; align-items: center; justify-content: center; padding: calc(18px + var(--sat)) 18px calc(18px + var(--sab)); background: rgba(21, 17, 46, .58); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sv-overlay.open { display: flex; animation: gFade .18s ease; }
.sv-sheet { width: 100%; max-width: 480px; max-height: min(88vh, 760px); display: flex; flex-direction: column; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(21, 17, 46, .45); animation: svPop .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes svPop { from { transform: translateY(18px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.sv-head { position: relative; display: flex; align-items: flex-start; gap: 13px; padding: 20px 18px 18px 20px; color: #fff;
    background: radial-gradient(260px 160px at 100% 0%, rgba(255, 95, 162, .45), transparent 65%), radial-gradient(260px 180px at 0% 100%, rgba(154, 92, 255, .5), transparent 65%), linear-gradient(135deg, #1E1946, #2A2460); }
.sv-avatar { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 19px; flex-shrink: 0; box-shadow: 0 10px 20px rgba(0, 0, 0, .35); }
.sv-titles { flex: 1; min-width: 0; }
.sv-titles h3 { margin: 0; color: #fff !important; font-size: 18px; font-weight: 800; line-height: 1.25; word-break: break-word; }
.sv-titles small { display: block; margin-top: 2px; color: #CFC8FF; font-size: 12.5px; font-weight: 600; word-break: break-word; }
.sv-chips { margin-top: 9px; }
.sv-chips .chip { box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.sv-x { width: 38px; height: 38px; flex-shrink: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .15s; }
.sv-x:hover { background: rgba(255, 255, 255, .22); }
.sv-body { padding: 6px 20px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sv-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid #F1EFF9; font-size: 14px; }
.sv-row:last-child { border-bottom: 0; }
.sv-row span { padding-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.sv-row div { color: var(--ink); font-weight: 600; line-height: 1.45; white-space: pre-line; word-break: break-word; }
.sv-status { display: grid; gap: 8px; margin: 12px 0 8px; padding: 14px; border-radius: 18px; background: #F6F4FF; border: 1px solid #E6E0FF; }
.sv-status label { margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.sv-status .sv-st-row { display: flex; gap: 8px; }
.sv-status select { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font-size: 15px; font-family: inherit; outline: none; }
.sv-status select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(107, 78, 255, .14); }
.sv-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid #F1EFF9; background: #FBFAFF; }
.sv-foot .btn-ui { flex: 1 1 auto; }
@media (max-width: 420px) {
    .sv-row { grid-template-columns: 94px minmax(0, 1fr); gap: 10px; padding: 10px 0; font-size: 13.5px; }
    .sv-row span { font-size: 10.5px; }
    .sv-head { padding: 18px 14px 16px 16px; }
    .sv-body { padding: 4px 16px 8px; }
    .sv-foot { padding: 12px 16px 16px; }
}

/* ----- member dashboard: performance cards ----- */
.perf-card { margin-bottom: 0; }
.perf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.perf-head > div { flex: 1; min-width: 0; }
.perf-head b { display: block; font-size: 15.5px; color: var(--ink); }
.perf-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.perf-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.perf-ico.s-blue { background: #E9E4FF; color: #5A3CF0; }
.perf-ico.s-teal { background: #D9F6EE; color: #0B8F70; }
.perf-empty { display: flex; align-items: center; gap: 10px; padding: 22px 16px; border-radius: 16px; background: #F7F5FF; color: var(--muted); font-size: 14px; line-height: 1.45; }
.perf-empty i { font-size: 22px; color: var(--primary); }
@media (max-width: 575.98px) { .perf-head .chip { display: none; } }

/* ----- form validation: the missing field is scrolled to the middle of the screen and marked ----- */
.f input, .f select, .f textarea, .field input, .field select, .field textarea { scroll-margin-top: calc(var(--bar-h) + var(--sat) + 90px); scroll-margin-bottom: 120px; }
.f.has-error > label { color: #B42342; }
.f.has-error input, .f.has-error select, .f.has-error textarea { border-color: #E5365A !important; background: #FFF6F8 !important; box-shadow: 0 0 0 4px rgba(229, 54, 90, .14) !important; }
.f-err { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #B42342; font-size: 12.5px; font-weight: 700; }
.f-err::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; }
