/* ===========================================================
   ESP ERP — Tema futurista glassmorphism (Express San Pedro)
   Paleta: azul electrico + rojo Paraguay + fondo oscuro
   =========================================================== */

:root {
  --bg-deep: #050914;
  --bg-deep-2: #0a1128;
  --blue-1: #1e6fff;
  --blue-2: #38bdf8;
  --red-1: #e21c34;
  --red-2: #ff4d5e;
  --white-soft: #eef4ff;
  --glass-bg: rgba(18, 28, 56, 0.45);
  --glass-bg-strong: rgba(14, 22, 46, 0.72);
  --glass-border: rgba(120, 170, 255, 0.28);
  --glass-border-strong: rgba(140, 190, 255, 0.45);
  --text-main: #eaf1ff;
  --text-dim: #93a3c9;
  --success: #22d3a5;
  --warning: #ffb020;
  --danger: #ff4d5e;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-glow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.02) inset;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text-main);
  background: var(--bg-deep);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Orbitron', 'Inter', sans-serif; margin: 0; letter-spacing: 0.02em; }

/* ---------- Fondo ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(circle at 15% 10%, rgba(30,111,255,0.25), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(226,28,52,0.18), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(56,189,248,0.15), transparent 55%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-deep-2) 55%, #030509 100%),
    url('/static/img/fondo.jpeg');
  background-size: cover, cover, cover, cover, cover;
  background-position: center, center, center, center, center 20%;
  background-blend-mode: normal, normal, normal, normal, luminosity;
}
.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,9,20,0.88) 0%, rgba(5,9,20,0.94) 55%, rgba(5,9,20,0.98) 100%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(56,189,248,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

/* ---------- Glassmorphism base ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
}

.btn-glass {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  background: linear-gradient(145deg, rgba(30,111,255,0.18), rgba(56,189,248,0.08));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,111,255,0.28), 0 0 0 1px var(--glass-border-strong) inset;
  border-color: var(--blue-2);
}
.btn-glass:active { transform: translateY(0px) scale(0.98); }
.btn-glass:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, rgba(30,111,255,0.55), rgba(56,189,248,0.35));
  border-color: rgba(96,165,250,0.6);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(30,111,255,0.45); }

.btn-danger {
  background: linear-gradient(135deg, rgba(226,28,52,0.4), rgba(255,77,94,0.2));
  border-color: rgba(255,120,130,0.5);
}
.btn-ghost { background: rgba(255,255,255,0.04); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; border-radius: var(--radius-sm); }

.icon-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 10px;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--blue-2); background: rgba(56,189,248,0.12); }

.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px;
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  text-align: center;
}
.login-logo {
  width: 88px; height: 88px; object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--glass-border-strong);
  box-shadow: 0 0 24px rgba(56,189,248,0.35);
  margin-bottom: 16px;
}
.brand-title {
  font-size: 1.9rem; font-weight: 900;
  background: linear-gradient(90deg, var(--white-soft), var(--blue-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-title span { color: var(--red-2); -webkit-text-fill-color: var(--red-2); }
.brand-sub { color: var(--text-dim); font-size: 0.85rem; margin: 6px 0 26px; }

.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
}
.field textarea { resize: vertical; min-height: 70px; }

.login-error { color: var(--red-2); font-size: 0.82rem; min-height: 18px; margin: 12px 0 0; }
.login-hint { color: var(--text-dim); font-size: 0.75rem; margin-top: 18px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px; flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 20px 16px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  position: sticky; top: 0; height: 100vh;
  z-index: 20;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; border-bottom: 1px solid var(--glass-border); margin-bottom: 14px; }
.sidebar-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--glass-border-strong); }
.sidebar-title { font-size: 1.05rem; font-weight: 800; }
.sidebar-title span { color: var(--red-2); }
.sidebar-sub { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.03em; }

.nav-menu { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
.nav-group-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.87rem; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
}
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(30,111,255,0.28), rgba(56,189,248,0.1));
  border-color: var(--glass-border-strong);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,111,255,0.25);
}

.sidebar-footer { border-top: 1px solid var(--glass-border); padding-top: 14px; margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-1), var(--red-1));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 0.82rem; font-weight: 600; }
.user-role { font-size: 0.68rem; color: var(--text-dim); text-transform: capitalize; }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 26px;
  margin: 16px 20px 0;
  border-radius: var(--radius-md);
  position: sticky; top: 16px; z-index: 15;
}
.topbar h2 { flex: 1; font-size: 1.1rem; font-weight: 700; }
.topbar-clock { font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
#mobile-nav-toggle { display: none; }

.view-root { padding: 22px 20px 60px; flex: 1; }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi-card {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: ""; position: absolute; top: -30%; right: -20%; width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(56,189,248,0.25), transparent 70%);
  border-radius: 50%;
}
.kpi-label { font-size: 0.74rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 2rem; font-weight: 800; margin-top: 6px; font-family: 'Orbitron', sans-serif; color: var(--white-soft); }
.kpi-icon { position: absolute; top: 16px; right: 18px; font-size: 1.4rem; opacity: 0.75; }

/* ---------- Modulos grid (home) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.module-card {
  border-radius: var(--radius-md);
  padding: 22px 18px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.module-card:hover { transform: translateY(-4px); border-color: var(--blue-2); box-shadow: 0 14px 30px rgba(30,111,255,0.22); }
.module-card .m-icon { font-size: 1.7rem; margin-bottom: 10px; display: inline-block; }
.module-card h4 { font-size: 0.98rem; margin-bottom: 6px; }
.module-card p { font-size: 0.78rem; color: var(--text-dim); margin: 0; line-height: 1.4; }

/* ---------- Panel / tabla ---------- */
.panel { border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h3 { font-size: 1rem; }
.panel-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-input {
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  color: var(--text-main); padding: 9px 13px; font-size: 0.85rem; min-width: 200px; outline: none;
}
.search-input:focus { border-color: var(--blue-2); }

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 640px; }
table.data-table thead th {
  text-align: left; padding: 12px 14px; background: rgba(255,255,255,0.04);
  color: var(--text-dim); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; border-bottom: 1px solid var(--glass-border);
}
table.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.data-table tbody tr:hover { background: rgba(56,189,248,0.06); }
table.data-table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 0.7rem; font-weight: 700;
  text-transform: capitalize; letter-spacing: 0.02em; border: 1px solid transparent;
}
.badge-blue { background: rgba(30,111,255,0.18); color: #7db4ff; border-color: rgba(30,111,255,0.4); }
.badge-green { background: rgba(34,211,165,0.15); color: var(--success); border-color: rgba(34,211,165,0.4); }
.badge-yellow { background: rgba(255,176,32,0.15); color: var(--warning); border-color: rgba(255,176,32,0.4); }
.badge-red { background: rgba(255,77,94,0.15); color: var(--red-2); border-color: rgba(255,77,94,0.4); }
.badge-gray { background: rgba(255,255,255,0.08); color: var(--text-dim); border-color: rgba(255,255,255,0.15); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.88rem; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3,5,10,0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal { width: 100%; max-width: 520px; border-radius: var(--radius-lg); max-height: 88vh; display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--glass-border); }
.modal-body { padding: 20px 22px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-body .field.full { grid-column: 1 / -1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--glass-border); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: 0.86rem; font-weight: 600;
  background: rgba(20,30,58,0.9); border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.success { border-color: rgba(34,211,165,0.5); color: var(--success); }
.toast.error { border-color: rgba(255,77,94,0.5); color: var(--red-2); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120,170,255,0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,170,255,0.45); }

/* ---------- Workflow: registro / wizard ---------- */
.register-card { max-width: 460px; }
.wizard-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.step-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: all 0.2s ease; }
.step-dot.active { background: var(--blue-2); box-shadow: 0 0 8px rgba(56,189,248,0.6); width: 22px; border-radius: 5px; }
.step-dot.done { background: var(--success); }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.wizard-hint { color: var(--text-dim); font-size: 0.78rem; line-height: 1.5; margin: 8px 0; }
#register-body { text-align: left; }
#register-body input[type="file"] { width: 100%; color: var(--text-dim); font-size: 0.8rem; margin-top: 4px; }

