:root {
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
    --success: #15803d;
    --success-bg: #f0fdf4;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --touch: 44px;
    --bottom-nav-h: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem;
    min-height: 52px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    min-width: 0;
}

.brand-icon { color: var(--accent); font-size: 1.1rem; }
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-search {
    position: relative;
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.header-search input {
    padding-right: 2.75rem;
    background: var(--surface-2);
}

.header-search__btn {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 999px;
}

.header-search__btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.header-search__results {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.header-search__results.open { display: block; }

.header-search__item,
.header-search__empty {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.85rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.header-search__item:last-child,
.header-search__empty:last-child { border-bottom: none; }

.header-search__item:hover { background: var(--accent-soft); }
.header-search__item span,
.header-search__empty { color: var(--muted); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: var(--touch);
    height: var(--touch);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 0 8px;
}

.desktop-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0 1rem 0.65rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: var(--radius);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-icon { width: 1em; text-align: center; }

.user-badge {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.connection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
}

.connection-badge::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
}

.connection-badge--online {
    color: var(--success);
    background: var(--success-bg);
    border-color: #bbf7d0;
}

.connection-badge--offline {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #fecaca;
}

.connection-badge--unknown {
    color: var(--warning);
    background: var(--warning-bg);
    border-color: #fde68a;
}

/* Bottom nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.06);
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.25rem;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
}

.bottom-nav__item.active { color: var(--accent); }
.bottom-nav__icon { font-size: 1.1rem; }

.more-menu {
    display: none;
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 6px);
    right: 0.5rem;
    left: 0.5rem;
    max-width: 280px;
    margin-left: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 350;
    padding: 0.35rem;
}

.more-menu.open { display: block; }

.more-menu__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.more-menu__item:hover { background: var(--surface-2); }

/* Main */
.app-main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    padding-bottom: calc(1.25rem + var(--safe-bottom));
}

.page-head { margin-bottom: 1rem; }
.page-title { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.2rem; }
.page-subtitle { color: var(--muted); margin: 0; font-size: 0.9rem; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Grid */
.grid { display: grid; gap: 1rem; width: 100%; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.stat-value { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }

/* Shortcuts */
.shortcut-list { display: flex; flex-direction: column; gap: 0.5rem; }

.shortcut-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.shortcut-link:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.shortcut-link__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: var(--radius);
    color: var(--accent);
    flex-shrink: 0;
}

.shortcut-link__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.shortcut-link__text strong { font-size: 0.95rem; color: var(--text); }

/* Help */
.help-box {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--accent-soft);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    font-size: 0.875rem;
    position: relative;
}

.help-box p { margin: 0; flex: 1; }
.help-box__icon { color: var(--accent); margin-top: 0.1rem; }

.help-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem;
}

.step-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 2px;
}

.tab-btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    min-height: 38px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--danger); background: var(--danger-bg); }

.btn-sm { padding: 0.3rem 0.6rem; min-height: 32px; font-size: 0.8rem; }
.btn-lg { padding: 0.65rem 1.15rem; min-height: 42px; }
.btn-block { width: 100%; }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 0.85rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.form-row > * { flex: 1 1 140px; min-width: 0; }

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.field label i { margin-right: 0.25rem; color: var(--accent); }

input, select, textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
}

