/* =============================================
   LA MAMMA — ADMIN PANEL CSS
   Premium Dark Gold Control Interface
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Montserrat:wght@300;400;500;600;700;900&display=swap');

:root {
    --bg: #0E0B09;
    --bg-surface: #181310;
    --bg-card: #1E1714;
    --bg-card-hover: #261B16;
    --bg-input: #120F0D;
    --border: rgba(232,211,174,0.08);
    --border-gold: rgba(214,153,56,0.35);
    --gold: #D69938;
    --gold-light: #EAB256;
    --gold-dim: rgba(214,153,56,0.15);
    --gold-glow: rgba(214,153,56,0.08);
    --kraft: #E8D3AE;
    --text: #F4EAE0;
    --text-muted: #8A7D73;
    --text-dim: #5A4E46;
    --danger: #C0392B;
    --danger-dim: rgba(192,57,43,0.15);
    --success: #27AE60;
    --success-dim: rgba(39,174,96,0.15);
    --warning: #E67E22;
    --warning-dim: rgba(230,126,34,0.15);
    --info: #2980B9;
    --info-dim: rgba(41,128,185,0.15);
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 30px rgba(0,0,0,0.6);
    --shadow-gold: 0 0 30px rgba(214,153,56,0.12);
    --transition: all 0.3s cubic-bezier(0.165,0.84,0.44,1);
    --sidebar-width: 270px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── LOGIN PAGE ────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(214,153,56,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(214,153,56,0.04) 0%, transparent 40%),
        url('https://images.unsplash.com/photo-1568901346375-23c9450c58cd?auto=format&fit=crop&w=2000&q=60') center/cover;
    filter: brightness(0.1) saturate(0.5);
}

.login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(14,11,9,0.85), rgba(14,11,9,0.98));
}

.login-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 90%;
    min-height: 600px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow), var(--shadow-gold);
}

.login-art {
    background: linear-gradient(135deg, rgba(214,153,56,0.12), rgba(214,153,56,0.04));
    border-right: 1px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.login-art::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(214,153,56,0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.login-art::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(214,153,56,0.04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-brand {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 0.9;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-brand .dot { color: var(--gold); }
.login-brand-sub {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 12px;
    display: block;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-art-divider {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 35px auto;
    position: relative;
    z-index: 1;
}

.login-admin-badge {
    background: var(--gold-dim);
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
    font-size: 0.65rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 30px;
    position: relative;
    z-index: 1;
}

.login-form-panel {
    background: var(--bg-surface);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 8px;
}
.login-form-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 22px;
}
.form-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-input::placeholder { color: var(--text-dim); }

.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .form-input {
    padding-left: 45px;
}
.input-icon-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: var(--transition);
}
.input-icon-wrap:focus-within i { color: var(--gold); }

.btn-login {
    width: 100%;
    background: var(--gold);
    color: var(--bg);
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}
.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}
.btn-login:hover::before { transform: translateX(0); }
.btn-login:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 8px 25px rgba(214,153,56,0.3); }
.btn-login:active { transform: translateY(0); }

.login-error {
    background: var(--danger-dim);
    border: 1px solid rgba(192,57,43,0.3);
    color: #E74C3C;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-top: 15px;
    display: none;
    align-items: center;
    gap: 10px;
}
.login-error.show { display: flex; }

/* ─── LAYOUT ─────────────────────────────────── */
.admin-layout {
    display: block;
    min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────── */
.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 0.9;
}
.sidebar-brand .dot { color: var(--gold); }
.sidebar-brand-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.55rem;
    letter-spacing: 6px;
    color: var(--text-muted);
    margin-top: 8px;
}
.sidebar-admin-tag {
    display: inline-block;
    background: var(--gold-dim);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 0.55rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    font-weight: 700;
    padding: 15px 25px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 25px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-left: 2px solid transparent;
    -webkit-user-select: none;
    user-select: none;
    text-decoration: none;
    letter-spacing: 0.3px;
}
.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    transition: var(--transition);
}
.nav-item:hover {
    color: var(--text);
    background: var(--gold-glow);
    border-left-color: rgba(214,153,56,0.4);
}
.nav-item.active {
    color: var(--gold-light);
    background: var(--gold-dim);
    border-left-color: var(--gold);
}
.nav-item.active i { color: var(--gold); }

