/* ==================================================
   RODACONCE.CL — PREMIUM DARK THEME
   Diseño glassmorphism con colores vibrantes
   ================================================== */

:root {
  /* ── Palette ── */
  --bg-deep:      #0D1117;
  --bg-surface:   #161B22;
  --bg-card:      rgba(30, 37, 48, 0.75);
  --bg-card-solid:#1E2530;
  --accent-amber: #FFB800;
  --accent-gold:  #F5B324;
  --accent-teal:  #00D4AA;
  --danger:       #FF4757;
  --success:      #2ED573;
  --blue:         #3B82F6;
  --purple:       #A855F7;
  --text-primary: #F0F2F5;
  --text-secondary:#8B949E;
  --text-muted:   #6B7280;
  --border:       rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 184, 0, 0.5);
  --glass-blur:   12px;
  --radius:       12px;
  --radius-lg:    16px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow:  0 0 20px rgba(255, 184, 0, 0.15);
  --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, .display {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

/* ==================================================
   HEADER
   ================================================== */
header.top {
  background: linear-gradient(135deg, #0D1117 0%, #161B22 60%, #1a2332 100%);
  color: #fff;
  padding: 20px 16px 0;
  position: relative;
  overflow: hidden;
}
header.top::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,184,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--accent-amber);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.brand span { color: #fff; }
.brand-wheel {
  font-size: clamp(20px, 4.5vw, 26px);
  display: inline-block;
  animation: spin-wheel 6s linear infinite;
  vertical-align: middle;
  margin-right: 2px;
}
@keyframes spin-wheel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.brand-tld {
  color: var(--accent-teal) !important;
  font-size: 0.7em;
  font-weight: 500;
}
.brand-tagline {
  font-family: 'Work Sans', sans-serif;
  font-size: clamp(10px, 2.5vw, 12px);
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin-top: 4px;
  line-height: 1.4;
  max-width: 320px;
}

.user-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  background: rgba(255, 184, 0, 0.1);
  color: var(--accent-amber);
  padding: 8px 14px;
  border-radius: 24px;
  cursor: pointer;
  border: 1px solid rgba(255, 184, 0, 0.25);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-top: 4px;
}
.user-pill:hover { background: rgba(255, 184, 0, 0.2); border-color: var(--accent-amber); }
.user-pill:active { transform: scale(0.97); }

.lane-divider {
  height: 4px;
  margin-top: 16px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-amber) 0 18px,
    transparent 18px 34px
  );
  opacity: 0.7;
  border-radius: 2px;
  animation: lane-move 3s linear infinite;
}
@keyframes lane-move {
  from { background-position: 0 0; }
  to { background-position: 34px 0; }
}

.stats-strip {
  display: flex;
  padding: 16px 0 20px;
  max-width: 720px;
  margin: 0 auto;
}
.stat {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  color: var(--accent-amber);
  display: block;
  text-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}
.stat .lbl {
  font-size: clamp(8.5px, 2vw, 10px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}

/* ==================================================
   TABS
   ================================================== */
nav.tabbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: var(--bg-surface);
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 15;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav.tabbar::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11.5px, 2.8vw, 13px);
  padding: 10px 16px;
  border-radius: 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.tab.active {
  background: var(--accent-amber);
  color: var(--bg-deep);
  border-color: var(--accent-amber);
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.3), 0 2px 8px rgba(255, 184, 0, 0.2);
}

/* ==================================================
   SECTIONS
   ================================================== */
main {
  padding: 20px 16px;
  max-width: 720px;
  margin: 0 auto;
}
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 6px;
}
.section-head h2 {
  font-size: clamp(18px, 4.5vw, 22px);
  color: var(--text-primary);
  text-shadow: 0 0 30px rgba(255, 184, 0, 0.1);
}
.section-sub {
  font-size: clamp(12px, 3vw, 13.5px);
  color: var(--text-secondary);
  margin: 4px 0 16px;
  line-height: 1.5;
}