.input-lg {
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    min-height: 42px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

table.data-table th,
table.data-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table.data-table th {
    background: var(--surface-2);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Items */
.item-list { display: flex; flex-direction: column; gap: 0.5rem; }

.item-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
}

.item-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.item-card__title { margin: 0; font-size: 0.95rem; font-weight: 600; }
.item-card__meta { font-size: 0.8rem; color: var(--muted); margin: 0.25rem 0 0; }
.item-card__row { font-size: 0.85rem; margin-top: 0.35rem; }
.item-card__actions { display: flex; gap: 0.5rem; margin-top: 0.65rem; flex-wrap: wrap; }

.collapse-panel { display: none; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.collapse-panel.open { display: block; }

/* Stock colors */
.stock-ok { color: var(--success); font-weight: 500; }
.stock-low { color: var(--warning); font-weight: 500; }
.stock-critical { color: var(--danger); font-weight: 600; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-low { background: var(--warning-bg); color: var(--warning); }
.badge-critical { background: var(--danger-bg); color: var(--danger); }
.badge-high { background: var(--danger-bg); color: var(--danger); }
.badge-medium { background: var(--warning-bg); color: var(--warning); }
.badge-low-priority { background: var(--success-bg); color: var(--success); }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid;
}
.alert-error { background: var(--danger-bg); border-color: #fecaca; color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: #bbf7d0; color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: #fde68a; color: var(--warning); }

.alert-panel { border-left: 3px solid var(--danger); }

.chart-container {
    position: relative;
    width: 100%;
    height: 260px;
}

.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.app-footer {
    text-align: center;
    padding: 0.85rem;
    font-size: 0.75rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* ─── POS / Vente ─── */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 380px);
    gap: 1rem;
    align-items: start;
}

.pos-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.pos-panel--cart {
    position: sticky;
    top: 60px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
}

.pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.pos-cart-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cart-lines {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    max-height: 50vh;
}

.cart-empty {
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    padding: 2rem 0.5rem;
    margin: 0;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.cart-line:last-child { border-bottom: none; }

.cart-line__name { font-weight: 500; display: block; }
.cart-line__price { font-size: 0.75rem; color: var(--muted); }

.cart-line__qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.qty-btn:hover { background: var(--border); }

.qty-val {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.qty-input {
    width: 56px;
    min-width: 56px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: 0.45rem 0.25rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--surface);
    box-shadow: none;
}

.qty-input:focus {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.cart-line__sub {
    font-weight: 600;
    min-width: 4.5rem;
    text-align: right;
}

.cart-line__remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: var(--radius);
}

.cart-line__remove:hover { color: var(--danger); background: var(--danger-bg); }

.pos-checkout {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.cart-total-row strong { font-size: 1.25rem; font-weight: 600; }

.search-wrap { position: relative; }

.suggestions {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    max-height: 220px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover:not(.disabled) { background: var(--accent-soft); }
.suggestion-item.disabled { opacity: 0.45; cursor: not-allowed; }

.suggestion-item__meta { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.quick-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.quick-btn__name { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.quick-btn__meta { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }

.pos-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 500;
    padding: 0.6rem 1rem;
    background: var(--text);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.875rem;
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
    pointer-events: none;
    max-width: 90%;
}

.pos-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.pos-toast--error { background: var(--danger); }

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.login-card .brand-icon {
    display: block;
    text-align: center;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.login-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
}

.login-status {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-card .form-group { margin-bottom: 1rem; }
.login-card label { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.login-card .btn { width: 100%; margin-top: 0.25rem; }

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 2.8rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--surface-2);
    color: var(--text);
}

.notif-item { padding: 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.notif-item.unread { background: var(--accent-soft); }
.live-alerts { max-height: 40vh; overflow-y: auto; }

.hide-mobile { display: revert; }
.show-mobile { display: none; }

@media (max-width: 1024px) {
    .app-main {
        padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem);
    }
    .bottom-nav { display: flex; }
    .desktop-nav { display: none; }
    .desktop-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 0.75rem 1rem;
        box-shadow: var(--shadow);
    }
    .nav-toggle { display: flex; }
    .header-search { max-width: none; }
    .pos-layout { grid-template-columns: 1fr; }
    .pos-panel--cart {
        position: fixed;
        bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
        left: 0;
        right: 0;
        max-height: 45vh;
        z-index: 100;
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.1);
    }
    .pos-panel--search { padding-bottom: calc(45vh + 1rem); }
    .cart-line {
        grid-template-columns: 1fr auto auto;
        grid-template-areas:
            "info qty remove"
            "sub sub sub";
        align-items: start;
    }
    .cart-line__info { grid-area: info; }
    .cart-line__qty { grid-area: qty; }
    .cart-line__remove { grid-area: remove; }
    .cart-line__sub {
        grid-area: sub;
        text-align: left;
        padding-top: 0.25rem;
    }
}

@media (min-width: 1025px) {
    .bottom-nav, .more-menu { display: none !important; }
}

@media (max-width: 720px) {
    .header-row {
        flex-wrap: wrap;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
    .brand {
        flex: 1 1 auto;
    }
    .header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
    }
}
