/* ============================================================
   CAR · GARANTIA — CFMOTO da Amazônia
   Design: Dark Industrial · Mobile-First
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=DM+Mono:wght@400;500&display=swap');

/* ── Splash screen ──────────────────────────────────────────── */
#splashScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060E1A;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#splashScreen.splash-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.splash-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  animation: splashPulse 1.8s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.96); }
}
.splash-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255,102,0,0.2);
  border-top-color: #FF6600;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.splash-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
  font-family: var(--font-sans, sans-serif);
}

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-base:    #0C0C0C;
  --bg-deep:    #111111;
  --bg-card:    #1A1A1A;
  --bg-input:   #1F1F1F;
  --bg-hover:   #252525;

  --blue-600:   #CC4400;
  --blue-500:   #FF6600;
  --blue-400:   #FF8533;
  --blue-300:   #FFAA66;
  --blue-100:   #2A1500;
  --blue-50:    #1A0D00;

  --amber-500:  #F59E0B;
  --amber-400:  #FBBF24;
  --amber-100:  #292206;

  --green-500:  #22C55E;
  --green-400:  #4ADE80;
  --green-100:  #052E16;

  --red-500:    #EF4444;
  --red-100:    #300A0A;

  --ink-0:      #FFFFFF;
  --ink-100:    rgba(255,255,255,0.90);
  --ink-200:    rgba(255,255,255,0.65);
  --ink-300:    rgba(255,255,255,0.40);
  --ink-400:    rgba(255,255,255,0.25);
  --ink-500:    rgba(255,255,255,0.12);
  --ink-600:    rgba(255,255,255,0.07);
  --ink-700:    rgba(255,255,255,0.04);

  --border:     rgba(255,255,255,0.08);
  --border-md:  rgba(255,255,255,0.14);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 999px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-blue: 0 4px 20px rgba(255,102,0,0.35);

  --font-sans:  'DM Sans', -apple-system, sans-serif;
  --font-mono:  'DM Mono', monospace;

  --header-h:   56px;
  --bottom-h:   64px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--ink-100);
  min-height: 100vh;
  line-height: 1.5;
  overscroll-behavior: none;
}
button, input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Auth Screen ─────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-base);
  background-image: radial-gradient(ellipse at 30% 40%, rgba(255,102,0,0.12) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-deep);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
}

.auth-logo {
  height: 32px;
  filter: invert(1) brightness(2);
}

.auth-brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border-md);
}

.auth-brand-text { }
.auth-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-100);
  letter-spacing: -0.01em;
}
.auth-brand-sub {
  font-size: 11px;
  color: var(--ink-300);
  margin-top: 1px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 22px;
  gap: 2px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-300);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--blue-400);
  box-shadow: var(--shadow-sm);
}

.auth-error {
  background: var(--red-100);
  color: #FF6B6B;
  border: 1px solid rgba(224,64,64,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.visible { display: block; }

/* ── Fields ─────────────────────────────────────────────────── */
.field { margin-bottom: 13px; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--ink-100);
  background: var(--bg-input);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  font-family: var(--font-sans);
}

.field-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(255,102,0,0.2);
}

.field-input::placeholder { color: var(--ink-400); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.badge-pending { background: rgba(245,158,11,0.12); color: var(--amber-500); border: 1px solid rgba(245,158,11,0.2); }
.badge-done    { background: rgba(34,197,94,0.12); color: var(--green-500); border: 1px solid rgba(34,197,94,0.2); }
.badge-blue    { background: var(--blue-50); color: var(--blue-300); }

/* ── App Shell ──────────────────────────────────────────────── */
.app-screen { display: none; }
.app-screen.visible { display: block; }

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 26px;
  filter: invert(1) brightness(2);
  opacity: 0.92;
}

.header-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-100);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-brand-sub {
  font-size: 10px;
  color: var(--ink-300);
  margin-top: 1px;
}

/* ── Desktop Nav (estilos de layout → css/desktop.css) ─────── */
.desktop-nav-tabs { display: none; } /* mobile: oculto */

.desktop-nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-400);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.desktop-nav-tab.active {
  background: rgba(255,102,0,0.15);
  color: var(--blue-300);
  box-shadow: inset 0 0 0 1px rgba(255,102,0,0.25);
}

/* ── User Chip ──────────────────────────────────────────────── */
.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.user-chip:active { background: var(--bg-hover); }

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--blue-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-200);
}

/* ── Pages ──────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── Main Content ───────────────────────────────────────────── */
.main {
  padding: 14px 12px calc(var(--bottom-h) + 14px);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Bottom Nav ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-h);
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  background: none;
  border: none;
  color: var(--ink-400);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
  padding: 0 4px;
  touch-action: manipulation;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.nav-item svg { width: 22px; height: 22px; transition: transform 0.15s; }
.nav-item.active { color: var(--blue-400); }
.nav-item.active svg { transform: scale(1.1); }

.nav-qr {
  position: relative;
  top: -12px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--blue-500);
  color: white;
  box-shadow: var(--shadow-blue);
  flex-direction: column;
  font-size: 9px;
  flex: none;
  margin: 0 6px;
}

.nav-qr svg { width: 24px; height: 24px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--ink-200);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  -webkit-appearance: none;
  touch-action: manipulation;
  min-height: 44px;
  font-family: var(--font-sans);
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn:hover:not(:disabled) { background: var(--bg-hover); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255,102,0,0.3);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  box-shadow: 0 4px 14px rgba(255,102,0,0.45);
}

.btn-success {
  background: var(--green-100);
  color: var(--green-400);
  border-color: rgba(34,197,94,0.2);
}
.btn-success:hover:not(:disabled) { background: #064E1E; }

.btn-danger {
  background: var(--red-100);
  color: #FF6B6B;
  border-color: rgba(224,64,64,0.2);
}
.btn-danger:hover:not(:disabled) { background: #450A0A; }

.btn-full { width: 100%; }

.btn-lg {
  padding: 14px 22px;
  font-size: 15px;
  min-height: 50px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  min-height: 34px;
}

/* ── Stats Row ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  padding: 18px 10px 14px;
  text-align: center;
  border: 1px solid var(--border-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-value.blue   { color: var(--blue-400); }
.stat-value.amber  { color: var(--amber-500); }
.stat-value.green  { color: var(--green-500); }

.stat-label {
  font-size: 10px;
  color: var(--ink-300);
  margin-top: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-trend {
  font-size: 10px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.stat-trend.up   { color: var(--green-500); }
.stat-trend.down { color: var(--red-500);   }
.stat-trend.flat { color: var(--ink-400);   }

/* ── Search & Filters ───────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  padding: 11px 14px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--blue-500); }
.search-bar svg { width: 17px; height: 17px; color: var(--ink-400); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--ink-100);
  background: transparent;
  font-family: var(--font-sans);
}
.search-bar input::placeholder { color: var(--ink-400); }

.filter-chips {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-md);
  background: var(--bg-deep);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-300);
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
  font-family: var(--font-sans);
}
.chip.active {
  background: var(--blue-500);
  color: white;
  border-color: var(--blue-600);
}

/* ── Incident Cards ─────────────────────────────────────────── */
.incident-list { display: flex; flex-direction: column; gap: 8px; }

.incident-card {
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-md);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  overflow: hidden;
  animation: fadeInUp 0.2s ease both;
}
.incident-card:active { transform: scale(0.99); background: var(--bg-hover); }
.incident-card.pending { border-left-color: var(--amber-500); }
.incident-card.done    { border-left-color: var(--green-500); }

/* ── Incident Aliases ───────────────────────────────────────── */
.incident-thumb {
  width: 72px; flex-shrink: 0;
  background: var(--bg-base);
  position: relative; overflow: hidden;
}
.incident-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.incident-thumb-empty {
  width: 72px; flex-shrink: 0;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--border);
  min-height: 72px;
}
.incident-thumb-empty svg { width: 22px; height: 22px; color: var(--ink-500); }

