﻿:root {
    --bg: #f3f0f4;
    --bg-accent: #e8e2ea;
    --card: #ffffff;
    --surface: #faf9fc;
    --text: #1a1520;
    --muted: #6b6570;
    --main: #8b2d45;
    --main-dark: #5c1a2e;
    --main-light: #a83d5c;
    --accent: #c45c7a;
    --accent-soft: #f0dce4;
    --wine: #7b2438;
    --wine-dark: #4a1222;
    --green: #0d9488;
    --red: #e11d48;
    --amber: #d97706;
    --blue: #4f46e5;
    --violet: #7c3aed;
    --border: #e4dde8;
    --shadow: 0 4px 24px rgba(74, 18, 34, 0.08);
    --shadow-lg: 0 12px 40px rgba(74, 18, 34, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    direction: rtl;
    font-family: inherit;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(ellipse 90% 60% at 100% 0%, rgba(139, 45, 69, 0.07), transparent 55%),
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(124, 58, 237, 0.05), transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, #faf8fb 100%);
    min-height: 100vh;
}

body::before {
    display: none;
}

h1, h2, h3, h4 {
    font-weight: 800;
    color: var(--main-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

a:hover,
a:focus-visible {
    opacity: 0.85;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 clamp(12px, 2.5vw, 24px);
    height: 60px;
    background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 45%, var(--main) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(74, 18, 34, 0.25);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    padding-left: clamp(20px, 3vw, 40px);
    border-left: 1px solid rgba(255,255,255,0.15);
    margin-left: auto;
    line-height: 56px;
    height: 56px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px;
}

.brand:hover { opacity: 0.85; }

.settings-card {
    max-width: 560px;
    margin: 0 auto;
}

.settings-logo-block {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.settings-logo-preview {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.settings-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.settings-logo-change {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 11px;
    text-align: center;
    padding: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.settings-logo-placeholder {
    text-align: center;
    color: var(--muted);
}

.settings-logo-placeholder span {
    font-size: 40px;
    display: block;
    margin-bottom: 6px;
}

.settings-logo-placeholder p {
    margin: 0;
    font-size: 13px;
}

.settings-logo-meta {
    flex: 1;
    min-width: 180px;
}

.settings-remove-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--red);
    cursor: pointer;
}

.topbar nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 60px;
    padding: 0 clamp(12px, 1.8vw, 18px);
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-ico {
    font-size: 15px;
    line-height: 1;
    opacity: 0.95;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.nav-link.active {
    color: #fff;
    border-bottom-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-logout {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    margin-right: auto;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    transition: background 0.2s, color 0.2s;
}

.nav-logout:hover {
    background: rgba(220,38,38,0.25);
    border-color: rgba(220,38,38,0.4);
    color: #fff;
}

.nav-menu-btn {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    margin-right: 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.nav-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    opacity: 1;
}

.container {
    width: min(1200px, 94%);
    margin: clamp(18px, 3vw, 30px) auto;
    padding: 0 clamp(10px, 2vw, 18px);
}

.section-heading {
    margin: 0 0 20px;
    font-size: clamp(22px, 3.6vw, 30px);
    font-weight: 800;
    color: var(--main-dark);
}

.section-heading.center {
    text-align: center;
}

.section-heading.center small {
    margin-top: 10px;
}

.section-heading small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 500;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(18px, 2.5vw, 26px);
}

.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: clamp(20px, 3vw, 32px);
}

.qs-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    border-right: 4px solid var(--main);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow);
}

.qs-item strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--wine);
}

.qs-item.green {
    border-right-color: var(--green);
}

.qs-item.green strong {
    color: var(--green);
}

.qs-item.green strong {
    color: var(--green);
}

.table-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: clamp(16px, 2.5vw, 24px);
    flex-wrap: wrap;
}

.tab-btn {
    font-family: inherit;
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--main-dark);
    border-color: var(--accent-soft);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--main) 0%, var(--wine) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(123, 36, 56, 0.35);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.actions.center {
    justify-content: center;
}

