/* ==========================================================================
   HALLO ENGINE — MODERN PRO DESIGN SYSTEM
   Theme: Precision Enterprise / Tech Emerald & Obsidian
   Typography: Plus Jakarta Sans & JetBrains Mono
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "SF Mono", monospace;
  
  /* Primary Emerald Palette */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-active: #065f46;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  /* Dark / Obsidian */
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --dark-accent: #064e3b;
  
  /* Canvas & Surfaces */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  
  /* Borders & Dividers */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-subtle: #f1f5f9;
  
  /* Text */
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  /* Shadows & Elevations */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 20px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -2px rgba(15, 23, 42, 0.04);
  
  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 9999px;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
  background-color: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.25;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

p {
  color: var(--text-body);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Utilities */
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mono, .stat-value, .amount, table { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.01em; }
.amount { font-weight: 700; color: var(--text-main); white-space: nowrap; }
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}
.help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
}
.error-text {
  color: #dc2626;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}
.page-number {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 600;
}

/* Icons */
.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--dark);
  color: #ffffff;
  border-radius: var(--r-md);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   APP SHELL & SIDEBAR
   ========================================================================== */

.shell {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
}

.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.02);
}

/* Brand */
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-decoration: none;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}
.brand span:last-child {
  font-weight: 500;
  color: var(--text-muted);
}

/* Shop Switcher */
.shop-switch {
  margin: 0 16px 18px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.shop-switch:hover {
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.shop-logo {
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.shop-logo .icon {
  width: 17px;
  height: 17px;
}
.shop-switch select {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

/* Navigation */
nav {
  overflow-y: auto;
  padding: 0 12px 16px;
  flex: 1;
}
nav::-webkit-scrollbar {
  width: 4px;
}
nav::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.nav-label {
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 18px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 3px;
  border-radius: var(--r-md);
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  transform: translateX(2px);
}
.nav-item.active {
  color: var(--primary-hover);
  background: var(--primary-light);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--primary-border);
}
.nav-item.active .icon {
  color: var(--primary);
  stroke-width: 2.2;
}
.nav-count {
  margin-left: auto;
  background: #fef3c7;
  color: #b45309;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
}

/* Sidebar Footer & Profile */
.side-footer {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  background: #ffffff;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}
.side-footer .profile > div > div:first-child {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-main);
  line-height: 1.2;
}
.side-footer .small {
  color: var(--text-muted) !important;
  font-size: 11.5px;
  margin-top: 3px;
}

/* ==========================================================================
   TOPBAR & MAIN WRAPPER
   ========================================================================== */

.main-wrap {
  margin-left: 256px;
  width: calc(100% - 256px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.breadcrumb span {
  color: var(--text-subtle);
}
.breadcrumb-shop {
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Top Search */
.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  padding: 7px 14px;
  transition: var(--transition);
}
.top-search:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.top-search input {
  border: 0;
  background: none;
  font-size: 13px;
  width: 180px;
  outline: none;
  color: var(--text-main);
}
.top-search .icon {
  color: var(--text-muted);
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 9px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.demo-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--r-md);
  color: #475569;
  transition: var(--transition);
}
.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.icon-btn:active {
  transform: translateY(0);
}

.menu-btn {
  display: none;
}

/* Main Content Area */
main {
  max-width: 100%;
  margin: 0;
  width: 100%;
  padding: 24px 36px 60px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.page-head p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */

.btn {
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.28);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.38);
}
.btn.primary .icon {
  stroke: #ffffff;
}

.btn.danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #ffffff;
}
.btn.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.btn.text {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 6px 10px;
}
.btn.text:hover {
  background: var(--bg-subtle);
}

.google-btn {
  width: 100%;
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}
.google-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */

.grid {
  display: grid;
  gap: 20px;
}
.grid.two {
  grid-template-columns: 1.6fr 1fr;
}
.grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full {
  grid-column: 1 / -1;
}
.section-space {
  margin-bottom: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.card:hover {
  border-color: #cbd5e1;
}

.card-head {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-subtle);
}
.card-head p {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.card-body {
  padding: 20px 24px;
}

/* Stats Row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition);
}
.stat:hover::before {
  background: linear-gradient(90deg, #10b981, #059669);
}
.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.stat-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-icon .icon {
  width: 19px;
  height: 19px;
}
.stat-value {
  font-size: 32px;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--text-main);
  margin: 12px 0 6px;
  line-height: 1;
}
.stat-note {
  font-size: 12px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   WORKFLOW PIPELINE SUMMARY (6 STAGES)
   ========================================================================== */

.workflow-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 0 24px 24px;
}
.workflow-box {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
  padding: 14px 12px;
  text-align: left;
  min-width: 0;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.workflow-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.workflow-box strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
}
.workflow-box span:first-child {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-body);
  display: flex;
  align-items: center;
}
.workflow-box span:last-child {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}
.workflow-box .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--primary);
  margin-right: 6px;
  flex-shrink: 0;
}