.incident-info {
  flex: 1; padding: 11px 13px 10px;
  min-width: 0; display: flex;
  flex-direction: column; justify-content: space-between;
}
.incident-name { font-size: 13px; font-weight: 700; color: var(--ink-100); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.incident-code { font-size: 10px; color: var(--ink-300); font-family: var(--font-mono); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.incident-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 6px; }
.incident-meta { font-size: 10px; color: var(--ink-300); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Photo Thumb ────────────────────────────────────────────── */
.photo-thumb { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; position: relative; border: 1px solid var(--border); background: var(--bg-input); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Form ───────────────────────────────────────────────────── */
.form-stack { display: flex; flex-direction: column; gap: 12px; }

.form-card {
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}

.form-card-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blue-50);
  display: flex;
  align-items: center;
  gap: 7px;
}
.form-card-title svg { width: 14px; height: 14px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

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

.field-optional {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 5px;
  background: var(--bg-input);
  border-radius: 3px;
  padding: 1px 5px;
}

.info-banner {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 11px 13px;
  font-size: 13px;
  color: var(--blue-300);
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.info-banner svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }

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

/* ── Camera / Photo ─────────────────────────────────────────── */
.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 11px;
}

.photo-btn {
  position: relative;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  touch-action: manipulation;
  min-height: 78px;
}
.photo-btn:active { transform: scale(0.97); }
.photo-btn-primary {
  background: var(--blue-500);
  border-color: var(--blue-600);
  color: white;
}
.photo-btn svg { width: 26px; height: 26px; }
.photo-btn-label { font-size: 12px; font-weight: 700; font-family: var(--font-sans); }
.photo-btn input { display: none; }

.photo-drop-hint {
  font-size: 11px;
  color: var(--ink-400);
  text-align: center;
  padding: 12px;
  border: 1.5px dashed var(--border-md);
  border-radius: var(--radius-md);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.photo-thumb-form {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-input);
}
.photo-thumb-form img { width: 100%; height: 100%; object-fit: cover; }

.photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.75);
  color: #FF6B6B;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.field-error {
  font-size: 12px;
  color: #FF6B6B;
  margin-top: 6px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Detail View ────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-300);
  cursor: pointer;
  margin-bottom: 14px;
  padding: 4px 0;
  background: none;
  border: none;
  touch-action: manipulation;
  font-family: var(--font-sans);
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { color: var(--blue-400); }

.detail-header {
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue-500);
  margin-bottom: 10px;
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-100);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.detail-subtitle {
  font-size: 12px;
  color: var(--ink-300);
  font-family: var(--font-mono);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-label { color: var(--ink-300); flex-shrink: 0; font-weight: 500; }
.detail-value { font-weight: 600; text-align: right; word-break: break-word; color: var(--ink-100); }

.detail-text {
  font-size: 13px;
  color: var(--ink-200);
  white-space: pre-wrap;
  line-height: 1.6;
  padding: 4px 0;
}

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.car-warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--amber-500);
  line-height: 1.6;
}

/* ── Excel / Import ─────────────────────────────────────────── */
.section-desc {
  font-size: 13px;
  color: var(--ink-300);
  line-height: 1.6;
  margin-bottom: 14px;
}

.import-progress {
  display: none;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font-size: 13px;
  color: var(--blue-300);
  margin-top: 12px;
}
.import-progress.visible { display: block; }
.import-progress.success { background: var(--green-100); border-color: rgba(34,197,94,0.2); color: var(--green-400); }
.import-progress.error   { background: var(--red-100); border-color: rgba(239,68,68,0.2); color: #FF6B6B; }

/* ── Empty & Loading ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--ink-300);
}
.empty-state-icon { font-size: 44px; opacity: 0.15; margin-bottom: 12px; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--ink-200); margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px;
  color: var(--ink-300);
  font-size: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-md);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  color: var(--ink-100);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 600;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-md);
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.fs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}
.fs-overlay.open { display: flex; }

/* top bar */
.fs-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}
.fs-counter {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-mono);
}
.fs-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fs-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .15s;
}
.fs-btn:hover { background: rgba(255,255,255,0.22); }

/* stage — área de visualização */
.fs-stage {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.fs-img-wrap {
  transform-origin: center center;
  transition: none;
  cursor: grab;
  will-change: transform;
}
.fs-img-wrap.is-grabbing { cursor: grabbing; }
.fs-img-wrap img {
  display: block;
  max-width: 100vw;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}

/* nav arrows */
.fs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  font-size: 36px;
  line-height: 1;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.fs-nav:hover { background: rgba(255,255,255,0.25); }
.fs-prev { left: 8px; }
.fs-next { right: 8px; }

/* dica */
.fs-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .4s;
}
.fs-hint.hidden { opacity: 0; }

/* ── QR Scanner ─────────────────────────────────────────────── */
.qr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 400;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.qr-overlay.open { display: flex; }
.qr-video-wrap { position: relative; width: 100%; max-width: 480px; padding: 0 16px; }
.qr-video-wrap video { width: 100%; border-radius: var(--radius-lg); display: block; }
.qr-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.65);
}
.qr-corner { position: absolute; width: 28px; height: 28px; border-color: white; border-style: solid; }
.qr-corner-tl { top:-2px;left:-2px;border-width:3px 0 0 3px;border-radius:6px 0 0 0; }
.qr-corner-tr { top:-2px;right:-2px;border-width:3px 3px 0 0;border-radius:0 6px 0 0; }
.qr-corner-bl { bottom:-2px;left:-2px;border-width:0 0 3px 3px;border-radius:0 0 0 6px; }
.qr-corner-br { bottom:-2px;right:-2px;border-width:0 3px 3px 0;border-radius:0 0 6px 0; }
.qr-hint { color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 24px; text-align: center; padding: 0 24px; transition: color 0.15s; }

