:root {
    --primary-blue: #1e3a8a;
    --accent-gold: #d4af37;
    --dark-navy: #0f172a;
    --light-gray: #f8fafc;
    --border-gray: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--light-gray);
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-navy) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.login-header h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.logo-number {
    color: var(--accent-gold);
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-error {
    background: #fee;
    color: var(--danger);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--dark-navy);
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.temp-notice {
    background: #fef3c7;
    color: #92400e;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.temp-credentials {
    font-size: 0.85rem;
    color: var(--text-light);
}

.temp-credentials code {
    background: var(--light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background: var(--dark-navy);
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Main Content */
.admin-main {
    display: flex;
    flex-direction: column;
}

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

.admin-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.user-info {
    color: var(--text-light);
    font-size: 0.95rem;
}

.admin-content {
    padding: 30px;
    flex: 1;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.stat-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-link:hover {
    text-decoration: underline;
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.info-box ul {
    margin: 15px 0;
    padding-left: 25px;
}

.info-box li {
    margin: 8px 0;
}

.warning {
    background: #fef3c7;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Section Header */
.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Data Tables */
.data-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.data-table th {
    background: var(--light-gray);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-gray);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-gray);
}

.data-table tr:hover {
    background: var(--light-gray);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-edit {
    background: var(--primary-blue);
    color: white;
}

.btn-edit:hover {
    background: var(--dark-navy);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* Forms */
.admin-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--border-gray);
    color: var(--text-dark);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* Responsive */
@media (max-width: 968px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    .data-table td {
        padding: 10px;
    }
}

/* File Upload Styles */
.hidden-file-input {
    display: none !important;
}


.file-upload-text {
    font-style: italic;
    color: var(--text-light);
    margin-left: 10px;
}

/* Sortable Headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

th.sortable:hover {
    background-color: #cbd5e1;
    /* Slightly darker than light-gray */
}