/* ==========================================================================
   Roraima Sistema — Demo de Producción — Hoja de estilos
   ========================================================================== */

:root {
  --navy: #4B1256;
  --navy-soft: #6E1479;
  --teal: #00B38F;
  --teal-dark: #007D64;
  --teal-tint: #e1f6f0;
  --chart-purple: #8B3E96;
  --bg: #F4F6F8;
  --white: #FFFFFF;
  --red: #DC3C45;
  --red-tint: #fdecee;
  --amber: #D97706;
  --amber-tint: #fdf2e3;
  --text: #1E2532;
  --text-secondary: #64748B;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(75, 18, 86, 0.06);
  --shadow-md: 0 4px 16px rgba(75, 18, 86, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
}

select, input, textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.icon { display: inline-flex; width: 1em; height: 1em; }
.icon svg { width: 100%; height: 100%; display: block; }

/* --------------------------------------------------------------------- */
/* Layout general                                                        */
/* --------------------------------------------------------------------- */

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

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

.content {
  padding: 28px 32px 48px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* --------------------------------------------------------------------- */
/* Sidebar                                                               */
/* --------------------------------------------------------------------- */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy);
  color: #cfd6e6;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 22px;
  color: var(--white);
}

.sidebar__logo {
  display: block;
  width: 100%;
  max-width: 176px;
  height: auto;
  background: var(--white);
  border-radius: 10px;
  padding: 8px 10px;
}

.sidebar__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.sidebar__brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar__brand-text strong { font-size: 14.5px; font-weight: 600; }
.sidebar__brand-text span,
.sidebar__brand-subtitle { font-size: 11.5px; color: #cbb6d4; }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #b9c2d8;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item .icon { width: 17px; height: 17px; color: #8f9ab7; flex-shrink: 0; }

.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }
.nav-item:hover .icon { color: var(--white); }

.nav-item.is-active {
  background: rgba(0, 179, 143, 0.22);
  color: var(--white);
}

.nav-item.is-active .icon { color: var(--teal); }

.sidebar__footer {
  margin-top: auto;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #263257;
  color: #cfd6e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar__footer-text { line-height: 1.25; overflow: hidden; }
.sidebar__footer-text strong { display: block; font-size: 12.5px; color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__footer-text span { font-size: 11px; color: #8f9ab7; }

.sidebar__logout {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #cfd6e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.sidebar__logout .icon { width: 15px; height: 15px; }
.sidebar__logout:hover { border-color: var(--teal); color: var(--teal); }

.sidebar__close {
  display: none;
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  align-items: center;
  justify-content: center;
}
.sidebar__close .icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------------- */
/* Topbar y overlay del menú móvil                                       */
/* --------------------------------------------------------------------- */

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.mobile-topbar__menu-btn {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-topbar__menu-btn .icon { width: 18px; height: 18px; }
.mobile-topbar .sidebar__brand-mark { width: 28px; height: 28px; border: 1px solid var(--border); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 23, 41, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 45;
}
.sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }

/* --------------------------------------------------------------------- */
/* Encabezado de vista                                                   */
/* --------------------------------------------------------------------- */

.breadcrumb {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.view-header__text h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.2px;
}

.view-header__text p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 4px;
}

.view-header__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn .icon { width: 15px; height: 15px; }

.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }

.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-dark); }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: rgba(75, 18, 86, 0.05); color: var(--navy); }

.btn-danger-outline { background: var(--white); color: var(--red); border-color: #f3c6c9; }
.btn-danger-outline:hover { background: var(--red-tint); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------- */
/* Tarjetas de equipo                                                    */
/* --------------------------------------------------------------------- */

.team-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot--verde { background: #12a150; }
.status-dot--amber { background: var(--amber); }
.status-dot--rojo { background: var(--red); }

.team-card__avatar .status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--white);
  width: 11px;
  height: 11px;
}

.team-card__body { min-width: 0; }
.team-card__name { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.team-card__meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.team-card__meta b { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------- */
/* Filtros                                                               */
/* --------------------------------------------------------------------- */

.filters-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1 1 240px;
  min-width: 200px;
  background: var(--bg);
}

.search-field .icon { width: 15px; height: 15px; color: var(--text-secondary); }
.search-field input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13.5px;
}

.filters-bar select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--white);
  min-width: 130px;
  color: var(--text);
}

.filters-bar select:focus, .search-field:focus-within { border-color: var(--teal); }

.filters-clear {
  font-size: 12.5px;
  color: var(--teal-dark);
  font-weight: 600;
  border: none;
  background: none;
  padding: 8px 4px;
  white-space: nowrap;
}
.filters-clear:hover { text-decoration: underline; }

