:root {
    --gold: #D4AF37;
    --dark: #111111;
    --sidebar-width: 260px;
}

body.admin-body {
    font-family: 'Montserrat', sans-serif;
    background: #f0f2f5;
    padding-top: 0;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark);
    color: #fff;
    z-index: 1000;
    overflow-y: auto;
}
.admin-sidebar .brand {
    padding: 20px 16px;
    border-bottom: 1px solid #333;
    text-align: center;
}
.ag-admin-brand-link {
    display: block;
    text-decoration: none;
}
.ag-admin-brand-logo {
    height: 56px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.ag-admin-brand-sub {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}
.ag-login-logo {
    height: 72px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--gold);
    background: rgba(212,175,55,0.1);
    border-left-color: var(--gold);
}
.admin-sidebar .nav-link i { width: 24px; }

.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.ag-media-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
}
.ag-media-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}
.ag-media-thumb:hover {
    opacity: 0.9;
}

.ag-dropzone {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.ag-dropzone:hover,
.ag-dropzone.dragover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}
.ag-dropzone.disabled {
    opacity: 0.55;
    pointer-events: none;
}
.ag-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.ag-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ag-upload-preview:not(:empty) {
    margin-top: 8px;
}
.ag-new-upload {
    animation: agFadeIn 0.35s ease;
}
@keyframes agFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ag-upload-preview-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px;
    background: #fff;
    max-width: 120px;
}
.ag-upload-preview-item img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin-top: 4px;
}
.ag-room-upload-guide ol {
    margin-bottom: 0.5rem;
}
.ag-category-chip.active {
    background: var(--gold, #D4AF37) !important;
    border-color: var(--gold, #D4AF37) !important;
    color: #111 !important;
}
.ag-category-chip.active .badge {
    background: #111 !important;
    color: #fff !important;
}
.text-gold { color: var(--gold); }

.admin-topbar {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-content { padding: 30px; }

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--gold);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.stat-card-link:hover .stat-card {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    cursor: pointer;
}
.stat-card-link:focus-visible .stat-card {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.stat-card h3 { font-size: 2rem; margin: 0; color: var(--dark); }
.stat-card p { color: #888; margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

.admin-table { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
}
.admin-login-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.admin-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-table .table {
    min-width: 520px;
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-sidebar-overlay.show {
        display: block;
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-topbar {
        position: sticky;
        top: 0;
        z-index: 998;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .admin-content {
        padding: 16px;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-card h3 {
        font-size: 1.5rem;
    }
    .admin-login-card {
        margin: 16px;
        padding: 28px 22px;
    }
}

@media (max-width: 575.98px) {
    .admin-topbar h5 {
        font-size: 1rem;
    }
    .admin-topbar .text-muted {
        font-size: 0.75rem;
        width: 100%;
    }
}

.ag-new-order-row {
    animation: agOrderPulse 1.5s ease-in-out 2;
}

@keyframes agOrderPulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(25, 135, 84, 0); }
    50% { box-shadow: inset 0 0 0 999px rgba(25, 135, 84, 0.12); }
}
