:root {
    --bg: #edf3ff;
    --surface: #ffffff;
    --surface-2: #f3f7ff;
    --surface-3: #e7f0ff;
    --text: #0b1635;
    --muted: #61708d;
    --primary: #2d7dff;
    --primary-2: #1254ea;
    --accent: #3be5ff;
    --border: #d6e4ff;
    --shadow: 0 22px 48px rgba(26, 76, 183, 0.16);
    --radius: 18px;
}

body.dark {
    --bg: #070d1d;
    --surface: #0e1730;
    --surface-2: #101f3d;
    --surface-3: #16294d;
    --text: #e7efff;
    --muted: #9eb0d7;
    --primary: #5ca9ff;
    --primary-2: #2d7cff;
    --accent: #5ff0ff;
    --border: #243a63;
    --shadow: 0 24px 52px rgba(1, 8, 22, 0.62);
}

* { box-sizing: border-box; }
@font-face {
    font-family: "Rudaw";
    src: local("Rudaw"), local("Rabar"), local("NRT"), local("NRT Reg"), local("Noto Sans Arabic");
    font-display: swap;
}
html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
    background: radial-gradient(circle at 92% 2%, rgba(72, 177, 255, 0.2), transparent 34%), var(--bg);
    color: var(--text);
}
html[lang="ku"] body,
html[lang="ar"] body {
    font-family: "Rudaw", "Noto Sans Arabic", "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0.01em;
    font-feature-settings: "kern" 1, "liga" 1;
}
html[lang="ku"] .page-head h2,
html[lang="ku"] .card h3,
html[lang="ku"] .menu-item span:last-child,
html[lang="ku"] .topbar-right,
html[lang="ku"] .btn-primary,
html[lang="ku"] .ghost-btn {
    font-weight: 700;
}
a { text-decoration: none; color: inherit; }
.interactive {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.pressable {
    transition: transform .14s ease, filter .18s ease, box-shadow .2s ease;
}
.pressable:active {
    transform: translateY(1px) scale(.99);
    filter: brightness(.98);
}
.ripple {
    position: absolute;
    border-radius: 999px;
    transform: scale(0);
    animation: ripple-effect .55s ease-out forwards;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.35);
}
@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
.reveal-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .45s ease;
    will-change: opacity, transform;
}
.reveal-item.in-view {
    opacity: 1;
    transform: translateY(0);
}
.sidebar-overlay{
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 35;
}
.sidebar-overlay.open{
    opacity: 1;
    pointer-events: auto;
}