/* ---------- Workflow: fotos ---------- */
.photo-preview-box { margin-top: 10px; min-height: 10px; }
.photo-preview { max-width: 100%; max-height: 180px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border-strong); display: block; }
.upload-status { font-size: 0.78rem; color: var(--text-dim); }
.upload-status.error { color: var(--red-2); }
.upload-ok { font-size: 0.8rem; color: var(--success); font-weight: 600; margin-top: 6px; }

/* ---------- Workflow: mapas ---------- */
.map-box { height: 220px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--glass-border); margin: 10px 0 16px; }
.leaflet-container { background: #0a1128; font-family: 'Inter', sans-serif; }

/* ---------- Workflow: formulario de envio ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.section-title { font-size: 0.9rem; margin: 18px 0 4px; color: var(--blue-2); }
.price-estimate { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin: 10px 0; }
.price-estimate strong { color: var(--success); font-family: 'Orbitron', sans-serif; }
.geo-search-row { display: flex; gap: 8px; margin: 8px 0; }
.geo-search-row input { flex: 1; }

/* ---------- Workflow: tarjetas de tarea ---------- */
.task-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-md); margin-bottom: 10px; flex-wrap: wrap;
}
.task-sub { color: var(--text-dim); font-size: 0.78rem; }
.task-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; vertical-align: middle; margin-right: 10px; border: 1px solid var(--glass-border); }
.clickable-row { cursor: pointer; }

