/* AFASON - Gestión comercial. Rukan - Orden y desarrollo a medida */
/* Marca AFASON (tomada de afason.com.ar). Todo lo de marca se cambia acá, en :root. */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=DM+Sans:wght@400;700&display=swap");

:root {
  --marino: #072451;     /* texto principal, encabezado y pie */
  --primario: #0153BB;   /* botones */
  --acento: #0471E5;     /* links, destacados, triángulo del logo */
  --bg: #ffffff;
  --panel: #ffffff;
  --panel2: #f4f7fb;
  --line: #dfe5ee;
  --line2: #b9c4d3;
  --txt: var(--marino);
  --mute: #4c5a70;
  --dim: #7d889a;
  --ok: #1f7a4d;
  --warn: #9a6400;
  --bad: #b3362b;
  --acc: var(--primario);
  --acc-hover: #013f8f;
  --acc-suave: #e7f0fc;
  --on-acc: #ffffff;
  --graf: var(--primario);
  --graf-claro: #9fc3ee;
  --pie-bg: var(--marino);
  --pie-txt: #ffffff;
  --firma: #9aa5b5;      /* firma de Rukan: gris, discreta */
  --r: 4px;              /* esquinas de botones, tarjetas y campos */
  --f-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-family: var(--f-body);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--txt); }
body { -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; font-size: 15px; line-height: 1.45; }
a { color: inherit; }
.mute { color: var(--mute); } .dim { color: var(--dim); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.hidden { display: none !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
::selection { background: var(--acc); color: var(--on-acc); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 28px 40px; }
h1 { font-family: var(--f-display); font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-family: var(--f-display); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sub { color: var(--mute); font-size: 14px; }
.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; box-shadow: 0 1px 2px rgba(7, 36, 81, .05); }
.card-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .g4 { gap: 10px; } .kpi { padding: 14px; } .kpi b { font-size: 19px; } }

.kpi span { display: block; color: var(--mute); font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-family: var(--f-display); font-size: 28px; font-weight: 700; margin: 6px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--dim); font-size: 12px; }

button, .btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--txt); background: var(--panel);
  border: 1px solid var(--line2); padding: 10px 16px; border-radius: var(--r); cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  transition: background .15s, border-color .15s, color .15s;
}
button:hover, .btn:hover { border-color: var(--acc); color: var(--acc); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: default; }
.btn-ok { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.btn-ok:hover { background: var(--acc-hover); color: var(--on-acc); border-color: var(--acc-hover); }
.seg { display: inline-flex; }
.seg button { padding: 7px 12px; font-size: 13px; }
.seg button { border-radius: 0; }
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg button + button { border-left: 0; }
.seg button.on { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }

input, select { font: inherit; color: var(--txt); background: var(--panel); border: 1px solid var(--line2); padding: 10px 12px; width: 100%; border-radius: var(--r); }
input::placeholder { color: var(--dim); }
input:focus, select:focus { border-color: var(--acc); outline: none; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--mute); margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--mute); font-weight: 700; font-size: 12px; padding: 8px; border-bottom: 1px solid var(--marino); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border: 1px solid currentColor; border-radius: var(--r); color: var(--mute); white-space: nowrap; }
.tag.acento { color: var(--acento); }
.tag.ok { color: var(--ok); } .tag.bad { color: var(--bad); } .tag.warn { color: var(--warn); }
.cuota { height: 4px; background: var(--acc-suave); margin-top: 6px; }
.cuota i { display: block; height: 100%; background: var(--graf-claro); }
.vacio { padding: 28px 8px; text-align: center; color: var(--mute); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--marino); color: #fff; padding: 12px 18px; border-radius: var(--r); z-index: 80; font-size: 14px; max-width: 92vw; }
.toast.bad { background: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(7, 36, 81, .55); display: flex; align-items: center; justify-content: center; z-index: 70; padding: 20px; }
.modal { background: var(--panel); border-radius: var(--r); padding: 28px; width: min(360px, 100%); max-height: 92vh; overflow: auto; }

a { color: var(--acento); }
h1, h2 { color: var(--marino); }
.logo { display: block; height: auto; }
/* pie de marca: marino con texto blanco; la firma de Rukan va discreta, en gris */
.pie { background: var(--pie-bg); color: var(--pie-txt); padding: 18px 28px; margin-top: 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.pie .firma { color: var(--firma); font-size: 12px; }
