/**
 * Tabora Boys Secondary School — Admin & Form Styles
 * Unified stylesheet for all admin/management pages.
 * Uses the school's Khaki + Gold palette from main.css variables.
 * Load order: after main.css, navbar.css, animations.css
 */

/* ============================================================
   ADMIN PAGE WRAPPERS
   ============================================================ */
.admin-page-wrapper,
.form-container,
.dashboard-container,
.profile-container {
    min-height: 80vh;
    background: linear-gradient(
        135deg,
        var(--light-bg) 0%,
        rgba(168, 144, 112, 0.15) 50%,
        rgba(212, 160, 23, 0.08) 100%
    );
    padding: 140px 0 80px;
}

/* ============================================================
   ADMIN / FORM CARDS
   ============================================================ */
.form-card,
.admin-card,
.profile-card,
.dashboard-header {
    background: #ffffff;
    border-radius: 20px;
    padding: 45px 40px;
    box-shadow: 0 8px 40px rgba(61, 46, 24, 0.10);
    border: 1px solid rgba(212, 160, 23, 0.12);
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.form-card::before,
.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--khaki-primary), var(--gold-primary), var(--khaki-soft));
}

/* Dashboard header — full width */
.dashboard-header {
    max-width: 100%;
    margin-bottom: 30px;
    padding: 30px 35px;
}

/* ============================================================
   FORM HEADER
   ============================================================ */
.form-header,
.admin-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(212, 160, 23, 0.15);
}

.form-header h1,
.form-header h2,
.admin-header h1,
.admin-header h2 {
    color: var(--khaki-dark);
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1.85rem;
}

.form-header h1 i,
.form-header h2 i,
.admin-header h1 i {
    color: var(--gold-primary);
    margin-right: 10px;
    filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.3));
}

.form-header p,
.admin-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* ============================================================
   FORM GROUPS & LABELS
   ============================================================ */
.form-group {
    margin-bottom: 26px;
    position: relative;
}