/* ── Feedback de reconhecimento (código detectado) ───────────── */
.qr-viewfinder.qr-detected .qr-corner {
  border-color: #22C55E;
  transition: border-color 0.1s;
}
.qr-viewfinder.qr-detected {
  animation: qrDetectPulse 0.4s ease;
}
@keyframes qrDetectPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  40%  { box-shadow: 0 0 0 8px rgba(34,197,94,0.5); }
  100% { box-shadow: 0 0 0 16px rgba(34,197,94,0); }
}
.qr-hint.qr-hint-ok    { color: #22C55E; font-weight: 700; }
.qr-hint.qr-hint-error { color: #FF6B6B; font-weight: 700; }

/* ── Dropzone de upload (pack list) ──────────────────────────── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--bg-input);
  border: 1.5px dashed var(--border-md, rgba(255,255,255,0.18));
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--blue-400); }
.dropzone.dragover {
  border-color: var(--blue-500);
  background: rgba(255,102,0,0.08);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--blue-500);
}
.dropzone-icon {
  width: 32px;
  height: 32px;
  color: var(--ink-300);
}
.dropzone.dragover .dropzone-icon,
.dropzone.has-file .dropzone-icon { color: var(--blue-400); }
.dropzone-text { font-size: 13px; color: var(--ink-200); line-height: 1.5; }
.dropzone-text span { font-size: 11px; color: var(--ink-300); }

/* ── Botões de ação no scanner ─────────────────────── */
.qr-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.qr-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.15);
}
.qr-cancel:active { background: rgba(255,255,255,0.14); }
.qr-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-canvas { display: none; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px calc(28px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 480px;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 36px; height: 4px; background: var(--border-md); border-radius: 2px; margin: 0 auto 18px; }
.modal-title  { font-size: 16px; font-weight: 700; color: var(--ink-100); margin-bottom: 4px; }
.modal-sub    { font-size: 13px; color: var(--ink-300); margin-bottom: 16px; }
.modal-user   { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 18px; border: 1px solid var(--border); }
.modal-avatar { width: 46px; height: 46px; background: var(--blue-500); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.modal-user-name  { font-size: 15px; font-weight: 600; color: var(--ink-100); }
.modal-user-email { font-size: 12px; color: var(--ink-300); margin-top: 2px; }

/* ── Setting row (preferências no modal conta) ──────────────── */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  transition: background .15s;
}
.setting-row:hover { background: rgba(255,255,255,0.04); }
.setting-row-disabled { opacity: 0.45; cursor: not-allowed; }
.setting-row-disabled:hover { background: var(--bg-card); }
.setting-info { flex: 1; min-width: 0; }
.setting-label { font-size: 13px; font-weight: 600; color: var(--ink-100); }
.setting-desc  { font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.setting-toggle {
  width: 42px;
  height: 24px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
}
.setting-toggle.on { background: var(--blue-500, #1A56CC); }
.setting-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.setting-toggle.on .setting-toggle-knob { transform: translateX(18px); }

/* ── Divider ────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 380px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: 1; }
  .stats-row { gap: 6px; }
  .stat-value { font-size: 24px; }
}

/* ── Desktop Layout → ver css/desktop.css ───────────────────── */
/* Elementos desktop-only: ocultos por padrão no mobile        */
.desktop-detail-panel { display: none; }
.empty-kpi-grid       { display: none; }
.empty-hint           { display: none; }

@keyframes hintArrow {
  0%, 100% { transform: translateX(0);   opacity: 0.35; }
  50%       { transform: translateX(-7px); opacity: 0.9;  }
}

/* ── Nav com glow laranja ───────────────────────────────────── */
.nav-item.active {
  color: var(--blue-400) !important;
}
.nav-item.active svg {
  filter: drop-shadow(0 0 5px rgba(255,102,0,0.6));
  transform: scale(1.12) !important;
}
.nav-qr {
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-400) 100%) !important;
  box-shadow: 0 4px 16px rgba(255,102,0,0.5), 0 0 0 1px rgba(255,133,51,0.3) !important;
}

/* ── Header CFMOTO ──────────────────────────────────────────── */
.app-header {
  background: linear-gradient(90deg, #0C0C0C 0%, #1A1A1A 50%, #0C0C0C 100%) !important;
  border-bottom: 1px solid rgba(255,102,0,0.2) !important;
}

/* ── Desktop nav tab ────────────────────────────────────────── */
.desktop-nav-tab.active {
  background: rgba(255,102,0,0.15) !important;
  color: var(--blue-300) !important;
  box-shadow: inset 0 0 0 1px rgba(255,102,0,0.25);
}

/* ── Campos com foco laranja ────────────────────────────────── */
.field-input:focus {
  border-color: var(--blue-400) !important;
  box-shadow: 0 0 0 3px rgba(255,102,0,0.15), 0 0 12px rgba(255,102,0,0.08) !important;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Incident Type Selector ─────────────────────────────────── */
.incident-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font-sans);
  text-align: center;
  touch-action: manipulation;
}
.incident-type-btn:active { transform: scale(0.97); }
.incident-type-btn.active {
  border-color: var(--blue-500);
  background: var(--blue-100);
  box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
}

.type-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.type-icon-wrap svg {
  width: 24px;
  height: 24px;
}
.type-icon-wrap.blue {
  background: rgba(255,102,0,0.15);
  color: var(--blue-400);
}
.type-icon-wrap.amber {
  background: rgba(245,158,11,0.15);
  color: var(--amber-500);
}

.incident-type-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-100);
  line-height: 1.2;
}

.incident-type-sub {
  font-size: 11px;
  color: var(--ink-300);
  line-height: 1.4;
}

/* ── Animação entrada dos cards ─────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   STATUS BADGES — novos estados
══════════════════════════════════════════════════════════════ */
.badge-sent {
  background: rgba(59,130,246,0.15);
  color: #60A5FA;
  border: 1px solid rgba(59,130,246,0.3);
}
.badge-awaiting {
  background: rgba(139,92,246,0.15);
  color: #A78BFA;
  border: 1px solid rgba(139,92,246,0.3);
}
.badge-eta {
  background: rgba(6,182,212,0.15);
  color: #22D3EE;
  border: 1px solid rgba(6,182,212,0.3);
}
.badge-received {
  background: rgba(132,204,22,0.15);
  color: #A3E635;
  border: 1px solid rgba(132,204,22,0.3);
}

