/* ============================================================
   BIENCA EMPLOYEE PWA — DESIGN SYSTEM
   Dark Cyber / Tech theme — tokens extracted from bienca.asia
   ============================================================ */
:root {
    --bg: #050A12;
    --surface: #0C1420;
    --surface2: #111C2E;
    --border: #1A2A40;
    --accent: #00D4FF;
    --accent3: #00FF9F;
    --text: #E8F0F8;
    --muted: #6A85A0;
    --white: #FFFFFF;
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --radius: 12px;
    --glow: 0 0 12px rgba(0, 212, 255, 0.35);
    --glow-green: 0 0 12px rgba(0, 255, 159, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Safe-area insets for notched devices */
.safe-top {
    padding-top: env(safe-area-inset-top, 0px);
}

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1,
h2,
h3,
.brand,
.logo-text {
    font-family: var(--font-display);
}

.uppercase-tag {
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
}

/* ============================================================
   BRANDING — Favicon + Logo Text (Bienca wordmark)
   ============================================================ */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-favicon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-text {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: none;
}

.logo-text .l-white {
    color: #FFFFFF;
}

.logo-text .l-cyan {
    color: var(--accent);
}

/* Larger favicon + wordmark on the login screen */
.login-brand {
    text-align: center;
    margin-bottom: 22px;
}

.login-brand .brand-favicon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
}

.login-brand .logo-text {
    font-size: 26px;
}

.login-brand p {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 300;
    color: var(--muted);
}

/* Green pulsing indicator dot */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent3);
    box-shadow: var(--glow-green);
    animation: pulse 2s infinite;
}

/* Screen toggling */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* SPA view containers */
.view {
    display: none;
}

.view.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.hidden {
    display: none !important;
}

/* Fade-in for cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.3s ease-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================ CARDS ============================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.card-title {
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--muted);
}

/* ============================ BADGES =========================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    background: var(--surface2);
}

.badge-accent {
    color: var(--accent);
    border-color: rgba(0, 212, 255, 0.35);
}

.badge-green {
    color: var(--accent3);
    border-color: rgba(0, 255, 159, 0.35);
}

.badge-error {
    color: #FF6B6B;
    border-color: rgba(255, 107, 107, 0.35);
}

.badge-warn {
    color: #FFC94D;
    border-color: rgba(255, 201, 77, 0.35);
}

/* ============================ BUTTONS ========================== */
.btn {
    font-family: var(--font-body);
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    border-color: var(--border);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #050A12;
    font-weight: 600;
    box-shadow: var(--glow);
}

.btn-accent:hover:not(:disabled) {
    background: #33DEFF;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.5);
}

/* ============================ NAVBAR =========================== */
.navbar {
    /* NOT sticky on mobile: a `position: fixed` tabbar nested inside a
       sticky navbar would be mis-positioned. Mobile keeps a plain static
       header; the tabbar becomes the fixed bottom bar instead. */
    position: static;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    background: rgba(5, 10, 18, 0.95);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
}

.brand-sub {
    display: block;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 1px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
}

.profile-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================= MAIN ============================ */
.app-main {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ===================== TAB BAR (BOTTOM) ======================== */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(5, 10, 18, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.tabbar-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 4px 8px;
    background: transparent;
    border: none;
    border-top: 2px solid transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 52px;
    transition: color 0.15s ease;
}

.tab-btn svg {
    width: 20px;
    height: 20px;
}

.tab-btn.active {
    color: var(--accent);
    border-top-color: var(--accent);
    box-shadow: inset 0 -1px 0 var(--accent);
}

.tab-btn.active svg {
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.6));
}

.has-tabbar {
    padding-bottom: 88px;
}

/* ==================== CLOCK / STATUS CARD ===================== */
.hero-clock {
    text-align: center;
    padding: 20px 16px 18px;
    position: relative;
    overflow: hidden;
}

.hero-clock::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.08), transparent 60%);
    pointer-events: none;
}