.form-label,
.form-group label {
    display: block;
    color: var(--khaki-dark);
    font-weight: 600;
    margin-bottom: 9px;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.form-label i,
.form-group label i {
    color: var(--gold-primary);
    margin-right: 6px;
    font-size: 0.85rem;
}

/* Required star */
.form-label .text-danger,
.form-group label .text-danger {
    color: #dc2626 !important;
    margin-left: 3px;
}

/* ============================================================
   INPUT FIELDS — Django renders inputs without classes,
   so we target all relevant input types globally
   ============================================================ */

/* All text-like inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e4ddd0;
    border-radius: 12px;
    font-family: 'Inter', 'Outfit', system-ui, sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #fdfcfa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 2px 6px rgba(61, 46, 24, 0.04);
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--gold-primary);
    background-color: #fffef9;
    box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.12), 0 2px 8px rgba(61, 46, 24, 0.06);
    color: var(--khaki-dark);
}

/* Disabled / readonly */
input[disabled],
input[readonly],
textarea[disabled],
select[disabled] {
    background-color: #f3ede3;
    color: var(--text-muted);
    border-color: #d9cfc0;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Textarea */
textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

/* Select dropdown custom arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C4B2C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 44px;
    cursor: pointer;
}

/* Password field — extra right padding for the toggle icon */
input[type="password"],
.password-field {
    padding-right: 50px;
}

/* File input */
input[type="file"] {
    padding: 10px 14px;
    border: 2px dashed #c9bfa8;
    border-radius: 12px;
    background: #fdf8f0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.88rem;
    width: 100%;
    transition: all 0.3s ease;
}

input[type="file"]:hover,
input[type="file"]:focus {
    border-color: var(--gold-primary);
    background: #fffef5;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.10);
    outline: none;
}

/* Checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    border: 2px solid #c9bfa8;
    border-radius: 5px;
    background: #fdfcfa;
    cursor: pointer;
    accent-color: var(--gold-primary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18);
    outline: none;
    border-color: var(--gold-primary);
}

/* ============================================================
   FORM CHECK (checkbox rows)
   ============================================================ */
.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(212, 160, 23, 0.05);
    border: 1px solid rgba(212, 160, 23, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.form-check:hover {
    background: rgba(212, 160, 23, 0.09);
}

.form-check-label {
    color: var(--khaki-dark);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.93rem;
}

/* ============================================================
   INPUT ICON OVERLAYS (for login page)
   ============================================================ */
.input-icon {
    position: absolute;
    right: 16px;
    top: 42px;
    color: #c9bfa8;
    transition: color 0.3s ease;
    pointer-events: none;
    font-size: 0.95rem;
}

.input-icon.clickable {
    pointer-events: auto;
    cursor: pointer;
}

.input-icon.clickable:hover,
input:focus ~ .input-icon {
    color: var(--gold-primary);
}

/* ============================================================
   ERROR & HELP TEXT
   ============================================================ */
.field-error {
    color: #dc2626;
    font-size: 0.84rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideInError 0.25s ease;
}

@keyframes slideInError {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.help-text,
.form-text {
    color: var(--text-muted);
    font-size: 0.84rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.help-text i,
.form-text i {
    color: var(--khaki-light);
    font-size: 0.8rem;
}

/* Error message box (non-field errors) */
.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid #dc2626;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FORM ACTIONS (button row)
   ============================================================ */
.form-actions {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   BUTTONS — ADMIN THEME
   ============================================================ */

/* Primary submit button */
.btn-submit,
.btn-login,
.btn-save,
.btn-admin-primary {
    background: linear-gradient(135deg, var(--khaki-primary), var(--khaki-soft));
    color: var(--white);
    border: none;
    padding: 14px 34px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(92, 75, 44, 0.28);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-submit::after,
.btn-login::after,
.btn-save::after,
.btn-admin-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 160, 23, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-submit:hover::after,
.btn-login:hover::after,
.btn-save:hover::after,
.btn-admin-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-submit:hover,
.btn-login:hover,
.btn-save:hover,
.btn-admin-primary:hover {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-deep));
    color: var(--khaki-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(212, 160, 23, 0.40);
}

.btn-submit:active,
.btn-login:active,
.btn-save:active {
    transform: translateY(0);
}

/* Full-width button variant */
.btn-submit.full-width,
.btn-login,
.btn-admin-primary.full-width {
    width: 100%;
    justify-content: center;
}

/* Cancel / secondary button */
.btn-cancel,
.btn-admin-secondary {
    background: rgba(92, 75, 44, 0.08);
    color: var(--khaki-dark);
    border: 2px solid rgba(92, 75, 44, 0.2);
    padding: 13px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-cancel:hover,
.btn-admin-secondary:hover {
    background: rgba(92, 75, 44, 0.14);
    border-color: var(--khaki-primary);
    color: var(--khaki-dark);
    transform: translateY(-2px);
}

/* Danger button */
.btn-admin-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-admin-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    color: white;
}

/* Logout button */
.logout-btn {
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    color: white;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-container .container {
    padding-top: 10px;
}

.dashboard-header h1 {
    color: var(--khaki-dark);
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 1.7rem;
}

.dashboard-header p {
    color: var(--text-muted);
    margin: 0;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Stat card (dashboard) — override the generic home one */
.dashboard-container .stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(61, 46, 24, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 160, 23, 0.08);
}

.dashboard-container .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.dashboard-container .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(61, 46, 24, 0.12);
}

.dashboard-container .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--khaki-dark);
    margin-bottom: 6px;
    line-height: 1;
}

.dashboard-container .stat-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.dashboard-container .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: white;
}

/* ============================================================
   ACTION CARD (Quick Actions panel)
   ============================================================ */
.action-card.dashboard-actions {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(61, 46, 24, 0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(212, 160, 23, 0.08);
}

.action-card.dashboard-actions h3 {
    color: var(--khaki-dark);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-card.dashboard-actions h3 i {
    color: var(--gold-primary);
}

/* ============================================================
   RECENT SECTIONS
   ============================================================ */
.recent-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(61, 46, 24, 0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(212, 160, 23, 0.08);
}

.recent-section h3 {
    color: var(--khaki-dark);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-section h3 i {
    color: var(--gold-primary);
}

.recent-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    transition: padding-left 0.2s ease;
}

.recent-item:last-child { border-bottom: none; }
.recent-item:hover { padding-left: 8px; }

.recent-item h5 {
    color: var(--khaki-dark);
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.recent-item p {
    color: var(--text-muted);
    font-size: 0.84rem;
    margin: 0;
}

/* Chart container */
.chart-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(61, 46, 24, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.08);
}

/* ============================================================
   MANAGE / LIST TABLES
   ============================================================ */
.manage-container {
    min-height: 80vh;
    background: var(--light-bg);
    padding: 140px 0 60px;
}

.manage-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 35px rgba(61, 46, 24, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.10);
    position: relative;
    overflow: hidden;
}

.manage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--khaki-primary), var(--gold-primary));
}

.manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 160, 23, 0.15);
}

.manage-header h1 {
    color: var(--khaki-dark);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.manage-header h1 i { color: var(--gold-primary); }

/* ============================================================
   CONFIRM DELETE PAGES
   ============================================================ */
.confirm-delete-container,
.delete-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    padding: 140px 20px 60px;
}