/* --------------------------------------------------------------------- */
/* Tabs                                                                  */
/* --------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab .tab-count {
  font-size: 11px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 700;
}

.tab.is-active { color: var(--teal-dark); border-bottom-color: var(--teal); }
.tab.is-active .tab-count { background: var(--teal-tint); color: var(--teal-dark); }
.tab:hover { color: var(--navy); }

/* --------------------------------------------------------------------- */
/* Tabla de órdenes                                                      */
/* --------------------------------------------------------------------- */

.table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-scroll { overflow-x: auto; }

table.orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.orders-table thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfd;
  white-space: nowrap;
}

.orders-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
}

.orders-table tbody tr:last-child { border-bottom: none; }
.orders-table tbody tr:hover { background: #fafbfc; }
.orders-table tbody tr.is-selected { background: var(--teal-tint); }

.orders-table td {
  padding: 13px 16px;
  vertical-align: middle;
  font-size: 13.3px;
}

.cell-oc { font-weight: 600; color: var(--navy); }
.cell-oc small { display: block; font-weight: 400; color: var(--text-secondary); font-size: 12px; margin-top: 1px; }

.cell-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}

.cell-stage small { display: block; color: var(--text-secondary); font-weight: 400; font-size: 11.5px; margin-top: 1px; }

.avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.avatar-pill .initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-pill.is-unassigned .initials { background: #eef0f3; color: var(--text-secondary); }
.avatar-pill span.name { font-size: 12.8px; }

.due-cell { font-size: 12.8px; font-weight: 600; }
.due-cell.is-hoy { color: var(--amber); }
.due-cell.is-atrasada { color: var(--red); }
.due-cell.is-al-dia { color: var(--text); }
.due-cell small { display: block; font-weight: 400; color: inherit; opacity: 0.85; font-size: 11.3px; }

.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 12.6px;
  font-weight: 600;
  color: var(--teal-dark);
}

.timer-chip.is-paused { color: var(--text-secondary); }
.timer-chip .icon { width: 12px; height: 12px; }
.timer-chip.is-idle { color: var(--text-secondary); }

.row-actions { display: flex; gap: 6px; }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.icon-btn .icon { width: 15px; height: 15px; }
.icon-btn:hover { border-color: var(--teal); color: var(--teal-dark); }