/* ---------- Workflow: checklist de carga ---------- */
.checklist-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03); margin-bottom: 8px; font-size: 0.85rem;
}
.checklist-item.checked { border-color: rgba(34,211,165,0.4); background: rgba(34,211,165,0.06); }
.progress-bar { height: 8px; border-radius: 100px; background: rgba(255,255,255,0.08); overflow: hidden; margin: 10px 0 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-1), var(--success)); transition: width 0.3s ease; }

/* ---------- Workflow: timeline de seguimiento ---------- */
.timeline { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0; }
.timeline-item { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 90px; position: relative; opacity: 0.4; }
.timeline-item.done { opacity: 1; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.15); margin-bottom: 6px; border: 2px solid transparent; }
.timeline-item.done .timeline-dot { background: var(--success); box-shadow: 0 0 8px rgba(34,211,165,0.6); }
.timeline-item::before {
  content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,0.1); z-index: -1;
}
.timeline-item:first-child::before { display: none; }
.timeline-item.done::before { background: rgba(34,211,165,0.4); }
.timeline-label { font-size: 0.66rem; text-align: center; color: var(--text-dim); }
.timeline-item.done .timeline-label { color: var(--text-main); }

/* ---------- Workflow: galeria de fotos en seguimiento ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.photo-item { text-align: center; }
.photo-item img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); }
.photo-item span { display: block; font-size: 0.68rem; color: var(--text-dim); margin-top: 4px; }

/* ---------- Workflow: firma digital ---------- */
.signature-canvas {
  width: 100%; max-width: 560px; height: 180px; border-radius: var(--radius-sm);
  border: 1px dashed var(--glass-border-strong); background: rgba(255,255,255,0.03); touch-action: none; cursor: crosshair;
}

/* ---------- Workflow: layout de 2 columnas ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Landing publica ---------- */
.landing-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px;
  position: relative;
}
.landing-login-link {
  position: fixed; top: 22px; right: 26px; z-index: 10; display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: all 0.2s ease;
}
.landing-login-link:hover { border-color: var(--blue-2); background: rgba(56,189,248,0.12); }

.landing-hero {
  max-width: 900px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  animation: landing-in 0.6s ease both;
}
@keyframes landing-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.landing-logo {
  width: 108px; height: 108px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--glass-border-strong);
  box-shadow: 0 0 40px rgba(56,189,248,0.4);
  margin-bottom: 22px;
}
.landing-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 100px;
  background: rgba(34,211,165,0.12); border: 1px solid rgba(34,211,165,0.4);
  color: var(--success); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 22px;
}
.landing-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900; line-height: 1.15;
  background: linear-gradient(90deg, var(--white-soft), var(--blue-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 18px;
}
.landing-title span { color: var(--red-2); -webkit-text-fill-color: var(--red-2); }
.landing-sub {
  max-width: 560px; color: var(--text-dim);
  font-size: 1.02rem; line-height: 1.6; margin-bottom: 34px;
}
.btn-cta {
  font-size: 1.08rem; font-weight: 800;
  padding: 18px 42px; border-radius: 100px;
  background: linear-gradient(135deg, var(--blue-1), var(--red-1));
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 14px 40px rgba(30,111,255,0.4);
  animation: cta-pulse 2.8s ease-in-out infinite;
}
.btn-cta:hover { box-shadow: 0 18px 50px rgba(226,28,52,0.45); transform: translateY(-3px); }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 14px 40px rgba(30,111,255,0.4); }
  50% { box-shadow: 0 14px 46px rgba(226,28,52,0.5); }
}
.landing-cta-hint { color: var(--text-dim); font-size: 0.8rem; margin: 14px 0 46px; }

