/* ═══════════════════════════════════════════════════
   Pepina — Fresh & Playful Design System
   ═══════════════════════════════════════════════════ */

:root {
    --orange: #FF6B35;
    --teal: #2EC4B6;
    --red: #E63946;
    --purple: #9B5DE5;
    --blue: #0096C7;
    --bg: #FFFBF5;
    --card: #FFFFFF;
    --border: #F0EBE3;
    --text: #2D2D2D;
    --text-light: #888;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.04);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--bg); color: var(--text);
    line-height: 1.5; overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }

/* ── Color Bar ─────────────────────────────────────── */

.color-bar {
    height: 5px;
    background: repeating-linear-gradient(90deg,
        var(--orange) 0px, var(--orange) 20px,
        var(--teal) 20px, var(--teal) 40px,
        var(--red) 40px, var(--red) 60px,
        var(--purple) 60px, var(--purple) 80px);
}

/* ── Navbar ────────────────────────────────────────── */

.navbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--border);
}
.navbar-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 68px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 42px; height: 42px; border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white; font-weight: 900;
    transform: rotate(-3deg); box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}
.logo-text { font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -0.5px; }
.logo-sub { font-size: 10px; color: var(--orange); font-weight: 700; letter-spacing: 1px; }

.nav-links { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 14px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700; color: var(--text-light); transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { background: #FFF5F0; color: var(--orange); }

.nav-right { display: flex; align-items: center; gap: 8px; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 13px; font-weight: 700; color: var(--text); }

.btn-ghost {
    padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
    color: var(--text-light); transition: all 0.2s; border: none; background: none; cursor: pointer;
}
.btn-ghost:hover { background: #FFF5F0; color: var(--orange); }

.cart-btn {
    position: relative; background: linear-gradient(135deg, var(--orange), var(--red));
    color: white; border: none; border-radius: 14px; width: 44px; height: 44px;
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(255,107,53,0.3); transition: transform 0.2s;
}
.cart-btn:hover { transform: scale(1.08) rotate(2deg); }

.cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--text); color: white; font-size: 11px; font-weight: 900;
    min-width: 20px; height: 20px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; border: 2px solid white;
}

/* ── Mobile Nav ────────────────────────────────────── */

.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 2px solid var(--border); padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
}
.mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 20px; background: none; border: none; cursor: pointer;
    color: var(--text-light); transition: color 0.2s; padding: 4px 12px;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--orange); }
.mobile-nav-label { font-size: 10px; font-weight: 800; }
.cart-badge-m {
    position: absolute; top: -4px; right: -8px;
    background: var(--red); color: white; font-size: 10px; font-weight: 900;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}

@media (max-width: 768px) {
    .nav-links, .user-menu { display: none; }
    .mobile-nav { display: flex; }
    .main-content { padding-bottom: 80px; }
}

/* ── Cart Drawer ───────────────────────────────────── */

.cart-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3);
    z-index: 50; backdrop-filter: blur(4px);
}
.cart-overlay.open { display: block; }

.cart-drawer {
    position: fixed; top: 0; right: -420px; width: 400px; max-width: 90vw;
    height: 100vh; background: white; z-index: 60;
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 2px solid var(--border); flex-shrink: 0;
}
.cart-title { font-size: 20px; font-weight: 900; }
.cart-close {
    width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--border);
    background: none; font-size: 22px; cursor: pointer; color: var(--text-light);
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.cart-close:hover { background: #FFF5F0; color: var(--red); border-color: var(--red); }

/* ── Main Content ──────────────────────────────────── */

.main-content {
    max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px;
    min-height: calc(100vh - 200px);
}

/* ── Hero ──────────────────────────────────────────── */

.hero { text-align: center; padding: 40px 0 32px; position: relative; }
.hero-date {
    display: inline-block; background: white; border: 2px dashed var(--border);
    border-radius: 16px; padding: 6px 18px; font-size: 13px; font-weight: 700;
    color: var(--orange); margin-bottom: 16px; transform: rotate(-1.5deg);
}
.hero h1 { font-size: 40px; font-weight: 900; color: var(--text); line-height: 1.1; margin-bottom: 8px; }
.hero h1 span { color: var(--orange); }
.hero-sub { font-size: 16px; color: var(--text-light); font-weight: 600; }
.hero-sub strong { color: var(--red); }

/* ── Countdown ─────────────────────────────────────── */

.countdown {
    display: inline-flex; gap: 12px; margin-top: 20px; background: white;
    padding: 14px 24px; border-radius: 20px;
    box-shadow: var(--shadow); border: 2px solid var(--border);
}
.countdown-item { text-align: center; }
.countdown-val {
    font-size: 26px; font-weight: 900; color: var(--text);
    background: #FFF5F0; border-radius: 10px; padding: 2px 10px; min-width: 44px;
}
.countdown-label { font-size: 10px; color: var(--text-light); font-weight: 700; margin-top: 4px; }

.cutoff-banner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #FFF0EB; border: 2px solid #FFD6C7; border-radius: var(--radius);
    padding: 16px 24px; margin: 20px auto; max-width: 500px;
    font-weight: 700; color: var(--red);
}

