/* ============================================================
   ITO GC — Estilos v2 · Tema claro · Azul/Verde institucional
   Tipografía: Courier Prime (mono) + DM Sans (cuerpo)
   Paleta: blanco · azul marino · verde esmeralda · gris suave
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Variables — tema claro ─────────────────────────────────── */
:root {
  /* Fondo y superficies */
  --bg:         #f4f6f9;
  --white:      #ffffff;
  --panel:      #ffffff;
  --panel-2:    #f0f4f8;
  --panel-3:    #e8eef5;

  /* Bordes */
  --border:     #d0dbe8;
  --border-2:   #b8c8d9;

  /* Azul marino institucional */
  --navy:       #0e2d5a;
  --navy-2:     #1a4280;
  --navy-3:     #2558a8;
  --navy-faint: rgba(14,45,90,.06);
  --navy-light: rgba(14,45,90,.12);

  /* Verde esmeralda */
  --green:      #0a7c52;
  --green-2:    #0d9e68;
  --green-3:    #10c07e;
  --green-faint:rgba(10,124,82,.07);
  --green-light:rgba(10,124,82,.15);

  /* Acento azul claro */
  --blue:       #1565c0;
  --blue-light: #e3eeff;

  /* Alertas */
  --red:        #c62828;
  --red-faint:  rgba(198,40,40,.08);
  --amber:      #e65100;
  --amber-faint:rgba(230,81,0,.08);

  /* Texto — más oscuro y legible en campo */
  --text-1:     #0a1628;
  --text-2:     #1e3352;
  --text-3:     #4a6580;

  /* Tipografías */
  --mono:       'Courier Prime', 'Courier New', monospace;
  --sans:       'DM Sans', system-ui, sans-serif;

  /* Forma */
  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 1px 4px rgba(14,45,90,.08), 0 4px 16px rgba(14,45,90,.06);
  --shadow-lg:  0 4px 20px rgba(14,45,90,.12);

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.5;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
input, textarea, select, button { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Layout principal ──────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* Móvil: ancho completo */
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

/* ── Fondo degradado desktop ── */
@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #dce8f5 0%, #e8f4ee 50%, #dce8f5 100%);
    background-attachment: fixed;
  }
}

/* ── Topbar ─────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 20px 10px;
  background: var(--navy);
  border-bottom: 3px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #ffffff;
}
.topbar-sub {
  font-size: 10px;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  margin-top: 2px;
}
.topbar-actions { display: flex; gap: 8px; }
.topbar-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.topbar-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Contenido ─────────────────────────────────────────────── */
#content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding-bottom: calc(var(--safe-bottom) + 80px);
}

/* ── Screens ─────────────────────────────────────────────────  */
.screen { display: none; }
.screen.active { display: block; }
#screen-login.active { display: flex; }

/* ── LOGIN ──────────────────────────────────────────────────── */
#screen-login {
  padding: 40px 28px;
  flex-direction: column;
  min-height: calc(100dvh - 55px);
  background: linear-gradient(160deg, #f0f7ff 0%, #e8f5ee 100%);
}
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}
.login-emblem {
  width: 80px;
  height: 80px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  box-shadow: 0 4px 20px rgba(14,45,90,.3);
}
.login-title {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .15em;
  color: var(--navy);
  text-transform: uppercase;
  font-weight: 700;
}
.login-subtitle {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
  letter-spacing: .05em;
}
.login-warning {
  background: var(--red-faint);
  border: 1px solid rgba(198,40,40,.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--red);
  margin-bottom: 28px;
  line-height: 1.7;
  text-align: center;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ── SELECTOR ───────────────────────────────────────────────── */
#screen-selector { padding: 24px; }
.selector-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ito-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }

@media (min-width: 768px) {
  .ito-cards { flex-direction: row; gap: 14px; }
  .ito-card  { flex: 1; flex-direction: column; align-items: flex-start; }
  .ito-card-badge { margin-left: 0; margin-top: 12px; }
}