.landing-benefits {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  width: 100%; max-width: 820px;
}
.benefit-card {
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.benefit-card:hover { transform: translateY(-4px); border-color: var(--blue-2); }
.benefit-icon { font-size: 1.8rem; display: inline-block; margin-bottom: 12px; }
.benefit-card h4 { font-size: 0.95rem; margin-bottom: 6px; }
.benefit-card p { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; margin: 0; }

@media (max-width: 760px) {
  .landing-benefits { grid-template-columns: 1fr; }
  .landing-login-link { top: 14px; right: 14px; padding: 7px 14px; font-size: 0.76rem; }
}

/* ---------- Flujo telefono + OTP ---------- */
.phone-input-row { display: flex; gap: 8px; }
.phone-input-row select { flex: 0 0 110px; }
.phone-input-row input { flex: 1; }
.phone-prefix {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  padding: 0 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  color: var(--text-main); font-weight: 600; font-size: 0.92rem;
}
.otp-input { text-align: center; letter-spacing: 0.5em; font-size: 1.3rem; font-weight: 700; }
.otp-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }

/* ---------- Busqueda de cedula (consulta.diaz.com.py) ---------- */
.doc-lookup-row { display: flex; gap: 8px; }
.doc-lookup-row input { flex: 1; }

/* ---------- Registro de cliente por el recolector (KYC en terreno) ---------- */
.kyc-banner {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 12px 0 16px;
  border-color: rgba(255,176,32,0.4);
}
.kyc-banner p { margin: 0 0 10px; font-size: 0.84rem; color: var(--warning); }
.kyc-banner.kyc-done { border-color: rgba(34,211,165,0.4); color: var(--success); font-weight: 700; text-align: center; }
.kyc-banner.kyc-done p { color: var(--success); margin: 0; }
#kyc-form { margin-top: 12px; text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-105%); transition: transform 0.25s ease; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
  .sidebar.open { transform: translateX(0); }
  #mobile-nav-toggle { display: inline-flex; }
  .topbar { margin: 12px; }
  .view-root { padding: 16px 12px 60px; }
  .modal-body { grid-template-columns: 1fr; }
}

/* ---------- Topbar: usuario + cerrar sesion siempre visibles ---------- */
.topbar { gap: 10px; }
.topbar h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { font-size: 0.8rem; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
.topbar-logout {
  flex: none; cursor: pointer; white-space: nowrap;
  background: rgba(226,28,52,0.16); color: var(--text-main);
  border: 1px solid rgba(255,77,94,0.55); border-radius: 100px;
  padding: 7px 14px; font: 700 0.78rem 'Inter', sans-serif;
}
.topbar-logout:hover { background: rgba(226,28,52,0.32); }
.user-info { min-width: 0; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .topbar-clock { display: none; } .topbar-user { max-width: 70px; } }

/* ---------- Login: boton de registro llamativo ---------- */
.btn-register-cta {
  font-weight: 800; font-size: 1rem; color: #fff; letter-spacing: .01em;
  background: linear-gradient(135deg, var(--red-1), #ff7a1a 45%, var(--blue-1));
  background-size: 200% 200%;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 30px rgba(226,28,52,0.4);
  animation: reg-pulse 2.6s ease-in-out infinite, reg-shift 6s ease-in-out infinite;
}
.btn-register-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(255,122,26,0.55); }
@keyframes reg-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(226,28,52,0.4); }
  50% { box-shadow: 0 10px 38px rgba(30,111,255,0.55); }
}
@keyframes reg-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .btn-register-cta { animation: none; } }

/* ---------- Esquina: iniciar sesion / registrarse ---------- */
.corner-auth {
  position: fixed; top: 16px; right: 18px; z-index: 50;
  display: flex; gap: 8px;
}
.corner-auth.hidden { display: none; }
.corner-btn {
  background: rgba(10,17,40,0.72); color: var(--text-main);
  border: 1px solid var(--glass-border-strong);
  padding: 9px 16px; border-radius: 100px;
  font: 600 0.82rem 'Inter', sans-serif; cursor: pointer;
  backdrop-filter: blur(14px); transition: all 0.2s ease;
}
.corner-btn:hover { border-color: var(--blue-2); background: rgba(56,189,248,0.16); }
.corner-btn-primary { background: linear-gradient(135deg, var(--blue-1), var(--red-1)); border-color: rgba(255,255,255,0.3); }
@media (max-width: 480px) { .corner-auth { top: 10px; right: 10px; gap: 6px; } .corner-btn { padding: 7px 12px; font-size: 0.74rem; } }

