:root {
    /* Corporate Palette based on SPPME-A (Police Blue & Gold/Yellow) */
    --primary-color: #003366;
    /* Deep Police Blue */
    --secondary-color: #004080;
    /* Slightly lighter blue for headers */
    --accent-color: #cfb53b;
    /* Gold/Yellow accent (Old Gold) */
    --accent-hover: #b09525;

    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f0f2f5;
    --white: #ffffff;

    /* Functional Colors */
    --success-color: #27ae60;
    /* Green for Entrada */
    --danger-color: #c0392b;
    /* Red for Salida */

    --border-radius: 6px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    /* Full width header */
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--accent-color);
    /* Gold branding strip */
}

/* Header global is handled inline or via utility classes now, 
   but we reset some defaults to avoid double borders */
/* Header global is handled inline or via utility classes now */

.container {
    max-width: 1000px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    /* border-top: 5px solid var(--accent-color);  <-- RE MOVED global header has this now */
}

header h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.user-info {
    font-size: 0.95em;
    color: var(--text-light);
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #e9ecef;
}

.user-info b {
    color: var(--primary-color);
}

.user-info a {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 15px;
    transition: color 0.2s;
}

.user-info a:hover {
    color: #a93226;
}

/* Titles */
h1 {
    color: var(--primary-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
    margin-bottom: 30px;
}

h2 {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-sizing: border-box;
}

.btn:hover {
    background-color: #002244;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #95a5a6;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Dashboard Cards */
.dashboard-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 60px;
}

.card {
    background: #fff;
    padding: 50px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 350px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.card h2 {
    margin: 15px 0 5px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    margin: 0;
}

/* Years Grid */
.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.year-box {
    background: #fff;
    color: var(--primary-color);
    padding: 25px 15px;
    text-align: center;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.3rem;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.year-box:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-3px);
}

.year-box i {
    font-size: 1.5rem;
    color: #cbd5e0;
}

.year-box:hover i {
    color: var(--accent-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

tr:hover td {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 4px;
    background-color: #e2e8f0;
    color: var(--primary-color);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: var(--primary-color);
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: border-color 0.3s;
    background: #fafafa;
    box-sizing: border-box;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
}

/* Login Page Special */
.login-container {
    max-width: 450px;
    margin: 80px auto;
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top: 6px solid var(--primary-color);
}

.login-container h1 {
    border: none;
    padding: 0;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login-container button {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
    background-color: var(--accent-color);
    color: #000;
}

.login-container button:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

/* Back Link */
.back-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 15px;
    background: #f1f2f6;
    border-radius: 4px;
    transition: background 0.2s;
}


/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px 10px;
    }

    .dashboard-options {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 30px;
    }

    .card {
        width: 100%;
        max-width: 100%;
        padding: 30px;
    }

    /* Stack form grids */
    form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Tables horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .file-row {
        flex-direction: column;
    }

    .file-row input[type="text"] {
        width: 100%;
    }

    .years-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}