﻿:root {
  --ink: #17202a;
  --muted: #6b7280;
  --line: #e8edf3;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --nav: #ffffff;
  --nav-soft: #f1f5f9;
  --brand: #111827;
  --teal: #111827;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #dc2626;
  --green: #16a34a;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fbfcfd 0%, var(--bg) 240px);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  background: var(--nav);
  color: var(--ink);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #ffffff;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand strong,
.brand span,
.sidebar-foot strong,
.sidebar-foot span {
  display: block;
}

.brand span,
.sidebar-foot span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  padding: 11px 13px;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--nav-soft);
  color: var(--ink);
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.workspace {
  padding: 26px 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 17px;
  margin-bottom: 0;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.settlement-section {
  margin-top: 18px;
}

.compact-head {
  margin-bottom: 8px;
}

.connect-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.connect-box strong,
.connect-box span {
  display: block;
}

.connect-box span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.connect-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 11px;
  outline-color: var(--blue);
}

.search input {
  width: min(320px, 48vw);
}

.compact-search input {
  width: min(360px, 62vw);
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  min-height: 39px;
  padding: 8px 13px;
}

.primary {
  background: var(--brand);
  color: white;
}

.ghost {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.danger {
  background: #fff5f5;
  color: var(--red);
  border-color: #fecaca;
}

.mini {
  min-height: 30px;
  padding: 5px 10px;
  background: #eff6ff;
  color: var(--blue);
  border-color: #bfdbfe;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.metrics {
  display: grid;
  gap: 16px;
}

.metric-group {
  display: grid;
  gap: 10px;
}

.metric-group-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric,
.panel,
.stock-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
  min-height: 104px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.stock-warning-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.stock-warning-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  cursor: pointer;
}

.stock-warning-pill:hover {
  filter: brightness(0.97);
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 10px;
  letter-spacing: -0.02em;
}

