:root {
  --red: #c81912;
  --red-2: #d71920;
  --red-soft: #fff1f0;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #ffffff;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --purple: #7c3aed;
  --cyan: #0891b2;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(200, 25, 18, 0.08), rgba(37, 99, 235, 0.06)),
    var(--bg);
  padding: 32px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 34px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.12);
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--red);
}

.login-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 34px;
  letter-spacing: 0;
}

.login-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-field,
.modal-field {
  display: grid;
  gap: 8px;
}

.login-field span,
.modal-field span {
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.login-field input,
.modal-field input {
  height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 0 12px;
}

.login-field input:focus,
.modal-field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 25, 18, 0.12);
}

.login-submit {
  width: 100%;
  height: 42px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 224px 1fr;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 18px 22px 24px;
}

.brand-text {
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--red);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
}

.sidebar-toggle {
  width: 100%;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.sidebar-toggle:hover {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.sidebar-toggle span,
.sidebar-toggle span::before,
.sidebar-toggle span::after {
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.sidebar-toggle span {
  position: relative;
}

.sidebar-toggle span::before,
.sidebar-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.sidebar-toggle span::before {
  top: -5px;
}

.sidebar-toggle span::after {
  top: 5px;
}

.app-shell.sidebar-collapsed .brand {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px 12px;
}

.app-shell.sidebar-collapsed .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.app-shell.sidebar-collapsed .brand-text {
  display: none;
}

.user-menu {
  position: relative;
  margin: 0;
}

.user-profile {
  min-width: 174px;
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid #f0d5d3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.user-profile:hover,
.user-profile[aria-expanded="true"] {
  border-color: #fecaca;
  background: var(--red-soft);
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.14);
}

.user-dropdown button {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  padding: 0 10px;
}

.user-dropdown button:hover {
  background: var(--red-soft);
  color: var(--red);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
}

.nav-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  padding: 0 14px;
  text-align: left;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  color: var(--red);
  background: var(--red-soft);
  box-shadow: inset 3px 0 0 var(--red);
  font-weight: 800;
}

.nav-item.active .nav-icon {
  color: var(--red);
}

.app-shell.sidebar-collapsed .nav-list {
  padding: 10px 12px 18px;
}

.app-shell.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .nav-label {
  display: none;
}

.app-shell.sidebar-collapsed .sync-card {
  display: none;
}

.sync-card {
  margin: auto 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 14px 16px;
}

.sidebar-footer {
  margin: 0 16px 20px;
}

.app-shell.sidebar-collapsed .sidebar-footer {
  margin: auto 12px 18px;
}

.sync-title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 12px;
  line-height: 24px;
}

.sync-row span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.sync-row.sync-warn span {
  background: var(--amber);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 24px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 28px;
  letter-spacing: 0;
}

.topbar > div:first-child {
  flex: 1;
  min-width: 0;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .user-menu {
  flex: 0 0 auto;
  margin-left: 24px;
}

.topbar .user-profile {
  border-color: transparent;
  background: transparent;
  padding-right: 0;
}

.topbar .user-profile:hover,
.topbar .user-profile[aria-expanded="true"] {
  border-color: transparent;
  background: transparent;
}

.topbar .user-dropdown {
  left: auto;
  right: 0;
  min-width: 174px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  font-size: 12px;
  padding: 0 12px;
  white-space: nowrap;
}

button.chip {
  cursor: pointer;
}

button.chip:hover {
  border-color: #fecaca;
  background: #fff;
  color: var(--red);
}

.chip.primary {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}

.filter-chip strong {
  max-width: 160px;
  overflow: hidden;
  border-left: 1px solid #fecaca;
  padding-left: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip.active-filter {
  box-shadow: inset 0 0 0 1px #fecaca;
}

.btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0 18px;
  text-decoration: none;
  white-space: nowrap;
}

.btn.compact {
  height: 30px;
  padding: 0 14px;
}

.btn-primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.btn-outline {
  border-color: var(--red);
  background: #fff;
  color: var(--red);
}

.btn-dark {
  background: #111827;
  color: #fff;
}

.content {
  padding: 24px;
}

.filter-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px 18px;
}

.filter-strip[hidden] {
  display: none;
}

.filter-heading {
  display: grid;
  min-width: 88px;
}

.filter-heading strong {
  font-size: 15px;
}

.filter-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 18px;
}

