/* ============================================================
   Solicitud Estudiantil — Ingeniería de Software
   Hoja de estilos principal (claro / oscuro, responsive)
   ============================================================ */

:root {
    --brand:        #1b3a6b;   /* azul institucional */
    --brand-2:      #2563eb;
    --brand-light:  #eaf0fb;
    --accent:       #0ea5e9;
    --ok:           #16a34a;
    --danger:       #dc2626;

    --bg:           #f4f6fb;
    --bg-soft:      #ffffff;
    --surface:      #ffffff;
    --text:         #1f2937;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --shadow:       0 10px 30px rgba(15, 23, 42, .08);
    --radius:       16px;
}

[data-bs-theme="dark"] {
    --brand:        #3b82f6;
    --brand-2:      #60a5fa;
    --brand-light:  #1e293b;
    --bg:           #0b1220;
    --bg-soft:      #111a2e;
    --surface:      #15203a;
    --text:         #e5e9f0;
    --text-muted:   #94a3b8;
    --border:       #243049;
    --shadow:       0 10px 30px rgba(0, 0, 0, .35);
}

* { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background .3s ease, color .3s ease;
}
.text-primary-2 { color: var(--brand) !important; }
.text-muted-2 { color: var(--text-muted) !important; }

/* ---------------------------- Navbar ---------------------------- */
.app-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.app-navbar .nav-link { color: var(--text); font-weight: 500; border-radius: 8px; padding: .4rem .7rem; }
.app-navbar .nav-link:hover { background: var(--brand-light); color: var(--brand); }
.brand-badge {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; display: grid; place-items: center; font-size: 1.2rem;
}
.navbar-brand { color: var(--text) !important; line-height: 1.1; }
.brand-sub { font-size: .68rem; color: var(--text-muted); }
.btn-theme {
    background: var(--brand-light); color: var(--brand);
    border: 1px solid var(--border); border-radius: 10px;
}
.btn-theme:hover { background: var(--brand); color: #fff; }

/* ---------------------------- Hero ---------------------------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #14203b 0%, #1b3a6b 55%, #2563eb 100%);
    color: #fff; padding: 5rem 0 7rem;
}
.hero-glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 80% 10%, rgba(14,165,233,.35), transparent),
        radial-gradient(500px 300px at 10% 90%, rgba(37,99,235,.35), transparent);
}
.hero-title { font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.7rem); line-height: 1.15; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.15rem); opacity: .92; max-width: 760px; margin: 1rem auto 1.8rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.badge-pill {
    display: inline-block; background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25); color: #fff;
    padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.counter-card {
    margin: 2.5rem auto 0; max-width: 340px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius);
    padding: 1.4rem; backdrop-filter: blur(6px);
}
.counter-number { font-size: 3rem; font-weight: 800; line-height: 1; }
.counter-label { opacity: .9; font-size: .9rem; margin-top: .3rem; }

/* On stats page the badge-pill needs brand colors */
.section-head .badge-pill { background: var(--brand-light); color: var(--brand); border-color: var(--border); }

/* ---------------------------- Aviso restricción ---------------------------- */
.alert-restriccion {
    margin-top: -3.5rem; position: relative; z-index: 3;
    background: var(--surface); border-left: 5px solid var(--accent);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.1rem 1.3rem; display: flex; gap: 1rem; align-items: flex-start;
}
.alert-restriccion i { font-size: 1.6rem; color: var(--accent); }

/* ---------------------------- Secciones ---------------------------- */
.section-title { font-weight: 800; color: var(--text); }
.section-desc { color: var(--text-muted); max-width: 680px; margin: .4rem auto 0; }

/* ---------------------------- Documento ---------------------------- */
.doc-card {
    position: relative; max-width: 880px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 2.2rem 2.4rem; overflow: hidden;
}
.doc-card p { text-align: justify; line-height: 1.8; margin-bottom: 1rem; }
.doc-watermark {
    position: absolute; right: -10px; bottom: -20px; font-size: 9rem;
    color: var(--brand); opacity: .04; pointer-events: none;
}

/* ---------------------------- Confidencialidad ---------------------------- */
.conf-card {
    max-width: 880px; background: linear-gradient(135deg, var(--brand-light), var(--surface));
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 2rem 2.2rem; position: relative;
}
.conf-card p { line-height: 1.7; margin-bottom: .8rem; font-size: .96rem; }
.conf-icon {
    width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
    background: var(--brand); color: #fff; font-size: 1.5rem; margin-bottom: 1rem;
}

/* ---------------------------- Formulario ---------------------------- */
.form-section { background: var(--bg-soft); }
.form-card {
    max-width: 100%; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem;
}
.form-label { font-weight: 600; font-size: .9rem; }
.form-control, .form-select {
    background: var(--bg); border-color: var(--border); color: var(--text);
}
.form-control:focus, .form-select:focus {
    background: var(--surface); border-color: var(--brand-2);
    box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); color: var(--text);
}
.comentarios-block {
    background: var(--bg); border: 1px dashed var(--border);
    border-radius: 12px; padding: 1.2rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: none; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.07); }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.success-box {
    background: rgba(22,163,74,.1); border: 1px solid var(--ok);
    border-radius: 12px; padding: 1.4rem; text-align: center; margin-bottom: 1.2rem;
}
.success-box i { font-size: 2.4rem; color: var(--ok); }

