:root {
    --admin-bg: #f6f7fb;
    --sidebar: #0b0f17;
    --sidebar-soft: #121826;
    --primary: #ff6a00;
    --primary-dark: #ea580c;
    --accent: #ffb020;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --card: #ffffff;
}
* { letter-spacing: 0; }
body.admin-shell {
    min-height: 100vh;
    background: var(--admin-bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
}
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 292px;
    background: linear-gradient(180deg, var(--sidebar), #111827);
    color: #fff;
    padding: 20px 16px;
    overflow-y: auto;
    box-shadow: 18px 0 44px rgba(15, 23, 42, .16);
    transition: transform .22s ease, opacity .22s ease;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    padding: 8px 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 16px;
}
.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #111827;
    font-weight: 950;
}
.admin-brand strong { display: block; font-size: 1.05rem; }
.admin-brand small { display: block; color: #94a3b8; font-size: .78rem; }
.admin-menu { display: grid; gap: 8px; }
.menu-group { border: 1px solid rgba(255,255,255,.06); border-radius: 14px; overflow: hidden; }
.menu-group-title {
    width: 100%;
    border: 0;
    background: rgba(255,255,255,.04);
    color: #e5e7eb;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    text-transform: uppercase;
    font-weight: 950;
}
.menu-group-title i { color: var(--accent); }
.menu-links { display: grid; gap: 4px; padding: 7px; }
.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 850;
    padding: 11px 12px;
    border-radius: 11px;
}
.admin-menu a i { width: 20px; text-align: center; color: #94a3b8; }
.admin-menu a:hover, .admin-menu a.active {
    background: rgba(255,106,0,.14);
    color: #fff;
}
.admin-menu a.active { box-shadow: inset 3px 0 0 var(--primary); }
.admin-menu a.active i { color: var(--accent); }
.admin-main { margin-left: 292px; min-height: 100vh; transition: margin-left .22s ease; }
body.admin-shell.sidebar-hidden .admin-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}
body.admin-shell.sidebar-hidden .admin-main { margin-left: 0; }
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 84px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}
.topbar-kicker {
    color: var(--muted);
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 950;
}
.admin-topbar h1 { margin: 0; font-size: 1.68rem; font-weight: 950; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.new-order-sound-gate {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2000;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #111827;
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .35);
}
.new-order-sound-gate strong,
.new-order-sound-gate span { display: block; }
.new-order-sound-gate span { color: #cbd5e1; font-size: .86rem; }
.admin-content { padding: 30px; }
.admin-card, .metric-card, .table-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .06);
}
.admin-card { padding: 22px; }
.card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.card-head h2 { margin: 0; font-size: 1.2rem; font-weight: 950; }
.metric-card { padding: 22px; position: relative; overflow: hidden; }
.metric-card span { color: var(--muted); font-weight: 850; }
.metric-card h2, .metric-card strong { display: block; font-size: 2.05rem; font-weight: 950; margin: 8px 0 0; }
.metric-card i {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 4rem;
    color: rgba(255, 106, 0, .12);
}
.btn-fire, .btn-primary-admin {
    border: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #111827;
    font-weight: 950;
    border-radius: 11px;
}
.btn-fire:hover, .btn-primary-admin:hover { color: #111827; filter: brightness(1.04); }
.btn-soft {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 850;
    border-radius: 11px;
}
.btn-danger-soft {
    background: #fee2e2;
    color: #991b1b;
    border: 0;
    border-radius: 11px;
    font-weight: 950;
}
.table-card { overflow: hidden; }
.table { margin: 0; }
.table thead th {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    font-size: .74rem;
    font-weight: 950;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}
.table tbody td { vertical-align: middle; padding: 14px 16px; border-color: var(--line); }
.admin-table td, .admin-table th { border-color: var(--line); }
.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 950;
}
.status-toggle {
    border: 0;
    cursor: pointer;
}
.status-toggle:disabled { opacity: .72; cursor: wait; }
.status-on { color: #166534; background: #dcfce7; }
.status-off { color: #991b1b; background: #fee2e2; }
.form-control, .form-select {
    min-height: 46px;
    border-radius: 11px;
    border-color: var(--line);
}
label { font-weight: 850; color: #374151; margin-bottom: 6px; }
.site-builder-tabs {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 8px;
}
.builder-preview-thumb {
    width: 100%;
    height: 126px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f8fafc;
}
.builder-media-field {
    display: grid;
    gap: 10px;
    height: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
}
.builder-media-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.builder-media-head label { margin: 0; }
.builder-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b91c1c;
    font-size: .78rem;
    white-space: nowrap;
}
.builder-empty-image {
    min-height: 126px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
    text-align: center;
}
.builder-theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.builder-theme-options input { display: none; }
.builder-theme-options span {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-weight: 900;
}
.builder-theme-options input:checked + span {
    border-color: var(--primary);
    background: #fff7ed;
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.icon-choice input { display: none; }
.icon-choice span {
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    display: grid;
    place-items: center;
    gap: 4px;
    cursor: pointer;
    color: #475569;
}
.icon-choice i { font-size: 1.45rem; }
.icon-choice input:checked + span {
    border-color: var(--primary);
    background: #fff7ed;
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; }
.category-pills { display: flex; gap: 8px; overflow-x: auto; }
.category-pills button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 900;
    white-space: nowrap;
}
.category-pills button.active { background: var(--primary); color: #111; border-color: var(--primary); }
.pos-card {
    width: 100%;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    overflow: hidden;
    display: grid;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.pos-card img { width: 100%; height: 120px; object-fit: cover; }
.pos-card strong, .pos-card span { padding: 0 12px; }
.pos-card span { color: var(--primary-dark); font-weight: 950; padding-bottom: 10px; }
.category-admin-thumb {
    width: 82px;
    height: 54px;
    object-fit: cover;
    border-radius: 11px;
    border: 1px solid var(--line);
}
.category-image-card {
    position: relative;
    width: 100%;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    background: #111827;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.category-image-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    transition: .2s ease;
}
.category-image-card:hover img { transform: scale(1.035); }
.category-image-card.is-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.58);
}
.category-image-card span {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 18px;
    color: #fff;
    text-align: center;
    font-weight: 950;
    font-size: 1.35rem;
    text-shadow: 0 3px 14px rgba(0,0,0,.6);
}
.admin-category-select.category-image-card {
    min-height: 128px;
    border-radius: 14px;
}
.admin-category-select.category-image-card img {
    height: 128px;
}
.admin-category-select.category-image-card span {
    padding: 10px;
    font-size: 1rem;
    line-height: 1.05;
}
.pos-line { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.pos-line small { display: block; color: var(--muted); }
.client-box {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
}
.client-suggestions {
    max-height: 210px;
    overflow-y: auto;
    border-radius: 12px;
}
.order-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.board-column { min-height: 70vh; border-radius: 18px; padding: 16px; color: #111827; }
.board-column h3 { font-weight: 950; margin-bottom: 14px; }
.board-red { background: #fff1f2; }
.board-yellow { background: #fffbeb; }
.board-green { background: #ecfdf5; }
.board-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 44px 13px 13px;
    margin-bottom: 12px;
    box-shadow: 0 12px 24px rgba(15,23,42,.08);
}
.board-card .details-btn { position: absolute; top: 10px; left: 10px; }
.board-card strong, .board-card span, .board-card small { display: block; }
.board-card p { margin: 10px 0; color: var(--muted); font-size: .9rem; }
.order-detail-list { display: grid; gap: 10px; }
.order-detail-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
}
body.admin-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(255,106,0,.24), transparent 28%),
        linear-gradient(135deg, #090b10, #111827 56%, #2a1304);
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fff;
    font-family: Inter, Arial, Helvetica, sans-serif;
}
.login-card {
    width: min(450px, 100%);
    background: rgba(255,255,255,.96);
    color: var(--text);
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 34px 90px rgba(0,0,0,.36);
}
.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--primary-dark);
    font-weight: 950;
    margin-bottom: 18px;
}
.login-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #111827;
    font-weight: 950;
    margin-bottom: 18px;
}
@media (max-width: 991px) {
    .admin-sidebar { position: static; width: 100%; min-height: auto; }
    body.admin-shell.sidebar-hidden .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .admin-topbar { align-items: flex-start; flex-direction: column; }
    .topbar-actions { flex-wrap: wrap; width: 100%; }
    .new-order-sound-gate { left: 18px; right: 18px; bottom: 18px; max-width: none; }
    .admin-content { padding: 18px; }
    .pos-grid { grid-template-columns: 1fr; }
    .order-board { grid-template-columns: 1fr; }
    .site-builder-tabs { position: static; }
}
