/* =====================================================================
   REPORTE DE FALLAS I.D - Hoja de estilos
   Paleta y tipografía institucional del Colegio Gonzaga.
   ===================================================================== */

/* ============ 🎨 CAMBIAR COLOR PRINCIPAL AQUÍ ============ */
:root {
    /* ============ 🎨 COLORES ============ */
    --color-primary: #123F85;        /* Azul profundo - principal */
    --color-primary-dark: #0C2F66;   /* Versión oscura del primario */
    --color-accent: #C11734;         /* Rojo - acentos */
    --color-accent-light: #E84A66;   /* Rojo claro */
    --color-bg: #FAF7F2;             /* Crema - fondo general */
    --color-bg-alt: #F2EDE3;         /* Crema alternativo */
    --color-text: #2A2A2A;           /* Texto principal */
    --color-text-soft: #5A5A5A;      /* Texto secundario */
    --color-border: #E5DED1;         /* Bordes suaves */
    --color-success: #4A8B6F;        /* Verde para éxito */
    --color-error: #B85450;          /* Rojo para errores */

    /* ============ 📝 TIPOGRAFÍAS ============ */
    --font-display: 'Montserrat', -apple-system, sans-serif;
    --font-body: 'Montserrat', -apple-system, sans-serif;

    /* Sombras y radios reutilizables */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(18, 63, 133, 0.06);
    --shadow-md: 0 4px 16px rgba(18, 63, 133, 0.08);
    --shadow-lg: 0 12px 32px rgba(18, 63, 133, 0.12);
}

/* ============ RESET BÁSICO ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 0 0 .5em;
    line-height: 1.2;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

/* ============ FONDO DECORATIVO ============ */
/* >>> CAMBIAR FONDO AQUÍ <<< */
.fondo-decorativo {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 8%,  rgba(18, 63, 133, 0.08) 0, transparent 38%),
        radial-gradient(circle at 88% 92%, rgba(193, 23, 52, 0.06) 0, transparent 38%),
        radial-gradient(circle at 92% 12%, rgba(18, 63, 133, 0.04) 0, transparent 40%);
}

/* ============ HEADER ============ */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
}
.logo img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}
.logo-texto { display: flex; flex-direction: column; line-height: 1.15; }
.logo-titulo {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 1rem;
}
.logo-sub {
    font-size: .78rem;
    color: var(--color-text-soft);
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.nav-link {
    padding: .55rem .95rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .92rem;
    color: var(--color-primary-dark);
    transition: background .2s, color .2s;
}
.nav-link:hover {
    background: rgba(18, 63, 133, 0.08);
    color: var(--color-primary-dark);
}
.nav-link-secundario {
    color: var(--color-text-soft);
}
.nav-usuario {
    font-size: .88rem;
    color: var(--color-text-soft);
    padding: 0 .5rem;
}

/* ============ MAIN ============ */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

/* ============ FOOTER ============ */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-soft);
    font-size: .85rem;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.5);
}
.site-footer p { margin: 0; }

/* ============ TARJETAS ============ */
.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeUp .45s ease both;
}
.card-compact { padding: 1.25rem; border-radius: var(--radius-md); }
.card-titulo {
    font-size: 1.6rem;
    margin-bottom: .35rem;
}
.card-sub {
    color: var(--color-text-soft);
    margin-bottom: 1.5rem;
}

/* ============ FORMULARIOS ============ */
.form-group { margin-bottom: 1.15rem; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
label {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    color: var(--color-text);
    margin-bottom: .35rem;
}
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: .75rem .95rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(18, 63, 133, 0.12);
}
textarea { min-height: 140px; resize: vertical; }
.input-error { border-color: var(--color-error); }
.error-msg {
    color: var(--color-error);
    font-size: .85rem;
    margin-top: .35rem;
    font-weight: 500;
}

/* ============ BOTONES ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.6rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secundario {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}
.btn-secundario:hover { background: var(--color-primary); color: #fff; }
.btn-peligro {
    background: var(--color-accent);
    color: #fff;
}
.btn-peligro:hover { background: var(--color-accent-light); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }
.btn-block { width: 100%; }

/* ============ MENSAJES FLASH ============ */
.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid transparent;
    animation: fadeUp .35s ease both;
}
.flash-exito {
    background: rgba(74, 139, 111, 0.12);
    color: var(--color-success);
    border-color: rgba(74, 139, 111, 0.3);
}
.flash-error {
    background: rgba(184, 84, 80, 0.1);
    color: var(--color-error);
    border-color: rgba(184, 84, 80, 0.3);
}
.flash-info {
    background: rgba(18, 63, 133, 0.08);
    color: var(--color-primary-dark);
    border-color: rgba(18, 63, 133, 0.2);
}

/* ============ BADGES ESTATUS ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.badge-pendiente {
    background: rgba(193, 23, 52, 0.1);
    color: var(--color-accent);
}
.badge-proceso {
    background: rgba(18, 63, 133, 0.1);
    color: var(--color-primary);
}
.badge-finalizado {
    background: rgba(74, 139, 111, 0.13);
    color: var(--color-success);
}

/* ============ CONFIRMACIÓN DE TICKET ============ */
.numero-ticket {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: .05em;
    margin: 1.25rem 0;
    box-shadow: var(--shadow-md);
}
.numero-ticket small {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .15em;
    opacity: .8;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

/* ============ HERO / INTROS ============ */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}
.hero .badge-titulo {
    display: inline-block;
    background: rgba(18, 63, 133, 0.08);
    color: var(--color-primary);
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero-sub {
    color: var(--color-text-soft);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============ COLUMNAS / KANBAN ============ */
.kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 900px) {
    .kanban { grid-template-columns: 1fr; }
}
.kanban-col {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 200px;
}
.kanban-col-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1.5px solid var(--color-border);
}
.kanban-col-titulo .contador {
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
}