/* ─── UTILITIES ──────────────────────────────── */
.text-danger { color: var(--danger); }
.flex-1 { flex: 1; }
.mr-6px { margin-right: 6px; }
.mr-8px { margin-right: 8px; }
.text-gold { color: var(--gold); }
.pr-45px { padding-right: 45px; }
.pos-relative { position: relative; }
.login-grid-style { position: relative; z-index: 2; animation: fadeInUp 0.6s ease forwards; }
.admin-badge-txt { margin-top: 40px; text-align: center; position: relative; z-index: 1; }
.admin-badge-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.8; max-width: 220px; margin: 0 auto; }
.pwd-toggle-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; transition: color 0.3s; }
.back-link-box { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }
.back-link-a { font-size: 0.75rem; color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.mr-5px { margin-right: 5px; }
.badge-warning-hidden { background: var(--warning); color: #fff; display: none; }
.d-none { display: none; }
.grid-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; min-width: 0; }
.p-0 { padding: 0 !important; }
.col-30 { width: 30px; }
.col-60 { width: 60px; }
.col-70 { width: 70px; }
.col-100 { width: 100px; }
.flex-col-gap-20 { display: flex; flex-direction: column; gap: 20px; }
.flex-col-gap-10 { display: flex; flex-direction: column; gap: 10px; }
.flex-col-gap-18 { display: flex; flex-direction: column; gap: 18px; }
.flex-col-gap-12 { display: flex; flex-direction: column; gap: 12px; }
.grid-cols-1-gap-18 { display: grid; grid-template-columns: 1fr; gap: 18px; }
.flex-gap-30-wrap { display: flex; gap: 30px; flex-wrap: wrap; }
.max-w-700 { max-width: 700px; }
.max-w-520 { max-width: 520px; }
.max-w-600 { max-width: 600px; }
.mt-4px { margin-top: 4px; }
.mt-10px { margin-top: 10px; }
.mb-12px { margin-bottom: 12px; }
.font-serif-1-6 { font-family: var(--font-serif); font-size: 1.6rem; color: var(--text); }
.text-0-8-muted { font-size: 0.8rem; color: var(--text-muted); }
.info-box-wrap { background: var(--gold-glow); border: 1px solid var(--border-gold); border-radius: var(--radius-sm); padding: 15px; }
.info-box-title { font-size: 0.78rem; color: var(--gold-light); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.info-box-content { font-size: 0.82rem; color: var(--text-muted); }
.info-box-content strong { color: var(--text); }
.tip-box-wrap { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; background: var(--bg); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-sm); }
.tip-box-icon { color: var(--gold); margin-right: 6px; }
.code-inline { background: rgba(214,153,56,0.1); padding: 1px 6px; border-radius: 3px; color: var(--gold); }
.backup-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 5px; }
.backup-text strong { color: var(--text); }

.nav-badge {
    margin-left: auto;
    background: var(--gold);
    color: var(--bg);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.sidebar-avatar {
    width: 36px;
    height: 36px;
    background: var(--gold-dim);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-dim);
}

/* ─── MAIN CONTENT ───────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

/* ─── TOP BAR ────────────────────────────────── */
.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0 35px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}
.topbar-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text);
    line-height: 1;
}
.topbar-breadcrumb {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.breadcrumb-sep { color: var(--text-dim); margin: 0 6px; }
.breadcrumb-current { color: var(--gold); }

.topbar-right { display: flex; align-items: center; gap: 15px; }

.topbar-btn {
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.topbar-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

.topbar-live-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--success-dim);
    border: 1px solid rgba(39,174,96,0.3);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #2ECC71;
    font-weight: 700;
}
.live-dot {
    width: 7px;
    height: 7px;
    background: #2ECC71;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(39,174,96,0.5); }
    70% { box-shadow: 0 0 0 6px rgba(39,174,96,0); }
    100% { box-shadow: 0 0 0 0 rgba(39,174,96,0); }
}

/* ─── PAGE CONTENT ───────────────────────────── */
.page-content {
    flex: 1;
    padding: 35px;
    display: none;
}
.page-content.active-page { display: block; }

/* ─── STATS GRID ─────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}
.stat-card:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.stat-card:hover::before { transform: scaleX(1); }

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 18px;
}
.stat-card-icon.gold { background: var(--gold-dim); color: var(--gold); }
.stat-card-icon.green { background: var(--success-dim); color: var(--success); }
.stat-card-icon.orange { background: var(--warning-dim); color: var(--warning); }
.stat-card-icon.blue { background: var(--info-dim); color: var(--info); }

.stat-card-value {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}
.stat-card-trend {
    margin-top: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.trend-up { color: var(--success); }
.trend-neutral { color: var(--text-muted); }

/* ─── SECTION CARDS ──────────────────────────── */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 25px;
    overflow: hidden;
}
.section-card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.section-card-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-card-title i { color: var(--gold); font-size: 1rem; }
.section-card-body { padding: 25px; }

/* ─── BUTTONS ────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gold);
    color: var(--bg);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 5px 15px rgba(214,153,56,0.3); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.btn-danger {
    background: var(--danger-dim);
    border: 1px solid rgba(192,57,43,0.3);
    color: #E74C3C;
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success {
    background: var(--success-dim);
    border: 1px solid rgba(39,174,96,0.3);
    color: var(--success);
}
.btn-success:hover { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.7rem; }
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon:hover { border-color: var(--gold); color: var(--gold); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

/* ─── TABLE ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    white-space: nowrap;
}
td {
    padding: 16px;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid rgba(232,211,174,0.04);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(214,153,56,0.03); }

.td-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--text);
}
.td-type {
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.td-price {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--gold-light);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.badge-active { background: var(--success-dim); color: var(--success); border: 1px solid rgba(39,174,96,0.2); }
.badge-promo { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(230,126,34,0.2); }
.badge-paused { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(192,57,43,0.2); }

.item-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--bg);
}

.actions-cell { display: flex; gap: 6px; align-items: center; }
/* ─── DYNAMIC ELEMENT CLASSES (from JS renders) ── */
.text-dim { color: var(--text-dim); }
.td-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 220px;
    line-height: 1.4;
}
.badge-ml { margin-left: 5px; }
.badge-mt-block { margin-top: 5px; display: inline-flex; }
.clickable { cursor: pointer; }

