/* =========================================================
   Fratelli Cafe — Итальянский ресторан в Оше
   Цветовая палитра: терракот, базилик, олива, крем
   ========================================================= */

:root {
    --cafe-primary: #2e7d32;          /* базилик */
    --cafe-primary-dark: #1b5e20;
    --cafe-primary-light: #66bb6a;
    --cafe-primary-lighter: #c8e6c9;

    --cafe-terracotta: #c1440e;       /* терракот — главный итальянский акцент */
    --cafe-terracotta-dark: #8b2e0c;
    --cafe-terracotta-light: #e57c4a;

    --cafe-gold: #d4a017;             /* золото */
    --cafe-cream: #fdf6e3;            /* крем */
    --cafe-cream-dark: #f5ecd1;

    --cafe-text: #2c1810;             /* кофейно-коричневый */
    --cafe-text-light: #6b4f3a;
    --cafe-text-muted: #9e8a76;
    --cafe-border: #e0d4ba;
    --cafe-bg: #faf6ee;
    --cafe-white: #ffffff;

    --cafe-success: #2e7d32;
    --cafe-danger: #c62828;
    --cafe-warning: #ef6c00;
    --cafe-info: #1565c0;

    --cafe-shadow: 0 4px 16px rgba(44, 24, 16, 0.08);
    --cafe-shadow-lg: 0 12px 32px rgba(44, 24, 16, 0.16);

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--cafe-text);
    background: var(--cafe-bg);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cafe-text);
    line-height: 1.25;
}

a { color: var(--cafe-terracotta); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cafe-terracotta-dark); }

/* =========================================================
   HEADER (админ-панель)
   ========================================================= */
.header {
    background: linear-gradient(135deg, #2c1810 0%, #4a2818 100%);
    color: #fff;
    padding: 14px 30px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--cafe-terracotta);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}
