/* ADRE-v2.css */


  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  /* ── SCREENS ── */
  .screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
  }
  .screen.active {
    display: flex;
  }

  /* ── SPLASH ── */
  #screen-splash {
    background: var(--bg);
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  .splash-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(232,54,74,0.12) 0%, transparent 70%),
                radial-gradient(ellipse 60% 40% at 80% 80%, rgba(59,130,246,0.08) 0%, transparent 60%);
  }
  .splash-content {
    position: relative;
    text-align: center;
    z-index: 1;
  }
  .splash-icon {
    width: 90px; height: 90px;
    background: url('/apps/icons/citizen/icon-192.png') center/contain no-repeat;
    border-radius: 24px;
    margin: 0 auto 28px;
    animation: pulse-icon 2s ease-in-out infinite;
  }
  @keyframes pulse-icon {
    0%,100% { filter: drop-shadow(0 0 20px rgba(68,183,94,0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(68,183,94,0.8)); }
  }
  .splash-icon svg { display: none; }
  .splash-title {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 8px;
    line-height: 1;
    color: var(--text);
  }
  .splash-subtitle {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-top: 10px;
    text-transform: uppercase;
  }
  .splash-line {
    width: 60px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    margin: 28px auto;
  }
  .splash-loading {
    width: 20px; height: 20px; margin: 8px auto 0;
  }
  .splash-progress {
    width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid var(--border2); border-top-color: var(--red);
    animation: splash-spin 1s linear infinite;
  }
  @keyframes splash-spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) {
    .splash-progress { animation: none; }
  }

  /* ── WARNING ── */
  #screen-gps-gate {
    background: var(--bg);
    padding: 0;
    overflow-y: auto;
  }
  .gps-gate-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    text-align: center;
  }
  .gps-gate-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(74,158,255,.1);
    border: 2px solid rgba(74,158,255,.3);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 30px;
  }
  .gps-gate-title {
    font-size: 22px; font-weight: 800;
    color: var(--text-primary); margin-bottom: 10px;
    font-family: var(--font-display);
  }
  .gps-gate-text {
    font-size: 13px; color: var(--text-muted); line-height: 1.65;
    margin-bottom: 24px;
  }
  .gps-gate-note {
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
    background: rgba(255,255,255,.03); border: 1px solid var(--border2);
    border-radius: 10px; padding: 10px 14px; margin-top: 14px; text-align: left;
  }
  #screen-warning {
    background: var(--bg);
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
  }
  .warning-card {
    background: var(--bg2);
    border: 1px solid rgba(232,54,74,0.3);
    border-radius: 20px;
    padding: 36px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  }
  .warning-icon-wrap {
    width: 70px; height: 70px;
    background: rgba(232,54,74,0.12);
    border: 1px solid rgba(232,54,74,0.3);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
  }
  .warning-title {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700;
    letter-spacing: 1px;
    color: var(--red-text);
    margin-bottom: 16px;
  }
  .warning-text {
    font-size: 15px; line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 28px;
  }
  .warning-text strong { color: var(--text); font-weight: 600; }
  .warning-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(232,54,74,0.1); border: 1px solid rgba(232,54,74,0.25);
    border-radius: 40px; padding: 8px 16px;
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    color: var(--red-text); text-transform: uppercase;
    margin-bottom: 28px;
  }

  /* ── REGISTRO ── */
  #screen-register {
    background: var(--bg);
    padding: 0;
  }
  .register-header {
    padding: 56px 28px 28px;
    background: linear-gradient(180deg, rgba(59,130,246,0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
  }
  .register-step-indicator {
    display: flex; gap: 6px; margin-bottom: 24px;
  }
  .step-dot {
    height: 3px; border-radius: 2px;
    background: var(--border); flex: 1;
    transition: background 0.3s;
  }
  .step-dot.active { background: var(--blue); }
  .register-title {
    font-family: var(--font-display);
    font-size: 36px; font-weight: 700; letter-spacing: 1px;
    margin-bottom: 6px;
  }
  .register-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
  .register-body { padding: 28px; flex: 1; }
  .privacy-note {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
    margin-bottom: 24px;
    display: flex; gap: 10px; align-items: flex-start;
  }
  .privacy-note svg { flex-shrink: 0; margin-top: 1px; }

  /* ── FORM ELEMENTS ── */
  .field-group { margin-bottom: 18px; }
  .field-label {
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 8px; display: block;
  }
  .field-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 16px; font-family: var(--font-body);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .field-input:focus {
    border-color: var(--blue);
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
  .field-input::placeholder { color: var(--text-dim); }
  .field-optional {
    font-size: 11px; color: var(--text-dim);
    margin-top: 5px;
  }
  .field-optional span { color: var(--amber); }

  /* ── OTP ── */
  .otp-wrap { display: flex; gap: 10px; }
  .otp-input {
    flex: 1; text-align: center;
    font-size: 24px; font-family: var(--font-display); font-weight: 700;
    padding: 14px 4px;
  }

  /* ── BUTTONS ── */
  .btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px;
    border: none; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
    text-transform: none;
  }
  .btn-primary {
    background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  }
  .btn-primary:active { transform: scale(0.98); opacity: 0.9; }
  .btn-danger {
    background: linear-gradient(135deg, var(--primary) 0%, var(--red-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  }
  .btn-danger:active { transform: scale(0.98); }
  .btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
  }
  .btn-ghost:active { opacity: 0.7; }
  .btn-sm { padding: 10px 14px; font-size: 14px; width: auto; }
  .btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-sm); flex-shrink: 0; }

  /* ── MAIN DASHBOARD ── */
  #screen-main {
    background: var(--bg);
  }
  .main-header {
    padding: 52px 24px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
  }
  .main-logo {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 900; letter-spacing: 4px;
    color: var(--text);
  }
  .main-logo span { color: var(--red); }
  .user-badge {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 40px; padding: 6px 14px 6px 6px;
    cursor: pointer;
  }
  .user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 14px; font-weight: 700;
    color: white;
  }
  .user-name { font-size: 13px; font-weight: 500; color: var(--text-muted); }

  /* PANIC BUTTON */
  .panic-section {
    padding: 20px 24px 16px;
    flex-shrink: 0;
  }
  .panic-btn {
    width: 100%;
    background: linear-gradient(135deg, #a51d32 0%, #bd243c 50%, #a51d32 100%);
    background-size: 200% 100%;
    border: none; border-radius: var(--radius);
    padding: 0;
    cursor: pointer;
    position: relative; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transition: all 0.2s;
  }
  .panic-btn:active { transform: scale(0.97); }
  .panic-inner {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px;
    position: relative; z-index: 1;
  }
  .panic-icon-wrap {
    width: 52px; height: 52px; flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
  }
  .panic-text-wrap { text-align: left; }
  .panic-label {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 900; letter-spacing: 2px;
    color: white; text-transform: uppercase;
    line-height: 1;
  }
  .panic-sublabel {
    font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 3px;
  }
  .panic-hold {
    margin-left: auto; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
  }
  .panic-hold-ring {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    position: relative;
  }
  .panic-hold-ring::after {
    content: '';
    position: absolute; inset: -3px;
    border-radius: 50%; border: 2px solid transparent;
    border-top-color: white;
    animation: spin-hold 2s linear infinite;
  }
  @keyframes spin-hold { to { transform: rotate(360deg); } }
  .panic-hold-text { font-size: 12px; color: rgba(255,255,255,0.85); letter-spacing: 0.5px; }

  /* CATEGORIES GRID */
  .categories-section {
    padding: 0 24px 12px;
    flex: 1; overflow-y: auto;
  }
  .section-label {
    font-family: var(--font-display);
    font-size: 13px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-dim);
    margin-bottom: 14px; margin-top: 16px;
  }
  .categories-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .cat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 12px;
    width: 100%; color: var(--text); text-align: left; font: inherit;
  }
  .cat-card:focus-visible { outline: 2px solid #4a9eff; outline-offset: 2px; }
  .cat-card::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--cat-color);
    opacity: 0;
    transition: opacity 0.2s;
  }
  .cat-card:active::before { opacity: 0.06; }
  .cat-card:active { transform: scale(0.97); border-color: var(--cat-border); }
  .cat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--cat-bg);
    border: 1px solid var(--cat-border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .cat-name {
    font-family: var(--font-display);
    font-size: 17px; font-weight: 700; letter-spacing: 0.3px;
    color: var(--text); line-height: 1.2;
  }
  .cat-count { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
  .cat-arrow {
    position: absolute; bottom: 14px; right: 14px;
    color: var(--text-dim); opacity: 0.5;
  }

  /* ── CATEGORY SCREEN ── */
  #screen-category {
    background: var(--bg);
  }
  .cat-header {
    padding: 52px 24px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .back-btn {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; color: var(--text-muted);
    font-family: var(--font-body); font-size: 14px; cursor: pointer;
    margin-bottom: 20px; padding: 0;
  }
  .cat-header-title {
    font-family: var(--font-display);
    font-size: 40px; font-weight: 800; letter-spacing: 1px;
  }
  .cat-header-desc { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

  /* SUB-CATEGORY SELECT */
  #screen-subcategories { background: var(--bg); overflow-y: auto; }
  .subcat-header { padding: calc(env(safe-area-inset-top, 0px) + 20px) 24px 12px; }
  .subcat-header h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 25px; color: var(--text); }
  .subcat-header p { margin: 0; color: var(--text-muted); font-size: 14px; }
  .subcat-list { padding: 20px 24px; }
  .subcat-list .subcat-option { width: 100%; color: var(--text); text-align: left; font: inherit; }
  .subcat-list .subcat-option:focus-visible { outline: 2px solid #4a9eff; outline-offset: 2px; }
  .subcat-option {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px; cursor: pointer; margin-bottom: 10px;
    transition: all 0.2s;
  }
  .subcat-option:active { transform: scale(0.98); border-color: var(--blue); }
  .subcat-option.selected {
    border-color: var(--blue);
    background: rgba(59,130,246,0.08);
  }
  .subcat-icon-small {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 18px;
  }
  .subcat-label { font-size: 15px; font-weight: 500; flex: 1; }
  .subcat-check { color: var(--blue); opacity: 0; transition: opacity 0.2s; }
  .subcat-option.selected .subcat-check { opacity: 1; }

  /* ── REPORT FORM ── */
  #screen-form {
    background: var(--bg);
  }
  .form-header {
    padding: 52px 24px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .form-progress {
    display: flex; gap: 4px; margin-bottom: 20px;
  }
  .progress-seg {
    height: 3px; border-radius: 2px; flex: 1;
    background: var(--border); transition: background 0.4s;
  }
  .progress-seg.done { background: var(--green); }
  .progress-seg.active { background: var(--blue); }
  .form-step-label {
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px;
  }
  .form-step-title {
    font-family: var(--font-display);
    font-size: 30px; font-weight: 700; letter-spacing: 0.5px;
  }
  .form-body { padding: 24px; flex: 1; overflow-y: auto; }

  /* GPS STATUS */
  .gps-status {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px;
  }
  .gps-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--green); flex-shrink: 0;
  }
  .gps-dot.searching { background: var(--amber); }
  .gps-info { flex: 1; }
  .gps-label { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; color: var(--text-muted); }
  .gps-coord { font-family: monospace; font-size: 13px; color: var(--green); margin-top: 2px; }

  /* SCALE SELECTOR */
  .scale-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
  .scale-opt {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px 10px;
    text-align: center; cursor: pointer; transition: all 0.2s;
  }
  .scale-opt.selected { border-color: var(--blue); background: rgba(59,130,246,0.08); }
  .scale-opt:active { transform: scale(0.96); }
  .scale-emoji { font-size: 24px; display: block; margin-bottom: 6px; }
  .scale-label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
  .scale-opt.selected .scale-label { color: var(--blue); }

  /* MEDIA UPLOAD */
  .media-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center; cursor: pointer;
    transition: all 0.2s; margin-bottom: 18px;
  }
  .media-upload:active { border-color: var(--blue); background: rgba(59,130,246,0.05); }
  .media-upload-icon { font-size: 32px; margin-bottom: 8px; }
  .media-upload-label { font-size: 14px; color: var(--text-muted); }
  .media-upload-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
  .media-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .media-thumb {
    width: 70px; height: 70px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
  }

  /* URGENCY SELECTOR */
  .urgency-selector { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 18px; }
  .urgency-opt {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px;
    cursor: pointer; transition: all 0.2s;
  }
  .urgency-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
  .urgency-opt.selected { border-color: currentColor; }
  .u-critical .urgency-dot { background: var(--red); }
  .u-critical.selected { border-color: var(--red); background: rgba(232,54,74,0.06); }
  .u-urgent .urgency-dot { background: var(--amber); }
  .u-urgent.selected { border-color: var(--amber); background: rgba(245,158,11,0.06); }
  .u-low .urgency-dot { background: var(--blue); }
  .u-low.selected { border-color: var(--blue); background: rgba(59,130,246,0.06); }
  .urgency-text .urgency-name { font-size: 15px; font-weight: 500; }
  .urgency-text .urgency-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

  /* FORM FOOTER */
  .form-footer {
    padding: 16px 24px 32px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    display: flex; gap: 12px;
  }

  /* ── PANIC SCREEN ── */
  #screen-panic {
    background: #000;
    align-items: center;
    justify-content: center;
  }
  .panic-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(232,54,74,0.2) 0%, rgba(0,0,0,0.95) 70%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 32px;
    text-align: center;
    z-index: 10;
  }
  .panic-recording-icon {
    width: 100px; height: 100px; border-radius: 50%;
    background: rgba(232,54,74,0.15);
    border: 2px solid var(--red);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    position: relative;
  }
  .panic-recording-icon::before {
    content: '';
    position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid rgba(232,54,74,0.3);
    animation: panic-ring 1.5s ease-out infinite;
  }
  .panic-recording-icon::after {
    content: '';
    position: absolute; inset: -16px; border-radius: 50%;
    border: 2px solid rgba(232,54,74,0.15);
    animation: panic-ring 1.5s ease-out infinite 0.3s;
  }
  @keyframes panic-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
  }
  .panic-rec-dot {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--red);
  }
  @keyframes rec-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
  .panic-countdown {
    font-family: var(--font-display);
    font-size: 80px; font-weight: 900;
    color: white; line-height: 1;
    margin-bottom: 8px;
  }
  .panic-countdown-label {
    font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,0.78); margin-bottom: 28px;
  }
  .panic-instruction {
    font-family: var(--font-display);
    font-size: 26px; font-weight: 700; letter-spacing: 1px;
    color: white; margin-bottom: 12px;
  }
  .panic-instruction-sub {
    font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6;
    max-width: 300px;
  }
  .panic-cameras {
    display: flex; gap: 16px; margin-top: 32px;
  }
  .panic-cam {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 10px;
    text-align: center;
  }
  .panic-cam-icon { font-size: 20px; margin-bottom: 4px; }
  .panic-cam-label { font-size: 12px; color: rgba(255,255,255,0.82); }
  .cam-active { border-color: var(--red); background: rgba(232,54,74,0.08); }
  .cam-dot {
    display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--red); margin-left: 6px;
  }

  /* ── CONFIRMATION ── */
  #screen-confirm {
    background: var(--bg);
    align-items: center; justify-content: center;
    padding: 32px 24px;
    z-index: 9999;
  }
  .confirm-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 36px 28px;
    max-width: 420px; width: 100%;
    text-align: center;
  }
  .confirm-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(16,185,129,0.12);
    border: 2px solid rgba(16,185,129,0.3);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    /* animation removed — was causing opacity:0 flash */
  }
  @keyframes confirm-pop {
    0% { transform: scale(0.8); }
    100% { transform: scale(1); }
  }
  .confirm-title {
    font-family: var(--font-display);
    font-size: 34px; font-weight: 800; margin-bottom: 8px;
    color: var(--green);
  }
  .confirm-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.5; }
  .radicado-box {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px 20px;
    margin-bottom: 12px;
  }
  .radicado-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
  .radicado-num {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700; letter-spacing: 3px; color: var(--text);
  }
  .confirm-meta { display: flex; gap: 10px; margin-bottom: 28px; }
  .confirm-meta-item {
    flex: 1; background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    text-align: center;
  }
  .confirm-meta-label { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
  .confirm-meta-val { font-size: 13px; font-weight: 600; color: var(--text-muted); }

  /* ── PANIC HOLD INDICATOR ── */
  .panic-hold-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.1s;
  }
  .panic-hold-overlay.active { opacity: 1; pointer-events: all; }
  .panic-hold-circle {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--bg2); border: 3px solid var(--red);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative;
  }
  .panic-hold-progress {
    position: absolute; inset: -3px; border-radius: 50%;
    background: conic-gradient(var(--red) 0deg, transparent 0deg);
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
    transition: background 0.05s;
  }
  .panic-hold-num {
    font-family: var(--font-display); font-size: 42px; font-weight: 900; color: var(--red); line-height: 1;
  }
  .panic-hold-lbl { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

  /* TOGGLE */
  .toggle-wrap {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
    cursor: pointer;
  }
  .toggle-label { font-size: 15px; font-weight: 500; }
  .toggle-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
  .toggle-switch {
    width: 44px; height: 24px; border-radius: 12px;
    background: var(--border); flex-shrink: 0;
    position: relative; transition: background 0.2s;
  }
  .toggle-switch.on { background: var(--blue); }
  .toggle-switch::after {
    content: ''; position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: white; transition: transform 0.2s;
  }
  .toggle-switch.on::after { transform: translateX(20px); }

  /* CHAR COUNTER */
  .char-counter { text-align: right; font-size: 12px; color: var(--text-dim); margin-top: 4px; }
  textarea.field-input { resize: none; min-height: 100px; }

  /* SCROLL */
  ::-webkit-scrollbar { width: 3px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

  /* CHIPS */
  .chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .chip {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 40px; padding: 7px 14px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; color: var(--text-muted);
  }
  .chip.selected { background: rgba(59,130,246,0.12); border-color: var(--blue); color: var(--blue); }
  .chip:active { transform: scale(0.95); }

  /* ANIMATED NUMBER */
  .anim-in { animation: anim-slide-in 0.3s ease forwards; }
  @keyframes anim-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* CRITICAL BANNER */
  .critical-banner {
    background: linear-gradient(135deg, rgba(232,54,74,0.15) 0%, rgba(232,54,74,0.05) 100%);
    border: 1px solid rgba(232,54,74,0.3);
    border-radius: var(--radius-sm); padding: 14px 16px;
    display: flex; gap: 12px; margin-bottom: 16px;
    align-items: flex-start;
  }
  .critical-banner-icon { font-size: 20px; flex-shrink: 0; }
  .critical-banner-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
  .critical-banner-text strong { color: var(--red-text); }

  .call-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--primary); color: white;
    border: none; border-radius: var(--radius-sm); padding: 16px;
    font-size: 18px; font-weight: 700; font-family: var(--font-display);
    letter-spacing: 1px; cursor: pointer; width: 100%; margin-bottom: 12px;
  }

  /* ANON SECTION */
  .anon-section {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px;
  }
  .anon-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; letter-spacing: 0.3px; }
  .anon-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .anon-opt {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    text-align: center; cursor: pointer; transition: all 0.2s;
    font-size: 13px; font-weight: 500; color: var(--text-muted);
  }
  .anon-opt:active, .anon-opt.selected { border-color: var(--blue); color: var(--blue); background: rgba(59,130,246,0.08); }
  .anon-opt-icon { font-size: 20px; margin-bottom: 5px; }

  /* STATUS BAR MOCK */
  .status-bar {
    height: 44px; background: var(--bg);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    flex-shrink: 0; position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  }