.metric small {
  color: var(--muted);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.dashboard-new-product-panel {
  grid-column: 1;
  grid-row: 2;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}


.panel-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.form-panel {
  align-self: start;
  display: grid;
  gap: 12px;
}

.form-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-builder {
  display: grid;
  gap: 8px;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.chip {
  min-height: 28px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.chip span {
  color: #64748b;
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden {
  display: none;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.excel-wrap {
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  background: #fafbfc;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.excel-table th,
.excel-table td {
  padding: 0;
  border-right: 1px solid var(--line);
}

.excel-table th:last-child,
.excel-table td:last-child {
  border-right: 0;
}

.excel-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.excel-table input,
.excel-table select {
  width: 100%;
  min-width: 150px;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: block;
}

.excel-table .row-check {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  display: block;
  margin: 0 auto;
}

.excel-table input:focus,
.excel-table select:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px var(--blue);
  outline: 0;
}

.product-picker {
  position: relative;
}

.product-picker-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  width: min(360px, 70vw);
  max-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.product-picker-option {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  text-align: left;
}

.product-picker-option:hover {
  background: #f8fafc;
}

.product-picker-option span {
  display: grid;
  gap: 2px;
}

.product-picker-option small {
  color: var(--muted);
}

.product-picker-empty {
  padding: 12px;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.group-row {
  background: #f8fbff;
}

.group-row:hover {
  background: #eef6ff;
}

.group-row td {
  font-weight: 600;
}

.detail-row {
  background: #ffffff;
}

.detail-row td {
  color: var(--muted);
}

.toggle-cell {
  min-height: 28px;
  padding: 4px 9px;
  margin-right: 8px;
  background: #ffffff;
  color: var(--blue);
  border-color: #bfdbfe;
}

.stock-adjuster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stock-adjuster input {
  width: 70px;
  min-height: 30px;
  padding: 4px 6px;
  text-align: center;
}

.stock-adjuster .mini {
  width: 32px;
  min-height: 30px;
  padding: 4px 0;
  font-weight: 800;
}

.product-thumb {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  transform-origin: center;
}

.product-thumb:not(.empty-thumb):hover {
  position: relative;
  z-index: 120;
  transform: scale(3.2);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
}

.empty-thumb {
  line-height: 46px;
  text-align: center;
}

.expense-image-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.expense-edit-image-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.image-preview-modal.hidden,
.expense-edit-image-preview.hidden {
  display: none;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.image-preview-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  max-height: 92vh;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.34);
  overflow: hidden;
}

.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.image-preview-panel img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 54px);
  object-fit: contain;
  background: #f8fafc;
}

tfoot td {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.total-row td {
  color: var(--ink);
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.status.warn {
  background: #fff7ed;
  color: var(--amber);
}

.status.ok {
  background: #ecfdf5;
  color: var(--green);
}

.activity {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-item strong {
  font-size: 14px;
}

.activity-item span {
  color: var(--muted);
  font-size: 12px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.stock-card {
  box-shadow: none;
  padding: 14px;
}

.stock-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stock-card h3 {
  font-size: 15px;
  margin: 0;
}

.stock-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 12px;
}

.stock-number {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    min-width: max-content;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar,
  .main-grid,
  .split {
    grid-template-columns: 1fr;
    display: grid;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .metric-group-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace {
    padding: 16px;
  }

  .metric-group-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .search input {
    width: 100%;
  }
}


/* Clean CONLISE interface polish */
.ghost:hover,
.mini:hover,
.nav-item:hover {
  filter: brightness(0.98);
}

.panel-head h2 {
  letter-spacing: -0.01em;
}

tbody tr:hover td {
  background: #fbfdff;
}

.sortable-th {
  padding: 0;
}

.sort-header {
  width: 100%;
  min-width: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sort-header:hover,
.sort-header.active {
  color: var(--muted);
}

.sort-pair {
  display: inline-grid;
  grid-template-columns: 6px 6px;
  column-gap: 1px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  color: #a5b3c2;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.sort-pair.asc span:first-child,
.sort-pair.desc span:last-child {
  color: var(--primary);
}

.danger {
  background: #fff7f7;
}


/* Sidebar navigation refinement */
.sidebar {
  overflow: hidden;
}

.nav {
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active {
  font-weight: 700;
}

@media (max-width: 980px) {
  .sidebar {
    overflow: visible;
  }

  .nav-item {
    min-width: max-content;
    overflow: visible;
  }
}


/* Keep sidebar options inside the visible panel */
.shell {
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  min-height: 0;
}

.nav {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.sidebar-foot {
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .shell {
    height: auto;
    overflow: visible;
  }

  .sidebar {
    height: auto;
  }

  .nav {
    overflow-y: hidden;
    padding-right: 0;
  }
}


/* Fix sidebar width overflow */
.shell {
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar,
.brand,
.nav,
.nav-item,
.sidebar-foot {
  max-width: 100%;
  min-width: 0;
}

.brand > div {
  min-width: 0;
}

.brand strong,
.brand span,
.sidebar-foot strong,
.sidebar-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  padding-right: 0;
  overflow-x: hidden;
}

.nav-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .nav {
    overflow-x: auto;
  }
}


/* Slightly wider sidebar */
.shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
}


/* Product form overflow fix */
.workspace {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 56px;
}

.form-panel {
  padding-bottom: 24px;
}

#productForm {
  max-height: calc(100vh - 78px);
  overflow-y: auto;
  padding-bottom: 28px;
  scrollbar-width: thin;
}

#productForm .primary {
  margin-top: 4px;
  margin-bottom: 4px;
}

@media (max-width: 980px) {
  .workspace {
    height: auto;
    overflow-y: visible;
    padding-bottom: 32px;
  }

  #productForm {
    max-height: none;
    overflow-y: visible;
  }
}


/* Keep product safety stock field fully visible */
#productForm label:has(input[name="safetyStock"]) {
  margin-bottom: 18px;
}

#productForm button[type="submit"] {
  margin-top: 10px;
}

#productForm {
  padding-bottom: 44px;
}


/* =========================
   CONLISE UI Redesign v2
   Clean, simple, spacious
   ========================= */
:root {
  --ink: #111827;
  --muted: #6b7280;
  --soft: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --brand: #111827;
  --brand-soft: #f3f4f6;
  --blue: #2563eb;
  --teal: #0f766e;
  --amber: #d97706;
  --red: #dc2626;
  --green: #16a34a;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px rgba(16, 24, 40, 0.06);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04);
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 320px),
    linear-gradient(180deg, #fbfcfe 0%, #f6f7f9 280px, #f6f7f9 100%);
  color: var(--ink);
}

.shell {
  grid-template-columns: 244px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.7) inset;
  gap: 18px;
}

.brand {
  min-height: 58px;
  padding: 4px 6px 16px;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.16);
  font-size: 17px;
}

.brand strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 2px 0;
}