/* ---------- Pre-apertura: cuenta regresiva ---------- */
.launch-hero {
  width: 100%; max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  animation: landing-in 0.6s ease both;
}
.launch-img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55), 0 0 0 1px var(--glass-border);
}
.launch-count { width: 100%; padding: 20px 16px 16px; border-radius: var(--radius-lg); text-align: center;
  border: 1px solid var(--glass-border-strong); box-shadow: 0 0 40px rgba(30,111,255,0.35), 0 0 24px rgba(226,28,52,0.2); }
.launch-count-title { display: inline-block; background: var(--red-1); color: #fff; font-weight: 800;
  letter-spacing: .06em; padding: 6px 20px; border-radius: 8px; margin-bottom: 14px; font-size: 1rem; }
.launch-grid { display: flex; align-items: flex-start; justify-content: center; gap: clamp(4px, 1.5vw, 12px); }
.launch-grid i { font-style: normal; font-size: clamp(1.8rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.25; color: var(--text-main); }
.launch-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; max-width: 150px; }
.launch-cell span {
  width: 100%; padding: 8px 0; border-radius: 12px;
  font: 900 clamp(2.2rem, 9vw, 4.4rem)/1.1 'Orbitron', sans-serif; color: #fff;
  background: linear-gradient(180deg, #1b1f2b 0 50%, #0d1018 50% 100%);
  border: 1px solid rgba(255,255,255,0.14); font-variant-numeric: tabular-nums;
}
.launch-cell small { font-size: clamp(.62rem, 2.4vw, .85rem); font-weight: 700; letter-spacing: .06em; color: var(--text-main); }
.launch-features { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; text-align: center;
  font-size: clamp(.62rem, 2vw, .78rem); font-weight: 700; line-height: 1.3; }
.launch-features span { display: flex; width: 52px; height: 52px; margin: 0 auto 6px; align-items: center; justify-content: center;
  font-size: 1.5rem; border-radius: 50%; border: 2px solid var(--red-1); }
.launch-contact { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.launch-te { font: italic 800 1.5rem 'Inter', sans-serif; color: var(--red-2); }
.launch-wa, .launch-ig { padding: 10px 20px; border-radius: 100px; font-weight: 800; text-decoration: none; color: #0a1a3a; }
.launch-wa { background: #fff; font-size: 1.1rem; }
.launch-ig { background: linear-gradient(135deg, #feda75, #d62976, #4f5bd5); color: #fff; font-size: .9rem; }
.launch-reg { color: var(--text-dim); font-size: .85rem; text-align: center; margin: 0; }
@media (max-width: 560px) { .launch-features { grid-template-columns: repeat(3, 1fr); } .landing-screen { padding: 64px 14px 40px; } }

/* ---------- Solicitud de retiro: cantidad de paquetes ---------- */
.qty-row { display: flex; align-items: stretch; gap: 8px; max-width: 280px; }
.qty-row .btn-glass { width: 52px; font-size: 1.4rem; font-weight: 800; padding: 0; }
.qty-row input { flex: 1; min-width: 0; text-align: center; font-size: 1.5rem; font-weight: 800; }
.e-ubic { margin: 10px 0 16px; }
.e-ubic summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.fs-in { width: 110px; }

/* ---------- Mis retiros: mapa de ruta ---------- */
.map-route { height: 380px; }
.rt-pin { width: 30px; height: 30px; border-radius: 50%; margin: 3px; background: #1e6fff; color: #fff;
  font: 800 0.85rem 'Inter', sans-serif; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 0 8px rgba(0,0,0,.6); }
.rt-pin.next { background: #ff9f1a; width: 36px; height: 36px; margin: 0; animation: rt-pulse 1.6s infinite; }
.rt-me { width: 18px; height: 18px; border-radius: 50%; background: #38bdf8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(56,189,248,.3); }
@keyframes rt-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,159,26,.7); } 50% { box-shadow: 0 0 0 12px rgba(255,159,26,0); } }
.rt-next { padding: 14px 16px; border-radius: var(--radius-md); margin-bottom: 14px; border: 1px solid #ff9f1a; }
.rt-next-h { color: #ff9f1a; font-weight: 800; font-size: 0.78rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; }
.rt-badge { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #1e6fff; color: #fff;
  align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; margin-right: 8px; }
.rt-badge.next { background: #ff9f1a; }
@media (max-width: 560px) { .map-route { height: 320px; } }
