/* ---- Sistema C Aduanas ---- */
* { box-sizing: border-box; }
body {
    margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px;
    background: #eef1f5; color: #24292f;
}
.topbar {
    display: flex; align-items: center; gap: 24px;
    background: #1f3a5f; color: #fff; padding: 10px 22px;
}
.topbar .brand { font-weight: 700; font-size: 16px; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
    color: #d7e2f0; text-decoration: none; padding: 7px 12px; border-radius: 6px;
}
.topbar nav a:hover { background: #2d4f7c; color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; }
.userbox small { color: #a9bdd6; }

.container { max-width: 1250px; margin: 24px auto; padding: 0 18px; }
.footer { text-align: center; color: #8a93a2; padding: 18px; font-size: 12px; }

.card {
    background: #fff; border: 1px solid #d8dee8; border-radius: 10px;
    padding: 20px 24px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(20,30,60,.06);
}
.card h2 { margin-top: 0; color: #1f3a5f; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

table.tabla { width: 100%; border-collapse: collapse; }
.tabla th {
    background: #1f3a5f; color: #fff; text-align: left; padding: 8px 10px;
    font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px;
}
.tabla td { padding: 7px 10px; border-bottom: 1px solid #e6eaf1; }
.tabla tr:hover td { background: #f4f7fb; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla tfoot td { font-weight: 700; background: #eef2f8; }

.btn {
    display: inline-block; background: #1f3a5f; color: #fff; border: none;
    padding: 8px 16px; border-radius: 7px; text-decoration: none; cursor: pointer;
    font-size: 14px;
}
.btn:hover { background: #2d4f7c; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-verde { background: #1a7f37; } .btn-verde:hover { background: #229944; }
.btn-rojo  { background: #b42318; } .btn-rojo:hover  { background: #d3342a; }
.btn-gris  { background: #6a7383; } .btn-gris:hover  { background: #7d8798; }

label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #c4ccd8; border-radius: 6px;
    font-size: 14px; background: #fff;
}
input:focus, select:focus { outline: 2px solid #7fa3d0; border-color: #7fa3d0; }

.alert { padding: 11px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert-ok    { background: #d8f3dc; color: #14532d; border: 1px solid #9fd8ab; }
.alert-error { background: #fde2e0; color: #7f1d1d; border: 1px solid #f3a9a4; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-rojo { background: #fde2e0; color: #b42318; }
.badge-verde { background: #d8f3dc; color: #1a7f37; }
.badge-azul { background: #dbe7f7; color: #1f3a5f; }
.badge-gris { background: #e7eaf0; color: #4b5565; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid #d8dee8; border-radius: 10px; padding: 14px 18px; }
.kpi .v { font-size: 22px; font-weight: 700; color: #1f3a5f; }
.kpi .l { color: #6a7383; font-size: 12.5px; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 380px; background: #fff; border-radius: 12px; padding: 34px; box-shadow: 0 10px 40px rgba(20,30,60,.18); }
.login-card h1 { margin: 0 0 4px; font-size: 22px; color: #1f3a5f; text-align: center; }
.login-card p.sub { text-align: center; color: #6a7383; margin-top: 0; }
.login-card .btn { width: 100%; margin-top: 18px; padding: 11px; }

/* Dashboard: gráfico de barras por mes */
.chart { display: flex; gap: 14px; align-items: flex-end; padding: 10px 4px 0; overflow-x: auto; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 64px; }
.chart .bars { display: flex; gap: 4px; align-items: flex-end; height: 152px; }
.chart .bar { width: 24px; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-venta { background: #1f3a5f; }
.bar-gan { background: #1a7f37; }
.chart .lbl { font-size: 11.5px; color: #6a7383; white-space: nowrap; }
.leyenda { display: flex; gap: 18px; font-size: 12.5px; color: #4b5565; margin-top: 8px; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.mono { font-family: Consolas, monospace; }
.der { text-align: right; }
small.mut { color: #6a7383; }