/* ── Category Filters ──────────────────────────────── */

.filters { display: flex; justify-content: center; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-btn {
    padding: 10px 18px; border-radius: 14px; border: 2px solid var(--border);
    background: white; color: #666; cursor: pointer; font-size: 13px; font-weight: 800;
    font-family: inherit; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--orange); color: var(--orange); }
.filter-btn.active {
    background: var(--orange); color: white; border-color: var(--orange);
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 4px 16px rgba(255,107,53,0.3);
}

/* ── Menu Grid ─────────────────────────────────────── */

.menu-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}

.menu-card {
    background: white; border-radius: 20px; overflow: hidden;
    border: 2px solid var(--border); transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: var(--shadow);
}
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.menu-card.in-cart { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }

.card-img {
    width: 100%; height: 160px;
    background-size: cover; background-position: center;
    border-bottom: 2px solid var(--border);
}

.card-color-bar { height: 4px; }
.card-body { padding: 20px; }
.card-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.card-emoji {
    font-size: 32px; width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.card-cat { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.card-name { font-size: 19px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.card-desc { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 16px; }

.card-bottom { display: flex; justify-content: space-between; align-items: center; }
.card-price { background: #FFF5F0; padding: 6px 14px; border-radius: var(--radius-sm); }
.card-price-val { font-size: 22px; font-weight: 900; color: var(--text); }
.card-price-cur { font-size: 12px; color: var(--text-light); margin-left: 2px; }

.btn-add {
    border: 2px solid; border-radius: 14px; padding: 8px 16px;
    cursor: pointer; font-size: 13px; font-weight: 800;
    font-family: inherit; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
    background: transparent;
}
.btn-add:hover { transform: scale(1.05); }
.btn-add.in-cart { color: white !important; }

/* ── Cart Panel ────────────────────────────────────── */

.cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }

.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 15px; font-weight: 800; }
.cart-item-price { font-size: 13px; color: var(--text-light); font-weight: 600; }

.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
    width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--border);
    background: none; font-size: 16px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; color: var(--text); transition: all 0.2s;
}
.qty-btn:hover { background: #FFF5F0; border-color: var(--orange); color: var(--orange); }
.qty-val { font-size: 16px; font-weight: 900; min-width: 20px; text-align: center; }

.cart-footer {
    padding: 20px 24px; border-top: 2px solid var(--border); background: #FAFAFA; flex-shrink: 0;
}
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-size: 16px; font-weight: 700; color: var(--text-light); }
.cart-total-val { font-size: 24px; font-weight: 900; }

.btn-primary {
    display: block; width: 100%; padding: 14px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: white; font-size: 16px; font-weight: 800; cursor: pointer;
    font-family: inherit; box-shadow: 0 4px 16px rgba(255,107,53,0.3);
    transition: all 0.2s; text-align: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: block; width: 100%; padding: 12px; border: 2px solid var(--border);
    border-radius: 14px; background: white; color: var(--text-light);
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
    margin-top: 8px; transition: all 0.2s; text-align: center;
}
.btn-secondary:hover { border-color: var(--red); color: var(--red); }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-light); }
.cart-empty-icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty-text { font-size: 16px; font-weight: 700; }

/* ── Forms ─────────────────────────────────────────── */

.form-card {
    max-width: 560px; margin: 40px auto; background: white;
    border-radius: 20px; padding: 36px; border: 2px solid var(--border);
    box-shadow: var(--shadow);
}
.form-title { font-size: 28px; font-weight: 900; text-align: center; margin-bottom: 8px; }
.form-sub { font-size: 14px; color: var(--text-light); text-align: center; margin-bottom: 28px; font-weight: 600; }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: 12px; font-size: 15px; font-family: inherit;
    transition: border-color 0.2s; background: #FAFAFA;
}
.form-input:focus { outline: none; border-color: var(--orange); background: white; }
textarea.form-input { resize: vertical; min-height: 80px; }

