@charset "utf-8";
/* CSS Document */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.5;
}

/* ---------- Barra superior ---------- */
.topbar {
    background: #2c3e50;
    color: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.topbar .brand { font-size: 1.4rem; font-weight: 700; padding: 12px 0; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.topbar nav a {
    color: #dfe6ec;
    padding: 14px 12px;
    text-decoration: none;
    font-size: .92rem;
    border-bottom: 3px solid transparent;
    transition: .2s;
}
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.topbar nav a.active { color: #f39c12; border-bottom-color: #f39c12; }
.topbar .user {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: .9rem;
    padding: 8px 0;
}
.topbar .user a {
    color: #f39c12;
    text-decoration: none;
    font-weight: 600;
}

/* ---------- Contenedor ---------- */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}
h2 {
    color: #2c3e50;
    margin-bottom: 16px;
    font-size: 1.5rem;
}
h3 { color: #34495e; margin: 18px 0 10px; }

/* ---------- Login ---------- */
.login-box {
    background: #fff;
    max-width: 380px;
    margin: 100px auto;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    text-align: center;
}
.login-box h1 { color: #2c3e50; margin-bottom: 20px; font-size: 1.6rem; }
.login-box input { width: 100%; margin-bottom: 12px; }

/* ---------- Formularios ---------- */
input, select, textarea, button {
    font-family: inherit;
    font-size: .95rem;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    outline: none;
    transition: border .2s;
}
input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,.12);
}
textarea { resize: vertical; min-height: 60px; }
button {
    background: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
button:hover { background: #2980b9; }

/* ---------- Tarjeta de formulario ---------- */
.card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.card button { grid-column: 1 / -1; }
.card textarea, .card input[type=file] { grid-column: 1 / -1; }

/* ---------- Tablas ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    margin-bottom: 24px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eef1f4;
    font-size: .9rem;
}
th {
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
}
tr:hover td { background: #f8fbfd; }
table img { border-radius: 6px; }

/* ---------- Dashboard stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-left: 5px solid #3498db;
}
.stat span {
    display: block;
    color: #7f8c8d;
    font-size: .85rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.stat strong { font-size: 1.6rem; color: #2c3e50; }
.stat.verde { border-left-color: #27ae60; }
.stat.rojo  { border-left-color: #e74c3c; }
.stat.amarillo { border-left-color: #f39c12; }

/* ---------- Acciones rápidas ---------- */
.acciones-rapidas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.btn {
    display: inline-block;
    padding: 10px 18px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    transition: .2s;
}
.btn:hover { background: #2980b9; }
.btn.gris { background: #7f8c8d; }
.btn.gris:hover { background: #636e72; }

/* ---------- Mensajes ---------- */
.error {
    background: #fdecea;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    border-left: 4px solid #e74c3c;
}
.success {
    background: #e8f8ef;
    color: #1e8449;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    border-left: 4px solid #27ae60;
}
.hint { color: #95a5a6; font-size: .85rem; margin-top: 12px; }

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
    font-size: .85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .topbar { flex-direction: column; align-items: flex-start; }
    .topbar nav { flex-direction: row; width: 100%; overflow-x: auto; }
    .card { grid-template-columns: 1fr; }
    table { font-size: .8rem; }
    th, td { padding: 8px; }
}