.ito-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  box-shadow: var(--shadow);
}
.ito-card:hover {
  border-color: var(--navy-3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.ito-card:active { transform: translateY(0); }
.ito-card-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--navy-faint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy-light);
}
.ito-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 3px;
}
.ito-card-desc { font-size: 12px; color: var(--text-3); }
.ito-card-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  border: 1.5px solid var(--green-2);
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: .08em;
}

.saved-section-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.saved-exp-btn {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all .15s;
  text-align: left;
}
.saved-exp-btn:hover { border-color: var(--navy-3); background: var(--blue-light); }
.exp-num  { font-family: var(--mono); font-size: 11px; color: var(--text-1); flex: 1; }
.exp-tipo { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: .1em; }
.badge-vehiculo { background: var(--blue-light); color: var(--blue); }
.badge-interior { background: var(--amber-faint); color: var(--amber); }
.badge-exterior { background: var(--green-faint); color: var(--green); }
.exp-date { font-size: 10px; color: var(--text-3); }

/* ── EXPEDIENTE / FORMULARIO ────────────────────────────────── */
#screen-expediente { padding: 20px; }

@media (min-width: 768px) {
  #form-expediente .field-row { grid-template-columns: repeat(3, 1fr); }
}

.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row   { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-3);
  text-transform: uppercase;
}
.field-input {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 14px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  appearance: none;
}
.field-input:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px var(--navy-faint);
}
.field-textarea {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 13px;
  padding: 11px 13px;
  outline: none;
  width: 100%;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.7;
}
.field-textarea:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px var(--navy-faint);
}
select.field-input option { background: var(--white); color: var(--text-1); }

.section-divider {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--navy-2);
  text-transform: uppercase;
  border-top: 2px solid var(--border);
  padding-top: 14px;
  margin: 18px 0 12px;
  font-weight: 700;
}

/* ── INSPECCIÓN ─────────────────────────────────────────────── */
#screen-inspeccion { padding: 18px; }
#insp-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--navy);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,.7);
}
.zonas-section-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 18px 0 10px;
  font-weight: 700;
}
#zonas-list { display: flex; flex-direction: column; gap: 5px; }

@media (min-width: 768px) {
  #zonas-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}

.zona-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow);
}
.zona-btn:hover {
  border-color: var(--navy-3);
  background: var(--blue-light);
}
.zona-name { font-size: 13px; font-weight: 500; color: var(--text-1); flex: 1; }
.zona-stats { display: flex; gap: 6px; }
.stat-badge { font-size: 10px; padding: 2px 7px; border-radius: 3px; font-weight: 600; }
.stat-photo { background: var(--green-faint); color: var(--green); }
.stat-ind   { background: var(--amber-faint); color: var(--amber); }
.zona-arrow { color: var(--text-3); font-size: 18px; margin-left: auto; }