/* Borda esquerda do card na lista para novos estados */
.incident-card.sent          { border-left-color: #3B82F6; }
.incident-card.awaiting      { border-left-color: #8B5CF6; }
.incident-card.eta_confirmed { border-left-color: #06B6D4; }
.incident-card.received      { border-left-color: #84CC16; }

/* ══════════════════════════════════════════════════════════════
   STATUS STEPPER
══════════════════════════════════════════════════════════════ */
.status-stepper-card { padding: 14px 14px 16px; }

.stepper-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.stepper-track::-webkit-scrollbar { display: none; }

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 54px;
}

.stepper-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.stepper-connector {
  flex: 1;
  height: 2px;
  min-width: 6px;
  background: rgba(255,255,255,0.08);
  margin-top: 9px;
  align-self: flex-start;
  flex-shrink: 0;
  transition: background 0.2s;
}
.stepper-connector.connector-done {
  background: var(--orange, #FF6600);
}

.stepper-step.step-past .stepper-dot {
  background: var(--orange, #FF6600);
  border-color: var(--orange, #FF6600);
  color: #fff;
}
.stepper-step.step-current .stepper-dot {
  background: var(--orange, #FF6600);
  border-color: var(--orange, #FF6600);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255,102,0,0.2);
}

.stepper-label {
  font-size: 8.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.22);
  margin-top: 5px;
  text-align: center;
  line-height: 1.25;
  max-width: 52px;
  word-break: break-word;
}
.stepper-step.step-past .stepper-label,
.stepper-step.step-current .stepper-label {
  color: rgba(255,255,255,0.65);
}

/* ══════════════════════════════════════════════════════════════
   ETA DISPLAY & INPUT
══════════════════════════════════════════════════════════════ */
.eta-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(6,182,212,0.07);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 8px;
  margin-top: 12px;
}
.eta-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  flex: 1;
}
.eta-value {
  font-size: 14px;
  font-weight: 700;
  color: #22D3EE;
  white-space: nowrap;
}

.eta-input-section {
  margin-top: 10px;
  padding: 12px;
  background: rgba(6,182,212,0.05);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: 8px;
  animation: fadeInUp 0.15s ease;
}

/* ══════════════════════════════════════════════════════════════
   HISTORY TIMELINE
══════════════════════════════════════════════════════════════ */
.history-timeline {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.history-entry {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.history-entry:last-child { border-bottom: none; }

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.history-content { flex: 1; min-width: 0; }

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.history-status-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.history-time {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
  flex-shrink: 0;
}
.history-user {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  margin-bottom: 2px;
}
.history-note-text {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  line-height: 1.5;
}
.history-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  padding: 6px 0 10px;
}

.history-note-form {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.history-note-form .field-input {
  flex: 1;
  font-size: 13px;
}

/* ── Sub-tabs (Dashboard / Relatórios) ──────────────────── */
.sub-tabs-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  padding: 0 16px;
  background: var(--bg-base, #060E1A);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sub-tab {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-300, rgba(255,255,255,0.4));
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.sub-tab.active {
  color: #FF6600;
  border-bottom-color: #FF6600;
}

/* ── Dashboard wrapper ───────────────────────────────────── */
.dash-wrap {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 32px;
}

/* ── Período pills ───────────────────────────────────────── */
.dash-period-row {
  display: flex;
  gap: 8px;
}

.dash-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
}

.dash-pill.active {
  background: #FF6600;
  border-color: #FF6600;
  color: white;
}

/* ── KPI grid ────────────────────────────────────────────── */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

.dash-kpi {
  background: var(--bg-card, #0D1E35);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.dash-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--kc, #FF6600);
  line-height: 1.1;
}

.dash-kpi-lbl {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── Cards genéricos ─────────────────────────────────────── */
.dash-card {
  background: var(--bg-card, #0D1E35);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 14px;
  padding: 16px;
}

.dash-card-hd {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.dash-card-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,0.3);
}

/* ── Gráfico de barras mensais ───────────────────────────── */
.dash-month-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  padding-top: 4px;
}

.dash-month-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.dash-month-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.dash-month-bar {
  width: 100%;
  background: linear-gradient(180deg, #FF8533, #FF6600);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.dash-month-cnt {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  min-height: 14px;
  line-height: 1;
}

.dash-month-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-transform: capitalize;
  margin-top: 2px;
}

/* ── Grid 2 colunas ──────────────────────────────────────── */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Linhas de status ────────────────────────────────────── */
.dash-st-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dash-st-row:last-child { border-bottom: none; }

.dash-st-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-st-name {
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.dash-st-cnt {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* ── Linhas de barra (top peças / por modelo) ────────────── */
.dash-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.dash-bar-row:last-child { margin-bottom: 0; }

.dash-bar-labels {
  width: 80px;
  flex-shrink: 0;
}

.dash-bar-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-bar-sub {
  display: block;
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dash-bar-val {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Cards de tempo médio ────────────────────────────────── */
.dash-time-card {
  text-align: center;
  padding: 20px 12px;
}

.dash-time-ico {
  font-size: 26px;
  margin-bottom: 8px;
}

.dash-time-val {
  font-size: 30px;
  font-weight: 800;
  color: #FF6600;
  line-height: 1;
  margin-bottom: 8px;
}

.dash-time-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ── Empty state ─────────────────────────────────────────── */
.dash-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

/* ── Tracking ────────────────────────────────────────────── */
.tracking-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

.tracking-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.tracking-num {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  flex: 1;
  letter-spacing: 0.05em;
}

.btn-tracking {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,102,0,0.12);
  border: 1.5px solid rgba(255,102,0,0.4);
  color: #FF6600;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}

.btn-tracking:hover {
  background: rgba(255,102,0,0.22);
}

/* ── Batch ETA modal ─────────────────────────────────────── */
.btn-batch-eta-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  margin-top: 8px;
  background: rgba(255,102,0,0.06);
  border: 1.5px dashed rgba(255,102,0,0.3);
  border-radius: 10px;
  color: #FF6600;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.btn-batch-eta-trigger:hover {
  background: rgba(255,102,0,0.12);
  border-color: rgba(255,102,0,0.5);
}

/* Modal layout flex */
#batchETAModal .modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Pesquisa + controles */
.batch-list-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 10px;
}
.batch-search-input {
  margin-bottom: 0 !important;
  font-size: 13px !important;
}
.batch-sel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.batch-count-label {
  flex: 1;
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  min-width: 0;
}
.batch-sel-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.batch-sel-btn:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.8);
}

/* Lista scrollável */
.batch-scroll-list {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: 38vh;
  margin: 0 -4px;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,102,0,0.3) transparent;
}
.batch-scroll-list::-webkit-scrollbar { width: 4px; }
.batch-scroll-list::-webkit-scrollbar-thumb { background: rgba(255,102,0,0.3); border-radius: 4px; }

/* Cada item */
.batch-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.batch-item:hover { background: rgba(255,255,255,0.04); }
.batch-item-pending {
  border-color: rgba(245,158,11,0.15);
  background: rgba(245,158,11,0.04);
}
.batch-item-pending:hover { background: rgba(245,158,11,0.08); }

.batch-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #FF6600;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
}
.batch-item-info  { flex: 1; min-width: 0; }
.batch-item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.batch-item-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.batch-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.batch-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  align-items: center;
}
.batch-tracking-badge {
  background: rgba(255,102,0,0.12);
  border: 1px solid rgba(255,102,0,0.3);
  color: #FF8533;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}
.batch-advance-badge {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  color: #F59E0B;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}
.batch-empty {
  text-align: center;
  padding: 24px;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
}

/* Rodapé do modal */
.batch-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 6px;
  flex-shrink: 0;
}
.batch-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   STOCK PAGE
══════════════════════════════════════════════════════════ */

.stock-wrap {
  padding: 14px 12px;
  padding-bottom: calc(var(--bottom-h) + 14px);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Sumário de topo ──────────────────────────────────────── */
.stock-summary-row {
  display: flex;
  gap: 8px;
}

.stock-summary-chip {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.stock-summary-val {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-100);
  line-height: 1.1;
}
.stock-summary-val.green { color: var(--green-500); }
.stock-summary-val.red   { color: var(--red-500);   }

.stock-summary-lbl {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-300);
  margin-top: 3px;
}

/* ── Toolbar pesquisa + botão ─────────────────────────────── */
.stock-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Card de peça ─────────────────────────────────────────── */
.stock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  margin-bottom: 6px;
}

.stock-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-md);
}

.stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-info { flex: 1; min-width: 0; }

.stock-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.stock-code {
  font-size: 11px;
  color: var(--ink-300);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.stock-qty {
  font-size: 20px;
  font-weight: 800;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* cores de quantidade */
.stock-ok   { color: var(--green-500); }
.stock-low  { color: var(--amber-500); }
.stock-zero { color: var(--red-500);   }

/* ── Stock Detail Modal ───────────────────────────────────── */
.stock-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stock-detail-code {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-300);
  margin-top: 3px;
}

.stock-detail-qty-wrap { text-align: right; }

.stock-detail-qty {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stock-detail-qty-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-300);
  margin-top: 2px;
}

.stock-history-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  margin-bottom: 8px;
}

/* ── Linha de movimento ───────────────────────────────────── */
.stock-move-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.stock-move-row:last-child { border-bottom: none; }

.stock-move-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.stock-move-info {
  flex: 1;
  min-width: 0;
}

.stock-move-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-move-car {
  display: inline-block;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-400);
  margin-top: 2px;
}

.stock-move-right {
  text-align: right;
  flex-shrink: 0;
}

.stock-move-qty {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stock-move-date {
  display: block;
  font-size: 10px;
  color: var(--ink-400);
  margin-top: 1px;
}

/* ── Desktop: stock page → ver css/desktop.css ────────────── */

/* ════════════════════════════════════════════════════════════
   TABS DE TIPO — Peças / Pintura
════════════════════════════════════════════════════════════ */
.type-tab-row {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
}

.type-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-300);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px; /* sobrepõe border-bottom do pai */
  white-space: nowrap;
}

