/* ========================================================
   UNLEASHED - Admin Command Deck Stylesheet
   Dark Cyberpunk / Gym Aesthetic Design
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --adm-bg: #08080b;
    --adm-surface: #101017;
    --adm-surface-light: #181824;
    --adm-border: rgba(255, 255, 255, 0.08);
    --adm-border-glow: rgba(255, 30, 39, 0.4);
    
    --adm-accent: #ff1e27;
    --adm-accent-hover: #ff3b43;
    --adm-accent-glow: rgba(255, 30, 39, 0.35);
    
    --adm-text: #ffffff;
    --adm-text-muted: #8d8d9f;
    --adm-text-dim: #5c5c6f;
    
    --adm-success: #10b981;
    --adm-warning: #f59e0b;
    --adm-info: #3b82f6;
    
    --font-heading: 'Bebas Neue', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background: var(--adm-bg);
    color: var(--adm-text);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Sidebar */
.adm-sidebar {
    width: 270px;
    background: #0c0c11;
    border-right: 1px solid var(--adm-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.adm-brand {
    padding: 24px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.adm-brand img {
    height: 40px;
    object-fit: contain;
}

.adm-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}
.adm-menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--adm-text-muted);
    transition: 0.2s ease;
    border: 1px solid transparent;
}
.adm-menu-item a:hover {
    color: #fff;
    background: var(--adm-surface-light);
    border-color: rgba(255, 255, 255, 0.05);
}
.adm-menu-item.active a {
    color: #fff;
    background: rgba(255, 30, 39, 0.12);
    border-color: var(--adm-border-glow);
    box-shadow: 0 0 15px var(--adm-accent-glow);
}
.adm-menu-item.active a svg {
    color: var(--adm-accent);
}

.adm-footer-profile {
    padding: 20px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Main Content Area */
.adm-main {
    margin-left: 270px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.adm-header {
    background: rgba(12, 12, 17, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--adm-border);
    padding: 18px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.adm-body {
    padding: 36px;
    flex-grow: 1;
}

/* Stat Cards */
.adm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}
.adm-stat-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s ease;
}
.adm-stat-card:hover {
    border-color: var(--adm-border-glow);
    box-shadow: 0 0 20px var(--adm-accent-glow);
    transform: translateY(-4px);
}
.adm-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(255, 30, 39, 0.12);
    border: 1px solid rgba(255, 30, 39, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--adm-accent);
}
.adm-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.adm-stat-label {
    color: var(--adm-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Tables */
.adm-table-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    overflow: hidden;
}
.adm-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.adm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.adm-table th {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adm-text-muted);
    border-bottom: 1px solid var(--adm-border);
}
.adm-table td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.92rem;
}
.adm-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-Pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-Processing { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-Shipped { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.status-Delivered { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-Cancelled { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Buttons */
.adm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s ease;
}
.adm-btn-primary {
    background: var(--adm-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 30, 39, 0.4);
}
.adm-btn-primary:hover {
    background: var(--adm-accent-hover);
    box-shadow: 0 6px 20px rgba(255, 30, 39, 0.6);
}
.adm-btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}
.adm-btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.adm-btn-outline:hover {
    border-color: var(--adm-accent);
    color: var(--adm-accent);
}
.adm-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.adm-btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* Forms */
.adm-form-group {
    margin-bottom: 20px;
}
.adm-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.adm-input, .adm-textarea, .adm-select {
    width: 100%;
    background: #14141d;
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.92rem;
    outline: none;
    transition: 0.2s ease;
}
.adm-input:focus, .adm-textarea:focus, .adm-select:focus {
    border-color: var(--adm-accent);
    box-shadow: 0 0 10px var(--adm-accent-glow);
}

/* ========================================================
   Mobile Drawer & Toggle Controls
   ======================================================== */
.adm-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 9px;
    transition: 0.2s ease;
    flex-shrink: 0;
}
.adm-mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.2s ease;
}
.adm-mobile-toggle:hover {
    background: rgba(255, 30, 39, 0.15);
    border-color: var(--adm-border-glow);
}
.adm-mobile-toggle:hover span {
    background: var(--adm-accent);
}

