/* ============================================================
   SISTEMA DE SEPARAÇÃO DE RECOMPRA - D. CARVALHO / JOHN DEERE
   Design System - Mobile-First para Coletor Zebra
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

.admin-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-bottom: 24px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(250, 204, 21, 0.28) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(6, 33, 22, 0.97), rgba(17, 24, 39, 0.96) 58%, rgba(54, 124, 43, 0.9)) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16) !important;
  overflow: hidden !important;
  position: relative !important;
}

.admin-header::before {
  content: "";
  position: absolute;
  inset: -44px -92px auto auto;
  width: 260px;
  height: 170px;
  background: repeating-linear-gradient(135deg, rgba(250, 204, 21, 0.28) 0 12px, transparent 12px 26px);
  transform: rotate(-7deg);
  opacity: 0.85;
  pointer-events: none;
}

.admin-header::after {
  content: "RECOMPER";
  position: absolute;
  right: 20px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.admin-header > * {
  position: relative;
  z-index: 1;
}

.admin-header .header-actions,
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-header .admin-page-title {
  margin: 0 0 4px;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

.admin-header .admin-page-subtitle {
  color: #bbf7d0 !important;
}

.admin-header .admin-page-subtitle::before {
  content: "Centro de controle";
  display: block;
  margin-bottom: 4px;
  color: #facc15;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.admin-header .btn-admin {
  background: #ffffff !important;
  border-color: #d9e2d2 !important;
  color: #12351f !important;
}

.admin-header .btn-admin.primary {
  background: var(--jd-yellow) !important;
  color: #12351f !important;
  border-color: #facc15 !important;
}

.btn-admin {
  padding: 9px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-family: inherit;
}

.btn-admin:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--jd-green);
  transform: translateY(-1px);
}

.btn-admin.primary {
  background: var(--jd-green);
  color: white;
  border-color: var(--jd-green-dark);
}

.btn-admin.warning {
  background: #f59e0b;
  color: #111827;
  border-color: #d97706;
}

.btn-admin.danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.btn-admin.amber,
.admin-header .btn-admin.warning,
.admin-header .btn-admin.amber {
  background: #f59e0b !important;
  color: #111827 !important;
  border-color: #d97706 !important;
}

.admin-header .btn-admin.danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.btn-admin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 640px) {
  .admin-header {
    justify-content: center;
    padding: 16px;
  }

  .admin-header > div:first-child {
    width: 100%;
    text-align: center;
  }

  .admin-header .header-actions,
  .header-actions {
    justify-content: stretch;
    width: 100%;
  }
}

.admin-page-title {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.admin-page-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

/* ── CSS Variables ── */
:root {
  /* John Deere Colors */
  --jd-green: #367C2B;
  --jd-green-dark: #2a6122;
  --jd-green-light: #4a9e3b;
  --jd-yellow: #FFDE00;
  --jd-yellow-dark: #e6c800;
  --jd-yellow-light: #fff34d;

  /* Background & Surface */
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d28;
  --bg-card: #222637;
  --bg-card-hover: #2a2e42;
  --bg-input: #181b26;

  /* Text */
  --text-primary: #f0f2f5;
  --text-secondary: #9ca3b4;
  --text-muted: #6b7280;
  --text-on-green: #ffffff;
  --text-on-yellow: #1a1a1a;

  /* Status Colors */
  --status-eligible: #22c55e;
  --status-eligible-bg: rgba(34, 197, 94, 0.12);
  --status-not-eligible: #ef4444;
  --status-not-eligible-bg: rgba(239, 68, 68, 0.12);
  --status-pending: #6b7280;
  --status-pending-bg: rgba(107, 114, 128, 0.12);
  --status-partial: #f59e0b;
  --status-partial-bg: rgba(245, 158, 11, 0.12);
  --status-skipped: #8b5cf6;
  --status-skipped-bg: rgba(139, 92, 246, 0.12);

  /* Borders & Shadows */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-active: rgba(54, 124, 43, 0.5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow-green: 0 0 20px rgba(54, 124, 43, 0.3);
  --shadow-glow-yellow: 0 0 20px rgba(255, 222, 0, 0.2);

  /* Highlight Variables */
  --highlight-text: var(--jd-yellow);
  --highlight-bg: rgba(255, 222, 0, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-green: #ffffff;
  --text-on-yellow: #1a1a1a;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-active: rgba(54, 124, 43, 0.4);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --highlight-text: #0f172a;
  --highlight-bg: rgba(0, 0, 0, 0.04);
  
  /* Glassmorphism Light */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

[data-theme="dark"] {
  --glass-bg: rgba(26, 29, 40, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* ── Modern Dashboard Utilities ── */
.glass-effect {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.premium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-active);
}


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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(54, 124, 43, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 222, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

/* ── App Container ── */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Screen Transitions ── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  animation: screenFadeIn 0.35s ease;
}

.screen.active {
  display: flex;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header Bar ── */
.header-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-bar .back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition-fast);
}

.header-bar .back-btn:active {
  background: var(--bg-card);
  transform: scale(0.95);
}

.header-bar .header-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.header-bar .header-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ── SCREEN: Import ── */
.import-screen {
  padding: var(--space-lg);
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  text-align: center;
}

.import-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.import-logo .logo-icon {
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: logoPulse 3s ease-in-out infinite;
  overflow: hidden;
  padding: 8px;
}

.import-logo .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1.1);
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  50%       { box-shadow: 0 8px 32px rgba(0,0,0,0.28); }
}

.import-logo h1 {
  font-size: 22px;
  background: linear-gradient(135deg, var(--jd-green-light), var(--jd-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .import-logo h1 {
  background: linear-gradient(135deg, var(--jd-green-dark), #000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.import-logo p {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 280px;
}

.import-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 350px;
}

.import-nav-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}

.import-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.import-nav-btn:active {
  border-color: var(--jd-green);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.user-selection-box {
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
}

.user-selection-box p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.user-dropdown {
  width: 100%;
  padding: 15px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 16px;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.user-dropdown:focus {
  border-color: var(--jd-yellow);
}

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.upload-zone:active, .upload-zone.dragover {
  border-color: var(--jd-green);
  background: rgba(54, 124, 43, 0.08);
}

.upload-zone .upload-icon {
  font-size: 32px;
  opacity: 0.7;
}

.upload-zone .upload-text {
  font-size: 14px;
  font-weight: 500;
}

.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-zone.loaded {
  border-color: var(--status-eligible);
  background: var(--status-eligible-bg);
}

.upload-zone.loaded .upload-icon {
  color: var(--status-eligible);
  opacity: 1;
}

.upload-pdf-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-align: left;
}

.upload-pdf-zone:active, .upload-pdf-zone.dragover {
  border-color: var(--jd-yellow);
  background: rgba(255, 222, 0, 0.05);
}

.upload-pdf-zone.loaded {
  border-color: var(--status-eligible);
  background: var(--status-eligible-bg);
}

.upload-pdf-zone .pdf-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.upload-pdf-zone .pdf-info {
  flex: 1;
}

.upload-pdf-zone .pdf-info .pdf-label {
  font-size: 13px;
  font-weight: 500;
}

.upload-pdf-zone .pdf-info .pdf-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.import-history {
  width: 100%;
  max-width: 350px;
}

.import-history h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: var(--space-sm);
}

.history-item:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}

.history-item .history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item .history-name {
  font-size: 13px;
  font-weight: 500;
}

.history-item .history-date {
  font-size: 11px;
  color: var(--text-muted);
}

.history-item .history-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--jd-green-light);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 48px;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--jd-green), var(--jd-green-dark));
  color: var(--text-on-green);
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:active:not(:disabled) {
  background: linear-gradient(135deg, var(--jd-green-dark), #1f4d17);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:active {
  background: var(--bg-card-hover);
}

.btn-warning {
  background: linear-gradient(135deg, var(--jd-yellow), var(--jd-yellow-dark));
  color: var(--text-on-yellow);
  box-shadow: var(--shadow-glow-yellow);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 18px;
}

/* ── SCREEN: Parts List ── */
.parts-screen {
  padding-bottom: 80px; /* space for FABs */
}

.progress-bar-container {
  padding: var(--space-md);
  background: var(--bg-secondary);
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.progress-stats .progress-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-stats .progress-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--jd-green-light);
}

