    :root {
      --bg: #eef4ff;
      --bg-2: #f8fbff;
      --card: rgba(255,255,255,.92);
      --text: #0f172a;
      --muted: #5b6b85;
      --primary: #175cd3;
      --primary-2: #0f4fc2;
      --primary-soft: rgba(23,92,211,.10);
      --border: rgba(15,23,42,.08);
      --success: #15803d;
      --danger: #b42318;
      --warning: #b54708;
      --shadow: 0 18px 50px rgba(16,24,40,.12);
      --radius-xl: 24px;
      --radius-lg: 18px;
      --radius-md: 14px;
      --input-h: 56px;
    }

    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; }
    body {
      font-family: Inter, system-ui, sans-serif;
      color: var(--text);
      background:
              radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 28%),
              radial-gradient(circle at bottom right, rgba(37,99,235,.15), transparent 22%),
              linear-gradient(180deg, var(--bg), var(--bg-2));
    }

    .shell {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 28px;
      border-bottom: 1px solid rgba(255,255,255,.45);
      backdrop-filter: blur(10px);
      position: sticky;
      top: 0;
      z-index: 10;
      background: rgba(238,244,255,.72);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      font-weight: 800;
      letter-spacing: -.02em;
    }

    .brand-badge {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 14px;
      color: white;
      background: linear-gradient(135deg, var(--primary), #3b82f6);
      box-shadow: 0 12px 30px rgba(23,92,211,.35);
      font-size: 18px;
    }

    .brand-badge img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-caption {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .pill {
      padding: 10px 14px;
      border-radius: 999px;
      background: rgba(255,255,255,.72);
      color: var(--muted);
      font-size: 13px;
      border: 1px solid var(--border);
    }

    .layout {
      width: min(1180px, calc(100% - 32px));
      margin: 28px auto 40px;
      display: grid;
      gap: 24px;
    }

    .auth-wrap {
      display: grid;
      grid-template-columns: minmax(0, 760px);
      justify-content: center;
      gap: 24px;
      align-items: stretch;
    }

    .hero, .card {
      background: var(--card);
      border: 1px solid rgba(255,255,255,.85);
      box-shadow: var(--shadow);
      border-radius: var(--radius-xl);
      backdrop-filter: blur(12px);
    }

    .hero {
      padding: 34px;
      position: relative;
      overflow: hidden;
    }

    .hero::after {
      content: "";
      position: absolute;
      inset: auto -80px -80px auto;
      width: 220px;
      height: 220px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(59,130,246,.16), transparent 68%);
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: var(--primary-soft);
      color: var(--primary);
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 16px;
    }

    .hero h1 {
      margin: 0 0 12px;
      font-size: clamp(32px, 5vw, 48px);
      line-height: 1.02;
      letter-spacing: -.04em;
    }

    .hero p {
      margin: 0;
      color: var(--muted);
      font-size: 16px;
      max-width: 650px;
      line-height: 1.65;
    }

    .security-list {
      margin-top: 28px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .security-item {
      padding: 16px;
      border-radius: var(--radius-lg);
      background: rgba(255,255,255,.68);
      border: 1px solid var(--border);
    }

    .security-item strong {
      display: block;
      margin-bottom: 6px;
      font-size: 14px;
    }

    .security-item span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .card {
      padding: 28px;
    }

    .card h1,
    .card h2 {
      margin: 0 0 8px;
      font-size: 28px;
      letter-spacing: -.03em;
    }

    .card-subtitle {
      margin: 0 0 24px;
      color: var(--muted);
      line-height: 1.6;
    }

    .form-grid {
      display: grid;
      gap: 16px;
    }

    .field {
      display: grid;
      gap: 8px;
    }

    .field label {
      font-size: 14px;
      font-weight: 700;
    }

    .input-wrap {
      position: relative;
    }

    input {
      width: 100%;
      height: var(--input-h);
      border-radius: 16px;
      border: 1px solid rgba(15,23,42,.12);
      background: rgba(255,255,255,.92);
      padding: 0 18px;
      outline: none;
      font-size: 16px;
      color: var(--text);
      transition: .18s ease;
    }

    input:focus {
      border-color: rgba(23,92,211,.45);
      box-shadow: 0 0 0 4px rgba(23,92,211,.12);
    }

    input[type="password"] {
      padding-right: 54px;
    }

    .password-toggle {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-weight: 700;
      padding: 8px 10px;
      border-radius: 10px;
    }

    .password-toggle:hover { background: rgba(15,23,42,.05); }

    .actions-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .checkbox {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 14px;
    }

    .checkbox input {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: var(--primary);
    }

    .btn {
      height: 52px;
      padding: 0 18px;
      border: none;
      border-radius: 16px;
      cursor: pointer;
      font-weight: 800;
      font-size: 15px;
      letter-spacing: .01em;
      transition: .18s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .btn:disabled {
      opacity: .6;
      cursor: not-allowed;
    }

    .btn-primary {
      color: #fff;
      background: linear-gradient(135deg, var(--primary), #3b82f6);
      box-shadow: 0 16px 26px rgba(23,92,211,.24);
    }

    .btn-primary:hover:not(:disabled) {
      transform: translateY(-1px);
      background: linear-gradient(135deg, var(--primary-2), #2563eb);
    }

    .btn-secondary {
      color: var(--text);
      background: rgba(255,255,255,.75);
      border: 1px solid var(--border);
    }

    .btn-danger {
      color: #fff;
      background: linear-gradient(135deg, #b42318, #d92d20);
    }

    .full { width: 100%; }

    .message {
      display: none;
      padding: 14px 16px;
      border-radius: 16px;
      font-size: 14px;
      line-height: 1.5;
      border: 1px solid transparent;
    }

    .message.show { display: block; }
    .message.info { background: rgba(23,92,211,.08); color: var(--primary); border-color: rgba(23,92,211,.12); }
    .message.error { background: rgba(180,35,24,.08); color: var(--danger); border-color: rgba(180,35,24,.12); }
    .message.success { background: rgba(21,128,61,.08); color: var(--success); border-color: rgba(21,128,61,.12); }

    .toast-container {
      position: fixed;
      right: 20px;
      bottom: 20px;
      z-index: 2000;
      display: flex;
      flex-direction: column-reverse;
      gap: 10px;
      width: min(420px, calc(100vw - 32px));
      pointer-events: none;
    }

    .toast-message {
      padding: 14px 16px;
      border: 1px solid transparent;
      border-radius: 16px;
      box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
      font-size: 14px;
      line-height: 1.5;
      opacity: 0;
      transform: translateX(110%);
      transition: opacity .25s ease, transform .25s ease;
    }

    .toast-message.show { opacity: 1; transform: translateX(0); }
    .toast-message-exit { opacity: 0; transform: translateX(110%); }
    .toast-message.info { background: #eff6ff; color: var(--primary); border-color: rgba(23,92,211,.2); }
    .toast-message.error { background: #fef3f2; color: var(--danger); border-color: rgba(180,35,24,.2); }
    .toast-message.warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }
    .toast-message.success { background: #f0fdf4; color: var(--success); border-color: rgba(21,128,61,.2); }

    .hidden { display: none !important; }

    .protected-shell {
      display: grid;
      gap: 24px;
    }

    .protected-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap;
      padding: 28px;
    }

    .protected-title h2 {
      margin: 0 0 8px;
      font-size: clamp(28px, 4vw, 40px);
      letter-spacing: -.04em;
    }

    .protected-title p {
      margin: 0;
      color: var(--muted);
      line-height: 1.65;
      max-width: 760px;
    }

    .session-badges {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .search-card {
      padding: 24px;
    }

    .search-panel-back {
      justify-self: start;
    }

    .password-change-card {
      width: min(100%, 720px);
      margin: 40px auto;
    }

    .password-change-card h1 {
      margin: 0 0 8px;
      font-size: clamp(26px, 4vw, 36px);
      letter-spacing: -.03em;
    }

    .credit-pill {
      color: #14532d;
      background: rgba(34,197,94,.12);
      border-color: rgba(34,197,94,.24);
      font-weight: 800;
    }

    .admin-panel {
      display: grid;
      gap: 24px;
    }

    .admin-panel-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .admin-panel-heading .section-title {
      margin-bottom: 0;
    }

    .admin-history-actions,
    .history-pagination-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .history-controls {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
      max-width: 640px;
    }

    .top-user-chart {
      display: grid;
      gap: 12px;
    }

    .top-user-row {
      display: grid;
      gap: 7px;
      padding: 12px 14px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(248,250,252,.6);
    }

    .top-user-heading,
    .top-user-breakdown {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .top-user-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
    }

    .top-user-total {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .top-user-track {
      display: flex;
      width: 100%;
      height: 18px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(100,116,139,.12);
    }

    .top-user-segment {
      display: block;
      height: 100%;
      transition: width .2s ease;
    }

    .top-user-segment.person,
    .top-user-legend.person { background: #175cd3; }

    .top-user-segment.plate,
    .top-user-legend.plate { background: #16a36a; }

    .top-user-breakdown {
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 16px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .top-user-breakdown > span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .top-user-legend {
      display: inline-block;
      width: 9px;
      height: 9px;
      border-radius: 50%;
    }

    .history-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 16px;
      color: var(--muted);
      font-size: 13px;
    }

    .admin-forms {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 16px;
      align-items: start;
    }

    .admin-form {
      display: grid;
      gap: 14px;
      padding: 20px;
      background: rgba(248,250,252,.85);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
    }

    .admin-form h3,
    .admin-table-section h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 800;
    }

    .admin-number-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .admin-permissions {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 14px;
    }

    .admin-permissions label {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .admin-table-section {
      display: grid;
      gap: 12px;
    }

    .admin-user-role {
      min-width: 180px;
    }

    .admin-user-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .admin-user-filter {
      width: min(100%, 420px);
    }

    .search-modes {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px;
    }

    .search-modes .btn {
      min-height: 44px;
    }

    .search-box {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
    }

    .plate-input {
      height: 70px;
      text-align: center;
      font-size: clamp(24px, 5vw, 32px);
      letter-spacing: 8px;
      text-transform: uppercase;
      font-weight: 800;
    }

    .helper-row {
      margin-top: 12px;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 13px;
    }

    .loader {
      display: none;
      padding: 22px;
      text-align: center;
      color: var(--muted);
    }

    .loader.show { display: block; }

    .spinner {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      margin: 0 auto 10px;
      border: 4px solid rgba(15,23,42,.08);
      border-top-color: var(--primary);
      animation: spin 1s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .data-card {
      padding: 24px;
    }

    .section-title {
      margin: 0 0 18px;
      font-size: 22px;
      letter-spacing: -.03em;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
    }

    .item {
      background: rgba(248,250,252,.85);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
      min-height: 0;
    }

    .label {
      color: var(--muted);
      font-size: 11px;
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: .04em;
      font-weight: 600;
    }

    .value {
      font-size: 13px;
      font-weight: 700;
      word-break: break-word;
      line-height: 1.4;
    }

    /* Subsección dentro de la tarjeta de propietario (RTM, SOAT, Comparendos) */
    .subsection-title {
      margin: 22px 0 10px;
      font-size: 14px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    .pill-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 6px;
    }

    .lic-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid transparent;
    }

    .lic-pill .lic-cat {
      background: rgba(255,255,255,.6);
      padding: 1px 7px;
      border-radius: 999px;
      font-size: 11px;
    }

    .lic-pill.ok   { background: rgba(34,197,94,.12);  color: #166534; border-color: rgba(34,197,94,.25); }
    .lic-pill.bad  { background: rgba(239,68,68,.10);  color: #991b1b; border-color: rgba(239,68,68,.22); }
    .lic-pill.warn { background: rgba(245,158,11,.12); color: #92400e; border-color: rgba(245,158,11,.22); }

    .license-history {
      margin-top: 14px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(248,250,252,.6);
    }
    .license-history > summary {
      list-style: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      font-size: 14px;
      font-weight: 700;
    }
    .license-history > summary::-webkit-details-marker { display: none; }
    .license-history > summary::after {
      content: "▾";
      color: var(--muted);
      transition: transform .18s ease;
    }
    .license-history[open] > summary::after { transform: rotate(180deg); }
    .license-history > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
    .license-history-list {
      display: grid;
      gap: 10px;
      padding: 0 12px 12px;
    }
    .license-category-list {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }
    .license-category-card {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(248,250,252,.6);
    }
    .license-category-card .grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .license-history-controls {
      display: grid;
      gap: 6px;
      padding: 0 12px 12px;
    }
    .license-history-filter { max-width: 320px; }
    .license-history-item {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
    }
    .license-history-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
      font-size: 13px;
    }
    .license-history-item .grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .empty-note {
      color: var(--muted);
      font-size: 13px;
      font-style: italic;
      padding: 10px 12px;
      background: rgba(248,250,252,.6);
      border: 1px dashed var(--border);
      border-radius: 12px;
    }

    /* ================================================================
       TRIAGE: tarjeta de alertas. Es lo primero que ve el agente de
       transito, antes de cualquier dato de detalle.
       ================================================================ */
    .alert-card {
      padding: 20px 24px 24px;
      border-top: 6px solid var(--border);
    }
    .alert-card.is-bad  { border-top-color: #dc2626; }
    .alert-card.is-warn { border-top-color: #f59e0b; }
    .alert-card.is-ok   { border-top-color: #16a34a; }

    /* Veredicto: lectura de un golpe, sin leer los tiles uno por uno. */
    .verdict {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 16px 18px;
      border-radius: var(--radius-md);
      border: 1px solid transparent;
      margin-bottom: 16px;
    }
    .verdict-icon {
      flex: 0 0 auto;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 24px;
      font-weight: 900;
      background: rgba(255,255,255,.65);
    }
    .verdict-text { min-width: 0; }
    .verdict-title {
      font-size: 19px;
      font-weight: 900;
      letter-spacing: -.02em;
      line-height: 1.2;
    }
    .verdict-sub {
      font-size: 13px;
      font-weight: 600;
      opacity: .85;
      margin-top: 2px;
    }
    .verdict.ok   { color: #14532d; background: rgba(34,197,94,.13);  border-color: rgba(34,197,94,.30); }
    .verdict.warn { color: #7c2d12; background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.30); }
    .verdict.bad  { color: #7f1d1d; background: rgba(239,68,68,.13);  border-color: rgba(239,68,68,.30); }

    /* Identificacion minima para confirmar que la placa es la correcta. */
    .ident-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 14px;
      padding: 12px 14px;
      margin-bottom: 16px;
      background: rgba(248,250,252,.9);
      border: 1px solid var(--border);
      border-radius: 12px;
    }
    .ident-plate {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: 3px;
      padding: 4px 12px;
      border-radius: 8px;
      background: var(--primary-soft);
      color: var(--primary);
    }
    .ident-desc {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }
    .ident-desc .sep { color: var(--muted); font-weight: 400; margin: 0 4px; }

    /* Tiles de alerta: la unidad visual del triage. */
    .alert-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 10px;
    }
    .alert-tile {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--radius-md);
      border: 1px solid transparent;
      min-height: 64px;
    }
    .alert-tile .mark {
      flex: 0 0 auto;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 16px;
      font-weight: 900;
      background: rgba(255,255,255,.7);
    }
    .alert-tile .body { min-width: 0; }
    .alert-tile .k {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .05em;
      font-weight: 700;
      opacity: .75;
    }
    .alert-tile .v {
      font-size: 15px;
      font-weight: 800;
      line-height: 1.25;
      word-break: break-word;
    }
    .alert-tile.ok   { color: #166534; background: rgba(34,197,94,.10);  border-color: rgba(34,197,94,.20); }
    .alert-tile.warn { color: #92400e; background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.22); }
    .alert-tile.bad  { color: #991b1b; background: rgba(239,68,68,.11);  border-color: rgba(239,68,68,.22); }

    /* Detalle plegable: el agente lo abre solo si lo necesita. */
    details.fold > summary {
      list-style: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      margin: -24px -24px 0;
      border-radius: var(--radius-xl);
      font-size: 17px;
      font-weight: 800;
      letter-spacing: -.02em;
      min-height: 56px;
    }
    details.fold > summary::-webkit-details-marker { display: none; }
    details.fold > summary::after {
      content: "▾";
      font-size: 15px;
      color: var(--muted);
      transition: transform .18s ease;
      flex: 0 0 auto;
    }
    details.fold[open] > summary::after { transform: rotate(180deg); }
    details.fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
    details.fold > .fold-body { padding-top: 18px; }
    .fold-hint {
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
      text-transform: none;
      letter-spacing: 0;
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(15,23,42,.48);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      z-index: 40;
    }

    .modal.active { display: flex; }

    .modal-box {
      width: min(420px, 100%);
      padding: 28px;
      border-radius: 24px;
      background: #fff;
      box-shadow: 0 30px 80px rgba(15,23,42,.35);
    }

    .credit-modal-form {
      display: grid;
      gap: 14px;
    }

    #creditModalMessage:empty {
      display: none;
    }

    .modal-box h3 {
      margin: 0 0 8px;
      font-size: 24px;
      letter-spacing: -.03em;
    }

    .modal-box p {
      color: var(--muted);
      line-height: 1.6;
    }

    .modal-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .tiny {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.55;
    }

    @media (max-width: 980px) {
      .security-list { grid-template-columns: 1fr; }
    }

    .massive-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .table-container {
      overflow-x: auto;
    }

    .massive-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }

    .massive-table th {
      text-align: left;
      padding: 12px;
      background: rgba(23,92,211,.08);
    }

    .massive-table td {
      padding: 12px;
      border-bottom: 1px solid var(--border);
    }

    .massive-table tr:hover {
      background: rgba(15,23,42,.03);
    }

    .protected-header-inline {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      width: 100%;
    }

    .protected-heading {
      margin: 0 0 8px;
      color: var(--text);
      font-size: clamp(26px, 4vw, 38px);
      font-weight: 800;
      letter-spacing: -.04em;
    }

    .protected-description {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
    }

    .protected-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
    }

    .protected-actions .btn {
      height: 40px;
      padding: 0 14px;
      font-size: 13px;
    }

    .modal.hidden {
      display: none;
    }

    @media (max-width: 760px) {
      .layout { width: min(100% - 20px, 1180px); }
      .topbar { padding: 16px 14px; }
      .card, .hero, .protected-header, .search-card, .data-card { padding: 20px; }
      .search-box, .modal-actions { grid-template-columns: 1fr; }
      .toast-container { right: 20px; bottom: 20px; width: calc(100vw - 40px); }
      .brand { gap: 10px; }
      .brand-badge { width: 40px; height: 40px; }
      .brand-caption { max-width: 190px; }
      .protected-actions { width: 100%; }
      .protected-actions .btn { flex: 1 1 auto; }
      .search-modes .btn { flex: 1 1 150px; }
      .admin-number-fields { grid-template-columns: 1fr; }
      .history-controls { grid-template-columns: minmax(0, 1fr); width: 100%; }
      .history-pagination { align-items: flex-start; flex-direction: column; }
      .history-pagination-actions { width: 100%; }
      .history-pagination-actions .btn { flex: 1; }
      .plate-input { letter-spacing: 5px; }

      /* Triage en movil: una alerta por fila, a ancho completo. */
      .alert-card { padding: 16px 20px 20px; }
      .alert-grid { grid-template-columns: 1fr; }
      .alert-tile { min-height: 60px; }
      .verdict { padding: 14px; gap: 12px; }
      .verdict-icon { width: 38px; height: 38px; font-size: 21px; }
      .verdict-title { font-size: 17px; }
      .ident-strip { gap: 8px 10px; }
      .ident-plate { font-size: 20px; }

      /* El summary se alinea con el padding reducido de la tarjeta. */
      details.fold > summary { margin: -20px -20px 0; padding: 14px 16px; font-size: 16px; }
      details.fold > .fold-body { padding-top: 14px; }
    }
  