/* 
 * Aula Virtual - Main Stylesheet
 * --------------------------------
 * Responsive, Agile, Corporate Identity
 */

:root {
    /* Corporate Colors - Policia Local Castilla la Mancha */
    --color-blue: #002654;
    /* Pantone 280 C */
    --color-blue-dark: #001a3d;
    --color-blue-light: #1e4b8a;

    --color-yellow: #f4d03f;
    /* Corporate Yellow */
    --color-yellow-hover: #eac124;

    --color-accent: #3498db;
    /* Light Blue Accent */
    --color-red: #c0392b;
    /* Alert/Danger */
    --color-green: #27ae60;
    /* Success/Pass */

    /* Functional Mappings */
    --primary: var(--color-blue);
    --primary-hover: var(--color-blue-dark);
    --secondary: var(--color-yellow);
    --accent: var(--color-accent);
    --text-main: #2c3e50;
    --text-light: #64748b;
    --text-white: #ffffff;

    --bg-body: #f1f5f9;
    /* Light Gray Background */
    --bg-white: #ffffff;
    --bg-sidebar: var(--color-blue);

    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
}

/* Base & Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--primary);
    margin-top: 0;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: var(--color-accent);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--color-blue-dark);
}

.btn-secondary:hover {
    background-color: var(--color-yellow-hover);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    border: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: #f8fafc;
    transition: 0.2s border-color, 0.2s box-shadow;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

/* Layout: Authentication (Login) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 5px solid var(--secondary);
}

.auth-logo {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    padding: 5px;
    margin: -70px auto 1rem;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--secondary);
    object-fit: contain;
}

/* Dashboard Cards (Backend Style Port) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 col */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet: 2 cols */
    }
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Desktop: 3 cols */
    }
}

.dash-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    /* For when used as anchor */
    color: inherit;
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dash-header {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-body {
    flex: 1;
    padding: 1.25rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.dash-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fff;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}