.btn-share {
  background: rgba(255, 184, 0, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 184, 0, 0.25);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.btn-share:hover { background: rgba(255, 184, 0, 0.2); }

/* ==================================================
   FILTERS
   ================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.chip {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.chip:hover { border-color: rgba(255, 255, 255, 0.15); color: var(--text-primary); }
.chip.active {
  background: rgba(255, 184, 0, 0.15);
  color: var(--accent-amber);
  border-color: rgba(255, 184, 0, 0.4);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.1);
}

/* ==================================================
   CARDS — Glassmorphism
   ================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left: 4px solid var(--text-muted);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card.tag-control  { border-left-color: var(--danger); }
.card.tag-demanda  { border-left-color: var(--success); }
.card.tag-corte    { border-left-color: var(--accent-amber); }
.card.tag-inseguro { border-left-color: var(--danger); }
.card.oculto { opacity: 0.4; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-title { font-weight: 600; font-size: clamp(14px, 3.5vw, 15.5px); color: var(--text-primary); }
.card-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.card-body {
  font-size: clamp(12.5px, 3vw, 13.5px);
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}
.card-body strong { color: var(--text-primary); }
.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.card-actions { display: flex; gap: 14px; }

.link-btn {
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: none;
  font-size: 11.5px;
  padding: 4px 0;
  font-family: 'Work Sans', sans-serif;
  transition: opacity var(--transition);
}
.link-btn:hover { opacity: 0.8; }
.link-btn.delete  { color: var(--danger); }
.link-btn.report  { color: var(--text-muted); }
.link-btn.resolve { color: var(--accent-teal); }

.badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.disponible  { background: rgba(46, 213, 115, 0.15); color: var(--success); }
.badge.negociacion { background: rgba(255, 184, 0, 0.15);  color: var(--accent-amber); }
.badge.resuelto    { background: rgba(139, 148, 158, 0.15); color: var(--text-muted); }
.badge.admin       { background: var(--accent-amber); color: var(--bg-deep); }

.price-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  color: var(--accent-teal);
  font-size: 15px;
  text-shadow: 0 0 16px rgba(0, 212, 170, 0.2);
}
.rating { color: var(--accent-amber); font-size: 12px; }

.empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.empty .icon { font-size: 32px; display: block; margin-bottom: 10px; }

/* ==================================================
   FINANZAS
   ================================================== */
.finance-form { border-left-color: var(--blue); }
.field-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-teal);
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.field-group-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.btn.full { width: 100%; margin-top: 8px; }

.finance-result {
  background: linear-gradient(135deg, var(--bg-surface) 0%, #1a2332 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
}
.finance-result .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  color: var(--text-secondary);
}
.finance-result .row.neto {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 10px;
  padding-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-amber);
  text-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}
.finance-result .row span:last-child { font-family: 'IBM Plex Mono', monospace; }
.btn.pdf {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--accent-amber), #e6a300);
  color: var(--bg-deep);
  width: 100%;
  font-weight: 700;
}

/* ==================================================
   FORO / FAQ
   ================================================== */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  padding: 14px 0;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  transition: color var(--transition);
}
.faq-q:hover { color: var(--accent-amber); }
.faq-a {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 0 14px;
  display: none;
  line-height: 1.6;
}
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.arrow {
  transition: transform 0.25s ease;
  font-size: 11px;
  color: var(--text-muted);
}

.answer-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.answer {
  font-size: 13px;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 184, 0, 0.3);
  color: var(--text-secondary);
  line-height: 1.5;
}
.answer b { font-size: 12px; color: var(--accent-amber); }
.answer-form { display: flex; gap: 8px; margin-top: 10px; }
.answer-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  transition: border-color var(--transition);
}
.answer-form input:focus { outline: none; border-color: var(--border-focus); }
.answer-form button {
  background: var(--accent-amber);
  color: var(--bg-deep);
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Work Sans', sans-serif;
}
.answer-form button:hover { box-shadow: 0 0 12px rgba(255, 184, 0, 0.3); }

