:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, .92);
  --surface-strong: #fff;
  --line: rgba(15, 23, 42, .08);
  --text: #101114;
  --muted: #686b74;
  --blue: #0877e8;
  --orange: #ff5a00;
  --green: #138a4b;
  --red: #d92d3a;
  --purple: #6d4ce8;
  --shadow: 0 12px 40px rgba(18, 24, 40, .06);
  --radius: 20px;
  --sidebar: 236px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar);
  display: flex; flex-direction: column; padding: 24px 18px 16px;
  background: rgba(255,255,255,.82); border-right: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(28px);
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 28px; color: inherit; text-decoration: none; }
.brand img { width: 37px; height: 37px; filter: drop-shadow(0 7px 14px rgba(20,35,60,.12)); }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 10px; }
.navigation { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 4px; }
.navigation button, .logout-button {
  border: 0; background: transparent; width: 100%; min-height: 43px; border-radius: 13px;
  padding: 0 12px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center;
  gap: 8px; text-align: left; cursor: pointer; color: #51545c; transition: .18s ease;
}
.navigation button:hover, .logout-button:hover { background: rgba(15,23,42,.045); color: #15171b; }
.navigation button.active { background: #ececef; color: #111318; font-weight: 650; }
.navigation button span, .logout-button span { color: #9799a1; text-align: center; font-size: 16px; }
.navigation button.active span { color: var(--orange); }
.navigation button small {
  border-radius: 999px; padding: 3px 7px; background: #fff2e9; color: #b74300;
  font-size: 9px; font-weight: 700;
}
.nav-group { display: grid; gap: 2px; }
.navigation .nav-parent small {
  padding: 0; background: transparent; color: #92949b; font-size: 12px;
  transition: transform .18s ease;
}
.nav-group.open .nav-parent small { transform: rotate(180deg); }
.nav-submenu {
  display: grid; gap: 2px; max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .2s ease, opacity .16s ease;
}
.nav-group.open .nav-submenu { max-height: 90px; opacity: 1; }
.navigation .nav-submenu button {
  position: relative; min-height: 35px; padding: 0 12px 0 39px;
  display: flex; align-items: center; border-radius: 10px; font-size: 11.5px;
}
.navigation .nav-submenu button span {
  position: absolute; left: 23px; width: 5px; height: 5px; border-radius: 50%;
  background: #c2c4ca;
}
.navigation .nav-submenu button.active { background: #f0f0f2; }
.navigation .nav-submenu button.active span { background: var(--orange); }
.navigation .nav-spacer { margin-top: auto; }
.logout-form { margin: 4px 0 0; }
.main { grid-column: 2; min-width: 0; padding: 32px clamp(24px, 4vw, 64px) 48px; }
.main.metrics-main { padding-inline: clamp(12px, 2vw, 28px); }
.main.tasks-main { padding-inline: clamp(12px, 2vw, 28px); }
.topbar { min-height: 74px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1500px; margin: 0 auto; }
.topbar small { display: block; margin-bottom: 4px; color: #989aa2; font-weight: 700; font-size: 10px; letter-spacing: .13em; }
.topbar h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.045em; line-height: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  min-height: 40px; padding: 0 9px 0 10px; border: 1px solid var(--line); border-radius: 12px;
  display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.85);
  color: #51545c; cursor: pointer; font-size: 10px; font-weight: 700; transition: .16s ease;
}
.theme-toggle:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(15,23,42,.08); }
.theme-toggle:focus-visible { outline: 3px solid rgba(8,119,232,.2); outline-offset: 1px; }
.theme-toggle:disabled { opacity: .6; cursor: wait; transform: none; }
.theme-toggle-icon { width: 14px; text-align: center; font-size: 14px; line-height: 1; }
.theme-toggle > i {
  position: relative; width: 30px; height: 18px; border-radius: 999px; background: #d8d9dd;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.05); transition: .18s ease;
}
.theme-toggle > i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: .18s ease;
}
.theme-toggle[aria-pressed="true"] > i { background: var(--orange); }
.theme-toggle[aria-pressed="true"] > i::after { transform: translateX(12px); }
.content { max-width: 1500px; margin: 22px auto 0; display: grid; gap: 14px; }

.primary-action-wrap { position: relative; z-index: 30; }
.primary-action-wrap[hidden], .register-menu[hidden] { display: none; }
#primary-action .register-chevron { font-size: 11px; transition: transform .16s ease; }
#primary-action[aria-expanded="true"] .register-chevron { transform: rotate(180deg); }
.register-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 190px; padding: 6px;
  display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 15px;
  background: rgba(255,255,255,.96); box-shadow: 0 18px 46px rgba(20,25,35,.14);
  backdrop-filter: blur(22px);
}
.register-choice {
  min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; display: flex;
  align-items: center; gap: 10px; cursor: pointer; text-align: left; transition: .15s ease;
}
.register-choice span {
  width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px;
  font-size: 16px; font-weight: 700;
}
.register-choice strong { font-size: 12px; }
.register-choice.income { color: #137044; background: #ecf8f1; }
.register-choice.income span { background: #d7f1e2; }
.register-choice.expense { color: #b32b38; background: #fff0f1; }
.register-choice.expense span { background: #fbdcdf; }
.register-choice:hover { transform: translateY(-1px); filter: saturate(1.08); }
.register-choice:focus-visible { outline: 3px solid rgba(8,119,232,.14); outline-offset: 1px; }

.button {
  border: 1px solid var(--line); background: rgba(255,255,255,.85); min-height: 40px;
  padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; font-weight: 650; text-decoration: none; transition: .16s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(15,23,42,.08); }
.button[hidden] { display: none; }
.button:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.button.pending-feature:disabled { cursor: not-allowed; }
.button.primary { color: #fff; border-color: #111318; background: #111318; }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button.subtle { background: #f2f2f4; border-color: transparent; }
.button.danger { margin-right: auto; border-color: transparent; background: #fff0f1; color: var(--red); }
.button.wide { width: 100%; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-grid.home-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-grid.compact { grid-template-columns: repeat(8, minmax(112px, 1fr)); gap: 8px; }
.kpi-grid.compact.metrics-kpis { grid-template-columns: repeat(9, minmax(90px, 1fr)); }
.kpi-grid.marketplace-summary { grid-template-columns: repeat(8, minmax(112px, 1fr)); }
.kpi {
  position: relative; min-width: 0; min-height: 120px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.kpi-grid.compact .kpi { min-height: 86px; padding: 13px 14px; border-radius: 16px; box-shadow: none; }
.kpi-label { color: #676a73; font-size: 12px; display: flex; align-items: center; gap: 5px; min-width: 0; }
.kpi-label-copy { min-width: 0; display: inline-flex; align-items: center; gap: 5px; }
.kpi-label-copy > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-value { margin-top: 16px; font-size: clamp(23px, 2.2vw, 32px); font-weight: 750; letter-spacing: -.045em; white-space: nowrap; }
.kpi-grid.compact .kpi-value { margin-top: 9px; font-size: 20px; }
.metrics-kpis .kpi { min-height: 102px; }
.metrics-kpis .kpi-label { align-items: flex-start; flex-wrap: wrap; gap: 4px; font-size: 10px; }
.metrics-kpis .kpi-label-copy { width: 100%; }
.metrics-kpis .kpi-label .change { margin: 0; }
.metrics-kpis .kpi-value { margin-top: 7px; }
.metrics-kpis .sales-units { font-size: 17px; }
.metrics-kpis .sales-units small {
  color: #777b84; font-size: 10px; font-weight: 750; letter-spacing: -.01em;
}
.kpi-value.has-tip { cursor: help; }
.change {
  margin-left: auto; flex: 0 0 auto; border-radius: 999px; padding: 3px 7px;
  font-size: 10px; font-weight: 700; background: #f0f1f3; color: #676a73;
}
.change.good { color: #08783f; background: #e9f8ef; }
.change.bad { color: #bd2630; background: #ffedef; }
.info[data-tip] {
  position: relative; flex: 0 0 15px; width: 15px; height: 15px; display: inline-grid; place-items: center;
  border: 1px solid #bec1c9; border-radius: 50%; color: #7c7f88; font-size: 9px; font-style: normal; cursor: help;
}
.app-tooltip {
  position: fixed; z-index: 240; top: 0; left: 0; pointer-events: none; visibility: hidden; opacity: 0;
  width: max-content; max-width: min(360px, calc(100vw - 20px)); padding: 8px 10px; border-radius: 9px;
  background: rgba(20,22,27,.97); color: white; font-size: 11px; font-weight: 600; letter-spacing: 0;
  line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 10px 28px rgba(0,0,0,.22);
  transform: translateY(-2px); transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.app-tooltip.visible { visibility: visible; opacity: 1; transform: none; }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-header { min-height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.header-chip {
  display: inline-flex; align-items: center; min-height: 22px; margin-left: 7px; padding: 0 8px;
  border-radius: 999px; background: #f0f1f3; color: #747780; font-size: 9px; font-weight: 750;
  vertical-align: middle;
}
.panel-body { padding: 18px 20px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 14px; }
.empty { color: var(--muted); text-align: center; padding: 32px 16px; }

.home-priority-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 14px; }
.home-focus-panel, .home-notifications-panel { min-height: 270px; }
.home-task-list, .home-notification-list { max-height: 330px; overflow: auto; scrollbar-width: thin; }
.home-task-group { padding: 11px 18px 4px; }
.home-task-group + .home-task-group { border-top: 1px solid var(--line); }
.home-task-group-title { min-height: 26px; display: flex; align-items: center; justify-content: space-between; color: #737780; }
.home-task-group-title strong { font-size: 10px; letter-spacing: .025em; text-transform: uppercase; }
.home-task-group-title strong em { color: #a74a16; font-style: normal; font-weight: 750; text-transform: none; }
.overdue-group .home-task-group-title > span { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: #fff0f1; color: var(--red); font-size: 9px; font-weight: 750; }
.home-task-group-title time { font-size: 9px; }
.home-task-free {
  min-height: 34px; display: flex; align-items: center; border-top: 1px solid rgba(15,23,42,.055);
  color: #a0a3aa; font-size: 10px;
}
.home-task-row {
  min-height: 47px; padding: 7px 2px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; border-top: 1px solid rgba(15,23,42,.055);
}
.home-task-row.priority-urgent { margin-inline: -5px; padding-inline: 8px 5px; border-radius: 9px; background: #fff1f3; }
.home-task-row.priority-high { margin-inline: -5px; padding-inline: 8px 5px; border-radius: 9px; background: #fff7e8; }
.home-task-row.priority-low { margin-inline: -5px; padding-inline: 8px 5px; border-radius: 9px; background: #eef8f3; }
.home-task-check {
  width: 17px; height: 17px; padding: 0; border: 1.5px solid #b8bbc2; border-radius: 50%;
  background: transparent; cursor: pointer; transition: .14s;
}
.home-task-check:hover { border-color: var(--green); background: #eaf8f0; box-shadow: inset 0 0 0 4px white; }
.home-task-row.overdue .home-task-check { border-color: #e06c76; }
.home-task-content {
  min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; text-align: left;
}
.home-task-content:hover .home-item-title { color: #0877d1; }
.home-item-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.home-task-row small { display: block; margin-top: 3px; color: #8a8d95; font-size: 9px; }
.home-task-row time { color: var(--red); font-size: 9px; }
.home-clear-state { min-height: 142px; display: grid; place-content: center; justify-items: center; gap: 9px; color: #80838b; }
.home-clear-state span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #eaf8f0; color: var(--green); font-weight: 800; }
.home-clear-state strong { font-size: 11px; font-weight: 600; }
.notification-header-actions { display: flex; align-items: center; gap: 8px; }
.notification-clear-button {
  height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent;
  color: #6f737b; cursor: pointer; font: inherit; font-size: 10px; font-weight: 700;
}
.notification-clear-button:hover { background: #f0f1f3; color: #23262b; }
.notification-clear-button:focus-visible,
.notification-dismiss:focus-visible { outline: 2px solid rgba(8,119,232,.3); outline-offset: 2px; }
.notification-clear-button:disabled,
.notification-dismiss:disabled { cursor: wait; opacity: .45; }
.home-notification-item { position: relative; }
.home-notification {
  width: 100%; min-height: 61px; padding: 11px 17px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: inherit; cursor: pointer; font: inherit; text-align: left;
}
.home-notification-item.dismissible .home-notification { padding-right: 48px; }
.home-notification-item:last-child .home-notification { border-bottom: 0; }
.home-notification:hover { background: #fafafb; }
.home-notification:focus-visible { position: relative; z-index: 1; outline: 2px solid rgba(8,119,232,.28); outline-offset: -2px; }
.home-notification > span { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--blue); }
.home-notification.level-warning > span { background: #e6a11b; }
.home-notification.level-critical { background: #fff7f7; box-shadow: inset 3px 0 #e14652; }
.home-notification.level-critical:hover { background: #fff1f2; }
.home-notification.level-critical > span { background: var(--red); }
.home-notification.level-critical .home-item-title { color: #9d2832; }
.home-notification.read { opacity: .58; }
.home-notification div { min-width: 0; }
.home-notification p { margin: 4px 0 0; color: #7a7e87; font-size: 9px; line-height: 1.35; }
.home-notification time { color: #9699a0; font-size: 9px; }
.notification-trailing { display: grid; justify-items: end; gap: 5px; white-space: nowrap; }
.notification-trailing small {
  padding: 3px 7px; border-radius: 999px; background: #fff4e8; color: #b24b08;
  font-size: 8px; font-weight: 800;
}
.notification-dismiss {
  position: absolute; top: 50%; right: 13px; width: 25px; height: 25px; padding: 0;
  display: grid; place-items: center; transform: translateY(-50%); border: 0; border-radius: 50%;
  background: transparent; color: #9a9da4; cursor: pointer; font: inherit; font-size: 18px; line-height: 1;
}
.notification-dismiss:hover { background: #eceef1; color: #34373d; }
.notification-clear { min-height: 204px; }

.reconciliation-loading {
  min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--muted); font-size: 11px;
}
.reconciliation-loading span {
  width: 24px; height: 24px; border: 2px solid #e3e5e9; border-top-color: var(--blue);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.reconciliation-card { display: grid; gap: 14px; }
.reconciliation-card h2 { margin-bottom: -5px; }
.reconciliation-source { display: flex; align-items: center; gap: 8px; margin-right: 38px; }
.reconciliation-source span {
  padding: 5px 8px; border-radius: 999px; background: #eef5ff; color: #1765b6;
  font-size: 9px; font-weight: 800;
}
.reconciliation-source small { color: var(--muted); font-size: 9px; }
.reconciliation-explanation { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.reconciliation-balance {
  padding: 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 17px; background: #fafafb;
}
.reconciliation-balance > div { display: grid; gap: 4px; }
.reconciliation-balance > div:last-child { text-align: right; }
.reconciliation-balance small { color: var(--muted); font-size: 9px; }
.reconciliation-balance strong { font-size: 18px; letter-spacing: -.035em; }
.reconciliation-balance > span { color: #a4a7ae; }
.reconciliation-difference {
  min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
  border-radius: 12px; font-size: 10px; font-weight: 700;
}
.reconciliation-difference.positive { background: #eaf8f0; color: #08743d; }
.reconciliation-difference.negative { background: #fff0f1; color: #b3212e; }
.reconciliation-items {
  max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 15px;
  scrollbar-width: thin;
}
.reconciliation-items > div {
  min-height: 55px; padding: 10px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line);
}
.reconciliation-items > div:last-child { border-bottom: 0; }
.reconciliation-items span { min-width: 0; display: grid; gap: 3px; }
.reconciliation-items span:last-child { flex: 0 0 auto; justify-items: end; }
.reconciliation-items strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.reconciliation-items small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.reconciliation-items strong.positive { color: var(--green); }
.reconciliation-items strong.negative { color: var(--red); }
.reconciliation-note { margin: -3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.reconciliation-actions { margin-top: 0; }
.reconciliation-actions button:disabled { cursor: wait; opacity: .55; }

@media (max-width: 560px) {
  .reconciliation-balance strong { font-size: 15px; }
  .reconciliation-actions { display: grid; grid-template-columns: 1fr; }
  .reconciliation-actions .button { width: 100%; margin: 0; }
  .reconciliation-actions .primary { order: -1; }
}

.tasks-page { display: grid; gap: 14px; }
.task-overdue-panel .panel-header { min-height: 52px; }
.task-overdue-list { max-height: 210px; overflow-y: auto; }
.task-overdue-row {
  min-height: 50px; padding: 8px 18px; display: grid; grid-template-columns: 18px 7px minmax(0,1fr) auto auto;
  align-items: center; gap: 10px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.task-overdue-row:last-child { border-bottom: 0; }
.task-overdue-row:hover { background: #fffafa; }
.task-overdue-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.task-overdue-row small { color: #8b8e96; font-size: 9px; }
.task-overdue-row time { color: var(--red); font-size: 9px; }
.task-calendar { min-height: 620px; }
.task-calendar-toolbar {
  min-height: 64px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-bottom: 1px solid var(--line);
}
.task-calendar-toolbar h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.task-calendar-actions { padding: 3px; display: flex; align-items: center; gap: 2px; border-radius: 11px; background: #f0f1f3; }
.task-calendar-actions button {
  min-width: 31px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent;
  color: #666a72; cursor: pointer; font: inherit; font-size: 17px;
}
.task-calendar-actions button:hover { background: white; color: #17191d; box-shadow: 0 2px 7px rgba(20,25,35,.08); }
.task-calendar-actions .today-button { font-size: 10px; font-weight: 700; }
.task-calendar-scroll { width: 100%; overflow-x: auto; scrollbar-width: thin; }
.task-calendar-inner { min-width: 820px; }
.task-mobile-agenda { display: none; }
.task-weekdays {
  display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border-bottom: 1px solid var(--line);
  background: #fafafb;
}
.task-weekdays span { padding: 9px 12px; color: #8a8d95; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.task-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.task-day {
  min-width: 0; min-height: 108px; padding: 8px; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); background: white; cursor: pointer; outline: none;
  container-type: inline-size;
}
.task-day:nth-child(7n) { border-right: 0; }
.task-day:nth-last-child(-n + 7) { border-bottom: 0; }
.task-day:hover { background: #fcfcfd; }
.task-day:focus-visible { position: relative; z-index: 2; box-shadow: inset 0 0 0 2px rgba(8,119,232,.3); }
.task-day.outside { background: #fafafb; color: #b1b4ba; }
.task-day-number {
  width: 25px; height: 25px; margin: 0 0 5px auto; display: grid; place-items: center;
  border-radius: 8px; color: #72757d; font-size: 10px; font-weight: 700;
}
.task-day.today .task-day-number { background: var(--orange); color: white; }
.task-day.outside .task-day-number { color: #b7bac0; }
.task-day-items { display: grid; gap: 4px; }
.calendar-task {
  min-width: 0; min-height: 29px; padding: 5px 6px; display: grid;
  grid-template-columns: 13px 6px minmax(0,1fr); align-items: start; gap: 5px;
  border: 1px solid #e5e6ea; border-radius: 8px; background: #f7f8fa; color: #30333a;
  cursor: pointer; outline: none;
}
.calendar-task.priority-urgent { border-color: #f4cdd3; background: #fff1f3; }
.calendar-task.priority-high { border-color: #f3dfb8; background: #fff7e8; }
.calendar-task.priority-normal { border-color: #dbe7f5; background: #f2f7fd; }
.calendar-task.priority-low { border-color: #d4eadf; background: #eef8f3; }
.calendar-task.completed {
  border-color: #e1e3e7; background: #f5f6f7; color: #858991; opacity: .76;
}
.calendar-task.completed .calendar-task-title { text-decoration: line-through; }
.calendar-task.completed .task-priority-dot { opacity: .55; }
.calendar-task:hover { border-color: #cfd9e7; background: #f3f7fc; }
.calendar-task:focus-visible { border-color: #80afe4; box-shadow: 0 0 0 2px rgba(8,119,232,.12); }
.calendar-task.overdue { border-color: #f3d9dc; background: #fff7f7; color: #9e3039; }
.calendar-task-check {
  width: 13px; height: 13px; padding: 0; border: 1.25px solid #aeb2ba; border-radius: 50%;
  background: white; cursor: pointer; transition: .14s;
}
.calendar-task-check:hover { border-color: var(--green); background: #dff5e8; box-shadow: inset 0 0 0 3px white; }
.calendar-task-check.is-completed {
  display: grid; place-items: center; border-color: #93c9a9; background: #e4f5eb;
  color: #25824b; cursor: default; font-size: 8px; font-weight: 850;
}
.calendar-task.overdue .calendar-task-check, .task-overdue-row .calendar-task-check { border-color: #dc7d85; }
.calendar-task > .calendar-task-check, .calendar-task > .task-priority-dot { margin-top: 2px; }
.calendar-task-body { min-width: 0; display: grid; gap: 4px; }
.calendar-task-title {
  min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 9px; font-weight: 680; line-height: 1.3; white-space: normal;
}
.calendar-task-meta { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.task-priority-dot { width: 6px; height: 6px; border-radius: 50%; background: #c4c7cd; }
.priority-urgent .task-priority-dot { background: #df3344; }
.priority-high .task-priority-dot { background: #f09a25; }
.priority-low .task-priority-dot { background: #8ba6c8; }
.calendar-task-progress {
  padding: 2px 4px; border-radius: 5px; background: #e9ebef; color: #72767e;
  font-size: 7px; font-weight: 750;
}
.calendar-task time { color: #898c94; font-size: 8px; }
.calendar-task-owner {
  min-width: 0; height: 20px; padding: 2px 6px 2px 2px; display: flex; align-items: center; gap: 4px;
  border-radius: 999px; background: rgba(255,255,255,.72); color: #386caa;
  box-shadow: inset 0 0 0 1px rgba(56,108,170,.12);
}
.calendar-task-owner b {
  width: 16px; height: 16px; flex: 0 0 16px; display: grid; place-items: center;
  border-radius: 50%; background: #dceaf8; font-size: 6px; font-weight: 850;
}
.calendar-task-owner em {
  max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 7px; font-style: normal; font-weight: 750;
}
.calendar-task-repeat { color: #8b8e96; font-size: 9px; }
@container (max-width: 145px) {
  .calendar-task-owner { padding-right: 2px; }
  .calendar-task-owner em { display: none; }
}
.task-recurrence-preview {
  width: max-content; max-width: 100%; margin-top: -5px; padding: 5px 9px; border-radius: 999px;
  background: #f0f1f3; color: #686b73; font-size: 9px; font-weight: 700;
}
.task-form label span small { color: #a0a3aa; font-size: 9px; font-weight: 500; }
.task-form-actions { align-items: center; justify-content: space-between; }
.task-form-actions > div { display: flex; gap: 8px; }
.task-delete-button { padding-inline: 3px; border: 0; background: transparent; color: var(--red); }
.task-delete-button:hover { background: #fff0f1; }
.modal-card.wide:has(.task-form) { width: min(980px, 100%); }
.task-editor-layout { min-width: 0; display: grid; gap: 14px; }
.task-editor-meta {
  min-width: 0; padding: 13px; display: grid; gap: 11px;
  border: 1px solid var(--line); border-radius: 15px; background: #fafafb;
}
.task-meta-grid {
  display: grid; grid-template-columns: 1fr .78fr .88fr 1.2fr 1.15fr; gap: 10px;
}
.task-editor-body {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 14px; align-items: start;
}
.task-priority-field {
  padding: 6px 8px; border: 1px solid transparent; border-radius: 11px;
  transition: background-color .15s, border-color .15s;
}
.task-priority-field > span { padding-inline: 2px; }
.task-priority-field select { background: rgba(255,255,255,.78); }
.task-priority-field.priority-urgent { border-color: #f1cbd1; background: #fff0f2; }
.task-priority-field.priority-high { border-color: #efd9ae; background: #fff6e5; }
.task-priority-field.priority-normal { border-color: #d4e3f3; background: #eef5fc; }
.task-priority-field.priority-low { border-color: #cee7d9; background: #edf8f2; }
.task-checklist {
  padding: 11px; display: grid; gap: 8px; border: 1px solid var(--line);
  border-radius: 14px; background: #fafafb;
}
.task-detail-heading { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-detail-heading strong { color: #30333a; font-size: 11px; }
.task-detail-heading small { color: #94979f; font-size: 9px; }
.task-detail-heading button {
  height: 26px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent;
  color: var(--blue); cursor: pointer; font: inherit; font-size: 9px; font-weight: 750;
}
.task-detail-heading button:hover { background: #edf5ff; }
.task-checklist-list { display: grid; gap: 5px; }
.task-checklist-row {
  display: grid; grid-template-columns: 17px minmax(0,1fr) 25px; align-items: center; gap: 7px;
}
.task-form .task-checklist-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--green); }
.task-form .task-checklist-row .task-checklist-title {
  height: 34px; padding-inline: 9px; border-radius: 9px; background: white; font-size: 10px;
}
.task-checklist-row:has(input:checked) .task-checklist-title { color: #8d9098; text-decoration: line-through; }
.task-checklist-row > button {
  width: 25px; height: 25px; padding: 0; border: 0; border-radius: 7px; background: transparent;
  color: #9a9da4; cursor: pointer; font-size: 16px;
}
.task-checklist-row > button:hover { background: #eceef1; color: #33363c; }
.task-detail-side {
  min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line);
  border-radius: 16px; background: white;
}
.task-attachment-section { padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fafafb; }
.task-detail-section { min-width: 0; display: grid; gap: 7px; }
.task-detail-section + .task-detail-section { padding-top: 10px; border-top: 1px solid #dedfe4; }
.task-detail-empty { padding: 8px 2px; color: #9a9da4; font-size: 9px; }
.task-attachment-list, .task-comment-list { max-height: 150px; overflow-y: auto; display: grid; gap: 5px; }
.task-attachment {
  min-width: 0; min-height: 38px; padding: 5px 6px 5px 9px; display: grid;
  grid-template-columns: minmax(0,1fr) 25px; align-items: center; gap: 6px;
  border: 1px solid #e2e3e7; border-radius: 10px; background: white;
}
.task-attachment a { min-width: 0; display: grid; gap: 2px; color: #30333a; text-decoration: none; }
.task-attachment a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; }
.task-attachment a small { color: #92959d; font-size: 8px; }
.task-attachment button {
  width: 25px; height: 25px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: #9a9da4; cursor: pointer; font-size: 15px;
}
.task-attachment button:hover { background: #fff0f1; color: var(--red); }
.task-file-picker { display: block !important; }
.task-file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.task-file-picker span {
  width: 100%; height: 31px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed #c9cbd1; border-radius: 9px; background: white; color: #686c74;
  cursor: pointer; font-size: 9px;
}
.task-file-picker:hover span { border-color: #87afe0; color: var(--blue); }
.task-comment {
  padding: 8px 9px; border-radius: 10px; background: white; border: 1px solid #e4e5e8;
}
.task-comment > div { display: flex; justify-content: space-between; gap: 7px; }
.task-comment strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.task-comment time { flex: 0 0 auto; color: #9a9da4; font-size: 8px; }
.task-comment p { margin: 5px 0 0; color: #555961; font-size: 9px; line-height: 1.4; white-space: pre-wrap; }
.task-comment-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 6px; }
.task-form .task-comment-compose textarea { min-height: 38px; max-height: 82px; padding: 8px 9px; border-radius: 9px; font-size: 9px; }
.task-comment-compose button {
  height: 34px; padding: 0 9px; border: 0; border-radius: 9px; background: #202329;
  color: white; cursor: pointer; font-size: 9px; font-weight: 750;
}
.task-history { border-top: 1px solid #dedfe4; padding-top: 9px; }
.task-history summary { color: #777b83; cursor: pointer; font-size: 9px; font-weight: 700; }
.task-history div { max-height: 120px; overflow-y: auto; padding-top: 5px; }
.task-history p { margin: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 8px; font-size: 8px; }
.task-history p strong { color: #555961; }
.task-history p span { color: #999ca3; text-align: right; }
.form .task-file-picker input {
  position: absolute; width: 1px; height: 1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; overflow: hidden;
}

.cash-chart-scroll {
  width: 100%; overflow-x: auto; overflow-y: hidden; padding-top: 58px; margin-top: -44px;
  scrollbar-width: thin; scrollbar-color: #d4d6db transparent;
}
.cash-chart {
  position: relative; isolation: isolate; min-width: max(100%, calc(var(--cash-points) * 30px));
  height: 210px; display: flex; align-items: flex-end; gap: clamp(4px, 1.25vw, 18px);
  padding: 14px 6px 0;
}
.cash-chart::before {
  content: ""; position: absolute; z-index: -1; inset: 14px 6px 29px;
  background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #eceef1 25%);
}
.bar-group {
  position: relative; flex: 1; min-width: 24px; height: 100%; display: grid;
  grid-template-rows: 1fr 22px; gap: 7px; border-radius: 8px; outline: none;
}
.bar-group:hover, .bar-group:focus { background: rgba(8,33,66,.035); }
.bars {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0;
  border-bottom: 1px solid #dfe1e5;
}
.bar {
  width: min(17px, 36%); min-height: 3px; border-radius: 6px 6px 2px 2px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.06); transition: filter .14s ease, transform .14s ease;
}
.bar.zero { min-height: 0; }
.bar-group:hover .bar, .bar-group:focus .bar { filter: saturate(1.15); transform: scaleX(1.08); }
.bar.in { background: #45b97c; }
.bar.out { background: #ff9b66; }
.bar-group label { color: #8c8f97; font-size: 9px; text-align: center; white-space: nowrap; }
.chart-tooltip {
  position: absolute; z-index: 8; left: 50%; top: -47px; width: 176px; padding: 10px 11px;
  transform: translate(-50%, 5px); border: 1px solid rgba(8,33,66,.08); border-radius: 12px;
  background: rgba(255,255,255,.98); box-shadow: 0 12px 30px rgba(8,33,66,.16);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease, transform .12s ease;
}
.bar-group:hover .chart-tooltip, .bar-group:focus .chart-tooltip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.bar-group:first-child .chart-tooltip { left: 0; transform: translate(0, 5px); }
.bar-group:first-child:hover .chart-tooltip, .bar-group:first-child:focus .chart-tooltip {
  transform: translate(0, 0);
}
.bar-group:last-child .chart-tooltip { right: 0; left: auto; transform: translate(0, 5px); }
.bar-group:last-child:hover .chart-tooltip, .bar-group:last-child:focus .chart-tooltip {
  transform: translate(0, 0);
}
.chart-tooltip strong { display: block; margin-bottom: 7px; color: #20242b; font-size: 11px; }
.chart-tooltip span { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 6px; color: #767a83; font-size: 10px; }
.chart-tooltip span + span { margin-top: 4px; }
.chart-tooltip span.net { grid-template-columns: 1fr auto; padding-top: 5px; border-top: 1px solid var(--line); }
.chart-tooltip i { width: 7px; height: 7px; border-radius: 50%; background: #45b97c; }
.chart-tooltip i.out { background: #ff9b66; }
.chart-tooltip b { color: #20242b; font-weight: 750; }
.chart-tooltip .positive b { color: var(--green); }
.chart-tooltip .negative b { color: var(--red); }
.chart-legend { display: flex; gap: 15px; color: var(--muted); font-size: 11px; }
.chart-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #45b97c; }
.chart-legend span:last-child::before { background: #ff9b66; }

.table-wrap { width: 100%; overflow: auto; scrollbar-width: thin; }
.table-wrap.scroll-body { max-height: 510px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th {
  position: sticky; top: 0; z-index: 2; padding: 11px 14px; background: #fafafb;
  border-bottom: 1px solid var(--line); color: #8b8e97; text-align: right; font-size: 9px;
  letter-spacing: .06em; text-transform: uppercase;
}
th:first-child, td:first-child { text-align: left; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: right; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(245,245,247,.68); }
.cell-title { font-weight: 680; color: #1b1d22; }
.cell-sub { margin-top: 3px; color: #92949b; font-size: 10px; }
.table-text, .table-wrap .cell-title, .table-wrap .cell-sub {
  display: block; min-width: 0; max-width: 320px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.table-text { max-width: 240px; }
.cash-table { min-width: 900px; table-layout: fixed; }
.cash-table .cell-title, .cash-table .table-text { max-width: 100%; }
.cash-table-full th:nth-child(1) { width: 29%; }
.cash-table-full th:nth-child(2) { width: 14%; }
.cash-table-full th:nth-child(3) { width: 21%; }
.cash-table-full th:nth-child(4) { width: 19%; }
.cash-table-full th:nth-child(5) { width: 12%; }
.cash-table-full th:nth-child(6) { width: 5%; }
.cash-table-compact th:nth-child(1) { width: 33%; }
.cash-table-compact th:nth-child(2) { width: 15%; }
.cash-table-compact th:nth-child(3) { width: 22%; }
.cash-table-compact th:nth-child(4) { width: 17%; }
.cash-table-compact th:nth-child(5) { width: 13%; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: #f1f2f4; color: #666a73; font-size: 10px; font-weight: 650; }
.status.paid, .status.active { background: #eaf8f0; color: #087740; }
.status.flex { padding: 3px 6px; background: #edf3ff; color: #245cbb; }
.freight-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.sale-result { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.sale-result small { color: #08743d; font-size: 9px; font-weight: 700; }
.row-action { border: 0; background: transparent; color: var(--blue); padding: 4px; cursor: pointer; font-size: 12px; font-weight: 650; }
.source-pill {
  display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px;
  background: #f0f2f5; color: #656a73; font-size: 9px; font-weight: 700;
}
.source-group { display: inline-flex; max-width: 100%; align-items: center; justify-content: flex-end; gap: 9px; }
.recurrence-label { flex: 0 0 auto; color: #777b84; font-size: 9px; font-weight: 650; }
.panel-count {
  min-width: 26px; height: 24px; padding: 0 8px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #f0f1f3; color: #696d75; font-size: 10px; font-weight: 750;
}

.section-toolbar {
  min-height: 54px; padding: 7px 10px 7px 16px; border: 1px solid var(--line);
  border-radius: 16px; background: rgba(255,255,255,.85); display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
}
.section-toolbar strong { font-size: 12px; }
.periods { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #f0f0f2; }
.periods button { border: 0; background: transparent; min-height: 29px; padding: 0 11px; border-radius: 8px; color: #6f727a; font-size: 10px; font-weight: 700; cursor: pointer; }
.periods button.active { background: white; color: #14161a; box-shadow: 0 2px 8px rgba(20,25,35,.09); }

.finance-toolbar {
  position: relative; z-index: 6; min-height: 55px; padding: 7px 9px 7px 17px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.88);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.finance-toolbar > strong { font-size: 12px; letter-spacing: -.01em; }
.finance-period { display: flex; align-items: center; gap: 8px; }
.finance-period > strong { font-size: 12px; letter-spacing: -.01em; }
.sync-state { color: var(--green); font-size: 9px; font-weight: 800; cursor: help; }
.finance-toolbar-actions { display: flex; align-items: center; gap: 7px; }
.smart-period { position: relative; }
.smart-period > summary {
  min-height: 38px; min-width: 158px; padding: 4px 10px 4px 12px; display: grid;
  grid-template-columns: 1fr auto; grid-template-rows: 14px 15px; column-gap: 10px; align-items: center;
  border: 1px solid #e5e6e9; border-radius: 11px; background: #fafafb; cursor: pointer; list-style: none;
}
.smart-period > summary::-webkit-details-marker { display: none; }
.smart-period > summary span { color: #91949b; font-size: 8px; font-weight: 700; }
.smart-period > summary strong { color: #272a30; font-size: 10px; white-space: nowrap; }
.smart-period > summary i { grid-column: 2; grid-row: 1 / 3; color: #858991; font-size: 11px; font-style: normal; transition: transform .15s ease; }
.smart-period[open] > summary { border-color: #d8d9de; background: white; box-shadow: 0 3px 12px rgba(20,25,35,.06); }
.smart-period[open] > summary i { transform: rotate(180deg); }
.smart-period-menu {
  position: absolute; top: 45px; right: 0; z-index: 35; width: 312px; padding: 8px;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.98);
  box-shadow: 0 20px 55px rgba(20,25,35,.17); backdrop-filter: blur(18px);
}
.smart-period-presets { display: grid; gap: 2px; }
.smart-period-presets button {
  min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent;
  color: #555961; cursor: pointer; text-align: left; font-size: 11px; font-weight: 650;
}
.smart-period-presets button:hover { background: #f3f4f6; }
.smart-period-presets button.active { background: #edf5ff; color: #1265be; }
.smart-period-menu form {
  margin-top: 7px; padding: 10px 4px 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  border-top: 1px solid #ececef;
}
.smart-period-menu label { display: grid; gap: 5px; color: #858891; font-size: 8px; font-weight: 700; }
.smart-period-menu input {
  width: 100%; height: 38px; padding: 0 9px; border: 1px solid #dfe1e5; border-radius: 10px;
  background: #f8f8fa; color: #202329; font: inherit; outline: none;
}
.smart-period-menu input:focus { border-color: #6ba9ed; background: white; box-shadow: 0 0 0 3px rgba(8,119,232,.11); }
.smart-period-menu .button { grid-column: 1 / -1; margin-top: 2px; }
.export-button { background: #eef5ff; border-color: transparent; color: #1464bc; }
.refresh-button { width: 35px; padding: 0; color: #5f646d; }
.status-pill {
  padding: 6px 9px; border-radius: 999px; background: #f1f2f4; color: #777b83;
  font-size: 9px; font-weight: 700;
}
.kpi-grid.finance-kpis { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
.kpi-grid.finance-kpis.five { grid-template-columns: repeat(5, minmax(125px, 1fr)); }
.finance-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 14px; }
.finance-grid .panel { min-width: 0; }
.category-scroll, .monthly-scroll { max-height: 286px; }
.statement-wrap { max-height: 460px; }
.statement-table .statement-section td {
  padding: 9px 15px 6px; background: #fafafb; color: #858891; font-size: 9px;
  font-weight: 800; letter-spacing: .075em; text-transform: uppercase;
}
.statement-table tr.subtotal td {
  background: #f7f8fa; color: #20242b; font-weight: 750; border-top: 1px solid #dfe2e7;
}
.statement-table tr.total td {
  background: #eef3fa; color: #092445; font-size: 13px; font-weight: 800;
  border-top: 2px solid #c8d4e2;
}
.statement-table tr.expense td:first-child { padding-left: 28px; color: #4f535b; }
.dre-detail table { min-width: 1050px; }
.dre-impact-summary {
  display: flex; max-width: 480px; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px;
  color: var(--muted); font-size: 10px; line-height: 1.35; white-space: normal;
}
.dre-impact-summary strong { font-weight: 760; }

.listings-toolbar {
  min-height: 56px; padding: 8px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,.86); display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.listing-search {
  min-width: min(430px, 48%); height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 8px;
  border-radius: 11px; background: #f1f2f4; color: #878a92;
}
.listing-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #17191d; font-size: 12px; }
.listing-search input::placeholder { color: #9a9da5; }
.listing-toolbar-actions { display: flex; align-items: center; gap: 7px; }
.listing-average-margin {
  min-height: 38px; padding: 5px 10px; display: grid; align-content: center; gap: 1px;
  border-radius: 11px; background: #f1f2f4; white-space: nowrap;
}
.listing-average-margin > span {
  display: flex; align-items: center; gap: 4px; color: #777b84; font-size: 8px; font-weight: 700;
}
.listing-average-margin .info { width: 12px; height: 12px; flex-basis: 12px; font-size: 7px; }
.listing-average-margin strong { color: #1b1d22; font-size: 13px; letter-spacing: -.025em; }
.listing-filters button { display: inline-flex; align-items: center; gap: 6px; }
.listing-filters small { color: #9699a1; font-size: 8px; }
.listing-filters button.active small { color: #6f727a; }
.listings-panel { min-height: 300px; }
.listings-table { min-width: 1180px; table-layout: fixed; }
.listings-table th:nth-child(1) { width: 32%; }
.listings-table th:nth-child(2) { width: 8%; }
.listings-table th:nth-child(3) { width: 10%; }
.listings-table th:nth-child(4) { width: 7%; }
.listings-table th:nth-child(5) { width: 9%; }
.listings-table th:nth-child(6) { width: 8%; }
.listings-table th:nth-child(7) { width: 10%; }
.listings-table th:nth-child(8) { width: 9%; }
.listings-table th:last-child { width: 48px; }
.listing-name { min-width: 0; display: flex; align-items: center; gap: 11px; }
.listing-name > div { min-width: 0; }
.listing-name img, .listing-image-placeholder {
  width: 50px; height: 50px; flex: 0 0 50px; border: 1px solid #ececef; border-radius: 11px;
  background: #f2f3f5; object-fit: cover;
}
.listing-image-placeholder { display: grid; place-items: center; color: #afb2ba; }
.listing-name .cell-title, .listing-name .cell-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-price, .listing-stock { display: grid; justify-items: end; gap: 4px; }
.listing-price strong, .listing-stock strong { font-size: 12px; }
.listing-stock small { color: #858891; font-size: 8px; font-weight: 700; }
.listing-margin { color: #18844c; font-size: 12px; white-space: nowrap; }
.listing-margin.negative { color: var(--red); }
.listing-margin.unavailable { color: #a0a3aa; font-weight: 700; }
.listing-promotion-row td { padding: 0 12px 10px; border-top: 0; background: #fff; }
.listing-promotion-row:hover td { background: #fff; }
.listing-promotion-strip {
  min-height: 56px; padding: 8px 9px 8px 12px; display: grid;
  grid-template-columns: minmax(230px,1.45fr) 170px 80px 105px 205px 34px;
  align-items: center; gap: 12px; border: 1px solid #e8ebef; border-radius: 13px;
  background: #f8fafc;
}
.listing-promotion-name { min-width: 0; display: flex; align-items: center; gap: 9px; }
.listing-promotion-name > span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--orange); }
.listing-promotion-name > div, .listing-promotion-stat { min-width: 0; display: grid; gap: 3px; }
.listing-promotion-name strong, .listing-promotion-stat strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px;
}
.listing-promotion-name small, .listing-promotion-stat small { color: #838790; font-size: 8px; font-weight: 700; }
.listing-promotion-stat.receive > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.promotion-funding { display: inline-flex; align-items: center; gap: 3px; color: #087b43; font-size: 9px; font-weight: 800; white-space: nowrap; }
.promotion-funding .info { width: 12px; height: 12px; flex-basis: 12px; font-size: 7px; }
.listing-promotion-menu {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent;
  display: inline-grid; place-items: center; color: #777a82; cursor: pointer;
}
.listing-promotion-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.listing-promotion-menu:hover { background: #eceff3; color: #17191d; }
.promotion-source { margin-bottom: 14px; }
.promotion-manager { display: grid; gap: 14px; }
.promotion-current, .promotion-opportunities {
  padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: #fafafb;
}
.promotion-current > header, .promotion-opportunities > header {
  margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.promotion-current > header > span:first-child, .promotion-opportunities > header strong { font-size: 11px; font-weight: 800; }
.promotion-opportunities > header span, .promotion-status {
  padding: 4px 7px; border-radius: 999px; background: #e9f7ee; color: #087740; font-size: 8px; font-weight: 800;
}
.promotion-card-title { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.promotion-card-title > div { min-width: 0; display: grid; gap: 3px; }
.promotion-card-title strong, .promotion-card-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promotion-card-title strong { font-size: 13px; }
.promotion-card-title small { color: var(--muted); font-size: 9px; }
.funded-badge, .recommended-badge {
  flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eaf8ef; color: #08783f;
  font-size: 8px; font-weight: 800; white-space: nowrap;
}
.recommended-badge { background: #fff1e8; color: #ac4a08; }
.promotion-facts { margin-top: 13px; display: grid; grid-template-columns: 1.4fr repeat(3,minmax(90px,1fr)); gap: 8px; }
.promotion-facts > div { min-width: 0; display: grid; align-content: start; gap: 4px; }
.promotion-facts small { color: var(--muted); font-size: 8px; font-weight: 700; }
.promotion-facts strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.promotion-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 7px; }
.promotion-actions .button.danger { margin-right: 0; }
.promotion-opportunities { padding-bottom: 6px; }
.promotion-opportunity { padding: 13px 0; border-top: 1px solid var(--line); }
.promotion-opportunity:first-of-type { border-top: 0; padding-top: 0; }
.promotion-opportunity.recommended { margin: 0 -7px; padding-inline: 7px; border-radius: 12px; background: #fffaf6; }
.promotion-opportunity > .button { min-height: 32px; margin-top: 10px; padding-inline: 10px; }
.promotion-empty-state { min-height: 70px; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); text-align: center; }
.promotion-empty-state strong { color: var(--text); font-size: 13px; }
.promotion-empty-state small { font-size: 10px; }
.promotion-empty-state.compact { min-height: 46px; }
.promotion-form-heading { padding: 12px; display: grid; gap: 4px; border-radius: 14px; background: #f4f5f7; }
.promotion-form-heading strong { font-size: 13px; }
.promotion-form-heading small { color: var(--muted); font-size: 9px; }
.promotion-discount-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.suffix-input, .prefix-input { position: relative; }
.form .suffix-input input { padding-right: 38px; }
.suffix-input > span { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-weight: 800; }
.form .prefix-input input { padding-left: 43px; }
.prefix-input > span { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--muted); font-size: 10px; font-weight: 800; }
.promotion-margin-preview {
  padding: 12px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: #fafafb;
}
.promotion-margin-preview > div { min-width: 0; display: grid; gap: 3px; }
.promotion-margin-preview small, .promotion-margin-preview > span { color: var(--muted); font-size: 9px; }
.promotion-margin-preview strong { font-size: 16px; }
.promotion-margin-preview strong.negative { color: #d92d3c; }
.promotion-margin-preview > span { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promotion-margin-preview > .promotion-benefit-note { grid-column: 1 / -1; line-height: 1.5; }
.purchase-editor, .purchase-items { display: grid; gap: 14px; }
.purchase-item { padding: 15px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 16px; }
.purchase-item .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.purchase-item-heading { display: flex; align-items: center; gap: 8px; }
.purchase-item-heading > label { flex: 1; min-width: 0; }
.purchase-remove { flex: 0 0 26px; height: 26px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 19px; cursor: pointer; }
.purchase-remove:hover { background: var(--line); }
.purchase-remove[hidden] { display: none; }
.purchase-line-total { text-align: right; color: var(--muted); font-size: 11px; }
.purchase-add { padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: #438bd4; font: inherit; font-weight: 600; cursor: pointer; }
.purchase-add:hover { background: #438bd40d; }
.purchase-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.purchase-total > span { color: var(--muted); font-size: 12px; }
.purchase-total > strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.promotion-margin-preview.loading { min-height: 74px; align-items: center; opacity: .68; }
.promotion-margin-preview.unavailable { grid-template-columns: 90px 1fr; align-items: center; }
.promotion-accept-summary .promotion-facts { margin-top: 0; }
.mini-badge, .shipping-label {
  display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 7px; border-radius: 999px;
  background: #f0f1f3; color: #777b84; font-size: 8px; font-weight: 750;
}
.mini-badge .info { width: 12px; height: 12px; flex-basis: 12px; font-size: 7px; }
.mini-badge.wholesale { border: 0; cursor: pointer; }
.mini-badge.wholesale:hover { color: #24272d; background: #e7e9ed; }
.mini-badge.wholesale.warning { color: #a54808; background: #fff0e4; }
.shipping-label.free { background: #eaf8ef; color: #08783f; }
.wholesale-form { gap: 12px; }
.wholesale-alert {
  padding: 10px 12px; display: grid; gap: 2px; border: 1px solid #f4cbaa; border-radius: 13px;
  background: #fff8f1; color: #9a4309;
}
.wholesale-alert strong { font-size: 10px; }
.wholesale-alert span { font-size: 9px; line-height: 1.45; }
.wholesale-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wholesale-head span { font-size: 11px; font-weight: 800; }
.wholesale-head small { padding: 4px 7px; border-radius: 999px; background: #f0f1f3; color: var(--muted); font-size: 8px; font-weight: 800; }
.wholesale-tiers { display: grid; gap: 8px; }
.wholesale-tier {
  position: relative; padding: 10px; display: grid; grid-template-columns: minmax(105px,.75fr) minmax(145px,1fr) 72px minmax(112px,.7fr) 30px;
  align-items: end; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: #fafafb;
}
.wholesale-tier.warning { border-color: #efbf9a; background: #fffaf6; }
.wholesale-tier label { min-width: 0; }
.wholesale-tier-discount { min-height: 43px; display: grid; align-content: center; gap: 3px; }
.wholesale-tier-discount small { color: var(--muted); font-size: 8px; font-weight: 700; }
.wholesale-tier-discount strong { font-size: 12px; }
.wholesale-tier-receive { min-height: 43px; display: grid; align-content: center; gap: 2px; }
.wholesale-tier-receive small { color: var(--muted); font-size: 8px; font-weight: 700; }
.wholesale-tier-receive strong { font-size: 12px; }
.wholesale-tier-receive span { min-height: 11px; font-size: 8px; font-weight: 800; }
.wholesale-tier .icon-button { margin-bottom: 3px; }
.wholesale-tier-error { grid-column: 1 / -1; color: #ac4a08; font-size: 8px; }
.wholesale-add { justify-self: start; min-height: 32px; padding-inline: 11px; }

.campaign-table { min-width: 980px; table-layout: fixed; }
.campaign-table th {
  padding: 9px 6px; white-space: normal; font-size: 8px; line-height: 1.18; letter-spacing: .035em;
}
.campaign-table .metric-header {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap;
}
.campaign-table .metric-header .info {
  width: 12px; height: 12px; flex-basis: 12px; font-size: 7px; letter-spacing: 0;
}
.campaign-table td { padding: 9px 6px; vertical-align: top; font-size: 11px; }
.sales-table { min-width: 1120px; table-layout: fixed; }
.sales-table th:first-child { width: 290px; }
.sales-table th:nth-child(2) { width: 92px; }
.post-sale-link { padding: 0; background: transparent; }
.sales-date { white-space: nowrap; color: #62666f; font-variant-numeric: tabular-nums; }
.sale-row { cursor: pointer; transition: background .15s; }
.sale-row:hover, .sale-row:focus-visible { background: #f8f9fa; outline: none; }
.sale-edit-summary {
  min-width: 0; display: grid; gap: 5px; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: 14px; background: #fafafb;
}
.sale-edit-summary > div { display: flex; align-items: center; gap: 8px; }
.sale-edit-summary span, .sale-edit-summary small {
  overflow: hidden; color: #777b84; text-overflow: ellipsis; white-space: nowrap;
}
.sale-edit-summary span { font-size: 10px; }
.sale-edit-summary small { font-size: 9px; }
.restore-automatic {
  justify-self: start; padding: 0; border: 0; background: transparent; color: #656870;
  cursor: pointer; font-size: 10px; font-weight: 700;
}
.restore-automatic:hover { color: #111318; text-decoration: underline; }
.post-sales-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important; gap: 0 !important;
  overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.kpi-grid.compact.post-sales-summary .kpi {
  min-height: 78px; padding: 14px 16px; border: 0; border-right: 1px solid var(--line);
  border-radius: 0; background: transparent; box-shadow: none;
}
.post-sales-summary .kpi:last-child { border-right: 0; }
.post-sales-summary .kpi-label { color: #7a7d85; font-size: 10px; font-weight: 650; }
.post-sales-summary .kpi-value { margin-top: 7px; font-size: 20px; letter-spacing: -.035em; }
.post-sales-header { min-height: 62px; gap: 18px; }
.post-sales-panel { overflow: hidden; }
.post-sale-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 12px; background: #f0f1f3; }
.post-sale-tabs button {
  min-height: 31px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 9px; background: transparent; color: #696d75; cursor: pointer;
  font: inherit; font-size: 9px; font-weight: 750; white-space: nowrap;
}
.post-sale-tabs button:hover { color: var(--text); }
.post-sale-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(15,18,24,.09); }
.post-sale-tabs button span { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 999px; background: #e3e5e8; font-size: 7px; }
.post-sale-tabs button.active span { background: #eef1f5; }
.post-sales-table { min-width: 1060px; table-layout: fixed; }
.post-sales-table th:first-child { width: 29%; }
.post-sales-table th:nth-child(2) { width: 34%; }
.post-sales-table th:nth-child(3) { width: 12%; }
.post-sales-table th:nth-child(4) { width: 16%; }
.post-sales-table th:nth-child(5) { width: 9%; }
.post-sales-table th,
.post-sales-table td { padding-inline: 16px; text-align: left; }
.post-sales-table th { padding-block: 11px; }
.post-sales-table td { height: 68px; padding-block: 12px; vertical-align: middle; }
.post-sales-table th:last-child,
.post-sales-table td:last-child { text-align: right; }
.post-sales-table .cell-title,
.post-sales-table .cell-sub,
.post-sale-row-reason .table-text { max-width: 100%; }
.post-sale-row { cursor: pointer; transition: background .15s ease; }
.post-sale-row:hover { background: #fafafb; }
.post-sale-row.has-flex-impact td:first-child { box-shadow: inset 3px 0 #e7a923; }
.post-sale-row:focus-visible { outline: 3px solid rgba(8,119,232,.14); outline-offset: -3px; }
.post-sale-row td:nth-child(2), .post-sale-row td:last-child { display: table-cell; }
.post-sale-occurrence { min-width: 0; display: grid; gap: 5px; }
.post-sale-occurrence-head { min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 7px; }
.post-sale-occurrence-head small,
.post-sale-message-count { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.post-sale-occurrence-head small { margin-top: 0; }
.post-sale-row-reason {
  min-width: 0; max-width: 100%; margin: 0; overflow: hidden; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 1; color: #656971; font-size: 9px; line-height: 1.35;
}
.post-sale-kind, .post-sale-status {
  display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border-radius: 999px;
  background: #eef1f5; color: #565b65; font-size: 9px; font-weight: 750; white-space: nowrap;
}
.post-sale-kind.claim { background: #edf3ff; color: #245cbb; }
.post-sale-kind.claim_return { background: #eef0ff; color: #5a48b7; }
.post-sale-kind.buyer_regret { background: #fff4e8; color: #9d5a0a; }
.post-sale-kind.cancellation { background: #f1f2f4; color: #626670; }
.post-sale-status.review { background: #fff0e5; color: #a5480a; }
.post-sale-status.waiting_product { background: #fff7df; color: #8a6500; }
.post-sale-status.handling { background: #edf3ff; color: #245cbb; }
.post-sale-status.finalized { background: #edf7f1; color: #17613c; }
.post-sale-outcome { min-width: 0; display: inline-grid; justify-items: start; gap: 4px; text-align: left; }
.post-sale-row time { display: block; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-sale-impact {
  max-width: 100%; min-height: 24px; padding: 5px 9px; display: inline-flex; align-items: center;
  border-radius: 999px; font-size: 9px; font-weight: 780; line-height: 1.2;
}
.post-sale-impact-result { color: #747983; font-size: 8px; font-weight: 680; white-space: nowrap; }
.post-sale-impact-result.loss { color: #c72f42; }
.post-sale-impact.loss { background: #fff0f1; color: #c72f42; }
.post-sale-impact.recovered, .post-sale-impact.neutral { background: #eaf8f0; color: #087740; }
.post-sale-impact.warning { background: #fff5df; color: #9a6500; }
.post-sale-impact.pending { background: #fff5df; color: #9a6500; }
.campaign-items-table { min-width: 1080px; }
.campaign-items-table th:first-child { width: 200px; }
.ads-overview-table th:first-child { width: 230px; }
.metric { display: grid; justify-items: end; gap: 3px; }
.metric strong { font-size: 11px; }
.metric .change { margin: 0; padding: 2px 5px; font-size: 9px; }
.metric-with-tip { cursor: help; }
.campaign-name { display: flex; min-width: 0; align-items: center; gap: 6px; }
.campaign-name > div { min-width: 0; }
.campaign-overview-table th:first-child { width: 165px; }
.campaign-overview-table { min-width: 1080px; }
.campaign-overview-table .cell-title,
.campaign-overview-table .cell-sub { max-width: 140px; }
.campaign-table .cell-sub { margin-top: 2px; font-size: 9px; }
.ad-name { min-width: 0; width: 100%; display: flex; align-items: center; gap: 8px; }
.ad-name > div { min-width: 0; flex: 1; }
.ad-name img, .ad-image-placeholder {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px;
  border: 1px solid #ececef; background: #f4f4f6; object-fit: cover;
}
.ad-name .cell-title, .ad-name .cell-sub {
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-name .cell-title { line-height: 1.28; }
.campaign-toggle { width: 20px; height: 20px; flex: 0 0 20px; border: 0; border-radius: 7px; background: #f0f1f3; cursor: pointer; }
.campaign-title-line { min-width: 0; display: flex; align-items: center; gap: 4px; }
.campaign-title-line .cell-title { min-width: 0; }
.campaign-edit {
  width: 20px; height: 20px; flex: 0 0 20px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: #8b8f98; cursor: pointer;
}
.campaign-edit:hover, .campaign-edit:focus-visible { background: #eceef1; color: #2f333a; outline: none; }
.campaign-edit svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.modal-card.wide:has(.campaign-editor) { width: min(760px, 100%); }
.campaign-editor { gap: 16px; }
.campaign-editor-settings { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.campaign-number-control {
  min-height: 44px; display: grid; align-items: center; overflow: hidden;
  border: 1px solid #dfe1e5; border-radius: 13px; background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.campaign-number-control.prefix { grid-template-columns: auto minmax(0,1fr); }
.campaign-number-control.suffix { grid-template-columns: minmax(0,1fr) auto; }
.campaign-number-control:focus-within { border-color: #67a9ef; box-shadow: 0 0 0 3px rgba(0,113,227,.13); }
.campaign-number-control input {
  width: 100%; min-width: 0; min-height: 42px; padding: 0 12px; border: 0 !important;
  border-radius: 0; background: transparent; box-shadow: none !important; outline: 0;
  font-variant-numeric: tabular-nums; appearance: textfield;
}
.campaign-number-control i {
  color: #747983; font-size: 10px; font-style: normal; font-weight: 760; pointer-events: none;
}
.campaign-number-control.prefix i { padding-left: 13px; }
.campaign-number-control.suffix i { padding-right: 13px; }
.campaign-editor-ads { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fafafb; }
.campaign-editor-ads > header {
  min-height: 45px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: #fff;
}
.campaign-editor-ads h3 { margin: 0; font-size: 11px; }
.campaign-editor-ads > header > span {
  min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 999px; background: #f0f1f3; color: #70747d; font-size: 8px; font-weight: 750;
}
.campaign-editor-ads ul { max-height: 190px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.campaign-ad-row {
  min-height: 54px; padding: 7px 10px 7px 12px; display: grid;
  grid-template-columns: 36px minmax(0,1fr) 28px; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.campaign-ad-row:last-child { border-bottom: 0; }
.campaign-ad-row img, .campaign-ad-choice img, .campaign-ad-placeholder {
  width: 36px; height: 36px; border: 1px solid #e7e8eb; border-radius: 10px; background: #f0f1f3; object-fit: cover;
}
.campaign-ad-row > div { min-width: 0; display: grid; gap: 3px; }
.campaign-ad-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.campaign-ad-row small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.campaign-ad-remove {
  width: 28px; height: 28px; border: 0; border-radius: 9px; background: #f1f2f4;
  color: #7d8189; cursor: pointer; font-size: 17px; line-height: 1;
}
.campaign-ad-remove:hover { background: #ffedef; color: #c12837; }
.campaign-chip {
  max-width: 210px; padding: 3px 7px; overflow: hidden; border-radius: 999px;
  background: #f0f1f3; color: #60656f; font-size: 8px; font-weight: 760;
  line-height: 1; text-overflow: ellipsis; white-space: nowrap;
}
.campaign-chip.current { background: #e9f3ff; color: #1466bc; }
.campaign-chip.unassigned { background: #e8f8ef; color: #087740; }
.campaign-chip.assigned { background: #fff3df; color: #956000; }
.campaign-ad-picker { border-top: 1px solid var(--line); background: #f8f8fa; }
.campaign-ad-picker-head {
  min-height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
}
.campaign-ad-picker-head strong { font-size: 10px; }
.campaign-ad-picker-head > span { color: var(--muted); font-size: 8px; font-weight: 760; }
.campaign-ad-search { display: block; padding: 0 10px 8px; }
.campaign-ad-search input {
  width: 100%; min-height: 36px; padding: 0 12px; border: 1px solid #e1e3e7; border-radius: 11px;
  background: #fff; font-size: 10px;
}
.campaign-ad-choices { max-height: 270px; padding: 0 8px 8px; display: grid; gap: 5px; overflow-y: auto; }
.campaign-ad-choice {
  width: 100%; min-width: 0; min-height: 54px; padding: 7px 9px; display: grid;
  grid-template-columns: 36px minmax(0,1fr) 20px; align-items: center; gap: 9px;
  border: 1px solid transparent; border-radius: 13px; background: #fff; color: inherit;
  font: inherit; text-align: left; cursor: pointer; transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.campaign-ad-choice:hover { border-color: #d8dbe0; transform: translateY(-1px); }
.campaign-ad-choice.unassigned { border-color: #bfe8d1; background: #f5fcf8; }
.campaign-ad-choice.selected { border-color: #5da4ef; background: #edf6ff; box-shadow: 0 0 0 2px rgba(0,113,227,.08); }
.campaign-ad-choice[hidden] { display: none; }
.campaign-ad-choice-copy { min-width: 0; display: grid; gap: 5px; }
.campaign-ad-choice-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.campaign-ad-choice-copy small { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.campaign-ad-choice-check {
  width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px;
  background: #eceef1; color: transparent; font-size: 10px; font-weight: 800;
}
.campaign-ad-choice.selected .campaign-ad-choice-check { background: #0877e8; color: #fff; }
.campaign-ad-add {
  min-height: 54px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: center; gap: 9px; border-top: 1px solid var(--line); background: #fff;
}
.campaign-ad-add small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-ad-add small.move { color: #9a6500; }
.campaign-ad-add small.unassigned { color: #087740; }
.campaign-ad-add .button { min-height: 38px; }
.campaign-ad-add .button:disabled { cursor: not-allowed; }
.campaign-editor-empty { padding: 24px 14px; color: var(--muted); text-align: center; font-size: 10px; }
.campaign-editor-actions { margin-top: -3px; }
.campaign-write-error {
  min-height: 68px; padding: 12px 13px; display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 11px;
  border: 1px solid #f0d7a8; border-radius: 16px; background: #fffaf0;
}
.campaign-write-error-icon {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: #ffedc8; color: #8c5b00; font-size: 13px; font-weight: 850;
}
.campaign-write-error > div { min-width: 0; display: grid; gap: 4px; }
.campaign-write-error strong { color: #5b3d09; font-size: 11px; line-height: 1.3; }
.campaign-write-error small { color: #826937; font-size: 9px; line-height: 1.4; }
.campaign-write-error .button { min-height: 34px; padding-inline: 12px; white-space: nowrap; }
@media (max-width: 520px) {
  .campaign-write-error { grid-template-columns: 30px minmax(0,1fr); }
  .campaign-write-error .button { grid-column: 1 / -1; width: 100%; }
}
.stock-table { min-width: 1060px; }
.stock-table th, .stock-table td { padding-left: 10px; padding-right: 10px; }
.stock-product-cell { display: flex; min-width: 0; align-items: center; gap: 9px; }
.stock-product-cell > div { min-width: 0; }
.stock-product-title-line { display: flex; min-width: 0; align-items: center; gap: 6px; }
.stock-product-name {
  display: block; min-width: 0; max-width: 100%; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; font-weight: 680; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stock-product-name:hover { color: var(--blue); }
.stock-product-name:focus-visible { outline: 3px solid rgba(8,119,232,.14); border-radius: 4px; }
.stock-panel-actions { display: flex; align-items: center; gap: 12px; }
.return-code-search {
  min-height: 34px; padding: 3px; display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 11px; background: #f7f7f8;
}
.return-code-search:focus-within { border-color: #9ec8f4; box-shadow: 0 0 0 3px rgba(8,119,232,.1); }
.return-code-search input {
  width: 176px; min-width: 0; padding: 0 8px; border: 0; outline: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 10px;
}
.return-code-search input::placeholder { color: #9699a1; }
.return-code-search button {
  min-height: 26px; padding: 0 9px; border: 0; border-radius: 8px; background: white;
  color: #34373d; box-shadow: 0 1px 3px rgba(20,25,35,.08); cursor: pointer;
  font-size: 9px; font-weight: 750;
}
.return-code-search button:disabled { opacity: .55; cursor: wait; }
.stock-toggle, .stock-toggle-placeholder { width: 24px; height: 24px; flex: 0 0 24px; }
.stock-toggle {
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: #f0f1f3; color: #666a73; cursor: pointer; transition: .16s ease;
}
.stock-toggle:hover { background: #e6e8eb; color: #17191d; }
.stock-toggle:focus-visible { outline: 3px solid rgba(8,119,232,.14); outline-offset: 1px; }
.stock-toggle span { font-size: 18px; line-height: 1; transform: translateY(-1px); transition: transform .16s ease; }
.stock-toggle[aria-expanded="true"] span { transform: rotate(90deg); }
.stock-product-row.expanded td { background: #fafafb; }
.stock-detail-row td { padding: 0; background: #fbfbfc; text-align: left; }
.stock-detail-row:hover td { background: #fbfbfc; }
.stock-detail { padding: 10px 18px 14px 48px; }
.stock-detail-summary { min-height: 42px; display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.stock-balance {
  min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: 10px; background: #eef5ff; color: #174d8e;
}
.stock-balance.full { background: #f1edff; color: #5a40b6; }
.stock-balance.transit { background: #fff3df; color: #9b5600; }
.stock-balance small { font-size: 9px; font-weight: 700; }
.stock-balance strong { font-size: 13px; }
.stock-return-review {
  min-height: 36px; padding: 5px 9px; display: inline-grid; grid-template-columns: auto auto;
  align-items: center; column-gap: 7px; text-align: left;
  border: 1px solid #f1c8a9; border-radius: 10px; background: #fff7ef; color: #8b470f;
  cursor: pointer; font: inherit;
}
.stock-return-review span, .stock-return-review small {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9px; font-weight: 750;
}
.stock-return-review strong { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; }
.stock-return-review small { color: #cf5d0b; }
.stock-return-review.waiting { border-color: #bdd9f4; background: #f2f8ff; color: #225f98; }
.stock-return-review.waiting small { color: #4c82b4; }
.stock-exposure-warning, .stock-exposure-ok, .stock-exposure-critical {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 3px; font-size: 9px; font-weight: 700;
}
.stock-exposure-warning { color: #a3470a; }
.stock-exposure-ok { color: #087740; }
.stock-exposure-critical { color: #b12633; }
.stock-product-row.recovery-required td { background: #fff9f9; }
.stock-recovery-badge {
  display: inline-flex; min-height: 19px; margin-left: 7px; padding: 0 7px; align-items: center;
  border-radius: 999px; background: #ffedef; color: #b12633; font-size: 8px; font-weight: 750;
  vertical-align: 1px;
}
.stock-review-badge {
  display: inline-flex; min-height: 19px; margin-left: 7px; padding: 0 7px; align-items: center;
  border-radius: 999px; background: #fff0e5; color: #a44a0b; font-size: 8px; font-weight: 750;
  vertical-align: 1px;
}
.stock-detail-head, .stock-listing-row {
  display: grid; grid-template-columns: minmax(320px, 1fr) 125px 110px 150px 100px;
  gap: 18px; align-items: center;
}
.stock-detail-head {
  min-height: 30px; color: #8b8e97; font-size: 9px; font-weight: 750;
  letter-spacing: .06em; text-transform: uppercase;
}
.stock-detail-head > span { display: flex; align-items: center; gap: 5px; }
.stock-listing-row { min-height: 52px; border-top: 1px solid var(--line); }
.stock-listing-row .cell-title, .stock-listing-row .cell-sub { max-width: 100%; }
.stock-listing-main { display: flex; min-width: 0; align-items: center; gap: 10px; }
.stock-listing-main > div { min-width: 0; }
.stock-listing-main img, .stock-image-placeholder {
  width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #ececef; border-radius: 9px;
  background: #f2f3f5; object-fit: cover;
}
.stock-image-placeholder { display: grid; place-items: center; color: #b3b6bd; font-size: 14px; }
.stock-type {
  display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: 999px;
  background: #eef1f5; color: #5d626c; font-size: 9px; font-weight: 750;
}
.stock-type.full { background: #edf3ff; color: #245cbb; }
.stock-type.mixed { background: #f1edff; color: #5a40b6; }
.stock-listing-quantity { display: flex; align-items: center; gap: 7px; }
.stock-listing-quantity strong { font-size: 13px; }
.stock-listing-quantity small {
  padding: 3px 6px; border-radius: 999px; background: #f0f1f3; color: #777b84;
  font-size: 8px; font-weight: 700;
}
.campaign-detail > td {
  padding: 0; border-bottom-color: #dfe1e6;
  background: linear-gradient(180deg, #f2f3f6 0%, #eceef2 100%);
  box-shadow: inset 3px 0 0 #d3d6dd, inset 0 1px 0 rgba(15,23,42,.05);
}
.campaign-detail:hover > td {
  background: linear-gradient(180deg, #f2f3f6 0%, #eceef2 100%);
}
.campaign-detail-loading { min-height: 190px; display: grid; place-items: center; }
.campaign-detail-loading span {
  width: 22px; height: 22px; border: 2px solid #dadbe0; border-top-color: #17191d;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.campaign-expand { padding: 16px 18px 18px 21px; display: grid; gap: 16px; }
.campaign-insights {
  padding: 10px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 10px; align-items: stretch; border: 1px solid rgba(15,23,42,.07); border-radius: 18px;
  background: rgba(255,255,255,.46);
}
.campaign-chart-panel, .campaign-share {
  border: 1px solid #e5e7eb; border-radius: 14px; background: #fff;
  box-shadow: 0 3px 12px rgba(18,24,40,.025);
}
.campaign-chart-panel { min-width: 0; padding: 12px 14px 10px; }
.metrics-performance-panel { padding: 14px 18px 12px; }
.metrics-performance-panel .campaign-chart-head h3 { font-size: 13px; }
.metrics-performance-panel .campaign-chart { height: 214px; }
.campaign-chart-head {
  min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.campaign-chart-head h3, .campaign-items-head h3 { margin: 0; font-size: 11px; letter-spacing: -.01em; }
.campaign-period-key { display: flex; align-items: center; gap: 11px; color: #858891; font-size: 8px; }
.campaign-period-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.campaign-period-key span::before { content: ""; width: 14px; border-top: 2px solid #757982; }
.campaign-period-key span.previous::before { border-top-style: dashed; }
.campaign-chart { width: 100%; height: 150px; overflow: visible; }
.campaign-chart .grid { stroke: #e7e8eb; stroke-width: 1; stroke-dasharray: 4 6; }
.campaign-chart .axis { stroke: #dfe1e5; stroke-width: 1; }
.ads-chart-bar { vector-effect: non-scaling-stroke; }
.ads-chart-bar.attributed { fill: #3483fa; }
.ads-chart-bar.organic { fill: #b7d8ff; }
.ads-chart-bar.previous {
  fill: transparent; stroke-width: 1.3; stroke-dasharray: 3 3; opacity: .72;
}
.ads-chart-bar.attributed.previous { stroke: #3483fa; }
.ads-chart-bar.organic.previous { stroke: #8fbef0; }
.ads-chart-line {
  fill: none; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.ads-chart-line.roas { stroke: #7a55df; }
.ads-chart-line.acos { stroke: #8d6c20; }
.ads-chart-line.previous { stroke-dasharray: 5 5; opacity: .68; }
.ads-chart-point {
  fill: #fff; stroke: #7a55df; stroke-width: 2; vector-effect: non-scaling-stroke;
}
.ads-chart-point.acos { stroke: #8d6c20; }
.ads-chart-point.previous { opacity: .65; }
.campaign-chart-dates {
  display: flex; justify-content: space-between; margin-top: -7px; color: #9a9ca3; font-size: 8px;
}
.campaign-chart-legend { display: flex; justify-content: flex-end; gap: 12px; margin-top: 7px; color: #777a83; font-size: 8px; }
.campaign-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.campaign-chart-legend span::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; background: #3483fa;
}
.campaign-chart-legend span.organic::before { background: #b7d8ff; }
.campaign-chart-legend span.roas::before,
.campaign-chart-legend span.acos::before {
  width: 12px; height: 0; border-top: 2px solid #7a55df; border-radius: 999px; background: transparent;
}
.campaign-chart-legend span.acos::before { border-color: #8d6c20; }
.campaign-share-list { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; }
.campaign-share { min-width: 0; padding: 11px 12px; display: grid; align-content: center; gap: 8px; }
.campaign-share label { color: #777a83; font-size: 9px; line-height: 1.25; }
.campaign-share > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.campaign-share strong { font-size: 18px; letter-spacing: -.035em; white-space: nowrap; }
.campaign-share .change { margin: 0; }
.campaign-items-block {
  position: relative; min-width: 0; overflow: hidden; display: grid; gap: 0;
  border: 1px solid rgba(255,90,0,.18); border-radius: 18px; background: #fff;
  box-shadow: 0 8px 24px rgba(18,24,40,.045);
}
.campaign-items-block::before {
  content: ""; position: absolute; z-index: 1; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), #ff9a61 72%, rgba(255,154,97,0));
}
.campaign-items-head {
  min-height: 48px; padding: 10px 14px 9px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #ececef;
  background: linear-gradient(90deg, #fff4ed 0%, #fffaf7 34%, #fff 74%);
}
.campaign-items-head::before {
  content: ""; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px;
  background: var(--orange); box-shadow: 4px 4px 0 #ffd8c2;
}
.campaign-items-head > div { display: inline-flex; align-items: center; gap: 5px; }
.campaign-items-head .info { width: 13px; height: 13px; flex-basis: 13px; font-size: 7px; }
.campaign-items-head span {
  min-width: 20px; min-height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #ffe7d9; color: #9c3a08; font-size: 8px; font-weight: 750;
}
.campaign-items-scroll {
  min-width: 0; overflow-x: auto; background: #fff;
}
.campaign-items-scroll .campaign-table { margin: 0; }
.campaign-items-table thead { background: #f8f8fa; }
.campaign-items-table tbody tr:nth-child(even) { background: #fcfcfd; }
.campaign-items-table tbody tr:hover { background: #fff7f2; }
.campaign-items-block > .empty {
  min-height: 78px; margin: 12px; border: 1px dashed #dedfe4; border-radius: 13px;
}
.metrics-hidden {
  margin: 0 12px 12px; overflow: hidden; border: 1px solid #e5e6e9; border-radius: 12px;
  background: #f7f7f8;
}
.campaign-items-block .metrics-hidden { margin: 10px 12px 12px; }
.metrics-hidden summary {
  min-height: 34px; padding: 0 10px; display: flex; align-items: center; gap: 7px;
  color: #777b84; cursor: pointer; list-style: none; font-size: 9px; font-weight: 750;
}
.metrics-hidden summary::-webkit-details-marker { display: none; }
.metrics-hidden summary::before {
  content: "›"; font-size: 15px; font-weight: 500; line-height: 1; transition: transform .16s ease;
}
.metrics-hidden[open] summary::before { transform: rotate(90deg); }
.metrics-hidden summary b {
  min-width: 19px; min-height: 19px; margin-left: auto; padding: 0 6px; display: inline-grid;
  place-items: center; border-radius: 999px; background: #e9eaed; color: #70747c;
  font-size: 8px;
}
.metrics-hidden-list {
  max-height: 180px; overflow: auto; display: grid; border-top: 1px solid #e5e6e9;
  background: rgba(255,255,255,.7);
}
.metrics-hidden-row {
  min-width: 0; min-height: 42px; padding: 7px 11px; display: grid; align-content: center; gap: 2px;
  border-bottom: 1px solid #ececef;
}
.metrics-hidden-row:last-child { border-bottom: 0; }
.metrics-hidden-row strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px;
}
.metrics-hidden-row small { color: #92959d; font-size: 8px; }

.feasibility-table { min-width: 1100px; table-layout: fixed; }
.feasibility-table th:nth-child(1) { width: 23%; }
.feasibility-table th:nth-child(2) { width: 14%; }
.feasibility-table th:nth-child(3) { width: 10%; }
.feasibility-table th:nth-child(4) { width: 11%; }
.feasibility-table th:nth-child(5), .feasibility-table th:nth-child(6) { width: 18.5%; }
.feasibility-table th:nth-child(2), .feasibility-table th:nth-child(5), .feasibility-table th:nth-child(6),
.feasibility-table td:nth-child(2), .feasibility-table td:nth-child(5), .feasibility-table td:nth-child(6) { text-align: left; }
.feasibility-table th:last-child, .feasibility-table td:last-child { width: 52px; }
.feasibility-table td { height: 70px; vertical-align: middle; }
.feasibility-panel-title { display: grid; gap: 5px; }
.feasibility-panel-title small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; font-weight: 650; }
.feasibility-panel-title small i {
  width: 34px; height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, #df4154 0 25%, #ed9b35 42%, #e4bd35 57%, #67ad4d 76%, #15945a 100%);
}
.feasibility-row.expanded td { background: #fafafb; }
.feasibility-product {
  width: 100%; min-width: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 9px;
  background: transparent; cursor: pointer; text-align: left;
}
.feasibility-product > span {
  width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; border-radius: 8px;
  background: #f0f1f3; color: #777a82; font-size: 17px; transition: transform .16s ease;
}
.feasibility-product[aria-expanded="true"] > span { transform: rotate(90deg); }
.feasibility-product > div { min-width: 0; display: grid; gap: 4px; }
.feasibility-product strong, .feasibility-product small { max-width: 235px; }
.feasibility-product small { color: var(--muted); font-size: 9px; }
.feasibility-product-meta { min-width: 0; display: flex; align-items: center; gap: 6px; }
.feasibility-product-meta .table-text { flex: 0 1 auto; }
.feasibility-note-indicator {
  min-height: 18px; padding: 0 6px; display: inline-flex; align-items: center; flex: 0 0 auto;
  border-radius: 999px; background: #f0f1f3; color: #6f737c; font-size: 8px; font-weight: 720;
}
.feasibility-supplier { min-width: 0; display: grid; gap: 5px; justify-items: start; }
.feasibility-supplier > a { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.feasibility-supplier > a:hover strong { color: var(--blue); }
.feasibility-supplier strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.feasibility-supplier strong.muted { color: var(--muted); font-weight: 600; }
.feasibility-supplier > a span { color: var(--blue); font-size: 10px; }
.feasibility-supplier small, .feasibility-money-cell small { color: var(--muted); font-size: 8px; }
.feasibility-money-cell { display: grid; gap: 5px; justify-items: end; }
.feasibility-money-cell strong { color: #17191d; font-size: 12px; }
.feasibility-outcome {
  min-width: 0; padding: 7px 9px; display: grid; gap: 5px; border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--margin-tone, 45) 80% 95% / .9), hsl(var(--margin-tone, 45) 80% 98% / .28));
  box-shadow: inset 0 0 0 1px hsl(var(--margin-tone, 45) 55% 70% / .2);
}
.feasibility-outcome-head { min-width: 0; display: flex; align-items: center; gap: 7px; }
.feasibility-outcome small { min-width: 0; display: flex; gap: 7px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.feasibility-outcome small span + span { padding-left: 7px; border-left: 1px solid #dfe2e6; }
.feasibility-margin { display: inline-block; color: hsl(var(--margin-tone, 45) 72% 32%); font-size: 13px; }
.feasibility-margin.negative { color: hsl(var(--margin-tone, 355) 72% 40%); }
.feasibility-margin-grade {
  min-height: 19px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 999px;
  background: hsl(var(--margin-tone, 45) 72% 87% / .74); color: hsl(var(--margin-tone, 45) 66% 29%);
  font-size: 7px; font-weight: 780; letter-spacing: .01em; white-space: nowrap;
}
.feasibility-detail-row td { padding: 0; background: #fbfbfc; text-align: left; }
.feasibility-detail-row:hover td { background: #fbfbfc; }
.feasibility-quick-form { padding: 15px 22px 18px 46px; display: grid; gap: 13px; border-top: 1px solid rgba(17,19,24,.035); }
.feasibility-quick-grid { display: grid; grid-template-columns: minmax(210px,1.35fr) minmax(220px,1.45fr) minmax(155px,1fr) 132px 132px; gap: 10px; align-items: end; }
.feasibility-quick-field { position: relative; min-width: 0; display: grid; gap: 6px; }
.feasibility-quick-field > span { color: #737780; font-size: 8px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.feasibility-quick-field input, .feasibility-quick-field select {
  width: 100%; height: 40px; padding: 0 11px; border: 1px solid #dfe2e7; border-radius: 11px;
  outline: 0; background: rgba(255,255,255,.88); color: #1c1f25; font: inherit; font-size: 10px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.feasibility-quick-field input:focus, .feasibility-quick-field select:focus { border-color: #7db9f3; background: white; box-shadow: 0 0 0 3px rgba(18,126,232,.1); }
.feasibility-quick-category { z-index: 6; }
.feasibility-quick-money { position: relative; }
.feasibility-quick-money > span { position: absolute; inset: 0 auto 0 11px; z-index: 1; display: flex; align-items: center; color: #8a8e96; font-size: 9px; font-weight: 750; pointer-events: none; }
.feasibility-quick-money input { padding-left: 34px; }
.feasibility-quick-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.feasibility-quick-preview { min-width: 0; display: flex; align-items: stretch; gap: 8px; }
.feasibility-quick-links { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.feasibility-quick-links a {
  min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #dfe2e7; border-radius: 10px; background: rgba(255,255,255,.72);
  color: #555a64; font-size: 9px; font-weight: 730; text-decoration: none;
}
.feasibility-quick-links a:hover { border-color: #b9cce1; background: #fff; color: var(--blue); }
.feasibility-quick-links a.competitor { border-color: #cfe3f8; background: #f2f8ff; color: #1767ad; }
.feasibility-quick-links a span { color: currentColor; font-size: 8px; }
.feasibility-quick-result {
  min-width: 146px; padding: 8px 11px; display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 9px;
  border: 1px solid hsl(var(--margin-tone,45) 52% 84%); border-radius: 11px;
  background: linear-gradient(135deg,hsl(var(--margin-tone,45) 82% 97%),rgba(255,255,255,.9));
}
.feasibility-quick-result > span { color: #777b84; font-size: 8px; font-weight: 700; }
.feasibility-quick-result > strong { color: hsl(var(--margin-tone,45) 70% 31%); font-size: 12px; text-align: right; }
.feasibility-quick-result > small { grid-column: 1 / -1; color: #777b84; font-size: 8px; }
.feasibility-quick-status { color: var(--muted); font-size: 9px; }
.feasibility-quick-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.feasibility-quick-actions .button { min-width: 86px; min-height: 38px; }
.feasibility-quick-more { min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #696d76; font-size: 10px; font-weight: 700; cursor: pointer; }
.feasibility-quick-more:hover { background: #eceef1; color: #22252b; }

.feasibility-live-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.modal-card.wide:has(.feasibility-form) { width: min(1020px, 100%); }
.feasibility-form-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: 20px; align-items: start; }
.feasibility-fields { display: grid; gap: 12px; min-width: 0; }
.feasibility-category { position: relative; z-index: 4; }
.feasibility-category-results {
  position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; padding: 5px;
  border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.99);
  box-shadow: 0 16px 38px rgba(20,25,35,.15);
}
.feasibility-category-results[hidden] { display: none; }
.feasibility-category-results button {
  width: 100%; min-height: 43px; padding: 7px 9px; border: 0; border-radius: 9px; display: grid;
  gap: 2px; background: transparent; cursor: pointer; text-align: left;
}
.feasibility-category-results button:hover { background: #f2f3f5; }
.feasibility-category-results strong { color: #202228; font-size: 11px; }
.feasibility-category-results small, .feasibility-category-empty { color: var(--muted); font-size: 9px; }
.feasibility-category-empty { display: block; padding: 10px; }
.feasibility-supplier-field { display: grid; gap: 6px; }
.feasibility-supplier-field > select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dfe0e4; border-radius: 12px;
  background: #fafafb; color: #17191d; outline: none; transition: border .15s, box-shadow .15s;
}
.feasibility-supplier-field > select:focus {
  border-color: #6ba9ed; background: white; box-shadow: 0 0 0 3px rgba(8,119,232,.12);
}
.feasibility-supplier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feasibility-supplier-head > span { color: #656870; font-size: 11px; font-weight: 650; }
.feasibility-supplier-head > button {
  min-height: 24px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent;
  color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 750;
}
.feasibility-supplier-head > button:hover { background: rgba(8,119,232,.08); }
.feasibility-quick-supplier {
  margin-top: 2px; padding: 12px; display: grid; gap: 10px; border: 1px solid var(--line);
  border-radius: 15px; background: #f7f7f9;
}
.feasibility-quick-supplier[hidden] { display: none; }
.feasibility-quick-supplier-actions { display: flex; justify-content: flex-end; gap: 7px; }
.feasibility-quick-supplier-actions button {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: #e9eaed;
  color: #33363d; cursor: pointer; font-size: 10px; font-weight: 750;
}
.feasibility-quick-supplier-actions button.primary { background: #111318; color: white; }
.feasibility-quick-supplier-actions button:disabled { opacity: .55; cursor: wait; }
.feasibility-options { border: 1px solid var(--line); border-radius: 13px; background: #fafafb; overflow: hidden; }
.feasibility-options summary {
  min-height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
  color: #4e525a; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700;
}
.feasibility-options summary::-webkit-details-marker { display: none; }
.feasibility-options summary > span { color: #30333a; font-size: 11px; }
.feasibility-options summary > small { color: var(--blue); font-size: 9px; font-weight: 750; }
.feasibility-options-body { padding: 3px 11px 12px; display: grid; gap: 11px; }
.feasibility-options .form-grid { gap: 9px; }
.feasibility-options label small { margin: -4px 2px 0; color: #999ca4; font-size: 8px; }
.feasibility-options .form input, .feasibility-options .form select { height: 40px; }
.feasibility-dimensions { grid-template-columns: repeat(3, 1fr); }
.feasibility-side {
  position: sticky; top: 0; padding: 13px; display: grid; gap: 14px; border: 1px solid var(--line);
  border-radius: 18px; background: #f6f6f8;
}
.feasibility-live { min-height: 276px; }
.feasibility-preview-state { min-height: 248px; display: grid; place-items: center; padding: 20px; color: var(--muted); text-align: center; font-size: 11px; }
.feasibility-live-results { display: grid; gap: 9px; }
.feasibility-live-card { min-height: 108px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.feasibility-live-card header strong { font-size: 11px; }
.feasibility-live-margin { margin-top: 12px; font-size: 25px; font-weight: 780; letter-spacing: -.045em; }
.feasibility-live-profit { margin-top: -28px; text-align: right; font-size: 12px; font-weight: 750; }
.feasibility-live-card footer { margin-top: 16px; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.feasibility-live-meta { display: flex; gap: 8px; margin-top: 9px; padding: 0 3px; color: #888b93; font-size: 8px; }
.feasibility-side-fields { padding-top: 13px; display: grid; gap: 10px; border-top: 1px solid #dedfe4; }
.feasibility-side-fields textarea { min-height: 84px; resize: vertical; }

.catalog-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 14px; }
.catalog-grid .panel { overflow: visible; }
.list { display: grid; }
.list-row { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border: 0; }
.list-row strong { display: block; font-size: 12px; }
.list-row small { color: var(--muted); font-size: 10px; }
.catalog-product-block { border-bottom: 1px solid var(--line); }
.catalog-product-block:last-child { border-bottom: 0; }
.catalog-product-row { min-height: 57px; padding: 0 10px 0 6px; border: 0; }
.catalog-product-toggle {
  min-width: 0; min-height: 56px; flex: 1; padding: 8px 6px; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left;
}
.catalog-product-toggle > span {
  width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%;
  background: #f1f2f4; color: #737780; font-size: 18px; transition: transform .15s ease;
}
.catalog-product-toggle[aria-expanded="true"] > span { transform: rotate(90deg); }
.catalog-product-toggle > div { min-width: 0; }
.catalog-product-toggle strong,
.catalog-product-toggle small { overflow: hidden; display: block; text-overflow: ellipsis; white-space: nowrap; }
.catalog-product-suppliers {
  margin: 0 14px 12px 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px;
  background: #fafafb;
}
.catalog-supplier-option {
  min-height: 39px; padding: 7px 11px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; border-bottom: 1px solid var(--line); font-size: 11px;
}
.catalog-supplier-option:last-child { border-bottom: 0; }
.catalog-supplier-option a { color: inherit; font-weight: 700; text-decoration: none; }
.catalog-supplier-option a:hover { color: var(--blue); }
.catalog-supplier-option span { white-space: nowrap; font-weight: 800; }
.catalog-supplier-empty { padding: 11px; color: var(--muted); font-size: 10px; }
.supplier-link { display: block; color: inherit; font-size: 12px; font-weight: 700; text-decoration: none; }
.supplier-link:hover { color: var(--blue); }
.row-menu { position: relative; flex: 0 0 auto; }
.row-menu[open] { z-index: 160; }
.row-menu summary {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  color: #777a82; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; letter-spacing: 1px;
}
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:focus { outline: none; }
.row-menu summary:focus-visible { box-shadow: 0 0 0 3px rgba(8,119,232,.14); }
.row-menu summary:hover, .row-menu[open] summary { background: #f1f2f4; color: #17191d; }
.row-menu-popover {
  position: fixed; z-index: 160; top: 0; left: 0; width: 136px; padding: 5px;
  display: grid; gap: 2px; visibility: hidden; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 14px 34px rgba(20,25,35,.16);
}
.row-menu-popover button, .row-menu-popover a {
  width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  display: flex; align-items: center; color: #25272c; cursor: pointer; text-align: left;
  font-size: 12px; font-weight: 650; text-decoration: none;
}
.row-menu-popover button:hover, .row-menu-popover a:hover { background: #f3f3f5; }
.row-menu-popover a { justify-content: space-between; }
.row-menu-popover button.danger { color: var(--red); }
.access-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.access-card { padding: 18px; border-radius: 18px; background: white; border: 1px solid var(--line); }
.access-card h3 { margin: 0 0 5px; font-size: 15px; }
.access-card p { margin: 0; color: var(--muted); font-size: 11px; }
.access-card footer { margin-top: 19px; display: flex; align-items: center; justify-content: space-between; }

.modal[hidden], .toast[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,17,22,.28); backdrop-filter: blur(10px); }
.modal-card {
  position: relative; z-index: 1; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: 25px; border: 1px solid rgba(255,255,255,.75); border-radius: 24px; background: rgba(255,255,255,.98);
  box-shadow: 0 30px 80px rgba(18,25,40,.2);
}
.modal-card.wide { width: min(720px, 100%); }
.modal-card.wide:has(.purchase-editor) { width: min(860px, 100%); }
@media (min-width: 760px) {
  .modal-card.wide .purchase-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.modal-card.wide:has(.listing-form) { width: min(940px, 100%); }
.modal-close {
  position: absolute; top: 13px; right: 13px; width: 31px; height: 31px; border: 0;
  border-radius: 50%; background: #eff0f2; color: #696c74; font-size: 20px; cursor: pointer;
}
.modal h2 { margin: 0 40px 20px 0; font-size: 22px; letter-spacing: -.035em; }
.form { display: grid; gap: 13px; }
.form label { display: grid; gap: 6px; color: #656870; font-size: 11px; font-weight: 650; }
.form input, .form select, .form textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dfe0e4; border-radius: 12px;
  background: #fafafb; color: #17191d; outline: none; transition: border .15s, box-shadow .15s;
}
.form textarea { height: auto; min-height: 150px; padding-block: 11px; resize: vertical; line-height: 1.45; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: #6ba9ed; box-shadow: 0 0 0 3px rgba(8,119,232,.12); background: white; }
.br-date-input {
  width: 100%; height: 44px; min-width: 0; padding: 3px 4px 3px 6px;
  display: grid; grid-template-columns: 26px 5px 26px 5px minmax(42px,1fr) 28px;
  align-items: center; border: 1px solid #dfe0e4; border-radius: 12px;
  background: #fafafb; color: #17191d; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.br-date-input:focus-within {
  border-color: #6ba9ed; background: white; box-shadow: 0 0 0 3px rgba(8,119,232,.12);
}
.br-date-separator {
  color: #a0a3aa; text-align: center; font-size: 11px; font-weight: 600;
}
.br-date-input input[data-br-date-part] {
  width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: inherit; box-shadow: none; outline: none; text-align: center;
  font: inherit; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 650;
}
.br-date-input input[data-br-date-part]::placeholder { color: #a0a3aa; opacity: 1; }
.br-date-input input[data-br-date-part]:focus {
  border: 0; background: rgba(8,119,232,.07); box-shadow: none;
}
.br-date-picker-shell {
  position: relative; width: 28px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; color: #777b84;
}
.br-date-picker-shell:hover { background: rgba(8,119,232,.07); color: #2878d1; }
.br-date-picker-shell svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.br-date-picker-shell input[data-br-date-picker] {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
  opacity: 0; cursor: pointer;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-supplier-editor {
  overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fafafb;
}
.product-supplier-editor > header {
  min-height: 45px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; border-bottom: 1px solid var(--line);
}
.product-supplier-editor > header strong { font-size: 12px; }
.product-supplier-editor > header button {
  min-height: 30px; padding: 0 9px; border: 0; border-radius: 9px; background: #eceef1;
  color: #363940; cursor: pointer; font-size: 10px; font-weight: 750;
}
.product-supplier-row {
  padding: 10px 12px; display: grid; grid-template-columns: minmax(0,1fr) 150px 30px;
  align-items: end; gap: 9px; border-bottom: 1px solid var(--line);
}
.product-supplier-row:last-child { border-bottom: 0; }
.product-supplier-row > button {
  width: 30px; height: 30px; margin-bottom: 7px; border: 0; border-radius: 50%; background: transparent;
  color: #92969e; cursor: pointer; font-size: 18px;
}
.product-supplier-row > button:hover { background: #fff0f1; color: var(--red); }
.movement-details, .movement-fields { display: grid; gap: 13px; }
.movement-details[hidden], .movement-fields[hidden] { display: none; }
.movement-product-action { justify-self: start; margin-top: -6px; }
.recurrence-editor { display: grid; gap: 9px; }
.recurrence-end-fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #f7f7f9;
}
.recurrence-end-fields[hidden], .recurrence-end-fields > [hidden] { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.return-review-card { display: grid; gap: 15px; }
.return-review-product {
  min-height: 60px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fafafb;
}
.return-review-product > div { min-width: 0; display: grid; gap: 4px; }
.return-review-product strong, .return-review-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.return-review-product strong { font-size: 13px; }
.return-review-product small { color: var(--muted); font-size: 9px; }
.return-review-product > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eef1f5; font-size: 10px; font-weight: 750; }
.return-review-meta { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 8px; }
.return-review-meta > div, .return-review-reason {
  min-width: 0; padding: 10px 12px; display: grid; gap: 4px;
  border: 1px solid var(--line); border-radius: 13px; background: #fafafb;
}
.return-review-meta small, .return-review-reason small,
.return-review-reason span { color: var(--muted); font-size: 9px; font-weight: 700; }
.return-review-meta strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.return-review-reason strong { font-size: 12px; line-height: 1.35; }
.return-review-cost { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.return-review-cost span { color: var(--muted); font-size: 10px; font-weight: 700; }
.return-review-cost strong { font-size: 17px; }
.return-arrival-note {
  padding: 12px 14px; display: grid; gap: 4px; border: 1px solid #cfe1f3;
  border-radius: 13px; background: #f3f8fe; color: #245b8d;
}
.return-arrival-note strong { font-size: 12px; }
.return-arrival-note span { font-size: 10px; line-height: 1.45; }
.return-review-card > p { margin: -3px 0 0; color: var(--muted); font-size: 11px; }
.return-review-card > label { display: grid; gap: 6px; color: #656870; font-size: 11px; font-weight: 650; }
.return-review-card textarea {
  width: 100%; min-height: 68px; padding: 10px 12px; border: 1px solid #dfe0e4; border-radius: 12px;
  background: #fafafb; color: #17191d; outline: none; resize: vertical; font: inherit;
}
.return-review-card textarea:focus { border-color: #6ba9ed; box-shadow: 0 0 0 3px rgba(8,119,232,.12); }
.return-review-actions { justify-content: space-between; align-items: center; }
.return-review-actions > div { display: flex; gap: 8px; }
.return-loss-button { color: var(--red); }
.return-review-reason-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.return-review-reason-head a { color: var(--blue); font-size: 9px; font-weight: 750; text-decoration: none; }
.return-review-reason-head a:hover { text-decoration: underline; }
.return-review-reason-head button {
  padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer;
  font-size: 9px; font-weight: 750;
}
.return-review-reason-head button:hover { text-decoration: underline; }
.modal-card.wide:has(.post-sale-detail) { width: min(800px, 100%); padding: clamp(22px, 3vw, 30px); }
.modal-card.wide:has(.post-sale-detail) h2 { margin-bottom: 22px; font-size: 24px; }
.post-sale-detail { display: grid; gap: 14px; }
.post-sale-detail-product {
  min-width: 0; padding: 0 2px 4px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.post-sale-detail-product > div { min-width: 0; display: grid; gap: 4px; }
.post-sale-detail-product strong, .post-sale-detail-product small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-sale-detail-product strong { font-size: 14px; letter-spacing: -.015em; }
.post-sale-detail-product small { color: var(--muted); font-size: 9px; }
.post-sale-detail-grid {
  overflow: hidden; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: 16px; background: #fafafb;
}
.post-sale-detail-grid > div {
  min-width: 0; min-height: 62px; padding: 12px 14px; display: grid; align-content: center; gap: 5px;
  border-right: 1px solid var(--line);
}
.post-sale-detail-grid > div:last-child { border-right: 0; }
.post-sale-detail-grid small, .post-sale-reason small { color: var(--muted); font-size: 8px; font-weight: 700; }
.post-sale-detail-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.post-sale-flex-chip {
  padding: 3px 7px; border-radius: 999px; background: #fff3d6; color: #8b5b00;
  font-size: 8px; font-weight: 780; white-space: nowrap;
}
.post-sale-flex-impact,
.post-sale-arrival {
  min-width: 0; padding: 13px 15px; display: grid; grid-template-columns: auto minmax(0,1fr);
  align-items: start; gap: 12px; border: 1px solid #f1d28c; border-radius: 16px; background: #fffaf0;
}
.post-sale-flex-impact > span,
.post-sale-arrival > span {
  min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 11px;
  background: #ffe9b6; color: #875800; font-size: 9px; font-weight: 800; font-style: normal;
}
.post-sale-flex-impact > div,
.post-sale-arrival > div { min-width: 0; display: grid; gap: 4px; }
.post-sale-flex-impact strong,
.post-sale-arrival strong { font-size: 11px; letter-spacing: -.01em; }
.post-sale-flex-impact p,
.post-sale-arrival p { margin: 0; color: #6b5a34; font-size: 9px; line-height: 1.45; }
.post-sale-flex-impact small { color: #8b7445; font-size: 8px; line-height: 1.4; }
.post-sale-arrival.warehouse { border-color: #cfe0f5; background: #f4f8fd; }
.post-sale-arrival.warehouse > span { background: #e1efff; color: #2267aa; }
.post-sale-arrival.warehouse p { color: #52657a; }
.post-sale-arrival.withdrawal { border-color: #eed7a2; background: #fffaf1; }
.post-sale-arrival.seller { border-color: #cce8d7; background: #f2faf5; }
.post-sale-arrival.seller > span { background: #dff3e7; color: #087740; }
.post-sale-arrival.seller p { color: #4f6c5b; }
.post-sale-logistics { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fafafb; }
.post-sale-logistics > header {
  min-height: 36px; padding: 0 14px; display: flex; align-items: center; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase;
}
.post-sale-logistics > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); }
.post-sale-logistics > div > div {
  min-width: 0; min-height: 58px; padding: 11px 14px; display: grid; align-content: center; gap: 5px;
  border-right: 1px solid var(--line);
}
.post-sale-logistics > div > div:last-child { border-right: 0; }
.post-sale-logistics span { color: var(--muted); font-size: 8px; font-weight: 680; }
.post-sale-logistics strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.post-sale-logistics .credit strong { color: #087740; }
.post-sale-logistics .total { background: #f3f4f6; }
.post-sale-logistics .total strong { font-size: 14px; }
.post-sale-reason {
  min-width: 0; padding: 14px 15px; display: grid; gap: 5px; border: 0; border-radius: 15px;
  background: #f5f5f7; box-shadow: inset 0 0 0 1px rgba(15,23,42,.045);
}
.post-sale-reason strong { font-size: 12px; line-height: 1.4; }
.post-sale-reason span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.post-sale-internal-note {
  overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.post-sale-internal-note > header {
  min-height: 50px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.post-sale-internal-note > header > div { min-width: 0; display: grid; gap: 5px; }
.post-sale-internal-note small { color: var(--muted); font-size: 8px; font-weight: 700; }
.post-sale-internal-note p { margin: 0; color: var(--ink); font-size: 10px; line-height: 1.45; }
.post-sale-internal-note > header button {
  flex: 0 0 auto; padding: 6px 9px; border: 0; border-radius: 9px; background: #f1f3f6;
  color: #2878d1; cursor: pointer; font-size: 9px; font-weight: 750;
}
.post-sale-internal-note > header button:hover { background: #e8edf4; }
.post-sale-internal-note form { padding: 0 14px 13px; }
.post-sale-internal-note form[hidden] { display: none; }
.post-sale-internal-note textarea {
  width: 100%; min-height: 72px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px;
  background: #fafafb; color: var(--ink); outline: none; resize: vertical; font: inherit; font-size: 10px; line-height: 1.45;
}
.post-sale-internal-note textarea:focus { border-color: #76ade7; box-shadow: 0 0 0 3px rgba(8,119,232,.1); }
.post-sale-internal-note form > div { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-sale-internal-note form .button { min-height: 34px; padding: 0 14px; font-size: 9px; }
.post-sale-detail-actions { display: flex; justify-content: flex-end; gap: 8px; }
.post-sale-financial {
  overflow: hidden; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: 16px; background: #fafafb;
}
.post-sale-financial > div {
  min-width: 0; min-height: 62px; padding: 12px 14px; display: grid; align-content: center; gap: 5px;
  border-right: 1px solid var(--line);
}
.post-sale-financial > div:last-child { border-right: 0; }
.post-sale-financial small { color: var(--muted); font-size: 8px; font-weight: 700; }
.post-sale-financial strong { font-size: 13px; }
.post-sale-financial span { color: var(--muted); font-size: 8px; line-height: 1.35; }
.post-sale-financial .loss strong { color: #cf3042; }
.post-sale-financial .ok strong { color: #087740; }
.post-sale-financial .warning strong, .post-sale-financial .pending strong { color: #9a6500; }
.post-sale-recoveries { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.post-sale-recoveries > header { min-height: 42px; padding: 0 14px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: transparent; }
.post-sale-recoveries h3 { margin: 0; font-size: 11px; }
.post-sale-recoveries ul { margin: 0; padding: 0; list-style: none; }
.post-sale-recoveries li { min-height: 48px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.post-sale-recoveries li:last-child { border-bottom: 0; }
.post-sale-recoveries li > span { min-width: 0; display: grid; gap: 3px; }
.post-sale-recoveries li > span:last-child { text-align: right; }
.post-sale-recoveries strong { font-size: 10px; }
.post-sale-recoveries small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.modal-card:has(.return-recovery-form) { width: min(500px, 100%); padding: clamp(24px, 4vw, 32px); }
.modal-card:has(.return-recovery-form) h2 { margin-bottom: 22px; font-size: 24px; }
.return-recovery-form { display: grid; gap: 16px; }
.return-recovery-context {
  min-width: 0; padding: 0 2px 2px; display: grid; grid-template-columns: 36px minmax(0,1fr);
  align-items: center; gap: 11px;
}
.return-recovery-context > i {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  background: #eef5ff; color: #2878d1; font-size: 18px; font-style: normal; font-weight: 700;
}
.return-recovery-context > div { min-width: 0; display: grid; gap: 4px; }
.return-recovery-context strong, .return-recovery-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.return-recovery-context strong { font-size: 12px; letter-spacing: -.01em; }
.return-recovery-context span { color: var(--muted); font-size: 9px; }
.return-recovery-fields { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fafafb; }
.return-recovery-field {
  min-height: 54px; padding: 5px 10px 5px 15px; display: grid !important;
  grid-template-columns: 118px minmax(0,1fr); align-items: center; gap: 12px !important;
  border-bottom: 1px solid var(--line); color: #555961 !important;
}
.return-recovery-field:last-child { border-bottom: 0; }
.return-recovery-field > span { font-size: 10px; font-weight: 700; }
.return-recovery-field input, .return-recovery-field select {
  height: 42px; padding: 0 9px; border: 0; background: transparent; text-align: right; box-shadow: none;
  font-size: 11px; font-weight: 650;
}
.return-recovery-field select { text-align-last: right; }
.return-recovery-field input:focus, .return-recovery-field select:focus { background: rgba(8,119,232,.05); box-shadow: none; }
.return-recovery-field .br-date-input {
  height: 42px; padding-inline: 3px; border: 0; background: transparent; box-shadow: none;
}
.return-recovery-field .br-date-input:focus-within { background: rgba(8,119,232,.05); }
.return-recovery-field .br-date-input input[data-br-date-part] {
  height: 32px; padding: 0; text-align: center;
}
.return-recovery-result {
  min-height: 78px; padding: 13px 15px; display: grid; grid-template-columns: 34px minmax(0,1fr);
  align-items: center; gap: 12px; border: 1px solid #cfe9da; border-radius: 16px; background: #f1faf5;
}
.return-recovery-result-icon {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: #dff3e7; color: #16814a; font-size: 15px; font-style: normal; font-weight: 850;
}
.return-recovery-result-copy { min-width: 0; display: grid; gap: 4px; }
.return-recovery-result-copy > span { color: #59806a; font-size: 9px; font-weight: 700; }
.return-recovery-result-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.return-recovery-result strong { min-width: 0; font-size: 16px; letter-spacing: -.025em; }
.return-recovery-result-value > button {
  min-height: 28px; padding: 0; border: 0; background: transparent; color: #0877e8;
  cursor: pointer; font-size: 10px; font-weight: 750;
}
.return-recovery-result-value > button:hover { text-decoration: underline; }
.return-recovery-result-copy > label { margin-top: 7px; display: grid; gap: 6px; }
.return-recovery-result-copy > label > span { color: #59806a; font-size: 9px; font-weight: 700; }
.return-recovery-form[data-recovery-mode="stock"] .return-recovery-result { border-color: #cddff3; background: #f1f7fd; }
.return-recovery-form[data-recovery-mode="stock"] .return-recovery-result-icon { background: #dcebf9; color: #2c70b7; }
.return-recovery-form[data-recovery-mode="stock"] .return-recovery-result-copy > span { color: #527394; }
.return-recovery-money { position: relative; }
.return-recovery-money > span {
  position: absolute; z-index: 1; inset: 0 auto 0 13px; display: flex; align-items: center;
  color: #777b84; pointer-events: none; font-size: 11px; font-weight: 700;
}
.return-recovery-money input { padding-left: 36px; }
.return-recovery-form input[type="number"] { appearance: textfield; }
.return-recovery-form input[type="number"]::-webkit-inner-spin-button,
.return-recovery-form input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.return-recovery-note { border-top: 1px solid var(--line); padding-top: 2px; }
.return-recovery-note summary {
  min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: #555961; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none;
}
.return-recovery-note summary::-webkit-details-marker { display: none; }
.return-recovery-note summary::after { content: "+"; color: #8a8e96; font-size: 17px; font-weight: 500; }
.return-recovery-note[open] summary::after { content: "−"; }
.return-recovery-note summary small { margin-left: auto; color: #9a9da5; font-size: 9px; font-weight: 600; }
.return-recovery-note textarea {
  width: 100%; min-height: 68px; max-height: 120px; margin-top: 4px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 13px; background: #fafafb; color: var(--text);
  outline: none; resize: vertical; line-height: 1.4;
}
.return-recovery-note textarea:focus { border-color: #6ba9ed; box-shadow: 0 0 0 3px rgba(8,119,232,.1); background: white; }
.return-recovery-form .form-actions { margin-top: -2px; padding-top: 0; }
.return-recovery-form .form-actions .button { width: 100%; min-height: 46px; }
@media (max-width: 520px) { .return-recovery-field { grid-template-columns: 102px minmax(0,1fr); } }
.post-sale-conversation { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.post-sale-conversation > header {
  min-height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: transparent;
}
.post-sale-conversation h3 { margin: 0; font-size: 12px; }
.post-sale-conversation > header span {
  min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px;
  background: #eceef1; color: #686c75; font-size: 8px; font-weight: 750;
}
.post-sale-conversation > div { max-height: 360px; overflow: auto; padding: 10px; display: grid; gap: 8px; background: #f7f7f8; }
.post-sale-message {
  width: min(82%, 590px); padding: 10px 11px; display: grid; gap: 6px; justify-self: start;
  border: 1px solid #e5e6e9; border-radius: 13px 13px 13px 4px; background: #fff;
}
.post-sale-message.ours { justify-self: end; border-color: #cce0f7; border-radius: 13px 13px 4px 13px; background: #eef6ff; }
.post-sale-message header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-sale-message header strong { font-size: 9px; }
.post-sale-message time { color: var(--muted); font-size: 8px; }
.post-sale-message p { margin: 0; color: #33363c; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.post-sale-message > div { display: flex; flex-wrap: wrap; gap: 5px; }
.post-sale-attachment { padding: 4px 7px; border-radius: 8px; background: #f0f1f3; color: #666a73; font-size: 8px; }
.post-sale-no-messages { margin: 0; padding: 16px 12px; color: var(--muted); text-align: center; font-size: 10px; }
.return-reference-disclosure {
  overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fafafb;
}
.return-reference-disclosure > button {
  width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; border: 0; background: transparent; color: var(--text);
  cursor: pointer; font: inherit; text-align: left;
}
.return-reference-disclosure > button strong { font-size: 11px; }
.return-reference-disclosure > button span { color: var(--blue); font-size: 9px; font-weight: 750; }
.return-reference-disclosure > button:disabled { cursor: wait; opacity: .65; }
.return-reference-panel { padding: 0 12px 12px; display: grid; gap: 12px; }
.return-reference-panel[hidden] { display: none; }
.return-reference-group { display: grid; gap: 6px; }
.return-reference-group h3 {
  margin: 0; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase;
  letter-spacing: .05em;
}
.return-reference-group > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.return-reference-row {
  min-width: 0; padding: 8px 9px; display: grid; gap: 3px; border-radius: 10px; background: #f0f1f3;
}
.return-reference-row small { color: var(--muted); font-size: 8px; font-weight: 700; }
.return-reference-row strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750;
}
.return-code-card {
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid #cfe1f3; border-radius: 14px; background: #f3f8fe;
}
.return-code-card small { color: #537697; font-size: 9px; font-weight: 700; }
.return-code-card strong { color: #1f5c94; font-size: 14px; letter-spacing: .02em; }
.return-code-help { margin: -5px 1px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.return-candidate-list { display: grid; gap: 7px; }
.return-candidate {
  width: 100%; min-height: 69px; padding: 10px 12px; display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr) 16px; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 14px; background: #fafafb; color: var(--text);
  text-align: left; cursor: pointer; font: inherit;
}
.return-candidate:hover { border-color: #b9d5f2; background: #f5f9fe; }
.return-candidate:disabled { opacity: .55; cursor: wait; }
.return-candidate > span { min-width: 0; display: grid; gap: 4px; }
.return-candidate strong, .return-candidate small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.return-candidate strong { font-size: 10px; }
.return-candidate small { color: var(--muted); font-size: 8px; }
.return-candidate i { color: #90949c; font-size: 20px; font-style: normal; }
.form-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #f0f0f2; }
.form-tabs button { flex: 1; min-height: 33px; border: 0; border-radius: 8px; background: transparent; color: #71747c; cursor: pointer; font-size: 11px; font-weight: 700; }
.form-tabs button.active { background: white; color: #14161a; box-shadow: 0 2px 8px rgba(20,25,35,.09); }
.supplier-tab-panel { display: grid; gap: 13px; }
.supplier-tab-panel[hidden] { display: none; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-grid button {
  min-height: 105px; border: 1px solid var(--line); border-radius: 17px; background: #fafafb;
  cursor: pointer; font-weight: 700; transition: .15s;
}
.choice-grid button:hover { border-color: #cfd0d5; background: white; transform: translateY(-1px); }
.choice-grid button:last-child { grid-column: 1 / -1; min-height: 70px; }
.check { display: flex !important; grid-template-columns: 20px 1fr; align-items: center; }
.check input { width: 17px; height: 17px; }
.form-error { color: var(--red); font-size: 12px; text-align: center; }
.form-success { color: var(--green); font-size: 12px; text-align: center; }
.modal-loading { min-height: 320px; }
.listing-source {
  min-width: 0; min-height: 66px; margin: -5px 0 10px; padding: 8px; display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--line); border-radius: 15px; background: #fafafb;
}
.listing-source > img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px; object-fit: cover; }
.listing-source > div { min-width: 0; display: grid; gap: 4px; }
.listing-source strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-source small { color: #858891; font-size: 9px; }
.listing-form { padding-top: 2px; }
.listing-form-tabs { margin-bottom: 2px; }
.listing-tab-panel { display: grid; gap: 13px; }
.listing-tab-panel[hidden] { display: none; }
.modal-card.wide:has(.listing-content-panel) { width: min(900px, 100%); }
.content-listing-source { margin-bottom: 12px; }
.content-listing-source .listing-image-placeholder {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px;
}
.content-tabs { margin-bottom: 14px; }
.listing-content-panel { display: grid; gap: 13px; }
.content-title-current {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.content-title-current > article {
  min-width: 0; min-height: 132px; padding: 15px; display: grid; align-content: start; gap: 9px;
  border: 1px solid #e3e5e9; border-radius: 17px; background: #fafafb;
}
.content-title-current > article.catalog { background: #f5f8fc; border-color: #dfe8f3; }
.content-title-current > article.unavailable { background: #fafafb; border-color: #eceef1; }
.content-title-current header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.content-title-current header span {
  color: #727680; font-size: 9px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase;
}
.content-title-current header em {
  padding: 3px 7px; border-radius: 999px; background: #e8f6ee; color: #137344;
  font-size: 8px; font-style: normal; font-weight: 800;
}
.content-title-current .catalog header em { background: #e8f1fc; color: #2769ae; }
.content-title-current > article > strong {
  overflow-wrap: anywhere; color: #17191d; font-size: 13px; line-height: 1.38; letter-spacing: -.015em;
}
.content-title-current > article > small { color: #858994; font-size: 9px; line-height: 1.4; }
.content-base-name {
  min-width: 0; padding: 10px 13px; display: grid; grid-template-columns: 145px minmax(0,1fr);
  align-items: center; gap: 12px; border: 1px solid #eceef1; border-radius: 13px; background: #fff;
}
.content-base-name span { color: #858994; font-size: 9px; font-weight: 750; }
.content-base-name strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #30333a; font-size: 10px;
}
.content-history-section,
.content-keyword-editor,
.content-discovery-section,
.content-keyword-section {
  overflow: hidden; border: 1px solid #e5e7eb; border-radius: 17px; background: #fff;
}
.content-history-section > header,
.content-keyword-editor > header,
.content-discovery-section > header,
.content-keyword-section > header {
  padding: 13px 15px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.content-history-section > header > div,
.content-keyword-editor > header > div,
.content-discovery-section > header > div,
.content-keyword-section > header > div { display: grid; gap: 2px; }
.content-history-section > header strong,
.content-keyword-editor > header strong,
.content-discovery-section > header strong,
.content-keyword-section > header strong {
  display: flex; align-items: center; gap: 5px; color: #202329; font-size: 11px;
}
.content-history-section > header small,
.content-keyword-editor > header small,
.content-discovery-section > header small,
.content-keyword-section > header small { color: #8a8e98; font-size: 9px; }
.content-version-list,
.content-keyword-list { border-top: 1px solid #eef0f3; }
.content-version-row,
.content-keyword-row {
  min-height: 64px; padding: 11px 15px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; border-bottom: 1px solid #eef0f3;
}
.content-version-row:last-child,
.content-keyword-row:last-child { border-bottom: 0; }
.content-version-row > div,
.content-keyword-row > div:first-child { min-width: 0; display: grid; gap: 5px; }
.content-version-type {
  width: fit-content; padding: 3px 7px; border-radius: 999px;
  color: #315f9a; background: #edf5ff; font-size: 8px; font-weight: 800;
  letter-spacing: .03em;
}
.content-version-type.catalog { color: #6c4a96; background: #f4effb; }
.content-version-row strong,
.content-keyword-row > div:first-child > strong {
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  color: #202329; font-size: 10px; line-height: 1.4;
}
.content-version-row small { color: #8a8e98; font-size: 8px; }
.content-version-row > button {
  min-width: 64px; height: 30px; padding: 0 10px; border: 0; border-radius: 9px;
  background: #f0f1f3; color: #4b4f58; cursor: pointer; font-size: 9px; font-weight: 800;
}
.content-version-row > button:hover { background: #e7edf5; color: #216bb7; }
.content-history-empty { padding: 22px 15px; color: #9296a0; font-size: 10px; text-align: center; }
.content-change-details {
  overflow: hidden; border: 1px solid #e8eaee; border-radius: 14px; background: #fafafb;
}
.content-change-details > summary {
  min-height: 44px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between;
  color: #555963; cursor: pointer; list-style: none; font-size: 10px; font-weight: 750;
}
.content-change-details > summary::-webkit-details-marker { display: none; }
.content-change-details > summary span {
  min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: #e9ebef; color: #737781; font-size: 8px;
}
.content-change-details > div { border-top: 1px solid #e8eaee; }
.content-change-details article {
  padding: 9px 13px; display: grid; gap: 4px; border-bottom: 1px solid #eceef1;
}
.content-change-details article:last-child { border-bottom: 0; }
.content-change-details article small { color: #91959f; font-size: 8px; }
.content-change-details article span { color: #4c5059; font-size: 9px; line-height: 1.45; }
.listing-content-search { display: grid; gap: 12px; }
.content-keyword-input-wrap {
  min-height: 48px; margin: 0 14px; padding: 7px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  border: 1px solid #dfe2e7; border-radius: 13px; background: #fafafb;
}
.content-keyword-input-wrap:focus-within {
  border-color: #6ba9ed; background: #fff; box-shadow: 0 0 0 3px rgba(8,119,232,.11);
}
.content-keyword-input-wrap > span {
  min-height: 27px; padding: 0 4px 0 9px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 9px; background: #eaf2fb; color: #275f99; font-size: 9px; font-weight: 750;
}
.content-keyword-input-wrap > span button {
  width: 21px; height: 21px; padding: 0; border: 0; border-radius: 7px; background: transparent;
  color: #6f8dab; cursor: pointer; font-size: 15px; line-height: 1;
}
.content-keyword-input-wrap > span button:hover { background: rgba(39,95,153,.1); color: #275f99; }
.content-keyword-input-wrap input {
  min-width: 210px; height: 30px; flex: 1; padding: 0 4px; border: 0; outline: 0;
  background: transparent; color: #202329; font-size: 10px;
}
.content-keyword-actions {
  min-height: 50px; padding: 7px 14px 12px; display: flex; align-items: center; justify-content: space-between;
}
.content-keyword-actions > small { color: #969aa4; font-size: 8px; }
.content-keyword-actions .button { min-height: 34px; padding: 0 13px; font-size: 10px; }
.content-keyword-actions .button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.content-metrics-grid {
  padding: 0 14px 13px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px;
}
.content-metrics-grid > article {
  min-width: 0; min-height: 83px; padding: 10px; display: grid; align-content: start; gap: 5px;
  border-radius: 13px; background: #f6f7f9;
}
.content-metrics-grid article > span {
  display: flex; align-items: center; gap: 4px; color: #7b7f89; font-size: 8px; font-weight: 750;
}
.content-metrics-grid article > span .info { width: 12px; height: 12px; flex-basis: 12px; font-size: 7px; }
.content-metrics-grid article > strong { color: #17191d; font-size: 17px; letter-spacing: -.035em; }
.content-metrics-grid article > small { color: #8a8e98; font-size: 7px; line-height: 1.3; }
.content-metrics-grid article > small.up { color: #18844c; }
.content-metrics-grid article > small.down { color: #c3424e; }
.content-metrics-period { display: block; padding: 0 14px 11px; color: #999da6; font-size: 8px; text-align: right; }
.content-metrics-loading,
.content-metrics-error {
  min-height: 94px; padding: 18px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #858994; font-size: 9px;
}
.content-metrics-loading span {
  width: 13px; height: 13px; border: 2px solid #d8dde4; border-top-color: #4d91d8;
  border-radius: 50%; animation: spin .8s linear infinite;
}
.content-metrics-error { color: #a44a52; }
.content-placement-list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.content-placement-list span {
  padding: 3px 6px; border-radius: 999px; background: #eef1f5; color: #646a75;
  font-size: 7px; font-weight: 800;
}
.content-placement-list span.missing { background: #fff0e5; color: #a45b20; }
.content-keyword-rank {
  min-width: 125px; display: grid; justify-items: end; gap: 3px; text-align: right;
}
.content-keyword-rank strong { color: #2469ad; font-size: 13px; }
.content-keyword-rank small { color: #8a8e98; font-size: 8px; }
@media (max-width: 700px) {
  .content-title-current { grid-template-columns: 1fr; }
  .content-metrics-grid { grid-template-columns: 1fr 1fr; }
  .content-base-name { grid-template-columns: 1fr; gap: 4px; }
  .content-keyword-row { align-items: flex-start; }
  .content-keyword-rank { min-width: 94px; }
}
.listing-category-picker {
  display: grid; gap: 9px; padding: 12px; border: 1px solid #e2e3e7; border-radius: 15px;
  background: #fafafb;
}
.listing-category-picker > header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.listing-category-picker > header > div { display: flex; align-items: center; gap: 5px; }
.listing-category-picker > header strong { color: #303238; font-size: 11px; }
.listing-category-picker > header > span {
  padding: 4px 7px; border-radius: 999px; color: #26704c; background: #e9f7ef;
  font-size: 8px; font-weight: 800; letter-spacing: .02em;
}
.listing-category-picker > header > span.warning { color: #8a5315; background: #fff1dd; }
.listing-category-current {
  min-width: 0; padding: 10px 11px; border: 1px solid #dfe6f1; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f4f7fb;
}
.listing-category-current > div { min-width: 0; display: grid; gap: 2px; }
.listing-category-current strong, .listing-category-current small {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.listing-category-current strong { color: #252a32; font-size: 11px; }
.listing-category-current small { color: #697386; font-size: 9px; }
.listing-category-current code {
  flex: 0 0 auto; padding: 4px 6px; border-radius: 7px; color: #687184; background: #e9edf4;
  font-family: inherit; font-size: 8px; font-weight: 800;
}
.listing-category-current.loading { opacity: .68; }
.listing-category-current.warning { border-color: #f1c98d; background: #fff9ee; }
.listing-category { z-index: 8; }
.listing-category-results { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.listing-category-results button { padding: 9px 10px; gap: 3px; }
.listing-category-results button > span {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.listing-category-results button > span > strong {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.listing-category-results button em {
  flex: 0 0 auto; padding: 3px 5px; border-radius: 999px; color: #2d6850; background: #e7f5ed;
  font-size: 7px; font-style: normal; font-weight: 800;
}
.listing-category-results button small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.listing-category-result-meta { justify-content: flex-start !important; color: #979aa3; }
.listing-category-result-meta code, .listing-category-result-meta i {
  font-family: inherit; font-size: 8px; font-style: normal;
}
.listing-category-result-meta code { font-weight: 800; }
.listing-main-attributes {
  display: grid; gap: 10px; padding: 12px; border: 1px solid #e2e3e7; border-radius: 15px; background: #fafafb;
}
.listing-main-attributes > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.listing-main-attributes > header strong { color: #303238; font-size: 11px; }
.listing-main-attributes > header small { color: #92959d; font-size: 9px; }
.listing-fields-empty { display: block; padding: 9px 2px; color: #8b8e96; font-size: 10px; }
.listing-shared-product input[readonly] { background: #f1f5fa; color: #4c5666; font-weight: 700; }
.listing-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.listing-options { border: 1px solid var(--line); border-radius: 15px; background: #fafafb; overflow: hidden; }
.listing-options[hidden] { display: none !important; }
.listing-options > summary {
  min-height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 8px; color: #4e525a;
  cursor: pointer; list-style: none; font-size: 11px;
}
.listing-options > summary::-webkit-details-marker { display: none; }
.listing-options > summary strong { flex: 1; color: #34373d; font-size: 11px; }
.listing-options > summary small { color: #9598a0; font-size: 9px; }
.listing-options > summary > span { color: #a1a3aa; font-size: 18px; transition: transform .16s ease; }
.listing-options[open] > summary > span { transform: rotate(90deg); }
.listing-options-body { padding: 2px 12px 13px; }
.listing-fields-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.listing-picture-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.listing-picture { position: relative; min-width: 0; aspect-ratio: 1; border: 1px solid #e4e5e8; border-radius: 13px; background: white; overflow: hidden; }
.listing-picture img { width: 100%; height: 100%; object-fit: cover; }
.listing-picture > div {
  position: absolute; right: 5px; bottom: 5px; left: 5px; display: flex; justify-content: center; gap: 3px;
  opacity: 0; transform: translateY(3px); transition: .15s ease;
}
.listing-picture:hover > div, .listing-picture:focus-within > div { opacity: 1; transform: none; }
.listing-picture button {
  width: 27px; height: 27px; padding: 0; border: 0; border-radius: 8px; background: rgba(20,22,27,.82);
  color: white; cursor: pointer; font-size: 16px; line-height: 1;
}
.listing-picture button:last-child { background: rgba(181,35,47,.9); }
.listing-picture-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 9px; }
.listing-picture-add .button { min-width: 92px; }
.listing-actions {
  position: sticky; z-index: 3; right: 0; bottom: -25px; left: 0; margin: 3px -25px -25px; padding: 12px 25px 20px;
  border-top: 1px solid rgba(228,229,233,.85); background: rgba(255,255,255,.94); backdrop-filter: blur(16px);
}
.switch-field {
  grid-template-columns: 1fr auto !important; align-items: center; min-height: 44px; padding: 0 11px 0 12px;
  border: 1px solid #dfe0e4; border-radius: 12px; background: #fafafb;
}
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch-field i { position: relative; width: 38px; height: 23px; border-radius: 999px; background: #d8d9dd; transition: .16s ease; }
.switch-field i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .16s ease;
}
.switch-field input:checked + i { background: var(--green); }
.switch-field input:disabled + i { opacity: .55; }
.switch-field input:checked + i::after { transform: translateX(15px); }
.switch-field input:focus-visible + i { box-shadow: 0 0 0 3px rgba(8,119,232,.14); }

.toast {
  position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 11px 15px; border-radius: 12px; background: rgba(21,23,28,.94);
  color: white; box-shadow: 0 12px 35px rgba(0,0,0,.22); font-size: 12px; font-weight: 600;
}
.toast.error { background: rgba(181,35,47,.96); }
.loading-state { min-height: 360px; display: grid; place-items: center; }
.loading-state span { width: 24px; height: 24px; border: 2px solid #dadbe0; border-top-color: #17191d; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 5%, #fff 0, #f5f5f7 42%, #eceef2 100%); }
.login-card {
  width: min(410px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.82); border-radius: 28px;
  background: rgba(255,255,255,.86); box-shadow: 0 30px 85px rgba(20,30,50,.12); backdrop-filter: blur(24px);
}
.login-logo { display: block; width: 245px; max-width: 85%; height: auto; margin: 0 auto 30px; }
.login-form { display: grid; gap: 15px; }
.login-form label { display: grid; gap: 7px; color: #5e6169; font-size: 11px; font-weight: 650; }
.login-form input { width: 100%; height: 47px; padding: 0 13px; border: 1px solid #dfe1e6; border-radius: 13px; background: rgba(248,248,250,.9); outline: none; }
.login-form input:focus { background: white; border-color: #6ba9ed; box-shadow: 0 0 0 3px rgba(8,119,232,.12); }

.policy-page { min-height: 100vh; padding: clamp(20px, 4vw, 52px); background: #f5f5f7; }
.policy-shell { width: min(820px, 100%); margin: 0 auto; }
.policy-header { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.policy-header a { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.policy-header img { width: 32px; height: 32px; }
.policy-header strong { font-size: 14px; }
.policy-header span { color: var(--muted); font-size: 10px; }
.policy-card { padding: clamp(28px, 6vw, 58px); border: 1px solid rgba(15,23,42,.07); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.policy-eyebrow { margin: 0 0 8px; color: #9699a1; font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.policy-card h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); letter-spacing: -.05em; line-height: 1; }
.policy-lead { margin: 18px 0 38px; color: #565961; font-size: 16px; line-height: 1.6; }
.policy-card section { padding: 23px 0; border-top: 1px solid var(--line); }
.policy-card section:last-child { padding-bottom: 0; }
.policy-card h2 { margin: 0 0 10px; font-size: 15px; letter-spacing: -.02em; }
.policy-card section p { margin: 8px 0 0; color: #5f626a; font-size: 12px; line-height: 1.7; }
.policy-card a { color: var(--blue); }
@media (max-width: 560px) {
  .policy-header { align-items: flex-start; flex-direction: column; }
  .policy-card { border-radius: 22px; }
}

.ranking-connection {
  min-height: 56px; padding: 8px 10px 8px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,.86);
}
.ranking-connection > div { min-width: 0; display: grid; grid-template-columns: 9px auto; align-items: center; gap: 2px 9px; }
.ranking-connection > div > span { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; background: #a7aab1; }
.ranking-connection.ready > div > span { background: #28b86c; box-shadow: 0 0 0 5px rgba(40,184,108,.11); }
.ranking-connection.attention > div > span { background: #f0a020; }
.ranking-connection strong { font-size: 11px; }
.ranking-connection small { color: var(--muted); font-size: 9px; }
.ranking-table { min-width: 980px; table-layout: fixed; }
.ranking-table th:nth-child(1) { width: 19%; }
.ranking-table th:nth-child(2) { width: 31%; }
.ranking-table th:nth-child(3) { width: 13%; }
.ranking-table th:nth-child(4), .ranking-table th:nth-child(5) { width: 9%; }
.ranking-table th:nth-child(6) { width: 13%; }
.ranking-table th:last-child { width: 48px; }
.ranking-table tr.expanded td { background: #fafafb; }
.ranking-keyword {
  width: 100%; padding: 0; border: 0; display: flex; align-items: center; gap: 9px;
  background: transparent; cursor: pointer; text-align: left;
}
.ranking-keyword > span {
  width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center;
  border-radius: 8px; background: #f0f1f3; color: #737780; font-size: 15px; transition: transform .16s ease;
}
.ranking-keyword[aria-expanded="true"] > span { transform: rotate(90deg); }
.ranking-keyword strong { min-width: 0; font-size: 11px; }
.ranking-listing { min-width: 0; display: flex; align-items: center; gap: 9px; }
.ranking-listing img {
  width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #ececef;
  border-radius: 9px; object-fit: cover; background: #f2f3f5;
}
.ranking-listing > div { min-width: 0; display: grid; gap: 3px; }
.ranking-listing strong { min-width: 0; font-size: 10px; }
.ranking-listing small, .ranking-table time { color: var(--muted); font-size: 8px; }
.ranking-position { display: grid; gap: 2px; }
.ranking-position strong { font-size: 13px; }
.ranking-position small { max-width: 130px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-position.muted strong { color: #8a8e96; font-size: 10px; }
.ranking-position.error strong { color: var(--red); font-size: 10px; }
.ranking-position.error a { color: var(--blue); font-size: 8px; font-weight: 750; text-decoration: none; }
.ranking-movement {
  display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border-radius: 999px;
  background: #f0f1f3; color: #777b84; font-size: 9px; font-weight: 750;
}
.ranking-movement.up { background: #e9f8ef; color: #08783f; }
.ranking-movement.down { background: #ffedef; color: #bd2630; }
.ranking-detail > td { padding: 0; background: #f3f4f6; }
.ranking-expand { padding: 14px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 12px; }
.ranking-history, .ranking-competitors {
  min-width: 0; padding: 13px 14px; border: 1px solid #e5e6e9; border-radius: 15px; background: #fff;
}
.ranking-history header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ranking-history h3, .ranking-competitors h3 { margin: 0 0 9px; font-size: 11px; }
.ranking-history header h3 { margin: 0; }
.ranking-history header a { color: var(--blue); font-size: 9px; font-weight: 700; text-decoration: none; }
.ranking-chart-wrap { margin-top: 8px; }
.ranking-chart { width: 100%; height: 150px; overflow: visible; }
.ranking-chart .grid { stroke: #e7e8eb; stroke-width: 1; stroke-dasharray: 4 6; }
.ranking-chart-line { fill: none; stroke: #3483fa; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.ranking-chart-point { fill: #fff; stroke: #3483fa; stroke-width: 2; }
.ranking-axis { fill: #8b8e96; font-size: 8px; }
.ranking-chart-dates { display: flex; justify-content: space-between; color: #93969d; font-size: 8px; }
.ranking-chart-empty { min-height: 110px; display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; }
.ranking-competitors ol { max-height: 176px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.ranking-competitors li { min-width: 0; min-height: 43px; padding: 5px 0; display: grid; grid-template-columns: 28px 34px 1fr; align-items: center; gap: 7px; border-top: 1px solid var(--line); }
.ranking-competitors li:first-child { border-top: 0; }
.ranking-competitors li.own { margin-inline: -7px; padding-inline: 7px; border-radius: 9px; background: #edf5ff; }
.ranking-competitors li > span { color: #777b84; font-size: 9px; font-weight: 750; }
.ranking-competitors img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; }
.ranking-competitors li > div { min-width: 0; display: grid; gap: 2px; }
.ranking-competitors strong, .ranking-competitors small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-competitors strong { font-size: 9px; }
.ranking-competitors small { color: var(--muted); font-size: 8px; }
.ranking-install { display: grid; gap: 18px; color: #555961; }
.ranking-install ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.45; }

@media (max-width: 1180px) {
  :root { --sidebar: 205px; }
  .main { padding-inline: 24px; }
  .kpi-grid.compact { grid-template-columns: repeat(4, 1fr); }
  .kpi-grid.compact.metrics-kpis { grid-template-columns: repeat(5, 1fr); }
  .ranking-expand { grid-template-columns: 1fr; }
  .panel-grid, .catalog-grid, .finance-grid, .home-priority-grid { grid-template-columns: 1fr; }
  .kpi-grid.finance-kpis.five { grid-template-columns: repeat(3, 1fr); }
  .feasibility-quick-grid { grid-template-columns: minmax(210px,1.35fr) minmax(220px,1.45fr) minmax(155px,1fr) repeat(2,minmax(120px,1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { inset: auto 0 0; width: auto; height: 70px; padding: 7px 9px calc(7px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); }
  .brand, .logout-form, .navigation button.nav-spacer, #access-nav { display: none; }
  .navigation {
    flex-direction: row; justify-content: flex-start; gap: 2px; overflow-x: auto; overflow-y: hidden;
    scroll-padding-inline: 9px; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .navigation::-webkit-scrollbar { display: none; }
  .nav-group { position: relative; flex: 0 0 70px; min-width: 70px; }
  .navigation > button { flex: 0 0 70px; width: 70px; }
  .navigation button { min-width: 70px; min-height: 53px; grid-template-columns: 1fr; grid-template-rows: 20px 16px; justify-items: center; gap: 2px; padding: 4px; font-size: 9px; }
  .navigation button small { display: none; }
  .nav-submenu {
    position: absolute; right: 0; bottom: 61px; width: 150px; padding: 6px;
    border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.97);
    box-shadow: 0 14px 34px rgba(24,28,38,.14); transform: translateY(5px);
  }
  .nav-group.open .nav-submenu { max-height: 110px; transform: translateY(0); }
  .navigation .nav-submenu button {
    width: 100%; min-width: 0; min-height: 40px; padding: 0 12px 0 34px; display: flex; justify-items: initial;
    font-size: 11px; text-align: left;
  }
  .navigation .nav-submenu button span { display: block; left: 19px; }
  .main { padding: 22px 14px 92px; }
  .topbar { min-height: 62px; }
  .topbar h1 { font-size: 28px; }
  .topbar-actions { gap: 6px; }
  .theme-toggle { width: 40px; padding: 0; justify-content: center; }
  .theme-toggle-label, .theme-toggle > i { display: none; }
  .button.primary { min-height: 38px; padding: 0 13px; }
  .register-menu { width: 176px; }
  .content { margin-top: 14px; }
  .kpi-grid, .kpi-grid.compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi-grid.home-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi-grid.compact.metrics-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .post-sales-summary { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .kpi-grid.compact.post-sales-summary .kpi { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .post-sales-summary .kpi:nth-child(2n) { border-right: 0; }
  .post-sales-summary .kpi:nth-last-child(-n + 2) { border-bottom: 0; }
  .post-sales-header { height: auto; padding-block: 10px; align-items: stretch; flex-direction: column; }
  .post-sale-tabs { width: 100%; overflow-x: auto; }
  .post-sale-tabs button { flex: 1 0 auto; justify-content: center; }
  .kpi { min-height: 97px; padding: 14px; border-radius: 17px; }
  .kpi-value { margin-top: 12px; font-size: 21px; }
  .kpi-grid.compact .kpi { min-height: 80px; }
  .panel { border-radius: 17px; }
  .panel-header { min-height: 55px; padding: 0 14px; }
  .stock-panel-actions { gap: 7px; }
  .return-code-search input { width: 132px; }
  .panel-body { padding: 14px; }
  .home-focus-panel, .home-notifications-panel { min-height: 0; }
  .home-day-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; gap: 2px; }
  .home-day-strip > div { padding: 5px 6px; }
  .home-day-strip > div:not(.today) { justify-content: center; gap: 5px; }
  .home-day-strip span { font-size: 9px; }
  .home-task-list, .home-notification-list { max-height: none; }
  .notification-clear { min-height: 125px; }
  .task-calendar { min-height: 0; }
  .task-calendar-toolbar { min-height: 55px; padding-inline: 14px; }
  .main.tasks-main { padding-inline: 14px; }
  .task-calendar-scroll { display: none; }
  .task-mobile-agenda { display: grid; }
  .task-mobile-day { border-bottom: 1px solid var(--line); }
  .task-mobile-day:last-child { border-bottom: 0; }
  .task-mobile-day > header {
    min-height: 48px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; background: #fafafb;
  }
  .task-mobile-day > header > div { display: grid; gap: 2px; }
  .task-mobile-day > header strong { color: #3b3e45; font-size: 10px; text-transform: uppercase; }
  .task-mobile-day > header span { color: #8a8d95; font-size: 9px; }
  .task-mobile-day > header > span {
    min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 999px;
    background: #eceef1; color: #676b73; font-weight: 750;
  }
  .task-mobile-day.today > header { background: #fff8f1; }
  .task-mobile-day.today > header strong { color: #bd510c; }
  .task-mobile-day-items { padding: 8px 10px 11px; display: grid; gap: 6px; }
  .task-mobile-day .calendar-task { min-height: 48px; padding: 8px 9px; border-radius: 11px; }
  .task-mobile-day .calendar-task-title { font-size: 11px; -webkit-line-clamp: 3; }
  .task-mobile-day .calendar-task-meta { gap: 6px; }
  .task-mobile-day .calendar-task-owner em { display: inline; max-width: 90px; font-size: 8px; }
  .task-mobile-empty { padding: 46px 18px; color: #8a8d95; text-align: center; font-size: 11px; }
  .task-overdue-row { padding-inline: 14px; }
  .section-toolbar, .finance-toolbar { align-items: flex-start; flex-direction: column; }
  .listings-toolbar { align-items: stretch; flex-direction: column; }
  .listing-search { min-width: 0; width: 100%; }
  .listing-toolbar-actions { width: 100%; flex-wrap: wrap; }
  .listing-average-margin {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
  }
  .listing-toolbar-actions .periods { flex: 1; }
  .promotion-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .promotion-discount-editor { grid-template-columns: 1fr; }
  .promotion-margin-preview { grid-template-columns: 1fr; }
  .promotion-margin-preview > span { grid-column: 1; }
  .wholesale-tier { grid-template-columns: 1fr 1fr 30px; }
  .wholesale-tier-discount { grid-column: 1; grid-row: 2; min-height: 0; }
  .wholesale-tier-receive { grid-column: 2; grid-row: 2; min-height: 0; }
  .wholesale-tier .icon-button { grid-column: 3; grid-row: 1; }
  .finance-toolbar-actions { width: 100%; flex-wrap: wrap; }
  .periods { width: 100%; }
  .periods button { flex: 1; }
  .finance-toolbar .periods { order: 1; }
  .smart-period { width: 100%; }
  .smart-period > summary { width: 100%; }
  .smart-period-menu {
    position: fixed; top: auto; right: 14px; bottom: 88px; left: 14px; z-index: 80; width: auto;
  }
  .kpi-grid.finance-kpis, .kpi-grid.finance-kpis.five { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .access-grid { grid-template-columns: 1fr; }
  .campaign-expand { padding: 12px; }
  .campaign-editor-settings { grid-template-columns: 1fr 1fr; }
  .campaign-editor-settings > label:last-child { grid-column: 1 / -1; }
  .campaign-insights { grid-template-columns: 1fr; }
  .campaign-share-list { grid-template-columns: 1fr; grid-template-rows: none; }
  .campaign-chart-head { align-items: flex-start; flex-direction: column; }
  .campaign-chart { height: 135px; }
  .feasibility-form-layout { grid-template-columns: 1fr; }
  .feasibility-side { position: static; }
  .feasibility-live { min-height: 0; }
  .feasibility-preview-state { min-height: 150px; }
  .feasibility-quick-form { padding: 14px; }
  .feasibility-quick-footer { align-items: stretch; flex-direction: column; }
  .feasibility-quick-links { margin-left: 0; justify-content: flex-start; }
  .feasibility-quick-actions { align-self: flex-end; }
  .task-meta-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .task-editor-body { grid-template-columns: 1fr; }
  .listing-fields-grid { grid-template-columns: 1fr 1fr; }
  .listing-picture-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .listing-actions { bottom: -22px; margin: 3px -18px -22px; padding: 11px 18px 16px; }
  .post-sale-detail-grid { grid-template-columns: 1fr; }
  .post-sale-financial { grid-template-columns: 1fr; }
  .post-sale-message { width: 94%; }
}
@media (max-width: 440px) {
  .topbar small { display: none; }
  .topbar { align-items: center; }
  .kpi-label { font-size: 10px; }
  .kpi-value { font-size: 18px; }
  .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .catalog-product-suppliers { margin-left: 14px; }
  .product-supplier-row { grid-template-columns: minmax(0,1fr) 105px 28px; padding-inline: 9px; gap: 6px; }
  .product-supplier-row > button { width: 28px; }
  .task-meta-grid { grid-template-columns: 1fr; }
  .task-detail-side { margin-top: 2px; }
  .listing-switches, .listing-fields-grid { grid-template-columns: 1fr; }
  .listing-picture-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .campaign-editor-settings { grid-template-columns: 1fr; }
  .campaign-editor-settings > label:last-child { grid-column: auto; }
  .campaign-ad-add { grid-template-columns: 1fr; }
  .campaign-ad-add .button { width: 100%; }
  .choice-grid button:last-child { grid-column: auto; min-height: 84px; }
  .modal-card { padding: 22px 18px; border-radius: 22px; }
  .stock-panel-header { min-height: 106px; padding-block: 12px; align-items: stretch; flex-direction: column; }
  .stock-panel-actions { width: 100%; }
  .return-code-search { flex: 1; }
  .return-code-search input { width: 100%; }
  .return-candidate { grid-template-columns: minmax(0,1fr) 14px; }
  .return-candidate > span:nth-child(2) { grid-column: 1; }
  .return-candidate i { grid-column: 2; grid-row: 1 / span 2; }
  .return-reference-group > div { grid-template-columns: 1fr; }
  .task-overdue-row { grid-template-columns: 18px minmax(0,1fr) auto; }
  .task-overdue-row small { display: none; }
  .feasibility-dimensions { grid-template-columns: 1fr; }
}

html[data-theme="light"] .navigation button span,
html[data-theme="light"] .logout-button span,
html[data-theme="light"] .navigation .nav-parent small,
html[data-theme="light"] .topbar small,
html[data-theme="light"] .info[data-tip],
html[data-theme="light"] .header-chip,
html[data-theme="light"] .home-task-group-title,
html[data-theme="light"] .home-day-strip small,
html[data-theme="light"] .home-task-row small,
html[data-theme="light"] .home-clear-state,
html[data-theme="light"] .home-notification p,
html[data-theme="light"] .home-notification time,
html[data-theme="light"] .notification-dismiss,
html[data-theme="light"] .task-overdue-row small,
html[data-theme="light"] .task-weekdays span,
html[data-theme="light"] .task-day.outside,
html[data-theme="light"] .task-day-number,
html[data-theme="light"] .task-day.outside .task-day-number,
html[data-theme="light"] .calendar-task.completed,
html[data-theme="light"] .calendar-task-progress,
html[data-theme="light"] .calendar-task time,
html[data-theme="light"] .calendar-task-repeat,
html[data-theme="light"] .task-form label span small,
html[data-theme="light"] .task-detail-heading small,
html[data-theme="light"] .task-checklist-row:has(input:checked) .task-checklist-title,
html[data-theme="light"] .task-checklist-row > button,
html[data-theme="light"] .task-detail-empty,
html[data-theme="light"] .task-attachment a small,
html[data-theme="light"] .task-attachment button,
html[data-theme="light"] .task-comment time,
html[data-theme="light"] .task-history summary,
html[data-theme="light"] .task-history p span,
html[data-theme="light"] .bar-group label,
html[data-theme="light"] .chart-tooltip span,
html[data-theme="light"] th,
html[data-theme="light"] .cell-sub,
html[data-theme="light"] .recurrence-label,
html[data-theme="light"] .smart-period > summary span,
html[data-theme="light"] .smart-period > summary i,
html[data-theme="light"] .smart-period-menu label,
html[data-theme="light"] .listing-search input::placeholder,
html[data-theme="light"] .listing-filters small,
html[data-theme="light"] .listing-image-placeholder,
html[data-theme="light"] .listing-stock small,
html[data-theme="light"] .shipping-label:not(.free),
html[data-theme="light"] .sales-date,
html[data-theme="light"] .stock-detail-head,
html[data-theme="light"] .stock-image-placeholder,
html[data-theme="light"] .stock-listing-quantity small,
html[data-theme="light"] .campaign-period-key,
html[data-theme="light"] .campaign-chart-dates,
html[data-theme="light"] .campaign-chart-legend,
html[data-theme="light"] .campaign-share label,
html[data-theme="light"] .metrics-hidden summary,
html[data-theme="light"] .metrics-hidden-row small,
html[data-theme="light"] .feasibility-options label small,
html[data-theme="light"] .feasibility-live-meta,
html[data-theme="light"] .row-menu summary,
html[data-theme="light"] .listing-source small,
html[data-theme="light"] .listing-category-result-meta,
html[data-theme="light"] .listing-main-attributes > header small,
html[data-theme="light"] .listing-fields-empty,
html[data-theme="light"] .listing-options > summary small {
  color: var(--muted);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f14;
  --surface: #171a21;
  --surface-strong: #1e222b;
  --line: rgba(255,255,255,.11);
  --text: #f4f6fa;
  --muted: #aeb4bf;
  --blue: #66b3ff;
  --orange: #ff7a33;
  --green: #62d394;
  --red: #ff7885;
  --purple: #aa96ff;
  --shadow: 0 14px 44px rgba(0,0,0,.24);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] ::selection { background: rgba(102,179,255,.28); color: #fff; }
html[data-theme="dark"] .sidebar {
  background: rgba(17,19,25,.9); border-color: var(--line);
  box-shadow: 14px 0 45px rgba(0,0,0,.12);
}
html[data-theme="dark"] .navigation button,
html[data-theme="dark"] .logout-button { color: #c7ccd5; }
html[data-theme="dark"] .navigation button span,
html[data-theme="dark"] .logout-button span,
html[data-theme="dark"] .navigation .nav-parent small { color: #9299a5; }
html[data-theme="dark"] .navigation button:hover,
html[data-theme="dark"] .logout-button:hover { background: rgba(255,255,255,.07); color: #fff; }
html[data-theme="dark"] .navigation button.active,
html[data-theme="dark"] .navigation .nav-submenu button.active { background: #292d36; color: #fff; }
html[data-theme="dark"] .navigation .nav-submenu button span { background: #626975; }
html[data-theme="dark"] .navigation button small { background: #3a281f; color: #ffb084; }
html[data-theme="dark"] .navigation .nav-submenu {
  border-color: var(--line); background: rgba(30,34,43,.98); box-shadow: 0 18px 42px rgba(0,0,0,.38);
}
html[data-theme="dark"] .topbar small { color: #9ba2ae; }
html[data-theme="dark"] .brand img { filter: drop-shadow(0 7px 16px rgba(0,0,0,.34)); }

html[data-theme="dark"] .button,
html[data-theme="dark"] .theme-toggle {
  border-color: var(--line); background: #20242d; color: #e8ebf0;
}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .theme-toggle:hover { box-shadow: 0 8px 20px rgba(0,0,0,.28); }
html[data-theme="dark"] .button.primary {
  border-color: #f4f6fa; background: #f4f6fa; color: #111318;
}
html[data-theme="dark"] .button.subtle { border-color: transparent; background: #272b34; color: #eef1f5; }
html[data-theme="dark"] .button.danger,
html[data-theme="dark"] .task-delete-button:hover { background: #3a1d23; color: #ff9ca6; }
html[data-theme="dark"] .theme-toggle > i { background: #4a505b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
html[data-theme="dark"] .theme-toggle > i::after { background: #fff; }
html[data-theme="dark"] .theme-toggle[aria-pressed="true"] > i { background: var(--orange); }

html[data-theme="dark"] .register-menu,
html[data-theme="dark"] .smart-period-menu,
html[data-theme="dark"] .feasibility-category-results,
html[data-theme="dark"] .row-menu-popover {
  border-color: var(--line); background: rgba(30,34,43,.98); box-shadow: 0 20px 55px rgba(0,0,0,.38);
}
html[data-theme="dark"] .register-choice.income { color: #8ae6b0; background: #173426; }
html[data-theme="dark"] .register-choice.income span { background: #214b35; }
html[data-theme="dark"] .register-choice.expense { color: #ff9da7; background: #3a1d23; }
html[data-theme="dark"] .register-choice.expense span { background: #54252d; }

html[data-theme="dark"] .kpi-label,
html[data-theme="dark"] .home-task-group-title,
html[data-theme="dark"] .home-task-row small,
html[data-theme="dark"] .home-notification p,
html[data-theme="dark"] .home-notification time,
html[data-theme="dark"] .cell-sub,
html[data-theme="dark"] .recurrence-label,
html[data-theme="dark"] .sales-date,
html[data-theme="dark"] .stock-detail-head,
html[data-theme="dark"] .campaign-period-key,
html[data-theme="dark"] .campaign-chart-dates,
html[data-theme="dark"] .campaign-chart-legend,
html[data-theme="dark"] .campaign-share label,
html[data-theme="dark"] .metrics-hidden-row small,
html[data-theme="dark"] .listing-fields-empty,
html[data-theme="dark"] .listing-category-result-meta,
html[data-theme="dark"] .listing-source small,
html[data-theme="dark"] .listing-options > summary small,
html[data-theme="dark"] .feasibility-live-meta { color: var(--muted); }
html[data-theme="dark"] .cell-title,
html[data-theme="dark"] .feasibility-margin,
html[data-theme="dark"] .chart-tooltip strong,
html[data-theme="dark"] .chart-tooltip b { color: var(--text); }
html[data-theme="dark"] .header-chip,
html[data-theme="dark"] .panel-count,
html[data-theme="dark"] .source-pill,
html[data-theme="dark"] .status,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .mini-badge,
html[data-theme="dark"] .shipping-label,
html[data-theme="dark"] .stock-listing-quantity small {
  background: #2a2f39; color: #c1c6cf;
}
html[data-theme="dark"] .change { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .change.good,
html[data-theme="dark"] .status.paid,
html[data-theme="dark"] .status.active,
html[data-theme="dark"] .shipping-label.free {
  background: #173828; color: #86e4ad;
}
html[data-theme="dark"] .change.bad,
html[data-theme="dark"] .stock-recovery-badge {
  background: #3b1d24; color: #ff9ca7;
}
html[data-theme="dark"] .status.flex,
html[data-theme="dark"] .stock-type.full,
html[data-theme="dark"] .stock-balance {
  background: #172f4a; color: #93c7ff;
}
html[data-theme="dark"] .stock-balance.full { background: #2d2549; color: #c0afff; }
html[data-theme="dark"] .stock-balance.transit { background: #3b2c14; color: #ffd080; }
html[data-theme="dark"] .stock-return-review,
html[data-theme="dark"] .stock-review-badge { border-color: #644522; background: #332413; color: #ffc27b; }
html[data-theme="dark"] .stock-return-review small { color: #ffad65; }
html[data-theme="dark"] .stock-return-review.waiting { border-color: #315779; background: #172b3d; color: #a8d4ff; }
html[data-theme="dark"] .stock-return-review.waiting small { color: #83b9ea; }
html[data-theme="dark"] .return-code-search { border-color: var(--line); background: #15181e; }
html[data-theme="dark"] .return-code-search button { background: #2a2f39; color: #edf0f4; box-shadow: none; }
html[data-theme="dark"] .stock-type.mixed { background: #2d2549; color: #c0afff; }
html[data-theme="dark"] .positive,
html[data-theme="dark"] .sale-result small,
html[data-theme="dark"] .stock-exposure-ok { color: var(--green); }
html[data-theme="dark"] .negative,
html[data-theme="dark"] .stock-exposure-critical { color: var(--red); }
html[data-theme="dark"] .stock-exposure-warning { color: #ffc56d; }

html[data-theme="dark"] .home-task-free,
html[data-theme="dark"] .home-task-row { border-color: var(--line); }
html[data-theme="dark"] .notification-clear-button,
html[data-theme="dark"] .notification-dismiss,
html[data-theme="dark"] .refresh-button,
html[data-theme="dark"] .restore-automatic { color: #c2c7d0; }
html[data-theme="dark"] .notification-clear-button:hover,
html[data-theme="dark"] .notification-dismiss:hover,
html[data-theme="dark"] .task-detail-heading button:hover,
html[data-theme="dark"] .task-checklist-row > button:hover,
html[data-theme="dark"] .restore-automatic:hover { background: #2a2f39; color: #fff; }
html[data-theme="dark"] .overdue-group .home-task-group-title > span {
  background: #3b1d24; color: #ff9ca7;
}
html[data-theme="dark"] .home-task-row.priority-urgent,
html[data-theme="dark"] .calendar-task.priority-urgent,
html[data-theme="dark"] .calendar-task.overdue,
html[data-theme="dark"] .task-priority-field.priority-urgent,
html[data-theme="dark"] .home-notification.level-critical {
  border-color: #6a303a; background: #341b21; color: #ffb1b9;
}
html[data-theme="dark"] .home-task-row.priority-high,
html[data-theme="dark"] .calendar-task.priority-high,
html[data-theme="dark"] .task-priority-field.priority-high {
  border-color: #644a22; background: #322714; color: #ffd28a;
}
html[data-theme="dark"] .calendar-task.priority-normal,
html[data-theme="dark"] .task-priority-field.priority-normal {
  border-color: #284a70; background: #182a3e; color: #b8d8fb;
}
html[data-theme="dark"] .home-task-row.priority-low,
html[data-theme="dark"] .calendar-task.priority-low,
html[data-theme="dark"] .task-priority-field.priority-low {
  border-color: #315543; background: #1a3025; color: #a8dfbe;
}
html[data-theme="dark"] .home-task-check,
html[data-theme="dark"] .calendar-task-check { border-color: #7f8794; }
html[data-theme="dark"] .home-task-check:hover,
html[data-theme="dark"] .calendar-task-check:hover {
  border-color: var(--green); background: #214c35; box-shadow: inset 0 0 0 4px #171a21;
}
html[data-theme="dark"] .calendar-task.completed {
  border-color: #343944; background: #22262e; color: #9da4af;
}
html[data-theme="dark"] .task-day { background: #171a21; }
html[data-theme="dark"] .task-day.outside { background: #14171d; }
html[data-theme="dark"] .calendar-task { border-color: #343944; background: #20242d; color: #eef1f5; }
html[data-theme="dark"] .calendar-task-check { background: #171a21; }
html[data-theme="dark"] .calendar-task-check.is-completed {
  border-color: #315543; background: #214c35; color: #a8dfbe;
}
html[data-theme="dark"] .calendar-task-progress,
html[data-theme="dark"] .task-recurrence-preview {
  background: #2a2f39; color: #c5cad2;
}
html[data-theme="dark"] .calendar-task-owner {
  background: #1b3048; color: #a8d3ff; box-shadow: inset 0 0 0 1px rgba(147,199,255,.18);
}
html[data-theme="dark"] .calendar-task-owner b { background: #294867; color: #dceeff; }
html[data-theme="dark"] .task-mobile-day { border-color: var(--line); }
html[data-theme="dark"] .task-mobile-day > header { background: #14171d; }
html[data-theme="dark"] .task-mobile-day > header strong { color: #e7eaf0; }
html[data-theme="dark"] .task-mobile-day > header > span { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .task-mobile-day.today > header { background: #302218; }
html[data-theme="dark"] .task-mobile-day.today > header strong { color: #ffad73; }
html[data-theme="dark"] .task-weekdays,
html[data-theme="dark"] .task-day.outside,
html[data-theme="dark"] .task-detail-section,
html[data-theme="dark"] .task-attachment-section,
html[data-theme="dark"] .task-form-section { background: #14171d; }
html[data-theme="dark"] .task-editor-meta,
html[data-theme="dark"] .task-checklist,
html[data-theme="dark"] .task-detail-side {
  border-color: var(--line); background: #171a21;
}
html[data-theme="dark"] .task-priority-field select { background: #14171d; color: var(--text); }
html[data-theme="dark"] .task-form .task-checklist-row .task-checklist-title {
  border-color: #3b414c; background: #14171d; color: var(--text);
}
html[data-theme="dark"] .task-detail-heading strong { color: var(--text); }
html[data-theme="dark"] .task-form label span small,
html[data-theme="dark"] .task-detail-heading small,
html[data-theme="dark"] .task-checklist-row:has(input:checked) .task-checklist-title,
html[data-theme="dark"] .task-checklist-row > button,
html[data-theme="dark"] .task-detail-empty,
html[data-theme="dark"] .task-attachment a small,
html[data-theme="dark"] .task-attachment button,
html[data-theme="dark"] .task-comment time,
html[data-theme="dark"] .task-history summary,
html[data-theme="dark"] .task-history p span {
  color: var(--muted);
}
html[data-theme="dark"] .task-file-picker span {
  border-color: #4a505b; background: #20242d; color: #c5cad2;
}
html[data-theme="dark"] .task-day:hover,
html[data-theme="dark"] .task-overdue-row:hover,
html[data-theme="dark"] .home-notification:hover { background: #20242d; }
html[data-theme="dark"] .task-calendar-actions,
html[data-theme="dark"] .form-tabs,
html[data-theme="dark"] .periods { background: #252932; }
html[data-theme="dark"] .task-calendar-actions button,
html[data-theme="dark"] .form-tabs button,
html[data-theme="dark"] .periods button { color: #b7bdc7; }
html[data-theme="dark"] .task-calendar-actions button:hover,
html[data-theme="dark"] .form-tabs button.active,
html[data-theme="dark"] .periods button.active {
  background: #343944; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.24);
}
html[data-theme="dark"] .task-attachment,
html[data-theme="dark"] .task-file-picker,
html[data-theme="dark"] .task-comment { border-color: var(--line); background: #20242d; }
html[data-theme="dark"] .task-attachment a,
html[data-theme="dark"] .task-comment p,
html[data-theme="dark"] .task-history p strong { color: #e4e7ec; }
html[data-theme="dark"] .task-history,
html[data-theme="dark"] .task-detail-section + .task-detail-section,
html[data-theme="dark"] .feasibility-side-fields { border-color: var(--line); }

html[data-theme="dark"] .cash-chart::before {
  background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #2b3039 25%);
}
html[data-theme="dark"] .bar-group:hover,
html[data-theme="dark"] .bar-group:focus { background: rgba(102,179,255,.07); }
html[data-theme="dark"] .bars { border-color: #3a404b; }
html[data-theme="dark"] .bar-group label { color: #a8aeb8; }
html[data-theme="dark"] .chart-tooltip {
  border-color: var(--line); background: #242933; box-shadow: 0 14px 34px rgba(0,0,0,.38);
}
html[data-theme="dark"] .chart-tooltip span { color: #c0c5ce; }

html[data-theme="dark"] th { background: #14171d; color: #aeb4bf; }
html[data-theme="dark"] tbody tr:hover td,
html[data-theme="dark"] .sale-row:hover,
html[data-theme="dark"] .sale-row:focus-visible { background: #20242d; }
html[data-theme="dark"] .section-toolbar,
html[data-theme="dark"] .finance-toolbar,
html[data-theme="dark"] .listings-toolbar { background: #171a21; }
html[data-theme="dark"] .listing-average-margin { background: #242831; }
html[data-theme="dark"] .listing-average-margin strong { color: var(--text); }
html[data-theme="dark"] .listing-promotion-row td,
html[data-theme="dark"] .listing-promotion-row:hover td { background: #171a21; }
html[data-theme="dark"] .listing-promotion-strip,
html[data-theme="dark"] .promotion-current,
html[data-theme="dark"] .promotion-opportunities,
html[data-theme="dark"] .promotion-margin-preview,
html[data-theme="dark"] .wholesale-tier {
  border-color: var(--line); background: #20242d;
}
html[data-theme="dark"] .listing-promotion-menu:hover { background: #303641; color: #fff; }
html[data-theme="dark"] .promotion-form-heading { background: #242831; }
html[data-theme="dark"] .promotion-opportunity.recommended { background: #2d251d; }
html[data-theme="dark"] .mini-badge.wholesale:hover,
html[data-theme="dark"] .wholesale-head small { background: #303540; color: #d1d5dc; }
html[data-theme="dark"] .mini-badge.wholesale.warning,
html[data-theme="dark"] .wholesale-alert,
html[data-theme="dark"] .wholesale-tier.warning { border-color: #724321; background: #33261e; color: #f0a56d; }
html[data-theme="dark"] .smart-period > summary,
html[data-theme="dark"] .listing-search,
html[data-theme="dark"] .sale-edit-summary { border-color: var(--line); background: #242832; }
html[data-theme="dark"] .post-sale-kind,
html[data-theme="dark"] .post-sale-status,
html[data-theme="dark"] .post-sale-conversation > header span {
  background: #2a2f39; color: #c5cad2;
}
html[data-theme="dark"] .post-sale-kind.claim { background: #172f4a; color: #93c7ff; }
html[data-theme="dark"] .post-sale-kind.claim_return { background: #282445; color: #bcb0ff; }
html[data-theme="dark"] .post-sale-kind.buyer_regret { background: #3a2d17; color: #f5c66e; }
html[data-theme="dark"] .post-sale-kind.cancellation { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .post-sale-status.review { background: #3a261c; color: #ffb18e; }
html[data-theme="dark"] .post-sale-status.waiting_product { background: #3a2d17; color: #f5c66e; }
html[data-theme="dark"] .post-sale-status.handling { background: #172f4a; color: #93c7ff; }
html[data-theme="dark"] .post-sale-status.finalized { background: #173426; color: #80dba8; }
html[data-theme="dark"] .post-sale-impact.loss { background: #3b2027; color: #ff9baa; }
html[data-theme="dark"] .post-sale-impact.recovered,
html[data-theme="dark"] .post-sale-impact.neutral { background: #173426; color: #80dba8; }
html[data-theme="dark"] .post-sale-impact.warning,
html[data-theme="dark"] .post-sale-impact.pending { background: #3a2d17; color: #f5c66e; }
html[data-theme="dark"] .post-sale-detail-grid,
html[data-theme="dark"] .post-sale-logistics,
html[data-theme="dark"] .post-sale-financial,
html[data-theme="dark"] .post-sale-reason,
html[data-theme="dark"] .post-sale-internal-note,
html[data-theme="dark"] .post-sale-conversation > header,
html[data-theme="dark"] .post-sale-recoveries > header,
html[data-theme="dark"] .return-recovery-fields {
  border-color: var(--line); background: #20242d;
}
html[data-theme="dark"] .post-sale-flex-chip { background: #3a2d17; color: #f5c66e; }
html[data-theme="dark"] .post-sale-flex-impact,
html[data-theme="dark"] .post-sale-arrival.withdrawal { border-color: #5b4725; background: #2b2519; }
html[data-theme="dark"] .post-sale-flex-impact > span,
html[data-theme="dark"] .post-sale-arrival.withdrawal > span { background: #44361f; color: #f5c66e; }
html[data-theme="dark"] .post-sale-flex-impact p,
html[data-theme="dark"] .post-sale-flex-impact small,
html[data-theme="dark"] .post-sale-arrival.withdrawal p { color: #d8c59d; }
html[data-theme="dark"] .post-sale-arrival.warehouse { border-color: #294968; background: #192635; }
html[data-theme="dark"] .post-sale-arrival.warehouse > span { background: #213c57; color: #93c7ff; }
html[data-theme="dark"] .post-sale-arrival.warehouse p { color: #aec4db; }
html[data-theme="dark"] .post-sale-arrival.seller { border-color: #27563c; background: #173426; }
html[data-theme="dark"] .post-sale-arrival.seller > span { background: #214b35; color: #8ae6b0; }
html[data-theme="dark"] .post-sale-arrival.seller p { color: #a8cfb8; }
html[data-theme="dark"] .post-sale-internal-note > header button { background: #2a303a; color: #93c7ff; }
html[data-theme="dark"] .post-sale-internal-note > header button:hover { background: #333a46; }
html[data-theme="dark"] .post-sale-internal-note textarea { border-color: var(--line); background: #171a21; color: #f1f3f6; }
html[data-theme="dark"] .post-sale-logistics .total { background: #282d37; }
html[data-theme="dark"] .post-sales-summary { border-color: var(--line); background: #171a21; }
html[data-theme="dark"] .return-recovery-context > i { background: #172f4a; color: #93c7ff; }
html[data-theme="dark"] .return-recovery-field { border-color: var(--line); color: #c5cad2 !important; }
html[data-theme="dark"] .return-recovery-field input,
html[data-theme="dark"] .return-recovery-field select { background: transparent; color: #f1f3f6; }
html[data-theme="dark"] .return-recovery-result { border-color: #27563c; background: #173426; }
html[data-theme="dark"] .return-recovery-result-icon { background: #214b35; color: #8ae6b0; }
html[data-theme="dark"] .return-recovery-result-copy > span,
html[data-theme="dark"] .return-recovery-result-copy > label > span { color: #90c9a7; }
html[data-theme="dark"] .return-recovery-form[data-recovery-mode="stock"] .return-recovery-result { border-color: #315779; background: #172b3d; }
html[data-theme="dark"] .return-recovery-form[data-recovery-mode="stock"] .return-recovery-result-icon { background: #214361; color: #a8d4ff; }
html[data-theme="dark"] .return-recovery-note { border-color: var(--line); }
html[data-theme="dark"] .return-recovery-note summary { color: #d5d9e0; }
html[data-theme="dark"] .return-recovery-note textarea { border-color: var(--line); background: #20242d; color: #f1f3f6; }
html[data-theme="dark"] .post-sale-tabs { background: #20242d; }
html[data-theme="dark"] .post-sale-tabs button { color: #aeb4bd; }
html[data-theme="dark"] .post-sale-tabs button.active { background: #303641; color: #fff; box-shadow: none; }
html[data-theme="dark"] .post-sale-tabs button span { background: #383e49; }
html[data-theme="dark"] .post-sale-row-reason { color: #b9bec7; }
html[data-theme="dark"] .post-sale-recoveries { border-color: var(--line); }
html[data-theme="dark"] .post-sale-conversation { border-color: var(--line); }
html[data-theme="dark"] .post-sale-conversation > div { background: #14171d; }
html[data-theme="dark"] .post-sale-message { border-color: var(--line); background: #20242d; }
html[data-theme="dark"] .post-sale-message.ours { border-color: #315779; background: #172b3d; }
html[data-theme="dark"] .post-sale-message p { color: #e1e5eb; }
html[data-theme="dark"] .post-sale-attachment { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .smart-period > summary span,
html[data-theme="dark"] .smart-period > summary i,
html[data-theme="dark"] .listing-filters small,
html[data-theme="dark"] .sale-edit-summary span,
html[data-theme="dark"] .sale-edit-summary small { color: var(--muted); }
html[data-theme="dark"] .smart-period > summary strong,
html[data-theme="dark"] .listing-search input { color: var(--text); }
html[data-theme="dark"] .smart-period[open] > summary,
html[data-theme="dark"] .smart-period-menu input:focus { border-color: #66b3ff; background: #282d37; }
html[data-theme="dark"] .smart-period-presets button { color: #d5d9e0; }
html[data-theme="dark"] .smart-period-presets button:hover { background: #2a2f39; }
html[data-theme="dark"] .smart-period-presets button.active,
html[data-theme="dark"] .export-button { background: #17314d; color: #91c9ff; }
html[data-theme="dark"] .smart-period-menu form { border-color: var(--line); }
html[data-theme="dark"] .smart-period-menu label { color: var(--muted); }
html[data-theme="dark"] .smart-period-menu input {
  border-color: #3a404b; background: #171a21; color: var(--text);
}
html[data-theme="dark"] .br-date-input {
  border-color: #3a404b; background: #14171d; color: var(--text);
}
html[data-theme="dark"] .br-date-input:focus-within {
  border-color: #66b3ff; background: #1c2028; box-shadow: 0 0 0 3px rgba(102,179,255,.18);
}
html[data-theme="dark"] .br-date-input input[data-br-date-part]:focus,
html[data-theme="dark"] .return-recovery-field .br-date-input:focus-within {
  background: rgba(102,179,255,.1);
}
html[data-theme="dark"] .br-date-picker-shell { color: #aeb4bf; }
html[data-theme="dark"] .statement-table .statement-section td,
html[data-theme="dark"] .statement-table tr.subtotal td { background: #1c2028; color: #d6dae1; }
html[data-theme="dark"] .statement-table tr.total td {
  border-color: #40536b; background: #1b2b3d; color: #e9f3ff;
}
html[data-theme="dark"] .statement-table tr.expense td:first-child { color: #c9ced6; }

html[data-theme="dark"] .listing-name img,
html[data-theme="dark"] .listing-image-placeholder,
html[data-theme="dark"] .ad-name img,
html[data-theme="dark"] .ad-image-placeholder,
html[data-theme="dark"] .stock-listing-main img,
html[data-theme="dark"] .stock-image-placeholder {
  border-color: var(--line); background: #282c35; color: #9ca3ae;
}
html[data-theme="dark"] .stock-toggle,
html[data-theme="dark"] .campaign-toggle,
html[data-theme="dark"] .feasibility-product > span {
  background: #2a2f39; color: #c4c9d1;
}
html[data-theme="dark"] .campaign-edit { color: #aeb4bd; }
html[data-theme="dark"] .campaign-edit:hover,
html[data-theme="dark"] .campaign-edit:focus-visible { background: #303641; color: #fff; }
html[data-theme="dark"] .campaign-editor-ads,
html[data-theme="dark"] .campaign-editor-ads > header,
html[data-theme="dark"] .campaign-ad-row,
html[data-theme="dark"] .campaign-ad-add { border-color: var(--line); background: #171a21; }
html[data-theme="dark"] .campaign-write-error { border-color: #67532d; background: #2b2417; }
html[data-theme="dark"] .campaign-write-error-icon { background: #4a391a; color: #ffd27b; }
html[data-theme="dark"] .campaign-write-error strong { color: #ffe2a4; }
html[data-theme="dark"] .campaign-write-error small { color: #cdb77f; }
html[data-theme="dark"] .campaign-number-control,
html[data-theme="dark"] .campaign-ad-search input,
html[data-theme="dark"] .campaign-ad-choice { border-color: var(--line); background: #20242c; color: #f7f8fa; }
html[data-theme="dark"] .campaign-number-control input { color: #f7f8fa; }
html[data-theme="dark"] .campaign-ad-picker { border-color: var(--line); background: #15181e; }
html[data-theme="dark"] .campaign-ad-choice:hover { border-color: #454b57; }
html[data-theme="dark"] .campaign-ad-choice.unassigned { border-color: #235b42; background: #182c23; }
html[data-theme="dark"] .campaign-ad-choice.selected { border-color: #438ad5; background: #172c42; }
html[data-theme="dark"] .campaign-ad-choice-check { background: #303641; color: #bcc2cb; }
html[data-theme="dark"] .campaign-chip.assigned { background: #44351b; color: #ffd27b; }
html[data-theme="dark"] .campaign-chip.current { background: #193653; color: #8ac2ff; }
html[data-theme="dark"] .campaign-chip.unassigned { background: #183c2b; color: #7ee0aa; }
html[data-theme="dark"] .campaign-ad-choice.selected .campaign-ad-choice-check { background: #1685f1; color: #fff; }
html[data-theme="dark"] .campaign-editor-ads > header > span,
html[data-theme="dark"] .campaign-ad-remove,
html[data-theme="dark"] .campaign-ad-placeholder { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .campaign-ad-row img,
html[data-theme="dark"] .campaign-ad-choice img { border-color: var(--line); background: #282c35; }
html[data-theme="dark"] .campaign-ad-remove:hover { background: #3b2027; color: #ff9baa; }
html[data-theme="dark"] .stock-toggle:hover,
html[data-theme="dark"] .row-menu summary:hover,
html[data-theme="dark"] .row-menu[open] summary { background: #353a45; color: #fff; }
html[data-theme="dark"] .stock-product-row.expanded td,
html[data-theme="dark"] .stock-detail-row td,
html[data-theme="dark"] .stock-detail-row:hover td,
html[data-theme="dark"] .feasibility-row.expanded td,
html[data-theme="dark"] .feasibility-detail-row td,
html[data-theme="dark"] .feasibility-detail-row:hover td { background: #15181e; }
html[data-theme="dark"] .feasibility-quick-form { border-color: rgba(255,255,255,.05); }
html[data-theme="dark"] .feasibility-quick-field > span,
html[data-theme="dark"] .feasibility-quick-result > span,
html[data-theme="dark"] .feasibility-quick-result > small { color: #aeb4bf; }
html[data-theme="dark"] .feasibility-quick-result {
  border-color: hsl(var(--margin-tone,45) 46% 36% / .46);
  background: linear-gradient(135deg,hsl(var(--margin-tone,45) 43% 20% / .82),#1e222b 88%);
}
html[data-theme="dark"] .feasibility-quick-result > strong { color: hsl(var(--margin-tone,45) 82% 74%); }
html[data-theme="dark"] .feasibility-quick-money > span { color: #959ca8; }
html[data-theme="dark"] .feasibility-quick-more { color: #c2c7d0; }
html[data-theme="dark"] .feasibility-quick-more:hover { background: #2a2f39; color: #fff; }
html[data-theme="dark"] .feasibility-quick-links a { border-color: #3a404b; background: #20242d; color: #c5cad2; }
html[data-theme="dark"] .feasibility-quick-links a:hover { border-color: #4c6f92; background: #252b35; color: #9bcfff; }
html[data-theme="dark"] .feasibility-quick-links a.competitor { border-color: #315779; background: #172b3d; color: #9bcfff; }
html[data-theme="dark"] .stock-product-row.recovery-required td { background: #2d191e; }
html[data-theme="dark"] .stock-type { background: #2b3039; color: #c5cad2; }
html[data-theme="dark"] .return-review-product,
html[data-theme="dark"] .return-review-meta > div,
html[data-theme="dark"] .return-review-reason,
html[data-theme="dark"] .return-review-card textarea,
html[data-theme="dark"] .return-arrival-note,
html[data-theme="dark"] .return-candidate { border-color: var(--line); background: #171a21; color: var(--text); }
html[data-theme="dark"] .return-review-product > span { background: #2a2f39; color: #d6dae1; }
html[data-theme="dark"] .return-review-card > label { color: var(--muted); }
html[data-theme="dark"] .return-reference-disclosure { border-color: var(--line); background: #171a21; }
html[data-theme="dark"] .return-reference-row { background: #242831; }
html[data-theme="dark"] .return-code-card { border-color: #315779; background: #172b3d; }
html[data-theme="dark"] .return-code-card small { color: #8fbbdf; }
html[data-theme="dark"] .return-code-card strong { color: #b5dcff; }
html[data-theme="dark"] .return-candidate:hover { border-color: #41688b; background: #1a2a39; }

html[data-theme="dark"] .campaign-detail > td,
html[data-theme="dark"] .campaign-detail:hover > td {
  border-color: #343a45;
  background: linear-gradient(180deg, #20242c 0%, #191c23 100%);
  box-shadow: inset 3px 0 0 #4b5260, inset 0 1px 0 rgba(255,255,255,.04);
}
html[data-theme="dark"] .campaign-detail-loading span,
html[data-theme="dark"] .loading-state span { border-color: #454b56; border-top-color: #f4f6fa; }
html[data-theme="dark"] .campaign-insights { border-color: var(--line); background: rgba(255,255,255,.025); }
html[data-theme="dark"] .campaign-chart-panel,
html[data-theme="dark"] .campaign-share,
html[data-theme="dark"] .campaign-items-block,
html[data-theme="dark"] .campaign-items-scroll { border-color: var(--line); background: #171a21; }
html[data-theme="dark"] .campaign-chart .grid { stroke: #343a45; }
html[data-theme="dark"] .campaign-chart .axis { stroke: #3c424d; }
html[data-theme="dark"] .ads-chart-bar.attributed { fill: #4d9cff; }
html[data-theme="dark"] .ads-chart-bar.organic { fill: #83bfff; }
html[data-theme="dark"] .ads-chart-bar.previous { fill: transparent; }
html[data-theme="dark"] .ads-chart-line.roas { stroke: #b29fff; }
html[data-theme="dark"] .ads-chart-line.acos { stroke: #e0b85c; }
html[data-theme="dark"] .ads-chart-point { fill: #171a21; stroke: #b29fff; }
html[data-theme="dark"] .ads-chart-point.acos { stroke: #e0b85c; }
html[data-theme="dark"] .campaign-items-head {
  border-color: var(--line); background: linear-gradient(90deg, #342219 0%, #211c1a 36%, #171a21 76%);
}
html[data-theme="dark"] .campaign-items-head::before { box-shadow: 4px 4px 0 #63351f; }
html[data-theme="dark"] .campaign-items-head span { background: #48291c; color: #ffb388; }
html[data-theme="dark"] .campaign-items-table thead { background: #14171d; }
html[data-theme="dark"] .campaign-items-table tbody tr:nth-child(even) { background: #1b1e25; }
html[data-theme="dark"] .campaign-items-table tbody tr:hover { background: #282019; }
html[data-theme="dark"] .metrics-hidden { border-color: var(--line); background: #20242c; }
html[data-theme="dark"] .metrics-hidden summary { color: #c3c8d0; }
html[data-theme="dark"] .metrics-hidden summary b { background: #313640; color: #cbd0d8; }
html[data-theme="dark"] .metrics-hidden-list { border-color: var(--line); background: #181b22; }
html[data-theme="dark"] .metrics-hidden-row { border-color: var(--line); }

html[data-theme="dark"] .feasibility-live-card { background: #1e222b; }
html[data-theme="dark"] .feasibility-options,
html[data-theme="dark"] .feasibility-side { background: #171a21; color: #c6cbd3; }
html[data-theme="dark"] .feasibility-options summary { color: #c1c6cf; }
html[data-theme="dark"] .feasibility-money-cell strong,
html[data-theme="dark"] .feasibility-margin { color: hsl(var(--margin-tone, 45) 82% 72%); }
html[data-theme="dark"] .feasibility-note-indicator { background: #2a2f39; color: #c4c9d1; }
html[data-theme="dark"] .feasibility-outcome {
  background: linear-gradient(135deg, hsl(var(--margin-tone, 45) 46% 22% / .76), #1e222b 88%);
  box-shadow: inset 0 0 0 1px hsl(var(--margin-tone, 45) 54% 66% / .18);
}
html[data-theme="dark"] .feasibility-outcome small span + span { border-color: #3a404b; }
html[data-theme="dark"] .feasibility-margin-grade {
  background: hsl(var(--margin-tone, 45) 45% 25% / .86); color: hsl(var(--margin-tone, 45) 82% 76%);
}
html[data-theme="dark"] .feasibility-options label small { color: var(--muted); }
html[data-theme="dark"] .feasibility-options summary > span,
html[data-theme="dark"] .feasibility-category-results strong { color: var(--text); }
html[data-theme="dark"] .feasibility-category-results button:hover,
html[data-theme="dark"] .row-menu-popover button:hover,
html[data-theme="dark"] .row-menu-popover a:hover { background: #2a2f39; }
html[data-theme="dark"] .row-menu summary { color: #afb5bf; }
html[data-theme="dark"] .row-menu-popover button,
html[data-theme="dark"] .row-menu-popover a { color: #edf0f4; }
html[data-theme="dark"] .access-card { border-color: var(--line); background: #171a21; }

html[data-theme="dark"] .modal-backdrop { background: rgba(2,3,6,.58); }
html[data-theme="dark"] .modal-card {
  border-color: rgba(255,255,255,.12); background: rgba(24,27,34,.98);
  box-shadow: 0 32px 90px rgba(0,0,0,.56);
}
html[data-theme="dark"] .modal-close { background: #2a2f38; color: #d4d8df; }
html[data-theme="dark"] .notification-trailing small { background: #39271d; color: #ffb47f; }
html[data-theme="dark"] .reconciliation-source span { background: #172b42; color: #8dc7ff; }
html[data-theme="dark"] .reconciliation-balance { background: #15181e; }
html[data-theme="dark"] .reconciliation-difference.positive { background: #163326; color: #79dfa8; }
html[data-theme="dark"] .reconciliation-difference.negative { background: #3a2025; color: #ff9aa4; }
html[data-theme="dark"] .form label { color: #c5cad2; }
html[data-theme="dark"] .form input,
html[data-theme="dark"] .form select,
html[data-theme="dark"] .form textarea {
  border-color: #3b414c; background: #14171d; color: var(--text);
}
html[data-theme="dark"] .form input::placeholder,
html[data-theme="dark"] .form textarea::placeholder { color: #808894; }
html[data-theme="dark"] .form input:focus,
html[data-theme="dark"] .form select:focus,
html[data-theme="dark"] .form textarea:focus {
  border-color: #66b3ff; background: #1c2028; box-shadow: 0 0 0 3px rgba(102,179,255,.18);
}
html[data-theme="dark"] .feasibility-supplier-head > span { color: #c5cad2; }
html[data-theme="dark"] .feasibility-supplier-field > select {
  border-color: #3b414c; background: #14171d; color: var(--text);
}
html[data-theme="dark"] .feasibility-supplier-field > select:focus {
  border-color: #66b3ff; background: #1c2028; box-shadow: 0 0 0 3px rgba(102,179,255,.18);
}
html[data-theme="dark"] .feasibility-quick-supplier { background: #15181e; }
html[data-theme="dark"] .feasibility-quick-supplier-actions button { background: #2a2f39; color: #d8dce3; }
html[data-theme="dark"] .feasibility-quick-supplier-actions button.primary { background: #f4f6fa; color: #111318; }
html[data-theme="dark"] .catalog-product-toggle > span,
html[data-theme="dark"] .product-supplier-editor > header button { background: #2a2f39; color: #c5cad2; }
html[data-theme="dark"] .catalog-product-suppliers,
html[data-theme="dark"] .product-supplier-editor { border-color: var(--line); background: #15181e; }
html[data-theme="dark"] .recurrence-end-fields { background: #15181e; }
html[data-theme="dark"] .choice-grid button,
html[data-theme="dark"] .listing-source,
html[data-theme="dark"] .listing-category-picker,
html[data-theme="dark"] .listing-main-attributes,
html[data-theme="dark"] .listing-options,
html[data-theme="dark"] .switch-field { border-color: var(--line); background: #15181e; }
html[data-theme="dark"] .content-title-current > article,
html[data-theme="dark"] .content-title-current > article.catalog,
html[data-theme="dark"] .content-title-current > article.unavailable,
html[data-theme="dark"] .content-history-section,
html[data-theme="dark"] .content-keyword-editor,
html[data-theme="dark"] .content-discovery-section,
html[data-theme="dark"] .content-keyword-section,
html[data-theme="dark"] .content-base-name {
  border-color: var(--line); background: #15181e;
}
html[data-theme="dark"] .content-title-current > article.catalog { background: #172130; }
html[data-theme="dark"] .content-title-current > article > strong,
html[data-theme="dark"] .content-base-name strong,
html[data-theme="dark"] .content-history-section > header strong,
html[data-theme="dark"] .content-keyword-editor > header strong,
html[data-theme="dark"] .content-discovery-section > header strong,
html[data-theme="dark"] .content-keyword-section > header strong,
html[data-theme="dark"] .content-version-row strong,
html[data-theme="dark"] .content-keyword-row > div:first-child > strong,
html[data-theme="dark"] .content-metrics-grid article > strong { color: var(--text); }
html[data-theme="dark"] .content-version-list,
html[data-theme="dark"] .content-keyword-list,
html[data-theme="dark"] .content-version-row,
html[data-theme="dark"] .content-keyword-row { border-color: var(--line); }
html[data-theme="dark"] .content-version-type { color: #9ac9ff; background: #20334b; }
html[data-theme="dark"] .content-version-type.catalog { color: #d0b4f3; background: #35294a; }
html[data-theme="dark"] .content-version-row > button { background: #282d36; color: #d6dae1; }
html[data-theme="dark"] .content-version-row > button:hover { background: #303a48; color: #8bc5ff; }
html[data-theme="dark"] .content-change-details {
  border-color: var(--line); background: #15181e;
}
html[data-theme="dark"] .content-change-details > div,
html[data-theme="dark"] .content-change-details article { border-color: var(--line); }
html[data-theme="dark"] .content-change-details > summary span { background: #2a2f39; color: #c1c6cf; }
html[data-theme="dark"] .content-change-details article span { color: #c8cdd5; }
html[data-theme="dark"] .content-keyword-input-wrap {
  border-color: #3b414c; background: #14171d;
}
html[data-theme="dark"] .content-keyword-input-wrap:focus-within {
  border-color: #66b3ff; background: #1c2028; box-shadow: 0 0 0 3px rgba(102,179,255,.18);
}
html[data-theme="dark"] .content-keyword-input-wrap input { color: var(--text); }
html[data-theme="dark"] .content-keyword-input-wrap > span { background: #1d344d; color: #9bcfff; }
html[data-theme="dark"] .content-keyword-input-wrap > span button { color: #8eb8df; }
html[data-theme="dark"] .content-metrics-grid > article { background: #20242d; }
html[data-theme="dark"] .content-placement-list span { background: #292e37; color: #c2c7cf; }
html[data-theme="dark"] .content-placement-list span.missing { background: #3b291b; color: #f0ae73; }
html[data-theme="dark"] .choice-grid button:hover { border-color: #59606d; background: #22262f; }
html[data-theme="dark"] .listing-category-picker > header strong,
html[data-theme="dark"] .listing-category-current strong,
html[data-theme="dark"] .listing-main-attributes > header strong,
html[data-theme="dark"] .listing-options > summary,
html[data-theme="dark"] .listing-options > summary strong { color: #eef1f5; }
html[data-theme="dark"] .listing-category-current {
  border-color: #35445a; background: #192330;
}
html[data-theme="dark"] .listing-category-current small { color: #b0bac8; }
html[data-theme="dark"] .listing-category-current code { background: #283548; color: #c0d2e8; }
html[data-theme="dark"] .listing-category-current.warning { border-color: #765626; background: #332711; }
html[data-theme="dark"] .listing-category-picker > header > span,
html[data-theme="dark"] .listing-category-results button em { background: #183729; color: #8fe0b1; }
html[data-theme="dark"] .listing-category-picker > header > span.warning { background: #3a2a12; color: #ffd080; }
html[data-theme="dark"] .listing-shared-product input[readonly] { background: #1b2735; color: #c3d3e6; }
html[data-theme="dark"] .listing-picture { border-color: var(--line); background: #20242d; }
html[data-theme="dark"] .listing-actions {
  border-color: var(--line); background: rgba(24,27,34,.94);
}
html[data-theme="dark"] .switch-field i { background: #4b515c; }
html[data-theme="dark"] .switch-field i::after { background: #fff; }
html[data-theme="dark"] .info[data-tip] { border-color: #69717e; color: #c2c7cf; }
html[data-theme="dark"] .ranking-connection { background: rgba(23,26,33,.9); }
html[data-theme="dark"] .ranking-keyword > span,
html[data-theme="dark"] .ranking-movement { background: #2a2f38; color: #c2c7cf; }
html[data-theme="dark"] .ranking-movement.up { background: #173828; color: #86e4ad; }
html[data-theme="dark"] .ranking-movement.down { background: #3b1d24; color: #ff9ca7; }
html[data-theme="dark"] .ranking-table tr.expanded td { background: #20242c; }
html[data-theme="dark"] .ranking-detail > td { background: #15181f; }
html[data-theme="dark"] .ranking-history,
html[data-theme="dark"] .ranking-competitors { border-color: var(--line); background: #1c2028; }
html[data-theme="dark"] .ranking-chart .grid { stroke: #383e49; }
html[data-theme="dark"] .ranking-chart-point { fill: #1c2028; }
html[data-theme="dark"] .ranking-competitors li.own { background: #172f4a; }
html[data-theme="dark"] .ranking-install { color: #c5cad2; }

@media (prefers-reduced-motion: no-preference) {
  body, .sidebar, .panel, .kpi, .button, .theme-toggle, .modal-card {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
  }
}

.research-layout { max-width: 1080px; margin: 0 auto; display: grid; gap: 28px; }
.research-composer {
  position: relative; overflow: hidden; padding: clamp(24px, 4vw, 42px); display: grid; gap: 22px;
  border: 1px solid rgba(8,119,232,.12); border-radius: 28px;
  background: radial-gradient(circle at 92% 0%, rgba(88,166,255,.16), transparent 34%), rgba(255,255,255,.94);
  box-shadow: 0 18px 54px rgba(26,45,74,.07);
}
.research-composer > div { max-width: 690px; display: grid; gap: 7px; }
.research-composer > div > span {
  color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .14em;
}
.research-composer h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.035em; }
.research-composer p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.research-composer form {
  padding: 7px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px;
  border: 1px solid rgba(15,23,42,.1); border-radius: 20px; background: #fff;
  box-shadow: 0 9px 28px rgba(18,24,40,.055);
}
.research-composer textarea {
  width: 100%; min-height: 82px; max-height: 210px; padding: 12px 13px; resize: vertical;
  border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; line-height: 1.45;
}
.research-composer textarea::placeholder { color: #a0a4ad; }
.research-composer form:focus-within { border-color: rgba(8,119,232,.48); box-shadow: 0 0 0 4px rgba(8,119,232,.1); }
.research-composer form .button { min-width: 112px; min-height: 42px; margin: 0; border-radius: 14px; }
.research-composer > small { color: #858993; font-size: 9px; line-height: 1.5; }

.research-history { display: grid; gap: 14px; }
.research-history > header { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 0 3px; }
.research-history > header > div { display: grid; gap: 4px; }
.research-history h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.research-history > header p { margin: 0; color: var(--muted); font-size: 10px; }
.research-active-count {
  padding: 5px 9px; border-radius: 999px; background: #eaf4ff; color: #1767ad; font-size: 9px; font-weight: 750;
}
.research-list { display: grid; gap: 12px; }
.research-card {
  padding: 20px 22px; display: grid; gap: 11px; border: 1px solid var(--line); border-radius: 20px;
  background: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(18,24,40,.04);
}
.research-card > header, .research-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.research-card > header > div { display: flex; align-items: center; gap: 8px; }
.research-card > header > span, .research-card > header > div > small { color: var(--muted); font-size: 9px; font-weight: 700; }
.research-card > header time { color: #989ca4; font-size: 9px; }
.research-card h3 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.018em; }
.research-card > p { max-width: 850px; margin: 0; color: #454951; font-size: 12px; line-height: 1.6; white-space: pre-line; }
.research-card > footer { padding-top: 2px; color: var(--muted); font-size: 9px; }
.research-card > footer small { padding: 4px 7px; border-radius: 999px; background: #f1f2f4; }
.research-card.pending { border-style: dashed; background: rgba(255,255,255,.64); }
.research-card.pending > header > span { display: inline-flex; align-items: center; gap: 7px; color: #3c6f9d; }
.research-card.pending > header i {
  width: 10px; height: 10px; border: 2px solid #a9c9e7; border-top-color: #1676cf; border-radius: 50%; animation: spin .8s linear infinite;
}
.research-card.waiting { border-color: rgba(195,125,24,.22); background: #fffcf5; }
.research-card.waiting > header > span { color: #9d6415; font-weight: 750; }
.research-card.failed { background: rgba(255,250,250,.78); }
.research-card.failed > header > span { color: var(--red); font-weight: 750; }
.research-verdict { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.research-verdict.advance { background: #e5f7ed; color: #147a46; }
.research-verdict.test { background: #eaf4ff; color: #1769b1; }
.research-verdict.avoid { background: #feecef; color: #b52635; }
.research-verdict.insufficient { background: #f0f1f3; color: #656a73; }
.research-details { margin-top: 2px; border-top: 1px solid var(--line); }
.research-details > summary {
  width: max-content; padding: 13px 0 2px; color: #4d535d; cursor: pointer; list-style: none; font-size: 10px; font-weight: 750;
}
.research-details > summary::-webkit-details-marker { display: none; }
.research-details > summary::after { content: "⌄"; margin-left: 6px; color: #9499a2; }
.research-details[open] > summary::after { content: "⌃"; }
.research-evidence-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.research-evidence {
  padding: 13px 14px; display: grid; gap: 5px; border-radius: 14px; background: #f6f7f9;
}
.research-evidence > span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.research-evidence strong { font-size: 14px; }
.research-evidence p { margin: 0; color: #555a63; font-size: 10px; line-height: 1.45; }
.research-evidence small { color: #9397a0; font-size: 8px; }
.research-detail-block { margin-top: 15px; display: grid; gap: 7px; }
.research-detail-block h4 { margin: 0; font-size: 10px; }
.research-detail-block ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: #4f545d; font-size: 10px; line-height: 1.5; }
.research-detail-block.opportunity li::marker { color: var(--green); }
.research-detail-block.risk li::marker { color: var(--red); }
.research-sources a { color: var(--blue); text-decoration: none; }
.research-sources a:hover { text-decoration: underline; }
.research-sources a span { margin-left: 4px; font-size: 8px; }
.research-uncertainty {
  margin: 15px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff8e9; color: #76531c; font-size: 9px; line-height: 1.5;
}

html[data-theme="dark"] .research-composer {
  border-color: #2b4663; background: radial-gradient(circle at 92% 0%, rgba(54,126,201,.18), transparent 35%), #171a21;
  box-shadow: 0 18px 54px rgba(0,0,0,.18);
}
html[data-theme="dark"] .research-composer form { border-color: #3a404b; background: #101319; }
html[data-theme="dark"] .research-composer textarea { color: var(--text); }
html[data-theme="dark"] .research-composer form:focus-within { border-color: #539de7; box-shadow: 0 0 0 4px rgba(62,143,222,.14); }
html[data-theme="dark"] .research-active-count { background: #183552; color: #9bcfff; }
html[data-theme="dark"] .research-card { border-color: var(--line); background: #171a21; box-shadow: none; }
html[data-theme="dark"] .research-card > p { color: #c5cad2; }
html[data-theme="dark"] .research-card > footer small { background: #292e37; }
html[data-theme="dark"] .research-card.pending { background: rgba(23,26,33,.64); }
html[data-theme="dark"] .research-card.waiting { border-color: #65502a; background: #272116; }
html[data-theme="dark"] .research-card.failed { background: #24191d; }
html[data-theme="dark"] .research-verdict.advance { background: #173828; color: #86e4ad; }
html[data-theme="dark"] .research-verdict.test { background: #193653; color: #9bcfff; }
html[data-theme="dark"] .research-verdict.avoid { background: #3b1d24; color: #ff9ca7; }
html[data-theme="dark"] .research-verdict.insufficient { background: #2a2f39; color: #c4c9d1; }
html[data-theme="dark"] .research-details { border-color: var(--line); }
html[data-theme="dark"] .research-details > summary { color: #c6cbd3; }
html[data-theme="dark"] .research-evidence { background: #20242c; }
html[data-theme="dark"] .research-evidence p, html[data-theme="dark"] .research-detail-block ul { color: #c2c7cf; }
html[data-theme="dark"] .research-uncertainty { background: #332711; color: #e8bf78; }

@media (max-width: 760px) {
  .research-composer { padding: 22px 17px; border-radius: 22px; }
  .research-composer form { grid-template-columns: 1fr; }
  .research-composer form .button { width: 100%; }
  .research-history > header { align-items: flex-start; flex-direction: column; gap: 9px; }
  .research-card { padding: 17px; }
  .research-card > header { align-items: flex-start; }
  .research-card > header > div { align-items: flex-start; flex-direction: column; }
  .research-evidence-grid { grid-template-columns: 1fr; }
}