.card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 26px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card.form-card {
    max-width: 520px;
    margin: 0 auto;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(139, 45, 69, 0.04), transparent 60%);
    pointer-events: none;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h2,
.card h3 {
    margin-top: 0;
    color: var(--main-dark);
}

.muted {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.stat {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 900;
    color: var(--main);
    margin: 12px 0 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    color: var(--main-dark);
    font-size: 13px;
    font-weight: 600;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: clamp(14px, 2.5vw, 22px);
}

.table-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(20px, 3vw, 26px) 16px;
    min-height: 200px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.table-card::after {
    content: "";
    position: absolute;
    inset: auto -36px -50px auto;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}

.table-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-lg);
}

.table-card.free { background: linear-gradient(145deg, #0f9d76 0%, #34d399 100%); }
.table-card.busy { background: linear-gradient(145deg, var(--wine) 0%, var(--accent) 100%); }
.table-card.maintenance { background: linear-gradient(145deg, #991b1b 0%, #f87171 100%); }

.table-card.warning {
    background: linear-gradient(145deg, #c2410c 0%, #fb923c 100%) !important;
    animation: pulse-warn 1.2s ease-in-out infinite;
}

.table-card.expired {
    background: linear-gradient(145deg, #7f1d1d 0%, #dc2626 100%) !important;
    animation: pulse-expired 0.8s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(220,38,38,0.5);
}

@keyframes pulse-warn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes pulse-expired {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(220,38,38,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(220,38,38,0.7); }
}

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.table-card h3 {
    margin: 4px 0 0;
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 900;
    color: #fff;
}

.table-card .badge {
    background: rgba(255,255,255,0.22);
    color: #fff;
    margin-top: 6px;
    font-size: 11px;
    padding: 4px 10px;
}

.table-timer {
    display: block;
    margin-top: 8px;
    font-size: 17px;
    font-weight: 800;
    color: rgba(255,255,255,0.95);
    font-variant-numeric: tabular-nums;
}
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(145deg, var(--main) 0%, var(--wine) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
    box-shadow: 0 3px 12px rgba(123, 36, 56, 0.28);
    min-height: 42px;
    line-height: 1.2;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    opacity: 1;
}

.btn.secondary {
    background: #fff;
    color: var(--wine-dark);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn.secondary:hover {
    background: var(--surface);
    border-color: var(--main-light);
}

.btn.green {
    background: linear-gradient(145deg, #0d9488 0%, #14b8a6 100%);
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.3);
}

.btn.red {
    background: linear-gradient(145deg, #e11d48 0%, #f43f5e 100%);
    box-shadow: 0 3px 12px rgba(225, 29, 72, 0.3);
}

.btn.amber {
    background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 3px 12px rgba(217, 119, 6, 0.3);
    color: #fff;
}

.btn.light {
    background: #f8f6fa;
    color: var(--wine-dark);
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn.blue {
    background: linear-gradient(145deg, var(--blue) 0%, #6366f1 100%);
    box-shadow: 0 3px 12px rgba(79, 70, 229, 0.3);
    color: #fff;
}

.btn.violet {
    background: linear-gradient(145deg, var(--violet) 0%, #8b5cf6 100%);
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.3);
    color: #fff;
}

.btn.wide {
    min-width: 200px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.form {
    display: grid;
    gap: 18px;
}

.form label {
    font-weight: 700;
    color: var(--main-dark);
    margin-bottom: 6px;
}

.input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    background: var(--surface);
    font-size: 16px;
    font-family: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--main);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139, 45, 69, 0.15);
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.expense-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.expense-filter input,
.expense-filter select {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
}

.expense-filter .btn {
    padding: 9px 20px;
}

.expense-filter .expense-total {
    margin-right: auto;
    font-size: 15px;
    color: var(--muted);
}

.expense-filter .expense-total strong {
    color: var(--red);
    font-size: 18px;
    font-weight: 800;
}

.expense-filter input[type="search"] {
    min-width: 180px;
    flex: 1;
}

.nowrap-actions {
    white-space: nowrap;
}

/* فاتورة مشتريات — نموذج مبسّط */
.purchase-form-simple {
    max-width: 520px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 26px;
}

.pf-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: var(--main-dark);
}

.pf-form .pf-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 12px 0 4px;
}

.pf-opt {
    font-weight: 400;
    font-size: 12px;
}

.pf-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}

.pf-input:focus {
    outline: none;
    border-color: var(--main);
}

.pf-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pf-section {
    margin: 20px 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.pf-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 2px;
}

.pf-line {
    display: grid;
    grid-template-columns: 1fr 72px 80px 36px;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.pf-line .pf-input {
    padding: 8px 10px;
    font-size: 14px;
}

.pf-add {
    border: none;
    background: none;
    color: var(--main);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 14px;
    font-family: inherit;
}

.pf-add:hover {
    text-decoration: underline;
}

.pf-del {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.pf-del:hover {
    color: var(--red);
}

.pf-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 6px;
    font-size: 15px;
}

.pf-sum strong {
    font-size: 22px;
    color: var(--main-dark);
}

.pf-discount {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.pf-discount-in {
    width: 72px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
}

.pf-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.pf-actions .btn {
    flex: 1;
}

@media (max-width: 480px) {
    .pf-row-2 {
        grid-template-columns: 1fr;
    }

    .pf-line {
        grid-template-columns: 1fr 1fr 36px;
        grid-template-rows: auto auto;
    }

    .pf-line .pf-input:first-child {
        grid-column: 1 / 3;
    }

    .pf-line .pf-qty {
        grid-column: 1;
    }

    .pf-line .pf-price {
        grid-column: 2;
    }

    .pf-del {
        grid-row: 1 / 3;
        grid-column: 3;
        align-self: center;
    }
}

.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.report-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.report-card .rc-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

.report-card .rc-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--main-dark);
}

.report-card.sales .rc-value { color: var(--green); }
.report-card.expenses .rc-value { color: var(--red); }
.report-card.purchases .rc-value { color: var(--violet); }

.report-card .rc-meta {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.report-card .rc-link {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--main);
}

.report-net {
    text-align: center;
    padding: 22px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--accent-soft);
}

.report-net.positive { border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.06); }
.report-net.negative { border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.06); }

.report-net-label {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--main-dark);
}

.report-net-hint {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 10px;
}

.report-net-value {
    font-size: 32px;
    font-weight: 900;
}

.report-net.positive .report-net-value { color: var(--green); }
.report-net.negative .report-net-value { color: var(--red); }

.report-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.report-pagination .rp-info {
    font-size: 14px;
    color: var(--muted);
}

.report-pagination .rp-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.report-pagination .rp-btn {
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.report-pagination .rp-btn:hover {
    background: var(--main);
    color: #fff;
    border-color: var(--main);
}

.report-pagination .rp-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding: 0 6px;
}

.purchase-receipt .receipt-sub {
    color: var(--muted);
    margin-top: -8px;
}

.purchase-receipt .receipt-notes {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}

.session-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.session-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.session-title h2 { margin: 0; font-size: 24px; }
.session-title h2 .muted { font-size: 18px; font-weight: 500; }

.session-type-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 28px;
    color: #fff;
}
.session-type-icon.billiard { background: linear-gradient(145deg, #b45309 0%, #fbbf24 100%); }
.session-type-icon.coffee { background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%); }

.status-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.status-tag.open { background: rgba(15,157,118,0.15); color: var(--green); }
.status-tag.closed { background: rgba(127,109,99,0.15); color: var(--muted); }
.status-tag.cancelled { background: rgba(220,73,73,0.15); color: var(--red); }

.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.timer-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    border-radius: var(--radius);
    margin-bottom: 22px;
    background: linear-gradient(135deg, var(--green) 0%, #18c29c 100%);
    color: #fff;
    box-shadow: var(--shadow);
    transition: background 0.3s ease;
}

.timer-banner.warning { background: linear-gradient(135deg, #c2410c 0%, #fb923c 100%); animation: pulse-warn 1.4s ease-in-out infinite; }
.timer-banner.expired { background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%); animation: pulse-expired 1s ease-in-out infinite; }

.timer-left { display: flex; flex-direction: column; }
.timer-label { font-size: 14px; opacity: 0.9; }
.timer-clock { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer-meta { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 14px; opacity: 0.95; }
.timer-meta strong { font-size: 16px; }

.session-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.info-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
}

.info-box.highlight {
    background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%);
    border-color: transparent;
    color: #fff;
}

.info-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.info-box.highlight .info-label { color: rgba(255,255,255,0.8); }
.info-value { font-size: 22px; font-weight: 800; color: var(--text); }
.info-box.highlight .info-value { color: #fff; }
.info-value.big { font-size: 28px; }
.info-sub { font-size: 13px; color: var(--muted); }

.quick-add-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.chip {
    font-family: inherit;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--main-dark);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.image-upload input[type="file"] { display: none; }

.preview-box {
    width: 140px;
    height: 140px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-box:hover {
    border-color: var(--accent);
    background: var(--bg-accent);
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.preview-box .placeholder {
    font-size: 32px;
    color: var(--muted);
    text-align: center;
}

.preview-box .remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.preview-box .remove-img:hover {
    transform: scale(1.1);
}

.prod-img-cell {
    width: 60px;
    padding: 6px;
}

.prod-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.prod-thumb.placeholder {
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--muted);
}

.menu-url-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
}

.menu-url-box code {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    background: var(--card);
    border-radius: 8px;
    font-size: 13px;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.booking-summary {
    text-align: center;
    padding: 14px 20px;
    border-radius: 14px;
    background: var(--bg-accent);
    font-size: 17px;
    font-weight: 600;
    color: var(--main-dark);
    margin: 4px 0 10px;
}

.booking-summary strong {
    font-size: 24px;
    font-weight: 900;
    color: var(--main);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: calc(var(--radius) + 6px);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 100%);
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.data-table th {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: rgba(139, 45, 69, 0.04);
}

.alert {
    padding: 16px 22px;
    border-radius: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(15,157,118,0.12);
    border-color: rgba(15,157,118,0.25);
    color: #046c4a;
}

.alert.error {
    background: rgba(220,73,73,0.12);
    border-color: rgba(220,73,73,0.26);
    color: #8f1f1f;
}
.login-box {
    max-width: 420px;
    margin: 80px auto;
    padding: 40px 36px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--wine);
}

.total-box {
    background: var(--accent-soft);
    border: 1px solid rgba(139, 45, 69, 0.2);
    border-radius: var(--radius);
    padding: 20px;
}

.big-total {
    font-size: 34px;
    font-weight: 900;
    color: var(--main-dark);
    margin-top: 12px;
}

.receipt {
    background: var(--card);
    border: 2px dashed rgba(139, 45, 69, 0.25);
    padding: 34px;
    max-width: 480px;
    margin: 0 auto;
    border-radius: calc(var(--radius) + 8px);
    box-shadow: var(--shadow);
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 34px;
    margin-top: 60px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0 12px;
    }

    .brand {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .topbar nav {
        width: 100%;
        overflow-x: auto;
        padding: 6px 0;
    }

    .nav-link { height: 40px; font-size: 13px; }

    .nav-menu-btn {
        margin-right: 0;
        margin-bottom: 6px;
    }

    .nav-logout {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .actions {
        justify-content: flex-start;
    }

    .card,
    .table-card {
        padding: 20px;
    }

    .login-box {
        margin: 70px 16px;
        padding: 40px 28px;
    }
}

@media (max-width: 520px) {
    .nav-link {
        padding: 0 12px;
        font-size: 12px;
    }

    .actions {
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
}

@media print {
    .topbar,
    .footer,
    .actions,
    .hide-print {
        display: none !important;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .receipt {
        border: 0;
        max-width: 100%;
        padding: 0;
        box-shadow: none;
    }
}