.late-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  margin-left: 6px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state .icon { width: 32px; height: 32px; margin-bottom: 10px; color: #c3ccd8; }

/* --------------------------------------------------------------------- */
/* Panel lateral de edición (drawer)                                    */
/* --------------------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 23, 41, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 40;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 420px;
  max-width: 92vw;
  background: var(--white);
  box-shadow: -8px 0 28px rgba(75, 18, 86, 0.14);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 41;
  display: flex;
  flex-direction: column;
}

.drawer.is-open { transform: translateX(0); }

.drawer__header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.drawer__header h2 { font-size: 16px; font-weight: 700; color: var(--navy); }
.drawer__header p { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }

.drawer__close {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent;
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.drawer__close:hover { background: var(--bg); }
.drawer__close .icon { width: 16px; height: 16px; }

.drawer__body {
  padding: 18px 20px 8px;
  overflow-y: auto;
  flex: 1;
}

.drawer__footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.field-group { margin-bottom: 14px; }
.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.field-group select,
.field-group input[type="text"],
.field-group input[type="datetime-local"],
.field-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--white);
}

.field-group select:focus,
.field-group input:focus,
.field-group textarea:focus { outline: none; border-color: var(--teal); }

.field-group textarea { resize: vertical; min-height: 64px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 20px 0 10px;
}
.section-title:first-child { margin-top: 0; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.switch-row label { font-size: 13.3px; font-weight: 600; color: var(--text); margin: 0; }

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  border: none;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.switch.is-on { background: var(--teal); }
.switch.is-on::after { transform: translateX(18px); }

.timer-panel {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.timer-panel__value {
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark);
}
.timer-panel__value.is-paused { color: var(--text-secondary); }
.timer-panel__label { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.timer-panel__actions { display: flex; gap: 8px; }

.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.history-list li:last-child { border-bottom: none; }
.history-list time { display: block; color: var(--text-secondary); font-size: 11.3px; margin-bottom: 2px; }

.oc-link-row {
  margin-top: 4px;
  margin-bottom: 18px;
}
.oc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.6px;
  font-weight: 600;
  color: var(--teal-dark);
  border: none;
  background: none;
  padding: 0;
}
.oc-link .icon { width: 13px; height: 13px; }
.oc-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------- */
/* Toasts                                                                */
/* --------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: 340px;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast .icon { width: 15px; height: 15px; color: var(--teal); flex-shrink: 0; }
.toast--error .icon { color: var(--red); }

/* --------------------------------------------------------------------- */
/* Modal genérico                                                        */
/* --------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 23, 41, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 380px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
}

.modal-card h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.modal-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }
.modal-card__actions { display: flex; gap: 10px; justify-content: flex-end; }

.modal-card--doc { width: 320px; text-align: center; }
.modal-card--doc .doc-icon { width: 56px; height: 56px; color: var(--teal); margin: 0 auto 12px; }
.modal-card--doc .doc-meta { text-align: left; background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.modal-card--doc .doc-meta div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.modal-card--doc .doc-meta div span:first-child { color: var(--text-secondary); }

/* --------------------------------------------------------------------- */
/* Vista: Cargar OC                                                      */
/* --------------------------------------------------------------------- */

.upload-shell { min-height: 100vh; }

.upload-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.upload-topbar__brand { display: flex; align-items: center; gap: 10px; }
.upload-topbar__brand .sidebar__brand-mark { border: 1px solid var(--border); }
.upload-topbar__brand strong { font-size: 14.5px; color: var(--navy); }

.steps {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12.8px;
  font-weight: 600;
}

.step__index {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.step.is-active .step__index { background: var(--teal); border-color: var(--teal); color: var(--white); }
.step.is-active { color: var(--navy); }
.step.is-done .step__index { background: var(--teal-tint); border-color: var(--teal); color: var(--teal-dark); }
.step-sep { width: 28px; height: 1px; background: var(--border); }

.upload-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

.upload-content h1 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.upload-content > p.subtitle { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 26px; }

.dropzone {
  border: 1.6px dashed #c7d0dd;
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 56px 30px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-dragover { border-color: var(--teal); background: var(--teal-tint); }

.dropzone__icon {
  width: 46px; height: 46px;
  margin: 0 auto 16px;
  color: var(--teal);
  background: var(--teal-tint);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dropzone__icon .icon { width: 22px; height: 22px; }

.dropzone h3 { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.dropzone p { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }
.dropzone small { display: block; margin-top: 14px; color: var(--text-secondary); font-size: 11.8px; }

.analyzing {
  text-align: center;
  padding: 60px 20px;
}
.spinner {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid var(--teal-tint);
  border-top-color: var(--teal);
  margin: 0 auto 18px;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing h3 { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.analyzing p { font-size: 13px; color: var(--text-secondary); }

.analysis-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--teal-tint);
  border: 1px solid #bfe6e2;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
}
.analysis-banner .icon { width: 20px; height: 20px; color: var(--teal-dark); flex-shrink: 0; }
.analysis-banner strong { display: block; color: var(--navy); font-size: 13.5px; }
.analysis-banner span { font-size: 12.3px; color: var(--text-secondary); }
.analysis-banner .confidence {
  margin-left: auto;
  background: var(--white);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dark);
  flex-shrink: 0;
}

.analysis-banner.is-warning {
  background: var(--amber-tint);
  border-color: #f0dab2;
}
.analysis-banner.is-warning .icon { color: var(--amber); }
.analysis-banner.is-warning strong { color: var(--amber); }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.form-card h4 { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.form-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-grid select, .form-grid input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--white);
}
.form-grid select:focus, .form-grid input:focus { outline: none; border-color: var(--teal); }

.product-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.product-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1.4fr 1.4fr auto;
  gap: 10px;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.product-row input, .product-row select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 9px;
  background: var(--white);
  width: 100%;
  font-size: 13px;
}

.product-row .diseño-flag {
  font-size: 11.3px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 7px;
  text-align: center;
  white-space: nowrap;
}
.diseño-flag.ok { background: var(--teal-tint); color: var(--teal-dark); }
.diseño-flag.falta { background: var(--amber-tint); color: var(--amber); }

.add-product-btn {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal-dark);
  border: 1px dashed #bfe6e2;
  background: var(--teal-tint);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.add-product-btn .icon { width: 13px; height: 13px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--teal); }
.checkbox-row label { margin: 0; font-size: 13px; font-weight: 500; color: var(--text); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* --------------------------------------------------------------------- */
/* Catálogos                                                             */
/* --------------------------------------------------------------------- */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.catalog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 8px;
  display: flex;
  flex-direction: column;
}

.catalog-card h3 { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.catalog-card p.hint { font-size: 12.3px; color: var(--text-secondary); margin-top: 3px; margin-bottom: 14px; }

.catalog-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.catalog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.catalog-row__name { flex: 1; font-size: 13.3px; font-weight: 600; color: var(--text); }
.catalog-row__name input {
  width: 100%;
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13.3px;
  font-weight: 600;
}

.catalog-row__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.catalog-add-row {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.catalog-add-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.catalog-add-row input:focus { outline: none; border-color: var(--teal); }

.catalog-readonly-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.catalog-readonly-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}

.catalog-readonly-card h4 { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11.8px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

.sla-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.sla-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}

.sla-card h4 { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.sla-card p.hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

.sla-card__input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sla-card__input input {
  width: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.sla-card__input input:focus { outline: none; border-color: var(--teal); }
.sla-card__input span { font-size: 12.5px; color: var(--text-secondary); }

.readonly-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.readonly-note .icon { width: 14px; height: 14px; flex-shrink: 0; }

/* --------------------------------------------------------------------- */
/* Pizarra / monitor principal                                          */
/* --------------------------------------------------------------------- */

body.board-body { background: #eef1f4; height: 100vh; overflow: hidden; }

.board-shell {
  padding: 22px 30px 26px;
  max-width: 1920px;
  margin: 0 auto;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

:fullscreen .board-shell,
:-webkit-full-screen .board-shell { max-width: none; }

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.board-header__title { display: flex; align-items: center; gap: 14px; }
.board-header__title h1 { font-size: 24px; font-weight: 700; color: var(--text); }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #12a150;
}
.live-pill .status-dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.board-header__right { display: flex; align-items: center; gap: 22px; }
.board-date { font-size: 13.5px; color: var(--text-secondary); text-align: right; text-transform: capitalize; }
.board-clock { font-size: 30px; font-weight: 700; color: var(--text); font-family: "Consolas", monospace; letter-spacing: 0.5px; }
.board-exit { color: var(--text-secondary); }

.team-strip {
  display: flex;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.team-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 4px 12px;
  border-right: 1px solid var(--border);
}
.team-strip__item:last-child { border-right: none; }

.team-strip__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 11.5px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.team-strip__avatar .status-dot { position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--white); width: 10px; height: 10px; }

.team-strip__name { font-size: 13px; font-weight: 700; color: var(--text); }
.team-strip__counts { font-size: 11.6px; color: var(--text-secondary); margin-top: 1px; }
.team-strip__counts b { color: var(--text); font-weight: 700; }
.team-strip__counts .c-atraso { color: var(--red); font-weight: 700; }
.team-strip__counts .c-hoy { color: var(--amber); font-weight: 700; }

.board-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.board-column {
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.board-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.board-column__head h3 { font-size: 13px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.03em; }
.board-column__count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
}

.board-cards { display: flex; flex-direction: column; gap: 10px; transform-origin: top left; }

.order-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.order-card.is-atrasada { border-left: 3px solid var(--red); padding-left: 10px; }
.order-card.is-listo { border-color: #bfe6e2; }

.order-card--flash { animation: order-card-flash 0.6s ease-in-out infinite; }

@keyframes order-card-flash {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 179, 143, 0.6); }
  50% { box-shadow: var(--shadow-sm); }
}

/* Semáforo por etapa: qué tan cerca está la orden de vencer el tiempo
 * esperado configurado para su etapa actual. */
.order-card--sla-verde { background: var(--teal-tint); }
.order-card--sla-amarillo { background: var(--amber-tint); }
.order-card--sla-rojo { background: var(--red-tint); }

.order-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.order-card__title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.order-card__title small { display: block; font-weight: 500; color: var(--text-secondary); font-size: 11.6px; margin-top: 1px; }

.order-card__check { width: 16px; height: 16px; color: var(--teal); flex-shrink: 0; }

.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11.6px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.order-card__meta b { color: var(--text); font-weight: 600; }

.order-card__status {
  font-size: 11.8px;
  font-weight: 600;
  color: var(--navy);
  background: var(--bg);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  margin-bottom: 8px;
}

.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-card__resp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.8px;
  font-weight: 600;
  color: var(--navy);
}
.order-card__resp .initials {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 9.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.order-card__due { font-size: 11.4px; font-weight: 600; color: var(--text-secondary); }
.order-card__due.is-hoy { color: var(--amber); }
.order-card__due.is-atrasada { color: var(--red); }

.order-card__timer {
  font-family: "Consolas", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dark);
}
.order-card__timer.is-paused { color: var(--text-secondary); }

.column-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 20px 6px;
}

/* --------------------------------------------------------------------- */
/* Reportes / gráficos                                                   */
/* --------------------------------------------------------------------- */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.stat-tile__label { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.stat-tile__value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-tile__value.is-rojo { color: var(--red); }
.stat-tile__value.is-amber { color: var(--amber); }

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.report-card--full { grid-column: 1 / -1; }
.report-card h3 { font-size: 14px; font-weight: 700; color: var(--navy); }
.report-card p.hint { font-size: 12px; color: var(--text-secondary); margin: 3px 0 16px; }

.chart-empty { font-size: 12.5px; color: var(--text-secondary); padding: 12px 0; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.chart-legend__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.chart-legend__swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Barra horizontal simple (ranking / distribución) */
.bar-row {
  display: grid;
  grid-template-columns: 128px 1fr 56px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.bar-row__label {
  font-size: 12.3px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row__track {
  position: relative;
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.bar-row__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 0 4px 4px 0;
  transition: width 0.25s ease;
}
.bar-row__value {
  font-size: 12.3px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Barra apilada (semáforo por etapa) */
.stacked-bar-row {
  display: grid;
  grid-template-columns: 128px 1fr 36px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.stacked-bar {
  display: flex;
  height: 16px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  gap: 2px;
}
.stacked-bar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3px;
}
.stacked-bar__seg span { font-size: 10.5px; font-weight: 700; color: var(--white); }
.stacked-bar__seg--empty { background: var(--bg); }

/* Barra de cumplimiento SLA con marca de referencia */
.sla-bar-row {
  display: grid;
  grid-template-columns: 148px 1fr 64px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.sla-bar-row__track { height: 14px; overflow: visible; }
.sla-bar-row__target {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 2px;
  background: var(--text);
}

/* Barras agrupadas (p.ej. entregas por día) */
.grouped-bars {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 140px;
  padding: 4px 4px 0;
  overflow-x: auto;
}
.grouped-bars__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 34px;
  flex-shrink: 0;
  height: 100%;
}
.grouped-bars__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  width: 100%;
  justify-content: center;
}
.grouped-bars__bar {
  width: 12px;
  border-radius: 4px 4px 0 0;
}
.grouped-bars__label {
  font-size: 10.8px;
  color: var(--text-secondary);
  margin-top: 6px;
  white-space: nowrap;
}

/* Tooltip flotante */
.chart-tooltip {
  position: fixed;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  box-shadow: var(--shadow-md);
  max-width: 220px;
}
.chart-tooltip.is-visible { opacity: 1; transform: translateY(0); }
.chart-tooltip strong { display: block; font-size: 13px; margin-bottom: 2px; }
.chart-tooltip span { color: #e3d3e6; }

/* --------------------------------------------------------------------- */
/* Responsive                                                            */
/* --------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .board-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .team-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sla-grid, .catalog-readonly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; left: -100%; height: 100vh; transition: left 0.2s ease; z-index: 50; }
  .sidebar.is-open { left: 0; }
  .sidebar__close { display: flex; }
  .mobile-topbar { display: flex; }
  .content { padding: 20px 16px 40px; }
  .board-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-row { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .upload-content { padding: 24px 18px 48px; }
  .dropzone { padding: 40px 18px; }
  /* En celular la pizarra deja de ser un monitor de altura fija: la
     página hace scroll normal y las columnas crecen a su alto natural
     en vez de encogerse con el ajuste automático pensado para TV. */
  body.board-body { height: auto; overflow: visible; }
  .board-shell { height: auto; min-height: 100vh; padding: 16px 16px 20px; }
  .board-header { flex-wrap: wrap; gap: 12px; }
  .team-strip { flex-wrap: wrap; }
  .team-strip__item { flex: 1 1 45%; border-right: none; }
  .board-columns { flex: none; }
  .board-column { overflow: visible; }
}

@media (max-width: 680px) {
  .sla-grid, .catalog-readonly-grid { grid-template-columns: 1fr; }
  .orders-table thead { display: none; }
  .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; min-width: 0; }
  .orders-table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin: 10px;
    padding: 6px;
  }
  .orders-table td {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed var(--border);
    text-align: right;
  }
  .orders-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    flex-shrink: 0;
  }
  .orders-table td:last-child { border-bottom: none; }
  .table-scroll { overflow-x: hidden; }
  .board-columns { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
}

@media (max-width: 480px) {
  .stat-tiles { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .view-header__actions { width: 100%; }
  .view-header__actions .btn { flex: 1; justify-content: center; }
  .bar-row, .stacked-bar-row { grid-template-columns: 84px 1fr 44px; }
  .sla-bar-row { grid-template-columns: 84px 1fr 56px; }
  .team-strip__item { flex: 1 1 100%; }
  .upload-topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .upload-topbar__brand strong { display: none; }
  .steps { order: 3; width: 100%; justify-content: center; }
  .step__label { display: none; }
  .step-sep { width: 16px; }
}