/* ── ZONA ───────────────────────────────────────────────────── */
#screen-zona { padding: 18px; }
.zona-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.back-btn {
  background: var(--panel-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  width: 38px; height: 38px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.back-btn:hover { border-color: var(--navy-3); color: var(--navy); background: var(--blue-light); }
#zona-title       { font-size: 15px; font-weight: 700; color: var(--navy); flex: 1; }
#zona-photo-count { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

.subsection-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

#zona-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
@media (min-width: 768px) {
  #zona-photos-grid { grid-template-columns: repeat(5, 1fr); }
}

.photo-thumb-wrap {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--panel-2);
  transition: transform .15s;
}
.photo-thumb-wrap:hover { transform: scale(1.03); border-color: var(--navy-3); }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(14,45,90,.8));
  padding: 5px 6px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.photo-num  { font-family: var(--mono); font-size: 8px; color: #fff; flex: 1; }
.ai-done    { font-size: 8px; color: #b8ffcc; }
.ai-edited  { font-size: 8px; color: #ffd580; }

.photo-add-btn {
  aspect-ratio: 1;
  background: var(--green-faint);
  border: 2px dashed var(--green-2);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  color: var(--green);
  transition: all .15s;
  font-weight: 600;
}
.photo-add-btn:hover { background: var(--green-light); border-color: var(--green); }
.add-icon { font-size: 22px; line-height: 1; }

.indicio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.indicio-codigo { font-family: var(--mono); font-size: 11px; color: var(--navy); font-weight: 700; flex-shrink: 0; }
.indicio-tipo   { font-size: 10px; color: var(--text-3); flex-shrink: 0; min-width: 48px; }
.indicio-desc   { font-size: 12px; color: var(--text-2); flex: 1; }
.indicio-del {
  background: none; border: none; color: var(--border-2);
  cursor: pointer; font-size: 14px; padding: 4px;
  transition: color .15s;
}
.indicio-del:hover { color: var(--red); }

/* ── FOTO ───────────────────────────────────────────────────── */
#screen-photo { padding: 18px; }
.photo-view-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel-2);
  margin-bottom: 16px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
#photo-view-img { width: 100%; max-height: 340px; object-fit: contain; }

.photo-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.photo-meta-item {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
}
.photo-meta-label { font-size: 9px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.photo-meta-val   { font-family: var(--mono); font-size: 11px; color: var(--text-1); margin-top: 3px; word-break: break-all; }

.ai-status {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: .06em;
  margin-bottom: 10px;
  font-weight: 700;
}
.ai-pending { background: var(--panel-3); color: var(--text-3); }
.ai-loading { background: var(--amber-faint); color: var(--amber); }
.ai-done    { background: var(--green-faint); color: var(--green); }
.ai-error   { background: var(--red-faint);  color: var(--red); }

#photo-ai-text {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.8;
  padding: 13px;
  width: 100%;
  min-height: 160px;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#photo-ai-text:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px var(--navy-faint);
}
.photo-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
@media (min-width: 768px) {
  .photo-actions { flex-direction: row; }
}

/* ── INFORME ─────────────────────────────────────────────────── */
#screen-informe { padding: 18px; }
#informe-preview {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.informe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 18px;
}
.informe-logo {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 2;
  color: var(--text-2);
}
.informe-num  { font-family: var(--mono); font-size: 13px; color: var(--navy); text-align: right; font-weight: 700; }
.informe-tipo { font-size: 10px; color: var(--text-3); text-align: right; margin-top: 3px; }

.informe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 18px;
}
.informe-table th, .informe-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.informe-table th { color: var(--text-3); font-size: 10px; letter-spacing: .06em; background: var(--panel-2); font-weight: 700; }
.td-label { color: var(--text-3); font-size: 11px; white-space: nowrap; width: 130px; font-weight: 600; }

.informe-section {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--navy);
  text-transform: uppercase;
  border-top: 2px solid var(--border);
  padding: 14px 0 0;
  margin: 20px 0 12px;
  font-weight: 700;
}
.informe-text { font-size: 13px; color: var(--text-2); line-height: 1.8; }

.informe-photo-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.informe-photo-header {
  background: var(--navy);
  padding: 8px 14px;
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.75);
  flex-wrap: wrap;
}
.informe-hash { font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,.45); margin-left: auto; }
.informe-photo-img { width: 100%; max-height: 260px; object-fit: contain; background: var(--panel-2); }
.informe-photo-text { padding: 14px; font-size: 13px; line-height: 1.8; color: var(--text-2); }
.informe-edited-badge {
  margin: 0 14px 12px;
  display: inline-block;
  padding: 3px 10px;
  border: 1.5px solid var(--green);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: .1em;
  font-weight: 700;
}

.changelog-box {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--mono);
  font-size: 10px;
}
.cl-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr 80px;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
}
@media (max-width: 500px) {
  .cl-row { grid-template-columns: 1fr 1fr; }
  .cl-hash { display: none; }
}
.cl-ts     { color: var(--text-3); }
.cl-action { color: var(--navy-2); font-weight: 700; }
.cl-detail { color: var(--text-2); }
.cl-hash   { color: var(--text-3); font-size: 9px; }

.informe-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── BOTONES ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14,45,90,.25);
}
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 4px 14px rgba(14,45,90,.3); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(10,124,82,.2);
}
.btn-secondary:hover { background: var(--green-2); }

.btn-ghost {
  background: var(--panel-2);
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--navy-3); color: var(--navy); background: var(--blue-light); }