.confirm-delete-card,
.delete-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(61, 46, 24, 0.12);
    text-align: center;
    border: 1px solid rgba(220, 38, 38, 0.15);
    position: relative;
    overflow: hidden;
}

.confirm-delete-card::before,
.delete-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #f97316);
}

.confirm-delete-icon,
.delete-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.2rem;
    color: #dc2626;
    animation: pulse-danger 2s ease-in-out infinite;
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
    50%       { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
}

.confirm-delete-card h2,
.delete-card h2 {
    color: var(--khaki-dark);
    font-weight: 800;
    margin-bottom: 12px;
    font-size: 1.6rem;
}

.confirm-delete-card p,
.delete-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.confirm-delete-actions,
.delete-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   PROFILE / AVATAR
   ============================================================ */
.profile-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(212, 160, 23, 0.15);
}

.profile-header h2 {
    color: var(--khaki-dark);
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-header p {
    color: var(--text-muted);
    margin: 0;
}

.avatar-preview {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--gold-primary);
    box-shadow: 0 0 0 6px rgba(212, 160, 23, 0.15);
    transition: box-shadow 0.3s ease;
}

.avatar-preview:hover {
    box-shadow: 0 0 0 8px rgba(212, 160, 23, 0.2);
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--khaki-primary), var(--gold-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

/* Profile widget (dashboard sidebar) */
.profile-widget {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(61, 46, 24, 0.08);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(212, 160, 23, 0.08);
}

.profile-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--khaki-primary), var(--gold-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    border: 3px solid rgba(212, 160, 23, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================================
   LOGIN PAGE SPECIFIC
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--khaki-dark)   0%,
        var(--khaki-primary) 50%,
        var(--khaki-soft)   100%
    );
    padding: 140px 20px 80px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.07) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
    pointer-events: none;
}

@keyframes moveGrid {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 100%;
    max-width: 490px;
    padding: 52px 44px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.login-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.32);
}

.login-header {
    text-align: center;
    margin-bottom: 38px;
}

.login-header .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--khaki-primary), var(--gold-primary));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(92, 75, 44, 0.35);
    animation: pulse-logo 2.5s ease-in-out infinite;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.login-header .icon-wrapper i {
    font-size: 2.4rem;
    color: white;
}

.login-header h2 {
    color: var(--khaki-dark);
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 1.8rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.93rem;
    font-weight: 500;
}

/* Override the global input style inside login card for tighter fit */
.login-card input[type="text"],
.login-card input[type="password"],
.login-card select {
    padding: 13px 48px 13px 16px;
}

/* ============================================================
   FOOTER ALWAYS-ON — ensure dark footer shows on all pages
   ============================================================ */

/* Ensure body background doesn't bleed into footer */
.site-footer {
    position: relative;
    z-index: 10;
}

/* Sub-pages that define a custom body background shouldn't
   make the footer transparent or unstyled */
body.sub-page .site-footer,
.site-footer {
    background: var(--khaki-dark) !important;
    color: var(--white) !important;
    border-top: 3px solid var(--gold-primary) !important;
}

/* ============================================================
   RESPONSIVE — Admin pages
   ============================================================ */
@media (max-width: 768px) {
    .admin-page-wrapper,
    .form-container,
    .dashboard-container,
    .profile-container,
    .manage-container,
    .confirm-delete-container,
    .delete-container,
    .login-container {
        padding: 110px 15px 40px;
    }

    .form-card,
    .admin-card,
    .profile-card,
    .manage-card {
        padding: 25px 20px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
    }

    .form-header h1,
    .form-header h2,
    .admin-header h1,
    .admin-header h2,
    .manage-header h1 {
        font-size: 1.4rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-submit,
    .btn-cancel,
    .btn-save,
    .btn-admin-primary,
    .btn-admin-secondary {
        width: 100%;
        justify-content: center;
    }

    .login-card {
        padding: 30px 20px;
    }

    .confirm-delete-card,
    .delete-card {
        padding: 30px 20px;
    }

    .confirm-delete-actions,
    .delete-actions {
        flex-direction: column;
    }

    .confirm-delete-actions .btn-cancel,
    .confirm-delete-actions .btn-admin-danger,
    .delete-actions .btn-cancel,
    .delete-actions .btn-admin-danger {
        width: 100%;
        justify-content: center;
    }

    .manage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

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

    .action-card.dashboard-actions .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 20px 15px;
    }

    .dashboard-header h1 {
        font-size: 1.3rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
