/* ─── RESET & VARIABLES ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue:   #0064A4;
  --dark:   #1B3D6D;
  --green:  #7AB800;
  --gold:   #FFD200;
  --red:    #E53E3E;
  --orange: #ED8936;
  --purple: #805AD5;
  --bg:     #F0F2F5;
  --card:   #FFFFFF;
  --border: #E2E8F0;
  --text:   #1A202C;
  --muted:  #718096;
  --sidebar-w: 230px;
  --sidebar-collapsed: 68px;
  --header-h: 64px;
  --ease: cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* ─── LAYOUT ────────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ─── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  transition: width .3s var(--ease);
  overflow: hidden;
  position: relative;
  z-index: 10;
  box-shadow: 2px 0 8px rgba(0,0,0,.18);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Logo zone */
.sidebar-logo {
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 14px;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  overflow: hidden;
  cursor: default;
}
.logo-img {
  width: 38px; height: 38px; min-width: 38px;
  border-radius: 9px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.22);
  background: #253f6e;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.logo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.logo-text {
  overflow: hidden; white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.sidebar.collapsed .logo-text {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}
.logo-text .name { color: #fff; font-size: 15px; line-height: 1.2; display: flex; align-items: baseline; gap: 4px; }
.brand-uci    { font-weight: 800; letter-spacing: .4px; color: #fff; }
.brand-nature { font-weight: 400; color: rgba(255,255,255,.88); }
.logo-text .sub { color: rgba(255,255,255,.38); font-size: 10.5px; margin-top: 2px; letter-spacing: .3px; text-transform: uppercase; }

/* Nav */
.sidebar-nav { flex: 1; padding: 10px 0 6px; overflow-y: auto; overflow-x: hidden; }
.nav-item {
  display: flex; align-items: center;
  padding: 0 0 0 14px;
  height: 42px;
  color: rgba(255,255,255,.5);
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left;
  border-left: 3px solid transparent;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
  position: relative;
  gap: 0;
}
.nav-item:hover  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item.active { background: rgba(255,255,255,.1);  color: #fff; border-left-color: var(--green); }

/* Icon wrapper — fixed width so it stays centered when label fades */
.nav-icon {
  flex-shrink: 0;
  width: 40px;          /* fills (68px sidebar − 3px border − 14px left-pad − 11px gap offset) → centered */
  display: flex; align-items: center; justify-content: center;
  transition: width .3s var(--ease);
}
.sidebar:not(.collapsed) .nav-icon { width: 36px; }

/* Label */
.nav-label {
  font-size: 13.5px; font-weight: 500;
  opacity: 1;
  transform: translateX(0);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .nav-label {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

/* Tooltip on hover when collapsed */
.nav-tooltip {
  position: absolute;
  left: calc(var(--sidebar-collapsed) + 10px);
  top: 50%; transform: translateY(-50%) scale(.94);
  background: #1a3a68; color: #fff;
  padding: 5px 11px; border-radius: 7px;
  font-size: 12px; font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s, transform .16s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  z-index: 200;
}
.sidebar.collapsed .nav-item:hover .nav-tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Footer / collapse button */
.sidebar-footer {
  padding: 8px 0 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.collapse-btn {
  display: flex; align-items: center;
  padding: 0 0 0 14px;
  height: 38px;
  color: rgba(255,255,255,.32); background: none; border: none;
  cursor: pointer; width: 100%;
  transition: color .18s, background .18s;
  white-space: nowrap; overflow: hidden;
  gap: 0;
}
.collapse-btn:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.05); }
.collapse-icon-wrap {
  flex-shrink: 0; width: 40px;
  display: flex; align-items: center; justify-content: center;
  transition: width .3s var(--ease);
}
.sidebar:not(.collapsed) .collapse-icon-wrap { width: 36px; }
.collapse-chevron {
  transition: transform .3s var(--ease);
  display: block;
}
.sidebar.collapsed .collapse-chevron { transform: rotate(180deg); }
.collapse-label { font-size: 13px; opacity: 1; transform: translateX(0); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.sidebar.collapsed .collapse-label { opacity: 0; transform: translateX(-8px); pointer-events: none; }

/* ─── MAIN ──────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ─── HEADER ────────────────────────────────────────── */
.header {
  height: var(--header-h); background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.header-left h1 { font-size: 18px; font-weight: 700; color: var(--dark); }
.header-left p  { font-size: 12px; color: var(--muted); margin-top: 1px; }

.drive-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 8px; border: 1px solid;
  cursor: pointer; transition: all .18s;
  font-size: 13px;
}
.drive-badge.connected { background: #F0FFF4; border-color: #9AE6B4; }
.drive-badge.connected:hover { background: #C6F6D5; }
.drive-badge.disconnected { background: #F7FAFC; border-color: var(--border); }
.drive-badge.disconnected:hover { background: #EDF2F7; }
.drive-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.drive-dot.on { background: #48BB78; box-shadow: 0 0 0 3px rgba(72,187,120,.2); }
.drive-dot.off { background: var(--muted); }
.drive-email { color: #2D3748; font-weight: 500; }
.drive-status-text { color: #276749; }

/* ─── CONTENT ───────────────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 24px; }

.page { display: none; animation: pageFade .25s ease; }
.page.active { display: block; }
@keyframes pageFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.card-p { padding: 20px 22px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 16px; }

/* ─── STAT CARDS ────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: transform .18s, box-shadow .18s;
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); margin-top: 4px; line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--muted); margin-top: 5px; }
.stat-icon  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }

/* ─── PIPELINE PROGRESS ─────────────────────────────── */
.pipeline-wrap {
  display: flex; align-items: stretch; gap: 0;
  position: relative;
}

/* Continuous flow track behind all steps */
.pipeline-flow-track {
  position: absolute;
  top: 50%; left: 2%; right: 2%;
  height: 2px;
  background: #E2E8F0;
  transform: translateY(-50%);
  z-index: 0;
  border-radius: 2px;
  pointer-events: none;
}
.pipeline-flow-fill {
  height: 100%;
  background: linear-gradient(90deg, #48BB78, #48BB78 calc(var(--fill-pct, 0%) - 1%), var(--blue) var(--fill-pct, 0%));
  border-radius: 2px;
  width: 0;
  transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

/* Step wrapper */
.pipeline-step {
  flex: 1; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
}

/* Status dot above each step */
.pipeline-status-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; flex-shrink: 0;
  position: relative; z-index: 2;
  border: 2px solid #E2E8F0;
  background: var(--card);
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.pipeline-step.done .pipeline-status-dot {
  background: #48BB78; border-color: #48BB78;
  box-shadow: 0 0 0 4px rgba(72,187,120,.15);
}
.pipeline-step.active .pipeline-status-dot {
  background: var(--blue); border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,100,164,.15);
  animation: pulse-active 2s ease-in-out infinite;
}
.pipeline-step.idle .pipeline-status-dot { background: #EDF2F7; }

@keyframes pulse-active {
  0%,100% { box-shadow: 0 0 0 4px rgba(0,100,164,.15); }
  50%      { box-shadow: 0 0 0 8px rgba(0,100,164,.08); }
}

/* Step card */
.pipeline-step-inner {
  background: #F7FAFC; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  width: 100%;
  position: relative; overflow: hidden;
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.pipeline-step.done .pipeline-step-inner {
  background: #F0FFF4; border-color: #9AE6B4;
}
.pipeline-step.active .pipeline-step-inner {
  background: #EBF8FF; border-color: #90CDF4;
  box-shadow: 0 2px 12px rgba(0,100,164,.10);
}

/* Step gap */
.pipeline-step + .pipeline-step { margin-left: 6px; }

/* Header row */
.pipeline-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center;
}
.pipeline-pct { font-size: 11px; font-weight: 700; }
.pipeline-step.done   .pipeline-pct { color: #38A169; }
.pipeline-step.active .pipeline-pct { color: var(--blue); }
.pipeline-step.idle   .pipeline-pct { color: var(--muted); }

/* Progress track */
.prog-track {
  height: 5px; background: #E2E8F0; border-radius: 3px;
  overflow: hidden; position: relative;
}
.prog-fill {
  height: 100%; border-radius: 3px;
  width: 0; /* animated by JS */
  transition: width 1.1s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.pipeline-step.done   .prog-fill { background: #48BB78; }
.pipeline-step.active .prog-fill { background: var(--blue); }
.pipeline-step.idle   .prog-fill { background: #CBD5E0; }

/* Shimmer sweep on active bar */
.pipeline-step.active .prog-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.55) 45%,
    rgba(255,255,255,.75) 55%,
    transparent 100%
  );
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 3px;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.pipeline-count {
  font-size: 10.5px; color: var(--muted); margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── DUAL CHARTS ROW ───────────────────────────────── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }

/* Donut chart */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-svg-wrap { position: relative; flex-shrink: 0; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-val  { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.donut-sub  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.legend-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-name { font-size: 13px; flex: 1; color: var(--text); }
.legend-count { font-size: 12px; color: var(--muted); }
.legend-pct  { font-size: 12px; font-weight: 600; width: 36px; text-align: right; }

/* ─── ACTIVITY ──────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #F7FAFC;
  border-radius: 10px; border: 1px solid var(--border);
  transition: background .15s;
}
.activity-item:hover { background: #EDF2F7; }
.activity-badge {
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  white-space: nowrap;
}
.badge-green  { background: #C6F6D5; color: #276749; }
.badge-yellow { background: #FEFCBF; color: #744210; }
.badge-red    { background: #FED7D7; color: #822727; }
.badge-blue   { background: #BEE3F8; color: #1A365D; }
.activity-text { flex: 1; font-size: 13px; color: var(--text); }
.activity-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ─── CAMERA STATUS ─────────────────────────────────── */
.cameras-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.camera-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  transition: all .18s;
}
.camera-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.camera-name { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 10px; }
.camera-stat { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
.camera-stat-label { font-size: 11px; color: var(--muted); }
.camera-stat-val   { font-size: 12px; font-weight: 600; color: var(--text); }
.camera-sync {
  margin-top: 10px; padding: 4px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}
.sync-ok      { background: #C6F6D5; color: #276749; }
.sync-pending { background: #FEFCBF; color: #744210; }

/* ─── TOAST ─────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #2D3748; color: #fff; padding: 12px 18px;
  border-radius: 10px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn .3s ease; min-width: 200px; max-width: 320px;
}
.toast.success { background: #276749; }
.toast.warn    { background: #744210; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px); } }

/* ─── OTHER PAGES (clean wireframe style) ────────────── */
.section-card { background: var(--card); border-radius: 14px; border: 1px solid var(--border); padding: 22px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.section-card h3 { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 16px; }
.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
label.field-label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13.5px; font-family: 'Inter', sans-serif;
  background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,100,164,.12); }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 9px; border: none;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .18s var(--ease);
}
.btn-primary   { background: var(--blue); color: #fff; }
.btn-primary:hover   { background: #0055a5; box-shadow: 0 4px 12px rgba(0,100,164,.3); }
.btn-success   { background: #38A169; color: #fff; }
.btn-success:hover   { background: #2f855a; }
.btn-outline   { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover   { background: #F7FAFC; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover    { background: #c53030; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 40px; text-align: center;
  transition: all .2s; cursor: pointer;
  background: #FAFBFC;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--blue); background: #EBF8FF; }
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-title { font-size: 16px; font-weight: 600; color: var(--text); }
.upload-sub   { font-size: 13px; color: var(--muted); margin-top: 6px; }
.upload-meta  { font-size: 12px; color: #A0AEC0; margin-top: 10px; }

/* Location pills */
.location-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.location-card {
  border: 2px solid var(--border); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; transition: all .18s;
  background: #fff;
}
.location-card:hover    { border-color: var(--blue); background: #EBF8FF; }
.location-card.selected { border-color: var(--blue); background: #EBF8FF; }
.location-card .loc-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.location-card .loc-count { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Run Model */
.slider-wrap { display: flex; align-items: center; gap: 14px; }
.slider-wrap input[type=range] { flex: 1; accent-color: var(--blue); }
.slider-val { font-size: 16px; font-weight: 700; color: var(--blue); min-width: 46px; text-align: right; }
.run-progress { margin-top: 16px; padding: 16px; background: #EBF8FF; border-radius: 10px; border: 1px solid #90CDF4; }
.run-progress-bar { height: 8px; background: #BEE3F8; border-radius: 4px; overflow: hidden; margin: 10px 0; }
.run-progress-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width .4s ease; }
.run-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.run-stat { text-align: center; }
.run-stat-val { font-size: 18px; font-weight: 700; color: var(--dark); }
.run-stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Run history table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.table td { padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #F7FAFC; }
.status-pill { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.pill-green  { background: #C6F6D5; color: #276749; }
.pill-yellow { background: #FEFCBF; color: #744210; }
.pill-red    { background: #FED7D7; color: #C53030; }
.pill-slate  { background: #EDF2F7; color: #4A5568; }

/* ─── REVIEW PAGE HI-FI ─────────────────────────────── */

/* Progress bar */
.review-progress-bar-wrap { height:5px; background:#E2E8F0; border-radius:3px; overflow:hidden; margin-bottom:14px; }
.review-progress-bar-fill { height:100%; background:linear-gradient(90deg,var(--blue),#63B3ED); border-radius:3px; transition:width .6s; }

/* Top control bar */
.review-topbar { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.review-topbar-left { display:flex; align-items:center; gap:10px; flex:1; }
.review-topbar-right { display:flex; align-items:center; gap:8px; }
.review-stat-chip { font-size:12.5px; padding:5px 12px; border-radius:20px; font-weight:600; }
.review-stat-chip.blue { background:#EBF8FF; color:var(--blue); }
.review-stat-chip.gray { color:var(--muted); font-weight:400; }
.review-filter-btn {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 12px; border-radius:8px; border:1px solid var(--border);
  background:#fff; font-size:12.5px; color:var(--text); cursor:pointer;
  font-family:'Inter',sans-serif; font-weight:500; transition:all .15s;
}
.review-filter-btn:hover { background:#F7FAFC; border-color:#CBD5E0; }
.review-filter-btn.active { background:#EBF8FF; border-color:#90CDF4; color:var(--blue); }
.review-human-chip {
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px; border-radius:8px; border:1.5px solid #FEB2B2;
  background:#FFF5F5; font-size:12.5px; color:#C53030; font-weight:600;
  cursor:pointer; font-family:'Inter',sans-serif; transition:all .15s;
}
.review-human-chip:hover { background:#FED7D7; }
.review-human-chip.active { background:#FED7D7; border-color:#FC8181; }

/* Filter status chips */
.rfilter-group { display:flex; gap:4px; }
.rfilter-chip {
  padding:4px 10px; border-radius:20px; font-size:12px; cursor:pointer;
  border:1px solid var(--border); background:#fff; color:var(--muted);
  font-family:'Inter',sans-serif; transition:all .15s;
}
.rfilter-chip:hover { background:#F7FAFC; }
.rfilter-chip.active { background:#1A202C; color:#fff; border-color:#1A202C; font-weight:600; }

/* Main 3-col layout */
.review-layout {
  display:grid;
  grid-template-columns: 252px 1fr 272px;
  gap:12px;
  height:calc(100vh - var(--header-h) - 130px);
}

/* Left — Queue Panel */
.review-queue { overflow-y:auto; display:flex; flex-direction:column; gap:0; }
.review-queue-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.review-queue-count { font-size:12px; color:var(--muted); }

/* Individual queue item */
.rq-item {
  display:flex; align-items:center; gap:9px;
  padding:9px 10px; border-radius:9px; cursor:pointer;
  border:1px solid transparent; transition:all .14s; margin-bottom:3px;
}
.rq-item:hover    { background:#F7FAFC; border-color:var(--border); }
.rq-item.selected { background:#EBF8FF; border-color:#90CDF4; }
.rq-item.confirmed { opacity:.65; }
.rq-thumb {
  width:42px; height:42px; border-radius:7px; flex-shrink:0;
  background:#2D3748; display:flex; align-items:center;
  justify-content:center; font-size:22px; position:relative;
}
.rq-status-dot {
  position:absolute; bottom:-2px; right:-2px;
  width:11px; height:11px; border-radius:50%;
  border:2px solid #fff; flex-shrink:0;
}
.rq-item-info { flex:1; min-width:0; }
.rq-name { font-size:12px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rq-label { font-size:11px; color:var(--muted); margin-top:2px; }
.conf-high  { color:#38A169 !important; font-weight:600 !important; }
.conf-med   { color:#D69E2E !important; font-weight:600 !important; }
.conf-low   { color:#E53E3E !important; font-weight:600 !important; }

/* Burst group item in queue */
.rq-burst {
  display:flex; align-items:center; gap:9px;
  padding:9px 10px; border-radius:9px; cursor:pointer;
  border:1.5px solid #FED7A0; background:#FFFAF0;
  transition:all .14s; margin-bottom:3px;
}
.rq-burst:hover    { background:#FEFCF0; border-color:#F6AD55; }
.rq-burst.selected { background:#FFF3E0; border-color:#ED8936; }
.rq-burst-thumb {
  width:42px; height:42px; border-radius:7px; flex-shrink:0;
  background:#2D3748; display:flex; align-items:center;
  justify-content:center; font-size:18px; position:relative;
}
.rq-burst-badge {
  position:absolute; top:-5px; right:-5px;
  background:#ED8936; color:#fff; font-size:9px; font-weight:700;
  padding:2px 5px; border-radius:8px; border:1.5px solid #fff;
}
.rq-burst-label { font-size:11.5px; font-weight:600; color:#7B341E; }
.rq-burst-sub   { font-size:10.5px; color:#C05621; margin-top:1px; }

/* Center — Image Viewer */
.review-viewer-wrap { display:flex; flex-direction:column; gap:10px; min-height:0; }
.review-viewer {
  flex:1; border-radius:14px; background:#1A202C;
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; position:relative; overflow:hidden;
  min-height:320px;
}
.review-viewer-img {
  font-size:120px; line-height:1;
  filter:drop-shadow(0 4px 24px rgba(0,0,0,.5));
  user-select:none;
}
/* Confidence badge overlay */
.review-conf-overlay {
  position:absolute; top:14px; right:14px;
  padding:6px 12px; border-radius:10px; font-size:13px; font-weight:700;
  backdrop-filter:blur(8px); border:1.5px solid;
}
.review-conf-overlay.high { background:rgba(56,161,105,.2); border-color:rgba(56,161,105,.5); color:#9AE6B4; }
.review-conf-overlay.med  { background:rgba(214,158,46,.2);  border-color:rgba(214,158,46,.5);  color:#FAF089; }
.review-conf-overlay.low  { background:rgba(229,62,62,.2);   border-color:rgba(229,62,62,.5);   color:#FEB2B2; }
/* Human flag overlay */
.review-human-overlay {
  position:absolute; top:14px; left:14px;
  background:rgba(229,62,62,.85); color:#fff;
  padding:5px 11px; border-radius:8px; font-size:12px; font-weight:700;
  display:flex; align-items:center; gap:5px; backdrop-filter:blur(4px);
}
/* Image filename bottom strip */
.review-viewer-footer {
  position:absolute; bottom:0; left:0; right:0;
  padding:10px 16px; background:linear-gradient(transparent,rgba(0,0,0,.7));
  display:flex; align-items:center; justify-content:space-between;
}
.review-viewer-filename { font-size:12px; color:rgba(255,255,255,.8); font-weight:500; }
.review-viewer-pos { font-size:12px; color:rgba(255,255,255,.5); }
/* Prev / Next navigation */
.review-nav-row { display:flex; align-items:center; justify-content:center; gap:12px; }
.review-nav-btn {
  display:flex; align-items:center; gap:5px;
  padding:7px 16px; border-radius:9px; border:1px solid var(--border);
  background:#fff; font-size:12.5px; color:var(--text); cursor:pointer;
  font-family:'Inter',sans-serif; font-weight:500; transition:all .15s;
}
.review-nav-btn:hover { background:#F7FAFC; border-color:#CBD5E0; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.review-nav-btn:disabled { opacity:.35; cursor:not-allowed; }
.review-nav-counter { font-size:13px; color:var(--muted); min-width:60px; text-align:center; font-weight:500; }

/* Right — Classification + Actions Panel */
.review-panel { display:flex; flex-direction:column; gap:10px; overflow-y:auto; }

/* Detection result rows */
.review-det-section { margin-bottom:12px; }
.review-det-title { font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; }
.review-det-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:7px 10px; border-radius:8px; background:#F7FAFC;
  border:1px solid var(--border); margin-bottom:5px;
}
.review-det-key { font-size:12px; color:var(--muted); }
.review-det-val { font-size:12.5px; font-weight:600; display:inline-flex; align-items:center; gap:5px; }
.review-det-val svg { flex-shrink:0; display:block; }
.review-det-val.yes    { color:#38A169; }
.review-det-val.no     { color:var(--muted); }
.review-det-val.warn   { color:#E53E3E; }

/* Species display + edit */
.review-species-display {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-radius:10px;
  border:1.5px solid var(--border); background:#F7FAFC;
  margin-bottom:8px;
}
.review-species-name { font-size:14px; font-weight:700; color:var(--text); }
.review-species-certainty { font-size:12px; color:var(--muted); margin-top:2px; }
.review-edit-btn {
  padding:5px 11px; border-radius:7px; border:1px solid var(--border);
  background:#fff; font-size:12px; color:var(--blue); font-weight:600;
  cursor:pointer; font-family:'Inter',sans-serif; transition:all .15s;
}
.review-edit-btn:hover { background:#EBF8FF; border-color:#90CDF4; }
/* Edit mode dropdown */
.review-species-edit {
  display:none; flex-direction:column; gap:8px; margin-bottom:8px;
}
.review-species-edit.open { display:flex; }
.review-species-select {
  width:100%; padding:9px 12px; border-radius:9px; border:1.5px solid var(--blue);
  font-size:13.5px; font-weight:600; color:var(--text);
  background:#fff; font-family:'Inter',sans-serif; outline:none; cursor:pointer;
}
.review-edit-actions { display:flex; gap:7px; }

/* Metadata */
.review-meta { font-size:12.5px; }
.review-meta .meta-row { display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-bottom:1px solid var(--border); }
.review-meta .meta-row:last-child { border-bottom:none; }
.meta-key { color:var(--muted); font-size:12px; }
.meta-val { font-weight:500; color:var(--text); font-size:12.5px; display:inline-flex; align-items:center; gap:5px; }

/* Three main action buttons */
.review-action-bar { display:flex; flex-direction:column; gap:8px; padding-top:4px; }
.review-btn-confirm {
  width:100%; padding:12px; border-radius:10px; border:none;
  background:#276749; color:#fff; font-size:14px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif;
  display:flex; align-items:center; justify-content:center; gap:8px;
  transition:background .18s, box-shadow .18s, transform .12s;
}
.review-btn-confirm:hover { background:#22543D; box-shadow:0 4px 14px rgba(39,103,73,.35); }
.review-btn-confirm:active { transform:scale(.97); }
.review-btn-row { display:flex; gap:8px; }
.review-btn-edit {
  flex:1; padding:10px; border-radius:10px;
  border:1.5px solid var(--border); background:#fff;
  color:var(--text); font-size:13px; font-weight:600;
  cursor:pointer; font-family:'Inter',sans-serif;
  display:flex; align-items:center; justify-content:center; gap:6px;
  transition:all .15s;
}
.review-btn-edit:hover { background:#F7FAFC; border-color:#CBD5E0; box-shadow:0 2px 8px rgba(0,0,0,.07); }
.review-btn-flag {
  flex:1; padding:10px; border-radius:10px;
  border:1.5px solid #FEB2B2; background:#FFF5F5;
  color:#C53030; font-size:13px; font-weight:600;
  cursor:pointer; font-family:'Inter',sans-serif;
  display:flex; align-items:center; justify-content:center; gap:6px;
  transition:all .15s;
}
.review-btn-flag:hover { background:#FED7D7; border-color:#FC8181; }
.review-btn-confirm:active, .review-btn-edit:active, .review-btn-flag:active { transform:scale(.97); }

/* Burst group action panel */
.burst-group-panel {
  background:#FFFAF0; border:1.5px solid #F6AD55; border-radius:12px;
  padding:14px; display:none; flex-direction:column; gap:10px;
}
.burst-group-panel.open { display:flex; }
.burst-panel-title { font-size:13px; font-weight:700; color:#7B341E; display:flex; align-items:center; gap:6px; }
.burst-panel-sub   { font-size:12px; color:#C05621; margin-top:2px; line-height:1.4; }
.burst-action-row  { display:flex; gap:7px; }
.burst-btn {
  flex:1; padding:9px 8px; border-radius:9px; font-size:12.5px; font-weight:600;
  cursor:pointer; font-family:'Inter',sans-serif; border:1.5px solid;
  display:flex; align-items:center; justify-content:center; gap:5px;
  transition:all .15s;
}
.burst-btn-keep    { background:#F0FFF4; border-color:#9AE6B4; color:#276749; }
.burst-btn-keep:hover { background:#C6F6D5; }
.burst-btn-all     { background:#EBF8FF; border-color:#90CDF4; color:var(--blue); }
.burst-btn-all:hover  { background:#BEE3F8; }
.burst-btn-exclude { background:#FFF5F5; border-color:#FEB2B2; color:#C53030; }
.burst-btn-exclude:hover { background:#FED7D7; }

/* Queue mode indicator bar */
.queue-mode-bar {
  display:none; align-items:center; gap:6px; flex-wrap:wrap;
  padding:7px 10px; border-radius:8px; background:#F7FAFC;
  border:1px solid var(--border); margin-bottom:10px; font-size:11.5px;
}
.queue-mode-bar.visible { display:flex; }
.queue-mode-tag {
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600;
}
.queue-mode-tag.sort  { background:#EBF8FF; color:var(--blue); border:1px solid #BEE3F8; }
.queue-mode-tag.burst { background:#FFFAF0; color:#C05621; border:1px solid #FBD38D; }
.queue-mode-tag.expanded { background:#F0FFF4; color:#276749; border:1px solid #9AE6B4; }

/* Sort button active state */
.review-filter-btn.sort-active {
  background:#EBF8FF; border-color:#90CDF4; color:var(--blue); font-weight:600;
}

/* Expanded burst group in queue */
.rq-burst-expanded-wrap {
  border:1.5px solid #F6AD55; border-radius:10px;
  background:#FFFDF5; margin-bottom:6px; overflow:hidden;
}
.rq-burst-expanded-header {
  display:flex; align-items:center; gap:8px;
  padding:8px 10px; background:#FFF3CD; border-bottom:1px solid #F6E05E;
  font-size:12px; font-weight:700; color:#7B341E; cursor:pointer;
}
.rq-burst-expanded-header:hover { background:#FEF3C7; }
.rq-burst-collapse-btn {
  margin-left:auto; font-size:10px; color:#C05621;
  background:none; border:none; cursor:pointer; font-family:'Inter',sans-serif;
  font-weight:600; padding:0;
}
/* Child items inside expanded burst */
.rq-child {
  display:flex; align-items:center; gap:9px;
  padding:8px 10px 8px 18px; cursor:pointer;
  border-bottom:1px solid #FEF3C7; transition:background .12s;
}
.rq-child:last-child { border-bottom:none; }
.rq-child:hover    { background:#FFF8E6; }
.rq-child.selected { background:#FFF0CC; }
.rq-child-best-badge {
  font-size:9px; font-weight:700; padding:1px 5px; border-radius:4px;
  background:#C6F6D5; color:#276749; flex-shrink:0;
}
.rq-child-thumb {
  width:34px; height:34px; border-radius:6px; flex-shrink:0;
  background:#2D3748; display:flex; align-items:center; justify-content:center;
  font-size:16px; position:relative;
}
.rq-child-status-dot {
  position:absolute; bottom:-2px; right:-2px;
  width:9px; height:9px; border-radius:50%; border:1.5px solid #FFFDF5;
}

/* ─── CONFIRMATION MODAL ─────────────────────────────── */
.confirm-modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center;
  z-index:1000; opacity:0; pointer-events:none;
  transition:opacity .18s;
}
.confirm-modal-overlay.open { opacity:1; pointer-events:all; }
.confirm-modal {
  background:#fff; border-radius:16px; padding:28px 28px 22px;
  width:360px; box-shadow:0 20px 60px rgba(0,0,0,.18);
  transform:scale(.95) translateY(8px);
  transition:transform .18s cubic-bezier(.34,1.56,.64,1);
}
.confirm-modal-overlay.open .confirm-modal { transform:scale(1) translateY(0); }
.confirm-modal-icon {
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:14px;
}
.confirm-modal-icon.flag   { background:#FFF5F5; }
.confirm-modal-icon.burst  { background:#FFFAF0; }
.confirm-modal-icon.danger { background:#FFF5F5; }
.confirm-modal-title { font-size:15px; font-weight:700; color:var(--text); margin-bottom:6px; }
.confirm-modal-body  { font-size:13px; color:var(--muted); line-height:1.55; margin-bottom:20px; }
.confirm-modal-actions { display:flex; gap:8px; justify-content:flex-end; }
.confirm-modal-cancel {
  padding:9px 18px; border-radius:9px; border:1px solid var(--border);
  background:#fff; color:var(--text); font-size:13px; font-weight:500;
  cursor:pointer; font-family:'Inter',sans-serif; transition:background .15s;
}
.confirm-modal-cancel:hover { background:#F7FAFC; }
.confirm-modal-ok {
  padding:9px 18px; border-radius:9px; border:none;
  font-size:13px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif; transition:all .15s;
}
.confirm-modal-ok.flag   { background:#E53E3E; color:#fff; }
.confirm-modal-ok.flag:hover  { background:#C53030; }
.confirm-modal-ok.burst-keep    { background:#276749; color:#fff; }
.confirm-modal-ok.burst-keep:hover { background:#22543D; }
.confirm-modal-ok.burst-exclude { background:#E53E3E; color:#fff; }
.confirm-modal-ok.burst-exclude:hover { background:#C53030; }

/* Burst result state — after action applied */
.burst-result-banner {
  display:none; flex-direction:column; gap:6px;
  padding:12px 14px; border-radius:10px; border:1.5px solid;
}
.burst-result-banner.keep    { background:#F0FFF4; border-color:#9AE6B4; display:flex; }
.burst-result-banner.exclude { background:#FFF5F5; border-color:#FEB2B2; display:flex; }
.burst-result-banner.expand  { background:#EBF8FF; border-color:#90CDF4; display:flex; }
.burst-result-title { font-size:13px; font-weight:700; }
.burst-result-banner.keep    .burst-result-title { color:#276749; }
.burst-result-banner.exclude .burst-result-title { color:#C53030; }
.burst-result-banner.expand  .burst-result-title { color:var(--blue); }
.burst-result-sub  { font-size:12px; color:var(--muted); line-height:1.4; }
.burst-result-undo {
  font-size:12px; font-weight:600; color:var(--blue);
  background:none; border:none; cursor:pointer; font-family:'Inter',sans-serif;
  padding:0; text-decoration:underline; align-self:flex-start;
}

/* Undo toast strip */
.undo-toast {
  display:none; align-items:center; justify-content:space-between;
  padding:10px 14px; border-radius:10px; border:1px solid #BEE3F8;
  background:#EBF8FF; margin-bottom:10px; gap:12px;
}
.undo-toast.visible { display:flex; }
.undo-toast-msg  { font-size:12.5px; color:var(--blue); font-weight:500; }
.undo-toast-btn  {
  font-size:12px; font-weight:700; color:var(--blue);
  background:none; border:1px solid #90CDF4; border-radius:7px;
  padding:4px 10px; cursor:pointer; font-family:'Inter',sans-serif;
  white-space:nowrap; transition:background .15s;
}
.undo-toast-btn:hover { background:#BEE3F8; }

/* Validation checks */
/* ─── VALIDATE PAGE HI-FI ───────────────────────────── */

/* Summary strip */
.val-summary-strip {
  display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px;
}
.val-summary-card {
  padding:16px 18px; border-radius:12px; border:1.5px solid;
  display:flex; flex-direction:column; gap:4px;
}
.val-summary-card.total   { background:#EBF8FF; border-color:#90CDF4; }
.val-summary-card.valid   { background:#F0FFF4; border-color:#9AE6B4; }
.val-summary-card.warning { background:#FFFFF0; border-color:#F6E05E; }
.val-summary-card.error   { background:#FFF5F5; border-color:#FEB2B2; }
.val-summary-val  { font-size:26px; font-weight:800; line-height:1; }
.val-summary-card.total   .val-summary-val { color:var(--blue); }
.val-summary-card.valid   .val-summary-val { color:#276749; }
.val-summary-card.warning .val-summary-val { color:#744210; }
.val-summary-card.error   .val-summary-val { color:#822727; }
.val-summary-lbl  { font-size:12px; color:var(--muted); font-weight:500; }

/* Date range section */
.val-date-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:14px; }
.val-date-field { display:flex; flex-direction:column; gap:6px; }
.val-date-input {
  width:100%; padding:9px 12px; border-radius:9px;
  border:1.5px solid var(--border); font-size:13.5px;
  font-family:'Inter',sans-serif; color:var(--text);
  background:#fff; outline:none; transition:border-color .15s;
  box-sizing:border-box;
}
.val-date-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(0,100,164,.1); }
.val-date-input.error { border-color:#FC8181; background:#FFF5F5; }
.val-date-error {
  display:none; align-items:center; gap:6px;
  font-size:12px; color:#C53030; font-weight:500; margin-top:2px;
}
.val-date-error.visible { display:flex; }

/* Outside-range warning card */
.val-range-warn {
  display:flex; gap:12px; padding:14px 16px;
  background:#FFFFF0; border:1.5px solid #F6E05E; border-radius:12px;
  margin-bottom:0;
}
.val-range-warn-icon {
  width:36px; height:36px; border-radius:9px; background:#FEFCBF;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.val-range-warn-title { font-size:13.5px; font-weight:700; color:#744210; margin-bottom:3px; }
.val-range-warn-body  { font-size:12.5px; color:#7B341E; line-height:1.5; }
.val-range-warn-link  {
  display:inline-flex; align-items:center; gap:4px;
  font-size:12.5px; color:#744210; font-weight:600;
  background:none; border:none; cursor:pointer;
  font-family:'Inter',sans-serif; padding:0;
  text-decoration:underline; margin-top:6px;
  transition:color .15s;
}
.val-range-warn-link:hover { color:#C05621; }

/* Time correction card */
.val-correction-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; margin-bottom:16px; }
.val-preview-box {
  padding:10px 13px; border-radius:9px;
  border:1px solid var(--border); background:#F7FAFC;
  display:flex; flex-direction:column; gap:4px;
}
.val-preview-before { font-size:12px; color:var(--muted); font-family:'JetBrains Mono',monospace; }
.val-preview-after  { font-size:12px; color:#38A169; font-weight:600; font-family:'JetBrains Mono',monospace; }
.val-correction-btns { display:flex; gap:10px; }

/* Validation checks list */
.val-check {
  display:flex; align-items:center; justify-content:space-between;
  padding:13px 16px; background:#fff;
  border-radius:11px; border:1.5px solid var(--border);
  margin-bottom:8px; transition:border-color .15s;
}
.val-check:last-child { margin-bottom:0; }
.val-check.ok   { border-color:#9AE6B4; background:#F0FFF4; }
.val-check.warn { border-color:#F6E05E; background:#FFFFF0; }
.val-check.err  { border-color:#FEB2B2; background:#FFF5F5; }
.check-left { display:flex; align-items:center; gap:10px; }
.check-icon {
  width:28px; height:28px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.icon-ok   { background:#C6F6D5; color:#276749; }
.icon-warn { background:#FEFCBF; color:#744210; }
.icon-err  { background:#FED7D7; color:#822727; }
.check-label { font-size:13.5px; font-weight:600; color:var(--text); }
.check-sub   { font-size:11.5px; color:var(--muted); margin-top:2px; }
.check-right { display:flex; align-items:center; gap:8px; }
.check-badge {
  font-size:12px; font-weight:600; padding:3px 10px;
  border-radius:20px; white-space:nowrap;
}
.check-badge.ok   { background:#C6F6D5; color:#276749; }
.check-badge.warn { background:#FEFCBF; color:#744210; }
.check-badge.err  { background:#FED7D7; color:#C53030; }
.check-detail-btn {
  font-size:12px; color:var(--blue); font-weight:600;
  background:none; border:1px solid #BEE3F8; border-radius:7px;
  padding:4px 10px; cursor:pointer; font-family:'Inter',sans-serif;
  transition:all .15s;
}
.check-detail-btn:hover { background:#EBF8FF; }

/* Run validation button area */
.val-run-row {
  display:flex; align-items:center; justify-content:space-between;
  padding-top:18px; margin-top:4px;
  border-top:1px solid var(--border);
}
.val-run-note { font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:6px; }
.val-run-note.running { color:#D69E2E; font-weight:500; }
.val-run-btn {
  display:flex; align-items:center; gap:8px;
  padding:11px 22px; border-radius:10px; border:none;
  background:#276749; color:#fff; font-size:14px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif;
  transition:background .18s, box-shadow .18s, transform .12s;
}
.val-run-btn:hover  { background:#22543D; box-shadow:0 4px 14px rgba(39,103,73,.3); }
.val-run-btn:active { transform:scale(.97); }

/* ─── CUSTOM DATE PICKER ──────────────────────────── */
.dp-wrap { position:relative; }
.dp-input-row {
  display:flex; align-items:center;
  border:1.5px solid var(--border); border-radius:9px;
  background:#fff; cursor:pointer; overflow:hidden;
  transition:border-color .15s, box-shadow .15s;
}
.dp-input-row:hover { border-color:#90CDF4; }
.dp-input-row.open  { border-color:var(--blue); box-shadow:0 0 0 3px rgba(0,100,164,.1); }
.dp-input-row.error { border-color:#FC8181; background:#FFF5F5; }
.dp-text-input {
  flex:1; padding:9px 12px; border:none; outline:none;
  font-size:13.5px; font-family:'Inter',sans-serif;
  color:var(--text); background:transparent; cursor:pointer;
  min-width:0;
}
.dp-text-input::placeholder { color:#A0AEC0; }
.dp-cal-btn {
  padding:0 11px; border:none; background:none; cursor:pointer;
  color:var(--muted); display:flex; align-items:center;
  transition:color .15s; flex-shrink:0;
}
.dp-cal-btn:hover { color:var(--blue); }
.dp-popup {
  display:none; position:absolute; top:calc(100% + 6px); left:0;
  z-index:1200; background:#fff;
  border:1.5px solid var(--border); border-radius:14px;
  box-shadow:0 8px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  width:272px; overflow:hidden; animation:dpFadeIn .15s ease;
}
.dp-popup.open { display:block; }
@keyframes dpFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.dp-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px 8px; border-bottom:1px solid var(--border);
}
.dp-month-label { font-size:14px; font-weight:700; color:var(--text); }
.dp-nav-btn {
  width:28px; height:28px; border-radius:7px; border:1px solid var(--border);
  background:#fff; cursor:pointer; display:flex; align-items:center;
  justify-content:center; font-size:16px; color:var(--muted);
  transition:all .15s; line-height:1; font-family:sans-serif;
}
.dp-nav-btn:hover { background:#F7FAFC; color:var(--text); border-color:#90CDF4; }
.dp-weekdays {
  display:grid; grid-template-columns:repeat(7,1fr);
  padding:8px 10px 4px; gap:0;
}
.dp-weekdays span {
  text-align:center; font-size:11px; font-weight:700;
  color:var(--muted); padding:3px 0; letter-spacing:.03em;
}
.dp-grid {
  display:grid; grid-template-columns:repeat(7,1fr);
  padding:2px 10px 10px; gap:2px;
}
.dp-day {
  text-align:center; font-size:12.5px; padding:5px 2px;
  border-radius:7px; cursor:pointer; color:var(--text);
  transition:background .1s, color .1s; line-height:1.4;
  font-weight:500;
}
.dp-day:hover    { background:#EBF8FF; color:var(--blue); }
.dp-day.other-month { color:#CBD5E0; pointer-events:none; }
.dp-day.today    { background:#F0FFF4; color:#276749; font-weight:700; }
.dp-day.today:hover { background:#C6F6D5; }
.dp-day.selected { background:var(--blue); color:#fff !important; font-weight:700; }
.dp-day.selected:hover { background:#2B6CB0; }
.dp-footer {
  display:flex; gap:6px; padding:8px 10px 10px;
  border-top:1px solid var(--border);
}
.dp-footer-btn {
  flex:1; padding:6px 0; border-radius:7px; border:1px solid var(--border);
  background:#F7FAFC; font-size:12px; font-weight:600;
  color:var(--muted); cursor:pointer; font-family:'Inter',sans-serif;
  transition:all .15s;
}
.dp-footer-btn:hover { background:#EBF8FF; color:var(--blue); border-color:#90CDF4; }
.dp-footer-btn.primary { background:var(--blue); color:#fff; border-color:var(--blue); }
.dp-footer-btn.primary:hover { background:#2B6CB0; }

/* ─── AFFECTED IMAGES PANEL ───────────────────────── */
.affected-panel {
  display:none; margin-top:12px;
  border:1.5px solid #F6E05E; border-radius:12px;
  background:#fff; overflow:hidden;
}
.affected-panel.open { display:block; }
.affected-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; background:#FFFFF0; border-bottom:1px solid #F6E05E;
}
.affected-panel-title  { font-size:13px; font-weight:700; color:#744210; }
.affected-panel-sub    { font-size:11.5px; color:#975A16; margin-top:1px; }
.affected-panel-close  {
  width:26px; height:26px; border-radius:6px; border:1px solid #F6AD55;
  background:#FEFCBF; color:#744210; font-size:15px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-family:sans-serif; transition:all .15s; flex-shrink:0;
}
.affected-panel-close:hover { background:#FEEBC8; }
/* Remove inner wrap padding — table fills full width flush to the border */
.affected-table-wrap { max-height:240px; overflow-y:auto; padding:0; }
.affected-table { width:100%; border-collapse:collapse; font-size:12px; }
.affected-table thead tr { background:#FFFFF0; }
.affected-table th {
  text-align:left; padding:8px 16px; color:var(--muted);
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; border-bottom:1px solid #F6E05E;
  position:sticky; top:0; background:#FFFFF0; z-index:1;
}
.affected-table td {
  padding:8px 16px; border-bottom:1px solid #FEFCBF;
  vertical-align:middle; color:var(--text);
  font-family:'JetBrains Mono',monospace; font-size:12px;
}
.affected-table tr:last-child td { border-bottom:none; }
.affected-table tr:hover td { background:#FFFFF0; }
.affected-issue-before {
  display:inline-block; padding:2px 7px; border-radius:4px;
  background:#FED7D7; color:#C53030; font-size:10.5px; font-weight:700;
  font-family:'Inter',sans-serif;
}
.affected-issue-after {
  display:inline-block; padding:2px 7px; border-radius:4px;
  background:#FEEBC8; color:#744210; font-size:10.5px; font-weight:700;
  font-family:'Inter',sans-serif;
}

/* ─── UNPROCESSED IMAGES PANEL (ML errors) ─────────── */
.unproc-panel {
  display:none; margin-top:10px;
  border:1.5px solid #FEB2B2; border-radius:12px;
  background:#fff; overflow:hidden;
}
.unproc-panel.open { display:block; }
.unproc-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; background:#FFF5F5; border-bottom:1px solid #FEB2B2;
}
.unproc-panel-title { font-size:13px; font-weight:700; color:#C53030; }
.unproc-panel-sub   { font-size:11.5px; color:#9B2C2C; margin-top:1px; }
.unproc-panel-close {
  width:26px; height:26px; border-radius:6px; border:1px solid #FC8181;
  background:#FED7D7; color:#C53030; font-size:15px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-family:sans-serif; transition:all .15s; flex-shrink:0;
}
.unproc-panel-close:hover { background:#FEB2B2; }
.unproc-table-wrap { max-height:240px; overflow-y:auto; padding:0; }
.unproc-table { width:100%; border-collapse:collapse; font-size:12px; }
.unproc-table thead tr { background:#FFF5F5; }
.unproc-table th {
  text-align:left; padding:8px 16px; color:var(--muted);
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; border-bottom:1px solid #FEB2B2;
  position:sticky; top:0; background:#FFF5F5; z-index:1;
}
.unproc-table td {
  padding:8px 16px; border-bottom:1px solid #FED7D7;
  vertical-align:middle; color:var(--text);
  font-family:'JetBrains Mono',monospace; font-size:12px;
}
.unproc-table tr:last-child td { border-bottom:none; }
.unproc-table tr:hover td { background:#FFF5F5; }
.unproc-reason-badge {
  display:inline-block; padding:2px 7px; border-radius:4px;
  font-size:10.5px; font-weight:700; font-family:'Inter',sans-serif;
}
.unproc-reason-badge.no-output  { background:#FED7D7; color:#C53030; }
.unproc-reason-badge.low-conf   { background:#FEEBC8; color:#744210; }
.unproc-reason-badge.corrupt    { background:#E9D8FD; color:#553C9A; }
.unproc-rerun-bar {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px; background:#FFF5F5; border-top:1px solid #FED7D7;
}
.unproc-rerun-note { font-size:12px; color:#9B2C2C; }
.unproc-rerun-btn {
  display:flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:8px; border:none;
  background:#C53030; color:#fff; font-size:12.5px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif; transition:all .18s;
}
.unproc-rerun-btn:hover { background:#9B2C2C; }


/* Export */
/* ─── EXPORT PAGE HI-FI ─────────────────────────────── */
.export-status-banner {
  display:flex; align-items:center; gap:12px;
  padding:14px 18px; border-radius:12px; border:1.5px solid;
  margin-bottom:14px;
}
.export-status-banner.ok   { background:#F0FFF4; border-color:#9AE6B4; }
.export-status-banner.warn { background:#FFFFF0; border-color:#F6E05E; }
.export-status-banner-icon {
  width:36px; height:36px; border-radius:9px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.export-status-banner.ok   .export-status-banner-icon { background:#C6F6D5; }
.export-status-banner.warn .export-status-banner-icon { background:#FEFCBF; }
.export-status-title { font-size:13.5px; font-weight:700; }
.export-status-banner.ok   .export-status-title { color:#276749; }
.export-status-banner.warn .export-status-title { color:#744210; }
.export-status-sub { font-size:12px; margin-top:2px; }
.export-status-banner.ok   .export-status-sub { color:#2F855A; }
.export-status-banner.warn .export-status-sub { color:#975A16; }
.export-status-link {
  margin-left:auto; font-size:12px; font-weight:600; padding:5px 12px;
  border-radius:7px; border:none; cursor:pointer; font-family:'Inter',sans-serif;
  transition:all .15s;
}
.export-status-banner.warn .export-status-link { background:#FEFCBF; color:#744210; border:1px solid #F6E05E; }
.export-status-banner.warn .export-status-link:hover { background:#FEF9C3; }

/* Summary strip */
.export-summary-grid {
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:16px;
}
.export-summary-card { padding:14px 16px; border-radius:11px; border:1.5px solid var(--border); background:#F7FAFC; }
.export-summary-card.primary { background:#F0FFF4; border-color:#9AE6B4; }
.export-summary-card.red     { background:#FFF5F5; border-color:#FEB2B2; }
.export-summary-card.blue    { background:#EBF8FF; border-color:#BEE3F8; }
.export-summary-val  { font-size:22px; font-weight:800; line-height:1; color:var(--text); }
.export-summary-card.primary .export-summary-val { color:#276749; }
.export-summary-card.red     .export-summary-val { color:#C53030; }
.export-summary-card.blue    .export-summary-val { color:#2B6CB0; }
.export-summary-lbl  { font-size:11.5px; color:var(--muted); margin-top:4px; font-weight:500; }
.export-summary-sub  { font-size:11px; color:var(--muted); margin-top:2px; }

/* Camera folder rows */
.export-folder-row {
  display:flex; align-items:center; gap:12px;
  padding:11px 14px; border-radius:10px;
  border:1.5px solid var(--border); background:#fff;
  margin-bottom:8px; transition:border-color .15s;
}
.export-folder-row:last-child { margin-bottom:0; }
.export-folder-icon {
  width:36px; height:36px; border-radius:9px; background:#EBF8FF;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.export-folder-name { font-size:13.5px; font-weight:600; }
.export-folder-sub  { font-size:11.5px; color:var(--muted); margin-top:2px; }
.export-folder-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.export-sync-badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:20px; font-size:11.5px; font-weight:600;
}
.export-sync-badge.synced  { background:#C6F6D5; color:#276749; }
.export-sync-badge.pending { background:#FEFCBF; color:#744210; }
.export-folder-view-btn {
  font-size:12px; color:var(--blue); font-weight:600;
  background:none; border:1px solid #BEE3F8; border-radius:7px;
  padding:4px 10px; cursor:pointer; font-family:'Inter',sans-serif;
  transition:all .15s;
}
.export-folder-view-btn:hover { background:#EBF8FF; }

/* Settings form */
.export-settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.export-filename-wrap { display:flex; align-items:center; gap:0; }
.export-filename-input {
  flex:1; padding:9px 12px; border:1.5px solid var(--border);
  border-right:none; border-radius:9px 0 0 9px;
  font-size:13px; font-family:'Inter',sans-serif; color:var(--text);
  outline:none; transition:border-color .15s;
}
.export-filename-input:focus { border-color:var(--blue); }
.export-filename-ext {
  padding:9px 12px; border:1.5px solid var(--border); border-radius:0 9px 9px 0;
  background:#F7FAFC; font-size:13px; color:var(--muted); font-weight:600;
  white-space:nowrap;
}

/* Format selector cards */
.export-format-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.export-fmt-card {
  padding:12px 14px; border-radius:10px; border:1.5px solid var(--border);
  cursor:pointer; transition:all .18s; display:flex; align-items:center; gap:10px;
}
.export-fmt-card:hover    { border-color:#90CDF4; background:#EBF8FF; }
.export-fmt-card.selected { border-color:var(--blue); background:#EBF8FF; }
.export-fmt-icon {
  width:32px; height:32px; border-radius:7px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:800; font-family:'Inter',sans-serif;
}
.export-fmt-icon.csv   { background:#C6F6D5; color:#276749; }
.export-fmt-icon.xlsx  { background:#BEE3F8; color:#2B6CB0; }
.export-fmt-icon.json  { background:#E9D8FD; color:#553C9A; }
.export-fmt-name  { font-size:13px; font-weight:700; }
.export-fmt-sub   { font-size:11px; color:var(--muted); margin-top:1px; }

/* Options checkboxes */
.export-option-row {
  display:flex; align-items:flex-start; gap:12px;
  padding:12px 14px; border-radius:10px;
  border:1.5px solid var(--border); background:#fff;
  margin-bottom:8px; cursor:pointer; transition:border-color .15s;
}
.export-option-row:last-child { margin-bottom:0; }
.export-option-row:hover { border-color:#90CDF4; }
.export-option-row.checked { border-color:#9AE6B4; background:#F0FFF4; }
.export-option-cb {
  width:17px; height:17px; margin-top:1px; flex-shrink:0;
  accent-color:var(--blue); cursor:pointer;
}
.export-option-title { font-size:13.5px; font-weight:600; color:var(--text); }
.export-option-sub   { font-size:12px; color:var(--muted); margin-top:2px; line-height:1.5; }
.export-option-badge {
  margin-left:auto; padding:2px 8px; border-radius:12px; white-space:nowrap;
  font-size:11px; font-weight:700; flex-shrink:0;
}

/* Date filter section */
.export-filter-toggle-row {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:0; padding:12px 14px; border-radius:10px;
  border:1.5px solid var(--border); background:#fff; cursor:pointer;
  transition:border-color .15s;
}
.export-filter-toggle-row.active { border-color:#90CDF4; background:#EBF8FF; }
.export-filter-body {
  display:none; padding:14px 0 0;
}
.export-filter-body.open { display:block; }
.export-filter-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }

/* Main export button */
.export-main-btn {
  width:100%; padding:14px; border-radius:12px; border:none;
  background:linear-gradient(135deg,#276749,#38A169);
  color:#fff; font-size:15px; font-weight:800;
  cursor:pointer; font-family:'Inter',sans-serif;
  display:flex; align-items:center; justify-content:center; gap:10px;
  transition:all .2s; box-shadow:0 4px 14px rgba(39,103,73,.25);
  margin-top:4px;
}
.export-main-btn:hover  { background:linear-gradient(135deg,#22543D,#276749); box-shadow:0 6px 20px rgba(39,103,73,.35); }
.export-main-btn:active { transform:scale(.98); }
.export-main-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.export-main-note { font-size:12px; color:var(--muted); margin-top:8px; text-align:center; }

/* Export confirmation modal */
.export-modal-overlay {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.45);
  z-index:2000; align-items:center; justify-content:center;
}
.export-modal-overlay.open { display:flex; }
.export-modal {
  background:#fff; border-radius:16px; padding:28px;
  width:420px; max-width:90vw;
  box-shadow:0 20px 60px rgba(0,0,0,.2);
  animation:dpFadeIn .18s ease;
}
.export-modal-icon {
  width:48px; height:48px; border-radius:12px; background:#FEFCBF;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:14px;
}
.export-modal-title { font-size:16px; font-weight:800; margin-bottom:8px; }
.export-modal-body  { font-size:13.5px; color:var(--muted); line-height:1.6; margin-bottom:6px; }
.export-modal-issue {
  padding:10px 14px; border-radius:9px; background:#FFFFF0;
  border:1px solid #F6E05E; font-size:12.5px; color:#744210;
  margin-bottom:20px; margin-top:12px; line-height:1.5;
}
.export-modal-btns { display:flex; gap:10px; }
.export-modal-cancel {
  flex:1; padding:10px; border-radius:9px; border:1.5px solid var(--border);
  background:#fff; font-size:13.5px; font-weight:600; cursor:pointer;
  font-family:'Inter',sans-serif; transition:all .15s;
}
.export-modal-cancel:hover { background:#F7FAFC; }
.export-modal-confirm {
  flex:1; padding:10px; border-radius:9px; border:none;
  background:#276749; color:#fff; font-size:13.5px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif; transition:all .15s;
}
.export-modal-confirm:hover { background:#22543D; }

/* Export progress bar */
.export-progress-wrap {
  display:none; padding:14px 18px; border-radius:12px;
  background:#F0FFF4; border:1.5px solid #9AE6B4; margin-top:12px;
}
.export-progress-wrap.visible { display:block; }
.export-progress-label { font-size:13px; font-weight:600; color:#276749; margin-bottom:8px; display:flex; justify-content:space-between; }
.export-progress-bar-bg {
  height:8px; background:#C6F6D5; border-radius:4px; overflow:hidden;
}
.export-progress-bar-fill {
  height:100%; background:linear-gradient(90deg,#38A169,#68D391);
  border-radius:4px; width:0%; transition:width .4s ease;
}
.export-progress-sub { font-size:11.5px; color:#2F855A; margin-top:6px; }

/* folder row old CSS kept for other pages */
.folder-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: #F7FAFC;
  border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px;
}
.folder-info { display: flex; align-items: center; gap: 10px; }
.folder-icon { font-size: 22px; }
.folder-name { font-size: 13.5px; font-weight: 600; }
.folder-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.folder-actions { display: flex; align-items: center; gap: 10px; }
.export-format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.format-card {
  border: 2px solid var(--border); border-radius: 10px; padding: 14px;
  cursor: pointer; transition: all .18s; text-align: center;
}
.format-card:hover    { border-color: var(--blue); background: #EBF8FF; }
.format-card.selected { border-color: var(--blue); background: #EBF8FF; }
.format-icon { font-size: 28px; margin-bottom: 6px; }
.format-name { font-size: 13px; font-weight: 600; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #CBD5E0; border-radius: 11px; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: 13px; color: var(--text); font-weight: 500; }

/* Warn box */
.warn-box { padding: 14px 16px; border-radius: 10px; border: 1px solid; }
.warn-box.yellow { background: #FFFFF0; border-color: #F6E05E; }
.warn-box.red    { background: #FFF5F5; border-color: #FEB2B2; }
.warn-box.green  { background: #F0FFF4; border-color: #9AE6B4; }
.warn-box-title  { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.warn-box-body   { font-size: 13px; margin-top: 6px; color: var(--muted); }

/* upload queue */
.upload-queue { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.queue-item:last-child { border-bottom: none; }
.queue-name { flex: 1; font-size: 13px; }
.queue-size { font-size: 12px; color: var(--muted); }
.queue-prog { width: 80px; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.queue-prog-fill { height: 100%; background: var(--blue); border-radius: 3px; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #A0AEC0; }

/* drive sync mode */
.sync-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.sync-tab {
  flex: 1; padding: 10px 14px; background: #F7FAFC;
  border: none; cursor: pointer; font-size: 13.5px; font-weight: 500;
  font-family: 'Inter', sans-serif; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .18s; border-right: 1px solid var(--border);
}
.sync-tab:last-child { border-right: none; }
.sync-tab:hover   { background: #EDF2F7; color: var(--text); }
.sync-tab.active  { background: var(--blue); color: #fff; }

/* ─── LOGIN SCREEN ──────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(145deg, #0d2a52 0%, #1B3D6D 45%, #163461 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
#login-screen.exit {
  opacity: 0; transform: scale(1.04); pointer-events: none;
}

.login-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  width: 480px; max-width: calc(100vw - 40px);
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
  overflow: hidden;
}
.login-header {
  background: var(--dark);
  padding: 28px 32px 24px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.login-logo {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.25); flex-shrink: 0;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-brand-uci    { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.login-brand-nature { font-size: 20px; font-weight: 400; color: rgba(255,255,255,.88); margin-left: 5px; }
.login-brand-sub    { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; }

.login-body { padding: 28px 32px 32px; }

/* Step indicator */
.login-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 26px;
}
.login-step-item {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--muted); font-weight: 500;
}
.login-step-item.active { color: var(--blue); }
.login-step-item.done   { color: #38A169; }
.step-num {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  background: #E2E8F0; color: var(--muted);
  transition: all .25s;
}
.login-step-item.active .step-num { background: var(--blue); color: #fff; }
.login-step-item.done   .step-num { background: #48BB78; color: #fff; }
.step-connector { flex: 1; height: 1px; background: #E2E8F0; margin: 0 6px; }

.login-section-title {
  font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 6px;
}
.login-section-sub {
  font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5;
}

/* Project cards */
.project-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.project-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  border: 2px solid var(--border); background: #F7FAFC;
  cursor: pointer; transition: all .2s;
  position: relative;
}
.project-card:hover:not(.disabled) { border-color: var(--blue); background: #EBF8FF; }
.project-card.selected { border-color: var(--blue); background: #EBF8FF; }
.project-card.disabled { opacity: .52; cursor: default; }
.project-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.project-card-name  { font-size: 14px; font-weight: 600; color: var(--dark); }
.project-card-drive { font-size: 12px; color: var(--muted); margin-top: 2px; }
.project-card-check {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); display: none;
  align-items: center; justify-content: center;
}
.project-card.selected .project-card-check { display: flex; }
.coming-soon-badge {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: #EDF2F7; color: var(--muted);
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .4px;
}

/* OAuth button */
.oauth-btn {
  width: 100%; padding: 13px; border-radius: 10px;
  background: #fff; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: #3c4043;
  cursor: pointer; transition: all .2s; font-family: 'Inter', sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.oauth-btn:hover { background: #f8f9fa; border-color: #c7cdd6; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.oauth-btn:disabled { opacity: .6; cursor: not-allowed; }
.oauth-btn.loading { background: #f8f9fa; }

/* loading spinner for oauth */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid #E2E8F0; border-top-color: var(--blue);
  animation: spin .7s linear infinite; flex-shrink: 0;
}

/* ─── DRIVE CONFIRM MODAL ───────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15,30,55,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }

.confirm-modal {
  background: #fff; border-radius: 18px;
  width: 400px; max-width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  padding: 28px;
  transform: translateY(12px) scale(.97);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.visible .confirm-modal { transform: translateY(0) scale(1); }

.modal-drive-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: #EBF8FF; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.modal-sub   { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }

.drive-confirm-box {
  background: #F0FFF4; border: 1.5px solid #9AE6B4;
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.drive-confirm-dot { width: 10px; height: 10px; border-radius: 50%; background: #48BB78; flex-shrink: 0; }
.drive-confirm-name { font-size: 14px; font-weight: 600; color: #22543D; }
.drive-confirm-account { font-size: 12px; color: #38A169; margin-top: 2px; }

.modal-btn-row { display: flex; flex-direction: column; gap: 8px; }
.btn-confirm {
  width: 100%; padding: 12px; border-radius: 10px;
  background: var(--blue); color: #fff;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background .18s;
}
.btn-confirm:hover { background: #0055a0; }
.btn-switch-account {
  width: 100%; padding: 10px; border-radius: 10px;
  background: none; color: var(--muted); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .18s;
}
.btn-switch-account:hover { background: #F7FAFC; color: var(--text); }

/* Updated drive badge — shows drive name not email */
.drive-name-text { color: #22543D; font-weight: 600; font-size: 13px; }
.drive-account-text { color: #38A169; font-size: 11.5px; }

/* Drive disconnected warning state */
.drive-badge.warning { background: #FFFAF0; border-color: #F6AD55; }
.drive-badge.warning:hover { background: #FEECCC; }
.drive-dot.warn { background: #ED8936; box-shadow: 0 0 0 3px rgba(237,137,54,.2); animation: pulse-warn 1.8s ease-in-out infinite; }
@keyframes pulse-warn { 0%,100%{box-shadow:0 0 0 3px rgba(237,137,54,.2)} 50%{box-shadow:0 0 0 6px rgba(237,137,54,.08)} }

/* ─── UPLOAD PAGE HI-FI ─────────────────────────────── */
.upload-mode-tabs { display:flex; gap:0; background:var(--card); border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-bottom:20px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.upload-mode-tab { flex:1; padding:13px 18px; background:none; border:none; cursor:pointer; font-family:'Inter',sans-serif; font-size:13.5px; font-weight:500; color:var(--muted); display:flex; align-items:center; justify-content:center; gap:8px; transition:all .2s; border-right:1px solid var(--border); }
.upload-mode-tab:last-child { border-right:none; }
.upload-mode-tab:hover:not(.active) { background:#F7FAFC; color:var(--text); }
.upload-mode-tab.active { background:var(--dark); color:#fff; }
.tab-badge { font-size:10px; font-weight:600; padding:2px 6px; border-radius:4px; background:rgba(255,255,255,.18); color:rgba(255,255,255,.8); }
.upload-mode-tab:not(.active) .tab-badge { background:#EDF2F7; color:var(--muted); }

.upload-summary-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.upload-summary-card { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:14px 16px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.upload-summary-val { font-size:22px; font-weight:700; color:var(--text); line-height:1; }
.upload-summary-lbl { font-size:11px; color:var(--muted); margin-top:3px; text-transform:uppercase; letter-spacing:.4px; font-weight:500; }

.upload-dropzone { border:2px dashed #CBD5E0; border-radius:14px; padding:44px 24px; text-align:center; background:#FAFBFC; cursor:pointer; transition:border-color .2s,background .2s; }
.upload-dropzone:hover,.upload-dropzone.drag-over { border-color:var(--blue); background:#EBF8FF; }
.dropzone-icon { width:52px; height:52px; border-radius:14px; background:#EDF2F7; display:flex; align-items:center; justify-content:center; margin:0 auto 14px; transition:background .2s; }
.upload-dropzone:hover .dropzone-icon { background:#BEE3F8; }
.dropzone-title { font-size:15px; font-weight:600; color:var(--dark); margin-bottom:4px; }
.dropzone-sub { font-size:13px; color:var(--muted); margin-bottom:10px; }
.dropzone-meta { font-size:11.5px; color:#A0AEC0; }
.dropzone-browse-btn { display:inline-flex; align-items:center; gap:6px; background:var(--blue); color:#fff; padding:8px 18px; border-radius:8px; font-size:13px; font-weight:600; margin-top:14px; cursor:pointer; border:none; font-family:'Inter',sans-serif; transition:background .18s; }
.dropzone-browse-btn:hover { background:#0055a0; }

.location-select-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:10px; }
.loc-select-card { border:2px solid var(--border); border-radius:12px; padding:13px 14px; cursor:pointer; background:var(--card); transition:border-color .18s,background .18s,box-shadow .18s; position:relative; }
.loc-select-card:hover { border-color:#90CDF4; background:#EBF8FF; }
.loc-select-card.selected { border-color:var(--blue); background:#EBF8FF; box-shadow:0 0 0 3px rgba(0,100,164,.1); }
.loc-select-name { font-size:13px; font-weight:600; color:var(--dark); margin-bottom:3px; }
.loc-select-count { font-size:11.5px; color:var(--muted); }
.loc-select-check { position:absolute; top:10px; right:10px; width:18px; height:18px; border-radius:50%; background:var(--blue); display:none; align-items:center; justify-content:center; }
.loc-select-card.selected .loc-select-check { display:flex; }

.upload-queue-list { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
/* align-items:end so thin progress bar sits near the text baseline, not floating mid-air */
.upload-queue-item { display:grid; grid-template-columns:36px 1fr auto auto 100px 88px; align-items:end; gap:12px; padding:14px 16px; border-bottom:1px solid var(--border); transition:background .15s; }
.upload-queue-item:last-child { border-bottom:none; }
.upload-queue-item:hover { background:#FAFBFC; }
.queue-file-icon { width:36px; height:36px; border-radius:8px; background:#EBF8FF; display:flex; align-items:center; justify-content:center; flex-shrink:0; align-self:center; }
.queue-file-name { font-size:13px; font-weight:500; color:var(--text); }
.queue-file-meta { font-size:11.5px; color:var(--muted); margin-top:3px; }
.queue-location-tag { font-size:11px; font-weight:600; padding:3px 8px; border-radius:6px; background:#EBF8FF; color:var(--blue); white-space:nowrap; align-self:center; }
.queue-size-text { font-size:12px; color:var(--muted); white-space:nowrap; align-self:center; }
/* progress wrap: pushed down with padding-bottom to optically balance with status pill */
.queue-prog-wrap { display:flex; flex-direction:column; gap:5px; padding-bottom:2px; }
.queue-prog-bar  { height:5px; background:#E2E8F0; border-radius:3px; overflow:hidden; }
.queue-prog-fill { height:100%; border-radius:3px; transition:width .5s cubic-bezier(.4,0,.2,1); }
.queue-prog-fill.done   { background:#48BB78; }
.queue-prog-fill.active { background:var(--blue); position:relative; overflow:hidden; }
.queue-prog-fill.active::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent); animation:shimmer 1.6s ease-in-out infinite; }
.queue-prog-pct { font-size:11px; color:var(--muted); text-align:right; }

/* ─── ACTION BUTTON ICONS ───────────────────────────── */
/* Shared icon wrapper — handles bounce / press animations */
.btn-icon {
  display:inline-flex; align-items:center; justify-content:center;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
/* Upload arrow bounces upward on hover */
.btn-upload:hover .btn-icon-upload { transform: translateY(-2px); }
.btn-upload:active                 { transform: scale(.96); }
.btn-upload { transition: background .18s, transform .12s, box-shadow .18s; }
.btn-upload:hover { box-shadow: 0 4px 12px rgba(0,100,164,.25); }

/* Pause bars slightly compress on hover */
.btn-pause:hover .btn-icon-pause { transform: scaleY(.88); }
.btn-pause:active                { transform: scale(.96); }
.btn-pause { transition: background .18s, border-color .18s, transform .12s; }

/* Sync icon spin animation */
@keyframes spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
.btn-sync-icon { display:inline-flex; align-items:center; justify-content:center; transition:transform .18s; }
.btn-sync:hover .btn-sync-icon { animation: spin-once .55s cubic-bezier(.4,0,.2,1) forwards; }
.btn-sync:active                { transform: scale(.96); }
.btn-sync { transition: background .18s, box-shadow .18s, transform .12s; }
.btn-sync:hover { box-shadow: 0 4px 12px rgba(0,100,164,.25); }
.drive-selection-card {
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  padding:12px 14px; border:1.5px solid var(--border); border-radius:10px;
  background:#F7FAFC; margin-bottom:16px;
}
.drive-selection-label {
  font-size:11.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--muted);
}
.drive-selection-name {
  font-size:14px; font-weight:600; color:var(--text); margin-top:4px;
}
.drive-selection-meta {
  font-size:12px; color:var(--muted); margin-top:4px; line-height:1.45;
}
.drive-sync-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.drive-sync-status-card {
  padding:14px 16px; border:1px solid #BEE3F8; background:#F7FBFF; border-radius:12px; margin-bottom:14px;
}
.drive-sync-status-title {
  font-size:14px; font-weight:600; color:var(--dark);
}
.drive-sync-status-sub {
  font-size:12px; color:var(--muted); margin-top:4px; line-height:1.5;
}
.drive-sync-progress-wrap {
  display:flex; align-items:center; gap:10px; margin-top:14px;
}
.drive-sync-progress-bar {
  flex:1; height:8px; background:#D9E8F5; border-radius:999px; overflow:hidden;
}
.drive-sync-progress-fill {
  height:100%; background:linear-gradient(90deg, #3182CE, #2B6CB0); border-radius:999px;
  transition:width .35s cubic-bezier(.4,0,.2,1);
}
.drive-sync-progress-pct {
  min-width:42px; text-align:right; font-size:11px; color:var(--muted); font-weight:600;
}
.drive-run-inline {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.drive-run-note {
  font-size:12.5px; color:var(--muted);
}
.drive-source-grid {
  display:flex; flex-direction:column; gap:10px;
}
.drive-source-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.drive-source-status-row {
  padding-top:8px; border-top:1px solid var(--border); margin-top:2px;
}
.drive-source-label {
  font-size:12px; color:var(--muted);
}
.drive-source-value {
  font-size:13px; font-weight:500; color:var(--text); text-align:right;
}
.drive-source-callout {
  margin-top:14px; padding:13px 14px; border-radius:12px; background:#F7FAFC; border:1px solid var(--border);
}
.drive-source-callout-title {
  font-size:13.5px; font-weight:600; color:var(--dark);
}
.drive-source-callout-sub {
  font-size:12px; color:var(--muted); margin-top:5px; line-height:1.5;
}
.drive-last-sync-title {
  font-size:13.5px; font-weight:600; color:var(--dark);
}
.drive-last-sync-meta {
  font-size:12px; color:var(--muted); margin-top:6px; line-height:1.5;
}

/* Drive tab active — also works for the Drive (light) variant */
.upload-mode-tab.active-drive {
  background: #EBF8FF;
  color: #0064A4;
  border-bottom: 2px solid var(--blue);
}

.drive-sync-banner { display:flex; align-items:center; gap:14px; padding:14px 18px; border-radius:12px; border:1.5px solid; margin-bottom:18px; }
.drive-sync-banner.connected    { background:#F0FFF4; border-color:#9AE6B4; }
.drive-sync-banner.disconnected { background:#FFFAF0; border-color:#F6AD55; }
.drive-sync-banner-icon { width:36px; height:36px; border-radius:9px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.drive-sync-banner.connected    .drive-sync-banner-icon { background:#C6F6D5; }
.drive-sync-banner.disconnected .drive-sync-banner-icon { background:#FEEBC8; }
.drive-sync-banner-title { font-size:13.5px; font-weight:600; }
.drive-sync-banner.connected    .drive-sync-banner-title { color:#22543D; }
.drive-sync-banner.disconnected .drive-sync-banner-title { color:#7B341E; }
.drive-sync-banner-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.drive-sync-reconnect-btn { margin-left:auto; flex-shrink:0; padding:7px 14px; border-radius:8px; background:#ED8936; color:#fff; border:none; font-size:12.5px; font-weight:600; cursor:pointer; font-family:'Inter',sans-serif; transition:background .18s; }
.drive-sync-reconnect-btn:hover { background:#c07530; }

.upload-action-bar { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; background:var(--card); border:1px solid var(--border); border-radius:12px; margin-top:16px; }
.upload-action-bar-info { font-size:13px; color:var(--muted); }
.upload-action-bar-info strong { color:var(--text); }
.upload-action-btns { display:flex; gap:10px; }

/* ─── TOOLTIP SYSTEM ────────────────────────────────── */
.has-tooltip { position:relative; display:inline-flex; align-items:center; }
.has-tooltip .tooltip-box {
  position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%) translateY(-4px);
  background:#1A202C; color:#fff; font-size:12px; line-height:1.5;
  padding:8px 12px; border-radius:8px; white-space:normal; width:230px;
  pointer-events:none; opacity:0;
  transition:opacity .18s, transform .18s;
  box-shadow:0 6px 20px rgba(0,0,0,.22); z-index:200; font-weight:400;
}
/* Arrow points UP toward the icon */
.has-tooltip .tooltip-box::after {
  content:''; position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-bottom-color:#1A202C;
}
.has-tooltip:hover .tooltip-box { opacity:1; transform:translateX(-50%) translateY(0); }

/* Help badge icons */
.help-icon {
  width:16px; height:16px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:700; cursor:default;
  flex-shrink:0; margin-left:5px; line-height:1;
  transition:transform .15s, box-shadow .15s;
}
.help-icon:hover { transform:scale(1.15); }
.help-icon-blue { background:#BEE3F8; color:#2B6CB0; }
.help-icon-blue:hover { box-shadow:0 0 0 3px rgba(66,153,225,.2); }
.help-icon-yellow { background:#FEFCBF; color:#92400E; }
.help-icon-yellow:hover { box-shadow:0 0 0 3px rgba(236,201,75,.25); }

/* ─── RUN MODEL PAGE HI-FI ──────────────────────────── */

/* Settings card two-col */
.model-settings-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:20px;
  margin-bottom:20px;
}

/* Slider hi-fi */
.slider-field-wrap { display:flex; flex-direction:column; gap:6px; }
.slider-label-row  { display:flex; align-items:center; gap:0; }
.slider-track-wrap {
  position:relative; padding:6px 0 0;
}
input[type=range].model-slider {
  -webkit-appearance:none; appearance:none;
  width:100%; height:5px; border-radius:3px; outline:none; cursor:pointer;
  background:linear-gradient(to right, var(--blue) 80%, #E2E8F0 80%);
  transition:background .1s;
}
input[type=range].model-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background:#fff; border:2.5px solid var(--blue);
  box-shadow:0 1px 4px rgba(0,100,164,.25);
  cursor:pointer; transition:transform .15s, box-shadow .15s;
}
input[type=range].model-slider::-webkit-slider-thumb:hover {
  transform:scale(1.2); box-shadow:0 2px 8px rgba(0,100,164,.35);
}
.slider-val-pill {
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--blue); color:#fff;
  font-size:12px; font-weight:700; padding:3px 10px; border-radius:20px;
  min-width:46px; text-align:center; margin-top:8px;
  transition:background .15s;
}
.slider-hint { font-size:11.5px; color:var(--muted); margin-top:6px; line-height:1.45; }

/* Batch size select hi-fi */
.model-select {
  width:100%; border:1.5px solid var(--border); border-radius:10px;
  padding:10px 14px; font-size:13.5px; font-family:'Inter',sans-serif;
  color:var(--text); background:var(--card); outline:none; cursor:pointer;
  transition:border-color .18s, box-shadow .18s; 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='%23718096' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
  padding-right:34px;
}
.model-select:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(0,100,164,.1); }

/* Run button */
.run-model-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 22px; border-radius:10px; border:none;
  font-size:14px; font-weight:600; font-family:'Inter',sans-serif;
  cursor:pointer; transition:background .18s, box-shadow .18s, transform .12s;
}
.run-model-btn.idle {
  background:#276749; color:#fff;
}
.run-model-btn.idle:hover { background:#22543D; box-shadow:0 4px 14px rgba(39,103,73,.35); }
.run-model-btn.running { background:#E53E3E; color:#fff; }
.run-model-btn.running:hover { background:#C53030; box-shadow:0 4px 14px rgba(229,62,62,.3); }
.run-model-btn:active { transform:scale(.97); }
.run-model-btn:disabled { opacity:.55; cursor:not-allowed; box-shadow:none; transform:none; }
.run-btn-icon { display:inline-flex; transition:transform .2s; }
.run-model-btn.idle:hover .run-btn-icon { transform:scale(1.15); }

/* Progress panel */
.run-progress-panel {
  margin-top:18px; padding:18px 20px;
  background:#F0F7FF; border:1.5px solid #BEE3F8;
  border-radius:14px; animation:pageFade .3s ease;
}
.run-progress-header {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;
}
.run-progress-label {
  display:flex; align-items:center; gap:8px;
  font-size:13.5px; font-weight:600; color:var(--blue);
}
.run-progress-eta { font-size:12px; color:var(--muted); }

.run-prog-track {
  height:8px; background:#BEE3F8; border-radius:4px; overflow:hidden; margin-bottom:14px;
}
.run-prog-fill {
  height:100%; background:var(--blue); border-radius:4px;
  transition:width .5s cubic-bezier(.4,0,.2,1);
  position:relative; overflow:hidden;
}
.run-prog-fill::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);
  animation:shimmer 2s ease-in-out infinite;
}
.run-stat-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px;
}
.run-stat-cell {
  background:#fff; border:1px solid #BEE3F8; border-radius:10px;
  padding:10px 12px; text-align:center;
}
.run-stat-cell-val { font-size:17px; font-weight:700; color:var(--dark); line-height:1; }
.run-stat-cell-lbl { font-size:11px; color:var(--muted); margin-top:3px; text-transform:uppercase; letter-spacing:.3px; }

/* Run History table polish */
.run-history-table { width:100%; border-collapse:collapse; }
.run-history-table th {
  text-align:left; padding:10px 16px;
  font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.5px;
  color:var(--muted); border-bottom:1.5px solid var(--border);
  background:#FAFBFC;
}
.run-history-table th:first-child { border-radius:8px 0 0 0; }
.run-history-table th:last-child  { border-radius:0 8px 0 0; }
.run-history-table td {
  padding:12px 16px; font-size:13px;
  border-bottom:1px solid var(--border); color:var(--text);
  transition:background .12s;
}
.run-history-table tbody tr:last-child td { border-bottom:none; }
.run-history-table tbody tr:hover td { background:#F7FAFC; }
.run-history-table .batch-num { font-weight:600; color:var(--dark); font-size:13px; }
.run-history-table .failure-zero { color:var(--muted); }
.run-history-table .failure-warn { color:#C05621; font-weight:600; }

/* Run history expandable detail rows */
.rh-detail-row { display:none; }
.rh-detail-row.open { display:table-row; }
.rh-detail-row td { padding:0 !important; border-bottom:1px solid var(--border) !important; background:#FAFCFF !important; }
.rh-detail-inner { padding:16px 20px; display:grid; grid-template-columns:1fr 1fr 1fr; gap:20px; }
.rh-detail-section { min-width:0; }
.rh-detail-label { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:7px; }
.rh-detail-stat { font-size:13px; color:var(--text); font-weight:500; margin-bottom:3px; }
.rh-detail-stat span { color:var(--muted); font-weight:400; }
.rh-detail-cam-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600;
  margin:0 4px 4px 0;
}
.rh-detail-cam-badge.ok   { background:#F0FFF4; color:#276749; border:1.5px solid #9AE6B4; }
.rh-detail-cam-badge.skip { background:#F7FAFC; color:var(--muted); border:1.5px solid var(--border); }
.rh-expand-btn {
  background:none; border:none; cursor:pointer; padding:4px 8px;
  color:var(--blue); font-size:12px; font-weight:600;
  font-family:'Inter',sans-serif; display:inline-flex; align-items:center; gap:5px;
  border-radius:6px; transition:background .15s;
}
.rh-expand-btn:hover { background:#EBF8FF; }
.rh-expand-btn svg { transition:transform .2s; }
.rh-expand-btn.open svg { transform:rotate(180deg); }

/* Processing pulse dot */
@keyframes proc-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.proc-dot {
  width:8px; height:8px; border-radius:50%; background:var(--blue);
  animation:proc-pulse 1.4s ease-in-out infinite; flex-shrink:0;
}

/* Slider range labels (Low / High) */
.slider-range-row {
  display:flex; align-items:center; justify-content:space-between;
  margin-top:8px; gap:8px;
}
.slider-range-label {
  display:inline-flex; align-items:center; gap:5px;
  font-size:11.5px; font-weight:500; padding:3px 9px; border-radius:20px;
}
.slider-range-label-low  { background:#FFF5F5; color:#C53030; }
.slider-range-label-high { background:#F0FFF4; color:#276749; }
.slider-range-dot {
  width:6px; height:6px; border-radius:50%; flex-shrink:0;
}
.slider-range-dot-low  { background:#FC8181; }
.slider-range-dot-high { background:#68D391; }
.slider-range-sub {
  font-size:10.5px; font-weight:400; opacity:.75; margin-left:1px;
}