.btn-danger {
  background: var(--red-faint);
  color: var(--red);
  border: 1px solid rgba(198,40,40,.3);
}
.btn-danger:hover { background: rgba(198,40,40,.15); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-icon { font-size: 15px; }

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: 8px 16px calc(var(--safe-bottom) + 8px);
  display: flex;
  gap: 6px;
  box-shadow: 0 -4px 20px rgba(14,45,90,.08);
}
.nav-btn {
  flex: 1;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all .15s;
  color: var(--text-3);
}
.nav-btn:hover, .nav-btn.active {
  border-color: var(--navy-3);
  color: var(--navy);
  background: var(--blue-light);
}
.nav-icon  { font-size: 18px; line-height: 1; }
.nav-label { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14,45,90,.4);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 26px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) {
  .modal { align-items: center; }
  .modal-card { border-radius: var(--radius-lg); max-width: 500px; }
}
.modal-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
  font-weight: 700;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ── TOASTS ─────────────────────────────────────────────────── */
#toasts {
  position: fixed;
  top: calc(var(--safe-top) + 65px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}
.toast {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(-8px);
  transition: all .25s;
  box-shadow: var(--shadow-lg);
}
.toast.show  { opacity: 1; transform: translateY(0); }
.toast-ok    { border-color: var(--green-2); color: var(--green); background: var(--green-faint); }
.toast-error { border-color: rgba(198,40,40,.4); color: var(--red); background: var(--red-faint); }

/* ── UTILIDADES ─────────────────────────────────────────────── */
.font-mono { font-family: var(--mono) !important; letter-spacing: .05em; }
.empty-msg { font-size: 13px; color: var(--text-3); padding: 24px 0; text-align: center; }
.demo-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-family: var(--mono);
  font-size: 80px;
  font-weight: 700;
  color: rgba(14,45,90,.04);
  pointer-events: none;
  z-index: 0;
  letter-spacing: .4em;
  user-select: none;
  white-space: nowrap;
}

/* ── PRINT ───────────────────────────────────────────────────── */
@media print {
  #topbar, #bottom-nav, .topbar-actions, .informe-actions, .back-btn { display: none !important; }
  body, #app { background: white; box-shadow: none; }
  #informe-preview { border: none; box-shadow: none; padding: 0; }
  #screen-informe { padding: 0; }
}

/* ── Animación entrada ──────────────────────────────────────── */
.screen.active { animation: screenIn .2s ease-out; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}




/* ═══════════════════════════════════════════════════════════════
   POLICÍA LOCAL — Estilos específicos de la app
   ═══════════════════════════════════════════════════════════════ */