.logo {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}
.logo .accent { color: var(--cafe-terracotta-light); font-style: italic; }
.header-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.header-nav a {
    color: #f5e4d4;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all .2s;
    font-size: 14px;
    font-weight: 500;
}
.header-nav a:hover {
    background: rgba(193, 68, 14, 0.25);
    color: #fff;
}
.header-nav a.active {
    background: var(--cafe-terracotta);
    color: #fff;
}
.header-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.header-user span { color: #f5e4d4; }
.btn-logout {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all .2s;
}
.btn-logout:hover { background: var(--cafe-terracotta); border-color: var(--cafe-terracotta); }

/* =========================================================
   ПУБЛИЧНЫЙ HEADER
   ========================================================= */
.public-header {
    background: rgba(44, 24, 16, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 16px 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 160, 23, 0.3);
}
.public-header .header-content { max-width: 1300px; }
.public-header .logo { font-size: 28px; }
.public-header .header-nav a { color: #fff; font-size: 15px; padding: 8px 16px; }

/* =========================================================
   CONTAINER
   ========================================================= */
.container { max-width: 1400px; margin: 0 auto; padding: 30px; }
.container-public { max-width: 1300px; margin: 0 auto; padding: 30px; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.fade-in-up { animation: fadeInUp .6s ease both; }
.fade-in { animation: fadeIn .8s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* =========================================================
   CARDS
   ========================================================= */
.card {
    background: var(--cafe-white);
    border-radius: 12px;
    box-shadow: var(--cafe-shadow);
    padding: 28px;
    margin-bottom: 28px;
    border: 1px solid var(--cafe-border);
    transition: box-shadow .3s, transform .2s;
    animation: fadeInUp .5s ease both;
}
.card:hover { box-shadow: var(--cafe-shadow-lg); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--cafe-cream-dark);
    flex-wrap: wrap;
    gap: 12px;
}
.card-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--cafe-text);
    display: flex;
    align-items: center;
    gap: 12px;
}
.card-title .accent { color: var(--cafe-terracotta); font-style: italic; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all .25s ease;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--cafe-terracotta) 0%, var(--cafe-terracotta-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(193, 68, 14, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(193, 68, 14, 0.45);
    transform: translateY(-2px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--cafe-primary) 0%, var(--cafe-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}
.btn-success:hover { box-shadow: 0 6px 18px rgba(46, 125, 50, 0.45); transform: translateY(-2px); color:#fff; }

.btn-danger {
    background: linear-gradient(135deg, var(--cafe-danger) 0%, #8e1c1c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}
.btn-danger:hover { transform: translateY(-2px); color:#fff; }

.btn-secondary {
    background: var(--cafe-cream-dark);
    color: var(--cafe-text);
    border: 1px solid var(--cafe-border);
}
.btn-secondary:hover { background: var(--cafe-cream); border-color: var(--cafe-text-muted); }

.btn-gold {
    background: linear-gradient(135deg, var(--cafe-gold) 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); color:#fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 10px; }

/* =========================================================
   FORMS
   ========================================================= */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cafe-text);
    font-size: 14px;
}
.form-label .required { color: var(--cafe-danger); }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--cafe-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all .2s;
    background: var(--cafe-white);
    color: var(--cafe-text);
}
.form-control:focus {
    outline: none;
    border-color: var(--cafe-terracotta);
    box-shadow: 0 0 0 3px rgba(193, 68, 14, 0.12);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-checkbox { width: 18px; height: 18px; accent-color: var(--cafe-terracotta); cursor: pointer; }

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

/* =========================================================
   TABLES
   ========================================================= */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cafe-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--cafe-shadow);
}
.table thead {
    background: linear-gradient(135deg, var(--cafe-cream-dark) 0%, var(--cafe-cream) 100%);
}
.table th {
    padding: 14px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--cafe-text);
    border-bottom: 2px solid var(--cafe-terracotta);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--cafe-border);
    vertical-align: middle;
}
.table tbody tr {
    transition: background .15s;
}
.table tbody tr:hover { background: var(--cafe-cream); }
.table tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; padding: 50px 20px; color: var(--cafe-text-muted); font-style: italic; }

/* =========================================================
   BADGES
   ========================================================= */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-new { background: #e3f2fd; color: #1565c0; border:1px solid #90caf9; }
.badge-preparing { background: #fff3e0; color: #ef6c00; border:1px solid #ffb74d; }
.badge-ready { background: #e8f5e9; color: #2e7d32; border:1px solid #81c784; }
.badge-delivered { background: #e0f7fa; color: #00838f; border:1px solid #4dd0e1; }
.badge-completed { background: var(--cafe-primary); color: #fff; }
.badge-cancelled { background: #ffebee; color: #c62828; border:1px solid #ef9a9a; }
.badge-pending { background: #fff8e1; color: #f57f17; border:1px solid #ffd54f; }
.badge-confirmed { background: #e8f5e9; color: #2e7d32; border:1px solid #81c784; }
.badge-seated { background: #e8eaf6; color: #283593; border:1px solid #9fa8da; }
.badge-no_show { background: #ffebee; color: #c62828; border:1px solid #ef9a9a; }

.badge-hit { background: linear-gradient(135deg, var(--cafe-gold), #f4a93b); color:#fff; }
.badge-new-item { background: linear-gradient(135deg, var(--cafe-terracotta), var(--cafe-terracotta-light)); color:#fff; }
.badge-veg { background:#e8f5e9; color:#2e7d32; border:1px solid #81c784; }
.badge-spicy { background:#ffebee; color:#c62828; border:1px solid #ef9a9a; }

/* =========================================================
   STATS / DASHBOARD
   ========================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cafe-shadow);
    border-top: 4px solid var(--cafe-terracotta);
    position: relative;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    animation: fadeInUp .5s ease both;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(193, 68, 14, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.stat-card:hover { transform: translateY(-6px); box-shadow: var(--cafe-shadow-lg); }
.stat-card.green { border-top-color: var(--cafe-primary); }
.stat-card.green::before { background: radial-gradient(circle, rgba(46, 125, 50, 0.14) 0%, transparent 70%); }
.stat-card.gold { border-top-color: var(--cafe-gold); }
.stat-card.gold::before { background: radial-gradient(circle, rgba(212, 160, 23, 0.18) 0%, transparent 70%); }
.stat-card.blue { border-top-color: var(--cafe-info); }
.stat-card.blue::before { background: radial-gradient(circle, rgba(21, 101, 192, 0.14) 0%, transparent 70%); }

.stat-icon { font-size: 38px; margin-bottom: 14px; }
.stat-value {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    color: var(--cafe-text);
    margin-bottom: 6px;
    line-height: 1.1;
}
.stat-label {
    font-size: 12px;
    color: var(--cafe-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* =========================================================
   CHARTS
   ========================================================= */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
    margin-bottom: 28px;
}
.chart-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cafe-shadow);
    border: 1px solid var(--cafe-border);
}
.chart-card h3 { font-size: 18px; margin-bottom: 18px; color: var(--cafe-text); }
.chart-wrap { position: relative; height: 280px; }
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c1810 0%, #4a2818 60%, var(--cafe-terracotta-dark) 100%);
    position: relative;
    overflow: hidden;
}
.login-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(212,160,23,.15) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(193,68,14,.2) 0, transparent 40%);
    animation: fadeIn 1.2s ease both;
}
.login-box {
    background: #fff;
    border-radius: 18px;
    padding: 50px 45px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
    animation: fadeInUp .6s ease both;
}
.login-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--cafe-terracotta);
}
.login-title .accent { color: var(--cafe-primary); font-style: italic; }
.login-subtitle {
    text-align: center;
    color: var(--cafe-text-light);
    margin-bottom: 32px;
    font-size: 15px;
    font-style: italic;
}
.login-hint {
    background: var(--cafe-cream);
    border: 1px dashed var(--cafe-gold);
    color: var(--cafe-text-light);
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 16px 18px 16px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid var(--cafe-primary);
    min-width: 280px;
    animation: toastIn .4s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}
.toast.toast-hide { animation: toastOut .35s ease-in forwards; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); max-height: 200px; padding-top: 16px; padding-bottom: 16px; margin-bottom: 12px;}
    to   { opacity: 0; transform: translateX(120%); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
}
.toast .toast-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.toast .toast-body { flex: 1; min-width: 0; }
.toast .toast-title { font-weight: 700; margin-bottom: 2px; color: var(--cafe-text); font-size: 14px; }
.toast .toast-message { font-size: 13px; color: var(--cafe-text-light); line-height: 1.4; }
.toast .toast-close {
    background: none; border: none; cursor: pointer;
    color: var(--cafe-text-muted); font-size: 18px; padding: 0; line-height: 1;
    transition: color .15s;
}
.toast .toast-close:hover { color: var(--cafe-text); }
.toast::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0; height: 3px;
    background: var(--cafe-primary);
    width: 100%;
    animation: toastProgress 4.5s linear forwards;
    transform-origin: left;
}
.toast.toast-success { border-left-color: var(--cafe-primary); }
.toast.toast-success .toast-icon { background: #e8f5e9; color: var(--cafe-primary); }
.toast.toast-success::after { background: var(--cafe-primary); }

.toast.toast-error { border-left-color: var(--cafe-danger); }
.toast.toast-error .toast-icon { background: #ffebee; color: var(--cafe-danger); }
.toast.toast-error::after { background: var(--cafe-danger); }

.toast.toast-warning { border-left-color: var(--cafe-warning); }
.toast.toast-warning .toast-icon { background: #fff8e1; color: var(--cafe-warning); }
.toast.toast-warning::after { background: var(--cafe-warning); }

.toast.toast-info { border-left-color: var(--cafe-info); }
.toast.toast-info .toast-icon { background: #e3f2fd; color: var(--cafe-info); }
.toast.toast-info::after { background: var(--cafe-info); }

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
@media (max-width: 480px) {
    .toast-container { right: 12px; left: 12px; max-width: none; }
    .toast { min-width: 0; }
}

/* =========================================================
   STATIC ALERTS (inline, не плавающие)
   ========================================================= */
.messages { margin-bottom: 20px; }
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    animation: fadeInUp .4s ease both;
    border-left: 4px solid;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: var(--cafe-primary); }
.alert-error, .alert-danger { background: #ffebee; color: #b71c1c; border-color: var(--cafe-danger); }
.alert-warning { background: #fff8e1; color: #e65100; border-color: var(--cafe-warning); }
.alert-info { background: #e3f2fd; color: #0d47a1; border-color: var(--cafe-info); }

/* =========================================================
   RIPPLE EFFECT
   ========================================================= */
.btn { position: relative; overflow: hidden; }
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transform: scale(0);
    animation: ripple-anim .6s ease-out;
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* =========================================================
   COUNT-UP ANIMATION HELPER
   ========================================================= */
.counter { display: inline-block; }

/* =========================================================
   RECEIPT — кассовый чек
   ========================================================= */
.receipt {
    max-width: 360px;
    margin: 30px auto;
    background: #fff;
    padding: 28px 24px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.55;
    color: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    position: relative;
}
.receipt::before, .receipt::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 14px;
    background: radial-gradient(circle at 7px 0, transparent 7px, #fff 8px) repeat-x;
    background-size: 14px 14px;
}
.receipt::before { top: -7px; transform: rotate(180deg); }
.receipt::after  { bottom: -7px; }
.receipt-header { text-align: center; padding-bottom: 14px; border-bottom: 2px dashed #000; }
.receipt-header h1 {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    letter-spacing: 4px;
    margin: 0 0 4px;
    color: #000;
    font-weight: 900;
}
.receipt-header .sub { font-size: 11px; letter-spacing: 1px; }
.receipt-section { padding: 12px 0; border-bottom: 1px dashed #000; }
.receipt-section.no-border { border-bottom: none; }
.receipt-row { display: flex; justify-content: space-between; gap: 10px; }
.receipt-row .label { color: #333; }
.receipt-table { width: 100%; margin-top: 6px; }
.receipt-table .item-name { font-weight: 700; padding-top: 6px; }
.receipt-table .item-meta {
    display: flex; justify-content: space-between;
    font-size: 12px; color: #444; padding-bottom: 4px;
}
.receipt-total {
    font-size: 18px;
    font-weight: 900;
    padding: 12px 0;
    border-top: 2px dashed #000;
    border-bottom: 4px double #000;
    display: flex; justify-content: space-between;
    margin: 10px 0;
}
.receipt-footer { text-align: center; font-size: 11px; padding-top: 14px; }
.receipt-footer .thanks {
    font-size: 14px; font-weight: 700; margin: 6px 0;
    letter-spacing: 2px;
}
.receipt-barcode {
    font-family: 'Libre Barcode 39', monospace;
    font-size: 42px;
    text-align: center;
    margin: 8px 0 4px;
    letter-spacing: 0;
}
.receipt-barcode-text {
    text-align: center; font-size: 10px; letter-spacing: 3px;
}
.receipt-actions {
    text-align: center;
    margin: 30px auto;
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

@media print {
    body { background: #fff !important; }
    .header, .public-header, .footer, .receipt-actions, .messages, .toast-container { display: none !important; }
    main { padding: 0 !important; }
    .receipt {
        box-shadow: none !important;
        margin: 0 auto !important;
        padding: 10px 14px !important;
    }
    .receipt::before, .receipt::after { display: none; }
    @page { size: 80mm auto; margin: 4mm; }
}

/* =========================================================
   FILTERS
   ========================================================= */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-bar .form-control { flex: 1; min-width: 200px; }

/* =========================================================
   MENU ITEM CARD (admin & public)
   ========================================================= */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}
.menu-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--cafe-shadow);
    border: 1px solid var(--cafe-border);
    transition: all .3s;
    display: flex;
    flex-direction: column;
    animation: fadeInUp .5s ease both;
}
.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--cafe-shadow-lg);
    border-color: var(--cafe-terracotta-light);
}
.menu-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--cafe-cream) 0%, var(--cafe-cream-dark) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.menu-card-image::after {
    content: attr(data-emoji);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    opacity: .35;
}
.menu-card-image.has-image::after { display: none; }
.menu-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 2;
}
.menu-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.menu-card-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--cafe-text);
    margin-bottom: 6px;
}
.menu-card-desc {
    font-size: 13px;
    color: var(--cafe-text-light);
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
}
.menu-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--cafe-text-muted);
    margin-bottom: 12px;
}
.menu-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--cafe-cream-dark);
}
.menu-card-price {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--cafe-terracotta);
}

/* =========================================================
   CATEGORY HEADER
   ========================================================= */
.cat-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 24px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--cafe-terracotta);
}
.cat-header .icon {
    font-size: 38px;
    background: var(--cafe-cream);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--cafe-shadow);
}
.cat-header h3 {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--cafe-text);
    font-weight: 700;
}
.cat-header p { color: var(--cafe-text-light); font-style: italic; margin-top: 4px; }