.workflow-box[data-action="status-filter:0"] .dot { background: #f59e0b; }
.workflow-box[data-action="status-filter:1"] .dot { background: #f97316; }
.workflow-box[data-action="status-filter:2"] .dot { background: #0ea5e9; }
.workflow-box[data-action="status-filter:3"] .dot { background: #a855f7; }
.workflow-box[data-action="status-filter:4"] .dot { background: #16a34a; }
.workflow-box[data-action="status-filter:5"] .dot { background: #059669; }

.workflow-box[data-action="status-filter:0"]:hover { border-color: #f59e0b; background: #fffbeb; }
.workflow-box[data-action="status-filter:1"]:hover { border-color: #f97316; background: #fff7ed; }
.workflow-box[data-action="status-filter:2"]:hover { border-color: #0ea5e9; background: #f0f9ff; }
.workflow-box[data-action="status-filter:3"]:hover { border-color: #a855f7; background: #faf5ff; }
.workflow-box[data-action="status-filter:4"]:hover { border-color: #16a34a; background: #f0fdf4; }
.workflow-box[data-action="status-filter:5"]:hover { border-color: #059669; background: #ecfdf5; }

/* ==========================================================================
   TABLES & LISTS
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
}
.table-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  text-align: left;
  background: #fafbfc;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 13px 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 13px;
  color: var(--text-body);
  transition: var(--transition);
}

th:first-child, td:first-child {
  width: 35%;
  min-width: 280px;
}

th:last-child, td:last-child {
  text-align: right;
  width: 48px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background-color: #f8fafc;
}

/* Product Cell */
.product-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  text-decoration: none;
}
.product-cell b {
  display: block;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.3;
}
.product-cell small {
  display: inline-block;
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 11px;
}

.thumb {
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.thumb svg {
  width: 38px;
  height: 38px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-muted);
  background: #fafbfc;
}
.pagination {
  display: flex;
  gap: 6px;
}
.pagination button {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--r-sm);
  color: var(--text-body);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}
.pagination button:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
}
.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   STATUS BADGES (POLISHED PILLS)
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* 0. WAITING_CLEANING */
.status-0 {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
/* 1. CLEANING */
.status-1 {
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
/* 2. WAITING_PHOTO */
.status-2 {
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}
/* 3. PHOTO_PROCESSING */
.status-3 {
  color: #7e22ce;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}
/* 4. READY_TO_SELL */
.status-4 {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
/* 5. PUBLISHED */
.status-5 {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
/* Error & Muted */
.status-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.status-muted {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.condition {
  color: #475569;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
}
.status-availability {
  font-size: 11px;
  color: #dc2626;
  margin-top: 4px;
  font-weight: 600;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

/* Unified Minimalist Filter Bar (All ↕ Search and filter) */
.unified-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.scope-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  padding: 8px 0;
}

.scope-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  transition: var(--transition);
}

.scope-caret {
  width: 13px;
  height: 13px;
  color: #64748b;
  pointer-events: none;
  flex-shrink: 0;
  transition: var(--transition);
}

.scope-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 14px;
}

.scope-select-wrap:hover .scope-label {
  color: var(--primary);
}

.scope-select-wrap:hover .scope-caret {
  color: var(--primary);
}

.filter-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.filter-search-icon {
  width: 16px;
  height: 16px;
  color: #059669;
  flex-shrink: 0;
  transition: var(--transition);
}

.unified-filter-bar:focus-within .filter-search-icon {
  color: var(--primary-hover);
}

.filter-input-wrap input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-main);
  padding: 14px 0;
  font-family: inherit;
}

.filter-input-wrap input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.clear-filter-btn {
  border: 0;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  transition: var(--transition);
  flex-shrink: 0;
}

.clear-filter-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.clear-filter-btn .icon {
  width: 14px;
  height: 14px;
}

/* View switcher pills */
.filter-view-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--r-md);
  gap: 2px;
  flex-shrink: 0;
}

.filter-view-switch .view-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-family: inherit;
}

.filter-view-switch .view-btn .icon {
  width: 13px;
  height: 13px;
}

.filter-view-switch .view-btn:hover {
  color: var(--text-main);
}

.filter-view-switch .view-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.toolbar {
  padding: 14px 24px;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: #fafbfc;
}

.toolbar .search-field {
  flex: 1 1 260px;
  min-width: 200px;
}

.toolbar select.input {
  width: auto;
  min-width: 150px;
  flex: 0 0 auto;
}

.toolbar .btn {
  flex: 0 0 auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.input, select.input, textarea {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
  color: var(--text-main);
  min-width: 0;
  width: 100%;
  transition: var(--transition);
  outline: none;
}
.input:hover, select.input:hover, textarea:hover {
  border-color: var(--line-strong);
}
.input:focus, select.input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 12px;
  background: #ffffff;
  flex: 1;
  min-width: 200px;
  transition: var(--transition);
}
.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-field input {
  border: 0;
  outline: 0;
  width: 100%;
  background: none;
  font-size: 13px;
  color: var(--text-main);
}
.search-field .icon {
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .wide {
  grid-column: 1 / -1;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.switch {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

/* ==========================================================================
   TABS, STEPPER & DETAILS
   ========================================================================== */

.tabbar {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: #ffffff;
}
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}
.tab:hover {
  color: var(--text-main);
}
.tab.active {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

/* Stepper */
.stepper {
  display: flex;
  gap: 10px;
  margin: 22px 0;
}
.step {
  flex: 1;
  min-width: 0;
  border-top: 3px solid var(--line);
  padding-top: 9px;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
}
.step.done {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.step.current {
  border-color: #0f172a;
  color: #0f172a;
  font-weight: 800;
}

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
}
.product-hero {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  min-height: 290px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
}
.product-hero svg {
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.08));
}
.illustration-note {
  position: absolute;
  bottom: 12px;
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-weight: 600;
}

/* Key Value Pairs */
.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  font-size: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-subtle);
}
.kv dt {
  color: var(--text-muted);
  font-weight: 600;
}
.kv dd {
  margin: 0;
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   KANBAN BOARD
   ========================================================================== */

.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(200px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 20px 24px;
}
.kanban-column {
  background: var(--bg-subtle);
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 300px;
  border: 1px solid var(--line);
}
.kanban-column h3 {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
  display: block;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.kanban-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}
.kanban-item b {
  font-size: 13px;
  color: var(--text-main);
  display: block;
  margin-top: 10px;
  line-height: 1.35;
}
.kanban-item small {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   COMBOS & SPECIAL VIEWS
   ========================================================================== */

.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.selection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  background: #ffffff;
  transition: var(--transition);
}
.selection-card:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
}
.selection-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: inset 0 0 0 1px var(--primary-border);
}
.selection-card input {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
}
.selection-card b {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 3px;
}

.price-box {
  padding: 18px;
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  border-radius: var(--r-md);
  margin-top: 16px;
}
.price-box strong {
  font-size: 28px;
  color: var(--primary-hover);
  display: block;
  margin-top: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.combo-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-radius: var(--r-lg);
  min-height: 220px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.combo-art svg {
  width: 110px;
  height: 140px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
}

.preview-placeholder, .upload-zone {
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone h3 {
  margin: 14px 0 6px;
  color: var(--text-main);
}
.upload-zone .icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.sticky-summary {
  position: sticky;
  top: 90px;
}

.notice, .callout {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.callout {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary-hover);
}
.callout .icon {
  color: var(--primary);
}
.callout .btn {
  margin-left: auto;
}

.order-note {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
}

.integration {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-subtle);
  transition: var(--transition);
}
.integration:last-child {
  border-bottom: 0;
}
.integration-logo {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-main);
  flex-shrink: 0;
}
.integration p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.integration .badge {
  margin-left: auto;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-subtle);
}
.list-row:last-child {
  border-bottom: 0;
}

/* Activities feed */
.activity {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-subtle);
}
.activity:last-child {
  border-bottom: 0;
}
.activity-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.activity-mark .icon {
  width: 14px;
  height: 14px;
}
.activity p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}
.activity small {
  font-size: 11px;
  color: var(--text-muted);
}

.bars {
  height: 120px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 10px 4px 22px;
}
.bar {
  flex: 1;
  position: relative;
  background: #cbd5e1;
  border-radius: 4px 4px 0 0;
  min-height: 8px;
  transition: var(--transition);
}
.bar:hover {
  background: var(--primary);
}
.bar:nth-child(3n) {
  background: #059669;
}
.bar span {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

/* ==========================================================================
   LOGIN SCREEN (PRO LUXURY SPLIT VIEW)
   ========================================================================== */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: #ffffff;
}

.login-story {
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.4) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.3) 0%, transparent 60%),
              #03261e;
  color: #ffffff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='rgba(255, 255, 255, 0.05)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.login-story h1 {
  font-size: 46px;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.04em;
  margin: 18px 0;
}
.login-story p {
  color: #a7f3d0;
  font-size: 15px;
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 30px;
}
.login-story .combo-art {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
}