.layout { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar {
    background:
        radial-gradient(circle at 82% 4%, rgba(111, 252, 255, 0.38), transparent 27%),
        linear-gradient(165deg, #0f4eda 0%, #1238aa 42%, #0d2f86 100%);
    color: #fff;
    padding: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: var(--shadow);
    overflow: auto;
}
.sidebar::before{
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 220px;
    background: radial-gradient(circle at center, rgba(98, 242, 255, 0.36), transparent 70%);
    pointer-events: none;
}
.sidebar-cover{
    height: 110px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
    opacity: .95;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-logo {
    width: 42px; height: 42px; border-radius: 13px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12));
    color: #fff; font-weight: 700;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
}
.brand-logo.lg { width: 52px; height: 52px; font-size: 20px; }
.brand-logo-img{width:100%;height:100%;object-fit:cover;border-radius:12px;}
.brand h1 { font-size: 16px; margin: 0; }
.brand p { margin: 2px 0 0; font-size: 12px; opacity: 0.85; }

.menu { display: grid; gap: 8px; }
.menu-item {
    padding: 12px 14px;
    border-radius: 12px;
    color: #e8f0ff;
    transition: 0.25s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-ico{
    width: 19px;
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
    opacity: .96;
    color: #eaf3ff;
    text-shadow: 0 0 14px rgba(95, 240, 255, .35);
}
.menu-item:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateX(-2px);
}
.menu-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 12px 26px rgba(9, 33, 97, 0.35);
    font-weight: 700;
}
.menu-item.active .menu-ico{
    color: #ffffff;
    transform: scale(1.06);
}
.menu-item.danger { color: #ffd2d2; }
.menu-item.pressable:active { transform: translateX(-1px) scale(.99); }

body.sidebar-collapsed .layout {
    grid-template-columns: 92px 1fr;
}
body.sidebar-collapsed .brand h1,
body.sidebar-collapsed .brand p,
body.sidebar-collapsed .menu-item span:last-child,
body.sidebar-collapsed .sidebar-cover {
    display: none;
}
body.sidebar-collapsed .brand {
    justify-content: center;
    margin-bottom: 14px;
}
body.sidebar-collapsed .menu-item {
    justify-content: center;
    padding-inline: 8px;
}
body.sidebar-collapsed .menu-ico {
    font-size: 17px;
}
body.sidebar-collapsed .sidebar {
    padding-inline: 10px;
}

.content { padding: 16px; position: relative; }
.content-cover{
    height: 120px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.topbar {
    background: linear-gradient(145deg, var(--surface), var(--surface-3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    backdrop-filter: blur(14px);
    position: sticky;
    top: 8px;
    z-index: 20;
}
.topbar-left, .topbar-quick { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-menu-btn { display: none; }
.avatar-pill {
    background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    display: grid;
    line-height: 1.2;
}
.avatar-pill small { color: var(--muted); font-size: 11px; }

.page-head h2 { margin: 0; }
.page-head {
    position: relative;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--surface), var(--surface-3));
    box-shadow: 0 10px 24px rgba(25, 72, 168, 0.12);
}
.page-head::after {
    content: "";
    position: absolute;
    inset-inline-start: 10px;
    top: 10px;
    width: 4px;
    height: calc(100% - 20px);
    border-radius: 99px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}
.page-head h2 { margin-inline-start: 12px; }
.page-head p { margin: 4px 0 0 12px; color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
    background: linear-gradient(160deg, var(--surface), var(--surface-3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat-card::before{
    content:"";
    position:absolute;
    inset:auto -40px -40px auto;
    width:120px;
    height:120px;
    background:radial-gradient(circle at center, rgba(91,240,255,.2), transparent 68%);
    pointer-events:none;
}
.stat-card h3 { margin: 0; color: var(--muted); font-size: 13px; }
.stat-card p { margin: 10px 0 0; font-size: 28px; font-weight: 700; color: var(--primary); }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
    background: linear-gradient(155deg, var(--surface), var(--surface-3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
}
.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed color-mix(in srgb, var(--border) 70%, transparent 30%);
}
.card{transition:.2s ease;}
.card:hover{transform:translateY(-2px); box-shadow: 0 26px 40px rgba(39, 95, 201, 0.2);}

.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.list li {
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
    border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2);
    transition: .18s ease;
}
.list li:hover {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    transform: translateY(-1px);
    background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
}

.quick-actions, .quick-grid { display: grid; gap: 10px; }
.quick-actions { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.quick-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.quick-card {
    padding: 20px; text-align: center; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-weight: 600;
}
.quick-card:hover{transform:translateY(-2px);box-shadow:0 16px 26px rgba(31,111,235,.2);}
.quick-card.pressable:active{transform:translateY(0) scale(.99);}
.trend-chart{
    height: 180px;
    display:flex;
    align-items:flex-end;
    gap:10px;
    padding:8px 0;
}
.trend-col{
    flex:1;
    text-align:center;
}
.trend-bar{
    width:100%;
    border-radius:10px 10px 4px 4px;
    min-height:6px;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.2);
}
.trend-bar.income{background:linear-gradient(180deg,#22c55e,#16a34a);}
.trend-bar.appt{background:linear-gradient(180deg,#3b82f6,#2563eb);}
.trend-col small{display:block;margin-top:5px;color:var(--muted);font-size:11px;}

.btn-primary, .ghost-btn, .select {
    border-radius: 12px; border: 1px solid var(--border); padding: 10px 14px; font-weight: 600;
}
.btn-primary {
    background: linear-gradient(165deg, var(--primary), var(--primary-2));
    color: #fff;
    border-color: transparent;
    display: inline-block;
    text-align: center;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 26px rgba(19, 83, 214, 0.34); }
.ghost-btn, .select { background: linear-gradient(145deg, var(--surface-2), var(--surface-3)); color: var(--text); }
.ghost-btn:hover, .select:hover { border-color: var(--primary); }
.select:focus-visible,
.btn-primary:focus-visible,
.ghost-btn:focus-visible,
.input:focus-visible{
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 125, 255, 0.18);
}

.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
    color: var(--text);
    padding: 10px 12px;
    transition: .16s ease;
}
textarea.input { min-height: 95px; resize: vertical; }
.input:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.inline-form { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-grid .full { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.table th {
    text-align: start;
    color: var(--muted);
    font-size: 12px;
    padding: 0 10px 6px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.table td {
    background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px;
    transition: .16s ease;
}
.table tbody tr:hover td{
    border-top-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    border-bottom-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    background: linear-gradient(145deg, var(--surface), var(--surface-3));
}
.table td:first-child { border-inline-start: 1px solid var(--border); border-radius: 12px 0 0 12px; }
.table td:last-child { border-inline-end: 1px solid var(--border); border-radius: 0 12px 12px 0; }
.patient-thumb{
    width:36px;
    height:36px;
    border-radius:10px;
    object-fit:cover;
    border:1px solid var(--border);
}
.doctor-cell{
    display:flex;
    align-items:center;
    gap:8px;
}
.doctor-avatar{
    width:34px;
    height:34px;
    border-radius:10px;
    object-fit:cover;
    border:1px solid var(--border);
    background:var(--surface-2);
}
.doctor-avatar.placeholder{
    display:grid;
    place-items:center;
    font-weight:700;
    color:var(--primary);
}
.schedule-preview small{
    display:block;
    color:var(--muted);
    margin-bottom:6px;
    font-size:11px;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent 80%);
}

.alert {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}
.alert-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 120px;
    padding: 8px;
}
.cal-day h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.cal-item {
    display: block;
    padding: 6px;
    border-radius: 8px;
    background: rgba(31, 111, 235, 0.12);
    margin-bottom: 5px;
    font-size: 12px;
}
.cal-item.dragging { opacity: 0.55; }
.cal-day.drop-target {
    outline: 2px dashed var(--primary);
    background: rgba(31, 111, 235, 0.08);
}
.split { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.w-100 { width: 100%; }

.teeth-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(42px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.tooth {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 4px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.tooth:hover { transform: translateY(-1px); }
.tooth.healthy { background: #ffffff; }
.tooth.completed { background: #dcfce7; color: #166534; }
.tooth.under_treatment { background: #dbeafe; color: #1e3a8a; }
.tooth.caries, .tooth.extraction_needed { background: #fee2e2; color: #991b1b; }
.tooth.missing, .tooth.extracted { background: #e5e7eb; color: #374151; }
.tooth.observation { background: #fef3c7; color: #92400e; }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}
.dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-inline-end: 5px;
    vertical-align: middle;
    border: 1px solid var(--border);
}
.dot.completed { background: #22c55e; }
.dot.under_treatment { background: #3b82f6; }
.dot.caries { background: #ef4444; }
.dot.missing { background: #9ca3af; }
.dot.observation { background: #facc15; }
.dot.healthy { background: #ffffff; }

.modal {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    width: min(640px, 94vw);
    box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(2, 8, 23, 0.45); }

.patient-photo-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.patient-photo-lg{
    width:96px;
    height:96px;
    object-fit:cover;
    border-radius:18px;
    border:1px solid var(--border);
    background:var(--surface-2);
}
.patient-photo-lg.placeholder{
    display:grid;
    place-items:center;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.photo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
    gap:10px;
}
.photo-grid img{
    width:100%;
    height:104px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid var(--border);
    transition:.2s ease;
}
.photo-grid img:hover{transform:translateY(-1px);}
.drop-zone{
    border:2px dashed var(--border);
    border-radius:12px;
    padding:14px;
    color:var(--muted);
    text-align:center;
    margin-bottom:10px;
    background:var(--surface-2);
}
.drop-zone.dragover{
    border-color:var(--primary);
    color:var(--primary);
    background:rgba(31,111,235,.08);
}
.attachment-card{
    border:1px solid var(--border);
    border-radius:12px;
    padding:8px;
    background:var(--surface-2);
    display:grid;
    gap:8px;
}
.attachment-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}
.attachment-meta small{color:var(--muted);font-size:11px;}
.attachment-edit-form{
    display:grid;
    gap:6px;
}

.offline-badge {
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    padding: 6px 10px;
    font-weight: 700;
}
.offline-badge.offline { background: #fee2e2; color: #991b1b; }
.offline-badge.pending { background: #fef3c7; color: #92400e; }
.mobile-nav{
    display:none;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 84% 8%, rgba(94, 239, 255, 0.5), transparent 26%),
        radial-gradient(circle at 18% 88%, rgba(111, 146, 255, 0.35), transparent 34%),
        linear-gradient(140deg, #10319a 0%, #184fc4 42%, #091b4d 100%);
    padding: 20px;
}
.login-panel {
    width: min(980px, 96vw);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
}
.login-brand { color: #fff; padding: 30px; }
.login-brand h1 { font-size: 34px; margin: 12px 0 10px; }
.login-brand p { opacity: 0.9; }
.login-form { padding: 24px; }
.login-form h2 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(86vw, 320px);
        border-radius: 0 18px 18px 0;
        transform: translateX(-110%);
        transition: 0.25s;
        z-index: 40;
    }
    html[dir="rtl"] .sidebar {
        inset-inline-start: auto;
        inset-inline-end: 0;
        border-radius: 18px 0 0 18px;
        transform: translateX(110%);
    }
    .sidebar.open { transform: translateX(0); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .login-panel { grid-template-columns: 1fr; }
    .content { padding: 12px; }
    .topbar{top:0;}
    .card:hover,
    .stat-card:hover,
    .quick-card:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar{
        gap:8px;
        align-items:center;
        justify-content:space-between;
        position:sticky;
        top: 0;
        padding:9px 10px;
        transition: padding .22s ease, border-radius .22s ease, box-shadow .22s ease, transform .22s ease;
    }
    .topbar.compact{
        padding:6px 8px;
        border-radius:12px;
        box-shadow:0 10px 22px rgba(9, 32, 86, .22);
        transform:translateY(-1px);
    }
    .topbar-menu-btn{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:38px;
        height:38px;
        border-radius:12px;
        padding:0;
    }
    .topbar-right{
        position:absolute;
        top:calc(100% + 8px);
        inset-inline:0;
        z-index:30;
        background:linear-gradient(145deg, var(--surface), var(--surface-3));
        border:1px solid var(--border);
        border-radius:14px;
        box-shadow:var(--shadow);
        padding:10px;
        display:grid;
        grid-template-columns:1fr;
        gap:8px;
        max-height:0;
        opacity:0;
        transform:translateY(-8px) scale(.98);
        overflow:hidden;
        pointer-events:none;
        transition:max-height .24s ease, opacity .2s ease, transform .24s ease;
    }
    .topbar-right.open{
        max-height:280px;
        opacity:1;
        transform:translateY(0) scale(1);
        pointer-events:auto;
    }
    .topbar-right .select,
    .topbar-right .ghost-btn{width:100%;}
    .avatar-pill{border-radius:12px; padding:9px 12px;}
    .content{padding:10px;}
    .card{padding:12px;}
    .page-head h2 { font-size: 20px; }
    .page-head p { font-size: 13px; }
    .stat-card p { font-size: 24px; }
    .inline-form > * { flex: 1 1 100%; }
    .btn-primary, .ghost-btn, .select, .input {
        min-height: 44px;
    }
    .list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .table-wrap {
        margin-inline: -6px;
        padding-inline: 6px;
    }
    .table {
        min-width: 720px;
    }
    .table th,
    .table td {
        font-size: 12px;
    }
    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .menu-item{padding:10px 12px;font-size:14px;}
    .mobile-nav{
        position:fixed;
        bottom:0;
        inset-inline:0;
        display:grid;
        grid-template-columns:repeat(5,minmax(0,1fr));
        gap:4px;
        background:var(--surface);
        border-top:1px solid var(--border);
        box-shadow:0 -8px 18px rgba(2,8,23,.15);
        padding:8px 6px calc(8px + env(safe-area-inset-bottom));
        z-index:45;
    }
    .mobile-nav-item{
        text-align:center;
        font-size:10px;
        color:var(--muted);
        background:linear-gradient(145deg, var(--surface-2), var(--surface-3));
        border:1px solid var(--border);
        border-radius:10px;
        padding:6px 4px;
        font-weight:600;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:4px;
        min-height:48px;
    }
    .mobile-nav-ico{
        font-size:15px;
        line-height:1;
        color:var(--primary);
        text-shadow:0 0 10px rgba(91,240,255,.22);
    }
    .mobile-nav-item.active{
        color:#fff;
        background:linear-gradient(180deg, var(--primary), var(--primary-2));
        border-color:transparent;
        box-shadow:0 10px 18px rgba(18,84,234,.35);
    }
    .mobile-nav-item.active .mobile-nav-ico{
        color:#fff;
        transform:translateY(-1px);
    }
    .content{padding-bottom:90px;}
}

@media (prefers-reduced-motion: reduce) {
    .pressable,
    .ripple,
    .topbar,
    .topbar-right,
    .reveal-item {
        transition: none !important;
        animation: none !important;
    }
    .reveal-item {
        opacity: 1 !important;
        transform: none !important;
    }
}
