/* admin/admin.css - Professional Dashboard Theme */

:root {
    /* Brand Colors (UVAS Palette) */
    --primary: #8B0000;       /* Maroon */
    --primary-dark: #600000;
    --primary-light: #a53333;
    --secondary: #FFD700;     /* Gold */
    
    /* UI Colors */
    --bg-body: #f4f6f9;       /* Light Grey Background */
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
    
    /* Spacing & Effects */
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* --- 1. Reset & Global --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- 2. Layout & Header --- */
.admin-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    height: 70px;
    display: flex; align-items: center;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex; justify-content: space-between; align-items: center;
}

/* Brand */
.admin-brand { display: flex; align-items: center; gap: 12px; }
.logo { height: 40px; width: auto; }
.brand-title { font-weight: 700; font-size: 1.25rem; color: var(--primary); }

/* Navigation */
.admin-nav ul { display: flex; gap: 5px; }
.admin-nav a {
    padding: 10px 16px;
    font-weight: 500;
    border-radius: var(--radius);
    color: var(--text-dark);
    transition: all 0.2s;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem;
}
.admin-nav a:hover { background: #fff0f0; color: var(--primary); }
.admin-nav a.active { background: var(--primary); color: white; }

/* --- 3. Main Content Area --- */
.admin-main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: calc(100vh - 150px);
}

/* Page Titles */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}
.page-title { font-size: 1.75rem; color: var(--primary-dark); }

/* --- 4. Dashboard Widgets (Stats) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex; justify-content: space-between; align-items: center;
    border-left: 5px solid var(--primary);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-value { display: block; font-size: 2.2rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 5px; display: block; }
.stat-icon { font-size: 3rem; color: var(--border-color); opacity: 0.5; }

/* --- 5. Content Cards & Tables --- */
.content-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}
.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th {
    background: #f8f9fa;
    color: var(--primary-dark);
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
}
.table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background-color: #fffdfd; }

/* Table Images */
.table img {
    height: 40px; width: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* --- 6. Forms --- */
.form-container {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
}
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

/* --- 7. Buttons --- */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.btn-primary:hover { background-color: var(--primary-dark); }

/* Action Buttons (Edit/Delete) */
.action-btn {
    border: none;
    width: 32px; height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 5px;
    transition: 0.2s;
}
.action-btn.edit { background: #e3f2fd; color: #1565c0; }
.action-btn.edit:hover { background: #bbdefb; }
.action-btn.delete { background: #ffebee; color: #c62828; }
.action-btn.delete:hover { background: #ffcdd2; }

/* --- 8. Login Page Specifics --- */
.login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
    padding: 20px;
}
.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-header .logo { height: 60px; width: auto; margin-bottom: 15px; }
.brand-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; }

/* --- 9. Modal (Change Password) --- */
#password-modal {
    backdrop-filter: blur(2px);
}

/* --- 10. Responsive --- */
@media (max-width: 768px) {
    .container { flex-direction: column; gap: 15px; }
    .admin-nav ul { width: 100%; justify-content: center; flex-wrap: wrap; }
    .page-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .table-responsive { overflow-x: auto; }
}