/* Colores de marca: cambia estos dos valores por los de GIVAMIC */
:root {
  --marca: #0b4f9c;
  --marca2: #14a3a3;
  --fondo: #f3f6fa;
  --texto: #1b2533;
  --suave: #6b7686;
  --ok: #1a9e5c;
  --mal: #d63b3b;
  --aviso: #e8a317;
  --borde: #dde3eb;
  --radio: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--fondo); color: var(--texto); font-size: 16px; line-height: 1.4; }
.top { background: var(--marca); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top .logo { font-weight: 800; letter-spacing: .5px; font-size: 18px; }
.top .logo img { height: 30px; vertical-align: middle; }
.top a, .top button.link { color: #fff; }
.wrap { max-width: 520px; margin: 0 auto; padding: 18px; }
.wide { max-width: 1200px; }
.card { background: #fff; border-radius: var(--radio); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.muted { color: var(--suave); font-size: 14px; }
.center { text-align: center; }
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 15px; }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid var(--borde); border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
button, .btn { display: inline-block; border: 0; border-radius: 12px; padding: 13px 18px; font-size: 16px; font-weight: 700; cursor: pointer; background: var(--marca); color: #fff; text-decoration: none; text-align: center; }
button:disabled { opacity: .5; cursor: default; }
.btn-big { width: 100%; padding: 20px; font-size: 20px; margin-top: 18px; }
.btn-sec { background: #e8eef6; color: var(--marca); }
.btn-ok { background: var(--ok); }
.btn-mal { background: var(--mal); }
.btn-sm { padding: 7px 11px; font-size: 14px; border-radius: 9px; }
button.link { background: none; color: var(--marca); padding: 0; font-weight: 600; text-decoration: underline; font-size: 14px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 18px 0 6px; }
.stars button { background: none; font-size: 46px; padding: 0 2px; color: #cfd6df; line-height: 1; }
.stars button.on { color: #f5b301; }
.stars-label { text-align: center; min-height: 22px; font-weight: 600; color: var(--suave); }
.checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--borde); font-size: 17px; cursor: pointer; }
.check input { width: 26px; height: 26px; flex: none; }
.big-ok { font-size: 72px; color: var(--ok); text-align: center; line-height: 1; margin: 10px 0; }
.err { background: #fdecec; color: #9e2222; padding: 12px; border-radius: 10px; margin-top: 12px; }
.info { background: #eaf3fd; color: #1d4f86; padding: 12px; border-radius: 10px; margin-top: 12px; }
.hidden { display: none !important; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #eef1f5; color: var(--suave); }
.pill.ok { background: #e3f6ec; color: #11713f; }
.pill.mal { background: #fde6e6; color: #a82424; }
.pill.aviso { background: #fff3d6; color: #8a5c00; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: #fff; color: var(--texto); border: 1px solid var(--borde); padding: 9px 14px; font-size: 15px; }
.tabs button.on { background: var(--marca); color: #fff; border-color: var(--marca); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { background: #f7f9fc; font-weight: 700; position: sticky; top: 0; }
.tbl { overflow: auto; max-height: 70vh; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { background: #fff; border-radius: 12px; padding: 14px; border-left: 6px solid var(--ok); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tile.atrasado { border-left-color: var(--mal); }
.tile.fuera { border-left-color: #b8c1cc; }
.tile .t { font-weight: 700; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 150px; }
.row > button { flex: 0 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 12px; padding: 14px; }
.kpi b { display: block; font-size: 26px; }
.foot { text-align: center; margin: 26px 0 10px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: var(--radio); padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
@media print {
  .top, .tabs, .noprint, button { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; padding: 0; }
  .tbl { max-height: none; overflow: visible; }
}

.foto-btn { display: block; width: 100%; padding: 14px; border: 2px dashed var(--borde); border-radius: 12px; text-align: center; font-weight: 700; color: var(--marca); cursor: pointer; background: #fafcff; }
.foto-btn input { display: none; }