.kpi-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  content: "";
  width: 4px;
  background: var(--accent);
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.kpi-main {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 900;
  line-height: 34px;
}

.kpi-tag {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  min-width: 68px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent);
  background: #f9fafb;
  font-size: 11px;
  font-weight: 900;
}

.kpi-note {
  margin-top: 6px;
  max-width: calc(100% - 86px);
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.3fr) minmax(300px, 0.9fr) 400px;
  grid-template-areas:
    "main main side"
    "table table insight";
  gap: 24px;
  margin-top: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.main-panel {
  grid-area: main;
  min-height: 378px;
}

.side-panel {
  grid-area: side;
  min-height: 378px;
}

.table-panel {
  grid-area: table;
  min-height: 282px;
}

.insight-panel {
  grid-area: insight;
  min-height: 282px;
}

.content.store-profile-mode .dashboard-grid {
  grid-template-columns: 1fr;
  grid-template-areas: "table";
}

.content.store-profile-mode .main-panel,
.content.store-profile-mode .side-panel,
.content.store-profile-mode .insight-panel {
  display: none;
}

.content.store-profile-mode .table-panel {
  min-height: 480px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.text-action {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 24px;
  padding: 0;
}

.text-action:hover {
  text-decoration: underline;
}

.panel-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  min-height: 220px;
}

.matrix-cell {
  position: relative;
  border: 1px solid var(--cell-line);
  border-radius: 8px;
  background: var(--cell-bg);
  padding: 18px;
}

.matrix-cell strong {
  color: var(--cell-color);
  font-size: 14px;
}

.matrix-cell p {
  max-width: 190px;
  margin: 8px 0 0;
  color: #374151;
  font-size: 12px;
  line-height: 18px;
}

.dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cell-color);
}

.matrix-point {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transform: translate(-50%, -50%);
}

.matrix-point-dot {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: var(--point-color);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.matrix-point:hover,
.matrix-point:focus-visible {
  z-index: 20;
  outline: 0;
}

.matrix-point:hover .matrix-point-dot,
.matrix-point:focus-visible .matrix-point-dot {
  transform: scale(1.35);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.95), 0 8px 22px rgba(17, 24, 39, 0.22);
}

.matrix-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 230px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--point-color);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 120ms ease;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.18);
}

.matrix-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: #fff;
  transform: translateX(-50%);
}

.matrix-point:hover .matrix-tooltip,
.matrix-point:focus-visible .matrix-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.matrix-tooltip strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}

.matrix-tooltip em {
  color: var(--point-color);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.matrix-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #f3f4f6;
  padding-top: 5px;
  font-size: 12px;
  line-height: 16px;
}

.matrix-tooltip b {
  color: var(--muted);
  font-weight: 800;
}