.progress-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jd-green), var(--jd-green-light));
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.stats-row {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-badge.eligible {
  background: var(--status-eligible-bg);
  color: var(--status-eligible);
}

.stat-badge.not-eligible {
  background: var(--status-not-eligible-bg);
  color: var(--status-not-eligible);
}

.stat-badge.pending {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}

.stat-badge.partial {
  background: var(--status-partial-bg);
  color: var(--status-partial);
}

/* Scanner input bar */
.scanner-bar {
  padding: var(--space-md);
  position: sticky;
  top: 57px;
  z-index: 90;
  background: var(--bg-primary);
}

.scanner-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.scanner-input-wrapper .scan-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.scanner-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: var(--transition-fast);
}

.scanner-input:focus {
  border-color: var(--jd-green);
  box-shadow: 0 0 0 3px rgba(54, 124, 43, 0.15);
}

.scanner-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: var(--space-xs);
  padding: 0 var(--space-md) var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tab.active {
  background: rgba(54, 124, 43, 0.15);
  color: var(--jd-green-light);
  border-color: rgba(54, 124, 43, 0.3);
}

.filter-tab:active {
  transform: scale(0.95);
}

/* Parts list */
.parts-list {
  padding: 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.part-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.part-card:active {
  background: var(--bg-card-hover);
  transform: scale(0.99);
}

.part-card.highlighted {
  border-color: var(--jd-yellow);
  box-shadow: 0 0 12px rgba(255, 222, 0, 0.15);
  animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
  0% { box-shadow: 0 0 20px rgba(255, 222, 0, 0.4); }
  100% { box-shadow: 0 0 12px rgba(255, 222, 0, 0.15); }
}

.part-card .part-status-indicator {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.part-card .part-status-indicator.pending { background: var(--status-pending); }
.part-card .part-status-indicator.eligible { background: var(--status-eligible); }
.part-card .part-status-indicator.aprovado { background: var(--status-eligible); }
.part-card .part-status-indicator.not-eligible { background: var(--status-not-eligible); }
.part-card .part-status-indicator.reprovado { background: var(--status-not-eligible); }
.part-card .part-status-indicator.partial { background: var(--status-partial); }
.part-card .part-status-indicator.skipped { background: var(--status-skipped); }

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

.part-card .part-item-code {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--highlight-text);
}

.part-card .part-description {
  font-size: 15px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.part-card .part-location {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

.part-card .part-location span {
  color: var(--text-secondary);
  font-weight: 500;
}

.part-card .part-qty {
  text-align: right;
  flex-shrink: 0;
}

.part-card .part-qty .qty-number {
  font-size: 28px;
  font-weight: 700;
}

.part-card .part-qty .qty-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Location group header */
.location-group-header {
  padding: var(--space-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.location-group-header .location-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--highlight-text);
  background: var(--highlight-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-group-header .location-divider {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* FABs */
.fab-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 200;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-fast);
}

.fab:active {
  transform: scale(0.9);
}

.fab-pdf {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.fab-export {
  background: linear-gradient(135deg, var(--jd-green), var(--jd-green-dark));
  color: white;
}

/* ── Responsividade para Telas Pequenas (Coletores) ── */
@media (max-width: 480px) {
  .header-bar {
    padding: var(--space-sm) var(--space-md);
  }
  .scanner-bar {
    padding: var(--space-sm) var(--space-sm);
    top: 50px;
  }
  .parts-list {
    padding: 0 var(--space-sm);
  }
  .part-card {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }
  .part-card .part-item-code {
    font-size: 18px;
  }
  .part-card .part-description {
    font-size: 13px;
  }
  .part-card .part-location {
    font-size: 12px;
  }
  .part-card .part-qty .qty-number {
    font-size: 22px;
  }
  .btn {
    padding: 10px var(--space-md);
    font-size: 14px;
    min-height: 44px;
  }
  .fab {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  .fab-container {
    bottom: var(--space-md);
    right: var(--space-md);
  }
  .summary-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }
  .sep-content {
    padding: var(--space-sm);
  }
  .sep-part-info {
    padding: var(--space-md);
  }
  .input-group label {
    font-size: 13px;
  }
  .scanner-input {
    padding: 10px 12px 10px 40px;
  }
  .import-logo h1 {
    font-size: 18px;
  }
  .user-selection-box {
    padding: 16px;
  }
  .import-screen {
    position: relative;
  }
}

/* ── SCREEN: Separation ── */
.separation-screen .sep-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sep-part-info {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-color);
}

.sep-part-info .sep-item-code {
  font-size: 30px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--highlight-text);
  margin-bottom: var(--space-xs);
  letter-spacing: 1px;
}

.sep-part-info .sep-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.sep-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-color);
}

.sep-detail-row .detail-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sep-detail-row .detail-value {
  font-size: 21px;
  font-weight: 700;
}

.sep-detail-row .detail-value.qty-highlight {
  font-size: 24px;
  font-weight: 800;
  color: var(--jd-green-light);
}

/* Input fields for separation */
.sep-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.input-group label .label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.input-group label .label-dot.eligible { background: var(--status-eligible); }
.input-group label .label-dot.not-eligible { background: var(--status-not-eligible); }

.input-group input[type="number"],
.input-group textarea {
  padding: 14px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: var(--transition-fast);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.input-group input[type="number"]:focus,
.input-group textarea:focus {
  border-color: var(--jd-green);
  box-shadow: 0 0 0 3px rgba(54, 124, 43, 0.15);
}

.input-group textarea {
  font-size: 14px;
  font-weight: 400;
  resize: vertical;
  min-height: 60px;
}

.input-group .input-error {
  font-size: 12px;
  color: var(--status-not-eligible);
  display: none;
}

.input-group .input-error.visible {
  display: block;
}

/* Motivo select */
.motivo-select {
  width: 100%;
  padding: 14px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.motivo-select:focus {
  border-color: var(--status-not-eligible);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.motivo-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Info boxes */
.info-box {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-top: var(--space-sm);
}

.info-box.info-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--status-partial);
}

/* Separation screen footer link */
.sep-footer-link {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.sep-footer-link a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.sep-footer-link a:hover {
  color: var(--text-secondary);
  background: var(--bg-card);
}

/* Quick quantity buttons */
.quick-qty-btns {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.quick-qty-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-qty-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.95);
}

.quick-qty-btn.all-eligible {
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--status-eligible);
}

.quick-qty-btn.all-not-eligible {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--status-not-eligible);
}

