:root {
  /* Paleta tomada del logo MUNI PETAPA: dorado #FBCD32 y verde #ABCF39.
     Los tonos oscuros son versiones profundas del mismo verde, para que todo
     se sienta de la misma familia y no de dos marcas distintas. */
  --marca-verde: #abcf39;
  --marca-dorado: #fbcd32;
  --bg: #f5f7ef;
  --paper: #ffffff;
  --ink: #1c2b12;
  --muted: #6b7860;
  --line: #dfe6d2;
  --green: #5e8c1e;
  --green-2: #456a14;
  --red: #d42a30;
  --red-2: #a51f25;
  --amber: #b97714;
  --gold: #fbcd32;
  --blue: #236b8e;
  --shadow: 0 14px 34px rgba(20, 30, 24, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  min-height: 100dvh;
  color: var(--ink);
  background: radial-gradient(125% 90% at 50% -8%, #fbfaf8 0%, #f6f5f3 45%, #ecebe7 100%) fixed;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; }
h2, h3 { margin: 0; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; background: var(--green); color: #fff; font-weight: 900; font-size: 14px;
}
.brand strong { font-size: 17px; }
.brand-logo { height: 42px; width: 46px; object-fit: contain; object-position: center; }
.brand-logo.big { width: 132px; height: 132px; object-fit: contain; border-radius: 18px; background: #fff; padding: 8px; box-shadow: var(--shadow); justify-self: center; }
.top-actions { display: flex; gap: 8px; }
.ghost {
  min-height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700;
}

/* ===================== VECINO ===================== */
.citizen {
  max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; padding: 18px 16px 40px;
}
.loc-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700;
}
.loc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.loc-dot.ok { background: var(--green); box-shadow: 0 0 0 5px rgba(30,107,77,.15); }

/* SOS gigante */
.sos {
  position: relative; display: grid; place-items: center; gap: 2px;
  width: min(78vw, 300px); height: min(78vw, 300px);
  border: 0; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 50% 38%, #e8474c, var(--red) 60%, var(--red-2));
  box-shadow: 0 22px 50px rgba(212,42,48,.38), inset 0 -10px 0 rgba(0,0,0,.14);
  touch-action: none; user-select: none;
}
.sos:active { transform: scale(.985); }
.sos.arming { background: radial-gradient(circle at 50% 38%, #f06a6e, var(--red-2) 70%); }
.sos-emoji { font-size: 64px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.sos-text { font-size: 30px; font-weight: 900; letter-spacing: .5px; }
.sos-hint { font-size: 14px; font-weight: 700; opacity: .92; }
.sos-progress {
  position: absolute; bottom: 17%; width: 56%; height: 8px;
  border-radius: 999px; background: rgba(255,255,255,.32); overflow: hidden;
}
.sos-progress i { display: block; width: 0%; height: 100%; background: #fff; }

/* categorias con dibujo */
.cats {
  width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.cat {
  display: grid; place-items: center; gap: 6px;
  min-height: 112px; padding: 12px;
  border: 2px solid var(--line); border-radius: 18px; background: #fff;
  color: var(--ink); transition: transform .08s, border-color .12s;
}
.cat:active { transform: scale(.97); }
.cat.sending { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.cat-emoji {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, #fff); font-size: 34px; line-height: 1;
}
.cat b { font-size: 18px; font-weight: 800; }

/* voz */
.voice {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 88px; border: 0; border-radius: 20px; color: #fff;
  background: linear-gradient(180deg, #2a7d5d, var(--green));
  box-shadow: 0 12px 26px rgba(30,107,77,.3); touch-action: none; user-select: none;
}
.voice:active { transform: scale(.985); }
.voice.recording { background: linear-gradient(180deg, #e8474c, var(--red-2)); animation: pulse 1s infinite; }
.voice-emoji { font-size: 40px; }
.voice-text { font-size: 21px; font-weight: 900; }
.voice-time { font-size: 18px; font-weight: 800; opacity: .9; }
.cz-hint { text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; margin: 2px 6px 0; line-height: 1.4; }

/* ===================== VECINO PREMIUM (minimal) ===================== */
.cz-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 6px; }
.cz-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cz-seal { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; background: #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.3), 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.cz-seal img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cz-bt { line-height: 1.05; }
.cz-bt b { font-size: 14px; font-weight: 800; letter-spacing: .3px; }
.cz-bt small { display: block; font-size: 10px; letter-spacing: 2.2px; color: var(--muted); text-transform: uppercase; margin-top: 2px; font-weight: 700; }
.cz-head-right { display: flex; align-items: center; gap: 8px; }
.geo { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line); font-size: 11.5px; color: #42454c; font-weight: 700; }
.geo .pin { position: relative; width: 9px; height: 9px; }
.geo .pin i { position: absolute; inset: 0; border-radius: 50%; background: var(--amber); transition: background .2s; }
.geo .pin i.ok { background: #1f8a4c; }
.geo .pin::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(31,138,76,.16); }
.cz-mini { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.7); font-size: 16px; display: grid; place-items: center; color: var(--ink); }

.cz-main { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; padding: 8px 16px 34px; min-height: calc(100dvh - 66px); }
.quiet { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 16px 0 24px; }
.panicWrap { position: relative; width: 300px; height: 300px; max-width: 84vw; max-height: 84vw; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; border-radius: 50%; }
.ring.r1 { width: 100%; height: 100%; border: 1px solid rgba(232,181,58,.22); animation: czpulse 3s ease-out infinite; }
.ring.r2 { width: 88%; height: 88%; border: 1px solid rgba(30,107,77,.32); }
.halo { position: absolute; width: 93%; height: 93%; border-radius: 50%; background: radial-gradient(circle, rgba(232,181,58,.26) 0%, rgba(30,107,77,0) 68%); filter: blur(4px); }
@keyframes czpulse { 0% { transform: scale(1); opacity: .85; } 70% { transform: scale(1.09); opacity: 0; } 100% { opacity: 0; } }
.panic { width: 76%; height: 76%; border-radius: 50%; position: relative; border: none; cursor: pointer; color: #fff; background: radial-gradient(120% 120% at 38% 28%, #313741 0%, #181b21 46%, #0a0c0f 100%); box-shadow: 0 0 0 2px rgba(232,181,58,.55) inset, 0 0 0 6px rgba(30,107,77,.20), 0 24px 50px -16px rgba(0,0,0,.82), 0 8px 22px -6px rgba(232,181,58,.28); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; transition: transform .12s; }
.panic:active { transform: scale(.97); }
.panic::before { content: ""; position: absolute; top: 9%; left: 50%; transform: translateX(-50%); width: 64%; height: 27%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.45), rgba(255,255,255,0)); filter: blur(2px); }
.panic::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px solid rgba(232,181,58,.40); }
.panic .ico { position: relative; z-index: 1; opacity: .96; }
.panic .ico svg { width: 40px; height: 40px; display: block; }
.panic .lbl { position: relative; z-index: 1; font-size: 32px; font-weight: 800; letter-spacing: 6px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.panic .sub { color: var(--gold); }
.panic .sub { position: relative; z-index: 1; font-size: 10px; letter-spacing: 1.4px; font-weight: 600; opacity: .85; margin-top: -3px; text-transform: uppercase; }

.voicebtn { margin-top: 34px; display: inline-flex; align-items: center; gap: 11px; padding: 14px 24px; border-radius: 999px; background: rgba(255,255,255,.62); border: 1px solid var(--line); box-shadow: 0 8px 20px -12px rgba(0,0,0,.25); font-size: 14px; font-weight: 700; color: var(--ink); }
.voicebtn .mic { display: flex; color: #42454c; }
.voicebtn .mic svg { width: 18px; height: 18px; display: block; }
.voicebtn.recording { background: linear-gradient(180deg, #e8474c, var(--red-2)); color: #fff; border-color: transparent; animation: czrec 1.1s infinite; }
.voicebtn.recording .mic { color: #fff; }
@keyframes czrec { 0%,100% { box-shadow: 0 10px 24px -10px rgba(209,31,46,.5); } 50% { box-shadow: 0 10px 30px -6px rgba(209,31,46,.85); } }
.voicebtn .voice-time { font-weight: 800; }

.cztrack { width: 100%; max-width: 460px; margin: 26px auto 0; background: linear-gradient(180deg, #15171c, #0c0d10); border-radius: 24px; color: #fff; padding: 18px 18px 16px; box-shadow: 0 24px 50px -22px rgba(0,0,0,.6); position: relative; overflow: hidden; }
.cztrack::before { content: ""; position: absolute; top: -40px; right: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(209,31,46,.22), rgba(209,31,46,0) 70%); }
.czt-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; }
.czt-ttl { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.czt-live { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; color: #ff6b73; text-transform: uppercase; }
.czt-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4a52; box-shadow: 0 0 0 3px rgba(255,74,82,.18); }
.czt-steps { display: flex; align-items: center; margin: 2px 0 14px; }
.czt-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.czt-node { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.2); background: #1f2127; }
.czt-step.done .czt-node { background: #ff4a52; border-color: #ff4a52; box-shadow: 0 0 0 4px rgba(255,74,82,.16); }
.czt-step.now .czt-node { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.14); }
.czt-step span:last-child { font-size: 10px; color: #a9abb1; font-weight: 700; }
.czt-step.done span:last-child, .czt-step.now span:last-child { color: #e9eaee; }
.czt-seg { flex: 1 1 auto; height: 1.5px; background: rgba(255,255,255,.12); margin: 0 4px 18px; }
.czt-seg.fill { background: linear-gradient(90deg, #ff4a52, rgba(255,74,82,.4)); }
.czt-unit { font-size: 12px; font-weight: 700; color: #c9cbd1; margin-bottom: 12px; }
.czt-unit.on { color: #7ee2a8; }
.czt-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 184px; overflow: auto; margin-bottom: 10px; }
.czt-empty { font-size: 12px; color: #a9abb1; text-align: center; padding: 6px; }
.czt-msg { font-size: 12.5px; line-height: 1.4; color: #d6d7db; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); padding: 9px 12px; border-radius: 13px; max-width: 90%; overflow-wrap: anywhere; word-break: break-word; }
.czt-msg.op { border-top-left-radius: 4px; align-self: flex-start; }
.czt-msg.me { border-top-right-radius: 4px; align-self: flex-end; background: rgba(209,31,46,.18); border-color: rgba(209,31,46,.28); color: #fff; }
.czt-msg .who { display: block; font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: #a9abb1; margin-bottom: 3px; font-weight: 800; }
.cz-emfb { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,13,16,.62); backdrop-filter: blur(3px); padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.cz-emfb-card { width: 100%; max-width: 460px; background: #fff; border-radius: 20px; padding: 22px 18px; text-align: center; box-shadow: 0 -10px 44px rgba(0,0,0,.45); }
.cz-emfb-ic { font-size: 42px; line-height: 1; }
.cz-emfb-t { font-size: 20px; font-weight: 900; color: var(--red-2); margin: 8px 0 4px; }
.cz-emfb-s { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.cz-emfb-call { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 58px; border-radius: 14px; background: var(--red); color: #fff; font-size: 18px; font-weight: 800; text-decoration: none; margin-bottom: 10px; }
.cz-emfb-call.bom { background: #e07b00; }
.cz-emfb-retry { width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 15px; font-weight: 800; }
.cz-emfb-close { width: 100%; min-height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; }
.czt-ask { background: #fff7e6; border: 1px solid #f0dca6; color: #6f5a18; border-radius: 11px; padding: 9px 12px; font-size: 13px; line-height: 1.35; margin-bottom: 8px; }
.czt-ask b { color: #5c4a12; }
.czt-input { display: flex; gap: 8px; align-items: stretch; }
.czt-input input { flex: 1 1 auto; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; padding: 11px 13px; color: #fff; font-size: 16px; }
.czt-input input::placeholder { color: #8a8c92; }
.czt-input button { flex: 0 0 auto; background: var(--red); border: none; color: #fff; border-radius: 11px; padding: 0 16px; min-height: 44px; font-weight: 800; white-space: nowrap; }
.czt-input .czt-imgbtn { flex: 0 0 auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; padding: 0 12px; font-size: 17px; }
.czt-photo { max-width: 190px; border-radius: 10px; display: block; margin-top: 3px; }
.czt-loc { display: inline-block; margin-top: 3px; color: #8fd0ff; font-weight: 700; text-decoration: none; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 7px 12px; border-radius: 10px; }
.czt-audio { width: 210px; max-width: 100%; height: 38px; margin-top: 3px; }

/* ===== intro cinematográfica (vecino) ===== */
.cz-intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; background: radial-gradient(1200px 700px at 50% 26%, #103f7a 0%, #0a2a52 45%, #05152c 100%); color: #fff; cursor: pointer; }
.cz-intro.hide { opacity: 0; transform: scale(1.06); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.cz-intro .intro-glow { position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(31,111,235,.35), transparent 60%); filter: blur(30px); animation: czIntroGlow 3s ease-in-out infinite; }
@keyframes czIntroGlow { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .85; transform: scale(1.08); } }
.cz-intro .intro-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; }
.cz-intro .intro-seal { position: relative; width: 118px; height: 118px; border-radius: 28px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 24px 70px -12px rgba(0,0,0,.65), 0 0 0 1px rgba(232,200,120,.55); animation: czSealIn 1.05s cubic-bezier(.18,.85,.2,1) both; }
.cz-intro .intro-seal img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.cz-intro .intro-seal::after { content: ""; position: absolute; inset: -10px; border-radius: 34px; border: 2px solid rgba(232,200,120,.45); animation: czRing 2.2s ease-out infinite; }
@keyframes czRing { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes czSealIn { 0% { opacity: 0; transform: scale(.6) translateY(14px); } 100% { opacity: 1; transform: none; } }
.cz-intro .intro-title { font-size: 28px; font-weight: 900; letter-spacing: 1px; opacity: 0; animation: czUp .8s ease .5s both; }
.cz-intro .intro-sub { font-size: 12.5px; letter-spacing: 3px; text-transform: uppercase; color: #e8c878; opacity: 0; animation: czUp .8s ease .75s both; }
.cz-intro .intro-line { width: 0; height: 2px; background: linear-gradient(90deg, transparent, #e8c878, transparent); margin-top: 12px; animation: czLine 1.1s ease .95s both; }
.cz-intro .intro-hint { font-size: 11px; letter-spacing: 1px; color: rgba(255,255,255,.5); margin-top: 18px; opacity: 0; animation: czFade 1s ease 1.7s both; }
@keyframes czUp { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }
@keyframes czLine { 0% { width: 0; opacity: 0; } 100% { width: 220px; opacity: 1; } }
@keyframes czFade { 0% { opacity: 0; } 100% { opacity: 1; } }

.cz-confirm { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,13,16,.55); backdrop-filter: blur(3px); padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.cz-confirm-card { width: 100%; max-width: 440px; background: var(--paper); border-radius: 24px; padding: 22px 20px 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); text-align: center; }
.cz-confirm-ttl { font-size: 20px; font-weight: 800; }
.cz-confirm-sub { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.cz-confirm-send { width: 100%; min-height: 60px; border: none; border-radius: 16px; background: radial-gradient(120% 120% at 40% 25%, #ff4a52, var(--red) 55%, #9c121d); color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .4px; display: flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 16px 30px -12px rgba(209,31,46,.6); }
.cz-count { min-width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 15px; }
.cz-confirm-cancel { width: 100%; min-height: 50px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; }

.cz-flash { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(12,13,16,.6); backdrop-filter: blur(4px); }
.cz-flash-card { text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cz-flash-ic { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #33d27f, #127a44); display: grid; place-items: center; font-size: 52px; color: #fff; box-shadow: 0 16px 40px -12px rgba(18,122,68,.7); margin-bottom: 6px; }
.cz-flash-t { font-size: 22px; font-weight: 800; }
.cz-flash-s { font-size: 15px; opacity: .85; }

.cz-install { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px; background: linear-gradient(180deg, #15171c, #0c0d10); color: #fff; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); max-width: 460px; margin: 0 auto; }
.cz-install-ic { width: 40px; height: 40px; border-radius: 11px; background: #fff; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center; }
.cz-install-ic img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cz-install-tx { flex: 1; line-height: 1.25; min-width: 0; }
.cz-install-tx b { font-size: 14px; font-weight: 800; display: block; }
.cz-install-tx small { font-size: 11.5px; color: #a9abb1; }
.cz-install-btn { flex: 0 0 auto; background: var(--red); border: none; color: #fff; font-weight: 800; font-size: 14px; padding: 11px 16px; border-radius: 12px; }
.cz-install-x { flex: 0 0 auto; background: transparent; border: none; color: #8a8c92; font-size: 15px; width: 28px; height: 28px; }

/* ---------- pill "instalar app" (SIEMPRE visible hasta instalar) ---------- */
.cz-installpill { width: 100%; max-width: 460px; display: flex; align-items: center; gap: 12px; margin: 18px auto 0; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, #f5f8f5); box-shadow: 0 10px 26px -16px rgba(20,30,24,.4); text-align: left; }
.cz-installpill:active { transform: scale(.99); }
.ip-ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.ip-ic img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ip-tx { flex: 1; min-width: 0; line-height: 1.25; }
.ip-tx b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.ip-tx small { font-size: 11.5px; color: var(--muted); }
.ip-go { flex: 0 0 auto; background: var(--green); color: #fff; font-weight: 800; font-size: 13px; padding: 9px 14px; border-radius: 11px; }

/* ---------- hoja de instrucciones para iPhone ---------- */
.ios-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,16,13,.55); backdrop-filter: blur(4px); padding: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.ios-card { width: 100%; max-width: 460px; background: var(--paper); border-radius: 24px; padding: 20px 18px 16px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); animation: iosUp .3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes iosUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ios-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ios-seal { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.ios-seal img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ios-ht b { font-size: 16px; font-weight: 800; display: block; }
.ios-ht small { font-size: 12px; color: var(--muted); }
.ios-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; background: #f5f7f4; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; }
.ios-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.ios-tx { font-size: 13.5px; line-height: 1.3; }
.ios-ic { font-size: 16px; }
.ios-note { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 4px; }
.ios-warn { background: #fff7e6; border: 1px solid #f0d9a8; color: #8a5a00; font-size: 12.5px; line-height: 1.35; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.ios-tabs { display: flex; gap: 6px; background: #eef1ee; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.ios-tabs button { flex: 1; border: none; background: transparent; font-weight: 700; font-size: 13px; padding: 9px; border-radius: 9px; color: var(--muted); }
.ios-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ios-ok { width: 100%; margin-top: 12px; background: var(--green); color: #fff; border: none; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 14px; }
.ios-ok.ios-sec { background: #eef1ee; color: var(--ink); margin-top: 8px; }

/* ---------- pulido iPhone: notch / safe areas ---------- */
html { -webkit-text-size-adjust: 100%; }
.cz-top { padding-top: calc(14px + env(safe-area-inset-top)); }
.cz-main { padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
@keyframes pulse { 0%,100% { box-shadow: 0 12px 26px rgba(212,42,48,.4); } 50% { box-shadow: 0 12px 26px rgba(212,42,48,.7); } }

/* seguimiento del caso */
.track {
  width: 100%; padding: 16px; border-radius: 20px; background: #fff;
  border: 2px solid var(--green); box-shadow: var(--shadow);
}
.track h3 { font-size: 18px; margin-bottom: 4px; }
.track .code { color: var(--muted); font-weight: 800; font-size: 14px; }
.track-steps { display: flex; gap: 6px; margin: 14px 0 6px; }
.tstep {
  flex: 1; display: grid; place-items: center; gap: 6px; padding: 10px 4px;
  border-radius: 14px; background: var(--bg); color: var(--muted);
}
.tstep .ico { font-size: 28px; }
.tstep b { font-size: 12px; font-weight: 800; }
.tstep.done { background: color-mix(in srgb, var(--green) 16%, #fff); color: var(--green-2); }
.tstep.now { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(30,107,77,.3); }
.track .new-btn {
  width: 100%; min-height: 50px; margin-top: 12px; border: 0; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 16px;
}
.more-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.more-alerts span { padding: 5px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.chat { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.chat-title { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.chat-msgs { display: grid; gap: 6px; max-height: 200px; overflow: auto; margin-bottom: 8px; }
.chat-empty { color: var(--muted); font-size: 13px; }
.cmsg { display: grid; gap: 1px; padding: 8px 11px; border-radius: 12px; font-size: 14px; max-width: 85%; }
.cmsg b { font-size: 11px; opacity: .7; }
.cmsg.op { background: #e9f1ff; justify-self: start; }
.cmsg.me { background: #e7f3ec; justify-self: end; text-align: right; }
.op-help { padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }

/* ===== Dashboard amigable ===== */
.op-head { align-items: center; }
.op-title h2 { font-size: 22px; }
.op-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.op-status .sep { opacity: .45; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(20,30,24,.04); }
.kpi-ic { grid-row: 1 / 3; font-size: 26px; }
.kpi-num { font-size: 27px; font-weight: 900; line-height: 1; }
.kpi-lbl { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.kpi.k-red { border-left-color: var(--red); }
.kpi.k-crit { border-left-color: #d42a30; background: #fff7f7; }
.kpi.k-amber { border-left-color: var(--amber); }
.kpi.k-blue { border-left-color: var(--blue); }
.kpi.k-green { border-left-color: var(--green); }
.kpi.k-gray { border-left-color: #9aa6a0; }

.incident-item { border-left: 5px solid var(--line); transition: background .15s; }
.incident-item.critical { border-left-color: var(--red); }
.incident-item.high { border-left-color: var(--amber); }
.incident-item.normal { border-left-color: var(--green); }
.incident-item.nuevo { background: #fff5f5; box-shadow: inset 0 0 0 1px rgba(212,42,48,.25); }
.incident-item.selected { border-color: var(--green); border-left-color: var(--green); background: #f1f7f1; }
.ii-top, .ii-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ii-cat { font-weight: 900; font-size: 15px; }
.ii-time { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ii-place { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.st-red { background: #fde8e8; color: #a51f25; }
.st-amber { background: #fbe7cf; color: #84520b; }
.st-blue { background: #e3eef5; color: #1c5878; }
.st-green { background: #e4f3ea; color: #15543b; }
.st-gray { background: var(--bg); color: var(--muted); }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* flash de confirmacion */
.flash {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(20,84,59,.97); color: #fff; animation: fade .2s ease;
}
.flash-inner { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.flash-check {
  display: grid; place-items: center; width: 130px; height: 130px; border-radius: 50%;
  background: #fff; color: var(--green); font-size: 78px; font-weight: 900;
  animation: pop .3s cubic-bezier(.2,1.3,.5,1);
}
.flash-title { font-size: 30px; font-weight: 900; }
.flash-sub { font-size: 18px; opacity: .92; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===================== OPERADOR ===================== */
.operator { display: grid; gap: 14px; padding: 16px; }
.op-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
}
.op-eyebrow { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.op-head h2 { font-size: 22px; }
.op-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.op-actions select { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats article { padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.stats span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.stats strong { display: block; margin-top: 6px; font-size: 26px; }
.ops-grid {
  display: grid; gap: 12px;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, .85fr) minmax(320px, 1fr);
  align-items: start;
}
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; }
.panel-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.map { height: 520px; width: 100%; background: #e6ece6; }
.incident-list { max-height: 520px; overflow: auto; padding: 10px; display: grid; gap: 9px; }
.incident-item {
  width: 100%; display: grid; gap: 7px; padding: 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; color: var(--ink);
}
.incident-item.selected { border-color: var(--green); background: #f1f7f1; }
.incident-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.code { color: var(--muted); font-size: 11px; font-weight: 900; }
.incident-title { font-weight: 900; font-size: 15px; }
.incident-meta { color: var(--muted); font-size: 12px; }
.priority { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 900; }
.priority.critical { background: var(--red); }
.priority.high { background: var(--amber); }
.priority.normal { background: var(--green); }
.detail-panel { min-height: 540px; }
.empty { margin: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.detail { display: grid; gap: 12px; padding: 14px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.detail-top h3 { font-size: 19px; }
.detail-top p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 11px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.block { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
.block h4 { margin: 0 0 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { padding: 9px; border-radius: 9px; background: var(--bg); }
.fact span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.fact strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav-actions a, .nav-actions button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 800; }
.nav-actions a:first-child { background: var(--green); color: #fff; border-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; }
.chips button.active { background: var(--green); color: #fff; border-color: var(--green); }
.assign-row { display: flex; gap: 8px; }
.assign-row select { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; min-height: 38px; }
.assign-row button, .chat-row button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-weight: 800; }
.media-row { display: flex; flex-wrap: wrap; gap: 10px; }
.media-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 800; color: var(--ink); text-decoration: none; }
.media-chip img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.media-chip audio { height: 36px; }
.media-audio { width: 100%; }
.message-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.message-line:last-child { border-bottom: 0; }
.message-line strong { font-size: 12px; }
.message-line p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.message-line time { color: var(--muted); font-size: 11px; }
.chat-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-row input, .assign-row input { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(420px, calc(100vw - 28px)); }
.toast { padding: 13px 16px; border-radius: 12px; background: #16201a; color: #fff; box-shadow: var(--shadow); font-weight: 800; text-align: center; }

/* ---------- confirmacion gigante (vecino) ---------- */
.confirm { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: 1fr 1fr; animation: fade .15s ease; }
.confirm-send, .confirm-cancel { border: 0; display: grid; place-items: center; gap: 6px; color: #fff; }
.confirm-send { background: #1e7d52; }
.confirm-cancel { background: #c0242a; }
.confirm .big-emoji { font-size: 84px; line-height: 1; }
.confirm-label { font-size: 32px; font-weight: 900; letter-spacing: .5px; }
.confirm-count { font-size: 22px; font-weight: 800; opacity: .9; }
.confirm-send:active, .confirm-cancel:active { filter: brightness(.92); }

/* ---------- login (panel) ---------- */
.panel-body { background: linear-gradient(160deg, #15543b, #0e3a28); }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); display: grid; gap: 12px; padding: 26px 22px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.brand-mark.big { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; justify-self: center; }
.login-card h1 { margin: 0; text-align: center; font-size: 22px; }
.login-sub { margin: 0 0 6px; text-align: center; color: var(--muted); font-size: 13px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ink); }
.login-card input { min-height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; font-size: 16px; }
.login-btn { min-height: 50px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font-size: 17px; font-weight: 900; }
.login-btn:disabled { opacity: .6; }
.login-error { color: var(--red-2); font-weight: 800; font-size: 14px; text-align: center; }
.who { color: var(--muted); font-weight: 800; font-size: 13px; align-self: center; }

/* ---------- extras operador ---------- */
.ev { font-size: 14px; }
.out { color: var(--red-2); font-weight: 900; }
.alert-out { padding: 10px 12px; border-radius: 10px; background: #fff4f3; border: 1px solid rgba(201,45,50,.3); color: var(--red-2); font-weight: 800; font-size: 13px; }
.media-row { align-items: flex-start; }
.media-photo { display: grid; gap: 4px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.media-photo img { width: 100px; height: 100px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.media-block { display: grid; gap: 4px; font-size: 12px; color: var(--ink); font-weight: 800; }
.media-block audio { width: 240px; max-width: 100%; }

/* ---------- 3 botones generales + gear ---------- */
.cats-3 { grid-template-columns: repeat(3, 1fr); }
.cats-3 .cat { min-height: 104px; padding: 10px 6px; }
.cats-3 .cat b { font-size: 15px; }
.cats-3 .cat-emoji { width: 52px; height: 52px; font-size: 28px; }
.gear { font-size: 16px; padding: 0 11px; }

/* ---------- onboarding ---------- */
.onb { position: fixed; inset: 0; z-index: 80; background: linear-gradient(165deg, #1e6b4d, #123f2d); color: #fff; display: grid; place-items: center; overflow: auto; }
.onb-step { width: min(420px, 100%); min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 28px 22px; }
.onb-step h1 { font-size: 24px; line-height: 1.2; margin: 0; }
.onb-step p { margin: 0; font-size: 16px; opacity: .92; }
.onb-emoji { font-size: 76px; line-height: 1; }
.onb .brand-mark.big { background: #fff; color: var(--green); }
.onb-btn { width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: #fff; color: var(--green-2); font-size: 19px; font-weight: 900; }
.onb-btn:disabled { opacity: .7; }
.onb-skip { background: transparent; border: 0; color: rgba(255,255,255,.85); font-size: 15px; font-weight: 800; min-height: 40px; }
.onb-install { width: 100%; min-height: 50px; margin-top: 4px; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.6); border-radius: 14px; color: #fff; font-size: 16px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.perm { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: rgba(255,255,255,.12); border-radius: 14px; text-align: left; }
.perm span { font-size: 34px; }
.perm b { display: block; font-size: 17px; }
.perm small { color: rgba(255,255,255,.85); font-size: 14px; }
.onb-trust { font-size: 14px !important; opacity: .85 !important; }
.onb-lbl { width: 100%; text-align: left; font-weight: 800; font-size: 14px; }
.onb-step input { width: 100%; min-height: 52px; border: 0; border-radius: 13px; padding: 0 15px; font-size: 18px; color: var(--ink); }

/* ---------- reportado por (panel) ---------- */
.reporter { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reporter b { font-size: 15px; }
.rphone { color: var(--muted); font-weight: 800; font-size: 13px; margin-top: 2px; }
.call-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--green); color: #fff; font-weight: 900; text-decoration: none; white-space: nowrap; }

/* responsive */
@media (max-width: 980px) {
  .ops-grid { grid-template-columns: 1fr; }
  .map { height: 320px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand strong { font-size: 15px; }
  .ghost { padding: 0 11px; font-size: 13px; min-height: 36px; }
}

/* =========================================================================
   MENÚ, VISTAS, MIS REPORTES, CHAT Y PERFIL  (fase 2)
   Antes la app era una sola pantalla: se entraba al perfil y no había cómo
   volver. Ahora hay un menú fijo abajo y cada cosa vive en su vista.
   ========================================================================= */

.cz-view { display: none; width: 100%; animation: czIn .28s ease both; }
.cz-view.active { display: flex; flex-direction: column; align-items: center; gap: 16px; }
@keyframes czIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cz-view { animation: none; } }

/* deja lugar para el menú fijo */
.cz-main { padding-bottom: 92px !important; }

/* ---------- menú inferior ---------- */
.cz-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 24px rgba(28,43,18,.08);
}
.cz-nav button {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; padding: 8px 4px;
  border: 0; background: transparent; color: var(--muted);
  font-size: 11.5px; font-weight: 700; line-height: 1.1;
  border-top: 3px solid transparent;
}
.cz-nav button .ic { font-size: 20px; line-height: 1; }
.cz-nav button.on { color: var(--green-2); border-top-color: var(--marca-verde); background: linear-gradient(180deg, rgba(171,207,57,.14), transparent 70%); }
.cz-nav .nav-badge {
  position: absolute; top: 6px; right: 18%;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--green); color: #fff;
  font-size: 10.5px; font-weight: 800; display: grid; place-items: center;
}
.cz-nav .nav-dot {
  position: absolute; top: 10px; right: 24%;
  width: 9px; height: 9px; border-radius: 999px; background: var(--red);
  box-shadow: 0 0 0 3px rgba(212,42,48,.18);
}

/* ---------- encabezado de vista ---------- */
.cz-head { width: 100%; text-align: left; }
.cz-head h2 { font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.cz-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.cz-empty {
  width: 100%; padding: 26px 18px; text-align: center;
  color: var(--muted); font-size: 14px; background: var(--paper);
  border: 1px dashed var(--line); border-radius: 16px;
}

/* ---------- mis reportes ---------- */
.rep-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.rep-card {
  width: 100%; text-align: left; padding: 14px 15px;
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--line);
  border-radius: 15px; box-shadow: 0 6px 18px rgba(28,43,18,.06);
  display: flex; flex-direction: column; gap: 7px;
}
.rep-card.abierto { border-left-color: var(--marca-verde); }
.rep-card.camino { border-left-color: var(--marca-dorado); }
.rep-card.cerrado { border-left-color: var(--line); opacity: .72; }
.rep-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-code { font-weight: 900; font-size: 14px; color: var(--green-2); letter-spacing: .01em; }
.rep-cat { font-weight: 700; font-size: 14px; color: var(--ink); }
.rep-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.rep-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.rep-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-estado {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
}
.rep-estado.e-abierto { background: rgba(171,207,57,.22); color: #3d6111; }
.rep-estado.e-camino { background: rgba(251,205,50,.28); color: #7a5900; }
.rep-estado.e-cerrado { background: #eef1ea; color: var(--muted); }
.rep-unidad { font-size: 12px; font-weight: 700; color: var(--green-2); }
.rep-chip { font-size: 11.5px; color: var(--muted); }

/* ---------- chat ---------- */
.chat-pane { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.wa-cta {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(135deg, #25d366, #128c7e); color: #fff;
  box-shadow: 0 10px 24px rgba(18,140,126,.28);
}
.wa-cta .wa-ic { font-size: 26px; }
.wa-cta b { display: block; font-size: 15.5px; }
.wa-cta small { opacity: .92; font-size: 12.5px; }
.chat-info {
  width: 100%; padding: 16px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line);
}
.chat-info h3 { font-size: 15px; margin-bottom: 8px; color: var(--ink); }
.chat-info ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

/* ---------- perfil ---------- */
.usercode {
  width: 100%; padding: 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, rgba(171,207,57,.20), rgba(251,205,50,.24));
  border: 1px solid rgba(94,140,30,.28);
}
.usercode small { display: block; font-size: 12px; color: var(--green-2); font-weight: 700; }
.usercode b { display: block; font-size: 28px; font-weight: 900; letter-spacing: .04em; color: var(--ink); margin: 3px 0 5px; }
.usercode span { font-size: 12px; color: var(--muted); }
.cz-form { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.cz-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.cz-form input {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--paper);
  font-size: 16px; color: var(--ink);
}
.cz-form input:focus { outline: 2px solid rgba(94,140,30,.35); border-color: var(--green); }
.cz-save {
  margin-top: 16px; min-height: 52px; border: 0; border-radius: 14px;
  background: var(--green); color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 10px 22px rgba(94,140,30,.28);
}
.cz-save:disabled { opacity: .6; }
.cz-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.onb-lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 12px 0 4px; text-align: left; }