.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #ffffff;
}
.login-box {
  width: 100%;
  max-width: 380px;
}
.login-box h1 {
  font-size: 32px;
  margin-bottom: 8px;
}
.login-box form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.separator {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-subtle);
  margin: 24px 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.separator::before, .separator::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.login-foot {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
}

/* ==========================================================================
   MODAL & DIALOG
   ========================================================================== */

dialog {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 0;
  width: min(600px, calc(100% - 32px));
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  background: #ffffff;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-head {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 18px;
  font-weight: 700;
}
.modal-body {
  padding: 24px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

#toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--primary);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUTS
   ========================================================================== */

@media (min-width: 1500px) {
  main {
    padding: 24px 36px 60px;
  }
  .stats {
    gap: 22px;
  }
}

@media (max-width: 1150px) {
  .grid.two {
    grid-template-columns: 1fr;
  }
  .workflow-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .selection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 24px;
  }
}

@media (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrap {
    margin-left: 0;
    width: 100%;
  }
  .menu-btn {
    display: grid;
  }
  .breadcrumb {
    display: none;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-backdrop.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 25;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
}

/* ==========================================================================
/* ==========================================================================
   EXCEL-LIKE BATCH PRODUCT ENTRY (ADD PRODUCTS) — REFINED PRO DESIGN
   ========================================================================== */

.back-arrow-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
  vertical-align: middle;
}
.back-arrow-link:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  transform: translateX(-3px);
}