/* ---------------------------- Estadísticas ---------------------------- */
.stat-card, .chart-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem;
}
.stat-card { display: flex; align-items: center; gap: 1rem; }
.stat-ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.5rem; }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-lbl { color: var(--text-muted); font-size: .9rem; }
.bg-grad-1 { background: linear-gradient(135deg,#2563eb,#0ea5e9); }
.bg-grad-2 { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.bg-grad-3 { background: linear-gradient(135deg,#0d9488,#10b981); }
.bg-grad-4 { background: linear-gradient(135deg,#ea580c,#f59e0b); }

/* ---------------------------- Footer ---------------------------- */
.app-footer { background: var(--surface); border-top: 1px solid var(--border); }

/* ---------------------------- Login ---------------------------- */
.login-body {
    min-height: 100vh; display: grid; place-items: center;
    background: linear-gradient(135deg, #14203b, #1b3a6b 60%, #2563eb);
}
.login-wrap { width: 100%; max-width: 420px; padding: 1rem; }
.login-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.4rem 2rem; }
.login-logo {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; display: grid; place-items: center; font-size: 1.8rem;
}

/* ============================================================
   PANEL ADMIN
   ============================================================ */
.admin-body { background: var(--bg); }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 248px; background: var(--surface); border-right: 1px solid var(--border);
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040;
    transition: transform .25s ease; display: flex; flex-direction: column;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.2rem;
    border-bottom: 1px solid var(--border); color: var(--text);
}
.sidebar-brand i { font-size: 1.6rem; color: var(--brand); }
.sidebar-brand small { color: var(--text-muted); }
.sidebar-nav { padding: 1rem .8rem; display: flex; flex-direction: column; gap: .25rem; overflow-y: auto; }
.sidebar-nav a {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem;
    border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .94rem;
}
.sidebar-nav a:hover { background: var(--brand-light); color: var(--brand); }
.sidebar-nav a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.sidebar-nav a i { font-size: 1.1rem; }
.sidebar-sep { border-color: var(--border); margin: .6rem 0; }

.admin-main { flex: 1; margin-left: 248px; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .9rem 1.4rem; display: flex; align-items: center; gap: 1rem;
    position: sticky; top: 0; z-index: 1030;
}
.admin-user { font-size: .9rem; color: var(--text); }
.admin-content { padding: 1.6rem; }

.panel-card, .kpi-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem;
}
.kpi-card { display: flex; align-items: center; gap: 1rem; }
.kpi-ico { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; }
.kpi-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.kpi-lbl { color: var(--text-muted); font-size: .85rem; }

.table { color: var(--text); }
.table > :not(caption) > * > * { background: transparent; color: var(--text); }
.table thead th { color: var(--text-muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .03em; }

.comment-item { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: .9rem; background: var(--bg-soft); }
.comment-field { background: var(--bg); border-radius: 8px; padding: .6rem .8rem; height: 100%; }
.comment-field-lbl { display: block; font-size: .72rem; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: .2rem; }

.report-tile { border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; text-align: center; height: 100%; background: var(--bg-soft); }
.report-ico { font-size: 2.4rem; display: block; margin-bottom: .5rem; }

/* ---------------------------- Animaciones ---------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.animate-up { animation: fadeUp .7s ease both; }
.delay-1 { animation-delay: .12s; }
.delay-2 { animation-delay: .24s; }
.delay-3 { animation-delay: .36s; }

/* ---------------------------- Responsive ---------------------------- */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .doc-card, .conf-card { padding: 1.4rem; }
}
@media (max-width: 575.98px) {
    .hero { padding: 3.5rem 0 6rem; }
    .form-card { padding: 1.3rem; }
}