/* Separation action buttons */
.sep-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: auto;
  padding-bottom: var(--space-md);
}

.sep-actions .btn {
  flex: 1;
}

/* Navigation between parts */
.sep-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.sep-nav .nav-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sep-nav .nav-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.97);
}

.sep-nav .nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sep-nav .nav-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── SCREEN: Summary ── */
.summary-screen .summary-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid var(--border-color);
}

.summary-card .summary-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.summary-card .summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: var(--space-xs);
}

.summary-card.total .summary-number { color: var(--text-primary); }
.summary-card.eligible .summary-number { color: var(--status-eligible); }
.summary-card.not-eligible .summary-number { color: var(--status-not-eligible); }
.summary-card.pending .summary-number { color: var(--status-pending); }

.summary-table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.summary-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.summary-table-header h3 {
  font-size: 14px;
}

.summary-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.summary-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.summary-table th {
  text-align: left;
  padding: 10px var(--space-md);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.summary-table td {
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-export-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Auto Split Modal (Admin) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
  animation: dialogFadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  box-shadow: var(--shadow-lg);
  margin: auto;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 16px;
  margin: 0;
}

.modal-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  top: 24px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast.success { border-color: var(--status-eligible); }
.toast.error { border-color: var(--status-not-eligible); }
.toast.warning { border-color: var(--status-partial); }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
  gap: var(--space-md);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.empty-state .empty-text {
  font-size: 14px;
}

/* ── Loading spinner ── */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--jd-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Confirmation dialog ── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.dialog-overlay.active {
  display: flex;
  animation: dialogFadeIn 0.2s ease;
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 320px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: dialogSlideIn 0.25s ease;
}

@keyframes dialogSlideIn {
  from { transform: scale(0.95) translateY(10px); }
  to { transform: scale(1) translateY(0); }
}

.dialog h3 {
  font-size: 16px;
  margin-bottom: var(--space-sm);
}

.dialog p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.dialog .dialog-actions {
  display: flex;
  gap: var(--space-sm);
}

.dialog .dialog-actions .btn {
  flex: 1;
}

/* ── Responsive adjustments ── */
@media (min-width: 600px) {
  .import-screen {
    padding: var(--space-2xl);
  }

  .parts-list {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .summary-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .sep-content {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 520px) and (max-height: 760px) {
  .screen {
    min-height: 100vh;
  }

  .import-screen {
    justify-content: flex-start;
    gap: 10px;
    padding: 10px;
  }

  .import-logo {
    gap: 6px;
  }

  .import-logo .logo-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    padding: 6px;
  }

  .import-logo h1 {
    font-size: 18px;
  }

  .import-logo p {
    font-size: 12px;
    margin: 0;
  }

  .import-actions {
    gap: 8px;
  }

  .user-selection-box {
    padding: 12px;
  }

  .upload-pdf-zone {
    margin: 8px 0 !important;
    padding: 10px;
  }

  .header-bar {
    padding: 8px 10px;
    gap: 8px;
  }

  .header-bar .back-btn {
    width: 36px;
    height: 36px;
  }

  .header-bar .header-title {
    font-size: 14px;
  }

  .stats-row {
    padding: 6px 8px 0;
  }

  .filter-tabs {
    padding: 0 8px 6px;
  }

  .scanner-bar {
    padding: 8px;
    top: 49px;
  }

  .scanner-input {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 14px;
  }

  .separation-screen .sep-content,
  .summary-screen .summary-content {
    padding: 8px;
    gap: 8px;
  }

  .sep-part-info {
    padding: 10px;
    border-radius: 8px;
  }

  .sep-part-info .sep-item-code {
    font-size: 24px;
    margin-bottom: 2px;
    letter-spacing: 0;
  }

  .sep-part-info .sep-description {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .sep-detail-row {
    padding: 5px 0;
  }

  .sep-detail-row .detail-label {
    font-size: 10px;
    letter-spacing: 0;
  }

  .sep-detail-row .detail-value {
    font-size: 18px;
  }

  .sep-detail-row .detail-value.qty-highlight {
    font-size: 20px;
  }

  .sep-inputs {
    gap: 8px;
  }

  .input-group {
    gap: 4px;
  }

  .input-group input[type="number"],
  .input-group textarea,
  .motivo-select {
    padding: 9px 10px;
    font-size: 15px;
  }

  .input-group textarea {
    min-height: 46px;
  }

  .quick-qty-btn {
    padding: 6px;
    font-size: 12px;
  }

  .info-box {
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
  }

  .sep-actions {
    gap: 8px;
    margin-top: 4px;
    padding-bottom: 4px;
  }

  .sep-nav {
    padding: 6px 8px;
  }

  .sep-footer-link {
    padding: 4px 8px;
  }

  #screen-audit .header-bar {
    flex-wrap: wrap;
  }

  #rc-audit-scan-input {
    flex-basis: 100%;
    padding: 9px !important;
  }

  .summary-cards {
    gap: 8px;
  }

  .summary-card {
    padding: 10px;
  }

  .summary-card .summary-number {
    font-size: 22px;
  }

  .summary-table th,
  .summary-table td {
    padding: 8px;
  }
}

/* Hidden file inputs */
input[type="file"].hidden-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Recomper Visual Refresh 2026
   ============================================================ */
:root {
  --app-bg-top: #edf4f2;
  --app-bg-bottom: #f8fafc;
  --surface-soft: #f6faf8;
  --surface-elevated: #ffffff;
  --surface-muted: #eef5f0;
  --brand-ink: #0f241a;
  --brand-rail: #214c2a;
  --focus-ring: rgba(54, 124, 43, 0.18);
  --shadow-card: 0 10px 28px rgba(15, 35, 26, 0.08);
  --shadow-panel: 0 18px 50px rgba(15, 35, 26, 0.11);
}

[data-theme="dark"] {
  --app-bg-top: #0e1412;
  --app-bg-bottom: #111827;
  --surface-soft: #151c1a;
  --surface-elevated: #1f2933;
  --surface-muted: #18211e;
  --brand-ink: #f8fafc;
  --brand-rail: #4a9e3b;
  --focus-ring: rgba(250, 204, 21, 0.18);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-panel: 0 20px 54px rgba(0, 0, 0, 0.34);
}

body {
  background: linear-gradient(180deg, var(--app-bg-top) 0%, var(--app-bg-bottom) 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(54, 124, 43, 0.035) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(54, 124, 43, 0.03) 0 1px, transparent 1px 100%);
  background-size: 44px 44px;
  opacity: 0.55;
}

.admin-header,
.hub-brand-art {
  border-radius: 8px !important;
  border-color: rgba(250, 204, 21, 0.32) !important;
  box-shadow: var(--shadow-panel) !important;
}

.admin-header {
  align-items: center !important;
}

.admin-header::after {
  font-size: 38px;
  right: 18px;
  bottom: 10px;
}

.admin-page-title,
.hub-brand-word {
  letter-spacing: 0 !important;
}

.hub-brand-art {
  min-height: 92px;
}

.hub-brand-mark {
  border-radius: 8px;
}

.hub-brand-stat,
.hub-filial-header {
  border-radius: 8px;
  backdrop-filter: none;
}

.hub-filial-header select,
select[data-filial-select] {
  border-radius: 8px !important;
}

.hub-greeting {
  margin-top: 4px;
  margin-bottom: 18px;
}

.module-card,
.collector-panel,
.collector-card,
.apk-row,
.hub-section,
.hub-quick-card,
.login-box,
.premium-card,
.modal-box,
.dialog,
.permission-box,
.summary-card,
.summary-table-wrapper,
.sep-part-info,
.part-card,
.history-item,
.user-selection-box,
.upload-zone,
.upload-pdf-zone {
  border-radius: 8px !important;
  border-color: var(--border-color);
  box-shadow: var(--shadow-card);
}

.module-card,
.collector-panel,
.collector-card,
.apk-row,
.login-box,
.premium-card,
.hub-section {
  background: color-mix(in srgb, var(--bg-card) 86%, var(--surface-elevated) 14%);
}

@supports not (background: color-mix(in srgb, #000 50%, #fff 50%)) {
  .module-card,
  .collector-panel,
  .collector-card,
  .apk-row,
  .login-box,
  .premium-card,
  .hub-section {
    background: var(--bg-card);
  }
}

.module-card:hover,
.collector-action:hover,
.btn-admin:hover:not(:disabled) {
  transform: translateY(-1px);
}

.hub-dashboard-shell .module-card {
  min-height: 88px;
  padding: 15px;
}

.module-card .mc-icon {
  filter: saturate(0.9);
}

.btn,
.btn-admin,
.collector-action,
.hub-logout button,
.apk-row a,
.login-box select,
.login-box input[type="password"],
.login-box input[type="text"],
.input-group input[type="number"],
.input-group textarea,
.motivo-select,
.scanner-input,
.user-dropdown {
  border-radius: 8px !important;
}

.btn-admin,
.collector-action,
.hub-logout button {
  min-height: 36px;
}

.btn-admin.primary,
.btn-primary {
  background: linear-gradient(135deg, #367c2b, #245c24);
  box-shadow: 0 8px 18px rgba(54, 124, 43, 0.18);
}

.btn-warning,
.admin-header .btn-admin.warning,
.admin-header .btn-admin.amber {
  background: linear-gradient(135deg, #ffde00, #f59e0b) !important;
  color: #152015 !important;
}

.btn-danger,
.btn-admin.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

select:focus,
input:focus,
textarea:focus,
.motivo-select:focus,
.scanner-input:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

table,
.summary-table table {
  border-radius: 8px;
  overflow: hidden;
}

.toast,
.modal-overlay,
.dialog-overlay {
  backdrop-filter: none;
}

@media (max-width: 980px) {
  .hub-brand-right {
    width: 100%;
    justify-content: stretch;
  }

  .hub-brand-meta,
  .hub-filial-header {
    flex: 1 1 280px;
  }
}