.main-full-bleed {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: calc(100vh - 68px) !important;
  max-height: calc(100vh - 68px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.excel-container {
  background: var(--bg-card);
  border: 1px solid #cbd5e1;
  border-radius: var(--r-lg);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  margin-bottom: 32px;
}

.excel-container.full-height {
  border: none;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin: 0;
  max-height: calc(100vh - 68px);
  height: auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-bottom: 1px solid #cbd5e1;
}

.excel-container.full-height .excel-table-wrap {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100vh - 68px - 62px);
  overflow: auto;
  background: #ffffff;
}

.excel-container.full-height .excel-footer {
  flex-shrink: 0;
  border-top: 1px solid #cbd5e1;
  background: #f8fafc;
}

.excel-top-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.excel-kpi {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-xs);
}
.excel-kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.excel-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.excel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #cbd5e1;
  flex-wrap: wrap;
}

.excel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.excel-tip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  background: #e2e8f0;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-weight: 500;
}

.excel-table-wrap {
  width: 100%;
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
  background: #ffffff;
}

.excel-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
  min-width: 1100px;
}

.excel-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 10px;
  border-right: 1px solid #cbd5e1;
  border-bottom: 2px solid #94a3b8;
  white-space: nowrap;
  user-select: none;
  vertical-align: middle;
}
.excel-table th:last-child {
  border-right: none;
}

.excel-col-tag {
  display: inline-block;
  background: #cbd5e1;
  color: #334155;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.excel-table td {
  padding: 0;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: relative;
  vertical-align: middle;
}
.excel-table td:last-child {
  border-right: none;
}

.excel-table tr:nth-child(even) td:not(.col-num) {
  background: #fafbfd;
}

.excel-table tr:hover td:not(.col-num) {
  background: #f0fdf4 !important;
}

.excel-table td.col-num {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  background: #f1f5f9;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  border-right: 2px solid #cbd5e1;
  user-select: none;
}

.excel-input {
  width: 100%;
  height: 42px;
  border: 0;
  outline: none !important;
  background: transparent;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.excel-input::placeholder {
  color: #94a3b8;
  font-style: normal;
  opacity: 0.7;
}
.excel-input:focus,
.excel-input:focus-visible {
  outline: none !important;
  background: #ffffff !important;
  box-shadow: inset 0 0 0 2px var(--primary) !important;
  z-index: 2;
  position: relative;
}

.excel-input.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #047857;
}

.excel-input.amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding-right: 14px;
}

.excel-select {
  width: 100%;
  height: 42px;
  border: 0;
  outline: none !important;
  background: transparent;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  -webkit-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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.excel-select:focus,
.excel-select:focus-visible {
  outline: none !important;
  background-color: #ffffff !important;
  box-shadow: inset 0 0 0 2px var(--primary) !important;
  z-index: 2;
  position: relative;
}

.excel-btn-delete {
  background: none;
  border: none;
  padding: 0;
  color: #94a3b8;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 100%;
  height: 42px;
  transition: all 0.15s ease;
}
.excel-btn-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.excel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  gap: 16px;
  flex-wrap: wrap;
}

.excel-footer-left,
.excel-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.excel-footer-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.excel-footer-label .excel-ready-note {
  color: #047857;
  font-weight: 600;
}

@media (max-width: 520px) {
  main {
    padding: 18px 14px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .workflow-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .selection-grid, .form-grid {
    grid-template-columns: 1fr;
  }
  .top-search {
    display: none;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }
  .page-head .actions {
    width: 100%;
  }
  h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