/* ── Topbar ── */
.topbar {
  background: #00348a;
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  flex-wrap: nowrap;
  min-height: 52px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.topbar-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title .gold { color: #c8a84b; }
.topbar-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-btns {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}
.agent-badge {
  font-size: 0.75rem;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}

/* ── Tabs ── */
.tabs-wrap {
  background: rgba(0,41,102,.05);
  border-bottom: 2px solid #00348a;
  padding: 0 8px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 52px;
  z-index: 99;
  flex-wrap: nowrap;
}
.tabs-wrap::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: #00348a;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
  border-radius: 4px 4px 0 0;
  flex-shrink: 0;
}
.tab-btn:hover  { background: #e8eef8; }
.tab-btn.active { border-bottom-color: #00348a; background: white; }
.tab-badge-ok    { background: #2e7d32; color: white; border-radius: 10px; padding: 1px 5px; font-size: .6rem; margin-left: 3px; }
.tab-badge-count { background: #00348a; color: white; border-radius: 10px; padding: 1px 5px; font-size: .6rem; margin-left: 3px; }

/* ── Botones topbar ── */
.btn { padding: 6px 12px; border: none; border-radius: 6px; cursor: pointer; font-size: .78rem; font-weight: 600; transition: opacity .15s; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.btn:hover { opacity: .88; }
.btn-primary   { background: #00348a; color: white; }
.btn-secondary { background: #e8eef8; color: #00348a; border: 1px solid #8099c0; }
.btn-ghost     { background: transparent; color: #00348a; border: 1px solid #8099c0; }
.btn-danger    { background: #fdecea; color: #c0392b; border: 1px solid #c0392b; }
.btn-topbar    { background: rgba(255,255,255,.15); color: white; border: 1px solid rgba(255,255,255,.3); padding: 5px 8px; font-size: .72rem; }
.btn-topbar:hover { background: rgba(255,255,255,.25); }
.btn-save  { background: #e8f5e9; color: #1b5e20; padding: 5px 10px; font-size: .78rem; }
.btn-print { background: #e8f0fe; color: #1565c0; padding: 5px 10px; font-size: .78rem; }
.btn-sm    { padding: 4px 8px; font-size: .72rem; }
.btn-full  { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-top: 8px; }
.btn-foto-camera  { background: #00348a; color: white; padding: 10px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: .88rem; }
.btn-foto-gallery { background: #2e7d32; color: white; padding: 10px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: .88rem; }

/* ── Tab pages y page-card ── */
.tab-pages { flex: 1; overflow-y: auto; }
.tab-card  { padding: 12px; width: 100%; box-sizing: border-box; }
.page-card { background: white; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,52,138,.1); padding: 16px 20px; margin-bottom: 20px; border: 1px solid #c2d0ea; width: 100%; box-sizing: border-box; }

/* ── Formularios ── */
.field-group  { margin-bottom: 7px; }
.field-row    { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.f-label      { font-size: .8rem; font-weight: 600; color: #001e5a; white-space: nowrap; }
.f-input      { border: none; border-bottom: 1.5px solid #8099c0; border-radius: 0; outline: none; font-size: .88rem; padding: 4px 5px; background: transparent; color: #111; flex: 1; min-width: 40px; font-family: inherit; transition: border-color .2s; box-sizing: border-box; }
.f-input:focus { border-bottom-color: #00348a; background: #eef3ff; border-radius: 3px 3px 0 0; }
.f-input.short { flex: 0 0 auto; min-width: 28px; width: 32px; text-align: center; }
.f-input.mid   { flex: 0 0 auto; min-width: 80px; width: 110px; }
.f-input.wide  { flex: 1; min-width: 120px; }
input[type="date"], input[type="time"] { background: white !important; border: 1px solid #8099c0 !important; border-radius: 4px !important; padding: 4px 6px !important; color: #111 !important; flex: 0 0 auto; }
.f-textarea    { width: 100%; border: 1px solid #8099c0; border-radius: 4px; outline: none; font-size: .88rem; padding: 8px 10px; background: white; color: #111; font-family: inherit; resize: vertical; line-height: 1.7; transition: border-color .2s; min-height: 80px; box-sizing: border-box; }
.f-textarea:focus { border-color: #00348a; background: #eef3ff; }

/* ── Checkboxes ── */
.cb-group { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .83rem; }
.cb-group input[type=checkbox] { width: 16px; height: 16px; accent-color: #00348a; cursor: pointer; flex-shrink: 0; }

/* ── Sección headers ── */
.sec-header { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; padding: 6px 10px; background: #00348a; border-radius: 4px; color: white; font-weight: 700; font-size: .83rem; flex-wrap: wrap; }
.sec-badge  { background: white; color: #00348a; font-weight: 800; font-size: .78rem; padding: 1px 7px; border-radius: 3px; border: 2px solid #c8a84b; }

/* ── Two col ── */
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.col-block { background: #e8eef8; border: 1px solid #c2d0ea; border-radius: 6px; padding: 12px; }
.col-A     { border-left: 4px solid #00348a; }
.col-B     { border-left: 4px solid #c8a84b; }

/* ── Seg rows ── */
.seg-row   { display: flex; gap: 8px; flex-wrap: wrap; font-size: .82rem; padding: 5px 0; border-top: 1px solid #c2d0ea; margin-top: 6px; }
.seg-label { font-weight: 700; color: #00348a; font-size: .82rem; white-space: nowrap; }

/* ── Misc ── */
.copy-btn { background: #ff8f00; color: white; border: 2px solid #e65100; border-radius: 4px; padding: 4px 10px; font-size: .78rem; cursor: pointer; font-weight: 700; white-space: nowrap; }
.num-cell { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .78rem; color: #00348a; background: #e8eef8; padding: 4px 10px; border-radius: 4px; border: 1px solid #c2d0ea; }
.resultado-box { border: 2px solid #00348a; border-radius: 4px; padding: 8px 12px; min-width: 120px; background: #e8eef8; }
.resultado-box strong { display: block; font-size: .72rem; color: #00348a; margin-bottom: 4px; font-weight: 700; }
.sig-btn { padding: 4px 8px; border: 1px solid #aab; background: white; border-radius: 4px; cursor: pointer; font-size: .72rem; font-weight: 600; }
.sig-btn.sig-clear { color: #c0392b; border-color: #c0392b; }
.tool-btn { padding: 4px 8px; background: white; border: 1px solid #c2d0ea; border-radius: 4px; cursor: pointer; font-size: .75rem; font-weight: 600; }
.tool-btn:hover  { background: #e8eef8; }
.tool-btn.active { background: #00348a; color: white; border-color: #00348a; }
.declaration-box { border: 1px solid #c2d0ea; border-radius: 6px; padding: 10px 12px; background: white; margin: 8px 0; }
.firma-row { margin-top: 10px; border-top: 1px solid #ccc; padding-top: 8px; }

/* ── Toast ── */
.toast-el { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: #333; color: white; padding: 10px 20px; border-radius: 20px; font-size: .85rem; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.25); transition: transform .3s; z-index: 9999; pointer-events: none; white-space: nowrap; }
.toast-show      { transform: translateX(-50%) translateY(0) !important; }
.toast-ok        { background: #1b5e20; }
.toast-error     { background: #c0392b; }
.toast-info      { background: #1565c0; }

/* ── Modal ── */
.modal-wrap  { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-inner { background: white; border-radius: 10px; padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #c2d0ea; font-weight: 700; }

/* ── Login ── */
#screen-login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; background: #dce4f0; min-height: 100vh; }
.login-box { background: white; border-radius: 12px; padding: 32px 28px; max-width: 380px; width: 90%; margin: auto; box-shadow: 0 8px 40px rgba(0,52,138,.18); border-top: 4px solid #c8a84b; }
.login-title { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; text-align: center; color: #00348a; margin-bottom: 2px; }
.login-sub   { text-align: center; font-size: .82rem; color: #555; margin-bottom: 12px; }
.login-warning { background: #fff3cd; color: #7a4f00; font-size: .75rem; padding: 6px 10px; border-radius: 4px; margin-bottom: 16px; border-left: 3px solid #c8a84b; }
.login-emblem { width:72px;height:72px;margin:0 auto 16px;display:flex;align-items:center;justify-content:center; }

/* ── Turnos widget ── */
.btn-turno-widget { display: inline-flex; align-items: center; gap: 5px; font-family: monospace; font-size: .82rem; font-weight: 700; min-width: 68px; justify-content: center; }
.turno-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.turno-activo { background: #4caf50; box-shadow: 0 0 0 2px rgba(76,175,80,.4); animation: pulso-verde 2s infinite; }
@keyframes pulso-verde { 0%,100% { box-shadow: 0 0 0 2px rgba(76,175,80,.4); } 50% { box-shadow: 0 0 0 5px rgba(76,175,80,.1); } }

/* ── Screen expediente ── */
#screen-expediente { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Foto grid ── */
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.foto-selected { outline: 3px solid #00348a; }
.empty-msg { color: #888; font-size: .82rem; text-align: center; padding: 20px 0; }

/* ── Responsive móvil ── */
@media (max-width: 767px) {

  /* ── Tipografía base más grande ── */
  body { font-size: 15px; }

  /* ── Formularios: todo en columna, nada en fila ── */
  .field-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }
  .two-col    { grid-template-columns: 1fr !important; gap: 12px !important; }
  .doc-header { grid-template-columns: 1fr !important; gap: 10px !important; }
  .seg-row    { flex-wrap: wrap !important; gap: 10px !important; }
  .sec-header { flex-wrap: wrap !important; }

  /* ── Labels: tamaño legible ── */
  .f-label {
    font-size: .88rem !important;
    font-weight: 700 !important;
    margin-bottom: 2px;
  }

  /* ── Inputs: ancho completo, altura cómoda ── */
  .f-input {
    width: 100% !important;
    min-width: 0 !important;
    font-size: .95rem !important;
    padding: 9px 10px !important;
    border: 1.5px solid #8099c0 !important;
    border-radius: 6px !important;
    background: white !important;
    box-sizing: border-box !important;
  }
  .f-input.mid  { width: 100% !important; }
  .f-input.short{ width: 100% !important; }

  /* ── Fecha y hora: muy visibles ── */
  input[type="date"],
  input[type="time"] {
    width: 100% !important;
    font-size: 1rem !important;
    padding: 10px 12px !important;
    border: 2px solid #00348a !important;
    border-radius: 8px !important;
    background: white !important;
    color: #111 !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  /* ── Textareas ── */
  .f-textarea {
    font-size: .92rem !important;
    padding: 10px 12px !important;
    line-height: 1.6 !important;
  }

  /* ── Checkboxes más grandes ── */
  .cb-group { font-size: .88rem !important; gap: 8px !important; }
  .cb-group input[type=checkbox],
  .cb-group input[type=radio] {
    width: 20px !important;
    height: 20px !important;
  }

  /* ── Secciones ── */
  .sec-header {
    font-size: .85rem !important;
    padding: 8px 12px !important;
  }
  .tab-card  { padding: 6px 4px !important; }
  .page-card { padding: 12px 10px !important; }

  /* ── Topbar compacto ── */
  .topbar       { padding: 6px 10px; min-height: 48px; }
  .topbar-title { font-size: .82rem; }
  .topbar-sub   { display: none; }
  .agent-badge  { display: none; }
  .btn-topbar   { padding: 5px 8px; font-size: .72rem; }
  .btn-save     { padding: 6px 10px; font-size: .78rem; }
  .btn-print    { padding: 5px 8px; }

  /* ── Pestañas ── */
  .tabs-wrap { padding: 0 4px; top: 48px; }
  .tab-btn   { padding: 7px 9px; font-size: .72rem; }

  /* ── Fotos ── */
  .foto-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Modales ── */
  .modal-inner { max-height: 95vh; border-radius: 10px 10px 0 0; margin-top: auto; padding: 16px; }
  .modal-wrap  { align-items: flex-end !important; }

  /* ── Copiar ── */
  .copy-btn { font-size: .78rem !important; padding: 5px 10px !important; }

  /* ── num-cell y resultado-box en columna ── */
  .num-cell      { flex-direction: column; align-items: flex-start; }
  .resultado-box { width: 100%; box-sizing: border-box; }

  /* ── Botones generales más grandes en móvil ── */
  .btn     { padding: 8px 14px; font-size: .85rem; }
  .btn-sm  { padding: 6px 10px; font-size: .78rem; }
  .btn-full{ padding: 14px; font-size: 1rem; }

  /* ── GPS input wrap ── */
  .gps-input-wrap { gap: 8px; }
  .btn-gps { width: 44px; height: 44px; font-size: 1.2rem; flex-shrink: 0; }
}
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: white !important; }
  .topbar, .tabs-wrap, .canvas-toolbar, .copy-btn, .btn-topbar, .btn-save, .btn-print,
  .sig-btn, .tool-btn, .btn-turno-widget { display: none !important; }
  .tab-card  { padding: 0 !important; }
  .page-card { box-shadow: none !important; border: 1px solid #ccc !important; page-break-inside: avoid; margin-bottom: 14px !important; padding: 12px !important; }
  .two-col   { grid-template-columns: 1fr 1fr !important; }
  .sec-header { background: #00348a !important; color: white !important; }
}

/* ══════════════════════════════════════════════════════════
   DESKTOP — contenido al 90% centrado (≥1024px)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

  /* Selector: topbar ancho completo, contenido centrado */
  #screen-selector .selector-wrap {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }

  /* Expediente: bloque central al 90% */
  #screen-expediente .tab-pages .tab-card {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* Topbar y tabs del expediente: ancho completo de pantalla */
  #screen-expediente .topbar,
  #screen-expediente .tabs-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ════════════════════════════════════════════════════════════
   SELECTOR DE MÓDULOS — pantalla de inicio
   ════════════════════════════════════════════════════════════ */

.selector-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* ── Sección de módulo ── */
.modulo-section {
  background: white;
  border: 1.5px solid #c2d0ea;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,52,138,.06);
  transition: box-shadow .2s;
}
.modulo-section:hover { box-shadow: 0 4px 16px rgba(0,52,138,.12); }

/* ── Cabecera del módulo ── */
.modulo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  background: #f8faff;
  border-bottom: 1px solid #e0e8f4;
  user-select: none;
  transition: background .15s;
}
.modulo-header:hover { background: #edf2ff; }
.modulo-icon  { font-size: 1.6rem; flex-shrink: 0; }
.modulo-title { font-weight: 800; font-size: 0.95rem; color: #00348a; }
.modulo-sub   { font-size: 0.75rem; color: #666; margin-top: 1px; }
.modulo-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  color: #8099c0;
  transition: transform .25s;
  flex-shrink: 0;
}
.modulo-chevron.open { transform: rotate(180deg); }

/* ── Grid de tarjetas ── */
.modulo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  background: white;
}

/* ── Tarjeta individual ── */
.ito-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 10px 12px;
  background: #f8faff;
  border: 1.5px solid #c2d0ea;
  border-top: 3px solid #c8a84b;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .15s, background .15s;
}
.ito-card:hover {
  border-color: #00348a;
  border-top-color: #00348a;
  box-shadow: 0 4px 16px rgba(0,52,138,.15);
  transform: translateY(-2px);
  background: white;
}
.ito-card:active { transform: translateY(0); }
.ito-icon  { font-size: 1.8rem; line-height: 1; }
.ito-name  { font-weight: 700; font-size: 0.82rem; color: #00348a; line-height: 1.3; }
.ito-desc  { font-size: 0.7rem; color: #666; line-height: 1.3; }
.ito-badge-muni {
  background: #e8eef8;
  color: #00348a;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #c8a84b;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.card-emergencia {
  border-color: #c0392b !important;
  border-top-color: #c0392b !important;
  background: #fdecea !important;
  animation: pulso-rojo 2.5s infinite;
}
@keyframes pulso-rojo {
  0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.3); }
  50%      { box-shadow: 0 0 0 6px rgba(192,57,43,.08); }
}
#modulo-search {
  transition: border-color .2s, box-shadow .2s;
}
#modulo-search:focus {
  border-color: #00348a !important;
  box-shadow: 0 0 0 3px rgba(0,52,138,.12);
  outline: none;
}
.saved-section  { margin-top: 8px; }
.saved-title    { font-weight: 700; font-size: 0.8rem; color: #555; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.saved-item     { background: white; border: 1px solid #c2d0ea; border-radius: 6px; padding: 10px 14px; margin-bottom: 6px; cursor: pointer; display: flex; gap: 10px; align-items: center; transition: border-color .15s; }
.saved-item:hover { border-color: #00348a; }
.saved-num      { font-weight: 700; font-size: 0.82rem; color: #00348a; white-space: nowrap; font-family: monospace; }
.saved-tipo     { font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #e8eef8; color: #00348a; border: 1px solid #c2d0ea; white-space: nowrap; }
.saved-detail   { font-size: 0.76rem; color: #666; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  /* Selector de módulos */
  .modulo-cards  { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
  .ito-card      { padding: 12px 8px; }
  .ito-icon      { font-size: 1.6rem; }
  .ito-name      { font-size: 0.82rem; }
  .ito-desc      { font-size: 0.7rem; }
  .ito-badge-muni{ font-size: 0.65rem; }
  .modulo-header { padding: 12px 14px; gap: 10px; }
  .modulo-title  { font-size: 0.92rem; }
  .modulo-sub    { font-size: 0.75rem; }
}
@media (max-width: 767px) {
  .gps-iframe { height: 200px; }
  .gps-addr   { font-size: 0.7rem; }
  .btn-gps    { width: 38px; height: 38px; font-size: 1.1rem; }
}