.matrix-tooltip i {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.matrix-empty {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: #9ca3af;
  font-size: 12px;
}

.bar-chart {
  display: flex;
  height: 210px;
  align-items: end;
  gap: 14px;
  padding: 20px 10px 0;
}

.bar-item {
  display: grid;
  min-width: 42px;
  grid-template-rows: 1fr 18px;
  justify-items: center;
  gap: 10px;
}

.bar {
  width: 22px;
  height: var(--height);
  align-self: end;
  border-radius: 4px;
  background: var(--accent);
}

.bar-label {
  color: var(--muted);
  font-size: 10px;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(120px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 10px 14px;
}

.info-row strong {
  font-size: 13px;
}

.info-row span {
  color: var(--muted);
  font-size: 12px;
}

.row-status {
  color: var(--accent);
  font-weight: 900;
}

.progress-list {
  display: grid;
  gap: 18px;
  padding-top: 4px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.progress-fill {
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: var(--accent);
}

.progress-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.data-table th {
  height: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
}

.data-table th:first-child {
  border-left: 1px solid var(--line);
  border-radius: 6px 0 0 6px;
}

.data-table th:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
}

.data-table td {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr:hover td {
  background: var(--red-soft);
}

.content.list-mode .dashboard-grid {
  grid-template-columns: 1fr;
  grid-template-areas: "main";
}

.content.list-mode .main-panel {
  min-height: 560px;
}

.content.list-mode .side-panel,
.content.list-mode .table-panel,
.content.list-mode .insight-panel {
  display: none;
}

.filter-input {
  width: 220px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  padding: 0 12px;
}

.list-table-wrap {
  overflow-x: auto;
}

.full-data-table th,
.full-data-table td {
  height: 42px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.pagination-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pagination-bar div {
  display: flex;
  gap: 10px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.task-command-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.task-command-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.task-command-actions .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  text-align: center;
}

.task-next-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.task-next-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-next-head span,
.task-next-checks span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-next-head strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 28px;
}

.task-next-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff5f5;
  color: var(--red);
  padding: 7px 12px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.task-next-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}

.task-next-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.task-next-checks div {
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

.task-next-checks strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.task-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.task-metric-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-metric-card div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-metric-card strong {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.task-metric-card span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
}

.task-metric-card em {
  color: var(--ink);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 34px;
}

.task-metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 19px;
}

.task-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.task-review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.task-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.task-review-heading strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.task-review-heading span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-align: right;
}

.task-review-card .audit-breakdown,
.task-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.task-status-list div,
.task-empty-note {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.task-status-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.task-status-list strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.task-empty-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.severity-high {
  color: var(--red);
  font-weight: 900;
}

.severity-mid {
  color: var(--amber);
  font-weight: 900;
}

.severity-good {
  color: var(--green);
  font-weight: 900;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  min-height: 84px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.insight-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.formula {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  line-height: 24px;
  padding: 18px;
}

.compact-formula {
  margin-top: 14px;
  font-size: 12px;
  line-height: 18px;
  padding: 12px;
}

.detail-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.detail-summary {
  min-height: 230px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  padding: 16px;
}

.detail-badge {
  display: inline-flex;
  width: 42px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.detail-summary strong {
  display: block;
  margin-top: 12px;
  font-size: 17px;
}

.detail-summary p {
  margin: 8px 0 0;
  color: #374151;
  font-size: 12px;
  line-height: 19px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-tile {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 12px;
}

.metric-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.metric-tile strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.score-total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  padding: 14px;
}

.score-total span,
.score-total em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.score-total strong {
  grid-row: span 2;
  color: var(--red);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.compact-list {
  gap: 10px;
  margin-top: 14px;
}

.constraint-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.constraint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  padding: 0 10px;
  font-size: 12px;
}

.correction-grid,
.execution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.correction-card {
  min-height: 100px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.correction-card span,
.strategy-card span {
  color: var(--muted);
  font-size: 12px;
}

.correction-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 22px;
}

.correction-card p,
.strategy-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.alert-strip {
  margin-top: 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  padding: 12px 14px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.timeline-step {
  position: relative;
  min-height: 112px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fafafa;
  padding: 14px;
}

.timeline-step i {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.timeline-step strong,
.timeline-step span {
  display: block;
}

.timeline-step strong {
  margin-top: 12px;
  font-size: 13px;
}

.timeline-step span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.execution-grid {
  margin-top: 16px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.strategy-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.strategy-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 15px;
  line-height: 20px;
}

.simulator {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.range-stack {
  display: grid;
  gap: 12px;
}

.range-row {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.range-row span {
  display: flex;
  justify-content: space-between;
}

.range-row input {
  width: 100%;
  accent-color: var(--red);
}

.sim-results {
  display: grid;
  gap: 10px;
}

.sim-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 12px;
}

.sim-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sim-result strong {
  display: block;
  margin-top: 8px;
  color: var(--red);
  font-size: 22px;
}

.mini-timeline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mini-timeline .timeline-step {
  min-height: 86px;
  padding: 10px;
}

.mini-timeline .timeline-step strong {
  margin-top: 8px;
  font-size: 12px;
}

.decision-card {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  padding: 18px;
}

.decision-score {
  color: var(--red);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.fact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 12px;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.fact strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.flow-rich {
  position: relative;
  min-height: 190px;
}

.flow-node {
  position: relative;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  padding: 14px;
}

.flow-node:not(:last-child)::after {
  position: absolute;
  top: 56px;
  right: -13px;
  z-index: 2;
  width: 14px;
  height: 2px;
  content: "";
  background: var(--accent);
}

.flow-node:not(:last-child)::before {
  position: absolute;
  top: 51px;
  right: -17px;
  z-index: 3;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid var(--accent);
  content: "";
}

.flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flow-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: var(--accent);
}

.flow-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.flow-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
}

.flow-node strong {
  display: block;
  margin-top: 14px;
  font-size: 14px;
}

.flow-node p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.flow-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.flow-meta span {
  color: var(--muted);
  font-size: 11px;
}

.flow-meta b {
  color: var(--accent);
  font-size: 12px;
}

.flow-output {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.flow-output div {
  min-height: 64px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  padding: 12px 14px;
}

.flow-output span,
.flow-output strong {
  display: block;
}

.flow-output span {
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 800;
}

.flow-output strong {
  margin-top: 8px;
  color: var(--red);
  font-size: 15px;
}

.region-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
}

.region-card {
  border: 1px solid var(--accent);
  border-top: 6px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
  min-height: 96px;
}

.region-card strong {
  display: block;
  font-size: 17px;
}

.region-card span {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 900;
}

.region-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.readiness-grid {
  margin-bottom: 14px;
}

.audit-grid {
  margin-bottom: 14px;
}

.source-card {
  min-height: 138px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

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

.source-card strong {
  color: var(--accent);
  font-size: 14px;
}

.source-card p {
  min-height: 54px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.source-card span {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
}

.hibo-import-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: #fff;
  margin: 14px 0;
  padding: 16px;
}

.hibo-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hibo-import-head strong,
.hibo-import-head span,
.hibo-import-head em {
  display: block;
}

.hibo-import-head strong {
  color: #111827;
  font-size: 15px;
}

.hibo-import-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.hibo-import-head em {
  min-width: 64px;
  border-radius: 999px;
  background: #fef2f2;
  color: var(--red);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 26px;
  text-align: center;
}

.hibo-import-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
}

.hibo-import-form label,
.hibo-import-check {
  display: grid;
  gap: 6px;
}

.hibo-import-form label span,
.hibo-import-check > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hibo-import-check {
  min-height: 58px;
  align-content: end;
}

.checkbox-inline {
  display: flex !important;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  padding: 0;
}

.hibo-import-form input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  padding: 0 10px;
}

.hibo-import-form input:focus {
  border-color: var(--red);
  outline: 3px solid #fee2e2;
}

.hibo-import-form .checkbox-inline input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  margin: 0 8px 0 0;
  padding: 0;
}

.hibo-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hibo-import-summary div {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 10px 12px;
}

.hibo-import-summary span,
.hibo-import-summary strong {
  display: block;
}

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

.hibo-import-summary strong {
  margin-top: 6px;
  color: #111827;
  font-size: 14px;
}

.hibo-import-error {
  margin: 0;
  border-radius: 6px;
  background: #fef2f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  padding: 10px 12px;
}

.hibo-validation {
  display: grid;
  gap: 6px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  padding: 12px;
}

.hibo-validation.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.hibo-validation.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.hibo-validation strong,
.hibo-validation span,
.hibo-validation em {
  display: block;
}

.hibo-validation strong {
  font-size: 13px;
}

.hibo-validation span,
.hibo-validation em {
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
}

.audit-card {
  min-height: 150px;
}

.audit-card em {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.audit-breakdown,
.audit-gap-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.audit-breakdown div,
.audit-gap-list div {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.audit-breakdown span,
.audit-gap-list p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.audit-breakdown strong,
.audit-gap-list strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.audit-gap-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-gap-list div {
  min-height: 92px;
  border-left: 4px solid var(--amber);
}

.audit-gap-list p {
  margin: 8px 0;
}

.audit-gap-list span {
  display: inline-flex;
  height: 22px;
  align-items: center;
  border-radius: 11px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  font-weight: 900;
  padding: 0 9px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.pipeline-node {
  position: relative;
  display: grid;
  min-height: 132px;
  gap: 7px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  padding: 12px;
}

.pipeline-node:not(:last-child)::after {
  position: absolute;
  top: 30px;
  right: -12px;
  z-index: 2;
  width: 12px;
  height: 2px;
  content: "";
  background: var(--accent);
}

.pipeline-node:not(:last-child)::before {
  position: absolute;
  top: 25px;
  right: -16px;
  z-index: 3;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid var(--accent);
  content: "";
}

.pipeline-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: var(--accent);
}

.pipeline-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.pipeline-node i {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.pipeline-node span {
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
}

.pipeline-node p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.pipeline-node b {
  align-self: end;
  color: var(--accent);
  font-size: 12px;
}

.store-profile-table td {
  vertical-align: middle;
}

.store-disabled-row {
  background: #fafafa;
  color: var(--muted);
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-form label {
  display: grid;
  gap: 6px;
}

.settings-form span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.settings-form input,
.settings-form select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 0 10px;
}

.settings-form input:focus,
.settings-form select:focus,
.scope-search:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 25, 18, 0.1);
}

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

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

.permission-grid {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.permission-item,
.scope-item {
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.permission-item {
  grid-template-columns: 18px 88px 1fr;
  gap: 10px;
  padding: 9px 10px;
}

.permission-item input,
.scope-item input {
  accent-color: var(--red);
}

.permission-item strong,
.scope-item span {
  font-size: 13px;
  font-weight: 800;
}

.permission-item span,
.scope-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
}

.scope-empty {
  border: 1px dashed #fecaca;
  border-radius: 8px;
  background: var(--red-soft);
  color: #7f1d1d;
  font-weight: 800;
  padding: 18px;
}

.scope-search {
  margin-bottom: 10px;
}

.scope-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.scope-item {
  grid-template-columns: 18px minmax(160px, 1fr) minmax(120px, 0.8fr);
  gap: 10px;
  padding: 9px 10px;
}

.selected-row {
  background: #fff7f7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
}

.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-warning {
  background: #ffedd5;
  color: #c2410c;
}

.status-sent {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-neutral {
  background: #f3f4f6;
  color: #4b5563;
}

.status-enabled {
  background: #dcfce7;
  color: #15803d;
}

.status-feedback {
  background: #e0f2fe;
  color: #0369a1;
}

.status-disabled {
  background: #fee2e2;
  color: var(--red);
}

.task-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.task-detail-modal {
  width: 100%;
  max-width: none;
  max-height: calc(100vh - 24px);
  display: grid;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
}

#task-detail-modal {
  padding: 12px;
}

.task-detail-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}

.task-detail-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.task-detail-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  padding: 10px;
}

.task-detail-summary span,
.task-detail-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-detail-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.task-detail-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.task-detail-toolbar .btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.task-feedback-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  padding: 10px 12px;
}

.task-feedback-summary strong {
  color: #1d4ed8;
  font-size: 13px;
}

.task-feedback-summary span,
.task-feedback-summary em {
  color: #315f9f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.task-detail-table-wrap {
  max-height: 48vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-detail-table {
  min-width: 1160px;
  border: 0;
  border-radius: 0;
}

.task-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.task-detail-table td:nth-child(2),
.task-detail-table td:nth-child(11) {
  min-width: 240px;
  white-space: normal;
}

.task-detail-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.38);
  padding: 24px;
}

.password-modal {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.22);
}

.modal-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0;
}

