@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

:root {
    --admin-bg: #111214;
    --admin-surface: #1a1b1e;
    --admin-text: #eceff1;
    --admin-text-muted: #90a4ae;
    --admin-primary: #c09f80; /* Soft gold from luxury theme */
    --admin-border: #37474f;
    --admin-success: #4caf50;
    --admin-danger: #f44336;
    --admin-warning: #ff9800;
    --admin-info: #2196f3;
}

body.admin-dark-theme {
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    width: 100%;
}

/* --- Sidebar / Navigation --- */
.admin-sidebar {
    width: 260px;
    background-color: var(--admin-surface);
    border-right: 1px solid var(--admin-border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--admin-border);
}

.sidebar-header h2 a {
    color: var(--admin-text);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-header h2 a span {
    color: var(--admin-primary);
}

.admin-nav {
    flex-grow: 1;
    list-style: none;
    padding: 1.5rem 0 0 0;
    margin: 0;
}

.admin-nav-item {
    margin: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.5rem;
    color: var(--admin-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-nav-link:hover {
    background-color: var(--admin-bg);
    color: var(--admin-primary);
    border-left-color: var(--admin-primary);
}

.admin-nav-link.active {
    background-color: var(--admin-bg);
    color: var(--admin-text);
    border-left-color: var(--admin-primary);
    font-weight: 700;
}

.sidebar-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--admin-border);
}

.sidebar-footer a {
    color: var(--admin-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.sidebar-footer a:hover {
    color: var(--admin-primary);
}

/* --- Main Content --- */
.admin-main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

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

.admin-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

/* --- General Components --- */
.card {
    background-color: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

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

.table th, .table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--admin-border);
}

.table th {
    font-weight: 700;
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: var(--admin-bg);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--admin-primary);
    color: var(--admin-bg);
}
.btn-primary:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: var(--admin-danger);
    color: var(--admin-text);
}

/* --- Stat Cards (from dashboard) --- */
.stat-card {
    background-color: var(--admin-surface);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--admin-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-card .icon {
    font-size: 2rem;
    padding: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text);
}

.stat-card .stat-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--admin-text-muted);
}

.stat-card .stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.icon.bg-success { background-color: var(--admin-success); }
.icon.bg-danger { background-color: var(--admin-danger); }
.icon.bg-warning { background-color: var(--admin-warning); }
.icon.bg-info { background-color: var(--admin-info); }
.icon.bg-primary { background-color: var(--admin-primary); }


/* --- Chart Container --- */
.chart-container {
    background-color: var(--admin-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
}

.chart-container h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* --- Form styles --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--admin-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    border-radius: 8px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px rgba(192, 159, 128, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 70px;
    }
    .sidebar-header h2 {
        display: none;
    }
    .admin-nav-link {
        justify-content: center;
    }
    .admin-nav-link span {
        display: none;
    }
}
@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--admin-border);
        flex-direction: row;
        align-items: center;
        padding: 0;
    }
    .sidebar-header {
        display: none;
    }
    .admin-nav {
        display: flex;
        justify-content: space-around;
        flex-grow: 1;
        padding: 0;
    }
    .admin-nav-link {
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    .admin-nav-link:hover, .admin-nav-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--admin-primary);
    }
    .sidebar-footer {
        display: none;
    }
}