/* Admin Dashboard CSS */
:root {
    --admin-bg: #F0F2F5;
    --sidebar-bg: #111827;
    --sidebar-text: #9CA3AF;
    --sidebar-active: #FFFFFF;
    --admin-primary: #00BFA5;
    --admin-secondary: #6366F1;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --border-color: #E5E7EB;
}

.admin-body {
    background-color: var(--admin-bg);
    display: flex;
    min-height: 100vh;
    font-size: 0.95rem;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar .logo {
    padding: 30px 24px;
}

.sidebar-nav {
    flex: 1;
    padding: 0 12px;
}

.sidebar-nav ul li {
    margin-bottom: 4px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--sidebar-text);
}

.sidebar-nav ul li.active a,
.sidebar-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-active);
}

.sidebar-nav ul li a i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-profile .avatar {
    width: 36px;
    height: 36px;
    background: var(--admin-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.admin-profile .info .name {
    display: block;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-profile .info .role {
    font-size: 0.75rem;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: 70px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: var(--admin-bg);
    padding: 8px 16px;
    border-radius: 8px;
    width: 300px;
}

.header-search i {
    color: var(--text-muted);
    width: 18px;
}

.header-search input {
    background: none;
    border: none;
    padding-left: 10px;
    outline: none;
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-bell {
    position: relative;
    color: var(--text-muted);
    cursor: pointer;
}

.notification-bell .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #EF4444;
    border: 2px solid white;
    border-radius: 50%;
}

/* Dashboard Content */
.admin-content {
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info .label {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.stat-info .value {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: #10B981;
}

.trend.down {
    color: #EF4444;
}

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

.stat-icon.pink {
    background-color: #FEE2E2;
    color: #EF4444;
}

.stat-icon.blue {
    background-color: #DBEAFE;
    color: #3B82F6;
}

.stat-icon.green {
    background-color: #D1FAE5;
    color: #10B981;
}

.stat-icon.yellow {
    background-color: #FEF3C7;
    color: #F59E0B;
}

/* Dashboard Rows */
.dashboard-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.chart-container,
.recent-orders,
.management-section,
.product-table-card {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.view-all {
    font-size: 0.85rem;
    color: var(--admin-primary);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.paid {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-badge.shipping {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-badge.delivered {
    background-color: #F3F4F6;
    color: #374151;
}

.table-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--gray-100);
}

.table-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Management Section */
.management-section {
    padding: 30px;
}

.section-header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-add-product {
    background-color: var(--admin-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-s {
    background-color: #FFFBEB;
    color: #92400E;
    border: 1px solid #FCD34D;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge-a {
    background-color: #F1F5F9;
    color: #334155;
    border: 1px solid #CBD5E1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.toggle {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    background-color: #E0F2F1;
    color: #00897B;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.btn-icon.delete:hover {
    color: #EF4444;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 16px;
    width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close-modal {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Responsive Admin */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }
}