@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0d1f3c;
  --blue: #1565c0;
  --blue-hover: #1976d2;
  --red: #c62828;
  --green: #1b7846;
  --light: #e8f0fe;
  --white: #ffffff;
  --gray: #8395a7;
  --gray-light: #e2e8f0;
  --surface: #F0F4FF;
  --text: #1a2340;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 100%);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  min-height: 68px;
  gap: 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 190px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1976d2, #c62828);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.5);
}

header h1 {
  color: white;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

header p {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  margin-top: 1px;
}

.header-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.55);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255,255,255,0.1);
}

.nav-btn.active {
  background: rgba(25, 118, 210, 0.25);
  color: white;
  border-color: rgba(25, 118, 210, 0.5);
  box-shadow: 0 0 0 1px rgba(25, 118, 210, 0.3) inset;
}

.user-profile-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px 12px 6px 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── MAIN APP CONTENT ───────────────────────────────────────────────────── */
.app-content {
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 28px;
  animation: fadeIn 0.3s ease;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.view-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

/* ─── DASHBOARD STAT CARDS ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 16px rgba(13, 31, 60, 0.06);
  border: 1px solid rgba(13, 31, 60, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #42a5f5);
  opacity: 0.6;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 31, 60, 0.1);
}

.stat-card label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray);
}

.stat-card .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.stat-card .subvalue {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}

.stat-card.accent-red::before { background: linear-gradient(90deg, var(--red), #ef5350); opacity: 0.7; }
.stat-card.accent-green::before { background: linear-gradient(90deg, var(--green), #4caf50); opacity: 0.7; }
.stat-card.accent-orange::before { background: linear-gradient(90deg, #e65100, #ff7043); opacity: 0.7; }

/* ─── CARD (generic content card) ────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(13, 31, 60, 0.06);
  border: 1px solid rgba(13, 31, 60, 0.06);
}

.card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.card .card-subtitle {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 16px;
}

/* Buttons */
.btn-primary {
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.2);
}

.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--gray-light);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: var(--light);
}

/* Search bar */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-bar input {
  flex: 1;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--blue);
}

/* Tables */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  padding: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid var(--gray-light);
}

.data-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-light);
  color: var(--text);
}

.data-table tbody tr:hover {
  background: #fcfcfd;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* ─── MODALS ─────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 31, 60, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.hidden {
  display: none !important;
}

.overlay.hidden {
  display: none !important;
}

.modal-panel {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  padding: 32px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

.btn-close {
  background: var(--surface);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-close:hover {
  background: #dce5f3;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.col-span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}


.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  list-style: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown li {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--surface);
  color: var(--text);
  transition: background 0.2s;
}

.autocomplete-dropdown li:hover {
  background: var(--light);
}

.autocomplete-dropdown li.active {
  background: #f0f4ff !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.relative {
  position: relative;
}

/* ─── UTILITY ─────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ────────────────────────────────────────────────────────────────────────
   SPECIFIC OVERLAYS
   ──────────────────────────────────────────────────────────────────────── */
#modal-localidad {
  z-index: 3000;
  /* Primary overlays are 2000. This nested modal must be higher. */
}

#modal-confirm {
  z-index: 3100;
  /* Confirmation modals should be on the very top. */
}

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--navy);
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  z-index: 999;
  animation: slideUpToast 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--red);
}

.toast.hidden {
  display: none;
}


/* ─── HISTORIAL ENVIOS ENHANCEMENTS ───────────────────────────────────────── */
.filter-card {
  padding: 20px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--gray-light);
}

.filter-grid {
  display: grid;
  grid-template-columns: 150px 150px 200px 1fr;
  gap: 16px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray);
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  padding: 10px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.premium-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.details-block {
  background: var(--surface);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(21, 101, 192, 0.1);
}

.details-block h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.details-row:last-child {
  border-bottom: none;
}

.details-label {
  color: var(--gray);
  font-weight: 500;
}

.details-value {
  font-weight: 600;
  color: var(--navy);
}

.type-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-view {
  color: var(--blue);
  background: rgba(21, 101, 192, 0.1);
}

.btn-view:hover {
  background: rgba(21, 101, 192, 0.2);
}

.btn-print {
  color: var(--navy);
  background: rgba(13, 31, 60, 0.1);
}