.form-error {
    background: #FFF0EB; border: 2px solid #FFD6C7; color: var(--red);
    padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 14px;
    margin-bottom: 16px; text-align: center;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.radio-group { display: flex; gap: 8px; }
.radio-btn {
    flex: 1; padding: 12px; border: 2px solid var(--border); border-radius: 12px;
    background: white; cursor: pointer; text-align: center; font-weight: 700;
    font-size: 14px; font-family: inherit; transition: all 0.2s;
}
.radio-btn.active { border-color: var(--orange); background: #FFF5F0; color: var(--orange); }

.form-link { text-align: center; margin-top: 20px; font-size: 14px; font-weight: 600; }
.form-link a { color: var(--orange); font-weight: 800; }

/* ── Confirmation ──────────────────────────────────── */

.confirm-card {
    max-width: 500px; margin: 60px auto; text-align: center;
    background: white; border-radius: 24px; padding: 48px 36px;
    border: 2px solid var(--border); box-shadow: var(--shadow);
}
.confirm-icon { font-size: 64px; margin-bottom: 16px; }
.confirm-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.confirm-sub { font-size: 15px; color: var(--text-light); font-weight: 600; margin-bottom: 24px; }
.confirm-id {
    display: inline-block; background: #FFF5F0; border-radius: 12px;
    padding: 8px 20px; font-size: 20px; font-weight: 900; color: var(--orange); margin-bottom: 24px;
}

/* ── Orders ────────────────────────────────────────── */

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    background: white; border-radius: var(--radius); padding: 20px;
    border: 2px solid var(--border); box-shadow: var(--shadow); transition: box-shadow 0.2s;
}
.order-card:hover { box-shadow: var(--shadow-hover); }
.order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.order-id { font-size: 18px; font-weight: 900; }
.order-status { padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.order-items { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; }
.order-date { font-size: 13px; color: var(--text-light); font-weight: 600; }
.order-total { font-size: 18px; font-weight: 900; }

/* ── Admin ─────────────────────────────────────────── */

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-title { font-size: 28px; font-weight: 900; }

.admin-nav { display: flex; gap: 4px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-nav-link {
    padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
    color: var(--text-light); transition: all 0.2s;
}
.admin-nav-link:hover, .admin-nav-link.active { background: var(--orange); color: white; }

.admin-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: white; border-radius: var(--radius); overflow: hidden;
    border: 2px solid var(--border); box-shadow: var(--shadow);
}
.admin-table th {
    background: #FAFAFA; padding: 14px 16px; text-align: left;
    font-size: 12px; font-weight: 800; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border);
}
.admin-table td {
    padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #FFFBF5; }

.btn-sm {
    padding: 6px 12px; border-radius: 8px; border: 2px solid var(--border);
    background: white; font-size: 12px; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.btn-sm:hover { border-color: var(--orange); color: var(--orange); }
.btn-sm.danger:hover { border-color: var(--red); color: var(--red); }
.btn-sm.success { background: var(--teal); color: white; border-color: var(--teal); }

/* ── Weekly tabs ───────────────────────────────────── */

.week-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.week-tab {
    padding: 10px 16px; border-radius: 14px; border: 2px solid var(--border);
    background: white; cursor: pointer; text-align: center;
    font-weight: 800; font-size: 14px; font-family: inherit; transition: all 0.2s; min-width: 80px;
}
.week-tab:hover { border-color: var(--orange); }
.week-tab.active {
    background: var(--orange); color: white; border-color: var(--orange);
    transform: scale(1.05); box-shadow: 0 4px 16px rgba(255,107,53,0.3);
}
.week-tab-day { font-size: 11px; opacity: 0.8; }
.week-tab-num { font-size: 20px; }

/* ── Daily Admin ───────────────────────────────────── */

.daily-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: white; border-radius: 12px;
    border: 2px solid var(--border); margin-bottom: 8px; transition: all 0.2s;
}
.daily-item.active { border-color: var(--teal); background: #F0FBF9; }
.daily-item-info { display: flex; align-items: center; gap: 12px; }
.daily-item-emoji { font-size: 24px; }
.daily-item-name { font-weight: 800; font-size: 15px; }
.daily-item-cat { font-size: 12px; color: var(--text-light); }

.toggle-btn {
    padding: 6px 14px; border-radius: 10px; border: 2px solid var(--border);
    background: white; cursor: pointer; font-weight: 800; font-size: 12px;
    font-family: inherit; transition: all 0.2s;
}
.toggle-btn.active { background: var(--teal); color: white; border-color: var(--teal); }

/* ── Empty state ───────────────────────────────────── */

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 56px; margin-bottom: 12px; opacity: 0.6; }
.empty-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.empty-text { font-size: 14px; color: var(--text-light); font-weight: 600; }

/* ── Footer ────────────────────────────────────────── */

.footer {
    text-align: center; padding: 24px 20px; border-top: 2px solid var(--border);
    font-size: 13px; color: var(--text-light); font-weight: 600; background: white;
}

/* ── Utility ───────────────────────────────────────── */

.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.select-input {
    padding: 8px 12px; border: 2px solid var(--border); border-radius: 10px;
    font-family: inherit; font-weight: 700; font-size: 13px; background: white; cursor: pointer;
}
.select-input:focus { outline: none; border-color: var(--orange); }

/* ── HTMX ──────────────────────────────────────────── */

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