.type-tab:hover:not(.active) {
  color: var(--ink-200);
}

/* Peças — laranja (brand) */
#tab-normal.active {
  color: var(--blue-400);
  border-bottom-color: var(--blue-500);
}

/* Pintura — amber */
#tab-paint.active {
  color: var(--amber-400);
  border-bottom-color: var(--amber-500);
}

/* Contador de incidentes no botão */
.type-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-300);
  transition: background 0.15s, color 0.15s;
}

#tab-normal.active .type-tab-count {
  background: rgba(255,102,0,0.18);
  color: var(--blue-400);
}

#tab-paint.active .type-tab-count {
  background: rgba(245,158,11,0.18);
  color: var(--amber-400);
}

/* ════════════════════════════════════════════════════════════
   CHART.JS — wrapper do gráfico mensal
════════════════════════════════════════════════════════════ */
.dash-month-chart-wrap {
  position: relative;
  height: 120px;
}

/* ════════════════════════════════════════════════════════════
   MICRO-ANIMAÇÕES
════════════════════════════════════════════════════════════ */

/* ── Transição de página ────────────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
/* Sobrescreve o display:block existente adicionando fade */
.page.active {
  animation: pageFadeIn 0.18s ease both;
}

/* ── Entrada dos cards de incidente (stagger) ───────────── */
.incident-card {
  animation: fadeInUp 0.2s ease both;
}
.incident-card:nth-child(2)   { animation-delay: 35ms;  }
.incident-card:nth-child(3)   { animation-delay: 70ms;  }
.incident-card:nth-child(4)   { animation-delay: 105ms; }
.incident-card:nth-child(5)   { animation-delay: 140ms; }
.incident-card:nth-child(n+6) { animation-delay: 170ms; }

/* ── Entrada dos cards de stock (stagger) ───────────────── */
.stock-card {
  animation: fadeInUp 0.2s ease both;
}
.stock-card:nth-child(2)   { animation-delay: 35ms;  }
.stock-card:nth-child(3)   { animation-delay: 70ms;  }
.stock-card:nth-child(4)   { animation-delay: 105ms; }
.stock-card:nth-child(5)   { animation-delay: 140ms; }
.stock-card:nth-child(n+6) { animation-delay: 170ms; }

/* ── Entrada dos KPI cards do dashboard (stagger) ───────── */
.dash-kpi {
  animation: fadeInUp 0.22s ease both;
}
.dash-kpi:nth-child(2) { animation-delay: 50ms;  }
.dash-kpi:nth-child(3) { animation-delay: 100ms; }
.dash-kpi:nth-child(4) { animation-delay: 150ms; }
.dash-kpi:nth-child(5) { animation-delay: 200ms; }

/* ── Botão: press feedback já existe (scale 0.97) ─────────
   Reforçamos o botão primário com glow momentâneo */
.btn-primary:active {
  box-shadow: 0 0 0 3px rgba(255,102,0,0.25), 0 2px 8px rgba(255,102,0,0.3);
}

/* ── Animação das barras: transição já existe (0.5s ease) ─
   Garantimos que a transição seja suave */
.dash-bar-fill {
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════════════════
   PAINT REWORK TRACKING
════════════════════════════════════════════════════════════ */

/* ── Botão de etiqueta no detalhe ───────────────────────── */
.btn-paint-label {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.30);
  color: var(--amber-500);
}
.btn-paint-label:hover {
  background: rgba(245,158,11,0.18);
}
.btn-paint-label:active {
  background: rgba(245,158,11,0.25);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.20);
}

/* ── Modal da etiqueta ──────────────────────────────────── */
.paint-label-modal { max-width: 360px; }