.adm-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--adm-border);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: auto;
    transition: 0.2s ease;
}
.adm-sidebar-close:hover {
    background: var(--adm-accent);
    color: #fff;
    border-color: var(--adm-accent);
}

.adm-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 6, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.adm-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.adm-drawer-open {
    overflow: hidden;
}

/* Header Elements */
.adm-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.adm-header-protocol {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--adm-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adm-header-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adm-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Table Card & Scrollbar */
.adm-table-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.adm-table-card::-webkit-scrollbar,
.adm-table-wrap::-webkit-scrollbar {
    height: 6px;
}
.adm-table-card::-webkit-scrollbar-track,
.adm-table-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.adm-table-card::-webkit-scrollbar-thumb,
.adm-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 30, 39, 0.4);
    border-radius: 3px;
}
.adm-table {
    min-width: 640px;
}

/* Reusable Responsive Grid Utilities */
.adm-grid-2-1,
.adm-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}
.adm-categories-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 32px;
    align-items: start;
}
.adm-form-row-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.adm-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.adm-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}
.adm-invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
    font-size: 0.92rem;
}
.adm-banner-card {
    background: linear-gradient(90deg, #180507 0%, #101017 100%);
    border: 1px solid var(--adm-border-glow);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* ========================================================
   Responsive Breakpoints
   ======================================================== */

/* Large Tablets / Small Laptops (<= 1200px) */
@media (max-width: 1200px) {
    .adm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* Tablets & Mobile Navigation Drawer (<= 992px) */
@media (max-width: 992px) {
    .adm-mobile-toggle {
        display: flex;
    }
    .adm-sidebar-close {
        display: flex;
    }
    
    .adm-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 290px;
        max-width: 86vw;
        background: #0c0c12;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    }
    .adm-sidebar.open {
        transform: translateX(0);
    }
    
    .adm-main {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0;
    }
    
    .adm-header {
        padding: 14px 20px;
    }
    .adm-body {
        padding: 24px 20px;
    }
    
    .adm-grid-2-1,
    .adm-dashboard-grid,
    .adm-categories-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .adm-header {
        padding: 12px 16px;
    }
    .adm-body {
        padding: 18px 14px;
    }
    
    .adm-header-title {
        font-size: 1.25rem;
    }
    .adm-header-protocol {
        font-size: 0.65rem;
    }
    
    .adm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }
    .adm-stat-card {
        padding: 16px;
        gap: 14px;
    }
    .adm-stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        border-radius: 10px;
    }
    .adm-stat-value {
        font-size: 1.45rem;
    }
    .adm-stat-label {
        font-size: 0.72rem;
    }
    
    .adm-banner-card {
        padding: 18px;
        margin-bottom: 24px;
        flex-direction: column;
        align-items: stretch;
    }
    .adm-banner-card > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .adm-banner-card .adm-btn {
        justify-content: center;
        width: 100%;
    }
    
    .adm-form-row-2,
    .adm-form-row-half,
    .adm-form-row-3,
    .adm-invoice-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .adm-table-card[style*="padding: 32px"],
    .adm-table-card[style*="padding: 36px"],
    .adm-table-card[style*="padding: 28px"] {
        padding: 18px 16px !important;
    }
}

/* Extra Small Mobile (<= 540px) */
@media (max-width: 540px) {
    .adm-header-actions .adm-store-text {
        display: none;
    }
    .adm-header-actions .adm-store-btn {
        padding: 6px 10px;
    }
    .adm-header-actions .adm-btn-danger {
        padding: 6px 10px;
    }
    
    .adm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .adm-table-header {
        padding: 16px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .adm-table th, .adm-table td {
        padding: 12px 14px;
    }
    
    .login-card {
        padding: 28px 18px !important;
        margin: 14px;
    }
}