/* =========================================================
   PUBLIC HOME / HERO
   ========================================================= */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(rgba(44,24,16,0.65), rgba(44,24,16,0.65)),
        url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
}
.hero-inner { max-width: 800px; animation: fadeInUp .8s ease both; }
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 78px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    line-height: 1.1;
}
.hero h1 .accent { color: var(--cafe-terracotta-light); font-style: italic; }
.hero .tagline {
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--cafe-cream);
    font-style: italic;
    margin-bottom: 12px;
}
.hero .desc {
    font-size: 16px;
    color: #f5e4d4;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.section { padding: 80px 30px; }
.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 44px);
    text-align: center;
    margin-bottom: 12px;
    color: var(--cafe-text);
}
.section-title .accent { color: var(--cafe-terracotta); font-style: italic; }
.section-subtitle {
    text-align: center;
    color: var(--cafe-text-light);
    font-style: italic;
    margin-bottom: 50px;
    font-size: 17px;
}
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 50px;
    max-width: 200px;
}
.section-divider::before, .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cafe-border);
}
.section-divider::before { margin-right: 12px; }
.section-divider::after { margin-left: 12px; }
.section-divider span { color: var(--cafe-terracotta); font-size: 18px; }

.bg-cream { background: var(--cafe-cream); }
.bg-dark { background: linear-gradient(135deg, #2c1810 0%, #4a2818 100%); color: #fff; }
.bg-dark .section-title, .bg-dark .section-subtitle { color: #fff; }

/* About / Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--cafe-shadow);
    transition: transform .3s;
    animation: fadeInUp .6s ease both;
}
.feature-card:hover { transform: translateY(-6px); }
.feature-card .icon {
    font-size: 50px;
    margin-bottom: 16px;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
}
.feature-card h4 { font-size: 20px; margin-bottom: 10px; }
.feature-card p { color: var(--cafe-text-light); font-size: 14px; }

/* Categories grid (public) */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.cat-tile {
    background: #fff;
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--cafe-shadow);
    border: 1px solid var(--cafe-border);
    transition: all .3s;
    cursor: pointer;
    animation: fadeInUp .5s ease both;
    text-decoration: none;
    color: inherit;
    display: block;
}
.cat-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--cafe-shadow-lg);
    border-color: var(--cafe-terracotta-light);
    color: inherit;
}
.cat-tile .icon { font-size: 56px; margin-bottom: 14px; display: block; }
.cat-tile h4 { font-size: 20px; margin-bottom: 6px; }
.cat-tile p { color: var(--cafe-text-light); font-size: 13px; }

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
}
.review-card {
    background: #fff;
    border-radius: 14px;
    padding: 26px;
    box-shadow: var(--cafe-shadow);
    border: 1px solid var(--cafe-border);
    border-left: 4px solid var(--cafe-gold);
    animation: fadeInUp .5s ease both;
}
.review-stars { color: var(--cafe-gold); font-size: 20px; margin-bottom: 10px; letter-spacing: 2px; }
.review-title { font-family: var(--font-display); font-size: 19px; margin-bottom: 8px; font-weight: 700; }
.review-text { color: var(--cafe-text-light); line-height: 1.6; margin-bottom: 14px; font-style: italic; }
.review-author { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--cafe-text-muted); border-top: 1px dashed var(--cafe-border); padding-top: 12px; }

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a0f08 0%, #2c1810 100%);
    color: #e8d9c5;
    padding: 50px 30px 24px;
    margin-top: 0;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer h4 { color: var(--cafe-terracotta-light); font-size: 16px; margin-bottom: 14px; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer a { color: #e8d9c5; display: block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: var(--cafe-terracotta-light); }
.footer p { font-size: 14px; line-height: 1.7; color: #c4b29d; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 13px; color: #9c8a76; }
@media (max-width: 800px) { .footer-content { grid-template-columns: 1fr; gap: 24px; } }

/* =========================================================
   ORDER CREATE
   ========================================================= */
.order-summary {
    position: sticky;
    bottom: 0;
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, var(--cafe-cream-dark) 0%, var(--cafe-cream) 100%);
    border-radius: 14px;
    border: 2px solid var(--cafe-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(212, 160, 23, 0.2);
    flex-wrap: wrap;
    gap: 16px;
}
.order-summary .total-label { font-size: 14px; color: var(--cafe-text-light); text-transform: uppercase; letter-spacing: 1px; }
.order-summary .total-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--cafe-terracotta);
}

.menu-item-pick {
    border: 2px solid var(--cafe-border);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    transition: all .2s;
    display: flex;
    gap: 12px;
    align-items: center;
}
.menu-item-pick:hover { border-color: var(--cafe-terracotta-light); box-shadow: 0 4px 12px rgba(193, 68, 14, .12); }
.menu-item-pick.selected { border-color: var(--cafe-terracotta); background: #fff8f4; }

/* =========================================================
   CONFIRM DELETE
   ========================================================= */
.confirm-box {
    max-width: 560px;
    margin: 60px auto;
    text-align: center;
    padding: 40px;
}
.confirm-box .icon { font-size: 64px; margin-bottom: 18px; }
.confirm-box h2 { margin-bottom: 12px; }
.confirm-box p { color: var(--cafe-text-light); margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* =========================================================
   UTILITIES
   ========================================================= */
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 32px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px } .mb-4 { margin-bottom: 32px }
.text-center { text-align: center } .text-right { text-align: right } .text-muted { color: var(--cafe-text-muted) }
.text-success { color: var(--cafe-success) } .text-danger { color: var(--cafe-danger) }
.flex { display: flex } .flex-1 { flex: 1 } .gap-1 { gap: 8px } .gap-2 { gap: 16px } .gap-3 { gap: 24px }
.items-center { align-items: center } .justify-between { justify-content: space-between }

.divider-vertical { width: 1px; background: var(--cafe-border); margin: 0 8px; align-self: stretch; }

/* Two-column layout */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 768px) { .row { grid-template-columns: 1fr; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .header-content { flex-wrap: wrap; }
    .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header { padding: 12px 16px; }
    .header-content { flex-direction: column; gap: 12px; }
    .header-nav { justify-content: center; flex-wrap: wrap; }
    .container, .container-public { padding: 18px; }
    .card { padding: 20px; }
    .card-title { font-size: 22px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stat-card { padding: 18px; }
    .stat-value { font-size: 26px; }
    .menu-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 10px 8px; }
    .hero { background-attachment: scroll; }
}
@media (max-width: 480px) {
    .stats-grid, .menu-grid { grid-template-columns: 1fr; }
    .login-box { padding: 30px 24px; }
}