.nav-item {
  min-height: 40px;
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  color: #4b5563;
  background: transparent;
  font-size: 14px;
  line-height: 1.2;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.nav-item:hover {
  background: #f3f4f6;
  color: var(--ink);
  filter: none;
}

.nav-item.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.13);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 6px 2px;
  border-top: 1px solid var(--line);
}

.sidebar-foot span {
  color: var(--muted);
}

.sidebar-foot strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.workspace {
  height: 100vh;
  overflow-y: auto;
  padding: 28px 30px 64px;
}

.topbar {
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 16px;
  letter-spacing: -0.015em;
}

.toolbar,
.inline-tools,
.form-actions,
.connect-actions {
  gap: 10px;
}

.search {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 12px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
  outline: 0;
}

.search input {
  width: min(340px, 48vw);
}

button {
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 650;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.primary:hover {
  background: #030712;
}

.ghost {
  background: #ffffff;
  border-color: var(--line);
  color: #374151;
  box-shadow: var(--shadow-soft);
}

.ghost:hover {
  background: #f9fafb;
  border-color: var(--line-strong);
  filter: none;
}

.danger {
  background: #fff7f7;
  color: var(--red);
  border-color: #fecaca;
  box-shadow: var(--shadow-soft);
}

.danger:hover {
  background: #fef2f2;
}

.mini {
  min-height: 31px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--blue);
  border-color: #dbeafe;
  box-shadow: none;
}

.view.active {
  gap: 20px;
}

.metrics {
  gap: 16px;
}

.metric-group-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.metric,
.panel,
.stock-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 108px;
  padding: 17px 18px;
}

.metric span,
.metric small,
.panel-head span {
  color: var(--muted);
}

.metric strong {
  margin-top: 9px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.main-grid,
.split {
  gap: 20px;
}

.panel {
  padding: 18px;
}

.panel-head {
  min-height: 34px;
  margin-bottom: 14px;
}

.form-panel {
  gap: 13px;
  align-self: start;
}

.form-panel label {
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 650;
}

.form-row {
  gap: 12px;
}

.option-chips {
  gap: 7px;
}

.chip {
  min-height: 29px;
  border-radius: 999px;
  background: #f5f7ff;
  border-color: #dfe6ff;
  color: #3730a3;
}

.table-wrap {
  border-radius: 14px;
  border-color: var(--line);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfd;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

tbody tr:hover td {
  background: #f9fbff;
}

.group-row {
  background: #fbfcff;
}

.group-row:hover {
  background: #f5f8ff;
}

.detail-row td {
  color: var(--muted);
  background: #ffffff;
}

.toggle-cell {
  min-height: 29px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  border-color: #dbeafe;
}

.product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border-color: var(--line);
  background: #f8fafc;
}

.empty-thumb {
  line-height: 44px;
}

.status {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
}

.status.warn {
  background: #fff7ed;
  color: var(--amber);
}

.status.ok {
  background: #ecfdf5;
  color: var(--green);
}

.activity {
  gap: 9px;
}

.activity-item {
  padding: 10px 0;
}

.activity-item:first-child {
  padding-top: 0;
}

.stock-grid {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.stock-card {
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.stock-number {
  font-size: 30px;
  letter-spacing: -0.035em;
}

.excel-wrap {
  border-radius: 14px;
}

.excel-table input,
.excel-table select {
  min-height: 40px;
  border-radius: 0;
  box-shadow: none;
}

.excel-table input:focus,
.excel-table select:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.75);
}

.product-picker-menu {
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.product-picker-option {
  min-height: 58px;
  padding: 9px 10px;
}

.connect-box {
  border-radius: 14px;
  background: #fbfcfd;
}

#productForm,
.form-panel {
  overflow: visible;
}

#productForm {
  max-height: none;
  padding-bottom: 28px;
}

#productForm label:has(input[name="safetyStock"]) {
  margin-bottom: 18px;
}