/* Promo summary row (dashboard) */
.promo-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.promo-summary-row:last-child { border-bottom: none; }
.promo-summary-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text);
}
.promo-summary-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}
.promo-summary-discount {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold);
    flex-shrink: 0;
    margin-left: 12px;
}

/* Promo page empty state */
.empty-state-lg { padding: 80px 20px; }
.empty-icon {
    font-size: 3rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 15px;
}
.empty-text {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Promo applies badge */
.promo-applies {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.promo-applies strong { color: var(--text); }




/* ─── FORMS ──────────────────────────────────── */
.form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}
.field-input, .field-select, .field-textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    transition: var(--transition);
    outline: none;
    width: 100%;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--text-dim); }
.field-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M5 6L0 0h10z' fill='%238A7D73'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 35px; }
.field-textarea { resize: vertical; min-height: 100px; }

.field-note {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: -4px;
}

/* Toggle Switch */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--bg); }
.toggle-label { font-size: 0.8rem; color: var(--text-muted); }

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-backdrop-admin {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.modal-box {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-box-header {
    padding: 22px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-box-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text);
}
.modal-close-btn {
    width: 32px; height: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close-btn:hover { border-color: var(--danger); color: var(--danger); }
.modal-box-body { padding: 25px; }
.modal-box-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ─── TOAST ──────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text);
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease forwards;
    min-width: 270px;
    max-width: 380px;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-info { border-left: 3px solid var(--gold); }
.toast i { font-size: 1rem; }
.toast.toast-success i { color: var(--success); }
.toast.toast-error i { color: var(--danger); }
.toast.toast-info i { color: var(--gold); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
.toast.fade-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* ─── PROMO CARDS ────────────────────────────── */
.promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.promo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.promo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.promo-card:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.promo-card-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text);
}
.promo-card-body {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}
.promo-card-discount {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 5px;
}
.promo-card-dates {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}
.promo-card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ─── SETTINGS ───────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* ─── SEARCH BOX ─────────────────────────────── */
.search-box {
    position: relative;
    flex: 1;
}
.search-box input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 15px 10px 38px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.83rem;
    outline: none;
    transition: var(--transition);
}
.search-box input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ─── INGREDIENT EDITOR ──────────────────────── */
.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ingredient-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ingredient-row .field-input { flex: 1; }
.btn-add-ingredient {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gold);
    background: none;
    border: 1px dashed var(--border-gold);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.btn-add-ingredient:hover { background: var(--gold-glow); border-style: solid; }

/* ─── IMAGE PREVIEW ──────────────────────────── */
.image-preview-box {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-input);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.image-preview-box:hover { border-color: var(--gold); background: var(--gold-glow); }
.image-preview-box img { max-height: 120px; max-width: 100%; border-radius: var(--radius-sm); object-fit: cover; }
.image-preview-box i { font-size: 2rem; color: var(--text-dim); }
.image-preview-box p { font-size: 0.75rem; color: var(--text-dim); }

/* ─── EMPTY STATE ────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; color: var(--text-dim); margin-bottom: 15px; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ─── TABS ───────────────────────────────────── */
.tabs-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    margin-bottom: 25px;
    overflow-x: auto;
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: -1px;
    font-weight: 600;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── DRAG INDICATOR ─────────────────────────── */
.drag-handle {
    cursor: grab;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 0 5px;
}
.drag-handle:active { cursor: grabbing; }

/* ─── SPINNER ────────────────────────────────── */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--gold-dim);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── COLOR PICKER ───────────────────────────── */
.color-preview {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    overflow: hidden;
}
input[type="color"] { width: 100%; height: 100%; border: none; cursor: pointer; padding: 0; background: none; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-grid { grid-template-columns: 1fr; }
    .grid-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }
    .sidebar { transform: translateX(-270px); width: 270px; }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .grid-layout { grid-template-columns: 1fr; }
    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 { grid-template-columns: 1fr; }
    .login-grid { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .topbar { padding: 0 20px; }
    .page-content { padding: 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ─── UTILITY ────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; letter-spacing: 1px; }
.font-serif { font-family: var(--font-serif); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── NEW CLEANUP CLASSES ────────────────────── */
.section-card-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.section-card-help { font-size: 0.8rem; color: var(--text-dim); margin-top: 15px; }
.modal-text { font-size: 0.9rem; margin-bottom: 12px; }
.export-area { font-family: monospace; font-size: 0.8rem; background: #111; border-color: #333; }
.copy-success-msg { color: var(--success); font-size: 0.8rem; margin-top: 10px; display: none; }
