@charset "UTF-8";
/* ==========================================================================
   Equipo Guardianes · Identidad visual Campuslands
   ========================================================================== */
@font-face { font-family: Poppins; src: url('/brand/poppins-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url('/brand/poppins-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url('/brand/poppins-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url('/brand/poppins-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url('/brand/poppins-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url('/brand/poppins-900.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Sugo Classic"; src: local("Sugo Pro Classic Bold"), local("SugoProClassic-Bold"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand-graphite: #111111;
  --brand-petroleum: #07102B;
  --brand-indigo: #1B00BF;
  --brand-blue: #2C67BA;
  --brand-deep-sky: #0076B7;
  --brand-light-blue: #2CAAFF;
  --brand-sky: #57BBFF;
  --brand-aqua: #00AA80;
  --brand-gradient: linear-gradient(135deg, #000051, #000087);
  --type-main: Poppins, "Segoe UI", system-ui, sans-serif;
  --type-accent: "Sugo Classic", var(--type-main);
  --primary: var(--brand-indigo); --primary-hover: #16008C; --primary-soft: #EBF3FF; --primary-ink: #14006E;
  --canvas: #F4F7FC; --surface: #FFFFFF; --subtle: #EAF0FA; --inverse: var(--brand-petroleum);
  --text: var(--brand-petroleum); --text-2: #45536F; --text-3: #586681;
  --border: #DEE6F4; --border-strong: #BDCBE0; --focus: var(--brand-deep-sky);
  --success: #006B51; --success-hover: #005640; --success-soft: #DFF7EF;
  --warning: #804B00; --warning-soft: #FFF3DC;
  --danger: #A92A28; --danger-soft: #FDE9E7;
  --neutral-soft: #EDF1F8;
  --shadow-primary: 0 7px 18px rgb(27 0 191 / .22);
  --shadow-success: 0 7px 18px rgb(0 107 81 / .18);
  --e1: 0 1px 2px rgb(7 16 43 / .06), 0 4px 14px rgb(7 16 43 / .05);
  --e2: 0 2px 6px rgb(7 16 43 / .07), 0 12px 28px rgb(7 16 43 / .13);
  --e3: 0 -4px 24px rgb(7 16 43 / .10), 0 -16px 48px rgb(7 16 43 / .12);
  --t-fast: 120ms; --t-base: 220ms; --t-slow: 360ms;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --ease-sheet: cubic-bezier(.22,1,.36,1);
  --sidebar: 248px;
  --tabbar: calc(74px + env(safe-area-inset-bottom, 0px));
  font-family: var(--type-main);
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
a { color: var(--primary); -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--text-2); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip:focus { position: fixed; left: 14px; top: 12px; z-index: 50; background: var(--surface); padding: 10px 16px; border-radius: 12px; box-shadow: var(--e2); }
.loading { margin: 40px; color: var(--text-2); }
/* Utilidades de espaciado: la política de seguridad no permite estilos en línea. */
.mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; } [data-mb16] { margin-bottom: 16px; }
.push, [data-push] { margin-left: auto; }
.sub-line { font-size: 14px; margin-top: 2px; }
.h-sm { font-size: 15px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-size: 15px; font-weight: 650; text-decoration: none; white-space: nowrap; user-select: none; transition: transform var(--t-fast) var(--ease-out), background-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), color var(--t-base); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-secondary:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.btn-success { background: var(--success); color: #fff; box-shadow: var(--shadow-success); }
.btn-success:hover:not(:disabled) { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { color: var(--primary); min-height: 40px; padding: 0 12px; }
.btn-ghost:hover:not(:disabled) { background: var(--primary-soft); }
.btn:disabled { background: var(--subtle); color: var(--text-3); box-shadow: none; }
.btn-ghost:disabled { background: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; min-height: 56px; font-size: 16px; border-radius: 16px; }
.btn.is-busy { pointer-events: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin 700ms linear infinite; }
.btn-secondary .spinner, .btn-ghost .spinner { border-color: var(--border); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--e1); display: inline-grid; place-items: center; position: relative; flex-shrink: 0; transition: transform var(--t-fast) var(--ease-out); }
.icon-btn:active { transform: scale(.93); }
.icon-btn .badge { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
.icon-btn.plain { box-shadow: none; background: var(--subtle); width: 36px; height: 36px; border-radius: 12px; }
.icon-btn.plain .icon { width: 18px; height: 18px; }
.text-link { color: var(--primary); font-weight: 650; font-size: 14px; }

/* ---------- Estados, chips y avatares ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.warn { background: var(--warning-soft); color: var(--warning); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--primary-soft); color: var(--primary); }
.pill.mute { background: var(--neutral-soft); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: background-color var(--t-base) var(--ease-out), color var(--t-base), box-shadow var(--t-base), transform var(--t-fast); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--inverse); color: #fff; box-shadow: none; }
.chip b { font-weight: 700; opacity: .7; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.av-0 { background: var(--brand-indigo); } .av-1 { background: var(--success); }
.av-2 { background: var(--brand-blue); } .av-3 { background: var(--brand-gradient); }
.av-4 { background: var(--brand-graphite); } .av-5 { background: #00659D; }
.live { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--neutral-soft); color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; }
.live.on { background: var(--success-soft); color: var(--success); }
.live.on i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); animation: ping 1.6s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Formularios ---------- */
label, .field-label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); padding: 0 16px; font-size: 15px; color: var(--text); font-weight: 450; transition: box-shadow var(--t-base); appearance: none; }
textarea { padding: 14px 16px; min-height: 92px; resize: vertical; line-height: 1.45; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2345536F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 4px rgb(44 170 255 / .24); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.tick { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.tick input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; padding: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-wrap .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); box-shadow: none; background: transparent; width: 40px; height: 40px; }

/* ---------- Estructura ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--brand-petroleum); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; z-index: 20; transition: transform var(--t-slow) var(--ease-sheet); --nav-text: #D6E1F4; --nav-muted: #A8B9D8; --nav-line: rgb(169 190 229 / .22); }
.brand { display: flex; gap: 16px; align-items: center; min-width: 0; padding: 0 8px; }
.brand-logo { display: block; width: 126px; max-width: 100%; height: auto; }
.sidebar .brand-logo { width: 55px; flex: none; }
.sidebar .brand span { max-width: 104px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.sidebar :focus-visible { outline-color: var(--brand-sky); }
.site { margin: 24px 0 18px; padding: 12px; border: 1px solid var(--nav-line); border-radius: 14px; background: rgb(87 187 255 / .07); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.site .icon { color: var(--brand-sky); }
.site strong { display: block; font-size: 14px; }
.site span { color: var(--nav-text); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--nav-text); width: 100%; text-align: left; transition: background-color var(--t-base), color var(--t-base); }
.nav-item:hover { background: rgb(87 187 255 / .10); color: #fff; }
.nav-item.on { background: rgb(87 187 255 / .17); color: #fff; box-shadow: inset 3px 0 var(--brand-light-blue); }
.nav-item.on .icon { color: var(--brand-sky); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-sep { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--nav-muted); margin: 18px 12px 6px; }
.nav-report { margin: 18px 0 4px; }
.nav-report .btn { background: var(--brand-sky); color: var(--brand-petroleum); box-shadow: none; }
.nav-report .btn:hover:not(:disabled) { background: #9BD8FF; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--nav-line); text-align: left; width: 100%; transition: background-color var(--t-base); }
.me:hover { background: rgb(87 187 255 / .10); }
.me strong { font-size: 14px; display: block; }
.me small { font-size: 12px; color: var(--nav-text); }
.workspace { margin-left: var(--sidebar); min-height: 100vh; }
.content { max-width: 1240px; margin: 0 auto; padding: 32px 36px 64px; outline: none; }
.content.narrow { max-width: 760px; }
.mobile-head { display: none; }
.tabbar { display: none; }
.scrim-menu { display: none; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 220px; }
.page-head small { font-size: 14px; color: var(--text-2); font-weight: 550; display: block; margin-bottom: 4px; }
.page-head h1 { font-size: 30px; letter-spacing: -.035em; font-weight: 900; line-height: 1.15; }
.page-head .heading-mark { color: var(--brand-deep-sky); margin-inline-end: .32em; white-space: nowrap; }
.page-head p { color: var(--text-2); font-size: 15px; margin-top: 6px; line-height: 1.5; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 12px; }
.section-title h2, .section-title h3 { font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.panel { background: var(--surface); border-radius: 20px; box-shadow: var(--e1); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 17px; letter-spacing: -.01em; }
.panel-head > :last-child:not(:first-child) { margin-left: auto; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 48px 20px; background: var(--surface); border-radius: 20px; box-shadow: var(--e1); }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--subtle); color: var(--text-2); display: grid; place-items: center; margin: 0 auto; }
.empty-icon .icon { width: 28px; height: 28px; }
.empty.good .empty-icon { background: var(--success-soft); color: var(--success); }
.empty h3 { font-size: 18px; margin-top: 16px; letter-spacing: -.01em; }
.empty p { color: var(--text-2); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-ink); font-size: 14px; line-height: 1.5; }
.notice .icon { margin-top: 1px; color: var(--primary); }
.notice.warn { background: var(--warning-soft); color: var(--warning); }
.notice.warn .icon { color: var(--warning); }
.notice .btn { margin-left: auto; }

/* ---------- Tarjetas de zona y progreso ---------- */
.progress-card { border-radius: 24px; padding: 20px; background: var(--brand-gradient); color: #fff; display: flex; gap: 18px; align-items: center; box-shadow: var(--shadow-primary); position: relative; overflow: hidden; }
.progress-card::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgb(87 187 255 / .26), transparent 70%); pointer-events: none; }
.progress-card.done { background: linear-gradient(140deg, var(--brand-petroleum), var(--success-hover)); box-shadow: var(--shadow-success); }
.ring { width: 72px; height: 72px; flex-shrink: 0; position: relative; }
.ring svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring .track { stroke: rgba(255,255,255,.22); }
.ring .bar { stroke: #fff; stroke-dasharray: 188.5; transition: stroke-dashoffset 900ms var(--ease-out); }
.ring strong { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 800; }
.progress-card h2 { font-size: 18px; letter-spacing: -.02em; }
.progress-card p { font-size: 13px; opacity: .88; margin-top: 4px; line-height: 1.4; }
.zone-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.zone-card { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--e1); display: flex; flex-direction: column; gap: 12px; }
.zone-top { display: flex; gap: 12px; align-items: flex-start; }
.zone-top > div { flex: 1; min-width: 0; }
.zone-top h3, .zone-top h4 { font-size: 16px; letter-spacing: -.01em; line-height: 1.3; }
.zone-top small { font-size: 13px; color: var(--text-2); display: block; margin-top: 2px; line-height: 1.4; }
.zone-top .pill { margin-top: 1px; }
.zone-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--neutral-soft); color: var(--text-2); }
.zone-ic.ok { background: var(--success-soft); color: var(--success); }
.zone-ic.warn { background: var(--warning-soft); color: var(--warning); }
.zone-ic.bad { background: var(--danger-soft); color: var(--danger); }
.zone-ic.info { background: var(--primary-soft); color: var(--primary); }
.zone-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.zone-cta .btn { flex: 1; min-height: 44px; font-size: 14px; }
.zone-cta .btn-ghost { flex: 0 0 auto; }
.meta-line { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.meta-line .icon { width: 16px; height: 16px; }
.meta-line.ok .icon { color: var(--success); }
.meta-line.bad { color: var(--danger); }
.note { font-size: 14px; color: var(--text-2); background: var(--canvas); border-radius: 12px; padding: 10px 12px; line-height: 1.45; }
.duty-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.duty-summary span { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--canvas); border-radius: 8px; padding: 5px 9px; }

/* ---------- Checklist ---------- */
.back-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.back-head h1 { font-size: 22px; letter-spacing: -.02em; }
.back-head small { font-size: 13px; color: var(--text-2); display: block; margin-top: 2px; }
.prog { background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--e1); }
.prog-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 650; }
.prog-head span { color: var(--text-2); font-weight: 550; }
.bar-track { height: 10px; border-radius: 6px; background: var(--subtle); margin-top: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand-aqua), var(--success)); transition: width 420ms var(--ease-out); }
.duty { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border-radius: 18px; padding: 16px; margin-top: 10px; box-shadow: var(--e1); transition: transform var(--t-fast) var(--ease-out), background-color var(--t-base); }
.duty:active { transform: scale(.985); }
.duty .box { width: 30px; height: 30px; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--border-strong); display: grid; place-items: center; flex-shrink: 0; transition: background-color var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.duty .box svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 260ms var(--ease-out) 60ms; }
.duty.on .box { background: var(--success); box-shadow: none; animation: pop 320ms var(--ease-spring); }
.duty.on .box svg { stroke-dashoffset: 0; }
.duty .dl { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.35; transition: color var(--t-base); }
.duty.on .dl { color: var(--text-2); }
.duty .opt { display: block; font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.link-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-ink); font-size: 14px; font-weight: 600; width: 100%; text-align: left; }
.link-row .icon:last-child { margin-left: auto; width: 18px; height: 18px; }
.dock { position: sticky; bottom: 0; padding: 16px 0 calc(8px + env(safe-area-inset-bottom, 0px)); margin-top: 16px; background: linear-gradient(to top, var(--canvas) 72%, transparent); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.blocked-box { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; animation: fadeUp 300ms var(--ease-out); }

/* ---------- Éxito y animaciones compartidas ---------- */
.success-screen { position: fixed; inset: 0; z-index: 40; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; animation: fadeIn var(--t-slow) var(--ease-out); }
.success-screen > * { max-width: 380px; width: 100%; }
.burst { width: 112px; height: 112px; border-radius: 50%; background: var(--success-soft); display: grid; place-items: center; margin: 0 auto; animation: burst 520ms var(--ease-spring) both; }
.burst div { width: 76px; height: 76px; border-radius: 50%; background: var(--success); display: grid; place-items: center; box-shadow: var(--shadow-success); }
.burst svg { width: 40px; height: 40px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 380ms var(--ease-out) 260ms forwards; }
.burst.sm { width: 88px; height: 88px; } .burst.sm div { width: 60px; height: 60px; } .burst.sm svg { width: 32px; height: 32px; }
.success-screen h2 { font-size: 26px; letter-spacing: -.03em; margin-top: 28px; }
.success-screen p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin-top: 8px; }
.success-screen .btn { margin-top: 32px; }
.fade-up { animation: fadeUp 420ms var(--ease-out) both; }
.d1 { animation-delay: 300ms; } .d2 { animation-delay: 380ms; } .d3 { animation-delay: 460ms; }
@keyframes burst { from { transform: scale(.4); } to { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
.enter > * { animation: fadeUp 380ms var(--ease-out) both; }
.enter > *:nth-child(2) { animation-delay: 50ms; } .enter > *:nth-child(3) { animation-delay: 100ms; }
.enter > *:nth-child(4) { animation-delay: 150ms; } .enter > *:nth-child(5) { animation-delay: 200ms; }
.enter > *:nth-child(n+6) { animation-delay: 240ms; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--subtle) 25%, #F8FAFD 50%, var(--subtle) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Hoja inferior de reporte ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 30; }
.sheet-scrim { position: absolute; inset: 0; background: rgb(7 16 43 / .55); animation: fadeIn var(--t-base) var(--ease-out); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: var(--e3); padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 94vh; display: flex; flex-direction: column; animation: sheetUp 420ms var(--ease-sheet); }
.sheet-layer.closing .sheet { animation: sheetDown 300ms var(--ease-in-out) forwards; }
.sheet-layer.closing .sheet-scrim { animation: fadeIn 300ms reverse forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet-inner { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto 14px; flex-shrink: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; }
.sheet-head h2 { font-size: 22px; letter-spacing: -.03em; }
.sheet-body { overflow-y: auto; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { padding-top: 14px; flex-shrink: 0; }
.zone-pick { margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--canvas); width: 100%; text-align: left; }
.zone-pick .zone-ic { width: 38px; height: 38px; border-radius: 12px; }
.zone-pick small { font-size: 12px; color: var(--text-2); display: block; }
.zone-pick strong { font-size: 15px; }
.zone-pick .text-link { margin-left: auto; }
.zone-options { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; animation: fadeUp 260ms var(--ease-out); }
.zone-options h3 { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 8px 4px 2px; }
.zone-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); font-size: 15px; font-weight: 600; text-align: left; width: 100%; }
.zone-option small { color: var(--text-3); font-weight: 600; }
.zone-option.on { box-shadow: inset 0 0 0 2px var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--subtle); border-radius: 14px; padding: 4px; margin-top: 16px; }
.seg .knob { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 11px; background: var(--surface); box-shadow: var(--e1); transition: transform 300ms var(--ease-out); }
.seg.right .knob { transform: translateX(100%); }
.seg button { position: relative; z-index: 1; min-height: 42px; font-size: 14px; font-weight: 650; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 8px; transition: color var(--t-base); }
.seg button.on { color: var(--text); }
.seg .icon { width: 18px; height: 18px; }
.q { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 18px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { min-height: 92px; padding: 10px 6px; border-radius: 18px; background: var(--canvas); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 650; line-height: 1.25; text-align: center; position: relative; transition: background-color var(--t-base), box-shadow var(--t-base), transform var(--t-fast) var(--ease-out); }
.tile .icon { width: 26px; height: 26px; color: var(--text-2); transition: color var(--t-base), transform 300ms var(--ease-spring); }
.tile:active { transform: scale(.95); }
.tile.on { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary-ink); }
.tile.on .icon { color: var(--primary); transform: scale(1.12); }
.tile .tick-mark { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; transform: scale(0); transition: transform 260ms var(--ease-spring); }
.tile .tick-mark svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tile.on .tick-mark { transform: scale(1); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.level { min-height: 46px; border-radius: 14px; background: var(--canvas); font-size: 14px; font-weight: 650; color: var(--text-2); transition: background-color var(--t-base) var(--ease-out), color var(--t-base), transform var(--t-fast); }
.level:active { transform: scale(.96); }
.level.on { background: var(--inverse); color: #fff; }
.level.on.urgent { background: var(--danger); }
.hint { margin-top: 14px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--warning-soft); color: var(--warning); font-size: 13px; line-height: 1.45; animation: fadeUp 300ms var(--ease-out); }
.hint .icon { width: 18px; height: 18px; color: var(--warning); margin-top: 1px; }
.photo-btn { margin-top: 14px; min-height: 52px; border-radius: 14px; border: 1.5px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: 14px; font-weight: 600; width: 100%; cursor: pointer; flex-direction: row; }
.photo-preview { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border-radius: 14px; background: var(--canvas); animation: fadeUp 260ms var(--ease-out); }
.photo-preview img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.photo-preview span { font-size: 13px; color: var(--text-2); flex: 1; }
.add-detail { margin-top: 14px; }
.sent { text-align: center; padding: 18px 0 6px; }
.sent h2 { font-size: 22px; letter-spacing: -.02em; margin-top: 20px; }
.sent p { color: var(--text-2); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.undo { margin-top: 22px; border-radius: 16px; background: var(--canvas); padding: 14px 16px; text-align: left; }
.undo-row { display: flex; align-items: center; font-size: 14px; font-weight: 600; gap: 10px; }
.undo-row button { margin-left: auto; color: var(--primary); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.undo-row .icon { width: 16px; height: 16px; }
.undo-track { height: 4px; border-radius: 2px; background: var(--border); margin-top: 12px; overflow: hidden; }
.undo-track div { height: 100%; background: var(--primary); transform-origin: left; animation: shrink 6s linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Mis avisos ---------- */
.report { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--e1); }
.report-top { display: flex; align-items: center; gap: 12px; }
.report-top > div { flex: 1; min-width: 0; }
.report-top h3 { font-size: 16px; letter-spacing: -.01em; }
.report-top small { font-size: 13px; color: var(--text-2); display: block; margin-top: 2px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.step { font-size: 12px; font-weight: 650; color: var(--text-3); }
.step::before { content: ""; display: block; height: 5px; border-radius: 3px; background: var(--subtle); margin-bottom: 8px; }
.step.done { color: var(--text); }
.step.done::before { background: var(--success); }
.step.now { color: var(--primary); }
.step.now::before { background: linear-gradient(90deg, var(--primary) 50%, var(--subtle) 50%); background-size: 200% 100%; animation: fill 1.6s var(--ease-in-out) infinite alternate; }
@keyframes fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.step small { display: block; font-weight: 500; color: var(--text-3); margin-top: 2px; }
.thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--subtle); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Pendientes del líder ---------- */
.pending-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.pcard-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 320ms var(--ease-in-out), opacity 260ms; }
.pcard-wrap > div { overflow: hidden; min-height: 0; }
.pcard-wrap.gone { grid-template-rows: 0fr; opacity: 0; }
.pcard { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--e1); position: relative; overflow: hidden; transition: background-color var(--t-base); }
.pcard.urgent::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--danger); }
.pcard.is-new { animation: slideIn 420ms var(--ease-out), flash 1.6s var(--ease-out); }
@keyframes flash { 0%, 30% { box-shadow: inset 0 0 0 2px var(--primary), var(--e1); } 100% { box-shadow: var(--e1); } }
.pcard.resolved { background: var(--success-soft); }
.pcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.age { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.age .icon { width: 14px; height: 14px; }
.age.old { color: var(--danger); }
.pcard h3 { font-size: 18px; letter-spacing: -.02em; margin-top: 12px; line-height: 1.3; }
.pcard .where { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pcard .where .icon { width: 16px; height: 16px; }
.pcard .pnote { font-size: 14px; color: var(--text-2); margin-top: 8px; line-height: 1.45; }
.pcard-mid { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pcard-mid > span:not(.avatar) { font-size: 13px; color: var(--text-2); }
.pcard-mid .thumb { margin-left: auto; }
.pcard > .btn { margin-top: 14px; width: 100%; min-height: 50px; }
.together { font-size: 12px; font-weight: 700; color: var(--primary-ink); background: var(--primary-soft); padding: 4px 9px; border-radius: 999px; }

/* ---------- Indicadores y panel del día ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--surface); border-radius: 18px; padding: 18px; box-shadow: var(--e1); text-align: left; }
button.kpi { transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base); }
button.kpi:hover { box-shadow: var(--e2); }
.kpi small { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi small .icon { width: 18px; height: 18px; }
.kpi strong { font-family: var(--type-accent); font-size: 30px; letter-spacing: -.03em; font-weight: 700; display: block; margin-top: 10px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi strong em { font-style: normal; font-size: 18px; color: var(--text-3); font-weight: 700; }
.kpi .sub { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.4; }
.kpi .sub.good { color: var(--success); font-weight: 600; }
.kpi .sub.bad { color: var(--danger); font-weight: 600; }
.mini-bar { height: 6px; border-radius: 3px; background: var(--subtle); margin-top: 12px; overflow: hidden; }
.mini-bar div { height: 100%; background: var(--success); border-radius: 3px; transition: width 900ms var(--ease-out); }
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--canvas); }
.feed-item.is-new { animation: slideIn 420ms var(--ease-out); background: var(--primary-soft); }
.feed-item .zone-ic { width: 38px; height: 38px; border-radius: 12px; }
.feed-item > div { flex: 1; min-width: 0; }
.feed-item strong { font-size: 14px; display: block; }
.feed-item span { font-size: 12px; color: var(--text-2); }
.attention { display: flex; flex-direction: column; gap: 10px; }
.team-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.member { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--e1); }
.member strong { font-size: 13px; display: block; }
.member small { font-size: 12px; color: var(--text-2); }
.member.away { opacity: .6; }

/* ---------- Mapa del piso ---------- */
.seg-tabs { display: inline-flex; background: var(--subtle); border-radius: 14px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg-tabs button { min-height: 38px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 650; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; transition: background-color var(--t-base), color var(--t-base), box-shadow var(--t-base); }
.seg-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.seg-tabs .icon { width: 17px; height: 17px; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar label { min-width: 180px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); font-weight: 600; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.lg-ok { --c: #7FD1AE; } .lg-warn { --c: #FFD27A; } .lg-bad { --c: #F4A39B; } .lg-mute { --c: #C9D2E0; }
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 14px; border-radius: 18px; background: repeating-linear-gradient(0deg, transparent 0 31px, rgb(7 16 43 / .035) 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, rgb(7 16 43 / .035) 31px 32px), var(--canvas); }
.sector h3 { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 2px 4px 8px; }
.sector-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.zone-block { position: relative; min-height: 92px; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-align: left; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.zone-block:hover { transform: translateY(-2px); box-shadow: var(--e2); z-index: 1; }
.zone-block.on { box-shadow: inset 0 0 0 2.5px var(--inverse), var(--e2); }
.zone-block strong { font-size: 13px; line-height: 1.25; }
.zone-block small { font-size: 11px; font-weight: 650; display: flex; align-items: center; gap: 5px; }
.zone-block small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.zb-ok { background: var(--success-soft); color: var(--success); } .zb-warn { background: var(--warning-soft); color: var(--warning); }
.zb-bad { background: var(--danger-soft); color: var(--danger); } .zb-mute { background: var(--neutral-soft); color: var(--text-2); }
.dot-alert { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.floor-plan { min-width: 0; padding: 0; overflow: hidden; }
.floor-plan-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 16px; }
.floor-plan-header h2 { font-size: 18px; }
.floor-plan-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.floor-plan-tools .btn { min-width: 44px; min-height: 44px; padding-inline: 10px; }
#floor-plan-scale { min-width: 48px; margin-inline-start: 4px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.floor-plan-viewport { max-height: min(62vh, 660px); overflow: auto; overscroll-behavior-inline: contain; background: #fff; border-block: 1px solid var(--border); }
.floor-plan-viewport:focus-visible { outline-offset: -3px; }
.floor-plan-canvas { position: relative; }
.floor-plan-canvas img { display: block; width: 100%; height: auto; }
.floor-plan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.floor-plan .plan-ok { --plan-color: var(--success); --plan-tint: rgb(0 170 128 / .30); --plan-surface: var(--success-soft); }
.floor-plan .plan-warn { --plan-color: var(--warning); --plan-tint: #EBA83958; --plan-surface: var(--warning-soft); }
.floor-plan .plan-mute { --plan-color: var(--text-2); --plan-tint: #7886A050; --plan-surface: var(--neutral-soft); }
.floor-plan .plan-notice { --plan-color: var(--danger); --plan-surface: var(--danger-soft); }
.floor-plan-region { fill: var(--plan-tint); stroke: var(--plan-color); stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: fill; cursor: pointer; }
.floor-plan-region:hover, .floor-plan-region.is-selected { stroke: var(--primary); stroke-width: 2.5; }
.floor-plan-marker { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }
.floor-plan-marker:hover, .floor-plan-marker:focus-visible, .floor-plan-marker[aria-pressed="true"] { z-index: 1; }
.floor-plan-symbol { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--plan-color); border-radius: 50%; color: var(--plan-color); background: var(--plan-surface); box-shadow: 0 0 0 2px #fff; }
.floor-plan-symbol .icon { width: 16px; height: 16px; }
.floor-plan-marker[aria-pressed="true"] .floor-plan-symbol { outline: 2px solid var(--primary); outline-offset: 2px; }
.floor-plan-marker .dot-alert { top: 0; right: 0; min-width: 17px; height: 17px; padding-inline: 3px; box-shadow: 0 0 0 1.5px #fff; }
.floor-plan-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 16px 0; }
.floor-plan-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; }
.floor-plan-legend .icon { box-sizing: content-box; width: 13px; height: 13px; padding: 3px; border-radius: 50%; color: var(--plan-color); background: var(--plan-surface); }
.floor-plan-picker { min-width: 0; padding: 8px 16px 14px; }
.floor-plan-picker select { min-width: 0; width: 100%; text-overflow: ellipsis; }
.zone-detail { position: sticky; top: 24px; animation: fadeUp 260ms var(--ease-out); }
.zone-detail h2 { font-size: 20px; letter-spacing: -.02em; }
.zone-detail .stack { margin-top: 14px; }
.facts { display: grid; gap: 10px; margin-top: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.facts dt { color: var(--text-2); }
.facts dd { font-weight: 600; text-align: right; }

/* ---------- Tablas, catálogos e informes ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table small { display: block; color: var(--text-3); margin-top: 2px; }
.row-link { color: var(--text); font-weight: 650; text-align: left; }
.row-link:hover { color: var(--primary); }
.item-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.trend-col h3 { font-size: 14px; margin-bottom: 12px; }
.trend-bars { display: flex; flex-direction: column; gap: 10px; }
.trend-bar-head { display: flex; justify-content: space-between; font-size: 13px; gap: 10px; }
.trend-bar-track { height: 8px; border-radius: 4px; background: var(--subtle); margin-top: 6px; overflow: hidden; }
.trend-bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 4px; animation: grow 700ms var(--ease-out) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.export-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.export-row label { min-width: 200px; }
.person-row { display: flex; align-items: center; gap: 12px; }
.person-row h2 { font-size: 18px; }
.person-row p { color: var(--text-2); font-size: 14px; }
.supply-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.supply-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--canvas); font-size: 14px; font-weight: 600; }
.supply-add { display: flex; gap: 10px; }
.picker-list { display: flex; flex-direction: column; gap: 6px; }
.picker-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--canvas); font-size: 15px; font-weight: 600; width: 100%; text-align: left; transition: background-color var(--t-base); }
.picker-option:hover { background: var(--subtle); }
.picker-option.on { background: var(--primary-soft); color: var(--primary-ink); }
.picker-option .person { display: flex; align-items: center; gap: 10px; }
.temp-pwd { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--canvas); }
.temp-pwd code { font-size: 18px; font-weight: 700; flex: 1; }
.duty-days { display: flex; flex-wrap: wrap; gap: 8px; }
.duty-days .tick { padding: 6px 10px; border-radius: 10px; background: var(--canvas); font-size: 13px; }
.duty-fields { display: flex; flex-direction: column; gap: 14px; }
.duty-fields fieldset { padding: 14px; border-radius: 16px; background: var(--canvas); }
pre { white-space: pre-wrap; font-size: 12px; background: var(--canvas); padding: 14px; border-radius: 12px; overflow: auto; max-height: 50vh; }
.photo-full { width: 100%; border-radius: 16px; display: block; }

/* ---------- Diálogo ---------- */
dialog { border: 0; padding: 0; border-radius: 24px; width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 860px); box-shadow: var(--e2); background: var(--surface); color: var(--text); }
dialog[open] { animation: dialogIn 280ms var(--ease-out); display: flex; flex-direction: column; }
dialog::backdrop { background: rgb(7 16 43 / .55); animation: fadeIn var(--t-base); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 0; }
.dialog-head h2 { font-size: 20px; letter-spacing: -.02em; }
.dialog-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dialog-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog-body p { font-size: 15px; line-height: 1.5; }
.dialog-form > .form-error { padding: 0 22px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--border); }

/* ---------- Avisos emergentes ---------- */
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; width: min(440px, calc(100vw - 32px)); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform 360ms var(--ease-spring), opacity var(--t-base); }
#toast.visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--inverse); color: #fff; border-radius: 16px; padding: 14px 16px; font-size: 14px; font-weight: 500; box-shadow: var(--e2); line-height: 1.4; }
.toast .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--success); display: grid; place-items: center; flex-shrink: 0; }
.toast.error .dot { background: var(--danger); }
.toast .dot .icon { width: 15px; height: 15px; }
.toast button { margin-left: auto; color: var(--brand-sky); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------- Acceso ---------- */
.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.login-layout { width: min(100%, 1040px); display: grid; grid-template-columns: 1.2fr 1fr; border-radius: 28px; box-shadow: var(--e2); overflow: hidden; animation: fadeUp 420ms var(--ease-out); }
.login-brand { position: relative; isolation: isolate; container-type: inline-size; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 550px; gap: 26px; overflow: hidden; padding: clamp(28px, 4vw, 52px); background: radial-gradient(ellipse at 92% 70%, rgb(44 170 255 / .30), transparent 59%), var(--brand-gradient); color: #fff; }
.login-brand-logo { display: block; width: 75px; height: auto; }
.login-brand-copy { max-width: min(78%, 290px); }
.login-brand-copy p { color: #C4E7FF; font-size: 13px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.login-brand-copy strong { display: block; margin-top: 10px; font-size: clamp(30px, 10.8cqw, 54px); font-weight: 900; letter-spacing: -.045em; line-height: 1.05; }
.login-slogan { display: block; width: min(174px, 50%); height: auto; }
.login-orbit { position: absolute; z-index: -1; inset: auto 1.5% 0 auto; width: min(36%, 184px); height: auto; }
.login-card { min-width: 0; background: var(--surface); padding: clamp(24px, 4vw, 46px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -.035em; margin-top: 6px; }
.login-card > p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin-top: -8px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .seg-tabs { width: 100%; }
.login-card .seg-tabs button { flex: 1; justify-content: center; padding-inline: 8px; }
.demo { padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.demo strong { font-size: 13px; color: var(--text-2); }

@media (max-width: 720px) {
  .login { padding: 16px; }
  .login-layout { max-width: 455px; grid-template-columns: 1fr; border-radius: 20px; }
  .login-brand { min-height: 0; gap: 14px; padding: 20px 24px; }
  .login-brand-logo { width: 48px; }
  .login-brand-copy strong { margin-top: 5px; font-size: clamp(25px, 6vw, 34px); }
  .login-brand-copy p { font-size: 10px; }
  .login-slogan { width: 93px; }
  .login-orbit { width: min(29%, 103px); inset-inline-end: 9px; bottom: -26px; }
}

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .map-layout { grid-template-columns: minmax(0, 1fr); }
  .zone-detail { position: static; }
  .trend-grid { grid-template-columns: 1fr; }
}

/* ---------- Móvil ---------- */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-105%); box-shadow: var(--e2); }
  .sidebar.shown { transform: none; }
  .scrim-menu { display: block; position: fixed; inset: 0; z-index: 19; background: rgb(7 16 43 / .55); animation: fadeIn var(--t-base); }
  .workspace { margin-left: 0; }
  .workspace.has-tabbar { padding-bottom: var(--tabbar); }
  .content { padding: 8px 20px 32px; }
  .mobile-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 4px; }
  .mobile-head .brand { padding: 0; flex: 1; }
  .mobile-head .brand-logo { width: 119px; }
  .page-actions .live { display: none; }
  .page-head h1 { font-size: 26px; }
  .page-head { margin-bottom: 18px; }
  .page-head .page-actions { width: 100%; }
  .tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; height: var(--tabbar); padding: 8px 6px env(safe-area-inset-bottom, 0px); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); grid-auto-flow: column; grid-auto-columns: 1fr; align-items: start; }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; color: var(--text-3); position: relative; padding-top: 4px; transition: color var(--t-base); }
  .tab.on { color: var(--primary); }
  .tab .icon { width: 24px; height: 24px; }
  .tab .count { position: absolute; top: -2px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; }
  .fab { justify-self: center; margin-top: -24px; width: 62px; height: 62px; border-radius: 22px; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-primary); transition: transform var(--t-fast) var(--ease-out); position: relative; }
  .fab .icon { width: 28px; height: 28px; stroke-width: 2.4; }
  .fab:active { transform: scale(.92); }
  .fab span { position: absolute; bottom: -18px; font-size: 11px; font-weight: 700; color: var(--primary); white-space: nowrap; }
  .zone-list, .pending-list { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi strong { font-size: 26px; }
  .dock { margin: 16px -20px 0; padding-left: 20px; padding-right: 20px; }
  .workspace.has-tabbar .dock { bottom: var(--tabbar); }
  #toast { bottom: calc(var(--tabbar) + 14px); }
  .data-table th:nth-child(n+3):not(:last-child), .data-table td:nth-child(n+3):not(:last-child) { display: none; }
  .floor { grid-template-columns: 1fr; padding: 10px; }
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  dialog[open] { animation: sheetUp 380ms var(--ease-sheet); }
  .dialog-actions { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .dialog-actions .btn { flex: 1; }
}

/* ---------- Escritorio: la hoja se convierte en ventana centrada ---------- */
@media (min-width: 1024px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: 28px; max-height: 88vh; transform: translate(-50%, -50%); animation: modalIn 320ms var(--ease-out); padding-bottom: 22px; }
  .sheet-layer.closing .sheet { animation: modalOut 220ms var(--ease-in-out) forwards; }
  .handle { display: none; }
  @keyframes modalIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
  @keyframes modalOut { to { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(.98); } }
  .success-screen { background: rgba(255,255,255,.97); }
}

@media (max-width: 420px) {
  .form-grid { grid-template-columns: 1fr; }
  .tiles { gap: 8px; }
  .tile { min-height: 86px; }
}

@media (max-width: 360px) {
  .mobile-head { gap: 8px; padding-inline: 14px; }
  .mobile-head .brand-logo { width: 106px; }
  .mobile-head .live { gap: 6px; padding-inline: 8px; font-size: 11px; }
  .zone-card .zone-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
  .zone-card .zone-top .zone-ic { grid-row: span 2; }
  .zone-card .zone-top .pill { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