@media (max-width: 1180px) {
  .split {
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  }

  .workspace {
    padding: 24px 22px 54px;
  }
}

@media (max-width: 980px) {
  .shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px;
  }

  .brand {
    border-bottom: 0;
    padding-bottom: 8px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  .nav-item {
    min-width: max-content;
  }

  .workspace {
    height: auto;
    overflow: visible;
    padding: 22px 18px 40px;
  }

  .topbar,
  .main-grid,
  .split {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 25px;
  }

  .metric-group-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .panel,
  .metric {
    border-radius: 14px;
  }

  .search input,
  .compact-search input {
    width: 100%;
  }
}


/* Narrow left sidebar option boxes without changing text size */
.sidebar .nav {
  padding-left: 6px;
  padding-right: 6px;
}

.sidebar .nav-item {
  width: 100%;
  max-width: 100%;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

.sidebar .brand,
.sidebar .sidebar-foot {
  margin-left: 6px;
  margin-right: 6px;
}

@media (max-width: 980px) {
  .sidebar .nav {
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar .brand,
  .sidebar .sidebar-foot {
    margin-left: 0;
    margin-right: 0;
  }
}


/* Make left-side form fields fit fully inside their panels */
.split {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.form-panel {
  overflow: hidden;
}

.form-panel input,
.form-panel select,
.form-panel button,
.option-builder,
.option-chips {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-panel .form-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.form-panel .form-row label {
  min-width: 0;
}

.form-panel .form-row input,
.form-panel .form-row select {
  min-width: 0;
}

@media (max-width: 1180px) {
  .split {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.table-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.product-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.purchase-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.shortage-variant-tools {
  display: grid;
  gap: 8px;
}

.muted-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#purchaseForm select[multiple],
#shortageForm select[multiple] {
  min-height: 112px;
  padding: 8px;
}

#purchaseForm select[multiple] option,
#shortageForm select[multiple] option {
  padding: 6px 8px;
}

.status.danger-status {
  background: #fef2f2;
  color: var(--red);
}

#purchaseForm input[name="purchasePrice"][readonly] {
  background: #f8fafc;
  color: var(--muted);
  cursor: not-allowed;
}

/* Product table: compact text and aligned columns */
#products .list-panel table {
  min-width: 1180px;
  table-layout: auto;
}

#products .list-panel th,
#products .list-panel td {
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
}

#products .list-panel th {
  font-size: 11px;
  letter-spacing: 0;
}

/* Product columns: center media/spec/date/actions, right align prices */
#products .list-panel th:nth-child(1),
#products .list-panel td:nth-child(1),
#products .list-panel th:nth-child(2),
#products .list-panel td:nth-child(2),
#products .list-panel th:nth-child(5),
#products .list-panel td:nth-child(5),
#products .list-panel th:nth-child(8),
#products .list-panel td:nth-child(8),
#products .list-panel th:nth-child(9),
#products .list-panel td:nth-child(9),
#products .list-panel th:nth-child(14),
#products .list-panel td:nth-child(14),
#products .list-panel th:nth-child(15),
#products .list-panel td:nth-child(15) {
  text-align: center;
}

#products .list-panel th:nth-child(3),
#products .list-panel td:nth-child(3),
#products .list-panel th:nth-child(4),
#products .list-panel td:nth-child(4),
#products .list-panel th:nth-child(6),
#products .list-panel td:nth-child(6),
#products .list-panel th:nth-child(7),
#products .list-panel td:nth-child(7) {
  text-align: left;
}

