/* MANIK BAKERY 2026 DESKTOP SYSTEM
   Desktop-first UI with restrained outlines and low-cost shadows. */
:root {
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --surface-muted: #f1f5f9;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 6px 18px rgba(15, 23, 42, .06);
    --shadow-modal: 0 -12px 40px rgba(15, 23, 42, .14);
}

html, body { min-height: 100%; }
body {
    background: #f4f7fb !important;
    color: var(--text);
    overflow: hidden;
}

/* Explicitly disable glassmorphism and expensive blur effects. */
[class*="backdrop-blur"], .backdrop-blur-sm, .backdrop-blur-xl {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

::-webkit-scrollbar { display: block !important; width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
* { scrollbar-width: thin !important; scrollbar-color: #cbd5e1 transparent; }

.shadow-card, .shadow-floating, .shadow-md, .shadow-lg { box-shadow: var(--shadow-xs) !important; }

#app-container { background: #f4f7fb !important; }
#view-app { min-width: 0; }

/* Authentication */
#view-auth {
    position: fixed !important;
    inset: 0;
    padding: 0 !important;
    background: #f4f7fb !important;
}
.auth-shell {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(360px, 44%) minmax(480px, 56%);
}
.auth-brand-panel {
    position: relative;
    padding: 56px clamp(40px, 6vw, 92px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #111827;
    color: #fff;
}
.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    pointer-events: none;
}
.auth-brand-panel::before { width: 420px; height: 420px; right: -210px; top: -110px; }
.auth-brand-panel::after { width: 260px; height: 260px; left: -130px; bottom: -100px; }
.auth-brand-mark { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.auth-brand-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--brand-600); background: #fff; box-shadow: var(--shadow-sm); }
.auth-brand-copy { position: relative; z-index: 1; max-width: 580px; }
.auth-brand-copy h2 { font-size: clamp(34px, 4vw, 58px); line-height: 1.08; font-weight: 800; letter-spacing: -.04em; }
.auth-brand-copy p { margin-top: 20px; max-width: 520px; color: #cbd5e1; font-size: 15px; line-height: 1.8; }
.auth-feature-list { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: 28px; }
.auth-feature { display: flex; gap: 12px; align-items: center; color: #e2e8f0; font-size: 13px; font-weight: 600; }
.auth-feature span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 48px 28px; overflow-y: auto; }
.auth-card { width: min(100%, 470px); background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 38px; box-shadow: var(--shadow-sm); }
.auth-card-header { margin-bottom: 28px; }
.auth-card-header h1 { font-size: 27px; line-height: 1.25; font-weight: 800; letter-spacing: -.025em; }
.auth-card-header p { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.auth-field label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #475569; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i, .auth-input-wrap > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; }
.auth-input { width: 100%; height: 48px; padding: 0 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 600; outline: none; transition: border-color .18s, box-shadow .18s; }
.auth-input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.auth-switch { margin-top: 22px; text-align: center; color: #64748b; font-size: 12px; }
.auth-switch a { color: var(--brand-700); font-weight: 800; }

/* Application shell */
#app-sidebar {
    width: 264px !important;
    background: #fff !important;
    border-right: 1px solid var(--line) !important;
    box-shadow: none !important;
}
#app-sidebar > div:first-of-type { height: 76px !important; padding-left: 20px !important; padding-right: 20px !important; border-color: var(--line) !important; }
#app-sidebar .nav-item { min-height: 42px; border-radius: 10px !important; padding: 10px 12px !important; gap: 11px !important; color: #475569 !important; }
#app-sidebar .nav-item span { font-size: 12px !important; }
#app-sidebar .nav-item i, #app-sidebar .nav-item svg { width: 17px !important; height: 17px !important; }
#app-sidebar .nav-item:hover { background: #f8fafc !important; color: #0f172a !important; }
#app-sidebar .nav-item.active { background: var(--brand-50) !important; color: var(--brand-800) !important; box-shadow: inset 0 0 0 1px var(--brand-100); }
#app-sidebar .nav-item.active::before { left: -3px !important; top: 8px !important; bottom: 8px !important; width: 3px !important; }
.sidebar-user-card { margin: 10px 12px 16px; padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.sidebar-user-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-size: 12px; font-weight: 800; }

.app-topbar {
    height: 76px !important;
    padding: 0 28px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
}
.app-heading { min-width: 0; }
.app-heading h1 { font-size: 17px; font-weight: 800; color: #0f172a; letter-spacing: -.015em; }
.app-heading p { margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 600; }
.topbar-action { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px !important; border: 1px solid var(--line); background: #fff !important; color: #475569; }
.topbar-action:hover { border-color: var(--line-strong); background: #f8fafc !important; }

#pages-container { padding: 26px 28px 40px !important; background: #f4f7fb !important; }
#pages-container > .page-section { max-width: 1600px !important; margin-top: 0 !important; }
.page-section { animation: pageFade .18s ease-out forwards !important; }
@keyframes pageFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-toolbar-copy h2 { font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -.025em; color: #0f172a; }
.page-toolbar-copy p { margin-top: 5px; color: #64748b; font-size: 12px; line-height: 1.6; }
.page-toolbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.btn-primary, .btn-secondary, .btn-danger-soft, .btn-icon {
    height: 40px; border-radius: 10px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .18s ease; white-space: nowrap;
}
.btn-primary { padding: 0 16px; color: #fff; background: var(--brand-600); border: 1px solid var(--brand-600); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-secondary { padding: 0 14px; color: #334155; background: #fff; border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--line-strong); background: #f8fafc; }
.btn-danger-soft { padding: 0 14px; color: #be123c; background: #fff1f2; border: 1px solid #ffe4e6; }
.btn-icon { width: 40px; color: #334155; background: #fff; border: 1px solid var(--line); }
.btn-primary i, .btn-primary svg, .btn-secondary i, .btn-secondary svg, .btn-icon i, .btn-icon svg { width: 16px; height: 16px; }

.toolbar-search { position: relative; min-width: 260px; flex: 1; max-width: 440px; }
.toolbar-search i, .toolbar-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94a3b8; pointer-events: none; }
.toolbar-search input { width: 100%; height: 40px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 600; outline: none; }
.toolbar-search input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.desktop-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-xs); overflow: hidden; }
.desktop-panel-header { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.desktop-panel-header h3 { font-size: 13px; font-weight: 800; }
.desktop-panel-header p { margin-top: 3px; font-size: 10px; color: #64748b; }
.desktop-table-wrap { overflow: auto; }
.data-table { width: 100%; min-width: 840px; border-collapse: separate; border-spacing: 0; }
.data-table th { padding: 11px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #eef2f7; color: #334155; font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fbfdff; }
.table-title { font-weight: 800; color: #0f172a; }
.table-subtitle { display: block; margin-top: 3px; color: #94a3b8; font-size: 10px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.table-action { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #475569; background: #fff; }
.table-action:hover { background: #f8fafc; border-color: var(--line-strong); }
.table-action.danger { color: #e11d48; border-color: #ffe4e6; background: #fff1f2; }
.table-action.success { color: #059669; border-color: #d1fae5; background: #ecfdf5; }
.table-action i, .table-action svg { width: 15px; height: 15px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .85; }
.status-success { color: #047857; background: #ecfdf5; }
.status-warning { color: #b45309; background: #fffbeb; }
.status-info { color: #1d4ed8; background: #eff6ff; }
.status-neutral { color: #475569; background: #f1f5f9; }
.money { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 800; color: #0f172a; white-space: nowrap; }
.product-table-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: #f8fafc; }

/* Dashboard and finance density */
#page-dashboard .grid, #page-finance .grid { gap: 14px !important; }
#page-dashboard [class*="rounded-[24px]"], #page-dashboard [class*="rounded-[28px]"], #page-finance [class*="rounded-[24px]"] { border-radius: 14px !important; border-color: var(--line) !important; }
#page-dashboard .shadow-floating, #page-finance .shadow-floating { box-shadow: var(--shadow-xs) !important; }
#page-dashboard .backdrop-blur-sm { backdrop-filter: none !important; }
#page-dashboard .bg-white\/10 { background: rgba(255,255,255,.08) !important; }

/* Modal system. Bottom sheet remains the interaction model, wider on desktop. */
.modal-overlay { align-items: center; justify-content: flex-end !important; padding: 0 18px; }
.modal-backdrop { background: rgba(15, 23, 42, .48) !important; }
.bottom-sheet-content {
    width: min(100%, 1080px) !important;
    max-width: 1080px !important;
    max-height: 91vh !important;
    margin: 0 auto !important;
    border-radius: 22px 22px 0 0 !important;
    border: 1px solid var(--line) !important;
    border-bottom: 0 !important;
    box-shadow: var(--shadow-modal) !important;
}
.bottom-sheet-handle { width: 44px; height: 4px; border-radius: 999px; background: #cbd5e1; margin: 10px auto 8px; flex: 0 0 auto; }
.modal-header { min-height: 66px; padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.modal-header h3 { font-size: 16px; font-weight: 800; }
.modal-header p { margin-top: 3px; font-size: 10px; color: #64748b; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #475569; background: #fff; }
.modal-body { padding: 20px 22px 26px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.form-section { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.form-section-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 13px; margin-bottom: 15px; border-bottom: 1px solid #eef2f7; }
.form-section-title h4 { font-size: 12px; font-weight: 800; color: #0f172a; }
.form-section-title p { margin-top: 3px; color: #64748b; font-size: 10px; line-height: 1.5; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.field label { display: block; margin-bottom: 6px; color: #475569; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea, .form-control {
    width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #0f172a; font-size: 12px; font-weight: 600; outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .form-control:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.segmented-control { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.segmented-control button { min-height: 32px; padding: 0 12px; border-radius: 7px; color: #64748b; font-size: 10px; font-weight: 800; }
.segmented-control button.bg-white { color: #0f172a; border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.transaction-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .65fr); gap: 18px; align-items: start; }
.transaction-summary { position: sticky; top: 0; display: grid; gap: 13px; }
.catalog-launch { padding: 16px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #f8fafc; }
.catalog-launch h4 { font-size: 12px; font-weight: 800; }
.catalog-launch p { margin-top: 4px; color: #64748b; font-size: 10px; }
.cart-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cart-table th { padding: 9px 10px; color: #64748b; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; text-align: left; }
.cart-table td { padding: 10px; border-bottom: 1px solid #eef2f7; font-size: 11px; vertical-align: middle; }
.cart-table tbody tr:last-child td { border-bottom: 0; }
.cart-table input { min-height: 36px; }
.total-box { padding: 16px; border: 1px solid var(--brand-100); border-radius: 13px; background: var(--brand-50); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.total-box span:first-child { color: var(--brand-800); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.total-box span:last-child { color: var(--brand-800); font-size: 20px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Neutralize legacy mobile cart-to-card override on desktop. */
@media (min-width: 768px) {
    #order-cart-body tr, #quotation-items-body tr { display: table-row !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
    #order-cart-body td, #quotation-items-body td { width: auto !important; padding: 10px !important; margin: 0 !important; border-bottom: 1px solid #eef2f7 !important; display: table-cell !important; color: #334155 !important; font-size: 11px !important; }
    #order-cart-body td::before, #quotation-items-body td::before { content: none !important; }
}

/* Product picker */
.product-picker-shell { width: min(100%, 1420px); height: min(92vh, 900px); margin: auto; background: #f8fafc; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(15,23,42,.22); overflow: hidden; display: flex; flex-direction: column; }
.product-picker-header { min-height: 70px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.product-picker-heading { display: flex; align-items: center; gap: 12px; }
.product-picker-heading > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); }
.product-picker-heading h2 { font-size: 15px; font-weight: 800; }
.product-picker-heading p { margin-top: 3px; color: #64748b; font-size: 10px; }
.product-picker-tools { display: flex; align-items: center; gap: 10px; }
.product-picker-search { position: relative; width: min(36vw, 390px); }
.product-picker-search i, .product-picker-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94a3b8; }
.product-picker-search input { width: 100%; height: 40px; padding: 0 13px 0 38px; border: 1px solid var(--line); border-radius: 10px; outline: none; font-size: 12px; font-weight: 600; }
.product-picker-body { padding: 18px; overflow: auto; flex: 1; }
.product-picker-grid { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 13px !important; padding: 0 !important; align-content: start; }
.product-picker-card { position: relative; padding: 10px; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-xs); transition: border-color .18s, box-shadow .18s, transform .18s; cursor: pointer; }
.product-picker-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.product-picker-image { width: 100%; aspect-ratio: 4/3; border-radius: 9px; overflow: hidden; border: 1px solid #eef2f7; background: #f8fafc; }
.product-picker-image img { width: 100%; height: 100%; object-fit: cover; }
.product-picker-name { margin-top: 10px; min-height: 34px; color: #0f172a; font-size: 11px; line-height: 1.45; font-weight: 800; }
.product-picker-meta { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-picker-price { color: var(--brand-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.product-picker-stock { color: #94a3b8; font-size: 9px; font-weight: 700; }
.product-picker-badge { position: absolute; top: 6px; right: 6px; z-index: 2; min-width: 25px; height: 25px; padding: 0 7px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--brand-600); color: #fff; font-size: 9px; font-weight: 800; }
.product-picker-footer { min-height: 58px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: #fff; }
.product-picker-footer p { color: #64748b; font-size: 10px; font-weight: 600; }

/* Keep settings and HPP usable on wide screens. */
#page-settings .settings-panel { border: 1px solid var(--line) !important; border-radius: 14px !important; box-shadow: var(--shadow-xs) !important; background: #fff !important; }
#hpp-form-wrapper { max-width: 1180px; }
#hpp-form-wrapper > div, #hpp-view-ai > div, #hpp-view-history > div { border-radius: 14px !important; box-shadow: var(--shadow-xs) !important; }

@media (max-width: 1199px) {
    .product-picker-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
    .transaction-layout { grid-template-columns: 1fr; }
    .transaction-summary { position: static; }
}

@media (max-width: 767px) {
    body { overflow: hidden; }
    .auth-shell { display: block; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100%; padding: 22px 16px; align-items: center; }
    .auth-card { padding: 25px 20px; border-radius: 18px; }
    #app-sidebar { width: 276px !important; }
    .app-topbar { height: 64px !important; padding: 0 15px !important; }
    .app-heading p { display: none; }
    #pages-container { padding: 16px 14px 90px !important; }
    .page-toolbar { flex-direction: column; align-items: stretch; gap: 13px; }
    .page-toolbar-copy h2 { font-size: 19px; }
    .page-toolbar-actions { justify-content: flex-start; }
    .toolbar-search { min-width: 100%; max-width: none; }
    .btn-primary, .btn-secondary { flex: 1; }
    .desktop-panel { border-radius: 12px; }
    .desktop-table-wrap { overflow: visible; }
    .data-table { min-width: 0; display: block; }
    .data-table thead { display: none; }
    .data-table tbody { display: grid; gap: 10px; padding: 10px; }
    .data-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
    .data-table td { display: block; padding: 0 !important; border: 0 !important; }
    .data-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #94a3b8; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
    .data-table td.primary-cell { grid-column: 1 / -1; padding-bottom: 8px !important; border-bottom: 1px solid #eef2f7 !important; }
    .data-table td.action-cell { grid-column: 1 / -1; padding-top: 8px !important; }
    .table-actions { justify-content: flex-start; }
    .modal-overlay { padding: 0; }
    .bottom-sheet-content { border-radius: 22px 22px 0 0 !important; max-height: 95vh !important; }
    .modal-body { padding: 16px 15px 22px; }
    .modal-header { padding: 12px 15px; }
    .modal-footer { padding-left: 15px; padding-right: 15px; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .transaction-layout { grid-template-columns: 1fr; gap: 13px; }
    .product-picker-shell { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
    .product-picker-header { padding: 12px 14px; flex-wrap: wrap; }
    .product-picker-heading p { display: none; }
    .product-picker-tools { width: 100%; }
    .product-picker-search { flex: 1; width: auto; }
    .product-picker-body { padding: 12px; }
    .product-picker-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 10px !important; }
    .product-picker-footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* Desktop settings workspace */
@media (min-width: 768px) {
    #page-settings .settings-layout {
        display: grid;
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 16px;
        align-items: start;
    }
    #page-settings .settings-tabs {
        position: sticky;
        top: 0;
        display: flex !important;
        flex-direction: column;
        gap: 6px !important;
        padding: 10px !important;
        overflow: visible !important;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow-xs);
    }
    #page-settings .setting-tab {
        width: 100%;
        min-height: 40px;
        padding: 0 12px !important;
        border-radius: 9px !important;
        text-align: left;
        box-shadow: none !important;
    }
    #page-settings .settings-panel {
        margin: 0 !important;
        padding: 24px !important;
        min-width: 0;
    }
    #page-settings .setting-content {
        max-width: 980px;
    }
}

/* =========================================================
   THEME COHESION + RESPONSIVE REFINEMENT (REVISION 2)
   ========================================================= */
body:not([data-theme]), body[data-theme="blue"] { --brand-rgb: 37, 99, 235; }
body[data-theme="ocean"] { --brand-rgb: 8, 145, 178; }
body[data-theme="emerald"] { --brand-rgb: 5, 150, 105; }
body[data-theme="violet"] { --brand-rgb: 124, 58, 237; }
body[data-theme="rose"] { --brand-rgb: 225, 29, 72; }
body[data-theme="slate"] { --brand-rgb: 71, 85, 105; }

body {
    --canvas: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #f1f5f9;
    --text-strong: #0f172a;
    --text-default: #334155;
    --text-soft: #64748b;
    --text-faint: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --brand-shadow: 0 8px 22px rgba(var(--brand-rgb), .16);
    color: var(--text-default);
    background: var(--canvas) !important;
}

button, input, select, textarea { color: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-600); }

#app-container,
#view-app > div.flex-1,
#pages-container { background: var(--canvas) !important; }

/* Restore card treatments that were previously neutralized globally. */
#page-dashboard .bg-gradient-to-br.from-white.to-slate-50 {
    background-image: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
}
#page-dashboard .bg-gradient-to-br.from-slate-900.to-slate-800 {
    background-image: linear-gradient(145deg, #0f172a 0%, #1e293b 100%) !important;
    border-color: #1e293b !important;
}
#card-laba-rugi.from-rose-50 {
    background-image: linear-gradient(115deg, #fff1f2 0%, #ffffff 78%) !important;
}
#card-laba-rugi.from-emerald-50 {
    background-image: linear-gradient(115deg, #ecfdf5 0%, #ffffff 78%) !important;
}
.dashboard-metric-grid > :first-child {
    background-image: linear-gradient(145deg, #ffffff 0%, #ecfdf5 130%) !important;
    border-color: #d1fae5 !important;
}
.dashboard-metric-grid > :nth-child(2) {
    background-image: linear-gradient(145deg, #ffffff 0%, #fff1f2 130%) !important;
    border-color: #ffe4e6 !important;
}

/* Neutral navigation. Only the current route receives the selected treatment. */
#app-sidebar .nav-item {
    background: transparent !important;
    border: 1px solid transparent;
    box-shadow: none !important;
}
#app-sidebar .nav-item:hover {
    background: var(--surface-soft) !important;
    border-color: var(--line-soft);
}
#app-sidebar .nav-item.active {
    background: var(--brand-50) !important;
    color: var(--brand-800) !important;
    border-color: var(--brand-100);
    box-shadow: none !important;
}
#app-sidebar .nav-item.active i,
#app-sidebar .nav-item.active svg { color: var(--brand-600) !important; }

/* Theme-aware interactive controls. */
.btn-primary,
#btn-save-settings-profile,
#btn-save-settings-invoice,
#btn-save-settings-theme {
    background: var(--brand-600) !important;
    border-color: var(--brand-600) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(var(--brand-rgb), .15) !important;
}
.btn-primary:hover,
#btn-save-settings-profile:hover,
#btn-save-settings-invoice:hover,
#btn-save-settings-theme:hover { background: var(--brand-700) !important; }

#page-settings .setting-tab {
    color: var(--text-soft) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}
#page-settings .setting-tab:hover {
    color: var(--text-strong) !important;
    background: var(--surface-soft) !important;
    border-color: var(--line-soft) !important;
}
#page-settings .setting-tab.is-active {
    color: #fff !important;
    background: var(--brand-600) !important;
    border-color: var(--brand-600) !important;
    box-shadow: 0 5px 14px rgba(var(--brand-rgb), .16) !important;
}

.segmented-control button {
    border: 1px solid transparent;
    color: var(--text-soft);
    background: transparent;
}
.segmented-control button.is-active {
    color: var(--brand-800) !important;
    background: var(--surface) !important;
    border-color: var(--brand-200) !important;
    box-shadow: 0 1px 3px rgba(var(--brand-rgb), .10) !important;
}

.theme-swatch {
    color: var(--text-default);
    border-color: var(--line) !important;
    background: var(--surface) !important;
}
.theme-swatch:hover { border-color: var(--brand-300) !important; }
.theme-swatch[aria-pressed="true"] {
    border-color: var(--brand-500) !important;
    background: var(--brand-50) !important;
    color: var(--brand-800) !important;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-400) !important;
}

.field input:focus, .field select:focus, .field textarea:focus, .form-control:focus,
.auth-input:focus, .toolbar-search input:focus, .product-picker-search input:focus {
    border-color: var(--brand-400) !important;
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12) !important;
}

.desktop-panel,
.form-section,
.auth-card,
#page-settings .settings-panel,
#page-settings .settings-tabs {
    background: var(--surface) !important;
    border-color: var(--line) !important;
}
.desktop-panel-header,
.modal-header,
.modal-footer,
.product-picker-header,
.product-picker-footer { background: var(--surface) !important; }
.data-table tbody tr:hover td { background: rgba(var(--brand-rgb), .025); }
.catalog-launch {
    background: linear-gradient(135deg, var(--brand-50) 0%, #ffffff 88%) !important;
    border-color: var(--brand-100) !important;
}
.total-box {
    background: var(--brand-50) !important;
    border-color: var(--brand-100) !important;
}

/* Direct-click catalog interaction. */
.product-picker-shell { background: var(--canvas); }
.product-picker-card {
    border-color: var(--line);
    background: var(--surface);
    user-select: none;
}
.product-picker-card:hover {
    border-color: var(--brand-300);
    box-shadow: 0 8px 18px rgba(var(--brand-rgb), .08);
}
.product-picker-card:focus-visible {
    outline: 3px solid rgba(var(--brand-rgb), .18);
    outline-offset: 2px;
}
.product-picker-card.in-cart {
    border-color: var(--brand-200);
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-50) 145%);
}
.product-picker-card.just-added {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14);
    transform: translateY(-1px);
}
.product-picker-card.is-disabled {
    cursor: not-allowed;
    opacity: .55;
    filter: grayscale(.25);
}
.product-picker-hint {
    min-height: 30px;
    margin-top: 9px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--text-faint);
    background: var(--surface-soft);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}
.product-picker-hint.has-items {
    color: var(--brand-800);
    border-color: var(--brand-200);
    background: var(--brand-50);
}
.product-picker-badge {
    background: var(--brand-600);
    box-shadow: 0 3px 10px rgba(var(--brand-rgb), .24);
}
.product-picker-footer .btn-primary { min-width: 150px; }

/* Make all modal form surfaces readable, including legacy Tailwind markup. */
.bottom-sheet-content { background: var(--surface) !important; color: var(--text-default); }
.bottom-sheet-content input:not([type="checkbox"]):not([type="radio"]),
.bottom-sheet-content select,
.bottom-sheet-content textarea {
    color: var(--text-strong);
}
.bottom-sheet-content .bg-slate-50 { background-color: var(--surface-soft) !important; }

/* Mobile refinements. */
@media (max-width: 767px) {
    body { overflow: hidden; }
    #pages-container { padding: 14px 12px calc(82px + env(safe-area-inset-bottom)) !important; }
    .app-topbar { padding: 0 12px !important; }
    .app-heading h1 { font-size: 15px; }
    .topbar-action { width: 36px; height: 36px; }

    .page-toolbar-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-toolbar-actions .toolbar-search { grid-column: 1 / -1; }
    .page-toolbar-actions .btn-primary,
    .page-toolbar-actions .btn-secondary { width: 100%; min-width: 0; }

    .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .dashboard-metric-grid > div { padding: 14px !important; }
    .dashboard-metric-grid h3 { font-size: 13px !important; overflow-wrap: anywhere; }

    .product-picker-shell { height: 100dvh; border-radius: 0; }
    .product-picker-header { align-items: flex-start; gap: 10px; }
    .product-picker-heading { min-width: 0; }
    .product-picker-heading h2 { font-size: 14px; }
    .product-picker-tools { align-items: center; }
    .product-picker-search input { font-size: 16px; }
    .product-picker-body { padding: 10px; }
    .product-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px !important; }
    .product-picker-card { padding: 8px; border-radius: 12px; }
    .product-picker-image { aspect-ratio: 1 / 1; }
    .product-picker-name { min-height: 36px; font-size: 10px; }
    .product-picker-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
    .product-picker-price { font-size: 9px; }
    .product-picker-stock { font-size: 8px; }
    .product-picker-hint { min-height: 28px; padding: 4px 6px; font-size: 8px; line-height: 1.25; }
    .product-picker-footer { position: relative; z-index: 3; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
    .product-picker-footer p { max-width: 52%; line-height: 1.35; }
    .product-picker-footer .btn-primary { min-width: 132px; padding: 0 12px; }

    .cart-table,
    .cart-table tbody { display: block; width: 100%; }
    .cart-table thead { display: none; }
    .cart-table tbody { padding: 0; }
    #order-cart-body tr,
    #quotation-items-body tr,
    #manual-invoice-items .cart-table tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px !important;
        width: 100%;
        margin: 0 0 10px !important;
        padding: 12px !important;
        border: 1px solid var(--line) !important;
        border-radius: 12px !important;
        background: var(--surface) !important;
        box-shadow: none !important;
    }
    #order-cart-body td,
    #quotation-items-body td,
    #manual-invoice-items .cart-table td {
        width: auto !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
    }
    #order-cart-body td:first-child,
    #quotation-items-body td:first-child,
    #manual-invoice-items .cart-table td:first-child { grid-column: 1 / -1; }
    #quotation-items-body td:nth-child(2),
    #quotation-items-body td:nth-child(3),
    #manual-invoice-items .cart-table td:nth-child(2),
    #manual-invoice-items .cart-table td:nth-child(3) { min-width: 0; }
    #order-cart-body input,
    #quotation-items-body input,
    #manual-invoice-items .cart-table input { width: 100% !important; min-width: 0 !important; }

    .form-section-title { flex-direction: column; align-items: stretch; }
    .segmented-control { width: 100%; }
    .segmented-control button { flex: 1; padding: 0 8px; }
}

@media (max-width: 390px) {
    .dashboard-metric-grid { grid-template-columns: 1fr !important; }
    .product-picker-grid { gap: 7px !important; }
    .product-picker-card { padding: 7px; }
    .product-picker-footer p { display: none; }
    .product-picker-footer .btn-primary { width: 100%; min-width: 0; }
    .page-toolbar-actions { grid-template-columns: 1fr; }
    .page-toolbar-actions .toolbar-search { grid-column: auto; }
}

#setting-theme > div:first-child {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600)) !important;
    box-shadow: var(--brand-shadow);
}
#setting-theme > div:first-child p { color: rgba(255,255,255,.78) !important; }
.margin-btn.bg-bakery-600 { background: var(--brand-600) !important; box-shadow: 0 4px 12px rgba(var(--brand-rgb), .16) !important; }

/* =========================================================
   2026.08 stability, export, PWA, responsive and theme fixes
   ========================================================= */
html { background: #f8fafc; }
body { min-width: 0; }
/* Consistent form language based on the clean invoice surface. */
.bottom-sheet-content { border: 1px solid #e5e7eb; }
.modal-header { position: relative; }
.modal-header::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 999px 999px 0; background: var(--brand-600); }
.form-section { border-color: #e5e7eb; box-shadow: 0 1px 2px rgba(15,23,42,.025); }
.form-section-title h4, .catalog-launch h4 { letter-spacing: -.01em; }
.field input, .field select, .field textarea, .form-control,
.bottom-sheet-content input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bottom-sheet-content select, .bottom-sheet-content textarea {
    border: 1px solid #dfe3e8 !important; border-radius: 10px !important; background: #fff !important; color: #1f2937 !important;
    box-shadow: none !important; max-width: 100%;
}
.bottom-sheet-content input:focus, .bottom-sheet-content select:focus, .bottom-sheet-content textarea:focus {
    border-color: var(--brand-500) !important; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .11) !important;
}
.transaction-layout { min-width: 0; }
.transaction-layout > *, .transaction-summary, .form-section, .catalog-launch { min-width: 0; }
.catalog-launch { background: linear-gradient(180deg, #fff, #f8fafc); }
.total-box { background: linear-gradient(135deg, var(--brand-50), #fff); }

/* Unified export controls. */
.export-button-group { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.export-button-group .btn-secondary { min-width: 78px; height: 36px; border: 0 !important; border-radius: 8px !important; box-shadow: none !important; }
.export-button-group .btn-secondary + .btn-secondary { color: #047857; background: #ecfdf5; }
.export-button-compact { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dbe3ea; border-radius: 16px; background: #fff; color: #334155; font-size: 11px; font-weight: 800; box-shadow: 0 1px 2px rgba(15,23,42,.04); white-space: nowrap; }
.database-export-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.database-export-button { min-height: 76px; padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid #dbe3ea; border-radius: 16px; background: #fff; color: #334155; font-size: 10px; font-weight: 800; text-align: center; }
.database-export-button:hover { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-800); }
.database-export-button svg { width: 20px; height: 20px; color: var(--brand-600); }

/* Sidebar PWA install action. */
.sidebar-install-button { width: 100%; min-height: 44px; padding: 9px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--brand-100); border-radius: 11px; background: var(--brand-50); color: var(--brand-800); font-size: 11px; font-weight: 800; }
.sidebar-install-button:hover { border-color: var(--brand-200); background: var(--brand-100); }
.sidebar-install-icon { width: 28px; height: 28px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #fff; color: var(--brand-700); }
.sidebar-install-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Actionable notification list. */
#notif-badge { min-width: 17px !important; width: auto !important; height: 17px !important; padding: 0 4px; top: -3px !important; right: -4px !important; display: grid; place-items: center; border-width: 2px; color: #fff; font-size: 7px; line-height: 1; font-weight: 900; }
.notification-item { width: 100%; padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; text-align: left; transition: transform .16s, border-color .16s, box-shadow .16s; }
.notification-item:hover { transform: translateY(-1px); border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.notification-item strong { display: block; color: #0f172a; font-size: 11px; }
.notification-item small { display: block; margin-top: 3px; color: #64748b; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.notification-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #f8fafc; }
.notification-rose .notification-icon { color: #e11d48; background: #fff1f2; }
.notification-amber .notification-icon { color: #d97706; background: #fffbeb; }
.notification-empty { padding: 36px 16px; display: grid; justify-items: center; gap: 10px; color: #94a3b8; text-align: center; }
.notification-empty svg { width: 40px; height: 40px; }
.notification-empty p { font-size: 10px; font-weight: 800; }
.notification-target-flash { animation: notificationTargetFlash 1.8s ease; }
@keyframes notificationTargetFlash { 0%,100% { box-shadow: inherit; } 25%,70% { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .2), 0 12px 32px rgba(var(--brand-rgb), .18); } }

/* Progressive loading for long lists. */
.progressive-list-sentinel, .product-picker-load-more { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #64748b; font-size: 9px; font-weight: 800; }
.progressive-list-sentinel { border-top: 1px solid #eef2f7; background: linear-gradient(180deg, rgba(248,250,252,0), #f8fafc); }
.product-picker-load-more { grid-column: 1 / -1; }

/* Stable tables and action cells. */
.desktop-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.data-table { table-layout: auto; }
.data-table th, .data-table td { max-width: 340px; overflow-wrap: anywhere; }
.data-table td:last-child > div, .data-table .action-cell > div { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
.data-table button, .data-table a { flex: 0 0 auto; }

/* Fullscreen state follows the actual browser event, including Escape. */
#app-container:fullscreen, #app-container:-webkit-full-screen { width: 100vw; height: 100vh; max-width: none; border-radius: 0; background: var(--canvas); }
html:has(#app-container:fullscreen), body:has(#app-container:fullscreen) { overflow: hidden; }

/* Theme transition without stale hard-coded surfaces. */
body, #app-container, #view-app, #pages-container, .app-topbar, #app-sidebar, .desktop-panel, .form-section, .bottom-sheet-content { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.bg-bakery-50, .bg-bakery-100, .bg-bakery-600, .text-bakery-600, .text-bakery-700 { transition: background-color .16s ease, color .16s ease; }

/* Portrait login/register: safe-area aware and no clipped card. */
@media (orientation: portrait) and (max-width: 767px) {
    #view-auth { background: linear-gradient(180deg, var(--brand-50) 0, #f8fafc 38%, #fff 100%); }
    .auth-shell { min-height: 100dvh; }
    .auth-form-panel { min-height: 100dvh; padding: calc(22px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom)); align-items: center; overflow: visible; }
    .auth-card { width: 100%; max-width: 430px; padding: 24px 18px; border-radius: 20px; box-shadow: 0 20px 50px rgba(15,23,42,.09); }
    .auth-card::before { content: ""; width: 42px; height: 4px; display: block; margin: -8px auto 21px; border-radius: 99px; background: var(--brand-200); }
    .auth-card-header { margin-bottom: 22px; text-align: center; }
    .auth-card-header h1 { font-size: 23px; }
    .auth-card-header p { font-size: 11px; }
    .auth-input { height: 50px; font-size: 16px; }
    .auth-switch { margin-top: 20px; }
}

@media (max-width: 767px) {
    .page-toolbar-actions { grid-template-columns: 1fr 1fr; }
    .page-toolbar-actions .export-button-group { width: 100%; grid-column: 1 / -1; }
    .page-toolbar-actions .export-button-group .btn-secondary { flex: 1; width: auto; }
    .transaction-layout { grid-template-columns: 1fr; }
    .transaction-summary { position: static; }
    .database-export-grid { grid-template-columns: 1fr; }
    .modal-header::before { top: 11px; bottom: 11px; }
    .data-table tr { min-width: 0; }
    .data-table td { max-width: none; min-width: 0; }
}

@media (max-width: 390px) {
    .page-toolbar-actions { grid-template-columns: 1fr; }
    .export-button-compact { width: 100%; justify-content: center; }
}


/* Regression guard: hidden overlays must never intercept taps after rotation. */
.modal-overlay.hidden,
[id^="modal-fullscreen-"].hidden,
#sidebar-overlay.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.modal-overlay:not(.hidden),
[id^="modal-fullscreen-"]:not(.hidden) {
    visibility: visible !important;
    pointer-events: auto !important;
}
#in-app-preview-wrapper {
    position: fixed !important;
    width: 100vw;
    height: 100dvh;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    pointer-events: auto !important;
}
@media (orientation: landscape) and (max-height: 620px) {
    .modal-overlay { align-items: center !important; padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom)); }
    .modal-overlay .bottom-sheet-content { max-height: calc(100dvh - 16px) !important; border-radius: 20px !important; }
}


/* Authentication mobile layout and compatible fullscreen mode. */
body.app-css-fullscreen { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; }
body.app-css-fullscreen #app-container { width: 100vw; height: 100dvh !important; max-width: none; border-radius: 0; }

@media (max-width: 767px) {
    #view-auth { overflow-y: auto !important; }
    .auth-shell { min-height: 100dvh; grid-template-columns: 1fr; align-content: start; }
    .auth-brand-panel { min-height: auto; padding: calc(20px + env(safe-area-inset-top)) 20px 18px; gap: 18px; justify-content: flex-start; }
    .auth-brand-panel::before { width: 220px; height: 220px; right: -120px; top: -110px; }
    .auth-brand-panel::after { display: none; }
    .auth-brand-copy { display: none; }
    .auth-brand-panel > p:last-child { display: none; }
    .auth-form-panel { display: block; padding: 18px 14px calc(24px + env(safe-area-inset-bottom)); overflow: visible; }
    .auth-card { width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 18px; border-radius: 20px; box-shadow: none; }
    .auth-card-header { margin-bottom: 22px; }
    .auth-card-header h1 { font-size: 23px; }
    .auth-card-header p { font-size: 12px; line-height: 1.6; }
    .auth-input { height: 50px; font-size: 16px; }
    .auth-switch { margin-top: 18px; padding-bottom: 4px; }
}