/* ==================================================
   MODALS / FORMS
   ================================================== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-amber), #e6a300);
  color: var(--bg-deep);
  font-size: 30px;
  border: none;
  box-shadow: 0 4px 20px rgba(255, 184, 0, 0.35);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  transition: transform var(--transition);
  animation: fab-pulse 3s ease-in-out infinite;
}
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.95); }
.fab span { transform: translateY(-1px); }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 184, 0, 0.35); }
  50% { box-shadow: 0 4px 30px rgba(255, 184, 0, 0.55), 0 0 40px rgba(255, 184, 0, 0.15); }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 30;
}
.overlay.active { display: flex; }

.sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-bottom: none;
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px;
  max-height: 88vh;
  overflow-y: auto;
  animation: sheet-up 0.3s ease;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sheet h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.modal-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.1);
}
.field select { appearance: auto; }
.field select option,
.field select optgroup {
  background: #161B22;
  color: var(--text-primary);
}
.field select option:checked,
.field select option:hover {
  background: var(--accent-amber);
  color: #0D1117;
}
.field textarea { resize: vertical; min-height: 70px; }

.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }

.btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: all var(--transition);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent-amber), #e6a300);
  color: var(--bg-deep);
}
.btn.primary:hover { box-shadow: 0 0 16px rgba(255, 184, 0, 0.3); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }

.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: linear-gradient(135deg, var(--bg-surface), #1a2332);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 184, 0, 0.25);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ==================================================
   SHARE CARD (off-screen, for WhatsApp image generation)
   ================================================== */