#products .list-panel th:nth-child(10),
#products .list-panel td:nth-child(10),
#products .list-panel th:nth-child(11),
#products .list-panel td:nth-child(11),
#products .list-panel th:nth-child(12),
#products .list-panel td:nth-child(12),
#products .list-panel th:nth-child(13),
#products .list-panel td:nth-child(13) {
  text-align: right;
}

#products .list-panel .group-row td {
  font-weight: 600;
}

#products .list-panel .product-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

#products .list-panel .empty-thumb {
  line-height: 38px;
}

.product-thumb:not(.empty-thumb) {
  cursor: zoom-in;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  transform-origin: center;
}

.product-thumb:not(.empty-thumb):hover {
  position: relative;
  z-index: 120;
  transform: scale(3.2);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
}

#products .list-panel .status {
  min-width: 44px;
  justify-content: center;
  padding: 3px 7px;
  font-size: 11px;
}

#products .list-panel .table-actions {
  justify-content: center;
  gap: 6px;
}

#products .list-panel .mini,
#products .list-panel .toggle-cell {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}




.status.muted-status {
  background: #f1f5f9;
  color: var(--muted);
}

#products .list-panel th:nth-child(16),
#products .list-panel td:nth-child(16) {
  text-align: center;
}

/* Keep product expand button aligned at a fixed position */
#products .list-panel th:nth-child(1),
#products .list-panel td:nth-child(1) {
  min-width: 160px;
  width: 160px;
}

#products .list-panel td:nth-child(1) {
  text-align: left;
}

#products .list-panel td:nth-child(1) .toggle-cell {
  width: 52px;
  min-width: 52px;
  margin-right: 8px;
  text-align: center;
}

/* Product table after removing base purchase price */
#products .list-panel table {
  min-width: 1120px;
}

#products .list-panel th:nth-child(10),
#products .list-panel td:nth-child(10),
#products .list-panel th:nth-child(11),
#products .list-panel td:nth-child(11),
#products .list-panel th:nth-child(12),
#products .list-panel td:nth-child(12) {
  text-align: right;
}

#products .list-panel th:nth-child(13),
#products .list-panel td:nth-child(13),
#products .list-panel th:nth-child(14),
#products .list-panel td:nth-child(14),
#products .list-panel th:nth-child(15),
#products .list-panel td:nth-child(15) {
  text-align: center;
}

/* Product table after adding profit rate and stock status */
#products .list-panel table {
  min-width: 1260px;
}

#products .list-panel th:nth-child(10),
#products .list-panel td:nth-child(10),
#products .list-panel th:nth-child(11),
#products .list-panel td:nth-child(11),
#products .list-panel th:nth-child(12),
#products .list-panel td:nth-child(12) {
  text-align: right;
}

#products .list-panel th:nth-child(13),
#products .list-panel td:nth-child(13),
#products .list-panel th:nth-child(14),
#products .list-panel td:nth-child(14),
#products .list-panel th:nth-child(15),
#products .list-panel td:nth-child(15),
#products .list-panel th:nth-child(16),
#products .list-panel td:nth-child(16),
#products .list-panel th:nth-child(17),
#products .list-panel td:nth-child(17) {
  text-align: center;
}


.product-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.product-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.product-filter-bar select {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 12px;
}

.product-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  min-width: 0;
}

.product-filter-actions .mini,
.product-import-actions .mini,
.product-export-actions .mini {
  width: 92px;
  min-width: 92px;
  min-height: 34px;
  padding-inline: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  font-size: 11px;
}

.product-export-actions,
.product-import-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .product-filter-actions {
    justify-content: stretch;
  }

  .product-filter-actions .mini,
  .product-import-actions,
  .product-import-actions .mini,
  .product-export-actions,
  .product-export-actions .mini {
    width: 100%;
    min-width: 0;
  }
}

/* 閫氱敤绛涢€夋爮 */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar select {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 12px;
  background: #ffffff;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
}