.btn-print:hover {
  background: rgba(13, 31, 60, 0.2);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(21, 101, 192, 0.1);
  border-top: 3px solid var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpToast {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─── CAJA STATS ────────────────────────────────────────────────────────── */
.caja-stats {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.caja-stat-card {
  background: white;
  padding: 16px 12px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--gray-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  word-break: break-word;
  text-align: center;
  width: 100%;
}

/* Accordion Styles */
.config-accordion {
  list-style: none;
}
.config-accordion::-webkit-details-marker {
  display: none;
}
.config-accordion {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  outline: none;
  padding: 4px;
}
.config-accordion .chevron {
  transition: transform 0.2s ease;
  color: var(--gray);
  font-size: 14px;
}
details[open] .config-accordion .chevron {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN ANIMATED SCENE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── BACKGROUND SCENE ─── */
.login-scene {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #c8daf5 0%,
    #ddeeff 40%,
    #e8f3ff 55%,
    #c9d9b0 55.1%,
    #b5cb94 62%,
    #8faa68 62.1%,
    #7a9558 100%
  );
  overflow: hidden;
}

/* Sky clouds */
.login-clouds { position: absolute; top: 0; left: 0; width: 100%; height: 50%; }
.login-cloud {
  position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 50px;
  filter: blur(2px);
  animation: loginDrift linear infinite;
}
.login-cloud::before, .login-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.login-cloud-1 { width: 160px; height: 40px; top: 8%; animation-duration: 38s; animation-delay: 0s; }
.login-cloud-1::before { width: 80px; height: 60px; top: -30px; left: 20px; }
.login-cloud-1::after  { width: 60px; height: 50px; top: -20px; left: 70px; }

.login-cloud-2 { width: 110px; height: 30px; top: 18%; animation-duration: 52s; animation-delay: -18s; opacity: 0.7; }
.login-cloud-2::before { width: 55px; height: 45px; top: -22px; left: 15px; }
.login-cloud-2::after  { width: 45px; height: 38px; top: -15px; left: 50px; }

.login-cloud-3 { width: 200px; height: 45px; top: 5%; animation-duration: 60s; animation-delay: -30s; opacity: 0.6; }
.login-cloud-3::before { width: 90px; height: 70px; top: -35px; left: 30px; }
.login-cloud-3::after  { width: 70px; height: 55px; top: -25px; left: 100px; }

.login-cloud-4 { width: 90px; height: 25px; top: 28%; animation-duration: 44s; animation-delay: -8s; opacity: 0.5; }
.login-cloud-4::before { width: 45px; height: 38px; top: -18px; left: 10px; }
.login-cloud-4::after  { width: 38px; height: 32px; top: -12px; left: 40px; }

@keyframes loginDrift {
  from { transform: translateX(-300px); }
  to   { transform: translateX(110vw); }
}

/* Road */
.login-road {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: #3a3a3a;
  overflow: hidden;
}
.login-road-line {
  position: absolute;
  top: 50%;
  width: 120px;
  height: 8px;
  background: #f5d84a;
  border-radius: 4px;
  animation: loginRoadlines 1.2s linear infinite;
}
.login-road-line:nth-child(1) { left: 5%;   animation-delay: 0s; }
.login-road-line:nth-child(2) { left: 20%;  animation-delay: -0.24s; }
.login-road-line:nth-child(3) { left: 35%;  animation-delay: -0.48s; }
.login-road-line:nth-child(4) { left: 50%;  animation-delay: -0.72s; }
.login-road-line:nth-child(5) { left: 65%;  animation-delay: -0.96s; }
.login-road-line:nth-child(6) { left: 80%;  animation-delay: -1.08s; }
.login-road-line:nth-child(7) { left: 95%;  animation-delay: -1.18s; }

@keyframes loginRoadlines {
  from { transform: translateX(0); }
  to   { transform: translateX(-160px); }
}

/* Sidewalk */
.login-sidewalk {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(180deg, #aab8a0 0%, #8fa07a 100%);
  border-top: 3px solid #6e8255;
}

/* Horizon hills */
.login-hills {
  position: absolute;
  bottom: 29%;
  left: 0;
  width: 200%;
  animation: loginScrollHills 20s linear infinite;
}
.login-hills svg { width: 100%; }

@keyframes loginScrollHills {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Trees */
.login-trees {
  position: absolute;
  bottom: calc(30% + 22px);
  left: 0;
  width: 400%;
  display: flex;
  align-items: flex-end;
  gap: 0;
  animation: loginScrollTrees 8s linear infinite;
}
@keyframes loginScrollTrees {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}
.login-tree {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.login-tree-top {
  width: 0; height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 50px solid #4a7a30;
}
.login-tree-top-2 {
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 38px solid #5a8f38;
  margin-top: -28px;
}
.login-tree-trunk {
  width: 8px; height: 18px;
  background: #6b4a2a;
}

/* Van / Truck animation */
.login-van-wrapper {
  position: absolute;
  bottom: calc(30% - 220px);
  animation: loginVanDrive 14s linear infinite;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  z-index: 10;
}
@keyframes loginVanDrive {
  0%   { transform: translateX(-320px); }
  100% { transform: translateX(110vw); }
}

/* Speed lines behind truck */
.login-speed-lines {
  position: absolute;
  right: calc(100% - 10px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  animation: loginShowLines 14s linear infinite;
}
@keyframes loginShowLines {
  0%,5%   { opacity: 0; }
  10%,90% { opacity: 1; }
  95%,100%{ opacity: 0; }
}
.login-speed-line {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to left, rgba(209,43,43,0.8), transparent);
  animation: loginSpeedPulse 0.3s ease-in-out infinite alternate;
}
.login-speed-line:nth-child(1) { width: 80px;  animation-delay: 0s; }
.login-speed-line:nth-child(2) { width: 120px; animation-delay: 0.05s; }
.login-speed-line:nth-child(3) { width: 60px;  animation-delay: 0.1s; }
.login-speed-line:nth-child(4) { width: 100px; animation-delay: 0.07s; }
.login-speed-line:nth-child(5) { width: 70px;  animation-delay: 0.12s; }
@keyframes loginSpeedPulse {
  from { opacity: 0.5; transform: scaleX(0.85); }
  to   { opacity: 1;   transform: scaleX(1); }
}

/* ─── LOGIN CARD OVERLAY ─── */
.login-card-overlay {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 44px 48px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.05),
    0 20px 60px rgba(15,47,106,0.18),
    0 0 0 1px rgba(255,255,255,0.6) inset;
  animation: loginCardIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo area */
.login-logo-area {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-transporte {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #0d1b2e;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}
.login-logo-transporte::before,
.login-logo-transporte::after {
  content: '';
  height: 1px;
  width: 30px;
  background: #d12b2b;
}
.login-logo-niclis {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: -1px;
  line-height: 1;
  background: linear-gradient(135deg, #0f2f6a 0%, #2563c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}
.login-logo-niclis::after {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(to right, #d12b2b, #e84040, transparent);
  border-radius: 2px;
  margin-top: 2px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.login-logo-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: #9aacbe;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.login-divider span { flex: 1; height: 1px; background: #dde4ec; }
.login-divider p {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #9aacbe;
  text-transform: uppercase;
  margin: 0;
}

/* Inputs */
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0f2f6a;
  margin-bottom: 7px;
}
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-icon {
  position: absolute;
  left: 14px;
  color: #9aacbe;
  display: flex;
  align-items: center;
}
.login-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid #dde4ec;
  border-radius: 10px;
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  color: #0d1b2e;
  background: #f7faff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-input-wrap input:focus {
  border-color: #2563c7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,199,0.12);
}
.login-input-wrap input::placeholder { color: #b0bec5; }

/* Login button */
.login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: linear-gradient(135deg, #0f2f6a 0%, #2563c7 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(15,47,106,0.3);
}
.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #d12b2b 0%, #e84040 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,47,106,0.35); }
.login-btn:hover::before { opacity: 1; }
.login-btn:active { transform: translateY(0); }
.login-btn span { position: relative; z-index: 1; }

/* Card footer */
.login-card-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: #9aacbe;
  letter-spacing: 0.5px;
}
.login-card-footer strong { color: #0f2f6a; }

/* Route badge */
.login-route-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.login-route-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #d12b2b;
}
.login-route-badge span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0f2f6a;
  text-transform: uppercase;
}