/* ============ TICKET CARD (en kanban) ============ */
.ticket-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    animation: fadeUp .35s ease both;
}
.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.ticket-card-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}
.ticket-card-numero {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: .88rem;
    letter-spacing: .02em;
}
.ticket-card-fecha {
    font-size: .75rem;
    color: var(--color-text-soft);
}
.ticket-card-titulo {
    font-weight: 600;
    margin: .25rem 0;
    color: var(--color-text);
    font-size: .95rem;
}
.ticket-card-desc {
    color: var(--color-text-soft);
    font-size: .85rem;
    margin: 0 0 .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ticket-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .78rem;
    color: var(--color-text-soft);
    margin-bottom: .65rem;
}
.ticket-card-meta span { background: var(--color-bg-alt); padding: .15rem .55rem; border-radius: 4px; }
.ticket-card-acciones {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-border);
    padding-top: .65rem;
}
.ticket-card-acciones select {
    flex: 1;
    min-width: 110px;
    padding: .35rem .5rem;
    font-size: .8rem;
}

/* ============ ESTADO VACÍO ============ */
.vacio {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-soft);
    font-size: .9rem;
}
.vacio-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
    opacity: .4;
}

/* ============ STATS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    animation: fadeUp .4s ease both;
}
.stat-label {
    font-size: .82rem;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.stat-valor {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1;
}
.stat-extra {
    font-size: .85rem;
    color: var(--color-text-soft);
    margin-top: .35rem;
}

/* ============ TABLAS (estadísticas) ============ */
.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.tabla th, .tabla td {
    text-align: left;
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
}
.tabla th {
    background: var(--color-bg-alt);
    color: var(--color-primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .05em;
}
.tabla tbody tr:hover { background: rgba(18, 63, 133, 0.03); }

/* ============ VISTA DE IMPRESIÓN ============ */
.print-doc {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}
.print-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--color-primary);
    gap: 1rem;
    flex-wrap: wrap;
}
.print-cabecera img { width: 60px; height: 60px; }
.print-institucion h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-primary-dark);
}
.print-institucion p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: .9rem;
}
.print-numero {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.3rem;
}
.print-numero small {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .25rem;
}
.print-bloque {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.print-bloque h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-soft);
    margin-bottom: .35rem;
}
.print-bloque p { margin: 0; font-size: 1rem; }
.print-bloque .grande { font-size: 1.05rem; font-weight: 500; }
.print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.print-pie {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: .8rem;
    color: var(--color-text-soft);
    text-align: center;
}
.print-acciones {
    text-align: center;
    margin: 1.5rem 0;
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ MEDIA PRINT ============ */
@media print {
    .site-header, .site-footer, .site-nav, .print-acciones, .fondo-decorativo, .flash { display: none !important; }
    body { background: #fff; }
    .site-main { padding: 0; max-width: 100%; }
    .print-doc {
        box-shadow: none;
        border: none;
        padding: 1rem;
        page-break-inside: avoid;
    }
    .print-bloque { background: transparent; border-left-color: #999; }
    a { color: inherit; }
}

/* ============ LOGIN ============ */
.login-wrapper {
    max-width: 420px;
    margin: 3rem auto;
}

/* ============ CONSULTA RESULTADO ============ */
.consulta-resultado {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    animation: fadeUp .4s ease both;
}
.consulta-resultado h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============ ANIMACIONES ============ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Aparición escalonada de tarjetas de tickets */
.kanban-col .ticket-card:nth-child(1)  { animation-delay: 0.02s; }
.kanban-col .ticket-card:nth-child(2)  { animation-delay: 0.06s; }
.kanban-col .ticket-card:nth-child(3)  { animation-delay: 0.10s; }
.kanban-col .ticket-card:nth-child(4)  { animation-delay: 0.14s; }
.kanban-col .ticket-card:nth-child(5)  { animation-delay: 0.18s; }
.kanban-col .ticket-card:nth-child(6)  { animation-delay: 0.22s; }
.kanban-col .ticket-card:nth-child(7)  { animation-delay: 0.26s; }
.kanban-col .ticket-card:nth-child(8)  { animation-delay: 0.30s; }
.kanban-col .ticket-card:nth-child(n+9){ animation-delay: 0.32s; }

.stats-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.08s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.14s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.20s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.26s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.32s; }

/* ============ RESPONSIVE PEQUEÑO ============ */
@media (max-width: 600px) {
    .site-header { padding: 0.7rem 1rem; }
    .site-main   { padding: 1.5rem 1rem 2rem; }
    .card        { padding: 1.5rem 1.25rem; }
    .logo-titulo { font-size: .92rem; }
    .logo-sub    { font-size: .72rem; }
    .nav-link    { padding: .45rem .7rem; font-size: .85rem; }
    .nav-usuario { display: none; }
    .print-doc   { padding: 1.5rem 1rem; }
    .print-grid  { grid-template-columns: 1fr; }
}
