/*
 * Admin Panel Main Stylesheet
 * A clean, modern, and professional light theme.
 */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css');

:root {
    --admin-bg-light: #f4f7f9; /* Light gray background */
    --admin-surface-light: #ffffff; /* White surface for cards, sidebar */
    --admin-border-light: #e0e5ec; /* Soft border color */
    --admin-text-primary: #2d3748; /* Dark text for high contrast */
    --admin-text-secondary: #718096; /* Lighter text for muted info */
    --admin-primary: #4a5568; /* A neutral, professional primary color */
    --admin-primary-active: #2d3748;
    --admin-success: #38a169;
    --admin-danger: #e53e3e;
    --admin-warning: #dd6b20;
    --admin-info: #3182ce;
}

body.admin-theme {
    background-color: var(--admin-bg-light);
    color: var(--admin-text-primary);
    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: 250px;
    background-color: var(--admin-surface-light);
    border-right: 1px solid var(--admin-border-light);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}

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

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

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

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

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

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    color: var(--admin-text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

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

.admin-nav-link.active {
    background-color: var(--admin-primary);
    color: #ffffff;
    font-weight: 700;
}

.admin-nav-link.active:hover {
    color: #ffffff;
    background-color: var(--admin-primary-active);
}
.admin-nav-link.active i {
 color: #ffffff;
}

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

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

/* --- 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: 1.8rem;
    font-weight: 700;
}

/* --- General Components --- */
.card {
    background-color: var(--admin-surface-light);
    border: 1px solid var(--admin-border-light);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

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

.card-body {
    padding: 1.5rem;
}

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

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

.table th {
    font-weight: 700;
    color: var(--admin-text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--admin-primary-active);
    border-color: var(--admin-primary-active);
    color: #fff;
}
.btn-primary:hover {
    background-color: #2c3e50; /* Slightly darker */
}

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

/* --- Stat Cards --- */
.stat-card {
    background-color: var(--admin-surface-light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--admin-border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.stat-card .icon {
    font-size: 1.8rem;
    padding: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

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

.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); }


/* --- Chart Container --- */
.chart-container {
    background-color: var(--admin-surface-light);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--admin-border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.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-primary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--admin-surface-light);
    border: 1px solid var(--admin-border-light);
    color: var(--admin-text-primary);
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
}

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

/* Admin Login Page */
.admin-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background-color: var(--admin-bg-light);
}

.admin-login-box {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    background: var(--admin-surface-light);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.admin-login-box h2 {
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.admin-login-box p {
    text-align: center;
    color: var(--admin-text-secondary);
    margin-bottom: 2rem;
}

/* Responsive adjustments will be added later if needed */