.paint-label-preview-wrap {
  background: #EFEFEF;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

/* ── Layout interno da etiqueta (prévia + impressão) ────── */
.paint-label-print-area {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #CCC;
  border-radius: 6px;
  padding: 8px;
  width: 100%;
  max-width: 260px;
  min-height: 84px;
}

.label-qr-col { flex-shrink: 0; }
/* aplica a canvas E img — ambos usados para QR */
.label-qr-img {
  width: 54px;
  height: 54px;
  display: block;
  image-rendering: pixelated; /* evita blur ao redimensionar o canvas */
}

.label-text-col {
  flex: 1;
  min-width: 0;
}

.label-car-num {
  font-size: 17px;
  font-weight: 900;
  color: #000000;
  line-height: 1;
  font-family: var(--font-sans, sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-part-name {
  font-size: 9px;
  font-weight: 600;
  color: #333333;
  line-height: 1.3;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.label-paint-badge {
  display: inline-block;
  background: #F59E0B;
  color: #000000;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 5px;
}

.label-date {
  font-size: 8px;
  color: #666666;
  margin-top: 3px;
}

/* ── Banner de retorno de pintura ───────────────────────── */
.paint-return-banner {
  position: fixed;
  top: calc(var(--header-h, 56px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber-500);
  color: #000000;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.55);
  z-index: 400;
  max-width: calc(100vw - 24px);
  animation: slideDown 0.25s ease;
  font-family: var(--font-sans, sans-serif);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);     }
}

.paint-return-banner-info { flex: 1; min-width: 0; }
.paint-return-banner-title {
  font-size: 13px;
  font-weight: 700;
}
.paint-return-banner-name  {
  font-size: 11px;
  margin-top: 2px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paint-return-btn {
  padding: 8px 12px;
  background: #000000;
  color: var(--amber-500);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-sans, sans-serif);
  flex-shrink: 0;
}

.paint-return-close {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 0 3px;
  opacity: 0.5;
  color: #000000;
  flex-shrink: 0;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   RELATÓRIO PINTURA
   ══════════════════════════════════════════════════════════ */
.pr-wrap {
  padding: 12px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Totalizadores ───────────────────────────────────────── */
.pr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pr-stat-card {
  background: var(--bg-card, #0D1E35);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.pr-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink-100, rgba(255,255,255,0.88));
  line-height: 1.1;
}
.pr-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-400, rgba(255,255,255,0.3));
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 3px;
}
.pr-stat-paint   .pr-stat-value { color: #8B5CF6; }
.pr-stat-pending .pr-stat-value { color: var(--amber-500, #F59E0B); }

/* ── Toolbar (chips + botão export) ─────────────────────── */
.pr-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pr-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pr-export-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Tabela ──────────────────────────────────────────────── */
.pr-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  background: var(--bg-card, #0D1E35);
}
.pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.pr-th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-400, rgba(255,255,255,0.3));
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  white-space: nowrap;
}
.pr-td {
  padding: 10px 12px;
  color: var(--ink-100, rgba(255,255,255,0.88));
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.pr-row { cursor: pointer; transition: background 0.15s; }
.pr-row:hover { background: rgba(255,255,255,0.04); }
.pr-row:last-child td { border-bottom: none; }

.pr-num    { width: 32px; color: var(--ink-400, rgba(255,255,255,0.3)); text-align: center; }
.pr-car    { font-family: var(--font-mono); font-size: 11px; color: var(--blue-300, #6B9BF0); }
.pr-name   { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pr-partno { font-family: var(--font-mono); font-size: 11px; color: var(--ink-300, rgba(255,255,255,0.45)); }
.pr-qty    { text-align: center; font-weight: 700; }
.pr-date   { font-size: 11px; color: var(--ink-300, rgba(255,255,255,0.45)); }

.pr-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-400, rgba(255,255,255,0.3));
  font-size: 13px;
}
.pr-hint {
  font-size: 11px;
  color: var(--ink-400, rgba(255,255,255,0.3));
  text-align: center;
  margin: 0;
}

/* ── Badge pintura — "Na Pintura" ──────────────────────── */
.badge-paint-sent {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
  border-color: rgba(139, 92, 246, 0.3);
}

/* ── Botão scan pintura ──────────────────────────────────── */
.btn-paint-scan {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #FFFFFF;
  border-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-paint-scan:active { opacity: 0.85; }

/* ── Botão admin bypass (sem QR) ─────────────────────────── */
.btn-admin-override {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-500, #F59E0B);
  border-color: rgba(245, 158, 11, 0.3);
  font-size: 11px;
  padding: 6px 10px;
}
.btn-admin-override:active { opacity: 0.8; }

/* ── Overlay de confirmação de pintura ───────────────────── */
.paint-action-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.paint-action-confirm-box {
  background: var(--bg-card, #0D1E35);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: scaleIn 0.2s ease;
}
@keyframes scaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.paint-action-confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-100, rgba(255,255,255,0.88));
  margin-bottom: 6px;
}
.paint-action-confirm-subtitle {
  font-size: 13px;
  color: var(--ink-300, rgba(255,255,255,0.45));
  margin-bottom: 20px;
  line-height: 1.4;
}
.paint-action-confirm-btns {
  display: flex;
  gap: 10px;
}
.paint-action-confirm-btns .btn { flex: 1; justify-content: center; }

/* ── Overlay de confirmação genérico ─────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .18s ease;
}
.confirm-box {
  background: var(--bg-card, #0D1E35);
  border: 1.5px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  animation: scaleIn .18s ease;
}
.confirm-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
}
.confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-100, rgba(255,255,255,0.88));
  margin-bottom: 8px;
}
.confirm-subtitle {
  font-size: 13px;
  color: var(--ink-300, rgba(255,255,255,0.45));
  line-height: 1.5;
  margin-bottom: 20px;
}
.confirm-subtitle em {
  font-style: normal;
  color: var(--ink-200, rgba(255,255,255,0.65));
  font-weight: 500;
}
.confirm-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.confirm-btn-main {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 14px;
}
.confirm-btn-sec {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 13px;
  color: var(--ink-300, rgba(255,255,255,0.4));
  background: transparent;
  border-color: transparent;
}
.confirm-btn-sec:hover { color: var(--ink-200); }

/* ── Área de impressão — só activa em @media print ──────── */
#paintPrintArea { display: none; }

/* ════════════════════════════════════════════════════════════
   REFINAMENTO VISUAL v2
   ─────────────────────────────────────────────────────────
   Melhorias estéticas aplicadas globalmente: timeline,
   glassmorphism, stepper, badges, cards, botões, chips
════════════════════════════════════════════════════════════ */

/* ── 1. History timeline — linha vertical de ligação ──────── */
.history-entry { position: relative; }

.history-entry:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;          /* centro do dot de 10px (5px − 1px da linha) */
  top: 22px;          /* padding-top(9) + margin-top(3) + dot-height(10) */
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.09) 0%,
    rgba(255,255,255,0.02) 100%
  );
  border-radius: 1px;
  pointer-events: none;
}

/* ── 2. Header & Bottom nav — glassmorphism ───────────────── */
.app-header {
  background: rgba(12,12,12,0.90) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,102,0,0.18) !important;
}

.bottom-nav {
  background: rgba(12,12,12,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top-color: rgba(255,255,255,0.07) !important;
}

/* ── 3. Stepper — pulse no step atual + label mais legível ── */
@keyframes stepperPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,102,0,0.22); }
  50%       { box-shadow: 0 0 0 8px rgba(255,102,0,0.06); }
}
.stepper-step.step-current .stepper-dot {
  animation: stepperPulse 2.2s ease-in-out infinite;
}
.stepper-label { font-size: 9.5px; }

/* ── 4. Badges — tracking e padding ligeiramente refinados ── */
.badge {
  padding: 3px 9px;
  letter-spacing: 0.04em;
}

/* ── 5. Stat cards — highlight sutil no topo ──────────────── */
.stat-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── 6. Detail header — glow lateral + border mais forte ──── */
.detail-header {
  border-left-width: 4px;
  box-shadow: -3px 0 20px rgba(255,102,0,0.10), var(--shadow-sm);
}

/* ── 7. Form cards — profundidade com gradiente subtil ───── */
.form-card {
  background: linear-gradient(180deg, #1A1A1A 0%, #151515 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── 8. Chips activos — semi-transparente tintado ─────────── */
.chip.active {
  background: rgba(255,102,0,0.16);
  color: var(--blue-300);
  border-color: rgba(255,102,0,0.48);
  box-shadow: inset 0 0 0 1px rgba(255,102,0,0.08);
}
.chip:hover:not(.active) {
  color: var(--ink-200);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

/* ── 9. Botões — hover com sombra + transição suave ─────────  */
.btn {
  transition: background 0.15s, border-color 0.15s, box-shadow 0.18s, transform 0.1s, color 0.15s;
}
.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 22px rgba(255,102,0,0.52);
}

/* ── 10. Search bar — anel de foco mais suave ─────────────── */
.search-bar:focus-within {
  border-color: rgba(255,102,0,0.65);
  box-shadow: 0 0 0 2px rgba(255,102,0,0.10);
}

/* ── 11. Modal overlay — blur de fundo ────────────────────── */
.modal-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── 12. Dash KPI & card — highlight no topo ──────────────── */
.dash-kpi {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.dash-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── 13. Incident card press — sombra interna ─────────────── */
.incident-card:active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── 14. Sub-tab activo — glow subtil ─────────────────────── */
.sub-tab.active {
  color: #FF6600;
  border-bottom-color: #FF6600;
  text-shadow: 0 0 16px rgba(255,102,0,0.35);
}

/* ── 15. Nav QR — pulse leve no idle ──────────────────────── */
@keyframes navQrGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(255,102,0,0.5), 0 0 0 1px rgba(255,133,51,0.3); }
  50%       { box-shadow: 0 6px 24px rgba(255,102,0,0.7), 0 0 0 3px rgba(255,133,51,0.15); }
}
.nav-qr {
  animation: navQrGlow 3s ease-in-out infinite !important;
}

/* ── Botão etiquetas em lote no relatório de pintura ─────── */
.pr-label-btn { white-space: nowrap; }

/* ── Modal impressão em lote ─────────────────────────────── */
.batch-label-modal { max-width: 420px; }

.batch-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.batch-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink-300);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
  line-height: 1.2;
}
.batch-mode-btn.active {
  background: rgba(255,102,0,0.12);
  border-color: var(--blue-500);
  color: var(--blue-400);
}
.batch-mode-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
}
.batch-mode-hint {
  font-size: 11px;
  color: var(--ink-300);
  background: var(--bg-input);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.batch-label-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.batch-label-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-200);
  cursor: pointer;
}
.batch-label-count {
  font-size: 11px;
  color: var(--ink-300);
}

