/* =========================================================
   VegManage Console — Admin Styles
   ========================================================= */

/* --- Shell --- */
.admin-shell {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* --- Sidebar --- */
.admin-sidebar {
    background: #183226;
    color: #eff4ec;
    padding: 24px 14px;
    display: grid;
    align-content: start;
    gap: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand-block {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.brand-block strong {
    font-size: 14px;
}

.brand-block small {
    font-size: 11px;
    color: rgba(239, 244, 236, 0.5);
}

.admin-menu {
    display: grid;
    gap: 2px;
}

.admin-menu a {
    position: relative;
    padding: 10px 14px 10px 18px;
    border-radius: 10px;
    color: #eff4ec;
    font-size: 14px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.admin-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-menu a.active {
    background: linear-gradient(135deg, rgba(168, 196, 120, 0.35) 0%, rgba(123, 143, 92, 0.2) 100%);
    font-weight: 700;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(168, 196, 120, 0.35),
                0 6px 14px rgba(0, 0, 0, 0.18);
}

.admin-menu a.active::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: #c9e27a;
    box-shadow: 0 0 6px rgba(201, 226, 122, 0.7);
}

/* --- Main --- */
.admin-main {
    padding: 24px 28px 40px;
    min-width: 0;
}

/* --- Topbar --- */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-topbar h1 {
    font-size: 1.5rem;
    margin: 4px 0 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-soft, rgba(32, 48, 40, 0.65));
}

/* --- Grid Layouts --- */
.stats-grid,
.split-grid,
.panel-grid {
    display: grid;
    gap: 16px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split-grid {
    grid-template-columns: 1.25fr 0.75fr;
}

.panel {
    padding: 20px;
}

.metric {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 8px;
    line-height: 1.2;
}

/* --- Table --- */
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.table-wrap {
    overflow-x: auto;
}

/* --- Forms --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.full-span {
    grid-column: 1 / -1;
}

/* --- Checkbox inline for settings --- */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(32, 48, 40, 0.18);
    background: rgba(123, 143, 92, 0.05);
    align-self: end;
    min-height: 44px;
    margin: 0;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.checkbox-inline:hover {
    background: rgba(123, 143, 92, 0.1);
    border-color: rgba(32, 48, 40, 0.3);
}

.checkbox-inline input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #2d5b3f);
}

/* --- Badge status colors --- */
.badge[data-status='pending'],
.badge-pending {
    background: rgba(219, 167, 42, 0.12);
    color: #8b6914;
}

.badge[data-status='preparing'],
.badge-preparing {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge[data-status='ready'],
.badge-ready {
    background: rgba(45, 91, 63, 0.12);
    color: #2d5b3f;
}

.badge[data-status='completed'],
.badge-completed {
    background: rgba(21, 128, 61, 0.1);
    color: #15803d;
}

.badge[data-status='cancelled'],
.badge-cancelled {
    background: rgba(161, 79, 43, 0.1);
    color: #a14f2b;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .stats-grid,
    .split-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .admin-main {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