.modal-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.filter-options-wrap {
  display: grid;
  gap: 10px;
}

.filter-options-wrap[hidden] {
  display: none;
}

.filter-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.filter-options-head em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-options {
  display: grid;
  max-height: 240px;
  overflow: auto;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  padding: 8px;
}

.filter-option {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
}

.filter-option:hover,
.filter-option:focus {
  border-color: #fecaca;
  color: var(--red);
  outline: 0;
}

.filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-option small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.filter-option-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  padding: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

body.store-inbox-body {
  min-width: 0;
  background: #f7f8fa;
}

.store-inbox-shell {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.store-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

.store-inbox-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-inbox-brand img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--red);
}

.store-inbox-brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0;
}

.store-inbox-brand p,
.store-panel-head p,
.store-task-empty p,
.store-detail-head p,
.store-detail-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.store-inbox-actions,
.store-inbox-search {
  display: flex;
  gap: 10px;
}

.store-inbox-actions {
  align-items: end;
  justify-content: flex-end;
}

.store-inbox-search {
  align-items: end;
}

.store-inbox-search label {
  display: grid;
  gap: 6px;
}

.store-inbox-search span {
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}

.store-inbox-search input,
.store-item-table input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 0 10px;
}

.store-inbox-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.store-inbox-kpi,
.store-task-list-panel,
.store-task-detail-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.store-inbox-kpi {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.store-inbox-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.store-inbox-kpi strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 32px;
}