/* ── NGROK GATE SCREEN ──────────────────────────────────── */
#screen-ngrok {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
.ngrok-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
.ngrok-icon {
  width: 56px; height: 56px;
  background: rgba(245,158,11,.15);
  border: 1.5px solid rgba(245,158,11,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-size: 26px;
}
.ngrok-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  color: var(--text); margin-bottom: 6px;
}
.ngrok-sub {
  font-size: 13px; color: var(--amber);
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .3px; margin-bottom: 20px;
}
.ngrok-steps {
  text-align: left;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
}
.ngrok-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.ngrok-step:last-child { border-bottom: none; padding-bottom: 0; }
.ngrok-step-num {
  min-width: 22px; height: 22px;
  background: var(--primary);
  border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.ngrok-beta-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 20px; padding: 4px 12px;
  font-size: 11px; color: #a78bfa;
  font-family: var(--font-display); font-weight: 700;
  margin-bottom: 18px;
}

/* ── BETA BADGE en splash y main ───────────────────────── */
.beta-watermark {
  position: fixed; bottom: 14px; right: 14px;
  background: rgba(139,92,246,.18);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 20px; padding: 4px 10px;
  font-size: 12px; color: #c4b5fd;
  font-family: var(--font-display); font-weight: 700;
  pointer-events: none; z-index: 9999;
  letter-spacing: .3px;
}
/* ─────────────────────────────────────────────────────── */

  /* ── Mini-mapa de pin (paso ubicación) ─────────────── */
  #loc-pin-map-wrap {
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    background: var(--surface);
  }
  #loc-pin-map {
    height: 240px;
    width: 100%;
    border-radius: 14px;
  }
  .pin-map-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,16,30,.82);
    color: rgba(255,255,255,.75);
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 20px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.08);
  }
  .pin-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    font-size: 28px;
    z-index: 500;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
    transition: transform .15s;
  }
  #loc-pin-map-wrap.dragging .pin-center-icon {
    transform: translate(-50%, -110%) scale(1.15);
  }
  .pin-coords-bar {
    background: rgba(10,16,30,.9);
    padding: 7px 12px;
    font-size: 11px;
    color: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
  }
  /* ────────────────────────────────────────────────────── */

/* ══ SAFE-AREA · RESPONSIVE · ICONS  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body         { overscroll-behavior: contain; }
.screen      { scroll-padding-top: 80px; }
.subcat-option { min-height: 48px; }
/* sticky headers en Mis Reportes / Detalle — padding safe-area gestionado en HTML */

/* ── WCAG 2.5.5 touch targets ──────────────────────────────────────────── */
.btn, .btn-sm, .btn-icon { min-height: 44px; min-width: 44px; }

/* ── SSE chip (citizen) ─────────────────────────────────────────────────── */
.sse-chip {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
  transition: background .3s, color .3s;
}
.sse-chip.online  {
  background: rgba(61,214,140,.1); color: #3dd68c;
  border: 1px solid rgba(61,214,140,.3);
}
.sse-chip.offline {
  background: rgba(240,79,90,.1); color: #f87171;
  border: 1px solid rgba(240,79,90,.3);
  animation: sseBannerPulse 1.6s ease-in-out infinite;
}
@keyframes sseBannerPulse {
  0%,100% { opacity: 1; } 50% { opacity: .6; }
}
