/* ===================================== */
/* ADMIN DASHBOARD STYLES - CRUSTHOOD   */
/* ===================================== */

:root {
    --gold-primary: #d4af37;
    --gold-light: #f4e4c1;
    --gold-dark: #b8941e;
    --dark-bg: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-tertiary: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #c0c0c0;
    --text-muted: #808080;
    --border-color: rgba(212, 175, 55, 0.15);
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}

/* ===================================== */
/* SIDEBAR                               */
/* ===================================== */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.98));
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(212, 175, 55, 0.05);
}

.admin-logo .logo-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    margin-bottom: 0.25rem;
}

.admin-logo .logo-subtitle {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar-menu {
    list-style: none;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item a .material-symbols-outlined {
    font-size: 24px;
    color: var(--gold-primary);
}

.menu-item a:hover,
.menu-item.active a {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    border-left: 3px solid var(--gold-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* ===================================== */
/* MAIN CONTENT                          */
/* ===================================== */

.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--dark-bg);
}

/* Header */
.admin-header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--gold-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 1rem;
}

.header-search .material-symbols-outlined {
    color: var(--gold-primary);
    font-size: 20px;
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-btn {
    position: relative;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-profile:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
}

.admin-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gold-primary);
}

.admin-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===================================== */
/* DASHBOARD CONTENT                     */
/* ===================================== */

.dashboard-content {
    padding: 2rem;
    max-width: 1920px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.products {
    background: rgba(59, 130, 246, 0.15);
    color: rgb(59, 130, 246);
}

.stat-icon.orders {
    background: rgba(251, 191, 36, 0.15);
    color: rgb(251, 191, 36);
}

.stat-icon.cart {
    background: rgba(139, 92, 246, 0.15);
    color: rgb(139, 92, 246);
}

.stat-icon.today {
    background: rgba(34, 197, 94, 0.15);
    color: rgb(34, 197, 94);
}

.stat-icon.week {
    background: rgba(236, 72, 153, 0.15);
    color: rgb(236, 72, 153);
}

.stat-icon.month {
    background: rgba(14, 165, 233, 0.15);
    color: rgb(14, 165, 233);
}

.stat-icon.new {
    background: rgba(249, 115, 22, 0.15);
    color: rgb(249, 115, 22);
}

.stat-icon.revenue {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-trend.positive {
    color: #22c55e;
}

.stat-trend.negative {
    color: #ef4444;
}

.stat-trend.neutral {
    color: var(--text-muted);
}

.stat-trend .material-symbols-outlined {
    font-size: 18px;
}

.stat-action .view-link {
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.stat-action .view-link:hover {
    color: var(--gold-light);
}

/* Order Status Grid */
.order-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.status-card.shipped {
    border-top: 4px solid rgb(139, 92, 246);
}

.status-card.delivered {
    border-top: 4px solid rgb(34, 197, 94);
}

.status-card.processing {
    border-top: 4px solid rgb(251, 191, 36);
}

.status-card.cancelled {
    border-top: 4px solid rgb(239, 68, 68);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-header .material-symbols-outlined {
    font-size: 32px;
}

.status-card.shipped .material-symbols-outlined {
    color: rgb(139, 92, 246);
}

.status-card.delivered .material-symbols-outlined {
    color: rgb(34, 197, 94);
}

.status-card.processing .material-symbols-outlined {
    color: rgb(251, 191, 36);
}

.status-card.cancelled .material-symbols-outlined {
    color: rgb(239, 68, 68);
}

.status-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.status-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.status-footer a {
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.status-footer a:hover {
    color: var(--gold-light);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Recent Orders Section */
.recent-orders-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all-btn {
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-all-btn:hover {
    color: var(--gold-light);
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    background: rgba(212, 175, 55, 0.05);
}

.orders-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.orders-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.orders-table tbody tr {
    transition: background 0.2s ease;
}

.orders-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.new,
.status-badge.pending {
    background: rgba(59, 130, 246, 0.15);
    color: rgb(59, 130, 246);
}

.status-badge.processing {
    background: rgba(251, 191, 36, 0.15);
    color: rgb(251, 191, 36);
}

.status-badge.shipped {
    background: rgba(139, 92, 246, 0.15);
    color: rgb(139, 92, 246);
}

.status-badge.delivered {
    background: rgba(34, 197, 94, 0.15);
    color: rgb(34, 197, 94);
}

.status-badge.cancelled,
.status-badge.refunded {
    background: rgba(239, 68, 68, 0.15);
    color: rgb(239, 68, 68);
}

.action-btn {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.action-btn .material-symbols-outlined {
    font-size: 20px;
}

.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===================================== */
/* RESPONSIVE DESIGN                     */
/* ===================================== */

@media (max-width: 1400px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-search {
        display: none;
    }

    .dashboard-content {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .order-status-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 1rem 1.25rem;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .admin-name {
        display: none;
    }

    .dashboard-content {
        padding: 1.25rem;
    }

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

    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .order-status-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-filters {
        flex-wrap: wrap;
    }

    .orders-table {
        font-size: 0.85rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .status-count {
        font-size: 2rem;
    }

    .chart-container {
        height: 250px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.status-card,
.chart-card,
.recent-orders-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styles */
.sidebar-nav::-webkit-scrollbar,
.orders-table-wrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sidebar-nav::-webkit-scrollbar-track,
.orders-table-wrapper::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
}

.sidebar-nav::-webkit-scrollbar-thumb,
.orders-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}