.store-inbox-kpi p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.store-inbox-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.store-task-list-panel,
.store-task-detail-panel {
  min-height: 640px;
  overflow: hidden;
}

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

.store-panel-head h2,
.store-detail-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
}

.store-task-list {
  display: grid;
  gap: 10px;
  max-height: 590px;
  overflow: auto;
  padding: 14px;
}

.store-task-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.store-task-card:hover,
.store-task-card.active {
  border-color: #fecaca;
  background: var(--red-soft);
}

.store-task-card strong {
  font-size: 14px;
}

.store-task-card p,
.store-task-card small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.store-task-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.store-task-empty strong {
  color: var(--ink);
}

.store-task-detail-panel > div:not(.store-task-empty) {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.store-detail-head,
.store-detail-actions,
.store-feedback-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.store-detail-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 12px;
}

.store-detail-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.store-detail-stats strong {
  color: var(--ink);
  font-size: 18px;
}

.store-feedback-card {
  justify-content: flex-start;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
}

.store-feedback-card span {
  color: #315f9f;
  font-size: 12px;
  font-weight: 900;
}

.store-detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.store-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.store-item-table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.store-item-table {
  min-width: 1100px;
  border: 0;
  border-radius: 0;
}

.store-item-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.store-item-table td:nth-child(2) {
  min-width: 260px;
  white-space: normal;
}

