/* ============================================================
   style.css — Sistema de Gestión de Calificaciones
   Shared stylesheet for index.php and resultados.php
   ============================================================ */

/* ── Variables & Reset ──────────────────────────────────── */
:root {
    --cyan:  #22D3EE;
    --blue:  #2563EB;
    --white: #FFFFFF;
}

/* ── Tipografía ─────────────────────────────────────────── */
h1, h2, h3, h4, .font-display {
    font-family: 'Hammersmith One', sans-serif;
}

body, p, label, input, button, td, th, span, li {
    font-family: 'Clear Sans', 'Trebuchet MS', sans-serif;
}

/* ── Fondo con malla de gradiente ───────────────────────── */
body {
    background-color: #0f172a;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(34,211,238,.18) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(37,99,235,.22) 0%, transparent 55%);
    min-height: 100vh;
}

/* resultados.php shifts the gradient slightly */
body.page-resultados {
    background-image:
        radial-gradient(ellipse at 10% 5%,  rgba(34,211,238,.15) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, rgba(37,99,235,.20) 0%, transparent 50%);
}

.page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
}

.navbar-component,
.footer-component {
    width: 100%;
    max-width: 1100px;
}

.navbar-inner,
.footer-component {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    color: #fff;
    text-decoration: none;
}

.navbar-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #0f172a;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.navbar-brand-image {
    display: block;
    width: 2.75rem;
    height: auto;
}

.navbar-brand-text strong {
    font-size: 1rem;
    display: block;
}

.navbar-brand-text small {
    display: block;
    color: rgba(255,255,255,.75);
    font-size: .78rem;
}

.navbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.navbar-links a {
    color: rgba(255,255,255,.80);
    text-decoration: none;
    font-size: .95rem;
    transition: color .2s ease;
}

.navbar-links a:hover {
    color: #fff;
}

.footer-component {
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.footer-copy {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,.75);
    transition: color .2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-icon {
    width: 24px;
    height: 24px;
}

/* ── Tarjeta de cristal ─────────────────────────────────── */
.glass {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-light {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
}

/* ── Accent line ────────────────────────────────────────── */
.accent-line {
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 2px;
}

/* ── Header badge ───────────────────────────────────────── */
.badge {
    background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(37,99,235,.2));
    border: 1px solid rgba(34,211,238,.35);
    color: var(--cyan);
    font-size: .7rem;
    letter-spacing: .1em;
    padding: .2rem .7rem;
    border-radius: 99px;
}

/* ── Page animations ────────────────────────────────────── */
.page-enter {
    animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Row animations (index.php) ─────────────────────────── */
.row-appear {
    animation: rowIn .3s ease both;
}

@keyframes rowIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ── Row stripe (index.php) ─────────────────────────────── */
.row-stripe:nth-child(odd) {
    background: rgba(255,255,255,.025);
}

/* ── Inputs (index.php) ─────────────────────────────────── */
.inp {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    border-radius: .5rem;
    padding: .45rem .75rem;
    width: 100%;
    font-size: .875rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.inp:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,.18);
}

.inp::placeholder {
    color: rgba(255,255,255,.3);
}

/* Remove number input arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ── Botón principal ────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-family: 'Hammersmith One', sans-serif;
    letter-spacing: .05em;
    border-radius: .6rem;
    padding: .75rem 2.5rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 24px rgba(37,99,235,.35);
}

.btn-primary:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(34,211,238,.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ── Stat cards (resultados.php) ────────────────────────── */
.stat-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

.stat-value {
    font-family: 'Hammersmith One', sans-serif;
    font-size: 2.25rem;
    line-height: 1;
}

/* ── Table styles (resultados.php) ──────────────────────── */
.tbl-head th {
    font-family: 'Hammersmith One', sans-serif;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    padding: .7rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.tbl-row td {
    padding: .7rem 1rem;
    font-size: .875rem;
    color: rgba(255,255,255,.85);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.tbl-row:last-child td {
    border-bottom: none;
}

.tbl-row:hover td {
    background: rgba(255,255,255,.03);
}

/* ── Progress bar (resultados.php) ──────────────────────── */
.bar-track {
    background: rgba(255,255,255,.08);
    border-radius: 99px;
    height: 8px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transition: width .6s ease;
}

/* ── Letter grade badge (resultados.php) ────────────────── */
.letra-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .4rem;
    border: 1px solid;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 1rem;
}

.letra-a { color: #22D3EE; border-color: rgba(34,211,238,.4); }
.letra-b { color: #60a5fa; border-color: rgba(96,165,250,.4); }
.letra-c { color: #facc15; border-color: rgba(250,204,21,.4); }
.letra-d { color: #fb923c; border-color: rgba(251,146,60,.4); }
.letra-f { color: #f87171; border-color: rgba(248,113,113,.4); }

/* ── Status pill (resultados.php) ───────────────────────── */
.pill {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .15rem .65rem;
    border-radius: 99px;
}

.pill-ok   { background: rgba(34,211,238,.15); color: #22D3EE; border: 1px solid rgba(34,211,238,.3); }
.pill-fail { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.3); }

/* ── Warning items (resultados.php) ─────────────────────── */
.warn-item {
    background: rgba(251,191,36,.08);
    border-left: 3px solid #fbbf24;
    padding: .5rem .75rem;
    border-radius: 0 .4rem .4rem 0;
    color: #fcd34d;
    font-size: .8rem;
}

/* ── Failed students list (resultados.php) ──────────────── */
.fail-item {
    background: rgba(248,113,113,.07);
    border: 1px solid rgba(248,113,113,.2);
    border-radius: .6rem;
    padding: .6rem 1rem;
    color: #fca5a5;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.fail-num {
    font-family: 'Hammersmith One', sans-serif;
    color: #f87171;
    min-width: 1.5rem;
}
