* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--atlas-font);
  background: var(--atlas-bg);
  color: var(--atlas-text);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, .card, .tile, .mobile-vehicle-card, .location-card { -webkit-tap-highlight-color: rgba(15,155,108,.16); }
a { color: var(--atlas-green-strong); text-decoration: none; }
.shell { min-height: 100vh; display: flex; background: var(--atlas-bg); }
.top-strip { position: fixed; inset: 0 0 auto; height: 3px; background: var(--atlas-green); z-index: 5; }
.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--atlas-surface);
  border-right: 1px solid var(--atlas-border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--atlas-green); color: #fff; font-weight: 800;
}
.brand-title { font-size: 15px; font-weight: 800; line-height: 1; }
.brand-sub { margin-top: 3px; font-size: 10px; color: var(--atlas-subtle); font-weight: 700; letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--atlas-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.nav-button:hover, .nav-button.active { background: var(--atlas-green-soft); color: var(--atlas-green-strong); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f4; display: grid; gap: 3px; }
.nav-group-label { padding: 0 12px 4px; color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.nav-button.sub { padding-left: 22px; font-size: 12px; }
.nav-button.sub .nav-dot { width: 5px; height: 5px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #f1f5f4; padding: 14px 6px 0; display: grid; gap: 8px; }
.push-toggle { width: 100%; }
.push-nota { font-size: 11px; line-height: 1.35; color: var(--atlas-muted); }
.push-nota--bloqueado { color: var(--atlas-amber-text); font-weight: 600; }
.push-pasos { font-size: 11px; line-height: 1.4; color: var(--atlas-muted); margin-top: 4px; }
.push-pasos summary { cursor: pointer; color: var(--atlas-amber-text); font-weight: 600; }
.push-pasos ol { margin: 6px 0 0; padding-left: 18px; }
.push-pasos li { margin-bottom: 4px; }
.push-diag { font-size: 10px; color: var(--atlas-muted); opacity: .65; margin-top: 4px; font-family: monospace; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header {
  min-height: 52px;
  border-bottom: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 22px;
}
.header-label { color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.company-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.company-select { min-width: 210px; max-width: 260px; font-weight: 800; color: var(--atlas-green-strong); background: var(--atlas-surface-soft); }
.company-row { display: flex; gap: 7px; overflow-x: auto; }
.chip, .company-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--atlas-border); border-radius: 999px;
  background: var(--atlas-surface); color: var(--atlas-muted);
  min-height: 28px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.company-chip.active { background: var(--atlas-green-soft); color: var(--atlas-green-strong); border-color: #b8e2ce; }
.content { flex: 1; overflow: auto; padding: 26px 34px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: 0; }
.lead { margin: 5px 0 0; color: var(--atlas-muted); font-size: 13.5px; line-height: 1.5; max-width: 760px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mobile-mode-row { display: none; }
.segmented {
  display: inline-flex;
  border: 1px solid var(--atlas-border);
  border-radius: 9px;
  background: var(--atlas-surface-soft);
  padding: 2px;
  gap: 2px;
}
.segmented button {
  border: 0;
  border-radius: 7px;
  min-height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.segmented button.active { background: var(--atlas-surface); color: var(--atlas-green-strong); box-shadow: var(--atlas-shadow); }
.list-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  padding: 12px;
  border: 1px solid var(--atlas-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-surface);
}
.list-filters label { display: grid; gap: 5px; min-width: 170px; }
.list-filters span { color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.list-filters .select { min-width: 220px; }
.field, .select, textarea {
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  color: var(--atlas-text);
  border-radius: 9px;
  min-height: 34px;
  padding: 0 10px;
  outline: none;
}
.field:focus, .select:focus, textarea:focus { border-color: #b8e2ce; box-shadow: 0 0 0 3px rgba(15,155,108,.1); }
textarea { padding: 10px; min-height: 96px; resize: vertical; }
.btn {
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  min-height: 34px;
  border-radius: 9px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.btn:hover { border-color: var(--atlas-border-strong); }
.btn:active, .nav-button:active, .company-chip:active, .chip:active, .tile:active, .card:active,
.mobile-nav-btn:active, .mobile-company:active, .mobile-avatar:active, .mobile-vehicle-card:active,
.location-card:active, .menu-item:active, .sheet-option:active, .loc-chip:active {
  transform: scale(.985);
  filter: brightness(.97);
}
.btn:active, .tile:active, .card:active, .mobile-vehicle-card:active, .location-card:active,
.menu-item:active, .sheet-option:active {
  background-color: var(--atlas-green-soft);
}
.btn.primary { background: var(--atlas-green); color: #fff; border-color: var(--atlas-green); }
.btn.soft { background: var(--atlas-green-soft); color: var(--atlas-green-strong); border-color: #b8e2ce; }
.btn.danger { background: var(--atlas-red-soft); color: var(--atlas-red-text); border-color: #f4beb2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tile {
  min-height: 150px;
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  border-radius: var(--atlas-radius);
  padding: 20px;
  box-shadow: var(--atlas-shadow);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.tile.disabled { cursor: help; }
.tile-label { color: var(--atlas-subtle); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1.3; }
.tile-num { font-family: var(--atlas-mono); font-size: 30px; font-weight: 600; line-height: 1.02; font-variant-numeric: tabular-nums; }
.tile-micro { color: var(--atlas-muted); font-size: 12px; line-height: 1.4; }
.tile-foot { margin-top: auto; color: var(--atlas-green-strong); font-size: 12px; font-weight: 800; }
.muted { color: var(--atlas-subtle); }
.section { margin-top: 30px; }
.section-title { color: var(--atlas-subtle); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.portal-row { display: flex; flex-wrap: wrap; gap: 10px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.board-six { grid-template-columns: repeat(6, minmax(220px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
.column {
  border: 1px solid var(--atlas-border);
  border-radius: var(--atlas-radius-lg);
  background: #f8faf9;
  padding: 10px;
  min-height: 360px;
}
.column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 10px; }
.col-code { font-family: var(--atlas-mono); color: var(--atlas-subtle); font-size: 11px; }
.col-name { font-size: 13px; font-weight: 800; }
.count { min-width: 26px; border-radius: 999px; padding: 3px 8px; text-align: center; background: var(--atlas-surface); border: 1px solid var(--atlas-border); font-family: var(--atlas-mono); font-size: 12px; }
.cards { display: grid; gap: 10px; }
.card {
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  border-radius: var(--atlas-radius);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(20,40,35,.04);
  display: grid;
  gap: 8px;
  cursor: pointer;
}
.card-title { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.mono { font-family: var(--atlas-mono); font-size: 12px; color: var(--atlas-muted); }
.card-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
  border: 1px solid var(--atlas-border);
}
.sem-gris { background: #f1f5f4; color: var(--atlas-muted); }
.sem-ambar { background: var(--atlas-amber-soft); color: var(--atlas-amber-text); border-color: #ecd9a3; }
.sem-verde { background: var(--atlas-green-soft); color: #0a5e41; border-color: #b8e2ce; }
.empty {
  border: 1px dashed var(--atlas-border-strong);
  border-radius: var(--atlas-radius);
  padding: 22px 14px;
  text-align: center;
  color: var(--atlas-subtle);
  font-size: 12.5px;
  line-height: 1.45;
}
.table-wrap { border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius-lg); background: var(--atlas-surface); overflow: auto; box-shadow: var(--atlas-shadow); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #f1f5f4; text-align: left; font-size: 12.5px; vertical-align: middle; }
th { color: var(--atlas-subtle); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: #fbfcfc; }
tr:last-child td { border-bottom: 0; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(9,22,18,.28); display: grid; justify-items: end; z-index: 20; overflow: hidden; }
.drawer {
  width: min(520px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  background: var(--atlas-surface);
  box-shadow: -22px 0 60px rgba(10,20,16,.18);
  padding: 22px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.delivery-view { border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius); padding: 10px 12px; background: var(--atlas-surface-soft); }
.delivery-view span { display: block; color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.delivery-grid { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.2fr); gap: 10px; align-items: end; }
.delivery-grid label { display: grid; gap: 6px; color: var(--atlas-muted); font-size: 12px; font-weight: 800; }
.delivery-grid textarea { min-height: 72px; }
.declare-delivery { min-height: 46px; font-size: 14px; }
.delivery-notes { margin-top: 10px; color: var(--atlas-muted); font-size: 13px; white-space: pre-wrap; }
.calendar-shell {
  border: 1px solid var(--atlas-border);
  border-radius: var(--atlas-radius-lg);
  background: var(--atlas-surface);
  box-shadow: var(--atlas-shadow);
  padding: 12px;
}
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.calendar-nav { display: flex; gap: 6px; align-items: center; }
.calendar-grid { display: grid; gap: 1px; background: var(--atlas-border); border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius); overflow: hidden; }
.calendar-grid.month { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.calendar-grid.week { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
.calendar-weekday { background: #fbfcfc; color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 8px; }
.calendar-cell { min-height: 118px; background: var(--atlas-surface); padding: 8px; display: grid; align-content: start; gap: 7px; }
.calendar-cell.large { min-height: 420px; }
.calendar-cell.muted-cell { background: #fbfcfc; color: var(--atlas-subtle); }
.calendar-cell.today { box-shadow: inset 0 0 0 2px var(--atlas-green); }
.calendar-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--atlas-muted); }
.calendar-day strong { color: var(--atlas-text); font-family: var(--atlas-mono); font-weight: 600; }
.calendar-items { display: grid; gap: 5px; }
.calendar-item {
  border: 1px solid var(--atlas-border);
  border-radius: 7px;
  min-height: 28px;
  padding: 4px 7px;
  background: var(--atlas-surface);
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.event { border-left: 3px solid var(--atlas-border-strong); padding: 0 0 13px 12px; margin-left: 4px; color: var(--atlas-muted); font-size: 12.5px; }
.event strong { color: var(--atlas-text); }
.banner { border: 1px solid #b8e2ce; background: var(--atlas-green-soft); color: var(--atlas-green-strong); border-radius: var(--atlas-radius); padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 14px; }
.error { border-color: #f4beb2; background: var(--atlas-red-soft); color: var(--atlas-red-text); }
.config-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.panel { border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius-lg); background: var(--atlas-surface); padding: 16px; box-shadow: var(--atlas-shadow); }
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.btn-sm { min-height: 26px; padding: 0 9px; font-size: 11.5px; }

/* F3-L4 (D-11): comentarios + adjuntos + PLATÓN */
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: var(--atlas-green-soft); }
.comentarios-lista { display: grid; gap: 10px; margin-top: 10px; }
.comentario { border-left: 3px solid var(--atlas-border-strong); padding: 6px 0 6px 12px; margin-left: 4px; }
.comentario-meta { font-size: 11px; color: var(--atlas-subtle); margin-bottom: 3px; }
.comentario-texto { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.galeria-item { display: flex; flex-direction: column; gap: 4px; }
.galeria-item a { display: block; border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius); overflow: hidden; background: var(--atlas-surface); }
.galeria-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.galeria-icono { width: 100%; height: 90px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--atlas-muted); background: var(--atlas-bg); }
.galeria-meta { display: flex; flex-direction: column; gap: 1px; font-size: 10px; color: var(--atlas-subtle); padding: 4px 6px 6px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--atlas-bg); }
.login-box { width: min(390px, 100%); border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius); background: var(--atlas-surface); padding: 28px; box-shadow: var(--shadow-card, var(--atlas-shadow)); }
.login-wordmark { font-family: var(--atlas-mono); color: var(--atlas-green); font-size: 28px; font-weight: 500; margin-bottom: 24px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 7px; color: var(--atlas-muted); font-size: 12px; font-weight: 800; }
.login-form .field { width: 100%; min-height: var(--ctrl-h, 38px); border-radius: var(--atlas-radius); }
.login-submit { width: 100%; margin-top: 4px; min-height: var(--ctrl-h, 38px); border-radius: var(--atlas-radius); }
.login-error { border: 1px solid #f4beb2; background: var(--atlas-red-soft); color: var(--atlas-red-text); border-radius: var(--atlas-radius); padding: 9px 10px; font-size: 12.5px; font-weight: 700; }
.login-alt { margin-top: 18px; text-align: center; font-size: 12.5px; font-weight: 700; }
.login-alt a { color: var(--atlas-muted); }
.login-alt a:hover { color: var(--atlas-green-strong); }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: 420px; background: #12221d; color: #fff; border-radius: 10px; padding: 12px 14px; font-size: 13px; z-index: 50; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.screen-loading {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 42px;
  margin: 0 0 12px;
  border: 1px solid #b8e2ce;
  border-radius: var(--atlas-radius);
  background: var(--atlas-green-soft);
  color: var(--atlas-green-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--atlas-shadow);
}
.loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--atlas-green);
  animation: pulse-dot .85s ease-in-out infinite alternate;
}
@keyframes pulse-dot {
  from { opacity: .35; transform: scale(.8); }
  to { opacity: 1; transform: scale(1.12); }
}
.mobile-header, .mobile-bottom, .mobile-kanban, .mobile-stock-tools, .mobile-stock-list, .mobile-wide-action { display: none; }
.locations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.location-card {
  min-height: 118px;
  border: 1px solid var(--atlas-border);
  border-radius: var(--atlas-radius-lg);
  background: var(--atlas-surface);
  box-shadow: var(--atlas-shadow);
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 8px;
}
.location-card.warn { background: var(--atlas-amber-soft); border-color: #ecd9a3; }
.location-num { font-family: var(--atlas-mono); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.location-bar { height: 6px; border-radius: 999px; background: #dbe4e1; overflow: hidden; }
.location-bar i { display: block; height: 100%; border-radius: inherit; background: var(--atlas-green); }
.location-card.warn .location-bar i { background: var(--atlas-amber); }
.location-foot, .stamp { color: var(--atlas-subtle); font-size: 11px; font-weight: 700; }
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  background: rgba(9,22,18,.34);
  display: grid;
  align-items: end;
}
.mobile-sheet {
  width: min(520px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: var(--atlas-surface);
  border-radius: 18px 18px 0 0;
  padding: 12px 14px 18px;
  justify-self: center;
  box-shadow: 0 -22px 60px rgba(10,20,16,.18);
}
.mobile-sheet h2 { margin: 4px 0 12px; font-size: 18px; }
.sheet-handle { width: 42px; height: 4px; border-radius: 4px; background: var(--atlas-border-strong); margin: 0 auto 14px; }
.sheet-option {
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--atlas-border);
  border-radius: 9px;
  background: var(--atlas-surface);
  text-align: left;
  padding: 0 12px;
  font-weight: 800;
}
.sheet-option.active { background: var(--atlas-green-soft); color: var(--atlas-green-strong); border-color: #b8e2ce; }
.detail-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid var(--atlas-border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.datum small { display: block; color: var(--atlas-subtle); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.datum span { display: block; margin-top: 4px; font-size: 13px; }
.detail-location { margin-top: 4px; }
.seg, .company-tag, .cancel {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
}
.seg { background: var(--atlas-text); color: #fff; }
.seg.vn { background: var(--atlas-surface-soft); color: var(--atlas-muted); border: 1px solid var(--atlas-border); }
.company-tag { background: var(--atlas-surface-soft); color: var(--atlas-muted); border: 1px solid var(--atlas-border); margin-left: 6px; max-width: 100%; white-space: normal; }
.cancel { background: var(--atlas-red); color: #fff; margin-left: auto; letter-spacing: .04em; }
.wide-mobile { width: 100%; min-height: 44px; }
@media (max-width: 1100px) {
  .sidebar { width: 76px; flex-basis: 76px; }
  .brand-title, .brand-sub, .nav-label, .nav-group-label, .sidebar-bottom { display: none; }
  .nav-button { justify-content: center; padding: 12px; }
  .nav-button.sub { padding: 12px; }
  .nav-dot { width: 18px; height: 18px; border-radius: 7px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .brand-title, .brand-sub, .nav-label, .nav-group-label { display: block; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav-group { border-top: 0; border-left: 1px solid #f1f5f4; margin-top: 0; padding-top: 0; padding-left: 8px; display: flex; align-items: center; gap: 3px; }
  /* En movil el bloque de usuario SI se ve: es donde vive el toggle de avisos. */
  .sidebar-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0 0;
    padding: 10px 0 0;
  }
  .push-toggle { width: auto; }
  .push-nota { flex-basis: 100%; }
  .content { padding: 20px 16px 32px; }
  .header { padding: 10px 16px; }
  .tiles { grid-template-columns: 1fr; }
  .board { display: flex; overflow-x: auto; }
  .column { min-width: 280px; }
  .page-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 768px) {
  body { background: var(--atlas-bg); }
  .top-strip, .sidebar, .header { display: none; }
  .shell { display: block; min-height: 100vh; padding: 52px 0 76px; }
  .main { display: block; min-height: calc(100vh - 128px); }
  .mobile-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 12;
    height: 52px;
    background: var(--atlas-surface);
    border-bottom: 1px solid var(--atlas-border);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
  }
  .mobile-back {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--atlas-border);
    border-radius: 999px;
    background: var(--atlas-surface-soft);
    color: var(--atlas-text);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }
  .mobile-brand { padding: 0; gap: 8px; min-width: 0; }
  .mobile-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .mobile-brand .brand-title { display: block; font-size: 15px; }
  .mobile-company {
    margin-left: auto;
    max-width: 150px;
    min-height: 44px;
    border: 1px solid var(--atlas-border);
    border-radius: 999px;
    background: var(--atlas-surface-soft);
    color: var(--atlas-green-strong);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-avatar {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--atlas-text);
    color: #fff;
    font-weight: 800;
  }
  .content { padding: 18px 14px 20px; overflow: visible; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  h1 { font-size: 22px; }
  .lead { font-size: 13px; }
  .controls { width: 100%; }
  .controls .field, .controls .select, .controls .btn { min-height: 44px; }
  .controls .segmented { display: none; }
  .mobile-mode-row { display: block; margin: -4px 0 12px; }
  .mobile-mode-row .btn { width: 100%; min-height: 44px; }
  .list-filters { display: grid; grid-template-columns: 1fr; gap: 9px; margin-bottom: 12px; }
  .list-filters label, .list-filters .select, .list-filters .btn { width: 100%; min-width: 0; }
  .list-filters .field, .list-filters .select, .list-filters .btn { min-height: 44px; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile {
    min-height: 74px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }
  .tile .card-line { grid-column: 1 / 2; display: block; }
  .tile-num { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 28px; }
  .tile-micro { grid-column: 1; }
  .tile-foot { display: none; }
  .mobile-wide-action { display: block; width: 100%; min-height: 46px; margin-top: 14px; }
  .section { margin-top: 20px; }
  .board, .table-wrap { display: none; }
  .mobile-kanban, .mobile-stock-tools, .mobile-stock-list { display: block; }
  .mobile-kanban-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(286px, 88vw);
    gap: 12px;
    align-items: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 2px 10px;
  }
  .mobile-kanban-column {
    scroll-snap-align: start;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    background: #f8faf9;
    padding: 10px;
    min-height: calc(100vh - 210px);
  }
  .mobile-column-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8faf9;
    border-bottom: 1px solid var(--atlas-border);
    margin: -10px -10px 8px;
    padding: 8px 10px;
    min-height: 44px;
    align-items: center;
  }
  .mobile-card-list, .mobile-stock-list { display: grid; gap: 10px; }
  .mobile-stock-tools { margin-bottom: 12px; }
  .mobile-stock-tools .field { width: 100%; min-height: 44px; margin-bottom: 9px; }
  .chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 6px; }
  .chip { min-height: 38px; }
  .mobile-vehicle-card {
    width: 100%;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    background: var(--atlas-surface);
    box-shadow: var(--atlas-shadow);
    padding: 13px;
    text-align: left;
    display: grid;
    gap: 7px;
    cursor: pointer;
  }
  .mobile-vtop, .mobile-vfoot { display: flex; align-items: center; gap: 7px; min-width: 0; }
  .mobile-vtop strong { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
  .mobile-ident { color: var(--atlas-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  .mobile-ident .company-tag { margin-left: 0; }
  .holder { font-size: 13px; color: var(--atlas-text); overflow-wrap: anywhere; }
  .mobile-vfoot { margin-top: 2px; align-items: flex-end; }
  .delivery { color: var(--atlas-amber-text); font-size: 12px; font-weight: 800; }
  .mobile-vfoot .pill { margin-left: auto; max-width: 62%; white-space: normal; }
  .loc-chip {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #b8e2ce;
    background: var(--atlas-green-soft);
    color: var(--atlas-green-strong);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    margin-left: auto;
  }
  .locations-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .location-card { min-height: 112px; border-radius: var(--atlas-radius-lg); }
  .location-num { font-size: 26px; }
  .more-list { display: grid; gap: 9px; }
  .menu-item {
    min-height: 54px;
    width: 100%;
    border: 1px solid var(--atlas-border);
    border-radius: 9px;
    background: var(--atlas-surface);
    display: flex;
    align-items: center;
    padding: 10px 13px;
    text-align: left;
    font-weight: 800;
  }
  .menu-item span { margin-left: auto; color: var(--atlas-subtle); }
  .user-panel .push-toggle { width: 100%; min-height: 44px; margin: 4px 0; }
  .mobile-bottom {
    position: fixed;
    inset: auto 0 0;
    z-index: 12;
    height: 76px;
    background: var(--atlas-surface);
    border-top: 1px solid var(--atlas-border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }
  .mobile-nav-btn {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--atlas-muted);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-height: 62px;
    font-size: 10px;
    font-weight: 800;
  }
  .mobile-nav-icon { font-size: 19px; line-height: 1; }
  .mobile-nav-btn.active { color: var(--atlas-green-strong); }
  .mobile-badge {
    position: absolute;
    top: 7px;
    right: 13px;
    background: var(--atlas-green);
    color: #fff;
    border-radius: 999px;
    padding: 2px 5px;
    font: 500 9px var(--atlas-mono);
  }
  .drawer-backdrop { display: block; background: var(--atlas-bg); z-index: 30; }
  .drawer {
    width: 100%;
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    box-shadow: none;
    padding: 0 14px calc(92px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .drawer-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--atlas-surface);
    border-bottom: 1px solid var(--atlas-border);
    margin: 0 -14px 14px;
    padding: 10px 14px;
    align-items: center;
  }
  .drawer-head h1 { font-size: 18px; }
  .drawer-head .lead { margin: 3px 0 0; }
  .detail-actions, .delivery-grid { grid-template-columns: 1fr; }
  .declare-delivery { min-height: 50px; width: 100%; }
  .calendar-shell { padding: 9px; touch-action: pan-y; }
  .calendar-toolbar { align-items: stretch; }
  .calendar-nav, .calendar-toolbar .segmented { width: 100%; }
  .calendar-nav .btn, .calendar-toolbar .segmented button { flex: 1; min-height: 42px; }
  .calendar-grid.month { grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
  .calendar-grid.week { grid-template-columns: 1fr; overflow: hidden; }
  .calendar-weekday { padding: 6px 0; text-align: center; font-size: 9px; letter-spacing: 0; }
  .calendar-cell { min-height: 64px; padding: 4px; gap: 4px; }
  .calendar-cell.large { min-height: 92px; }
  .calendar-day { font-size: 10px; gap: 4px; }
  .calendar-day strong { font-size: 11px; }
  .calendar-item { min-height: 21px; padding: 3px 4px; border-radius: 5px; font-size: 9px; line-height: 1.15; }
  .calendar-grid.week .calendar-cell { min-height: 96px; }
  .calendar-grid.week .calendar-day { font-size: 12px; }
  .calendar-grid.week .calendar-day strong { font-size: 14px; }
  .calendar-grid.week .calendar-item { font-size: 11px; min-height: 28px; padding: 5px 7px; }
  .detail-data { grid-template-columns: 1fr 1fr; }
  .galeria { grid-template-columns: repeat(3, 1fr); }
  .galeria-item img, .galeria-icono { height: auto; aspect-ratio: 1; }
  textarea { min-height: 110px; }
  .toast { left: 50%; right: auto; bottom: 88px; transform: translateX(-50%); max-width: calc(100vw - 28px); border-radius: 999px; white-space: nowrap; }
  .login { align-items: end; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
  .login-box { padding: 24px; }
  .login-form .field, .login-submit { min-height: 46px; }
}

@media (max-width: 390px) {
  .locations-grid, .detail-data { grid-template-columns: 1fr; }
  .mobile-vfoot { align-items: stretch; flex-direction: column; }
  .mobile-vfoot .pill, .loc-chip { width: 100%; max-width: none; margin-left: 0; justify-content: center; }
  .toast { white-space: normal; text-align: center; border-radius: 14px; }
}