.store-item-table input {
  width: 100%;
}

@media (max-width: 920px) {
  .store-inbox-shell {
    padding: 12px;
  }

  .store-inbox-header,
  .store-inbox-actions,
  .store-inbox-search,
  .store-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .store-inbox-brand img {
    width: 48px;
    height: 48px;
  }

  .store-inbox-brand h1 {
    font-size: 20px;
    line-height: 28px;
  }

  .store-inbox-search .btn,
  .store-inbox-actions .btn,
  .store-detail-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .store-inbox-kpis,
  .store-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-inbox-layout {
    grid-template-columns: 1fr;
  }

  .store-task-list-panel,
  .store-task-detail-panel {
    min-height: auto;
  }

  .store-task-list {
    max-height: 360px;
  }

  .store-feedback-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: minmax(420px, 1fr) 360px;
    grid-template-areas:
      "main side"
      "table table"
      "insight insight";
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .detail-shell,
  .simulator {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    min-height: 0;
  }

  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-tile {
    min-height: 72px;
  }

  .metric-tile span {
    min-height: 32px;
  }

  .correction-grid,
  .execution-grid,
  .strategy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline,
  .mini-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  html,
  body {
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 16px;
  }

  .app-shell.sidebar-collapsed .brand {
    flex-direction: row;
    justify-content: flex-start;
    padding: 16px;
  }

  .app-shell.sidebar-collapsed .brand-logo {
    width: 42px;
    height: 42px;
  }

  .app-shell.sidebar-collapsed .brand-text {
    display: block;
  }

  .sidebar-footer,
  .app-shell.sidebar-collapsed .sidebar-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0 16px 14px;
  }

  .sidebar-toggle {
    width: 44px;
  }

  .nav-list {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    padding: 0 16px 14px;
  }

  .nav-item {
    min-width: 96px;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .app-shell.sidebar-collapsed .nav-list {
    padding: 0 16px 14px;
  }

  .app-shell.sidebar-collapsed .nav-item {
    min-width: 96px;
    grid-template-columns: 18px 1fr;
    justify-items: start;
    padding: 0 10px;
  }

  .app-shell.sidebar-collapsed .nav-label {
    display: inline;
  }

  .sync-card {
    display: none;
  }

  .topbar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100vw;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .topbar .user-menu {
    width: 100%;
    margin-left: 0;
  }

  .topbar .user-profile {
    width: 100%;
  }

  .topbar .user-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .content {
    width: 100%;
    max-width: 100vw;
    padding: 16px;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .filter-strip {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .filter-heading {
    min-width: 100%;
  }

  .filter-list {
    min-width: 100%;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side"
      "table"
      "insight";
    gap: 16px;
  }

  .panel {
    padding: 16px;
  }

  .panel-title {
    flex-direction: column;
    gap: 10px;
  }

  .panel-actions,
  .pagination-bar {
    width: 100%;
  }

  .panel-actions {
    flex-wrap: wrap;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .filter-input {
    width: 100%;
  }

  .flow,
  .region-map,
  .insight-grid,
  .strategy-grid,
  .correction-grid,
  .execution-grid,
  .task-command-panel,
  .task-command-actions,
  .task-next-checks,
  .task-metric-strip,
  .task-review-grid,
  .task-review-card .audit-breakdown,
  .task-status-list {
    grid-template-columns: 1fr;
  }

  .flow-node::before,
  .flow-node::after,
  .pipeline-node::before,
  .pipeline-node::after {
    display: none;
  }

  .flow-output {
    grid-template-columns: 1fr;
  }

  .matrix {
    grid-template-columns: 1fr;
  }

  .settings-form,
  .permission-item,
  .scope-item {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline,
  .mini-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