.clock-time {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.clock-date {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Payday countdown widget (inside the clock card) */
.payday-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    margin: 14px auto 0;
    padding: 5px 12px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 999px;
    background: var(--surface2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
    width: fit-content;
}

.payday-icon {
    font-size: 13px;
    line-height: 1;
}

/* ====================== LOCATION ROW ========================== */
.loc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.loc-detail {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.loc-coords {
    font-size: 13px;
    color: var(--text);
    font-weight: 400;
}

.loc-updated {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.loc-maps {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.loc-maps:hover {
    text-decoration: underline;
}

/* Embedded Google Map preview */
.map-frame {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface2);
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

.map-frame iframe {
    width: 100%;
    min-height: 150px;
    border: 0;
    display: block;
    background: var(--surface2);
    flex: 1;
}

.map-frame .loc-maps {
    margin: 8px 10px;
    text-align: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================= CAMERA ============================= */
.selfie-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-frame {
    position: relative;
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    /* Mobile: the frame keeps a compact 4:3 box (capped at 280px) so
       the preview does not stretch the page. */
    aspect-ratio: 4 / 3;
    max-height: 280px;
}

.camera-frame video,
.camera-frame img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Mirror the front camera so the preview acts like a natural mirror.
   The `.mirrored` class is toggled from attendance.js based on the active
   facingMode (user = mirrored, environment = not). The captured photo is
   mirrored on the canvas to match what the user sees (see attendance.js). */
.camera-frame video.mirrored {
    transform: scaleX(-1);
}

.camera-frame video.visible,
.camera-frame img.visible {
    display: block;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    width: 100%;
    height: 100%;
    color: var(--muted);
}

.camera-placeholder svg {
    width: 44px;
    height: 44px;
    opacity: 0.5;
}

.camera-placeholder p {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text);
    opacity: 0.85;
}

.camera-placeholder .hint {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

/* ======================= ACTION BUTTON ======================== */
.action-btn {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.action-btn.checkin {
    background: var(--accent);
    color: #050A12;
    box-shadow: var(--glow);
}

.action-btn.checkin:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.55);
}

.action-btn.checkout {
    background: var(--accent3);
    color: #050A12;
    box-shadow: var(--glow-green);
}

.action-btn.checkout:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(0, 255, 159, 0.55);
}

.privacy-note {
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
}

/* ======================== LOGS LIST =========================== */
.logs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.log-date {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.log-date-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.log-times {
    text-align: right;
    font-size: 13px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.log-total {
    margin-top: 2px;
    font-size: 12px;
    color: var(--accent);
}

.logs-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

/* ==================== COMING SOON PLACEHOLDER ================= */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    flex: 1;
    min-height: 0;
}

.coming-soon-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: var(--glow);
}

.coming-soon-icon svg {
    width: 34px;
    height: 34px;
}

.coming-soon .badge {
    margin-top: 22px;
}

.coming-soon h2 {
    margin-top: 14px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.coming-soon p {
    margin-top: 8px;
    max-width: 300px;
    font-size: 14px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.5;
}

/* ====================== LOGIN SCREEN ========================== */
.login-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 22px;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.field-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
    color: rgba(106, 133, 160, 0.6);
}

.field-input:focus {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.field-input:disabled {
    opacity: 0.6;
}

.login-submit {
    width: 100%;
    margin-top: 20px;
}

.login-agree {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
}

/* ======================= BANNER =============================== */
.banner {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 50;
    display: none;
    padding: 0 12px;
}

.banner.show {
    display: block;
}

.banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.banner-inner.error {
    border-color: rgba(255, 107, 107, 0.4);
}

.banner-inner.success {
    border-color: rgba(0, 255, 159, 0.4);
}

.banner-inner.warning {
    border-color: rgba(255, 201, 77, 0.4);
}

.banner-inner.info {
    border-color: rgba(0, 212, 255, 0.4);
}

.banner-icon {
    margin-top: 1px;
    flex-shrink: 0;
    display: flex;
}

.banner-icon svg {
    width: 18px;
    height: 18px;
}

.banner-inner.error .banner-icon {
    color: #FF6B6B;
}

.banner-inner.success .banner-icon {
    color: var(--accent3);
}

.banner-inner.warning .banner-icon {
    color: #FFC94D;
}

.banner-inner.info .banner-icon {
    color: var(--accent);
}

.banner-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
}

.banner-retry {
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: none;
}

.banner-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 2px;
}

.banner-close svg {
    width: 16px;
    height: 16px;
}

/* ===================== FATAL SCREEN =========================== */
.fatal-screen {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
}

.fatal-screen.active {
    display: flex;
}

.fatal-inner {
    text-align: center;
    max-width: 320px;
}

.fatal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF6B6B;
}

.fatal-icon svg {
    width: 28px;
    height: 28px;
}

.fatal-inner h1 {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.fatal-inner p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.5;
}

/* ============================================================
   DESKTOP / LARGE SCREEN LAYOUT
   Optimized for tablets & desktop. The PWA remains mobile-first;
   on wider viewports the shell widens, the attendance page moves
   to a two-column grid, and the tab bar becomes an in-flow bar.
   ============================================================ */
@media (min-width: 720px) {
    .clock-time {
        font-size: 52px;
    }
}

@media (min-width: 900px) {

    /* Wider app shell on desktop */
    .navbar-inner,
    .app-main,
    .page,
    .tabbar-inner {
        max-width: 960px;
    }

    .navbar-inner {
        padding: 12px 24px;
    }

    .app-main,
    .page {
        padding: 24px 24px 32px;
    }

    /* ---------- Attendance: two-column grid ----------
       Column A: clock/status + location (stacked, stretch to match)
       Column B: selfie camera
       Full width below: action button, privacy note, logs */
    .attendance-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
        align-items: stretch;
    }

    .attendance-layout>.card {
        margin-top: 0 !important;
    }

    /* Clock card + location card -> left column.
       Both cards become a vertical flex so they stretch to match
       the right (selfie) column exactly, with content spaced cleanly
       and no hardcoded heights. */
    .attendance-layout>.hero-clock {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }

    .attendance-layout>.card:nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 1;
        min-height: 0;
    }

    /* Camera card -> right column, spans both rows.
       On desktop the frame stretches (flex: 1) to match the combined
       height of the left column, and the video fills it with
       object-fit: cover — no black space around the preview. */
    .attendance-layout>.card:nth-of-type(3) {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: flex;
        flex-direction: column;
    }

    .attendance-layout .camera-frame {
        flex: 1;
        min-height: 0;
        aspect-ratio: auto;
        max-height: none;
    }

    .attendance-layout .camera-frame video,
    .attendance-layout .camera-frame img,
    .attendance-layout .camera-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
    }

    /* Action button, privacy note, logs -> full width below */
    .attendance-layout>div[style*="margin-top:14px"] {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 4px !important;
    }

    .attendance-layout>.privacy-note {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .attendance-layout>.card:last-child {
        grid-column: 1 / -1;
        grid-row: 5;
        margin-top: 4px !important;
    }

    /* Coming-soon pages: vertically centered on desktop */
    .coming-soon h2 {
        font-size: 24px;
    }

    /* Navbar becomes sticky again on desktop (tabs are in-flow here,
       so the fixed-position conflict does not apply). */
    .navbar {
        position: sticky;
    }

    /* Tab bar: moves into the top navbar on desktop.
       The navbar is now a column flex; the tabbar becomes its
       second row (below the brand/profile row), full width. */
    .tabbar {
        position: static;
        border-top: 1px solid var(--border);
        border-bottom: none;
    }

    .tabbar-inner {
        max-width: 960px;
        margin: 0 auto;
        padding: 0 24px;
        justify-content: center;
        gap: 8px;
    }

    .tab-btn {
        flex: 0 1 220px;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        border-top: none;
        border-bottom: 2px solid transparent;
        border-radius: 10px;
        margin: 4px 0;
    }

    .tab-btn.active {
        border-top: none;
        border-bottom-color: var(--accent);
        box-shadow: none;
        background: var(--surface2);
    }

    .tab-btn.active svg {
        filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.6));
    }

    /* No bottom bar on desktop -> remove reserved bottom padding */
    .has-tabbar {
        padding-bottom: 16px;
    }

    /* Wider login card on desktop */
    .login-card {
        max-width: 400px;
        padding: 36px 32px;
    }

    .login-brand .logo-text {
        font-size: 30px;
    }
}