* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f1f4f9;
    color: #1e293b;
    min-height: 100vh;
}

/* ---------- LOGIN ---------- */
.login-body {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    padding: 20px;
}
.login-card {
    background: #fff; width: 100%; max-width: 380px;
    padding: 40px 30px; border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.logo { font-size: 48px; text-align: center; }
.login-card h1 { text-align: center; font-size: 1.5rem; margin-top: 10px; }
.sub { text-align: center; color: #64748b; margin-bottom: 25px; }
.login-card label { display: block; font-size: .9rem; font-weight: 600; margin: 15px 0 6px; }
.login-card input {
    width: 100%; padding: 12px 14px; font-size: 1rem;
    border: 2px solid #e2e8f0; border-radius: 10px; outline: none; transition: .2s;
}
.login-card input:focus { border-color: #0ea5e9; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.ver-pass {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 1.1rem;
}
.btn {
    width: 100%; margin-top: 25px; padding: 13px; font-size: 1rem; font-weight: 600;
    background: #1e3a8a; color: #fff; border: none; border-radius: 10px; cursor: pointer; transition: .2s;
}
.btn:hover { background: #0ea5e9; }
.alerta {
    background: #fee2e2; color: #b91c1c; padding: 10px;
    border-radius: 8px; text-align: center; font-size: .9rem;
}

/* ---------- PANEL ---------- */
.topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: #1e3a8a; color: #fff; padding: 16px 24px;
    position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 1.25rem; }
.btn-salir {
    background: rgba(255,255,255,.15); color: #fff; text-decoration: none;
    padding: 8px 18px; border-radius: 8px; transition: .2s; white-space: nowrap;
}
.btn-salir:hover { background: #ef4444; }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 24px; }
.buscador {
    width: 100%; padding: 14px 18px; font-size: 1rem; margin-bottom: 24px;
    border: 2px solid #e2e8f0; border-radius: 12px; outline: none;
}
.buscador:focus { border-color: #0ea5e9; }
.grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tarjeta {
    background: #fff; padding: 22px; border-radius: 14px; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: .2s; border-top: 4px solid #0ea5e9;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,.12); }
.icono { font-size: 2rem; }
.titulo { font-weight: 700; font-size: 1.05rem; }
.archivo, .fecha { font-size: .8rem; color: #64748b; }
.vacio { text-align: center; color: #64748b; padding: 40px; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 600px) {
    .topbar { padding: 14px 16px; }
    .topbar h1 { font-size: 1rem; }
    .contenedor { padding: 16px; }
    .grid { grid-template-columns: 1fr; }
    .login-card { padding: 30px 20px; }
}