.share-card {
  position: fixed; top: 0; left: -9999px; width: 480px;
  background: #ECE8DE; font-family: 'Work Sans', sans-serif; color: #1B1D21;
}
.share-card .sc-header {
  background: var(--bg-deep); color: #fff; padding: 22px 24px 16px; position: relative;
}
.share-card .sc-brand {
  font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700;
  color: var(--accent-amber); text-transform: uppercase;
}
.share-card .sc-brand span { color: #fff; }
.share-card .sc-sub { font-size: 12.5px; color: #C9CBD1; margin-top: 4px; }
.share-card .sc-dash {
  height: 4px; margin-top: 12px;
  background: repeating-linear-gradient(90deg, var(--accent-amber) 0 16px, transparent 16px 30px);
}
.share-card .sc-body { padding: 16px 24px 22px; }
.share-card .sc-item {
  background: #F6F4EC; border-left: 4px solid #D8D4C8; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 10px;
}
.share-card .sc-item.tag-control  { border-left-color: #C0392B; }
.share-card .sc-item.tag-demanda  { border-left-color: #3F7D4F; }
.share-card .sc-item.tag-corte    { border-left-color: #F5B324; }
.share-card .sc-item.tag-inseguro { border-left-color: #C0392B; }
.share-card .sc-item-title { font-weight: 700; font-size: 14px; color: #1B1D21; }
.share-card .sc-item-zone { font-size: 12.5px; color: #6B6E73; margin-top: 2px; }
.share-card .sc-item-detail { font-size: 12.5px; color: #3c3e42; margin-top: 5px; line-height: 1.4; }
.share-card .sc-footer {
  text-align: center; font-size: 10.5px; color: #6B6E73; padding: 10px 24px 20px;
}

/* ==================================================
   QUICK REPORT — Botones grandes para conductor en ruta
   ================================================== */
.quick-report {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 150px));
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.qr-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 8px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  cursor: pointer;
  transition: all var(--transition);
  border-left: 4px solid var(--text-muted);
  font-family: 'Work Sans', sans-serif;
}
.qr-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.qr-btn:active { transform: scale(0.97); }
.qr-icon { font-size: 20px; line-height: 1; }
.qr-label {
  font-size: clamp(9.5px, 2.6vw, 11px);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.qr-control   { border-left-color: var(--danger); }
.qr-accidente { border-left-color: #FF6B35; }
.qr-corte     { border-left-color: var(--accent-amber); }
.qr-semaforo  { border-left-color: var(--purple); }
.qr-inseguro  { border-left-color: var(--danger); }
.card.tag-accidente { border-left-color: #FF6B35; }
.card.tag-semaforo  { border-left-color: var(--purple); }

/* ==================================================
   QUICK FORM — Formulario inline rápido
   ================================================== */
.quick-form {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 184, 0, 0.25);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  animation: fadeIn 0.25s ease;
}
.qf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-amber);
}
.qf-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: all var(--transition);
}
.qf-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* ==================================================
   LOGOUT BUTTON — X visible junto al nombre
   ================================================== */
.logout-x {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; font-size: 10px; color: var(--text-muted);
  background: rgba(255, 71, 87, 0.15); border-radius: 50%;
  width: 18px; height: 18px; cursor: pointer;
  transition: all var(--transition); vertical-align: middle; line-height: 1;
}
.logout-x:hover { background: rgba(255, 71, 87, 0.35); color: var(--danger); }

/* ==================================================
   TIMELINE — Cronología Ley Uber
   ================================================== */
.timeline { position: relative; padding-left: 28px; margin-top: 8px; }
.timeline::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-amber), var(--accent-teal), var(--border));
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 24px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -22px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--text-muted); z-index: 1;
}
.tl-highlight .tl-dot {
  background: var(--accent-amber); border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.4);
  width: 14px; height: 14px; left: -23px; top: 5px;
}
.tl-date {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  color: var(--accent-teal); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
.tl-highlight .tl-date { color: var(--accent-amber); }
.tl-card {
  background: var(--bg-card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
}
.tl-highlight .tl-card {
  border-color: rgba(255, 184, 0, 0.25);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.08);
}
.tl-card h3 {
  font-family: 'Work Sans', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text-primary); text-transform: none; margin-bottom: 6px;
}
.tl-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.tl-card strong { color: var(--accent-amber); }

/* ==================================================
   RESPONSIVE BREAKPOINTS
   ================================================== */

/* ── Phones (≤480px): tabbar en 2 filas, sin scroll oculto ── */
/* ── Bottom nav tabs ── */
@media (max-width: 520px) {
  nav.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-bottom: none;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    padding: 6px 8px;
    gap: 4px;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    background: var(--bg-card-solid);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
  }
  .tab {
    flex: none;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    min-height: 38px;
    font-size: clamp(9.5px, 3.2vw, 11.5px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body { padding-bottom: 92px; }
  .fab { bottom: 96px; }
}

/* ── Small phones (≤360px) ── */
@media (max-width: 360px) {
  header.top { padding: 14px 12px 0; }
  .brand { font-size: 20px; }
  .brand-tagline { font-size: 9.5px; max-width: 200px; }
  .user-pill { font-size: 10px; padding: 6px 10px; }
  .stat .num { font-size: 18px; }
  .tab { font-size: 10.5px; padding: 7px 4px; }
  main { padding: 14px 12px; }
  .card { padding: 14px 14px; }
  .qr-btn { min-height: 56px; padding: 10px 6px; }
  .qr-icon { font-size: 18px; }
}

/* ── Tablets & desktops (≥600px) ── */
@media (min-width: 600px) {
  main { padding: 24px 20px; }
  .brand-tagline { max-width: 400px; }
  .card { padding: 18px 22px; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); }
  .quick-report { grid-template-columns: repeat(3, minmax(0, 130px)); }
}

/* ── Wide desktops (≥900px) ── */
@media (min-width: 900px) {
  header.top { padding: 24px 24px 0; }
  main { padding: 28px 24px; max-width: 760px; }
  nav.tabbar { justify-content: center; padding: 12px 16px; }
  .tab { font-size: 13.5px; padding: 10px 20px; }
  .stats-strip { padding: 20px 0 24px; }
  .sheet { max-width: 520px; padding: 28px 28px; }
  .quick-report { grid-template-columns: repeat(5, minmax(0, 110px)); }
}