.filter-actions .mini {
  width: auto;
  min-height: 34px;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

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

.pagination-summary {
  color: var(--muted);
  font-size: 12px;
}

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

.pagination .mini {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

#purchaseForm .product-picker {
  width: 100%;
}

#purchaseForm .product-picker-menu {
  width: 100%;
  min-width: 320px;
  z-index: 80;
}

#purchaseForm {
  overflow: visible;
}

#expenseForm .product-picker,
#influencerForm .product-picker,
#shortageForm .product-picker,
#repairOutForm .product-picker {
  width: 100%;
}

#expenseForm .product-picker-menu,
#influencerForm .product-picker-menu,
#shortageForm .product-picker-menu,
#repairOutForm .product-picker-menu {
  width: 100%;
  min-width: 320px;
  z-index: 80;
}

#expenseForm,
#influencerForm,
#shortageForm,
#repairOutForm {
  overflow: visible;
}

#influencers .list-panel th:nth-child(17),
#influencers .list-panel td:nth-child(17),
#influencers .list-panel th:nth-child(22),
#influencers .list-panel td:nth-child(22) {
  min-width: 180px;
  max-width: 260px;
  white-space: nowrap;
}

.expandable-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  max-width: 260px;
}

.expandable-text span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expandable-text.expanded {
  align-items: start;
}

.expandable-text.expanded span {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  width: auto;
  min-height: 0;
  box-shadow: none;
}


.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.login-brand strong,
.login-brand span,
.login-card label {
  display: block;
}

.login-brand span,
.login-tip {
  color: var(--muted);
  font-size: 13px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 650;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #f8fafc;
}

.login-card .remember-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.login-card .remember-row input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand);
}

.login-card .remember-row span {
  display: inline;
}

.login-card button {
  width: 100%;
}

.login-tip {
  margin: 0;
  text-align: center;
}

.login-screen.hidden {
  display: none;
}


.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  min-width: 360px;
}

.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  white-space: nowrap;
}

.permission-check input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand);
}

.permission-tip {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

#permissions .table-wrap {
  min-height: 220px;
}

.shortage-qty-matrix {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.shortage-qty-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.shortage-qty-head span {
  color: var(--muted);
  font-size: 12px;
}

.shortage-qty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.shortage-qty-item {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

.shortage-qty-item input {
  width: 100%;
  min-width: 0;
}

/* CONLISE avatar */
.brand-mark {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Dashboard quick navigation */
.metric-link,
.dashboard-link-row {
  cursor: pointer;
}

.metric-link {
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.metric-link:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

tr.dashboard-link-row:hover td {
  background: #f8fafc;
}

.activity-item.dashboard-link-row:hover strong {
  color: var(--blue);
}

#workOrders textarea,
#dailyReports textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

.work-order-task,
.long-text-cell {
  min-width: 220px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast-card {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  padding: 14px 16px;
  text-align: left;
  color: #111827;
  cursor: pointer;
}

.toast-card strong,
.toast-card span {
  display: block;
}

.toast-card strong {
  margin-bottom: 6px;
  color: #1d4ed8;
  font-size: 14px;
}

.toast-card span {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

.nav-item.has-badge {
  position: relative;
  padding-right: 44px;
}

.nav-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
}

.nav-item.active .nav-badge {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(127, 29, 29, 0.28);
}





.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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






.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.multi-select-trigger:hover,
.multi-select:focus-within .multi-select-trigger {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
  background: #fff;
}

.multi-select-trigger span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  color: #334155;
}

.multi-select-arrow {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  font-size: 15px;
}

.multi-select-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.multi-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
  font-size: 13px;
}

.multi-select-search:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: #fff;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.multi-select-option + .multi-select-option {
  margin-top: 4px;
}

.multi-select-option:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.12);
}

.multi-select-option:has(input:checked) {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.26);
}

.multi-select-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--primary);
}

.multi-select-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}



.rate-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 58px;
  font-weight: 700;
  color: var(--text);
}

.rate-cell small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.icp-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.icp-link:hover {
  color: var(--ink);
  text-decoration: underline;
}