.batch-label-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.batch-label-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.batch-label-item:hover { background: var(--bg-hover); }
.batch-label-item input[type="checkbox"] { flex-shrink: 0; accent-color: var(--blue-500); }
.batch-label-item-info { flex: 1; min-width: 0; }
.batch-label-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-label-item-meta {
  font-size: 11px;
  color: var(--ink-300);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-label-actions {
  display: flex;
  gap: 8px;
}
.batch-label-print-btn { flex: 1; }

/* ── Print — etiqueta única e impressão em lote ──────────── */
@media print {
  /* Esconde tudo excepto as áreas de impressão activas */
  body > *:not(#paintPrintArea):not(#batchLabelPrintArea) { display: none !important; }

  /* ── Etiqueta única (modal individual) ────────────────── */
  #paintPrintArea {
    display: flex !important;
    position: fixed !important;
    inset: 0;
    background: #FFFFFF;
    justify-content: center;
    align-items: center;
  }

  /* ── Lote: área visível ───────────────────────────────── */
  #batchLabelPrintArea { display: block !important; background: #FFF; }

  /* ── Lote: modo térmico ───────────────────────────────── */
  #batchLabelPrintArea[data-mode="thermal"] .batch-thermal-label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 58mm;
    height: 40mm;
  }
  #batchLabelPrintArea[data-mode="thermal"] .batch-page-break {
    page-break-after: always;
  }

  /* ── Lote: modo A4 ────────────────────────────────────── */
  #batchLabelPrintArea[data-mode="a4"] .batch-a4-page {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 4mm;
    width: 100%;
  }
  #batchLabelPrintArea[data-mode="a4"] .batch-page-break {
    page-break-after: always;
  }
  #batchLabelPrintArea[data-mode="a4"] .batch-a4-cell {
    border: 0.3mm dashed #AAAAAA;
    border-radius: 2mm;
    padding: 3mm;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46mm;
  }

  /* ── Etiqueta dentro de qualquer área de impressão ─────── */
  .paint-label-print-area {
    width: 100%;
    max-width: none;
    height: auto;
    padding: 2mm;
    gap: 3mm;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 0;
    background: #FFFFFF;
  }
  /* Térmico: tamanho fixo */
  #batchLabelPrintArea[data-mode="thermal"] .paint-label-print-area,
  #paintPrintArea .paint-label-print-area {
    width: 58mm;
    height: 40mm;
  }

  .label-qr-img {
    width: 22mm !important;
    height: 22mm !important;
    flex-shrink: 0;
  }
  /* A4: QR maior */
  #batchLabelPrintArea[data-mode="a4"] .label-qr-img {
    width: 30mm !important;
    height: 30mm !important;
  }

  .label-car-num    { font-size: 11pt !important; color: #000 !important; font-weight: 800 !important; }
  .label-part-name  { font-size: 6pt  !important; color: #333 !important; }
  .label-paint-badge{ font-size: 6pt  !important; background: #F59E0B !important; color: #000 !important; }
  .label-date       { font-size: 6pt  !important; color: #555 !important; }

  /* A4: texto um pouco maior */
  #batchLabelPrintArea[data-mode="a4"] .label-car-num   { font-size: 14pt !important; }
  #batchLabelPrintArea[data-mode="a4"] .label-part-name { font-size: 7pt  !important; }
  #batchLabelPrintArea[data-mode="a4"] .label-date      { font-size: 7pt  !important; }
}

/* ── Selo "Sem reembolso" — pintura enviada sem CAR gerado ──── */
.incident-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.refund-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(239,68,68,0.14);
  color: #F87171;
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.incident-card.card-needs-refund {
  border-left: 3px solid #EF4444;
}

/* ── Botão "Ler QR" no cabeçalho do cartão de identificação ──── */
.form-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.form-card-title-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.btn-scan-form {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,102,0,0.12);
  color: var(--blue-400);
  border: 1px solid rgba(255,102,0,0.35);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-scan-form:hover  { background: rgba(255,102,0,0.20); }
.btn-scan-form:active { background: rgba(255,102,0,0.28); }

/* ── Nº CAR no card da lista ─────────────────────────────────── */
.card-car-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-400);
  letter-spacing: 0.03em;
}

/* ── Badge Nº CAR no header do detalhe ──────────────────────── */
.detail-car-badge {
  display: inline-block;
  background: rgba(255,102,0,0.15);
  color: var(--blue-400);
  border: 1px solid rgba(255,102,0,0.3);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ── Banner de rascunho guardado ─────────────────────────────── */
.draft-banner {
  position: fixed;
  bottom: calc(var(--bottom-h, 64px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1.5px solid var(--blue-500);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 150;
  max-width: calc(100vw - 32px);
  animation: slideUp 0.25s ease;
}
.draft-banner-info { flex: 1; min-width: 0; }
.draft-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-100);
}
.draft-banner-meta {
  font-size: 11px;
  color: var(--ink-300);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.draft-banner-btn  { white-space: nowrap; }
.draft-banner-dismiss {
  padding: 7px 10px;
  font-size: 12px;
}

/* ── Banner de conectividade offline ─────────────────────────── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: var(--amber-500, #F59E0B);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: slideDown 0.3s ease;
}
.offline-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  opacity: 0.6;
  flex-shrink: 0;
  animation: pulse 1.2s ease-in-out infinite;
}
.offline-banner-hide {
  animation: slideUp 0.4s ease forwards;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ── Filtro por modelo de moto ───────────────────────────────── */
.model-filter-wrap {
  padding: 0 16px 8px;
}
.model-filter-select {
  width: 100%;
  background: var(--bg-input, #1F1F1F);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 10px);
  color: var(--ink-100, rgba(255,255,255,0.88));
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color 0.15s;
}
.model-filter-select:focus {
  outline: none;
  border-color: var(--blue-500, #FF6600);
}
.model-filter-select option {
  background: var(--bg-card, #1A1A1A);
  color: var(--ink-100, rgba(255,255,255,0.88));
}

/* ── Modal sessão expirada ───────────────────────────────────── */
.session-expired-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

/* ── Classe utilitária para lista de utilizadores ────────────── */
.user-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.user-list-avatar {
  width: 36px;
  height: 36px;
  background: var(--blue-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-list-info {
  flex: 1;
  min-width: 0;
}
.user-list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-list-email {
  font-size: 11px;
  color: var(--ink-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-list-role {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.user-list-role.admin {
  background: rgba(255,179,0,0.15);
  color: #FFB300;
}
.user-list-role.user {
  background: var(--blue-50);
  color: var(--blue-300);
}

/* ── Gestão de utilizadores — ações (admin) ───────────────── */
.user-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  width: 100%;
}
.user-role-select {
  background: var(--bg-card, #1e293b);
  color: var(--ink-100, #e2e8f0);
  border: 1px solid var(--border, #334155);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}
.btn-mini {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}
.btn-mini:active { background: rgba(255,255,255,0.14); }
.btn-mini-danger { color: #fca5a5; border-color: rgba(239,68,68,0.35); }

/* ── Filtros por intervalo de datas (relatórios) ───────────── */
.date-range-row { display: flex; gap: 10px; }
.date-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pr-daterow { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pr-daterow .field-input { flex: 1; min-width: 120px; }

/* ── Dashboard: filtros + rosca ────────────────────────────── */
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-filters .field-input { flex: 1; min-width: 130px; }
.dash-daterow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-daterow .field-input { flex: 1; min-width: 120px; }
.dash-doughnut-wrap { position: relative; height: 200px; }
.dash-kpi-split { font-size: 10px; color: var(--ink-300); margin-top: 3px; white-space: nowrap; }
.dash-st-click { cursor: pointer; border-radius: 8px; transition: background .12s; }
.dash-st-click:hover { background: rgba(255,255,255,0.05); }
.dash-st-click:active { background: rgba(255,255,255,0.09); }

/* Drill-down — lista de incidentes por estado */
.drill-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.drill-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; background: var(--bg-card, #1e293b); border-radius: 8px; cursor: pointer; }
.drill-row:active { background: rgba(255,255,255,0.06); }
.drill-row-main { display: flex; flex-direction: column; min-width: 0; }
.drill-row-name { font-size: 13px; font-weight: 600; color: var(--ink-100, #e2e8f0); }
.drill-row-meta { font-size: 11px; color: var(--ink-300, rgba(255,255,255,0.45)); }
.drill-row-date { font-size: 11px; color: var(--ink-300, rgba(255,255,255,0.45)); white-space: nowrap; }

/* Confirmar Envio em Lote — chips dos selecionados */
.batch-selected-panel { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; max-height: 100px; overflow-y: auto; }
.batch-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.35); border-radius: 14px; padding: 3px 6px 3px 10px; font-size: 11px; font-family: var(--font-mono, monospace); }
.batch-chip button { background: rgba(255,255,255,0.14); border: none; color: #fff; border-radius: 50%; width: 16px; height: 16px; line-height: 1; font-size: 10px; cursor: pointer; padding: 0; }

/* ── Viewer (só leitura) — esconde entradas de escrita ────── */
body.role-viewer #saveBtn,
body.role-viewer #dnt-form,
body.role-viewer [data-page="form"] { display: none !important; }
.user-list-empty {
  font-size: 13px;
  color: var(--ink-300);
  text-align: center;
  padding: 16px;
}
.user-list-error {
  font-size: 13px;
  color: var(--red-500);
  padding: 10px;
}
