*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.4;
  color: var(--color-text); background: var(--color-bg);
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--color-link); }
a:hover { color: var(--color-primary); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); font-size: var(--text-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid rgba(30, 136, 255, 0.5); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: #1E88FF; }

/* Estructura */
.app { min-height: 100vh; padding-bottom: calc(var(--nav-height) + 24px); }
.page { max-width: 960px; margin: 0 auto; padding: var(--space-4) var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.topbar { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; }
.topbar h1 { font-size: 18px; font-weight: 600; flex: 1; }
.topbar-home { justify-content: space-between; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.section-head h2, h2.section { font-size: var(--text-lg); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--color-primary); font-weight: 800; letter-spacing: 0.5px; }
.logo svg { width: 32px; height: 32px; }
.logo span small { display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--color-text-muted); }
.avatar { width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--color-primary); color: #fff; display: grid; place-items: center; font-weight: 700; text-decoration: none; font-size: 15px; }
.avatar:hover { color: #fff; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; background: transparent; border: 0; border-radius: var(--radius-md); cursor: pointer; color: var(--color-text); text-decoration: none; flex-shrink: 0; }
.icon-btn:hover { background: var(--color-surface); color: var(--color-text); }
.icon-btn svg { width: 22px; height: 22px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px; padding: 0 var(--space-5); border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, transform .05s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 6px 16px rgba(7, 55, 99, 0.24); }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-primary:active { background: var(--color-primary-active); transform: translateY(1px); }
.btn-secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: #EDF1F6; color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-text); }
.btn-ghost:hover { background: var(--color-surface); color: var(--color-text); }
.btn-danger { background: #fff; color: var(--color-defect); border-color: var(--color-defect-mark); }
.btn:disabled, .btn[aria-disabled="true"] { background: #E4E8F0; color: #6B7488; border-color: transparent; box-shadow: none; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 var(--space-3); font-size: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tarjetas y listas */
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: var(--space-4); }
.card-soft { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); }
a.card, .card-link { text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease; }
a.card:hover, .card-link:hover { box-shadow: 0 8px 20px rgba(7, 55, 99, 0.14); transform: translateY(-1px); color: inherit; }

.hero {
  display: flex; align-items: center; gap: var(--space-4); min-height: 96px; padding: 0 var(--space-5);
  background: var(--color-primary); border-radius: var(--radius-md); text-decoration: none; color: #fff; box-shadow: var(--shadow-raised);
}
.hero:hover { color: #fff; background: var(--color-primary-hover); }
.hero-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex-shrink: 0; }
.hero-icon svg { width: 28px; height: 28px; }
.hero strong { display: block; font-size: 19px; }
.hero span { font-size: 13px; color: rgba(255,255,255,.86); }

.tile { min-height: 84px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); text-decoration: none; color: var(--color-text); font-weight: 600; font-size: 15px; }
.tile:hover { background: #EDF1F6; color: var(--color-text); }
.tile svg { width: 24px; height: 24px; color: var(--color-primary); }

.item { display: flex; align-items: center; gap: var(--space-3); padding: 8px 10px; min-height: 72px; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { font-size: 12px; color: var(--color-text-subtle); }
.chev { width: 18px; height: 18px; color: #9AA3B5; flex-shrink: 0; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #2B3648; flex-shrink: 0; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 3px 9px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge-ok { color: var(--color-ok); background: var(--color-ok-soft); }
.badge-defect { color: var(--color-defect); background: var(--color-defect-soft); }
.badge-review { color: var(--color-review); background: var(--color-review-soft); }
.badge-mock { color: var(--color-mock); background: var(--color-mock-soft); }
.badge-error { color: var(--color-mock); background: var(--color-mock-soft); }
.badge-lg { font-size: 14px; padding: 6px 12px; }
.badge-lg svg { width: 16px; height: 16px; }

/* Resultado */
.result-head { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-4); border-radius: var(--radius-md); }
.result-head.ok { background: var(--color-ok-soft); }
.result-head.defect { background: var(--color-defect-soft); border: 1px solid #F2C4C4; }
.result-head.ok { border: 1px solid #BFE3CC; }
.result-head.error { background: var(--color-mock-soft); }
.result-head .mark { width: 48px; height: 48px; border-radius: var(--radius-full); display: grid; place-items: center; flex-shrink: 0; background: #fff; }
.result-head .mark svg { width: 26px; height: 26px; }
.result-head.ok .mark { color: var(--color-ok-mark); }
.result-head.defect .mark { color: #fff; background: var(--color-defect-mark); }
.result-head.ok .mark { color: #fff; background: var(--color-ok-mark); }
.result-head strong { display: block; font-size: 17px; }
.result-head.ok strong { color: var(--color-ok); }
.result-head.defect strong { color: var(--color-defect); }

.shot { position: relative; border-radius: var(--radius-md); overflow: hidden; background: #1C2635; }
.shot img { width: 100%; height: auto; }
.shot .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shot-full { display: block; width: calc(100% + 40px); margin: 0 -20px; padding: 0; border: 0; border-radius: 0; cursor: zoom-in; }
@media (min-width: 640px) { .shot-full { width: 100%; margin: 0; border-radius: var(--radius-md); } }
.shot-hint { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-full); background: rgba(8,12,20,.66); color: #fff; font-size: 12px; font-weight: 600; }
.shot-hint svg { width: 15px; height: 15px; }
.hallazgo { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.hallazgo.dudosa { border: 1px dashed var(--color-review-mark); background: #FFFBF2; }
.result-head span.muted { display: block; margin-top: 3px; }
.shot-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 8px; }
.shot-actions button { min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-full); background: rgba(14,20,31,.72); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.shot-actions svg { width: 16px; height: 16px; }

.conf { display: flex; flex-direction: column; gap: 6px; }
.conf-track { height: 6px; background: #EDF0F5; border-radius: var(--radius-full); overflow: hidden; }
.conf-fill { height: 100%; border-radius: var(--radius-full); }
.dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--color-text-muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.legend { font-size: 12px; line-height: 18px; color: var(--color-text-subtle); text-align: center; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; line-height: 19px; }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.notice-mock { background: var(--color-mock-soft); color: var(--color-mock); }
.notice-review { background: var(--color-review-soft); color: var(--color-review); }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.input, .select, .textarea {
  min-height: 52px; padding: 0 16px; width: 100%; font-size: 16px; background: #fff;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235A6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px; }
.textarea { min-height: 104px; padding: 12px 16px; resize: vertical; line-height: 22px; }
.input::placeholder, .textarea::placeholder { color: #8A94A6; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--color-defect-mark); }
.field-error { font-size: 13px; color: var(--color-defect); font-weight: 600; }
.field-hint { font-size: 12px; color: var(--color-text-subtle); display: flex; justify-content: space-between; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 56px; }
.input-wrap .icon-btn { position: absolute; top: 2px; right: 2px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--color-text-subtle); }
.search .input { padding-left: 44px; }

.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: var(--radius-full); background: #CBD3DF; transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--color-primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(30,136,255,.5); outline-offset: 2px; }

/* Chips y pestañas */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex-shrink: 0; min-height: 44px; padding: 0 14px; border-radius: var(--radius-full); border: 1px solid var(--color-border-strong); background: var(--color-surface); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--color-text); }
.chip svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary); }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.filtro { border: 0; margin: 0; padding: 20px 0 0; }
.filtro legend { padding: 0; margin-bottom: 10px; font-size: 16px; font-weight: 700; }

.proyecto { display: flex; flex-direction: column; gap: 6px; padding: 16px 8px 16px 16px; }
.proyecto-nombre { flex: 1; min-width: 0; padding-top: 12px; font-size: 17px; font-weight: 600; color: var(--color-text); text-decoration: none; }
.proyecto-nombre::after { content: ""; position: absolute; inset: 0; }
.proyecto { position: relative; }
.proyecto .icon-btn { position: relative; z-index: 1; color: var(--color-text-muted); }
.proyecto:hover { box-shadow: 0 8px 20px rgba(7, 55, 99, 0.14); }
.estado-punto { position: absolute; top: 8px; right: 8px; width: 14px; height: 14px; border-radius: var(--radius-full); border: 2px solid #fff; }
.leyenda { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--color-text-muted); }
.leyenda li { display: flex; align-items: center; gap: 6px; }
.leyenda span { width: 10px; height: 10px; border-radius: var(--radius-full); }
.barra-accion { position: sticky; bottom: calc(var(--nav-height) + 8px); z-index: 10; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px 0 4px; background: #fff; border-top: 1px solid var(--color-border); }
@media (min-width: 1024px) { .barra-accion { bottom: 0; } }
.tabs { display: flex; border-bottom: 1px solid var(--color-border); }
.tab { flex: 1; min-height: 48px; background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 600; font-size: 15px; color: var(--color-text-muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.stat { padding: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.stat b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; color: var(--color-primary); }
.stat span { font-size: 13px; color: var(--color-text-muted); }
.stacked { display: flex; height: 28px; border-radius: var(--radius-sm); overflow: hidden; background: #EDF0F5; }
.stacked div { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 0; }

.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumbs a { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: #2B3648; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .badge { position: absolute; left: 6px; bottom: 6px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-4); }
.empty .empty-icon { width: 72px; height: 72px; border-radius: var(--radius-full); background: var(--color-primary-soft); display: grid; place-items: center; color: var(--color-primary); }
.empty .empty-icon svg { width: 32px; height: 32px; }
.empty strong { font-size: 17px; }
.empty p { color: var(--color-text-muted); font-size: 14px; max-width: 300px; }

.day { font-size: 13px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: var(--space-2); }

.fab { position: fixed; right: 20px; bottom: calc(var(--nav-height) + 20px); z-index: 20; min-height: 56px; padding: 0 20px; border-radius: var(--radius-full); }

/* Navegación */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--nav-height);
  display: flex; align-items: flex-start; justify-content: space-around; padding: 8px 4px 0;
  background: #fff; border-top: 1px solid var(--color-border);
}
.nav-link { width: 72px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--color-text-subtle); font-size: 11px; font-weight: 600; border-radius: var(--radius-md); }
.nav-link svg { width: 22px; height: 22px; }
.nav-link:hover { color: var(--color-primary); }
.nav-link[aria-current="page"] { color: var(--color-primary); }
.nav-capture { position: relative; top: -26px; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--color-primary); font-size: 11px; font-weight: 700; }
.nav-capture span.ring { width: 64px; height: 64px; border-radius: var(--radius-full); background: var(--color-primary); border: 4px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px rgba(7, 55, 99, 0.32); }
.nav-capture span.ring svg { width: 28px; height: 28px; }
.nav-capture:hover span.ring { background: var(--color-primary-hover); }

@media (min-width: 1024px) {
  .app { padding-bottom: 0; padding-left: 220px; }
  .bottom-nav { top: 0; right: auto; width: 220px; height: auto; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 24px 12px; border-top: 0; border-right: 1px solid var(--color-border); }
  .bottom-nav .nav-brand { display: flex; margin: 0 8px 20px; }
  .nav-link { width: 100%; height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; font-size: 15px; }
  .nav-link[aria-current="page"] { background: var(--color-primary-soft); }
  .nav-capture { order: -1; top: 0; width: 100%; flex-direction: row; gap: 12px; padding: 0 12px; height: 56px; margin-bottom: 12px; border-radius: var(--radius-md); background: var(--color-primary); color: #fff; font-size: 15px; }
  .nav-capture span.ring { width: auto; height: auto; border: 0; box-shadow: none; background: none; }
  .nav-capture span.ring svg { width: 22px; height: 22px; }
  .nav-capture:hover { background: var(--color-primary-hover); color: #fff; }
  .nav-capture:hover span.ring { background: none; }
  .fab { bottom: 32px; }
  .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.nav-brand { display: none; }

/* Toast y diálogos */
.toast-zone { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 16px); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: var(--radius-md); background: #1A2233; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.24); animation: toast-in .2s ease; }
.toast.error { background: var(--color-defect); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

dialog.sheet { border: 0; padding: 12px 20px 28px; width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(8,12,20,.2); }
dialog.sheet::backdrop { background: rgba(8, 12, 20, 0.45); }
dialog.sheet .grabber { width: 44px; height: 5px; margin: 0 auto 16px; background: #D7DDE7; border-radius: var(--radius-full); }
dialog.sheet h2 { font-size: 20px; font-weight: 700; }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 16px; } dialog.sheet .grabber { display: none; } }
dialog.viewer { border: 0; padding: 0; background: #0E141F; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.viewer::backdrop { background: #0E141F; }
dialog.viewer .shot { border-radius: 0; height: 100%; display: grid; place-items: center; background: #0E141F; }
dialog.viewer .viewer-inner { position: relative; width: 100%; max-width: 1200px; }
dialog.viewer .close { position: fixed; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.12); color: #fff; }

/* Login */
.login { max-width: 420px; margin: 0 auto; min-height: 100vh; padding: 64px 24px 32px; display: flex; flex-direction: column; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.login-brand svg { width: 88px; height: 88px; }
.login-brand h1 { font-size: 28px; letter-spacing: 3px; color: var(--color-primary); font-weight: 800; }
.login-brand h1 small { display: block; font-size: 13px; letter-spacing: 6px; color: var(--color-text-muted); }
.login-brand p { color: var(--color-text-muted); font-size: 14px; }

/* Cámara */
.camera { position: fixed; inset: 0; background: #0E141F; color: #fff; overflow: hidden; }
.camera video, .camera .cam-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera .cam-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; background: #1C2635; }
.camera .cam-fallback p { max-width: 320px; color: #DCE3EE; }
.frame { position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-60%); aspect-ratio: 3 / 1; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(8,12,20,.6); pointer-events: none; }
.frame i { position: absolute; width: 36px; height: 36px; border: 3px solid #fff; }
.frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.frame-text { position: absolute; left: 10%; right: 10%; top: calc(50% + 12vw * 0.5); margin-top: 28px; text-align: center; font-size: 15px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.cam-top { position: absolute; top: 0; left: 0; right: 0; padding: 12px; display: flex; align-items: center; gap: 8px; }
.cam-btn { width: 48px; height: 48px; border-radius: var(--radius-full); border: 0; background: rgba(14,20,31,.6); color: #fff; display: grid; place-items: center; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.cam-btn:hover { color: #fff; background: rgba(14,20,31,.8); }
.cam-btn svg { width: 22px; height: 22px; }
.cam-btn[aria-pressed="true"] { background: #E8A317; color: #1A2233; }
.cam-context { flex: 1; min-width: 0; min-height: 48px; padding: 6px 14px; border-radius: var(--radius-full); border: 0; background: rgba(14,20,31,.6); color: #fff; text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: center; }
.cam-context b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-context span { font-size: 12px; color: #A9B4C6; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(8,12,20,.82); }
.cam-side { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #DCE3EE; background: none; border: 0; cursor: pointer; }
.cam-side .cam-btn { width: 52px; height: 52px; border-radius: 10px; background: #2E3B4F; border: 1px solid rgba(255,255,255,.24); }
.shutter { width: 76px; height: 76px; border-radius: var(--radius-full); border: 4px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
.shutter span { width: 58px; height: 58px; border-radius: var(--radius-full); background: #fff; transition: transform .1s; }
.shutter:active span { transform: scale(.92); }
.shutter:disabled { opacity: .4; cursor: not-allowed; }

.preview-img { border-radius: var(--radius-md); overflow: hidden; background: #1C2635; position: relative; }
.preview-img img { width: 100%; max-height: 52vh; object-fit: contain; }
.scan { position: absolute; left: 0; right: 0; height: 3px; background: #5AA8FF; box-shadow: 0 0 16px 4px rgba(90,168,255,.7); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: 4%; } to { top: 94%; } }
.steps { display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--color-text-muted); }
.steps li svg { width: 18px; height: 18px; }
.steps li.done { color: var(--color-ok); }
.steps li.active { color: var(--color-text); font-weight: 600; }
.steps .spinner { width: 18px; height: 18px; color: var(--color-primary); }
.step-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #CBD3DF; flex-shrink: 0; }
.progress { height: 8px; background: #EDF0F5; border-radius: var(--radius-full); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--color-primary); border-radius: var(--radius-full); transition: width .6s ease; }

.cam-tips { position: absolute; top: 72px; left: 0; right: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 12px; }
.cam-tips span { padding: 8px 12px; font-size: 12px; font-weight: 600; background: rgba(14,20,31,.6); border-radius: var(--radius-full); }
.cam-note { position: absolute; left: 24px; right: 24px; top: -28px; text-align: center; font-size: 11px; color: #A9B4C6; }
.steps ul, ul.steps { list-style: none; margin: 0; padding: 0; }

.skeleton { background: linear-gradient(90deg, #EEF1F6 25%, #F6F8FB 50%, #EEF1F6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .scan { display: none; }
}

/* Reportes */
.stat span { display: block; font-weight: 500; }
.stat b { margin-top: 6px; color: var(--color-text); }
.dona { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.dona > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dona b { font-size: 24px; }
.dona span { font-size: 11px; color: var(--color-text-subtle); }
.dona-leyenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: #3E4859; }
.dona-leyenda li { display: flex; align-items: center; gap: 8px; }
.dona-leyenda span { width: 10px; height: 10px; border-radius: var(--radius-full); flex-shrink: 0; }
.dona-leyenda b { color: var(--color-text); }
.reporte { padding-right: 4px; }
.reporte .icon-btn { color: var(--color-primary); }

/* Configuración y perfil */
.ajustes { padding: 4px 0; }
.ajuste { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; background: none; border: 0; text-align: left; color: var(--color-text); text-decoration: none; font-size: 16px; font-weight: 600; cursor: pointer; }
.ajuste + .ajuste { border-top: 1px solid var(--color-border); }
.ajuste:hover { background: var(--color-surface); color: var(--color-text); }
div.ajuste { cursor: default; }
div.ajuste:hover { background: none; }
.ajuste small, .tipos small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--color-text-subtle); }
.ajuste-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--color-primary-soft); color: var(--color-primary); display: grid; place-items: center; flex-shrink: 0; }
.ajuste-ico svg { width: 20px; height: 20px; }
.tipos { list-style: none; margin: 0; padding: 0; }
.tipos li { display: flex; align-items: center; gap: 4px; min-height: 56px; border-bottom: 1px solid var(--color-border); font-size: 15px; font-weight: 600; }
.tipos li.inactivo > span { color: var(--color-text-subtle); }
.tipos .icon-btn { color: var(--color-text-muted); }
.perfil { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 12px; text-align: center; }
.perfil strong { font-size: 20px; margin-top: 6px; }
.avatar-lg { width: 88px; height: 88px; font-size: 30px; }
