:root {
  --bg: #f5f6f8;
  --app-bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #1f2937;
  --text-main: #1f2937;
  --muted: #697386;
  --text-muted: #697386;
  --text-soft: #94a3b8;
  --line: #dde3ea;
  --border-color: #dde3ea;
  --primary: #b91c2c;
  --primary-dark: #931827;
  --dark: #202938;
  --primary-button: #386cf3;
  --button-bg: #386cf3;
  --button-text: #ffffff;
  --green: #16734a;
  --amber: #9a5b00;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(20, 32, 50, 0.08);
  --card-bg: #ffffff;
  --panel-bg: #ffffff;
  --input-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --table-header-bg: #f6f8fb;
  --table-row-hover: rgba(148, 163, 184, .08);
  --modal-bg: #ffffff;
  --tag-bg: #eef2f6;
  --header-divider: linear-gradient(90deg, transparent, rgba(148, 163, 184, .42), transparent);
  --header-sweep: linear-gradient(90deg, transparent, rgba(56, 189, 248, .72), rgba(168, 85, 247, .58), rgba(244, 114, 182, .5), transparent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--app-bg, var(--bg));
  color: var(--text-main, var(--text));
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  transition: grid-template-columns 0.2s ease;
  overflow: hidden;
}

body.theme-aurora {
  --bg: #eef8ff;
  --app-bg: #eef8ff;
  --surface: rgba(255, 255, 255, 0.9);
  --panel-bg: rgba(255, 255, 255, 0.92);
  --card-bg: rgba(255, 255, 255, 0.9);
  --input-bg: rgba(255, 255, 255, 0.96);
  --sidebar-bg: rgba(255, 255, 255, 0.88);
  --line: rgba(167, 191, 228, .52);
  --border-color: rgba(167, 191, 228, .52);
  --modal-bg: rgba(255, 255, 255, .92);
  --table-header-bg: rgba(248, 250, 252, .92);
  --table-row-hover: rgba(125, 168, 231, .12);
  --shadow: 0 16px 42px rgba(78, 101, 148, .12);
  --header-divider: linear-gradient(90deg, transparent, rgba(154, 184, 229, .5), transparent);
  --header-sweep: linear-gradient(90deg, transparent, rgba(125, 211, 252, .82), rgba(216, 180, 254, .86), rgba(251, 207, 232, .72), transparent);
  background: radial-gradient(circle at 12% 18%, rgba(255, 248, 235, 0.95), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(196, 239, 255, 0.88), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(232, 211, 255, 0.88), transparent 36%),
    linear-gradient(120deg, #dff6ff, #f3efff, #ffeaf3, #e7fff8, #fffaf0);
  background-size: 180% 180%;
  animation: loginGradient 15s ease-in-out infinite;
}

body.theme-zen {
  --bg: #f7f4ee;
  --app-bg: #f7f4ee;
  --surface: #fffdf8;
  --surface-soft: #f4f1ea;
  --panel-bg: #fffdf8;
  --card-bg: #fffdf8;
  --input-bg: #fffefa;
  --sidebar-bg: #fbf8f1;
  --line: #ddd6c9;
  --border-color: #ddd6c9;
  --text: #2f2a25;
  --text-main: #2f2a25;
  --muted: #756d62;
  --text-muted: #756d62;
  --text-soft: #998f82;
  --primary-button: #386cf3;
  --button-bg: #386cf3;
  --button-text: #fffdf8;
  --table-header-bg: #f1ede4;
  --table-row-hover: rgba(128, 105, 78, .1);
  --modal-bg: #fffdf8;
  --tag-bg: #eee8dc;
  --shadow: 0 8px 24px rgba(78, 67, 53, .06);
  --header-divider: linear-gradient(90deg, transparent, rgba(156, 136, 106, .38), transparent);
  --header-sweep: linear-gradient(90deg, transparent, rgba(255, 253, 248, .94), rgba(217, 180, 118, .72), transparent);
}

body.theme-midnight {
  --bg: #0f141b;
  --app-bg: #0f141b;
  --surface: #1b2330;
  --surface-soft: #243041;
  --panel-bg: #1b2330;
  --card-bg: #1b2330;
  --input-bg: #243041;
  --sidebar-bg: #111821;
  --text: #f8fafc;
  --text-main: #f8fafc;
  --muted: #cbd5e1;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --line: #334155;
  --border-color: #334155;
  --primary-button: #386cf3;
  --button-bg: #386cf3;
  --button-text: #f8fafc;
  --table-header-bg: #202a38;
  --table-row-hover: rgba(148, 163, 184, .12);
  --modal-bg: #1b2330;
  --tag-bg: #243041;
  --shadow: none;
  --header-divider: linear-gradient(90deg, transparent, rgba(148, 163, 184, .42), transparent);
  --header-sweep: linear-gradient(90deg, transparent, rgba(125, 211, 252, .9), transparent);
}

body.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--dark);
}

th {
  position: relative;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  opacity: 0;
  transition: opacity .16s ease;
  z-index: 2;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .45);
  transform: translateX(-50%);
}

th:hover > .col-resizer,
th.resizing-col > .col-resizer {
  opacity: 1;
}

th.resized-col,
td.resized-col {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-col-standard {
  width: 12em;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button,
.button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--primary-button, var(--button-bg));
  color: var(--button-text);
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  filter: brightness(0.92);
}

.secondary {
  background: var(--surface-soft);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.secondary:hover {
  background: var(--table-row-hover);
}

.danger {
  background: var(--red);
}

.danger-outline {
  background: #fff1f0;
  color: var(--red);
  border: 1px solid #ffd0cc;
}

.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.icon-btn {
  width: 38px;
  padding: 0;
  background: var(--primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar {
  height: 100vh;
  padding: 18px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition: padding 0.2s ease;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
}

body.theme-aurora .sidebar,
body.theme-aurora .panel,
body.theme-aurora .dash-card,
body.theme-aurora .table-scroll,
body.theme-aurora .inventory-table-wrap {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(255,255,255,.32);
}

.sidebar.collapsed {
  padding: 18px;
}

.sidebar.collapsed .brand {
  justify-content: center;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-user {
  display: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 10px 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--panel-bg);
}

.sidebar-user strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.sidebar-user small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-soft);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

.avatar-preview-trigger img {
  display: block;
  transition: transform .18s ease;
}

.avatar-preview-trigger:hover img,
.avatar-preview-trigger:focus-visible img {
  transform: scale(1.04);
}

.avatar-preview-trigger:focus-visible {
  outline: 2px solid #4b7ff0;
  outline-offset: -2px;
}

.avatar-sm {
  width: 34px;
  height: 34px;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.avatar-xl {
  width: 118px;
  height: 118px;
  font-size: 42px;
}

.settings-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.account-settings-panel {
  max-width: 860px;
  padding: 42px 56px;
}

.account-settings-title {
  font-size: 22px;
  margin-bottom: 28px;
}

.account-settings-hero {
  align-items: center;
  gap: 28px;
  padding: 0 0 28px;
  border-bottom: 0;
}

.account-settings-hero h3 {
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-settings-hero p {
  margin-top: 6px;
  color: var(--text-main);
}

.account-settings-form {
  gap: 18px;
}

.account-settings-form h4 {
  margin-top: 12px;
  font-size: 16px;
}

.avatar-upload-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin: 8px 0 18px;
}

.avatar-upload-preview {
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
}

.avatar-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-user-card h3 {
  margin-bottom: 4px;
}

.created-account-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-soft);
}

.account-center-card {
  width: min(980px, calc(100vw - 40px));
  display: grid;
  gap: 18px;
}

#account-center-password-form {
  grid-template-columns: 1fr;
}

.account-center-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.account-center-head h3 {
  margin-bottom: 4px;
}

.account-center-head p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
}

.system-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.system-stats div,
.system-panel {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--panel-bg);
}

.system-stats strong {
  display: block;
  font-size: 26px;
}

.system-stats span {
  color: var(--text-muted);
  font-size: 13px;
}

.system-grid {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(520px, 1.15fr);
  gap: 16px;
}

.user-admin-view {
  --user-admin-blue: #5275f4;
  --user-admin-purple: #765ee9;
  --user-admin-green: #35a76f;
  --user-admin-red: #dc5966;
  --user-admin-text: #182230;
  --user-admin-muted: #667085;
  --user-admin-border: #e2e8f0;
  min-width: 0;
}

.user-admin-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.user-admin-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0 0;
}

.user-admin-intro p {
  margin: 0;
  color: var(--user-admin-muted);
  font-size: 14px;
  line-height: 1.7;
}

.user-admin-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #416ff2, #6b5cf0);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: none;
}

.user-admin-add:hover {
  background: linear-gradient(135deg, #3766e8, #604fdf);
  box-shadow: none;
}

.user-admin-add svg,
.user-summary-icon svg,
.user-directory-toolbar svg,
.user-more-button svg,
.user-pagination svg,
.user-aside-heading svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.user-admin-primary {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.user-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.user-summary-card {
  --summary-accent: #5275f4;
  --summary-soft: rgba(82, 117, 244, .12);
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 110px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--summary-accent) 20%, #e4e9f1);
  border-radius: 12px;
  background:
    radial-gradient(circle at 8% 105%, color-mix(in srgb, var(--summary-accent) 13%, transparent) 0 28%, transparent 29%),
    linear-gradient(135deg, color-mix(in srgb, var(--summary-accent) 7%, #fff) 0%, #fff 70%);
  box-shadow: none;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, background-color 180ms ease-out;
}

.user-summary-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--summary-soft);
  pointer-events: none;
}

.user-summary-card:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--summary-accent) 48%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--summary-accent) 8%, transparent);
}

.user-summary-card.admin {
  --summary-accent: #8a68df;
  --summary-soft: rgba(138, 104, 223, .11);
}

.user-summary-card.operator {
  --summary-accent: #38aa72;
  --summary-soft: rgba(56, 170, 114, .11);
}

.user-summary-card.assistant {
  --summary-accent: #2b9fb1;
  --summary-soft: rgba(43, 159, 177, .11);
}

.user-summary-card.boss {
  --summary-accent: #c48b32;
  --summary-soft: rgba(196, 139, 50, .11);
}

.user-summary-card.viewer {
  --summary-accent: #668ad2;
  --summary-soft: rgba(102, 138, 210, .11);
}

.user-summary-card.inactive {
  --summary-accent: #db6470;
  --summary-soft: rgba(219, 100, 112, .10);
}

.user-summary-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--summary-accent) 13%, #fff);
  color: var(--summary-accent);
}

.user-summary-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.user-summary-copy {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
}

.user-summary-copy strong {
  color: var(--user-admin-text);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.user-summary-copy span {
  margin-top: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.user-summary-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--user-admin-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-directory {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.user-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(145px, .54fr) minmax(145px, .54fr) auto auto;
  gap: 10px;
  align-items: center;
}

.user-search-field,
.user-filter-field {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--user-admin-border);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
}

.user-search-field {
  gap: 9px;
  padding: 0 13px;
}

.user-search-field svg {
  flex: 0 0 19px;
}

.user-search-field input,
.user-filter-field select,
.user-pagination select {
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--user-admin-text);
  box-shadow: none;
}

.user-search-field input {
  width: 100%;
}

.user-filter-field {
  padding-left: 12px;
}

.user-filter-field span {
  flex: 0 0 auto;
  padding-right: 10px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}

.user-filter-field select {
  width: 100%;
  padding-right: 28px;
  font-weight: 700;
}

.user-search-field:focus-within,
.user-filter-field:focus-within {
  border-color: rgba(82, 117, 244, .48);
  box-shadow: 0 0 0 3px rgba(82, 117, 244, .08);
}

.user-bulk-menu {
  position: relative;
  min-width: 132px;
}

.user-bulk-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--user-admin-border);
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.user-bulk-menu summary::-webkit-details-marker {
  display: none;
}

.user-bulk-menu.is-disabled {
  pointer-events: none;
  opacity: .52;
}

.user-bulk-menu[open] summary {
  border-color: rgba(82, 117, 244, .42);
}

.user-bulk-menu-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 150px;
  padding: 6px;
  border: 1px solid var(--user-admin-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
}

.user-bulk-menu-panel button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 10px;
  background: transparent;
  color: #344054;
  font-size: 13px;
}

.user-bulk-menu-panel button:hover {
  background: #f4f6fa;
}

.user-bulk-menu-panel button.danger {
  color: #d1434f;
}

.user-bulk-menu-panel button.danger:hover {
  background: rgba(220, 53, 69, .08);
}

.user-clear-filters {
  min-height: 42px;
  padding: 0 8px;
  background: transparent;
  color: #667085;
  font-size: 13px;
}

.user-clear-filters:hover {
  background: transparent;
  color: #315fcf;
}

.user-table-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--user-admin-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.user-table-shell:hover {
  border-color: #d6deea;
  box-shadow: 0 0 0 3px rgba(82, 117, 244, .035);
}

.user-table-scroll {
  min-width: 0;
  overflow-x: auto;
}

.user-admin-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #344054;
  font-size: 13px;
}

.user-admin-table th:nth-child(1) { width: 38px; }
.user-admin-table th:nth-child(2) { width: 58px; }
.user-admin-table th:nth-child(3) { width: 135px; }
.user-admin-table th:nth-child(4) { width: 115px; }
.user-admin-table th:nth-child(5) { width: 145px; }
.user-admin-table th:nth-child(6) { width: 105px; }
.user-admin-table th:nth-child(7) { width: 86px; }
.user-admin-table th:nth-child(8) { width: 150px; }
.user-admin-table th:nth-child(9) { width: 225px; }

.user-admin-table th {
  height: 48px;
  padding: 0 11px;
  border-bottom: 1px solid var(--user-admin-border);
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.user-admin-table td {
  height: 72px;
  padding: 9px 11px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  vertical-align: middle;
  white-space: nowrap;
}

.user-admin-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.user-admin-table tbody tr:hover td {
  background: #fbfcff;
}

.user-admin-table tbody tr.is-selected td {
  background: #f7f9ff;
}

.user-select-cell {
  width: 38px;
  text-align: center !important;
}

.user-select-cell input {
  width: 16px;
  height: 16px;
  accent-color: var(--user-admin-blue);
}

.user-list-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(82, 117, 244, .12);
  color: #4c5fc7;
  font-size: 15px;
  font-weight: 850;
}

.user-list-avatar.tone-0 { background: #eef0ff; color: #665bd6; }
.user-list-avatar.tone-1 { background: #eaf4ff; color: #3e70c5; }
.user-list-avatar.tone-2 { background: #e9f7ef; color: #31885d; }
.user-list-avatar.tone-3 { background: #fff3e8; color: #ba6b31; }
.user-list-avatar.tone-4 { background: #f8edff; color: #8552bd; }
.user-list-avatar.tone-5 { background: #eef3f8; color: #536c89; }

.user-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-identity {
  display: grid;
  gap: 4px;
  min-width: 135px;
}

.user-identity strong {
  overflow: hidden;
  color: var(--user-admin-text);
  font-size: 13px;
  text-overflow: ellipsis;
}

.user-identity small {
  color: #7b8799;
  font-size: 11px;
}

.user-account-id {
  padding: 0;
  background: transparent;
  color: #344054;
  font-family: inherit;
  font-size: 13px;
}

.user-role-badge,
.user-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.user-role-badge.admin {
  background: #f0ebff;
  color: #6941c6;
}

.user-role-badge.operator {
  background: #e8f7ef;
  color: #218257;
}

.user-role-badge.viewer {
  background: #edf3fb;
  color: #4b6b91;
}

.user-status-badge.active {
  background: #e9f8ef;
  color: #238457;
}

.user-status-badge.inactive {
  background: #fff0f1;
  color: #cb3f4c;
}

.user-status-badge.locked {
  background: #fff0f1;
  color: #c93643;
  cursor: help;
}

.user-status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.user-login-time {
  color: #526174;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.user-actions-heading {
  text-align: right !important;
}

.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.user-action-button,
.user-more-button {
  min-height: 32px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.user-action-button {
  padding: 0 10px;
}

.user-action-button:hover,
.user-more-button:hover {
  border-color: #cbd5e1;
  background: #f7f9fc;
}

.user-action-button.warning {
  border-color: rgba(220, 53, 69, .22);
  color: #d1434f;
}

.user-action-button.warning:hover {
  background: rgba(220, 53, 69, .06);
}

.user-action-button.success {
  border-color: rgba(53, 167, 111, .24);
  color: #26865a;
}

.user-action-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.user-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 0;
}

.user-more-button svg {
  width: 17px;
  height: 17px;
}

.user-empty-state {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 190px;
  color: var(--user-admin-muted);
}

.user-empty-state strong {
  color: var(--user-admin-text);
  font-size: 14px;
}

.user-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 15px;
  border-top: 1px solid var(--user-admin-border);
  color: #667085;
  font-size: 12px;
}

.user-pagination {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-pagination button,
.user-pagination strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  color: #53657c;
}

.user-pagination strong {
  border-color: #7c91ff;
  color: #315fcf;
}

.user-pagination button:disabled {
  opacity: .4;
}

.user-pagination svg {
  width: 16px;
  height: 16px;
}

.user-pagination label {
  display: flex;
  align-items: center;
  width: 110px;
  height: 36px;
  margin: 0 0 0 8px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.user-pagination select {
  width: 100%;
  height: 32px;
  padding: 0 24px 0 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.user-pagination .system-control,
.user-pagination .system-control-trigger {
  width: 110px;
  min-width: 110px;
  height: 36px;
  min-height: 36px;
}
.user-pagination .system-control-trigger {
  gap: 6px;
  padding: 0 10px;
  border-color: #dfe5ee;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}
.user-pagination .system-control-chevron {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

/* Shared table pagination reuses the existing system-user footer component. */
.hw-standard-table-footer {
  --user-admin-border: #e2e8f0;
  width: 100%;
  background: #fff;
}

.hw-standard-table-footer .user-pagination {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.hw-standard-table-footer .user-pagination label,
.hw-standard-table-footer .user-pagination .system-control,
.hw-standard-table-footer .user-pagination .system-control-trigger {
  width: 110px;
  min-width: 110px;
}

.user-admin-aside {
  display: grid;
  gap: 16px;
}

.user-aside-card {
  padding: 18px;
  border: 1px solid var(--user-admin-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.user-aside-card:hover {
  border-color: #d4dce8;
  box-shadow: 0 0 0 3px rgba(82, 117, 244, .035);
}

.user-aside-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.user-aside-heading h3 {
  margin: 0;
  color: var(--user-admin-text);
  font-size: 15px;
}

.user-aside-heading > span {
  color: #3e6ddd;
  font-size: 11px;
  font-weight: 800;
}

.user-aside-heading svg {
  color: #44536a;
}

.permission-note {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #eff2f6;
}

.permission-note:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.permission-note > i {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #668ad2;
}

.permission-note.admin > i { background: #8065df; }
.permission-note.operator > i { background: #39aa72; }

.permission-note strong {
  color: #344054;
  font-size: 12px;
}

.permission-note p {
  margin: 4px 0 0;
  color: #7b8799;
  font-size: 11px;
  line-height: 1.65;
}

.recent-user-list {
  display: grid;
  gap: 4px;
  max-height: 276px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.recent-user-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 5px 0;
}

.recent-user-item .user-list-avatar {
  width: 36px;
  height: 36px;
}

.recent-user-item > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recent-user-item strong {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-user-item small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7b8799;
  font-size: 10px;
}

.recent-user-item small i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35a76f;
}

.recent-user-item time {
  color: #7b8799;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.user-aside-empty {
  padding: 20px 0;
  color: #98a2b3;
  font-size: 12px;
  text-align: center;
}

.user-action-menu {
  position: fixed;
  z-index: 5000;
  display: grid;
  width: 176px;
  padding: 6px;
  border: 1px solid var(--user-admin-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .14);
}

.user-action-menu.hidden {
  display: none;
}

.user-action-menu button {
  justify-content: flex-start;
  min-height: 35px;
  padding: 0 10px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  text-align: left;
}

.user-action-menu button:hover {
  background: #f5f7fa;
}

.user-action-menu button.danger {
  color: #d1434f;
}

.user-action-menu button.danger:hover {
  background: rgba(220, 53, 69, .08);
}

.user-action-menu-separator {
  height: 1px;
  margin: 4px 5px;
  background: #edf1f5;
}

.user-access-dialog {
  width: min(720px, calc(100vw - 40px));
  max-width: none;
  overflow: hidden;
}

.user-access-dialog > .user-access-dialog-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  max-height: min(80vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 26px 20px;
}

.user-dialog-kicker {
  color: #6f65d8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.user-access-dialog-card h3 {
  margin: 4px 0 18px;
}

.user-dialog-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f9fc;
}

.user-dialog-identity > div:last-child {
  display: grid;
  gap: 3px;
}

.user-dialog-identity strong {
  color: var(--user-admin-text);
}

.user-dialog-identity small {
  color: #7b8799;
}

.user-dialog-details {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
}

.user-dialog-details > div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f5;
}

.user-dialog-details dt {
  color: #7b8799;
  font-size: 12px;
}

.user-dialog-details dd {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.6;
}

body.square-cards .user-summary-card,
body.square-cards .user-search-field,
body.square-cards .user-filter-field,
body.square-cards .user-table-shell,
body.square-cards .user-aside-card,
body.square-cards .user-admin-add {
  border-radius: 0;
}

body.card-shadow-enabled .user-summary-card,
body.card-shadow-enabled .user-table-shell,
body.card-shadow-enabled .user-aside-card {
  box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
}

@media (max-width: 1439px) {
  .user-admin-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-admin-aside {
    display: none;
  }
}

@media (min-width: 1440px) {
  .user-table-scroll {
    overflow-x: hidden;
  }
}

@media (max-width: 1080px) {
  .user-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-directory-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(150px, .6fr) minmax(150px, .6fr);
  }

  .user-bulk-menu,
  .user-clear-filters {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .user-admin-intro {
    align-items: flex-start;
  }

  .user-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-directory-toolbar {
    display: flex;
    flex-wrap: wrap;
  }

  .user-search-field {
    flex: 1 0 100%;
  }

  .user-filter-field {
    flex: 1 1 180px;
  }

  .user-table-footer {
    align-items: flex-start;
    gap: 12px;
    padding-block: 12px;
  }
}

@media (max-width: 520px) {
  .user-admin-intro {
    display: grid;
  }

  .user-admin-add {
    justify-self: start;
  }

  .user-summary-grid {
    grid-template-columns: 1fr;
  }

  .user-summary-card {
    min-height: 100px;
  }

  .user-filter-field {
    flex-basis: 100%;
  }

  .user-table-footer {
    display: grid;
  }

  .user-pagination label {
    display: none;
  }
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.editor-toolbar label {
  width: auto;
  min-height: 34px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"] {
  width: auto;
  min-height: 34px;
  height: 34px;
}

.editor-toolbar button {
  min-width: 42px;
  justify-content: center;
}

.editor-toolbar button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.editor-toolbar input[type="color"] {
  width: 42px;
  min-width: 42px;
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  cursor: pointer;
}

.editor-toolbar input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-toolbar input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.editor-toolbar input[type="file"] {
  width: 160px;
  height: auto;
  min-height: 0;
}

.rich-editor {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-main);
  overflow: auto;
}

.rich-editor img,
.login-popup-card img,
.notification-body img {
  max-width: 100%;
  border-radius: 8px;
}

.notification-card {
  width: min(1120px, calc(100vw - 48px));
  height: min(76vh, 760px);
  padding: 24px 28px;
  gap: 16px;
  overflow: hidden;
}

.notification-card h3 {
  margin: 0;
  font-size: 24px;
}

.notification-list {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--panel-bg);
}

.notification-item {
  border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 100px 64px minmax(0, 1fr) 168px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
}

.notification-row:hover {
  background: var(--table-row-hover);
  transform: none;
  filter: none;
}

.notification-row strong {
  display: block;
  min-width: 0;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-row time {
  color: var(--text-muted);
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

.notice-type,
.notice-read-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.notice-type {
  color: #1d4ed8;
  background: #dbeafe;
}

.notice-read-state {
  color: #4c5b70;
  background: #eef2f6;
}

.notification-item.unread .notice-read-state {
  color: #9a3412;
  background: #fed7aa;
}

.notification-item.unread .notification-row strong::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 999px;
  background: #dc2626;
}

.notification-body {
  margin: 0 16px 14px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-main);
}

.notification-collapse {
  width: 34px;
  height: 28px;
  min-height: 28px;
  margin: 12px auto 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text-muted);
}

.notification-collapse:hover {
  color: var(--text-main);
  background: var(--table-row-hover);
  transform: translateY(-1px);
}

.notification-body h4 {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 18px;
}

.login-popup-card {
  width: min(680px, calc(100vw - 40px));
  animation: popupEnter .22s ease;
}

@keyframes popupEnter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-crop-card {
  width: min(440px, calc(100vw - 40px));
}

#avatar-crop-canvas {
  width: 320px;
  height: 320px;
  max-width: 100%;
  border-radius: 12px;
  cursor: grab;
  justify-self: center;
}

#batch-crop-canvas {
  width: 320px;
  height: 320px;
  max-width: 100%;
  border-radius: 12px;
  cursor: grab;
  justify-self: center;
  background: #f4f7fb;
  border: 1px solid var(--line);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}

button:disabled {
  background: #e5e7eb;
  color: #7b8494;
  border-color: #d1d5db;
  filter: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
}

.brand p,
.eyebrow,
.muted,
small,
.panel-head p,
.list-head p {
  color: var(--muted);
  font-size: 13px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.menu::-webkit-scrollbar {
  width: 6px;
}

.menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .32);
  border-radius: 999px;
}

.menu::-webkit-scrollbar-track {
  background: transparent;
}

.menu-group {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.menu-title,
.menu-group-head {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px 4px;
}

.menu-group-head {
  width: 100%;
  min-height: 34px;
  justify-content: space-between;
  background: transparent;
  color: var(--text-main);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0;
  padding: 6px 8px;
}

.menu-group-head:hover {
  background: var(--table-row-hover);
  filter: none;
}

.menu-group-head svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.menu-group.collapsed .menu-group-head .menu-chevron {
  transform: rotate(-90deg);
}

.menu-group.collapsed .menu-group-items {
  display: none;
}

.menu-group-items {
  display: grid;
  gap: 4px;
}

.menu-item {
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: var(--text-muted);
}

.menu-group-items .menu-item {
  padding-left: 18px;
}

.menu-item.active {
  background: var(--table-row-hover);
  color: var(--primary);
  font-weight: 700;
}

.menu-item:hover {
  background: var(--table-row-hover);
  filter: none;
}

.settings-menu {
  gap: 8px;
  color: var(--text-main);
  font-weight: 800;
}

.settings-menu svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-menu-wrap {
  position: relative;
  flex: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.settings-popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: var(--shadow);
  z-index: 30;
}

.settings-popover-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.settings-popover-user strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.settings-popover-user small {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.settings-popover button {
  justify-content: flex-start;
  gap: 8px;
  background: transparent;
  color: var(--text-main);
}

.settings-popover button:hover {
  background: var(--table-row-hover);
}

.settings-popover button.danger-logout,
.settings-tabs button.danger-logout {
  color: #dc3545;
}

.settings-popover button.danger-logout:hover,
.settings-tabs button.danger-logout:hover {
  background: rgba(220, 53, 69, .08);
  color: #c72f3d;
}

.danger-logout svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-tabs button.danger-logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(220, 53, 69, .04);
}

.must-password-dot {
  display: none;
  position: relative;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.must-password-dot:hover::after,
.must-password-dot:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #182230;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
}

.password-section-title {
  display: flex;
  align-items: center;
}

body.needs-password-change .settings-menu::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

body.needs-password-change .must-password-dot {
  display: inline-flex;
}

[data-system-admin-only].hidden {
  display: none !important;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 64px !important;
}

.password-input-wrap .password-visibility {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: auto;
  min-width: 44px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 12px;
  box-shadow: none;
}

.password-input-wrap .password-visibility:hover {
  background: #eef2f7;
  color: #344054;
}

.password-guidance {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  background: #f8fafc;
}

.password-strength-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.password-strength-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  flex: 1;
}

.password-strength-track i {
  height: 5px;
  border-radius: 999px;
  background: #e4e7ec;
}

.password-guidance[data-strength="weak"] .password-strength-track i:first-child { background: #dc3545; }
.password-guidance[data-strength="medium"] .password-strength-track i:nth-child(-n+2) { background: #f59e0b; }
.password-guidance[data-strength="strong"] .password-strength-track i { background: #16a34a; }
.password-guidance[data-strength="weak"] .password-strength-label { color: #dc3545; }
.password-guidance[data-strength="medium"] .password-strength-label { color: #b45309; }
.password-guidance[data-strength="strong"] .password-strength-label { color: #15803d; }

.password-rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  color: #667085;
  font-size: 12px;
}

.password-rule-list span::before {
  content: "○";
  margin-right: 6px;
}

.password-rule-list span.is-valid {
  color: #15803d;
}

.password-rule-list span.is-valid::before { content: "✓"; }

.security-reminder-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.security-reminder-card {
  width: min(460px, calc(100vw - 32px));
  text-align: center;
}

.security-reminder-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff1f2;
  color: #dc3545;
  font-size: 24px;
  font-weight: 800;
}

.security-reminder-card p {
  margin: 10px 0 22px;
  color: #475467;
  line-height: 1.7;
}

.user-admin-loading {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}

.user-admin-loading span {
  height: 110px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 50%, #eef2f6 75%);
  background-size: 200% 100%;
  animation: user-admin-skeleton 1.4s ease-in-out infinite;
}

@keyframes user-admin-skeleton { to { background-position: -200% 0; } }

.page-load-error {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 28px;
  padding: 56px 24px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.page-load-error p { color: #667085; }

@media (prefers-reduced-motion: reduce) {
  .user-admin-loading span { animation: none; }
}

.main {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  padding: 24px;
}

body.theme-midnight input,
body.theme-midnight select,
body.theme-midnight textarea,
body.theme-midnight .settings-popover,
body.theme-midnight th,
body.theme-midnight td,
body.theme-midnight .secondary {
  background: #242b35;
  color: var(--text);
  border-color: var(--line);
}

.page-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 52px;
  margin: -4px 0 28px;
  padding-bottom: 14px;
  overflow: hidden;
}

.page-head::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--header-divider);
}

.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20%;
  height: 1px;
  background: var(--header-sweep);
  animation: headerLineSweep 7s ease-in-out infinite;
}

@keyframes headerLineSweep {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: .85; }
  85% { opacity: .85; }
  100% { transform: translateX(520%); opacity: 0; }
}

.page-head > div:first-child {
  min-height: 42px;
  display: grid;
  align-content: center;
}

#page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-icon-btn,
.refresh-icon-btn {
  background: #ffffff;
  color: #202938;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.top-icon-btn svg,
.refresh-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-icon-btn:hover,
.refresh-icon-btn:hover {
  background: #ffffff;
  color: #111827;
  filter: none;
  box-shadow: none;
  border-color: rgba(148, 163, 184, .7);
}

#top-search-btn {
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(115,192,232,.96), rgba(174,139,238,.92), rgba(244,161,198,.86), rgba(115,192,232,.96)) border-box;
  background-size: 100% 100%, 320% 320%;
  animation: topSearchBorder 7s ease-in-out infinite;
}

#top-search-btn:hover {
  border-color: transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(115,192,232,1), rgba(174,139,238,.98), rgba(244,161,198,.92), rgba(115,192,232,1)) border-box;
  background-size: 100% 100%, 320% 320%;
}

@keyframes topSearchBorder {
  0%, 100% {
    background-position: 0 0, 0% 50%;
    color: #202938;
  }
  50% {
    background-position: 0 0, 100% 50%;
    color: #202938;
  }
}

.top-user-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-color);
}

.top-user-btn:hover {
  background: var(--table-row-hover);
  filter: none;
}

.avatar-xs {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

#top-notify-btn {
  position: relative;
}

body.has-unread-notifications #top-notify-btn::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.16);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel,
.settings-panel,
.table-scroll,
.inventory-table-wrap {
  background: var(--panel-bg);
}

.theme-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  cursor: pointer;
}

.theme-card:has(input:checked) {
  border-color: var(--primary-button);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.theme-card input {
  width: 16px;
  height: 16px;
}

.settings-panel {
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid #eceef3;
  border-radius: 0;
  padding: 32px;
}

.app-segmented-tabs {
  --segmented-track: #eef2f6;
  --segmented-border: #e4e9f1;
  --segmented-text: #667085;
  --segmented-hover-text: #344054;
  --segmented-active: #ffffff;
  --segmented-active-text: #2563eb;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--segmented-border);
  border-radius: 999px;
  background: var(--segmented-track);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  scrollbar-width: none;
}

.app-segmented-tabs::-webkit-scrollbar {
  display: none;
}

.app-segmented-tabs > button {
  flex: 1 1 0;
  min-width: max-content;
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--segmented-text);
  box-shadow: none;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out;
}

.app-segmented-tabs > button:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--segmented-hover-text);
}

.app-segmented-tabs > button:focus {
  outline: 0;
}

.app-segmented-tabs > button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.app-segmented-tabs > button.active,
.app-segmented-tabs > button[aria-selected="true"] {
  background: var(--segmented-active);
  color: var(--segmented-active-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.10);
}

.settings-tabs.app-segmented-tabs {
  width: min(100%, 980px);
  margin-bottom: 18px;
}

/* Settings content follows the same readable measure as its tab bar. */
.settings-section {
  width: min(100%, 980px);
}
.settings-section .settings-panel,
.settings-section .account-settings-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.settings-tabs.app-segmented-tabs > button {
  flex: 1 0 110px;
  min-height: 42px;
  padding-inline: 14px;
}

.settings-tabs.app-segmented-tabs > button.danger-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: #dc3545;
}

.settings-tabs.app-segmented-tabs > button.danger-logout:hover {
  background: rgba(220, 53, 69, 0.08);
  color: #c72f3d;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.option-manager,
.option-list-inner {
  display: grid;
  gap: 12px;
}

.option-group {
  padding: 14px 0;
  border-bottom: 1px solid #eceef3;
}

.option-group-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.option-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.option-add-line,
.option-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.option-add-line {
  margin-bottom: 10px;
  width: 100%;
}

.option-add-line input {
  flex: 1;
  min-width: 220px;
}

.option-edit-row input {
  width: min(360px, 100%);
}

.about-page {
  display: grid;
  gap: 18px;
  width: min(100%, 1320px);
  padding: 0 0 28px;
  color: #182230;
  line-height: 1.6;
}

.about-hero,
.about-info-card,
.about-license-card {
  border: 1px solid #e4eaf3;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.about-hero {
  position: relative;
  min-height: 344px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.96), rgba(255,255,255,0) 38%),
    linear-gradient(118deg, #f9fbff 0%, #f1f5ff 48%, #edf0ff 100%);
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 88%, rgba(92, 127, 255, .10), transparent 25%),
    radial-gradient(circle at 55% 15%, rgba(180, 151, 255, .12), transparent 32%);
  pointer-events: none;
}

.about-hero-content {
  position: relative;
  z-index: 2;
  width: 53%;
  max-width: 650px;
  padding: 36px 30px 34px 38px;
}

.about-eyebrow {
  margin: 0 0 17px;
  color: #6b7ea7;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .16em;
}

.about-product-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-product-mark {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(137, 118, 255, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(241, 234, 255, .98), rgba(212, 222, 255, .92));
  color: #6965e8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 24px rgba(104, 101, 232, .10);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.08em;
}

.about-product-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.about-product-name-row h2 {
  margin: 0;
  color: #172033;
  font-size: clamp(27px, 2vw, 34px);
  line-height: 1.16;
  letter-spacing: -.03em;
}

.about-version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid rgba(101, 96, 228, .12);
  border-radius: 999px;
  background: rgba(108, 102, 231, .09);
  color: #625fda;
  font-size: 12px;
  font-weight: 850;
}

.about-product-slogan {
  display: block;
  margin-top: 7px;
  color: #4f5d75;
  font-size: 14px;
  font-weight: 750;
}

.about-product-description {
  max-width: 590px;
  margin: 25px 0 0;
  color: #526078;
  font-size: 14px;
  line-height: 1.9;
}

.about-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.about-hero-actions button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(100, 116, 139, .18);
  border-radius: 10px;
  background: rgba(255,255,255,.76);
  color: #46536a;
  box-shadow: none;
  cursor: not-allowed;
  font-weight: 800;
  opacity: .82;
}

.about-hero-actions button span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .08);
  color: #7d83a3;
  font-size: 10px;
  font-weight: 800;
}

.about-hero-visual {
  position: absolute;
  inset: 0 0 0 34%;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.about-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f8faff 0%, rgba(248,250,255,.88) 11%, rgba(248,250,255,0) 38%);
}

.about-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .94;
  user-select: none;
}

.about-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-info-card {
  min-width: 0;
  padding: 24px;
}

.about-info-card header,
.about-license-card {
  display: flex;
  align-items: center;
}

.about-info-card header {
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf0f5;
}

.about-info-card h3,
.about-license-card h3 {
  margin: 0;
  color: #1d2939;
  font-size: 17px;
  font-weight: 850;
}

.about-card-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #f0f4ff;
  color: #6475ca;
}

.about-card-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-ai-workspace-icon {
  width: 19px;
  height: 19px;
  display: block;
  background: currentColor;
  -webkit-mask: url("/assets/ui-icons/ai-workspace.svg?v=20260826-chat-ai") center / contain no-repeat;
  mask: url("/assets/ui-icons/ai-workspace.svg?v=20260826-chat-ai") center / contain no-repeat;
}

.about-info-card dl {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.about-info-card dl > div {
  display: grid;
  grid-template-columns: minmax(88px, .8fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px dashed #edf0f5;
}

.about-info-card dl > div:last-child {
  border-bottom: 0;
}

.about-info-card dt {
  color: #7a869a;
  font-size: 12px;
}

.about-info-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.about-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #18b77a;
  box-shadow: 0 0 0 4px rgba(24, 183, 122, .10);
}

.about-team-note {
  margin: 17px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(110deg, #f7f8ff, #f2f7ff);
  color: #69758b;
  font-size: 12px;
}

.about-license-card {
  position: relative;
  gap: 18px;
  min-height: 126px;
  padding: 24px 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 50%, rgba(129, 140, 248, .13), transparent 26%),
    linear-gradient(112deg, #fff 0%, #fafbff 58%, #f1f5ff 100%);
}

.about-license-card::after {
  content: "";
  position: absolute;
  right: 6%;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(117, 126, 225, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(117, 126, 225, .035), 0 0 0 48px rgba(117, 126, 225, .025);
  pointer-events: none;
}

.about-license-symbol {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: 16px;
  background: linear-gradient(145deg, #eef0ff, #e5ecff);
  color: #6669d9;
  font-size: 24px;
  font-weight: 900;
}

.about-license-card p {
  margin: 5px 0 0;
  color: #637087;
  font-size: 13px;
}

body.card-shadow-enabled .about-hero,
body.card-shadow-enabled .about-info-card,
body.card-shadow-enabled .about-license-card {
  box-shadow: 0 8px 24px rgba(28, 44, 77, .07);
}

body.square-cards .about-hero,
body.square-cards .about-info-card,
body.square-cards .about-license-card,
body.square-cards .about-product-mark,
body.square-cards .about-card-icon,
body.square-cards .about-license-symbol {
  border-radius: 0;
}

body.theme-midnight .about-page {
  color: #e8edf7;
}

body.theme-midnight .about-hero,
body.theme-midnight .about-info-card,
body.theme-midnight .about-license-card {
  border-color: rgba(148, 163, 184, .18);
  background-color: #111827;
}

body.theme-midnight .about-hero-content {
  text-shadow: 0 1px 0 rgba(255,255,255,.04);
}

body.theme-midnight .about-product-name-row h2,
body.theme-midnight .about-info-card h3,
body.theme-midnight .about-license-card h3 {
  color: #f2f5fb;
}

body.theme-midnight .about-product-slogan,
body.theme-midnight .about-product-description,
body.theme-midnight .about-info-card dd,
body.theme-midnight .about-license-card p {
  color: #c3ccda;
}

body.theme-midnight .about-info-card header,
body.theme-midnight .about-info-card dl > div {
  border-color: rgba(148, 163, 184, .14);
}

@media (max-width: 1100px) {
  .about-hero-content {
    width: 62%;
  }

  .about-hero-visual {
    inset: 0 0 0 38%;
    opacity: .68;
  }

  .about-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-info-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .about-page {
    gap: 14px;
  }

  .about-hero {
    min-height: 0;
  }

  .about-hero-content {
    width: 100%;
    max-width: none;
    padding: 26px 22px 180px;
  }

  .about-hero-visual {
    inset: auto 0 0 0;
    height: 230px;
    opacity: .62;
  }

  .about-hero-visual::after {
    background: linear-gradient(180deg, #f8faff 0%, rgba(248,250,255,.45) 28%, rgba(248,250,255,0) 66%);
  }

  .about-product-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .about-product-description {
    margin-top: 20px;
  }

  .about-hero-actions {
    flex-wrap: wrap;
  }

  .about-info-grid {
    grid-template-columns: 1fr;
  }

  .about-info-card:last-child {
    grid-column: auto;
  }

  .about-info-card,
  .about-license-card {
    padding: 20px;
  }

  .about-license-card {
    align-items: flex-start;
  }
}

.narrow {
  max-width: 760px;
  margin-bottom: 18px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.form-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section h4 {
  margin-bottom: 12px;
  font-size: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  color: #526075;
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--text-main);
}

textarea {
  width: 100%;
  min-height: 120px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--input-bg);
  color: var(--text-main);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(185, 28, 44, 0.16);
  border-color: var(--primary);
}

.field-error input,
.field-error select {
  border-color: var(--red);
  background: #fff7f7;
}

.error-text {
  color: var(--red);
  font-weight: 600;
}

.simple-form {
  display: grid;
  gap: 14px;
}

.inline-form,
.upload-form,
.form-actions,
.head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.page-head .head-actions {
  flex-wrap: nowrap;
}

.inline-form input {
  max-width: 320px;
}

.tags {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.option-row input {
  min-height: 34px;
}

.option-row button:disabled {
  opacity: 0.45;
  cursor: default;
}

.calc-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.calc-strip span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: #4d5b70;
  font-size: 13px;
}

.form-actions {
  margin-top: 18px;
}

.import-box {
  display: grid;
  gap: 14px;
}

.result-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  line-height: 1.7;
}

.inventory-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-metrics article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inventory-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.inventory-metrics strong {
  font-size: 24px;
}

.inventory-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: calc(100vh - 320px);
  min-height: 360px;
}

.inventory-table {
  min-width: 1420px;
}

.inventory-table th,
.inventory-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
  width: 52px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) {
  width: 150px;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
  width: 150px;
}

.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4) {
  width: 300px;
}

.wide-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.inventory-badge.safe {
  background: #dcfce7;
  color: var(--green);
}

.inventory-badge.need {
  background: #fef3c7;
  color: var(--amber);
}

.inventory-badge.urgent {
  background: #fecaca;
  color: var(--red);
}

.inventory-badge.nosales {
  background: #e5e7eb;
  color: #4c5b70;
}

.help-dot,
.sort-link {
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf1f5;
  color: #2e3a4d;
  font-size: 12px;
}

.sort-link {
  border-radius: 4px;
  font-weight: 700;
}

.unmatched-list {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.inventory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-actions select {
  width: 130px;
}

/* Inventory import workspace */
#inventory-import { padding-bottom:24px; }
.inventory-import-page { display:grid; gap:20px; }
.inventory-import-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:stretch; }
.inventory-import-group { min-height:580px; padding:24px; border:1px solid #e4ebf3; border-radius:22px; background:#eef3f8; }
.inventory-import-group-title { display:flex; align-items:center; gap:12px; margin:0 0 20px 6px; }
.inventory-import-group-title h3 { margin:0; font-size:20px; color:#182230; }
.inventory-import-group-title > .asset-icon { width:25px; height:25px; color:#3478ea; }
.inventory-import-sales-group .inventory-import-group-title > .asset-icon { color:#0d9a9a; }
.inventory-import-card-list { display:grid; gap:16px; }
.inventory-import-card { --import-tone:#3478ea; --import-soft:#edf3ff; display:grid; gap:15px; padding:20px 22px; border:1px solid rgba(226,232,240,.95); border-radius:20px; background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.025); }
.inventory-import-card.tone-green { --import-tone:#45b65b; --import-soft:#eefaf0; }
.inventory-import-card.tone-teal { --import-tone:#0b9fa0; --import-soft:#eafafa; }
.inventory-import-card.tone-orange { --import-tone:#ff881e; --import-soft:#fff3e8; }
.inventory-import-card.tone-purple { --import-tone:#7b4fe5; --import-soft:#f3efff; }
.inventory-import-copy h4 { margin:0 0 6px; font-size:17px; color:#182230; }
.inventory-import-copy p { margin:0; color:#667085; font-size:13px; line-height:1.55; }
.inventory-import-card-body { display:grid; grid-template-columns:74px minmax(0,1fr); gap:18px; align-items:center; }
.inventory-import-card-icon { display:grid; place-items:center; width:64px; height:64px; border-radius:14px; background:var(--import-soft); color:var(--import-tone); }
.inventory-import-card-icon .asset-icon { width:34px; height:34px; }
.inventory-import-controls { display:grid; gap:8px; min-width:0; }
.inventory-file-drop { position:relative; display:flex; align-items:center; justify-content:center; gap:7px; min-height:45px; padding:6px 14px; overflow:hidden; border:1.5px dashed color-mix(in srgb,var(--import-tone) 42%,#d9e2ee); border-radius:9px; background:color-mix(in srgb,var(--import-soft) 32%,#fff); color:#667085; font-size:12px; cursor:pointer; transition:border-color .18s ease,background .18s ease; }
.inventory-file-drop:hover,.inventory-file-drop.is-dragover { border-color:var(--import-tone); background:var(--import-soft); }
.inventory-file-drop > .asset-icon { width:18px; height:18px; color:#64748b; }
.inventory-file-drop strong { color:var(--import-tone); }
.inventory-file-drop input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.inventory-file-name { display:none; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--import-tone); font-size:12px; font-weight:700; }
.inventory-file-drop.has-file > span:not(.asset-icon),.inventory-file-drop.has-file > strong { display:none; }
.inventory-file-drop.has-file .inventory-file-name { display:block; }
.inventory-import-controls button[type="submit"] { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:38px; border:0; border-radius:7px; background:var(--import-tone); color:#fff; font-size:13px; font-weight:700; box-shadow:none; }
.inventory-import-controls button[type="submit"]:hover { filter:brightness(1.04); }
.inventory-import-controls button[type="submit"] .asset-icon { width:16px; height:16px; }
.inventory-import-result-panel { padding:20px 22px; border:1px solid #dde6f0; border-radius:18px; background:#fff; }
.inventory-import-result-panel > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:16px; }
.inventory-import-result-panel h3 { display:flex; align-items:center; gap:10px; margin:0 0 5px; font-size:19px; color:#182230; }
.inventory-import-result-panel h3 .asset-icon { width:23px; height:23px; color:#7357e8; }
.inventory-import-result-panel header p { margin:0; color:#7b8798; font-size:12px; }
.inventory-result-legend { display:flex; align-items:center; gap:25px; padding-top:6px; color:#667085; font-size:12px; }
.inventory-result-legend span::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; vertical-align:1px; background:#3478ea; }
.inventory-result-legend .success::before { background:#2dc27e; }.inventory-result-legend .failed::before { background:#f65d6a; }.inventory-result-legend .unmatched::before { background:#f5a623; }
#inventory-import-result.result-box { min-height:118px; margin:0; padding:0; overflow:auto; border:1px dashed #dbe4ef; border-radius:13px; background:linear-gradient(110deg,#fbfdff,#f8f9ff); }
.inventory-result-empty { min-height:116px; display:flex; align-items:center; justify-content:center; gap:18px; color:#667085; }
.inventory-result-empty-art { width:120px; height:72px; object-fit:contain; pointer-events:none; user-select:none; }
.inventory-result-empty strong { display:block; margin-bottom:7px; color:#475467; font-size:15px; }
.inventory-result-empty p { margin:0; font-size:12px; }

@media (max-width:1100px) {
  .inventory-import-groups { grid-template-columns:1fr; }
  .inventory-import-group { min-height:0; }
}
@media (max-width:680px) {
  .inventory-import-group { padding:16px; border-radius:16px; }
  .inventory-import-card { padding:17px; }
  .inventory-import-card-body { grid-template-columns:1fr; }
  .inventory-import-card-icon { display:none; }
  .inventory-import-result-panel > header { flex-direction:column; }
  .inventory-result-legend { gap:14px; flex-wrap:wrap; }
}

.counter {
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(120px, 170px));
  gap: 10px;
  margin-bottom: 16px;
}

#product-list .panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#product-list .filters {
  grid-template-columns: minmax(220px, 1fr) repeat(auto-fit, minmax(140px, 170px));
  max-width: 100%;
  min-width: 0;
}

#inventory-status .filters {
  grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(110px, 160px));
}

.product-groups {
  --product-group-columns: 34px 70px minmax(120px, .85fr) minmax(180px, 1.35fr) minmax(96px, .66fr) minmax(92px, .66fr) minmax(120px, .85fr) 88px 86px 86px minmax(210px, .95fr);
  --product-child-columns: 70px minmax(120px, .85fr) minmax(120px, .9fr) minmax(180px, 1.35fr) minmax(82px, .55fr) minmax(82px, .55fr) minmax(108px, .72fr) 88px 84px minmax(210px, .95fr);
  display: grid;
  gap: 10px;
  height: auto;
  min-height: auto;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding-right: 2px;
}

.group-header {
  display: grid;
  grid-template-columns: var(--product-group-columns);
  gap: 8px;
  align-items: center;
  padding: 12px;
  color: #5b687b;
  font-size: 13px;
  font-weight: 700;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  min-width: 1168px;
  box-sizing: border-box;
}

.group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  min-width: 1168px;
  max-width: 100%;
  box-sizing: border-box;
}

.group-summary {
  display: grid;
  grid-template-columns: var(--product-group-columns);
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: #fbfcfd;
  cursor: pointer;
  transition: background .16s ease;
}

.group-summary:hover,
.child-row:hover {
  background: var(--table-row-hover);
}

.group-header > *,
.group-summary > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-header > :nth-child(2),
.group-summary > :nth-child(2),
.group-header > :nth-child(8),
.group-summary > :nth-child(8),
.group-header > :nth-child(9),
.group-summary > :nth-child(9),
.group-header > :nth-child(10),
.group-summary > :nth-child(10) {
  justify-self: center;
  text-align: center;
}

.group-header > :nth-child(3),
.group-summary > :nth-child(3),
.group-header > :nth-child(4),
.group-summary > :nth-child(4),
.group-header > :nth-child(5),
.group-summary > :nth-child(5),
.group-header > :nth-child(6),
.group-summary > :nth-child(6),
.group-header > :nth-child(7),
.group-summary > :nth-child(7) {
  justify-self: start;
  text-align: left;
}

.group-header > :last-child,
.group-summary > :last-child {
  justify-self: stretch;
  text-align: center;
  overflow: visible;
}

.group-summary > :last-child {
  justify-content: center;
}

.expand-btn {
  width: 30px;
  min-height: 30px;
  padding: 0;
  background: #edf1f5;
  color: #2e3a4d;
}

.summary-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
}

.children {
  border-top: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}

.child-grid-table {
  width: 100%;
  min-width: 1128px;
  box-sizing: border-box;
}

.product-child-grid {
  display: grid;
  grid-template-columns: var(--product-child-columns);
  gap: 8px;
  align-items: center;
}

.child-header {
  min-height: 48px;
  padding: 10px 12px;
  background: var(--table-header-bg);
  color: #5b687b;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.child-row {
  min-height: 82px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .16s ease;
}

.child-header > *,
.child-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-header > :nth-child(1),
.child-row > :nth-child(1),
.child-header > :nth-child(5),
.child-row > :nth-child(5),
.child-header > :nth-child(6),
.child-row > :nth-child(6),
.child-header > :nth-child(8),
.child-row > :nth-child(8),
.child-header > :nth-child(9),
.child-row > :nth-child(9) {
  justify-self: center;
  text-align: center;
}

.child-header > :last-child,
.child-row > :last-child {
  justify-self: stretch;
  text-align: center;
  overflow: visible;
}

.sku-expand {
  width: 28px;
  min-height: 28px;
}

.sku-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 12px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-inventory-cell {
  color:#16885a;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.sku-detail div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.sku-detail span {
  color: var(--muted);
  font-size: 12px;
}

.sku-detail strong {
  font-size: 13px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  table-layout: fixed;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  background: var(--table-header-bg);
  color: var(--text-muted);
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.children table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed !important;
}

.children th:nth-child(1),
.children td:nth-child(1) { width: 66px; min-width: 66px; max-width: 66px; }
.children th:nth-child(2),
.children td:nth-child(2) { width: 145px; min-width: 145px; max-width: 145px; }
.children th:nth-child(3),
.children td:nth-child(3) { width: 126px; min-width: 126px; max-width: 126px; }
.children th:nth-child(4),
.children td:nth-child(4) { width: 12em; min-width: 12em; max-width: 12em; }
.children th:nth-child(5),
.children td:nth-child(5) { width: 92px; min-width: 92px; max-width: 92px; }
.children th:nth-child(6),
.children td:nth-child(6) { width: 92px; min-width: 92px; max-width: 92px; }
.children th:nth-child(7),
.children td:nth-child(7) { width: 126px; min-width: 126px; max-width: 126px; }
.children th:nth-child(8),
.children td:nth-child(8) { width: 90px; min-width: 90px; max-width: 90px; }
.children th:nth-child(9),
.children td:nth-child(9) { width: 220px; min-width: 220px; max-width: 220px; }

.children th:nth-child(1),
.children td:nth-child(1),
.children th:nth-child(5),
.children td:nth-child(5),
.children th:nth-child(6),
.children td:nth-child(6),
.children th:nth-child(8),
.children td:nth-child(8) {
  text-align: center;
}

.children th:nth-child(9),
.children td:nth-child(9) {
  text-align: center;
}

.children td {
  overflow: hidden;
  text-overflow: ellipsis;
  height: 82px;
  vertical-align: middle;
}

.children th {
  height: 48px;
}

.children .child-row .row-actions {
  height: 100%;
  width: 100%;
}

.children td.row-actions {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
}

.children td.row-actions button {
  margin-left: 6px;
}

.children td.row-actions button:first-child {
  margin-left: 0;
}

.children .sku-detail-row td {
  height: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #e8f6ee;
  color: var(--green);
}

.badge.warn {
  background: #fff2d9;
  color: var(--amber);
}

.badge.neutral {
  background: #eef2f6;
  color: #4c5b70;
}

.hidden {
  display: none !important;
}

.empty,
.empty-line {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

#command-dialog::backdrop {
  background: rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog-card,
.command-card {
  position: relative;
}

.dialog-card {
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  display: grid;
  gap: 14px;
  color: var(--text-main);
  background: var(--modal-bg);
}

dialog .account-center-card {
  width: min(944px, calc(100vw - 48px));
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: 24px 28px;
  gap: 18px;
}

dialog .notification-card {
  width: min(1056px, calc(100vw - 56px));
  height: min(53vh, 532px);
  padding: 22px 28px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

#widget-dialog .dialog-card {
  width: min(760px, calc(100vw - 48px));
}

#purchase-import-dialog .dialog-card,
#shipment-import-dialog .dialog-card {
  width: min(720px, calc(100vw - 48px));
}

.dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  z-index: 2;
  cursor: pointer;
}

.dialog-x:hover {
  background: #eef2f6;
  color: var(--text);
}

.dialog-x svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.wide-dialog {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.export-dialog-card {
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.export-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 12px 0 8px;
}

.export-check-list,
.export-field-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.export-check-list label,
.export-field-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.export-check-list input,
.export-field-list input {
  width: auto;
  min-height: auto;
}

.formula-popover {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.refresh-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .28s ease;
}

.refresh-icon-btn:hover svg {
  transform: rotate(90deg);
}

.refresh-icon-btn.is-refreshing svg {
  animation: refreshSpin .8s linear infinite;
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

#toast {
  position: fixed;
  left: 50%;
  top: 22px;
  max-width: 460px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #1e5b7a;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: 0.2s ease;
  z-index: 12000;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast.info {
  background: #25637f;
}

#toast.success {
  background: #19705c;
}

#toast.error {
  background: var(--red);
}

@media (max-width: 1180px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    height: 100vh;
  }

  .grid-two,
  .form-grid,
  .filters,
  .inventory-metrics,
  .import-grid,
  .option-row,
  .group-header,
  .group-summary {
    grid-template-columns: 1fr;
  }

  .group-summary {
    align-items: start;
  }
}

body.auth-pending .sidebar,
body.auth-pending .main,
body.login-locked .sidebar,
body.login-locked .main {
  display: none;
}

.login-screen {
  display: none;
}

body.auth-pending .login-screen {
  display: none;
}

body.login-locked .login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  grid-template-rows: 156px auto;
  align-content: center;
  row-gap: 38px;
  background: radial-gradient(circle at 12% 18%, rgba(255, 248, 235, 0.95), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(196, 239, 255, 0.88), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(232, 211, 255, 0.88), transparent 36%),
    linear-gradient(120deg, #dff6ff, #f3efff, #ffeaf3, #e7fff8, #fffaf0);
  background-size: 180% 180%;
  animation: loginGradient 15s ease-in-out infinite;
}

@keyframes loginGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-card {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 18px;
  padding: 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  justify-self: center;
  align-self: start;
}

.login-welcome {
  align-self: end;
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  text-align: center;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: 1.15;
  font-weight: 720;
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  color: rgba(23, 34, 51, 0.86);
  text-shadow: 0 12px 36px rgba(255, 255, 255, 0.72);
  transition: opacity 0.36s ease, transform 0.36s ease;
}

.login-welcome.changing {
  opacity: 0;
  transform: translateY(10px);
}

.login-card h1 {
  font-size: 26px;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.58);
}

.login-card p {
  color: rgba(31, 41, 55, 0.72);
}

.login-card button {
  background: #202938;
  border-radius: 0;
}

.password-wrap,
.login-input-wrap {
  position: relative;
  margin: 0;
}

.password-wrap input,
.login-input-wrap input {
  width: 100%;
  padding-left: 42px;
  padding-right: 46px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8494;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.login-field-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-wrap button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  filter: none;
}

.password-wrap button:hover {
  background: rgba(123, 132, 148, .12);
  filter: none;
}

.password-eye {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7b8494;
}

.password-eye svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye-open {
  display: none;
}

#toggle-password.is-visible .eye-open {
  display: inline-flex;
}

#toggle-password.is-visible .eye-closed {
  display: none;
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(31, 41, 55, 0.7);
}

#login-error {
  min-height: 18px;
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.stats-grid article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.stats-grid article span {
  color: var(--muted);
  font-size: 13px;
}

.stats-grid article strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

.dash-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.dash-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px 0 2px;
}

.dashboard-hero h2 {
  font-size: 34px;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.widget-S,
.widget-M,
.widget-L,
.widget-XL {
  height: 392px;
}

.widget-S { grid-column: span 3; }
.widget-M { grid-column: span 4; }
.widget-L { grid-column: span 6; }
.widget-XL { grid-column: span 12; }

.widget {
  min-height: 0;
  overflow: hidden;
}

.widget .dash-list {
  flex: 1;
  overflow: hidden;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 242px;
}

.widget .dash-list button:nth-of-type(n+6) {
  display: none;
}

.widget-grid.editing .widget {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(90deg, rgba(115,192,232,.98), rgba(174,139,238,.94), rgba(244,161,198,.9), rgba(115,192,232,.98)) border-box;
  background-size: 100% 100%, 360% 360%;
  animation: searchGlow 16s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(168, 216, 255, .18), var(--shadow);
}

.edit-mode-label {
  color: var(--muted);
  font-size: 14px;
}

.widget-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 32px;
  align-items: center;
}

.add-widget {
  grid-column: span 4;
  height: 392px;
  display: grid;
  gap: 10px;
  place-content: center;
  justify-items: center;
  border: 1px dashed var(--line);
  background: rgba(255,255,255,.35);
  color: var(--muted);
  font-size: 44px;
  line-height: 1;
}

.add-widget span {
  font-size: 14px;
  line-height: 1.2;
}

.global-search {
  height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)) padding-box,
    linear-gradient(90deg, rgba(115,192,232,.98), rgba(174,139,238,.94), rgba(244,161,198,.9), rgba(255,255,255,.96), rgba(115,192,232,.98)) border-box;
  background-size: 100% 100%, 360% 360%;
  animation: searchGlow 16s ease-in-out infinite;
  box-shadow: 0 12px 34px rgba(112, 126, 180, .14);
  cursor: pointer;
}

.search-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #62748d;
}

.search-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-search:hover,
.global-search:focus-within {
  box-shadow: 0 0 0 4px rgba(168, 216, 255, .34), 0 14px 38px rgba(112, 126, 180, .17);
}

@keyframes searchGlow {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
}

.global-search strong {
  color: var(--muted);
  font-weight: 500;
}

.global-search kbd {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #64748b;
}

.quick-actions,
.dash-card-head,
.dash-metrics {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-actions {
  margin-top: 0;
  align-items: center;
}

.quick-actions button,
.quick-actions-wrap > button,
.icon-edit {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  align-items: center;
}

.icon-edit {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 6px;
}

.icon-edit svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover,
.icon-edit:hover,
.expand-btn:hover,
.help-dot:hover,
.sort-link:hover,
.thumb-btn:hover {
  background: #e7edf4;
  cursor: pointer;
}

.dash-card-head {
  justify-content: space-between;
  min-height: 30px;
  margin-top: 0;
  margin-bottom: 12px;
}

.widget > h3 {
  min-height: 30px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
}

.widget > h3 + .dash-metrics {
  margin-top: 0;
}

.dash-card-head button,
.dash-list button,
.dash-metrics button {
  background: var(--surface-soft);
  color: var(--text-main);
}

.dash-metrics button {
  flex: 1;
  min-width: 132px;
  min-height: 78px;
  display: grid;
  gap: 4px;
}

.dash-metrics strong {
  font-size: 24px;
}

.dash-list {
  display: grid;
  gap: 8px;
  flex: 1;
  align-content: start;
}

.dash-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  overflow: hidden;
  text-align: left;
  justify-items: stretch;
}

.dash-list .dash-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: start;
  overflow: hidden;
}

.dash-list .dash-text > span {
  display: block;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.dash-list .biz-badge,
.biz-badge,
.badge {
  flex: 0 0 auto;
  justify-self: end;
  max-width: max-content;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
}

.dash-footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.dash-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: auto;
  padding-top: 12px;
}

.dash-card-foot button {
  min-height: 36px;
  background: var(--primary-button);
  color: #fff;
}

.business-dialog-card {
  width: min(860px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  overflow: auto;
}

.business-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Unified business workspace language */
.business-workspace {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 190px);
}
.business-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.business-summary-card {
  position: relative;
  min-height: 106px;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.9));
}
.business-summary-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -36px;
  width: 120px;
  height: 80px;
  border-radius: 50%;
  background: currentColor;
  opacity: .07;
}
.business-summary-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: currentColor;
}
.business-summary-card strong { display:block; font-size: 26px; line-height: 1; color: #182230; font-variant-numeric: tabular-nums; }
.business-summary-card h4 { margin: 7px 0 0; font-size: 13px; color: #344054; }
.business-summary-card p { margin: 4px 0 0; color: #98a2b3; font-size: 11px; }
.business-summary-card.tone-blue { color: #3976e8; background: linear-gradient(135deg,#f5f8ff,#eaf1ff); }
.business-summary-card.tone-orange { color: #ea8a27; background: linear-gradient(135deg,#fffaf1,#fff2df); }
.business-summary-card.tone-cyan { color: #20a3b2; background: linear-gradient(135deg,#f0fcfd,#e4f7f7); }
.business-summary-card.tone-green { color: #2ca874; background: linear-gradient(135deg,#f2fcf7,#e6f8ee); }
.business-summary-card.tone-red { color: #e25569; background: linear-gradient(135deg,#fff6f7,#ffebee); }
.business-data-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid #e4e9f1;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}
.business-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.business-card-kicker { display:inline-flex; align-items:center; gap:9px; color:#182230; font-size:18px; font-weight:800; }
.business-card-kicker .ui-line-icon { color:#4b76d9; }
.business-card-head p { margin: 5px 0 0; color:#7d8ba1; font-size:12px; }
.ui-line-icon { width: 19px; height: 19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto; }
.add-action-button, .excel-action-button { display:inline-flex; align-items:center; gap:7px; }
.excel-action-button { color:#188a62; border-color:#bfe5d5; background:#f4fcf8; }
.excel-action-button:hover { color:#11704f; border-color:#86d0b1; background:#e9f8f0; }
.add-action-button .ui-line-icon, .excel-action-button .ui-line-icon { width:17px; height:17px; }
.business-search-field { position:relative; display:flex; align-items:center; margin:0; }
.business-search-field .ui-line-icon { position:absolute; left:12px; color:#98a2b3; pointer-events:none; }
.business-search-field input { padding-left:39px; }
.business-filters { align-items:center; padding: 2px 0; }
.business-table-shell { flex:1; min-height: 280px; background:#fff; }
.business-data-card .table-counter { margin-top:auto; padding-top:2px; color:#7d8ba1; font-size:13px; }

/* Shared glass treatment for business, purchase, shipment and profit dialogs. */
.business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
#profit-dialog .dialog-card,
#profit-center-dialog .dialog-card,
#profit-rule-dialog .dialog-card,
#profit-exclusion-dialog .dialog-card {
  width: min(1040px, calc(100vw - 48px));
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.78);
  background: linear-gradient(140deg, rgba(255,255,255,.96), rgba(248,251,255,.88));
  box-shadow: 0 24px 70px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.business-dialog-head { display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid rgba(226,232,240,.8); }
.business-dialog-head h3 { margin:0; }
.business-dialog-head p { margin:4px 0 0; color:#7d8ba1; font-size:12px; }
.business-dialog-mark { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; color:#3976e8; background:#eaf1ff; }
.business-dialog-mark svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.business-dialog-card .business-form-grid { gap:16px 18px; padding-top:6px; }
.business-dialog-card label, .purchase-dialog-card label, .shipment-dialog-card label { color:#526075; }
.business-dialog-card input, .business-dialog-card select, .business-dialog-card textarea,
.purchase-dialog-card input, .purchase-dialog-card select, .purchase-dialog-card textarea,
.shipment-dialog-card input, .shipment-dialog-card select, .shipment-dialog-card textarea { border-radius:9px; background:rgba(255,255,255,.8); }
.business-dialog-card .dialog-actions, .purchase-dialog-card .dialog-actions, .shipment-dialog-card .dialog-actions { position:sticky; bottom:-1px; margin:8px -18px -18px; padding:14px 18px; border-top:1px solid rgba(226,232,240,.8); background:rgba(255,255,255,.84); backdrop-filter:blur(10px); }

/* Product creation and import visual hierarchy */
#add-product .grid-two { align-items:stretch; }
#add-product #product-form, #add-product .grid-two > .panel { border-radius:16px; border-color:#e4e9f1; }
#add-product .grid-two > .panel:last-child { background:linear-gradient(145deg,#f2fcf7,#e6f8ef); border-color:#c8ebda; }
#add-product .form-section { padding:18px 0 0; margin-top:18px; border-top:1px solid #e8edf3; }
#add-product .form-section h4 { display:flex; align-items:center; gap:9px; font-size:17px; color:#182230; }
#add-product .form-section h4::before { content:""; width:8px; height:8px; border-radius:3px; background:#3d78e6; box-shadow:0 0 0 5px rgba(61,120,230,.10); }
#add-product .form-section:nth-of-type(2) h4::before { background:#16a777; box-shadow:0 0 0 5px rgba(22,167,119,.10); }
#add-product .form-section:nth-of-type(3) h4::before { background:#e4953b; box-shadow:0 0 0 5px rgba(228,149,59,.10); }
#add-product .form-section:nth-of-type(2) .form-grid label:nth-child(n+5):nth-child(-n+7) { background:#f4fbf7; border:1px solid #d7eee2; padding:8px; border-radius:8px; }
#add-product .form-section:nth-of-type(2) .form-grid label:nth-child(n+8):nth-child(-n+10) { background:#fff9f1; border:1px solid #f5e4cb; padding:8px; border-radius:8px; }
.import-box { padding:16px; border:1px solid #cbe9da; border-radius:13px; background:rgba(255,255,255,.72); }
.import-box .button-link { display:flex; align-items:center; justify-content:center; min-height:44px; border-color:#b9decf; color:#17875f; background:#fff; }
.import-box .upload-form { display:grid; gap:12px; margin-top:12px; padding:20px; border:1px dashed #9bd7ba; border-radius:12px; background:rgba(255,255,255,.7); }
.import-box .upload-form button { background:#168b62; }

/* Profile and account settings use the same two-column personal center language. */
.account-settings-panel { padding:28px 34px; }
.account-settings-hero { padding:20px; margin:0 -6px 20px; border:1px solid #d7e3f7; border-radius:16px; background:linear-gradient(135deg,#f3f8ff,#edf1ff); }
.account-settings-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px 20px; }
.account-settings-form > label, .account-settings-form > small, .account-settings-form > .avatar-upload-row, .account-settings-form > h4, .account-settings-form > .password-guidance, .account-settings-form > button { grid-column:1 / -1; }
.account-center-card { width:min(1040px,calc(100vw - 48px)); max-height:min(88vh,900px); grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; padding:28px; border-radius:20px; }
.account-center-head { grid-column:1 / -1; padding:12px 0 20px; border-bottom:0; }
.account-center-head .avatar-lg { width:104px; height:104px; }
#account-center-profile-form, #account-center-avatar-form, #account-center-password-form { padding:18px; border:1px solid #e4e9f1; border-radius:15px; background:rgba(255,255,255,.74); }
#account-center-profile-form { grid-column:1; }
#account-center-avatar-form { grid-column:2; display:flex; flex-direction:column; gap:14px; }
#account-center-avatar-form .profile-primary-action { margin-top:auto; }
[data-display-name-hint] { color:#7a8699; font-size:12px; font-weight:400; }
#account-center-password-form { grid-column:1 / -1; }

/* System dual-pane editors and notification center */
.system-grid { align-items:stretch; gap:18px; }
.system-panel { border-radius:16px; border-color:#e4e9f1; background:rgba(255,255,255,.9); }
.system-panel h3 { font-size:18px; margin-bottom:14px; }
.system-panel .editor-toolbar { padding:8px; border:1px solid #e4e9f1; border-radius:10px; background:#f8fafc; }
.notification-collapse { transform:none; }
.notification-collapse:hover { transform:none; }
.notification-collapse .ui-line-icon { width:16px; height:16px; }

@media (max-width: 1100px) {
  .business-overview { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .business-summary-card { min-height:92px; }
}
@media (max-width: 760px) {
  .business-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .business-card-head { flex-direction:column; }
  .business-form-grid { grid-template-columns:1fr; }
  .business-dialog-card, .purchase-dialog-card, .shipment-dialog-card { width:min(100vw - 20px,680px); }
  .account-center-card { grid-template-columns:1fr; width:calc(100vw - 20px); padding:18px; }
  .account-center-head, #account-center-profile-form, #account-center-avatar-form, #account-center-password-form { grid-column:1; }
  .account-settings-form { grid-template-columns:1fr; }
}

.business-dialog-card textarea {
  min-height: 120px;
  resize: vertical;
}

.span-full,
.business-items,
.form-actions {
  grid-column: 1 / -1;
}

.span-2 {
  grid-column: span 2;
}

.business-items {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.item-picker {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
}

.business-filters {
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
}

.table-scroll {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-scroll table,
.inventory-table-wrap table,
.export-check-list table,
.business-table {
  table-layout: auto;
  min-width: max-content;
}

.table-scroll th,
.inventory-table-wrap th,
.children th,
.business-table th {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.table-scroll td,
.business-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table th,
.business-table td {
  min-width: 120px;
}

.business-table th:last-child,
.business-table td:last-child {
  min-width: 150px;
}

.table-scroll thead th,
.inventory-table-wrap thead th,
.profit-data-table thead th,
.profit-table-wrap.fixed-height thead th,
.data-table thead th,
.business-table thead th,
.export-check-list thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f6f8fb;
  box-shadow: inset 0 -1px 0 var(--line);
}

.hidden,
[hidden] {
  display: none !important;
}

.purchase-stats {
  margin: 14px 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.purchase-stats article {
  box-shadow: none;
}

.purchase-filters {
  grid-template-columns: minmax(240px, 1fr) 170px 190px 170px auto;
  align-items: end;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 8px 0 12px;
  border-bottom: 1px solid var(--line);
}

.status-tabs button {
  position: relative;
  background: transparent;
  color: var(--text);
  border: 0;
  min-height: 42px;
  padding: 0 2px;
  border-radius: 0;
  font-weight: 700;
  box-shadow: none;
}

.status-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, #73c0e8, #ae8bee, #f4a1c6);
  transition: transform .22s ease;
}

.status-tabs button:hover::after {
  transform: scaleX(.55);
}

.status-tabs button.active {
  background: transparent;
  color: var(--text);
}

.status-tabs button.active::after {
  transform: scaleX(1);
}

.profit-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profit-workspace-card,
.panel-like {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  margin-top: 14px;
}

.profit-report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--text-muted);
}

.profit-report-meta strong {
  color: var(--text-main);
  font-size: 18px;
}

.profit-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profit-mini-grid article {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.profit-mini-grid span,
.profit-source-card small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.profit-mini-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text-main);
  font-size: 22px;
}

.profit-operation-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.62);
  backdrop-filter: blur(8px);
}

.profit-operation-loading.is-visible {
  display: flex;
}

.profit-operation-loading-card {
  min-width: 320px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 28px 30px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
  color: #172033;
}

.profit-operation-loading-card strong {
  display: block;
  margin-top: 14px;
  font-size: 18px;
}

.profit-operation-loading-card p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.profit-operation-spinner {
  --loader-thickness: 9px;
  position: relative;
  display: inline-block;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.profit-operation-spinner::before,
.profit-loading-orbit::before,
.button-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 205deg, #d9f7ff 0%, #cfeeff 28%, #d8e5ff 62%, #d4dcff 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--loader-thickness)), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--loader-thickness)), #000 0);
}

.profit-operation-spinner::after,
.profit-loading-orbit::after,
.button-spinner::after {
  content: "";
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: linear-gradient(135deg, #4380ff, #356bf4);
  box-shadow: 0 1px 2px rgba(47, 101, 232, .12);
  animation: homera-loader-orbit 1.15s linear infinite;
}

.profit-operation-spinner::after {
  top: 1px;
  left: 14px;
  width: 26px;
  height: 14px;
  transform-origin: 13px 26px;
}

@keyframes homera-loader-orbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .profit-operation-spinner::after,
  .profit-loading-orbit::after,
  .button-spinner::after { animation-duration: 2.4s; }
  .profit-center-card .geometry-wave,
  .profit-center-card .geometry-ring,
  .profit-center-card .geometry-dots { animation: none; }
}

.profit-preview-grid {
  margin-top: 14px;
}

.profit-wizard {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.profit-wizard-step {
  min-width: 142px;
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 8px 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  position: relative;
}

.profit-wizard-step span {
  position: absolute;
  left: 10px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-bg);
  color: var(--text-main);
  font-size: 12px;
}

.profit-wizard-step small {
  color: var(--text-soft);
  font-size: 12px;
}

.profit-wizard-step.current {
  color: var(--button-text);
  background: var(--button-bg);
  border-color: transparent;
}

.profit-wizard-step.current small,
.profit-wizard-step.current span {
  color: var(--button-text);
}

.profit-wizard-step.done {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .08);
  color: var(--text-main);
}

.profit-wizard-step.error {
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .08);
}

.profit-wizard-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 16px 0 24px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}

.profit-flow-step {
  min-width: 132px;
  flex: 1 0 132px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 12px;
  position: relative;
  text-align: center;
}

.profit-flow-step::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 0;
  top: 21px;
  height: 2px;
  background: var(--border-color);
  transform: translateX(50%);
  z-index: 0;
}

.profit-flow-step:last-child::after {
  display: none;
}

.profit-flow-step.done::after {
  background: linear-gradient(90deg, var(--button-bg), rgba(16, 185, 129, .6));
}

.profit-flow-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.profit-flow-step.current .profit-flow-index {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: var(--button-text);
}

.profit-flow-step.done .profit-flow-index {
  background: rgba(16, 185, 129, .14);
  border-color: rgba(16, 185, 129, .45);
  color: #059669;
}

.profit-flow-step.error .profit-flow-index {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .45);
  color: #dc2626;
}

.profit-flow-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 0;
}

.profit-flow-text strong,
.profit-flow-text small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.profit-flow-text small {
  color: var(--text-soft);
  font-size: 12px;
}

.profit-step-panel {
  margin-top: 14px;
  padding: 24px;
}

.profit-step-title {
  margin-bottom: 22px;
}

.profit-step-title h4 {
  margin: 0 0 8px;
}

.profit-step-title p {
  margin: 0;
  color: var(--text-muted);
}

.profit-report-filters {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) 180px 180px 150px;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 16px 0 20px;
}

.profit-report-filters input,
.profit-report-filters select,
.profit-report-filters button {
  width: 100%;
  min-width: 0;
}

.profit-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 18px;
}

.profit-report-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 22px;
  border-radius: var(--card-radius, 8px);
  display: grid;
  gap: 18px;
  cursor: pointer;
  min-height: 268px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* SaaS sidebar navigation */
body {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  width: 260px;
  padding: 20px 12px 14px;
  overflow: visible;
  z-index: 100;
  transition: width .2s ease, padding .2s ease, transform .2s ease;
}

.brand {
  min-height: 64px;
  gap: 8px;
  padding: 4px 4px 0 8px;
  align-items: flex-start;
}

.brand-text {
  order: 1;
  min-width: 0;
  padding-top: 2px;
}

.brand-text h1 {
  white-space: nowrap;
  color: var(--text-main);
  font-size: 20px;
  line-height: 1.25;
}

.brand-text p {
  margin-top: 3px;
  white-space: nowrap;
  font-size: 12px;
}

#toggle-sidebar {
  order: 2;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  align-items: flex-start;
  padding-top: 1px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
}

#toggle-sidebar:hover {
  background: #f3f4f6;
  filter: none;
}

#toggle-sidebar svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.menu {
  gap: 2px;
  padding: 2px 0;
}

.menu-group {
  position: relative;
  gap: 2px;
  margin-top: 0;
}

.menu-group-head,
.menu-item {
  position: relative;
  min-height: 44px;
  border-radius: 8px;
}

.menu-group-head {
  justify-content: flex-start;
  gap: 14px;
  padding: 0 10px;
  min-height: 52px;
  font-size: 16px;
  font-weight: 800;
}

.menu-home .menu-item {
  gap: 14px;
  padding: 0 10px;
  min-height: 52px;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
}

.menu-module-icon,
.settings-menu > .menu-settings-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  overflow: visible;
}

.menu-group-head .menu-module-icon {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  stroke-width: 1.8;
}

.menu-home .menu-module-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.settings-menu > .menu-settings-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.menu-group-head .menu-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
}

.menu-group-items {
  gap: 2px;
}

.menu-group-items .menu-item {
  min-height: 44px;
  padding-left: 58px;
  font-size: 15px;
  font-weight: 600;
}

.menu-item.active {
  background: #eef2f7;
  color: #2563eb;
}

.menu-item.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2563eb;
}

.sidebar.collapsed {
  width: 72px;
  padding: 20px 8px 14px;
}

.sidebar.collapsed .brand {
  padding: 0 6px;
}

.sidebar.collapsed #toggle-sidebar {
  margin: 0;
  align-items: center;
  padding-top: 0;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .menu-group-label,
.sidebar.collapsed .menu-home-label,
.sidebar.collapsed .menu-chevron,
.sidebar.collapsed .menu-group-items,
.sidebar.collapsed .settings-menu span:not(.menu-settings-icon) {
  display: none;
}

.sidebar.collapsed .menu,
.sidebar.collapsed .settings-menu-wrap {
  display: flex;
}

.sidebar.collapsed .menu {
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.sidebar.collapsed .menu-group-head,
.sidebar.collapsed .menu-item,
.sidebar.collapsed .settings-menu {
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin-inline: auto;
}

.sidebar.collapsed .menu-module-icon,
.sidebar.collapsed .settings-menu > .menu-settings-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  stroke-width: 1.8;
}

.sidebar.collapsed .settings-menu > .menu-settings-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.sidebar.collapsed .menu-group.flyout-open .menu-group-items {
  position: absolute;
  z-index: 10000;
  top: -5px;
  left: 60px;
  display: grid;
  width: 238px;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--modal-bg);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}

.sidebar.collapsed .menu-group.flyout-open .menu-group-items::before {
  content: attr(data-flyout-title);
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px 7px;
  margin-bottom: 3px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.sidebar.collapsed .menu-group.flyout-open .menu-group-items::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--modal-bg);
  transform: rotate(45deg);
}

.sidebar.collapsed .menu-group.flyout-open .menu-group-items .menu-item {
  justify-content: flex-start;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  margin: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.sidebar.collapsed .menu-group.flyout-open .menu-group-head::after {
  display: none;
}

.sidebar.collapsed .menu-group.module-active .menu-group-head {
  background: #eef2f7;
  color: #2563eb;
}

.sidebar.collapsed .menu-group.module-active .menu-group-head::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2563eb;
}

.sidebar.collapsed .settings-menu-wrap {
  overflow: visible;
}

.sidebar.collapsed .settings-popover {
  left: calc(100% + 12px);
  right: auto;
  bottom: 0;
  width: 238px;
  padding: 9px;
  gap: 3px;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
  z-index: 10000;
}

.sidebar.collapsed .settings-popover::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--modal-bg);
  transform: rotate(45deg);
}

.sidebar.collapsed .settings-popover-user {
  display: flex;
}

.sidebar.collapsed .settings-popover button {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

#page-title {
  font-size: 36px;
  font-weight: 800;
}

.page-head {
  min-height: 76px;
  padding-bottom: 18px;
}

.settings-menu > .menu-settings-icon {
  overflow: visible;
}

.sidebar.collapsed [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 120;
  left: 52px;
  top: 50%;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: var(--panel-bg);
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .15s ease, transform .15s ease;
}

.sidebar.collapsed [data-tooltip]:hover::after,
.sidebar.collapsed [data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.mobile-sidebar-trigger,
.sidebar-backdrop {
  display: none;
}

.profit-report-card:hover {
  border-color: color-mix(in srgb, var(--button-bg) 38%, var(--border-color));
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.profit-report-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #10b981);
  opacity: 0.65;
}

.profit-report-card.is-published::before {
  background: linear-gradient(90deg, #10b981, #2563eb);
}

.profit-report-card.is-abandoned::before {
  background: #cbd5e1;
}

.profit-report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profit-report-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #eff6ff;
  flex: 0 0 auto;
}

.profit-report-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-report-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 -8px;
  min-height: 28px;
}

.profit-report-status-line > span:last-child {
  color: #64748b;
  font-size: 12px;
}

.profit-report-card-head strong,
.profit-report-card-head span {
  display: block;
}

.profit-report-card-head strong {
  font-size: 18px;
  line-height: 1.35;
  word-break: break-word;
}

.profit-report-period {
  color: var(--text-muted);
  font-size: 14px;
}

.profit-report-card dl,
.profit-report-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profit-report-card dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profit-report-card dt,
.profit-report-card small {
  color: var(--text-soft);
  font-size: 12px;
}

.profit-report-card dd {
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-report-card-metrics span {
  background: var(--input-bg);
  padding: 12px;
  border-radius: 8px;
}

.profit-report-card-metrics span.primary {
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
}

.profit-report-card-metrics b {
  display: block;
  margin-top: 4px;
}

.profit-report-card .biz-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.profit-new-head {
  align-items: flex-start;
  gap: 18px;
}

.profit-new-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  min-width: min(620px, 100%);
}

.profit-stage-status {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-main);
  font-weight: 800;
}

.profit-stage-status::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: topRuleSweep 5.5s linear infinite;
  pointer-events: none;
}

.profit-stage-status small,
.profit-switcher span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.profit-switcher {
  display: flex;
  align-items: center;
  min-width: min(360px, 42vw);
}

.profit-report-select {
  width: 100%;
  min-width: 0;
  height: 44px;
}

.profit-abandon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}

.profit-abandon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1180px) {
  .profit-new-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .profit-switcher {
    flex: 1 1 280px;
    min-width: min(280px, 100%);
  }

  .profit-report-filters {
    grid-template-columns: minmax(260px, 1fr) 160px 160px 140px;
  }

  .profit-report-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  }
}

@media (max-width: 820px) {
  .profit-report-filters {
    grid-template-columns: 1fr;
  }
}

/* Profit Report Center */
#profit-dashboard-app.panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profit-center-controls,
.profit-center-library {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.profit-center-controls {
  padding: 20px;
}

.profit-center-library {
  margin-top: 18px;
  padding: 20px;
}

.profit-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
}

.profit-center-heading {
  min-width: 0;
}

.profit-center-heading h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.profit-center-heading p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.profit-center-header-actions,
.profit-center-view-switch {
  display: flex;
  align-items: center;
}

.profit-center-header-actions {
  flex: 0 0 auto;
  gap: 12px;
}

.profit-center-view-switch {
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
}

.profit-center-view-switch button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
}

.profit-center-view-switch button.is-active {
  background: #eef4ff;
  color: #315fbd;
}

.profit-center-view-switch button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.profit-center-view-switch svg,
.profit-center-new-button svg,
.profit-center-search svg,
.profit-center-card-action svg,
.profit-center-empty svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-center-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid #356ee6;
  border-radius: 11px;
  background: linear-gradient(135deg, #4e82ef, #356ee6);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 6px 16px rgba(53, 110, 230, .14);
}

.profit-center-new-button:hover {
  background: linear-gradient(135deg, #4378e7, #2f64d6);
  box-shadow: 0 6px 16px rgba(53, 110, 230, .18);
}

.profit-center-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(145px, .62fr)) minmax(300px, 1.05fr) auto auto;
  grid-auto-rows: 44px;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--border-color) 86%, #b8c9e5);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-bg) 88%, #f3f7fc);
}

.profit-center-toolbar > .profit-center-search,
.profit-center-toolbar > .profit-center-select,
.profit-center-toolbar > .profit-center-date-range {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  align-self: stretch;
}

.profit-center-select .system-control,
.profit-center-select .system-control-trigger {
  height: 42px;
  min-height: 42px;
}

.profit-center-date-range {
  position: relative;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  display: flex;
  align-self: stretch;
  align-items: stretch;
  padding: 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, .84);
}
.profit-report-range-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  box-shadow: none;
}
.profit-report-range-trigger > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #4c7de4;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profit-report-range-trigger > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profit-report-range-chevron {
  stroke: #718096 !important;
}
.profit-report-range-popover {
  position: absolute;
  z-index: 3600;
  top: calc(100% + 9px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  min-width: 350px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(36, 50, 75, .18);
}
.profit-report-range-popover[hidden] { display: none; }
.profit-report-range-calendar { display: grid; gap: 10px; }
.profit-report-range-calendar-head,
.profit-report-range-calendar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profit-report-range-calendar-head button,
.profit-report-range-calendar-foot button {
  min-width: 38px;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f6fb;
  color: #50627b;
  font-weight: 800;
}
.profit-report-range-weekdays,
.profit-report-range-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.profit-report-range-weekdays span {
  color: #8290a4;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.profit-report-range-day {
  position: relative;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #344054;
  font-weight: 700;
}
.profit-report-range-day.is-outside { color: #b5bfcc; }
.profit-report-range-day.is-in-range { border-radius: 0; background: #edf3ff; color: #315fbd; }
.profit-report-range-day.is-start,
.profit-report-range-day.is-end { border-radius: 9px; background: #4779e6; color: #fff; }
.profit-report-range-day.is-today:not(.is-start):not(.is-end) { box-shadow: inset 0 0 0 1px #7aa0ef; }
.profit-report-range-calendar-foot {
  padding-top: 8px;
  border-top: 1px solid #edf0f5;
  color: #718096;
  font-size: 12px;
}
.profit-report-range-calendar-foot button { color: #356ee6; }

/* Report range selection remains local until the user confirms it. */
.profit-report-range-popover {
  left: 0;
  right: auto;
  width: 100%;
  min-width: 310px;
  max-width: min(360px, calc(100vw - 32px));
}
.profit-report-range-calendar-foot > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profit-report-range-calendar-foot [data-profit-report-range-confirm] {
  min-width: 62px;
  background: #4777e9;
  color: #fff;
}

.profit-center-search,
.profit-center-select {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, #c8d5e8);
  border-radius: 11px;
  background: color-mix(in srgb, var(--input-bg) 94%, transparent);
  transition: border-color .18s ease-out, box-shadow .18s ease-out, background .18s ease-out;
}

.profit-center-search:focus-within,
.profit-center-select:focus-within {
  border-color: rgba(83, 125, 216, .48);
  box-shadow: 0 0 0 3px rgba(83, 125, 216, .08);
  background: var(--input-bg);
}

.profit-center-search {
  gap: 9px;
  padding: 0 13px;
  color: #718096;
}

.profit-center-search input,
.profit-center-select select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  box-shadow: none;
  outline: 0;
}

.profit-center-select {
  gap: 8px;
  padding-left: 11px;
}

.profit-center-select > span {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.profit-center-select select {
  padding-right: 10px;
  font-size: 13px;
  font-weight: 650;
}

.profit-center-clear {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #5e6f88;
  box-shadow: none;
  font-size: 13px;
  white-space: nowrap;
}

.profit-center-clear:hover {
  background: rgba(87, 112, 150, .07);
  color: var(--text-main);
}

.profit-center-count {
  padding: 0 6px;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.profit-center-count strong {
  color: #315fbd;
  font-variant-numeric: tabular-nums;
}

.profit-center-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.profit-center-card {
  --report-bg-start: #eaf3ff;
  --report-bg-end: #dcebff;
  --report-shape-primary: #7fb2ff;
  --report-shape-secondary: #b8d4ff;
  --report-shape-soft: #cfe4ff;
  --report-accent: #315f9f;
  position: relative;
  isolation: isolate;
  height: 292px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--report-shape-primary) 24%, rgba(255, 255, 255, .78));
  border-radius: 24px;
  background: linear-gradient(142deg, var(--report-bg-start) 0%, color-mix(in srgb, var(--report-bg-start) 58%, #fff) 52%, var(--report-bg-end) 100%);
  box-shadow: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s ease-out, box-shadow .2s ease-out, background .2s ease-out;
}

body:not(.no-card-shadow) .profit-center-card {
  box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
}

.profit-center-card:hover,
.profit-center-card:focus-visible {
  transform: none;
  border-color: color-mix(in srgb, var(--report-shape-primary) 58%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--report-shape-primary) 12%, transparent), 0 0 22px color-mix(in srgb, var(--report-shape-primary) 13%, transparent);
}

.profit-center-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 21px 18px;
}

.profit-center-card-top,
.profit-center-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profit-center-card-status-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.profit-center-type,
.profit-center-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.profit-center-type {
  background: rgba(255, 255, 255, .58);
  color: var(--report-accent);
  border: 1px solid rgba(255, 255, 255, .58);
  backdrop-filter: blur(8px);
}

.profit-center-status.is-published {
  background: rgba(21, 128, 92, .11);
  color: #117256;
}

.profit-center-status.is-draft {
  background: rgba(217, 119, 6, .12);
  color: #a65f00;
}

.profit-center-status.is-archived {
  background: rgba(82, 104, 133, .12);
  color: #526885;
}

.profit-center-status.is-processing {
  background: rgba(37, 99, 235, .11);
  color: #315fbd;
}

.profit-center-status.is-error {
  background: rgba(220, 53, 69, .11);
  color: #bd2f40;
}

.profit-center-card-title {
  margin-top: 15px;
  min-width: 0;
}

.profit-center-card-title h4 {
  margin: 0;
  overflow: hidden;
  color: #182230;
  font-size: clamp(19px, 1.4vw, 23px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-center-card-title p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #5f6f84;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-center-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 18px;
  margin: 17px 0 0;
  max-width: 88%;
}

.profit-center-card-meta div {
  min-width: 0;
}

.profit-center-card-meta dt {
  margin: 0 0 4px;
  color: #718096;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.profit-center-card-meta dd {
  margin: 0;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-center-card-footer {
  margin-top: auto;
  justify-content: flex-start;
}

.profit-center-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
  color: var(--report-accent);
  box-shadow: none;
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.profit-center-card-action:hover {
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
}

.profit-center-card-action svg {
  width: 15px;
  height: 15px;
}

.profit-center-more-wrap {
  position: relative;
  z-index: 5;
}

.profit-center-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 24px;
  min-height: 25px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #182230;
  box-shadow: none;
}

.profit-center-more span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.profit-center-more:hover,
.profit-center-more[aria-expanded="true"] {
  background: rgba(24, 34, 48, .07);
  color: #101828;
}

.profit-center-menu {
  position: absolute;
  right: 0;
  top: 32px;
  bottom: auto;
  display: none;
  width: 132px;
  padding: 6px;
  border: 1px solid rgba(207, 217, 230, .9);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  backdrop-filter: blur(14px);
}

.profit-center-menu.is-open {
  display: grid;
}

.profit-center-menu button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  box-shadow: none;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}

.profit-center-menu button:hover {
  background: #f3f6fa;
}

.profit-center-menu button.danger {
  color: #c63a49;
}

.profit-center-menu button.danger:hover {
  background: rgba(220, 53, 69, .07);
}

.profit-center-geometry {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.profit-center-geometry i {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform, opacity;
}

.geometry-main {
  display: none !important;
}

.geometry-wave {
  left: -10%;
  bottom: -28px;
  width: 122%;
  height: 178px;
  background: linear-gradient(105deg, var(--report-shape-soft), var(--report-shape-primary));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 960 200' preserveAspectRatio='none'%3E%3Cpath d='M0 92 C135 18 250 150 402 94 C558 35 670 5 960 86 L960 200 L0 200 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 960 200' preserveAspectRatio='none'%3E%3Cpath d='M0 92 C135 18 250 150 402 94 C558 35 670 5 960 86 L960 200 L0 200 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: .11;
  transform: rotate(-2deg);
  animation: reportWaveDrift 16s ease-in-out infinite alternate;
}

.geometry-ribbon {
  top: -12px;
  right: -12%;
  width: 76%;
  height: 132px;
  background: linear-gradient(115deg, var(--report-shape-secondary), var(--report-shape-primary));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 150' preserveAspectRatio='none'%3E%3Cpath d='M0 24 C138 92 245 6 382 48 C486 80 558 58 640 8 L640 78 C535 132 438 134 331 94 C207 48 110 126 0 70 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 150' preserveAspectRatio='none'%3E%3Cpath d='M0 24 C138 92 245 6 382 48 C486 80 558 58 640 8 L640 78 C535 132 438 134 331 94 C207 48 110 126 0 70 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: .075;
  transform: rotate(5deg);
}

.geometry-diamond {
  right: 54px;
  bottom: 31px;
  width: 86px;
  height: 86px;
  border: 2px solid var(--report-shape-secondary);
  border-radius: 22px;
  opacity: .11;
  transform: rotate(34deg);
  animation: reportDiamondDrift 13s ease-in-out infinite alternate;
}

.geometry-ring {
  display: none !important;
  right: 31px;
  bottom: 21px;
  width: 118px;
  height: 118px;
  border: 3px solid var(--report-shape-secondary);
  border-radius: 50%;
  filter: blur(.6px);
  opacity: .11;
  animation: reportShapeDrift 14s ease-in-out infinite alternate;
}

.geometry-arc {
  top: -72px;
  left: -62px;
  width: 176px;
  height: 176px;
  border: 3px solid var(--report-shape-soft);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  filter: blur(.8px);
  opacity: .09;
  animation: reportArcDrift 17s ease-in-out infinite alternate;
}

.geometry-dots {
  top: 48px;
  right: 21px;
  width: 66px;
  height: 66px;
  background-image: radial-gradient(circle, var(--report-shape-primary) 1.6px, transparent 1.8px);
  background-size: 14px 14px;
  opacity: .065;
  animation: reportDotsDrift 15s ease-in-out infinite alternate;
}

.geometry-glow {
  right: -36px;
  top: 27px;
  width: 210px;
  height: 142px;
  border-radius: 50%;
  background: var(--report-shape-soft);
  filter: blur(44px);
  opacity: .13;
  animation: reportGlowBreathe 10s ease-in-out infinite alternate;
}

.profit-center-card:hover .profit-center-geometry,
.profit-center-card:focus-visible .profit-center-geometry {
  opacity: .92;
}

.profit-center-card.template-mist-blue {
  --report-bg-start: #eaf3ff; --report-bg-end: #dcebff; --report-shape-primary: #7fb2ff; --report-shape-secondary: #b8d4ff; --report-shape-soft: #cfe4ff; --report-accent: #315f9f;
}

.profit-center-card.template-soft-purple {
  --report-bg-start: #f2eeff; --report-bg-end: #e8e1ff; --report-shape-primary: #a88bff; --report-shape-secondary: #c7b7ff; --report-shape-soft: #ddd4ff; --report-accent: #6550a6;
}

.profit-center-card.template-soft-purple .geometry-main,
.profit-center-card.template-pink-purple .geometry-main {
  right: -78px;
  bottom: -142px;
  width: 348px;
  height: 322px;
}

.profit-center-card.template-soft-purple .geometry-dots,
.profit-center-card.template-pink-purple .geometry-dots {
  top: 22px;
  right: 64px;
}

.profit-center-card.template-soft-purple .geometry-wave,
.profit-center-card.template-pink-purple .geometry-wave {
  left: 22%;
  bottom: -108px;
  width: 96%;
  transform: rotate(8deg);
}

.profit-center-card.template-soft-purple .geometry-ring,
.profit-center-card.template-pink-purple .geometry-ring { display: none; }

.profit-center-card.template-mint {
  --report-bg-start: #eafbf4; --report-bg-end: #d9f5e8; --report-shape-primary: #62d6a3; --report-shape-secondary: #a7e8cb; --report-shape-soft: #cff4e2; --report-accent: #237c5d;
}

.profit-center-card.template-apricot {
  --report-bg-start: #fff4ea; --report-bg-end: #fee8d7; --report-shape-primary: #ffb977; --report-shape-secondary: #ffd4ae; --report-shape-soft: #fce6cf; --report-accent: #a25d27;
}

.profit-center-card.template-apricot .geometry-ring,
.profit-center-card.template-warm-gold .geometry-ring {
  right: -25px;
  bottom: 21px;
  width: 156px;
  height: 156px;
}

.profit-center-card.template-apricot .geometry-main,
.profit-center-card.template-warm-gold .geometry-main { display: none; }
.profit-center-card.template-apricot .geometry-ribbon,
.profit-center-card.template-warm-gold .geometry-ribbon {
  top: auto;
  right: -34px;
  bottom: -18px;
  width: 114%;
  height: 126px;
  transform: rotate(-7deg);
}

.profit-center-card.template-pink-purple {
  --report-bg-start: #fff0f7; --report-bg-end: #f7e5f3; --report-shape-primary: #f19ac2; --report-shape-secondary: #f6b9d8; --report-shape-soft: #f9d5e8; --report-accent: #9d4c72;
}

.profit-center-card.template-cyan-blue {
  --report-bg-start: #eaf9ff; --report-bg-end: #ddf3ff; --report-shape-primary: #69bdeb; --report-shape-secondary: #a7dbf4; --report-shape-soft: #d2eef9; --report-accent: #2c7297;
}

.profit-center-card.template-cyan-blue .geometry-main,
.profit-center-card.template-cool-gray .geometry-main {
  right: -112px;
  bottom: -52px;
  width: 292px;
  height: 292px;
}

.profit-center-card.template-cyan-blue .geometry-ribbon,
.profit-center-card.template-cool-gray .geometry-ribbon { display: none; }
.profit-center-card.template-cyan-blue .geometry-wave,
.profit-center-card.template-cool-gray .geometry-wave {
  left: 34%;
  bottom: -70px;
  width: 86%;
  height: 210px;
  transform: rotate(-14deg);
}

.profit-center-card.template-mint .geometry-main { display: none; }
.profit-center-card.template-mint .geometry-wave {
  left: -8%;
  bottom: -74px;
  height: 196px;
  transform: rotate(5deg);
}
.profit-center-card.template-mint .geometry-diamond { right: 38px; bottom: 48px; }

@keyframes reportWaveDrift {
  from { transform: translate3d(-8px, 4px, 0) rotate(-4deg); }
  to { transform: translate3d(12px, -5px, 0) rotate(-1deg); }
}

@keyframes reportDiamondDrift {
  from { transform: translate3d(0, 5px, 0) rotate(30deg); }
  to { transform: translate3d(-8px, -5px, 0) rotate(38deg); }
}

/* Every report template shares one restrained geometry layout; templates only change color. */
.profit-center-card .geometry-main,
.profit-center-card .geometry-ribbon,
.profit-center-card .geometry-diamond { display: none !important; }
.profit-center-card .geometry-wave {
  display: block !important;
  left: -10% !important;
  right: auto !important;
  top: auto !important;
  bottom: -30px !important;
  width: 122% !important;
  height: 178px !important;
  opacity: .11;
  animation: reportUnifiedWave 18s ease-in-out infinite alternate;
}
.profit-center-card .geometry-ring {
  display: block !important;
  top: -178px !important;
  right: -122px !important;
  bottom: auto !important;
  width: 292px !important;
  height: 292px !important;
  border: 30px solid var(--report-shape-secondary) !important;
  border-radius: 50% !important;
  filter: none;
  opacity: .10;
  animation: reportUnifiedRing 22s ease-in-out infinite alternate;
}
.profit-center-card .geometry-dots {
  display: block !important;
  top: 42px !important;
  right: 24px !important;
  width: 74px !important;
  height: 74px !important;
  opacity: .075;
  animation: reportUnifiedDots 20s ease-in-out infinite alternate;
}
@keyframes reportUnifiedWave {
  from { transform: translate3d(-8px, 4px, 0); }
  to { transform: translate3d(10px, -5px, 0); }
}
@keyframes reportUnifiedRing {
  from { transform: translate3d(0, 0, 0) rotate(-5deg); }
  to { transform: translate3d(-10px, 12px, 0) rotate(4deg); }
}
@keyframes reportUnifiedDots {
  from { transform: translate3d(5px, -4px, 0); }
  to { transform: translate3d(-8px, 9px, 0); }
}

.profit-center-card.template-cyan-blue .geometry-ring,
.profit-center-card.template-cool-gray .geometry-ring {
  right: 39px;
  bottom: 33px;
}

.profit-center-card.template-warm-gold {
  --report-bg-start: #fff8ec; --report-bg-end: #f9efd9; --report-shape-primary: #d9b56e; --report-shape-secondary: #e8c98e; --report-shape-soft: #f3e3bf; --report-accent: #84662d;
}

.profit-center-card.template-cool-gray {
  --report-bg-start: #f3f6fa; --report-bg-end: #e8eef5; --report-shape-primary: #8ea4c0; --report-shape-secondary: #b7c5d7; --report-shape-soft: #d8e1ec; --report-accent: #526885;
}

.profit-center-empty {
  position: relative;
  isolation: isolate;
  min-height: 340px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 44px;
  border: 1px dashed color-mix(in srgb, var(--border-color) 82%, #a7c4ee);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(234, 243, 255, .58), rgba(248, 250, 252, .82), rgba(242, 238, 255, .52));
  text-align: center;
}

.profit-center-empty > div:not(.profit-center-geometry) {
  position: relative;
  z-index: 1;
}

.profit-center-empty .profit-center-geometry {
  --report-shape-primary: #9ebcf0;
  --report-shape-secondary: #c6b8ee;
  --report-shape-soft: #dce9fb;
}

.profit-center-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .76);
  color: #5e78a6;
}

.profit-center-empty-icon svg {
  width: 25px;
  height: 25px;
}

.profit-center-empty h4 {
  margin: 16px 0 0;
  color: var(--text-main);
  font-size: 20px;
}

.profit-center-empty p {
  margin: 8px 0 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.profit-center-empty button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: #356ee6;
  color: #fff;
}

body.square-cards .profit-center-card,
body.square-cards .profit-center-controls,
body.square-cards .profit-center-library,
body.square-cards .profit-center-toolbar,
body.square-cards .profit-center-empty,
body.square-cards .profit-center-view-switch,
body.square-cards .profit-center-new-button {
  border-radius: 0;
}

body.no-card-shadow .profit-center-card {
  box-shadow: none;
}

@keyframes reportShapeBreathe {
  from { transform: translate3d(7px, 12px, 0) scale(1); opacity: .09; }
  to { transform: translate3d(-24px, -18px, 0) scale(1.07); opacity: .14; }
}

@keyframes reportShapeDrift {
  from { transform: translate3d(-12px, 8px, 0) scale(.97); opacity: .10; }
  to { transform: translate3d(20px, -16px, 0) scale(1.06); opacity: .15; }
}

@keyframes reportGlowBreathe {
  from { transform: translate3d(2px, 5px, 0) scale(1); opacity: .10; }
  to { transform: translate3d(-11px, -7px, 0) scale(1.055); opacity: .155; }
}

@keyframes reportArcDrift {
  from { transform: translate3d(-3px, 2px, 0) scale(1); opacity: .07; }
  to { transform: translate3d(8px, -6px, 0) scale(1.035); opacity: .105; }
}

@keyframes reportDotsDrift {
  from { transform: translate3d(8px, -10px, 0) rotate(-2deg); opacity: .08; }
  to { transform: translate3d(-20px, 18px, 0) rotate(3deg); opacity: .13; }
}

@media (max-width: 1180px) {
  .profit-center-toolbar {
    grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(145px, .7fr));
  }

  .profit-center-date-range { grid-column: span 2; }

  .profit-center-clear,
  .profit-center-count {
    justify-self: start;
  }

  .profit-center-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .profit-center-controls,
  .profit-center-library {
    padding: 15px;
  }

  .profit-center-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profit-center-header-actions {
    width: 100%;
  }

  .profit-center-new-button {
    flex: 1;
  }

  .profit-center-toolbar {
    grid-template-columns: 1fr;
  }

  .profit-center-date-range { grid-column: auto; }

  .profit-center-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profit-center-card {
    height: 286px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profit-center-geometry i {
    animation: none !important;
  }
}

.profit-step-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 16px;
}

.profit-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.parse-progress {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
}

.parse-progress.running {
  border-color: rgba(59, 130, 246, .35);
  background: rgba(59, 130, 246, .08);
}

.parse-progress.success {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .08);
}

.parse-progress.failed,
.parse-progress.error {
  border-color: rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .08);
}

.profit-file-state {
  min-width: 0;
}

.profit-file-state.success {
  border: 1px solid color-mix(in srgb, #16a34a 22%, var(--border-color));
  background: color-mix(in srgb, #16a34a 9%, var(--card-bg));
  border-radius: 8px;
  padding: 9px 10px;
}

.profit-file-state.empty {
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 9px 10px;
}

.profit-file-state span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-upload-card:has(.profit-file-state span:not(:empty)) .profit-file-state {
  border-radius: 8px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-row h3 {
  margin: 0;
}

.dialog-close.icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  border: 0;
}

.dialog-close.icon-only:hover {
  background: var(--input-bg);
  color: var(--text-main);
}

.dialog-close.icon-only svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.advanced-settings {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background: var(--input-bg);
}

.advanced-settings summary {
  cursor: pointer;
  font-weight: 700;
}

.advanced-settings .form-grid {
  margin-top: 12px;
}

.profit-upload-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(130px, 1fr)) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.profit-product-import-row,
.profit-product-filter-row {
  display: grid;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.profit-product-import-row {
  grid-template-columns: minmax(280px, 1fr) auto;
  max-width: 720px;
}

.profit-product-filter-row {
  grid-template-columns: minmax(260px, 1fr) 180px auto auto;
}

.profit-product-filter-row .record-count {
  justify-self: end;
  color: var(--text-muted);
  white-space: nowrap;
}

.profit-product-table {
  max-height: min(58vh, 620px);
}

.ellipsis-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.profit-source-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
}

.profit-source-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.parse-progress > strong {
  color: #59677a;
  font-size: 14px;
}

.parse-progress.success > strong { color: #197044; }
.profit-parse-status-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}
.profit-parse-status-icon.is-complete {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #29b86b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.profit-upload-card {
  min-width: 0;
  border: 1px solid #dfe5ed;
  border-radius: 20px;
  background: var(--card-bg);
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.profit-upload-card-head strong {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-main);
  font-size: 18px;
  line-height: 1.35;
}

.profit-upload-card-head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 10px;
}
.profit-upload-card-head em.is-required {
  color: #e34f68;
  background: #fff0f3;
}
.profit-upload-card-head em.is-optional {
  color: #65758b;
  background: #f1f4f8;
}
.profit-upload-complete {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2fbb6a;
  color: #fff;
  font-size: 12px;
}

.profit-upload-card p,
.profit-file-state small {
  color: var(--text-muted);
  margin: 4px 0 0;
}

.profit-file-state span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
  font-weight: 700;
}

.profit-upload-card-form {
  display: grid;
  gap: 11px;
}
.profit-upload-file-input,
.profit-upload-submit-hidden {
  display: none !important;
}
.profit-upload-dropzone {
  position: relative;
  min-height: 176px;
  border: 1.5px dashed #cdd6e2;
  border-radius: 16px;
  background: #fafbfd;
  transition: border-color .18s ease-out, background .18s ease-out;
}
.profit-upload-dropzone.is-dragover {
  border-color: #4b7ee8;
  background: #f2f6ff;
}
.profit-upload-dropzone.is-uploaded {
  border-color: #54cf8c;
  background: #edf9f2;
}
.profit-upload-dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 176px;
  padding: 26px 18px;
  cursor: pointer;
  text-align: center;
}
.profit-upload-dropzone-label strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-main);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profit-upload-dropzone-label small {
  color: #7a8799;
  font-size: 12px;
  line-height: 1.55;
}
.profit-upload-dropzone.is-uploaded small span { color: #24ac60; font-weight: 900; }
.profit-upload-cloud {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: #8592a5;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profit-upload-file-icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 58px;
  border-radius: 4px 12px 4px 4px;
  background: linear-gradient(145deg, #65b967, #3d9e4d);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(47, 153, 74, .16);
}
.profit-upload-trash {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8995a5;
}
.profit-upload-trash:hover { background: rgba(220, 53, 69, .08); color: #dc3545; }
.profit-upload-trash svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profit-upload-select-button {
  width: 100%;
  min-height: 43px;
  border: 1px solid #3f70df;
  border-radius: 9px;
  background: #4777e9;
  color: #fff;
  font-weight: 800;
}
.profit-upload-select-button:hover { background: #3969d8; }
.profit-upload-select-button.is-replace {
  border-color: #39ae63;
  background: #42b967;
}
.profit-upload-select-button.is-replace:hover { background: #35a85a; }
.profit-upload-select-button:disabled { opacity: .48; cursor: not-allowed; }

/* Step 2 upload cards: decorative assets cannot change card geometry. */
.profit-upload-grid,
.profit-upload-card,
.profit-upload-dropzone,
.profit-upload-dropzone-label {
  min-width: 0;
}
.profit-upload-dropzone-label > * {
  max-width: 100%;
}
.profit-upload-dropzone-label strong {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profit-upload-dropzone-label small {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.profit-upload-cloud,
.profit-upload-file-icon {
  flex: 0 0 auto;
  object-fit: contain;
}
.profit-upload-cloud {
  width: 54px;
  height: 54px;
}
.profit-upload-file-icon {
  width: 52px;
  height: 58px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Shared Step 4-6 segmented navigation and operator-facing run summary. */
.v2-workspace-tabs.profit-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  margin: 14px 0 18px;
  padding: 6px;
  border: 1px solid #dfe7f0;
  border-radius: 15px;
  background: #edf2f7;
  overflow-x: auto;
}
.v2-workspace-tabs.profit-tabs button {
  min-width: 128px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #65758c;
  box-shadow: none;
  font-weight: 800;
  white-space: nowrap;
}
.v2-workspace-tabs.profit-tabs button.active {
  background: #fff;
  color: #2f6fe4;
  box-shadow: 0 2px 7px rgba(38, 56, 86, .09);
}
.profit-run-meta-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 14px 0 0;
  padding: 0;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}
.profit-run-meta-strip > div {
  min-width: 0;
  padding: 14px 16px;
}
.profit-run-meta-strip > div + div {
  border-left: 1px solid #edf1f5;
}
.profit-run-meta-strip dt {
  margin: 0 0 7px;
  color: #8190a5;
  font-size: 12px;
  font-weight: 700;
}
.profit-run-meta-strip dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profit-run-status {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #4175dd;
  font-size: 11px;
}
.parse-progress.pending > span:empty { display: none; }

@media (max-width: 1180px) {
  .profit-run-meta-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profit-run-meta-strip > div:nth-child(4) { border-left: 0; border-top: 1px solid #edf1f5; }
  .profit-run-meta-strip > div:nth-child(n + 5) { border-top: 1px solid #edf1f5; }
}

@media (max-width: 720px) {
  .profit-run-meta-strip { grid-template-columns: 1fr 1fr; }
  .profit-run-meta-strip > div { border-top: 1px solid #edf1f5; }
  .profit-run-meta-strip > div:nth-child(-n + 2) { border-top: 0; }
  .profit-run-meta-strip > div:nth-child(odd) { border-left: 0; }
}

@media (max-width: 1500px) {
  .profit-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .profit-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .profit-upload-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .profit-upload-card {
    padding: 15px;
  }

  .profit-report-range-popover {
    right: auto;
    left: 0;
    width: min(390px, calc(100vw - 32px));
    min-width: 0;
  }
}

.profit-upload-advanced {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.profit-upload-advanced summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
}

.profit-upload-advanced input {
  width: 100%;
  margin-top: 8px;
}

.profit-upload-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.profit-upload-actions input[type="file"] {
  min-width: 0;
  width: 100%;
}

.danger-soft {
  color: #b42318 !important;
  border-color: color-mix(in srgb, #ef4444 35%, var(--border-color)) !important;
  background: color-mix(in srgb, #ef4444 8%, var(--card-bg)) !important;
}

.profit-config-dialog-card {
  width: min(980px, calc(100vw - 48px));
  max-height: min(86vh, 860px);
  overflow: auto;
}

.profit-dialog-body {
  display: grid;
  gap: 12px;
}

.profit-dialog-section {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-bg);
}

.profit-dialog-section h4 {
  margin: 0 0 10px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-line,
.check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.formula-preview,
.muted-box {
  color: var(--text-muted);
  background: var(--input-bg);
}

.profit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.profit-tabs button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.profit-tabs button.active {
  background: var(--button-bg);
  border-color: transparent;
  color: var(--button-text);
}

.profit-data-table {
  max-height: 520px;
  overflow: auto;
  margin-top: 14px;
}

.profit-data-table table {
  min-width: 1200px;
}

.profit-table.compact {
  max-height: 280px;
  overflow: auto;
}

@media (max-width: 1366px) {
  .profit-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profit-upload-form {
    grid-template-columns: 1fr 1fr;
  }
}

.purchase-table-wrap {
  max-height: 560px;
  overflow-y: auto;
}

.purchase-table th,
.purchase-table td {
  white-space: nowrap;
}

.purchase-table .num,
.purchase-table th.num,
.purchase-table td.num {
  text-align: right;
}

.purchase-detail-row td {
  background: #f8fafc;
}

.purchase-detail-row .table-scroll {
  max-height: 280px;
  overflow-y: auto;
}

.purchase-dialog-card {
  width: min(1180px, 96vw);
}

.purchase-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}

.purchase-items-head h4 {
  margin: 0;
}

.purchase-items-scroll {
  max-height: 360px;
  overflow-y: auto;
}

.purchase-edit-table input {
  width: 120px;
  min-width: 0;
}

.purchase-edit-table td:nth-child(3) input,
.purchase-edit-table td:nth-child(4) input {
  width: 180px;
}

.po-picker {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 12px;
}

.tag-chip button {
  min-height: 18px;
  width: 18px;
  padding: 0;
  border-radius: 50%;
}

.biz-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.biz-badge.ok,
.biz-badge.green {
  background: #e8f6ee;
  color: var(--green);
}

.biz-badge.warn,
.biz-badge.yellow {
  background: #fff2d9;
  color: var(--amber);
}

.biz-badge.neutral,
.biz-badge.gray {
  background: #eef2f6;
  color: #4c5b70;
}

.biz-badge.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.biz-badge.orange {
  background: #fed7aa;
  color: #9a3412;
}

.biz-badge.red {
  background: #fecaca;
  color: #991b1b;
}

.biz-badge.purple {
  background: #ddd6fe;
  color: #5b21b6;
}

.success-outline {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.quick-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-options label,
.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.planner-settings-form {
  align-items: end;
}

.planner-checks {
  display: flex;
  gap: 22px;
  justify-content: flex-start;
  align-items: center;
  padding: 4px 0;
}

.small-upload {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  background: #eef2f6;
  color: #2f3a4c;
  cursor: pointer;
  font-weight: 700;
}

.compact-dialog {
  width: min(560px, calc(100vw - 48px));
}

#ui-settings-form {
  display: grid;
  gap: 16px;
  align-items: start;
}

#ui-settings-form .toggle-line,
#ui-settings-form .color-setting {
  font-size: 15px;
}

.color-setting {
  display: grid;
  gap: 10px;
  color: #526075;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatches button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--line);
}

.color-swatches button.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .24), 0 0 0 1px var(--line);
}

#ui-settings-form button {
  justify-self: start;
}

.thumb-btn {
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3f6f9;
  border-radius: 4px;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  display: inline-block;
  width: 54px;
  height: 54px;
  border: 1px dashed #cbd5e1;
  background: #f1f5f9;
  border-radius: 4px;
}

.image-preview {
  display: inline-flex;
  margin-top: 8px;
  align-items: center;
}

.image-delete-btn {
  margin-top: 8px;
  margin-left: 10px;
  vertical-align: top;
}

#image-dialog {
  max-width: none;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 15px;
  background: transparent;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .2);
}

#image-dialog::backdrop {
  background: rgba(22, 29, 42, .28);
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
}

#image-dialog .image-dialog-card {
  width: min(760px, calc(100vw - 28px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  padding: 0;
  gap: 0;
  overflow: hidden !important;
  border: 0;
  border-radius: 14px;
  background: rgba(250, 252, 255, .82);
  backdrop-filter: blur(22px) saturate(112%);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
}

.image-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 5px 7px 5px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .5);
  color: #475467;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .01em;
}

.image-dialog-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}

#image-dialog .image-dialog-tool {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #59677b;
  box-shadow: none;
  cursor: pointer;
}

#image-dialog .image-dialog-tool:hover {
  background: rgba(255, 255, 255, .72);
  color: #1f2937;
  box-shadow: none;
}

.image-dialog-tool > img,
.image-dialog-tool > svg {
  display: block;
  width: 18px;
  height: 18px;
}

.image-dialog-tool > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

#image-dialog .image-dialog-tool:focus-visible {
  outline: 2px solid rgba(75, 114, 220, .44);
  outline-offset: 1px;
}

.image-dialog-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(420px, 64vh, 640px);
  padding: 10px;
  box-sizing: border-box;
  background: rgba(245, 248, 252, .28);
}

.image-dialog-stage img {
  position: absolute;
  inset: 10px;
  display: block;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 9px;
}

@media (max-width: 640px) {
  #image-dialog .image-dialog-card {
    min-width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .image-dialog-stage {
    height: clamp(300px, 58vh, 520px);
    padding: 6px;
  }

  .image-dialog-stage img {
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
  }
}

.evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.evidence-thumb {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.batch-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr) minmax(140px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.batch-section,
.planner-block {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.batch-fields {
  display: grid;
  gap: 18px;
}

.batch-field-group {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.batch-field-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.batch-field-group h5 {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.batch-field-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.batch-fields .batch-field span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.disabled-field,
input:disabled,
select:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.batch-sku-list table {
  min-width: 920px;
}

.pending-thumb {
  position: relative;
  display: inline-flex;
}

.pending-thumb::after {
  content: "待上传";
  position: absolute;
  right: -8px;
  bottom: -6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #fed7aa;
}

.compact-actions {
  justify-content: flex-start;
}

.planner-block:first-of-type {
  border-top: 0;
}

.planner-block-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.planner-settings {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}

.planner-settings article {
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.planner-settings span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.weight-total {
  font-weight: 700;
}

.weight-total.ok {
  color: var(--green);
}

.weight-total.bad {
  color: var(--red);
}

.planner-table {
  min-width: 2300px;
}

.planner-table-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.planner-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.planner-table input {
  width: 96px;
}

.planner-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-counter {
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.fixed-table,
.inventory-table-wrap,
.planner-table-wrap {
  max-height: calc(100vh - 320px);
}

.fixed-table,
.inventory-table-wrap,
.planner-table-wrap {
  overflow: auto;
}

.planner-summary {
  display: none;
}

.planner-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff;
  font-weight: 700;
  border-top: 2px solid #d9dde7;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, .04);
}

body.theme-midnight .planner-table tfoot td {
  background: #1d222b;
}

.planner-table {
  min-width: 2960px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.planner-table-wrap {
  max-height: calc(100vh - 285px);
}

.planner-table th,
.planner-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-table thead th {
  background: #f5f7fb;
  z-index: 20;
}

.planner-th-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.planner-pin {
  flex: 0 0 auto;
}

.planner-table .planner-sticky-cell {
  position: sticky !important;
  left: var(--planner-sticky-left) !important;
  background: #fff;
  z-index: 16;
}

.planner-table thead .planner-sticky-cell {
  background: #f5f7fb;
  z-index: 44;
}

.planner-table tfoot .planner-sticky-cell {
  background: #fff;
  z-index: 36;
}

.planner-table .planner-sticky-edge {
  box-shadow: 4px 0 8px rgba(15, 23, 42, .12);
}

body.theme-midnight .planner-table .planner-sticky-cell,
body.theme-midnight .planner-table tfoot .planner-sticky-cell {
  background: #1d222b;
}

body.theme-midnight .planner-table thead .planner-sticky-cell {
  background: #252b36;
}

.planner-table input[data-plan-final-cartons] {
  width: 86px;
}

.planner-detail-table {
  min-width: 1180px;
}

.planner-detail-table th:nth-child(3),
.planner-detail-table td:nth-child(3) {
  min-width: 260px;
}

#planner-history .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 290px;
}

.widget-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.widget-library button {
  min-height: 98px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  justify-items: stretch;
  text-align: left;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  color: var(--text);
  border: 1px solid var(--line);
  cursor: pointer;
}

.widget-library button * {
  pointer-events: none;
}

.widget-option-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eef7;
  color: #334155;
  font-weight: 700;
}

.widget-option-text {
  display: grid;
  gap: 3px;
}

.widget-option-text small {
  color: var(--muted);
  font-size: 12px;
}

.link-widget,
.banner-widget {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.link-widget img {
  width: 28px;
  height: 28px;
}

.quick-link-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 14px 10px;
}

.quick-link-head {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.quick-link-head h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-link-app {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
}

.quick-link-app a,
.quick-link-add {
  width: 100%;
  min-height: 96px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  background: transparent;
}

.quick-link-app a:hover,
.quick-link-add:hover {
  background: var(--table-row-hover);
  filter: none;
}

.quick-link-icon,
.quick-link-add span {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.quick-link-icon img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.quick-link-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.quick-link-emoji.fallback {
  display: none;
}

.quick-link-app strong,
.quick-link-add strong {
  max-width: 100%;
  min-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 1366px) {
  .quick-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 2560px) {
  .quick-link-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.quick-link-add {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.quick-link-add * {
  pointer-events: none;
}

.quick-link-add span {
  border-radius: 999px;
  font-size: 24px;
  color: var(--primary-button);
}

.quick-link-tools {
  display: none;
  gap: 4px;
  justify-content: center;
  margin-top: -2px;
}

.widget-grid.editing .quick-link-tools {
  display: flex;
}

.quick-link-tools button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 999px;
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.banner-widget img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
}

#command-dialog {
  width: min(1040px, calc(100vw - 40px));
  margin: clamp(28px, 8vh, 86px) auto auto;
  background: transparent;
  box-shadow: none;
}

.command-card {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.command-search {
  display: grid;
  grid-template-columns: auto 1fr 150px auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 0 10px 0 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(rgba(255,250,255,.82), rgba(255,250,255,.82)) padding-box,
    linear-gradient(90deg, rgba(115,192,232,1), rgba(174,139,238,.98), rgba(244,161,198,.96), rgba(255,255,255,1), rgba(115,192,232,1)) border-box;
  background-size: 100% 100%, 360% 360%;
  animation: searchGlow 16s ease-in-out infinite;
  box-shadow: 0 16px 42px rgba(82, 92, 128, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.command-search input,
.command-search select {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.command-search input {
  font-size: 18px;
}

.command-search input:focus,
.command-search select:focus {
  outline: 0;
  box-shadow: none;
}

.command-search select {
  color: var(--muted);
  min-height: 36px;
  padding-left: 2px;
}

.command-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.command-close:hover {
  background: rgba(148,163,184,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  filter: none;
}

.command-results {
  max-height: 62vh;
  overflow: auto;
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 64px rgba(82, 92, 128, .18);
}

.command-results:empty {
  display: none;
}

.command-results section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.command-results button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  justify-content: stretch;
  text-align: left;
  background: rgba(248,250,252,.72);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
}

.result-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.result-main strong,
.result-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-main small {
  color: var(--muted);
  font-size: 13px;
}

.result-status {
  justify-self: end;
  align-self: center;
  min-width: 74px;
  display: flex;
  justify-content: flex-end;
}

.command-results button:hover {
  background: rgba(148,163,184,.12);
}

tr:hover td,
.dash-list button:hover,
.widget-library button:hover,
.theme-card:hover,
.upload-form:hover {
  background-color: var(--table-row-hover);
}

body.theme-aurora .global-search:hover {
  box-shadow: 0 12px 34px rgba(124, 58, 237, .12), 0 0 0 1px rgba(255,255,255,.38);
}

body.theme-aurora .sidebar,
body.theme-aurora .panel,
body.theme-aurora .dash-card,
body.theme-aurora .table-scroll,
body.theme-aurora .inventory-table-wrap,
body.theme-aurora .settings-panel {
  background: var(--panel-bg);
  border-color: rgba(161, 183, 226, .46);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-aurora .dialog-card {
  background:
    linear-gradient(var(--modal-bg), var(--modal-bg)) padding-box,
    linear-gradient(110deg, rgba(115,192,232,.55), rgba(174,139,238,.42), rgba(244,161,198,.38), rgba(115,192,232,.55)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-aurora input,
body.theme-aurora select,
body.theme-aurora textarea {
  background: var(--input-bg);
}

body.theme-aurora button:hover {
  box-shadow: 0 0 0 3px rgba(125, 168, 231, .12);
}

body.theme-zen .badge {
  filter: saturate(.72);
}

body.theme-zen .theme-card,
body.theme-zen .widget-library button,
body.theme-zen .dash-list button,
body.theme-zen .dash-metrics button,
body.theme-zen .quick-link-icon {
  background: #f4f1ea;
  border-color: #ddd6c9;
}

body.theme-midnight .main,
body.theme-midnight .sidebar {
  color: var(--text-main);
}

body.theme-midnight .panel,
body.theme-midnight .dash-card,
body.theme-midnight .table-scroll,
body.theme-midnight .inventory-table-wrap,
body.theme-midnight .settings-panel,
body.theme-midnight .theme-card,
body.theme-midnight .widget-library button,
body.theme-midnight .dialog-card,
body.theme-midnight .settings-popover,
body.theme-midnight .command-results {
  background: var(--panel-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}

body.theme-midnight input,
body.theme-midnight select,
body.theme-midnight textarea,
body.theme-midnight .dash-list button,
body.theme-midnight .dash-metrics button,
body.theme-midnight .quick-link-icon,
body.theme-midnight .quick-link-tools button,
body.theme-midnight .secondary {
  background: var(--input-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}

body.theme-midnight th,
body.theme-midnight .inventory-table thead th,
body.theme-midnight .planner-table thead th {
  background: var(--table-header-bg);
  color: var(--text-muted);
  border-color: var(--border-color);
}

body.theme-midnight td,
body.theme-midnight .purchase-detail-row td,
body.theme-midnight .sku-detail-row td {
  background: var(--panel-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}

body.theme-midnight tr:hover td {
  background: var(--table-row-hover);
}

body.theme-midnight .muted,
body.theme-midnight small,
body.theme-midnight .panel-head p,
body.theme-midnight .list-head p,
body.theme-midnight .dash-footer,
body.theme-midnight .table-counter,
body.theme-midnight .result-main small,
body.theme-midnight .global-search strong,
body.theme-midnight .menu-title {
  color: var(--text-soft);
}

body.theme-midnight .menu-item {
  color: var(--text-muted);
}

body.theme-midnight .menu-item.active {
  background: #243041;
  color: #f8fafc;
  box-shadow: inset 3px 0 0 #60a5fa;
}

body.theme-midnight .global-search,
body.theme-midnight .command-search {
  background:
    linear-gradient(#1b2330, #1b2330) padding-box,
    linear-gradient(90deg, rgba(94, 234, 212, .42), rgba(96, 165, 250, .42), rgba(244, 114, 182, .34), rgba(94, 234, 212, .42)) border-box;
  color: var(--text-main);
}

body.theme-midnight .command-search input,
body.theme-midnight .command-search select {
  background: transparent;
}

body.theme-midnight .badge.ok {
  background: rgba(22, 115, 74, .24);
  color: #86efac;
}

body.theme-midnight .badge.warn {
  background: rgba(154, 91, 0, .26);
  color: #facc15;
}

body.theme-midnight .badge.neutral {
  background: #334155;
  color: #cbd5e1;
}

body.theme-midnight button:disabled,
body.theme-midnight input:disabled,
body.theme-midnight select:disabled,
body.theme-midnight textarea:disabled {
  opacity: .62;
  color: var(--text-soft);
}

body.no-card-shadow .dashboard-hero,
body.no-card-shadow .dash-card,
body.no-card-shadow .panel,
body.no-card-shadow .inventory-metrics article {
  box-shadow: none;
}

body.square-cards .dashboard-hero,
body.square-cards .dash-card,
body.square-cards .panel,
body.square-cards .table-scroll,
body.square-cards .inventory-table-wrap,
body.square-cards .settings-panel {
  border-radius: 0;
}

.row-highlight {
  animation: rowFlash 1.6s ease;
}

@keyframes rowFlash {
  0%, 70% { background: #fff7d6; }
  100% { background: transparent; }
}

.option-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.gift-option-row {
  grid-template-columns: 120px minmax(160px, 1fr) minmax(120px, 1fr) auto auto auto;
}

@media (max-width: 1180px) {
  .dashboard-hero {
    display: grid;
  }

  .widget-S,
  .widget-M,
  .widget-L {
    grid-column: span 6;
  }

  .purchase-stats,
  .widget-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-filters,
  .item-picker {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .batch-field-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .batch-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) and (max-width: 1400px) {
  body {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  body {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .sidebar .brand {
    justify-content: center;
  }
  .sidebar .brand-text,
  .sidebar .menu {
    display: none;
  }
}

@media (max-width: 900px) {
  body,
  body.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(280px, 84vw);
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar:not(.collapsed) {
    transform: translateX(0);
  }
  .main {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .widget-S,
  .widget-M,
  .widget-L,
  .widget-XL,
  .add-widget {
    grid-column: span 12;
  }
  .theme-cards,
  .widget-library {
    grid-template-columns: 1fr;
  }
  .purchase-stats {
    grid-template-columns: 1fr;
  }
  .command-results button {
    grid-template-columns: 1fr;
  }
}

.v2-workspace-tabs button {
  min-width: 120px;
}

.stage-a-overview article strong {
  font-size: 20px;
}

.stage-a-overview {
  gap: 12px;
}

.stage-a-overview article {
  position: relative;
  min-height: 90px;
  overflow: hidden;
  padding: 16px 18px;
  border-color: #e1e8f1;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff 18%, var(--metric-tint, #f3f7ff) 100%);
}
.stage-a-overview article::after {
  content: "";
  position: absolute;
  left: -6%;
  bottom: -16px;
  width: 112%;
  height: 58px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--metric-accent, #5e8ff2) 24%, #fff), var(--metric-accent, #5e8ff2));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 100' preserveAspectRatio='none'%3E%3Cpath d='M0 58 C118 18 218 86 354 52 C498 16 612 34 800 4 L800 100 L0 100 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 100' preserveAspectRatio='none'%3E%3Cpath d='M0 58 C118 18 218 86 354 52 C498 16 612 34 800 4 L800 100 L0 100 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: .085;
  transform: none;
}
.stage-a-overview article::before {
  display: none;
}
.stage-a-overview article > * { position: relative; z-index: 1; }
.stage-a-overview article span { color: #65758b; font-weight: 700; }
.stage-a-overview article strong { margin-top: 7px; color: #1d2939; font-size: 22px; line-height: 1.1; }
.stage-a-overview .tone-primary { --metric-accent:#5c87ed; --metric-tint:#f0f5ff; }
.stage-a-overview .tone-success { --metric-accent:#27b777; --metric-tint:#effaf5; }
.stage-a-overview .tone-finance { --metric-accent:#8b6de9; --metric-tint:#f5f1ff; }
.stage-a-overview .tone-warning { --metric-accent:#ee9b36; --metric-tint:#fff7ec; }
.stage-a-overview .tone-danger { --metric-accent:#e65d68; --metric-tint:#fff1f2; }

.profit-quality-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid #dcebe5;
  border-radius: 13px;
  background: linear-gradient(135deg, #fbfefd, #f4faf8);
}
.profit-quality-title {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-width: 170px;
}
.profit-quality-title h4 { margin: 0; color: #243247; font-size: 16px; }
.profit-quality-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
}
.profit-quality-icon img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.profit-quality-panel .quality-grid { flex: 1 1 auto; }
.profit-quality-panel .quality-pill {
  min-height: 34px;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 9px;
  background: rgba(255,255,255,.72);
  font-size: 12px;
}
.profit-quality-panel .quality-pill.ok { color: #23955f; }
.profit-quality-panel .quality-pill.bad { color: #c84b58; }
.profit-quality-panel .quality-pill i {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
  font-style: normal;
}

@media (max-width: 900px) {
  .profit-quality-panel { align-items: flex-start; flex-direction: column; gap: 14px; }
  .profit-quality-title { min-width: 0; }
  .stage-a-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .stage-a-overview { grid-template-columns: 1fr; }
}

.profit-section-block {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.profit-section-block h4 {
  margin: 0 0 12px;
}

.quality-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  background: #eef2f7;
  color: #475569;
}

.quality-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.quality-pill.bad {
  background: #fee2e2;
  color: #b91c1c;
}

.profit-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(520px, 100%);
  flex: 1 1 420px;
}

.profit-search-wrap input {
  flex: 1;
  min-width: 0;
  padding-right: 112px;
}

.profit-search-icon-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profit-search-icon-button {
  right: 8px;
}

.profit-search-icon-button:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, .14);
  border-radius: 8px;
}

.profit-search-icon-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-clear-search-button {
  min-height: 44px;
  white-space: nowrap;
}

.profit-clear-search-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.profit-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profit-pagination input {
  width: 76px;
  height: 38px;
  text-align: center;
}
.profit-cost-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.profit-cost-filter-row select,
.profit-cost-filter-row button {
  min-height: 42px;
}

.profit-result-section {
  margin-top: 18px;
}

.profit-result-section h4 {
  margin-bottom: 10px;
}

.profit-table-wrap.fixed-height.small-height {
  height: min(360px, 42vh);
}

.profit-step-actions.end {
  justify-content: flex-end;
  margin-top: 16px;
}

.profit-table-wrap.fixed-height {
  height: min(560px, 58vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profit-table-wrap.fixed-height table {
  min-width: 1380px;
  table-layout: fixed;
}

.profit-table-wrap.fixed-height th,
.profit-table-wrap.fixed-height td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.profit-table-wrap.fixed-height thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.profit-table-wrap.fixed-height th:nth-child(1),
.profit-table-wrap.fixed-height td:nth-child(1) { width: 48px; text-align: center; }
.profit-table-wrap.fixed-height th:nth-child(2),
.profit-table-wrap.fixed-height td:nth-child(2) { width: 150px; }
.profit-table-wrap.fixed-height th:nth-child(3),
.profit-table-wrap.fixed-height td:nth-child(3) { width: 140px; }
.profit-table-wrap.fixed-height th:nth-child(4),
.profit-table-wrap.fixed-height td:nth-child(4) { width: 210px; }
.profit-table-wrap.fixed-height th:nth-child(5),
.profit-table-wrap.fixed-height td:nth-child(5) { width: 150px; }
.profit-table-wrap.fixed-height th:nth-child(6),
.profit-table-wrap.fixed-height td:nth-child(6) { width: 110px; }
.profit-table-wrap.fixed-height th:nth-child(7),
.profit-table-wrap.fixed-height td:nth-child(7) { width: 110px; }
.profit-table-wrap.fixed-height th:nth-child(8),
.profit-table-wrap.fixed-height td:nth-child(8) { width: 150px; }
.profit-table-wrap.fixed-height th:nth-child(9),
.profit-table-wrap.fixed-height td:nth-child(9) { width: 260px; }
.profit-table-wrap.fixed-height th:nth-child(10),
.profit-table-wrap.fixed-height td:nth-child(10) { width: 260px; }
.profit-table-wrap.fixed-height th:nth-child(11),
.profit-table-wrap.fixed-height td:nth-child(11) { width: 260px; }
.profit-table-wrap.fixed-height th:nth-child(12),
.profit-table-wrap.fixed-height td:nth-child(12) { width: 100px; }

.profit-table-wrap .text-cell {
  max-width: 260px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-weight: 700;
  font-size: 12px;
}

.status-pill.warning {
  background: #fff4d8;
  color: #8a5a00;
}

.status-pill.danger {
  background: #ffe4e4;
  color: #b42318;
}

.status-pill.success {
  background: #dcfce7;
  color: #166534;
}

.status-pill.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.muted {
  background: #eef2f7;
  color: #667085;
}

.profit-bi-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 18px 0 16px;
  padding: 5px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: #eef2f6;
  border: 1px solid #e4e9f1;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
}


.profit-bi-tabs .tab-btn {
  flex: 1 1 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  min-height: 38px;
  padding: 8px 18px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}




.profit-bi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
}

.profit-bi-section-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profit-bi-section-left h4 {
  margin: 0;
}

.profit-bi-toolbar-right {
  justify-content: flex-end;
  margin-left: auto;
}

.profit-bi-filter-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #f7f9fc;
  color: #475467;
}

.profit-bi-filter-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-weight: 900;
}

.profit-bi-filter-note p {
  margin: 0;
  line-height: 1.5;
}

.profit-step-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profit-bi-tabs .tab-btn:hover {
  background: rgba(255, 255, 255, 0.68);
  color: #344054;
}

.profit-bi-tabs .tab-btn.active,
.profit-bi-tabs .tab-btn[aria-selected="true"] {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12);
}

.profit-bi-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.profit-bi-card-row article {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.profit-bi-card-main {
  position: relative;
  z-index: 2;
}

.profit-bi-card-row span {
  display: block;
  color: #667085;
  font-size: 13px;
  margin-bottom: 10px;
}

.profit-bi-card-row strong {
  font-size: 22px;
  color: #172033;
}

.profit-bi-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.profit-bi-toolbar input,
.profit-bi-toolbar select {
  min-height: 40px;
  border: 1px solid #d9e1ec;
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
}

.profit-bi-toolbar input {
  min-width: 320px;
}

.profit-bi-table {
  position: relative;
  isolation: isolate;
  max-height: 560px;
  overflow: auto;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fff;
}

.profit-bi-grid {
  position: relative;
  width: max-content;
  min-width: 100%;
}

.profit-bi-grid-row {
  display: grid;
  grid-template-columns: var(--profit-bi-cols);
  width: max-content;
  min-width: 100%;
}

.profit-bi-grid-head {
  position: sticky;
  top: 0;
  z-index: 3000;
}

.profit-bi-cell {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid #d9e1ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  background: #fff;
}

.profit-bi-head-cell {
  position: sticky;
  top: 0;
  z-index: 3200;
  min-height: 52px;
  display: flex;
  align-items: center;
  background: #f6f8fb;
  font-weight: 800;
  color: #667085;
  box-shadow: inset 0 -1px 0 var(--line);
}

.profit-bi-grid-row:nth-child(odd) .profit-bi-cell {
  background: #ffffff;
}

.profit-bi-grid-row:nth-child(even) .profit-bi-cell {
  background: #f8fafc;
}

.profit-bi-grid-head .profit-bi-cell,
.profit-bi-grid-head .profit-bi-head-cell {
  background: #f6f8fb;
}

.profit-bi-grid-row.total-row .profit-bi-cell {
  position: sticky;
  bottom: 0;
  z-index: 620;
  background: #fbfcff;
  font-weight: 800;
  border-top: 1px solid #d9e1ec;
}

.profit-bi-grid-wrap .sticky-col {
  position: sticky;
  z-index: 1800;
  background-clip: padding-box;
}

.profit-bi-cell.num,
.profit-bi-cell.text {
  text-align: left;
}

.profit-bi-grid-wrap .profit-bi-head-cell.sticky-col {
  z-index: 5200;
  background: #f6f8fb;
}

.profit-bi-grid-wrap .total-row .sticky-col {
  z-index: 2600;
  background: #fbfcff;
}

.profit-bi-grid-wrap .sticky-col.sticky-last {
  border-right: 1px solid #cbd5e1;
  box-shadow: none;
}

.profit-bi-th-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.profit-bi-th-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-bi-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  vertical-align: middle;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.profit-bi-cell-value {
  display: block;
  width: 100%;
  text-align: left;
}

.profit-bi-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  z-index: 5400;
}


.profit-bi-pin:hover {
  background: #eef2f6;
  color: #475467;
}

.profit-bi-pin.active {
  color: #2563eb;
}

.profit-bi-freeze-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
  color: currentColor;
  pointer-events: none;
  flex: 0 0 auto;
  position: relative;
  z-index: 5401;
}

.profit-bi-col-resizer {
  position: absolute;
  top: 8px;
  right: -4px;
  bottom: 8px;
  width: 8px;
  cursor: col-resize;
  z-index: 980;
}

.profit-bi-col-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.profit-bi-head-cell:hover .profit-bi-col-resizer::after,
body.profit-bi-resizing .profit-bi-col-resizer::after {
  background: #94a3b8;
}

body.profit-bi-resizing {
  cursor: col-resize;
  user-select: none;
}

.profit-bi-sort-head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 24px;
  margin-left: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.profit-bi-sort-head span {
  display: block;
  height: 10px;
  line-height: 10px;
  margin: 0;
}

.profit-bi-sort-head:hover,
.profit-bi-sort-head.active {
  color: #2563eb;
}

.profit-bi-metric {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.profit-bi-metric em {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.profit-bi-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
}

.profit-bi-order-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
}

.profit-bi-order-toolbar input {
  width: 100%;
  min-width: 0;
}

.profit-bi-order-toolbar select {
  width: 132px;
}

.profit-bi-count {
  color: #667085;
  font-weight: 700;
  justify-self: end;
}

.profit-bi-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.profit-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  max-height: 420px;
  overflow: auto;
}

.profit-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

@media (max-width: 1280px) {
  .profit-bi-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profit-cost-filter-row {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 860px) {
  .profit-cost-filter-row {
    grid-template-columns: 1fr;
  }
}

.profit-bi-grid-wrap .sticky-col.sticky-last::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: #cbd5e1;
  pointer-events: none;
  z-index: 1;
}

.profit-bi-head-cell .profit-bi-col-resizer {
  z-index: 5400;
}

.profit-bi-th-label,
.profit-bi-cell-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-published-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 100%;
}

#profit-published,
#profit-published .panel,
#profit-published-app {
  min-width: 0;
  max-width: 100%;
}

#profit-published .panel {
  overflow: hidden;
}

.profit-published-head h3 {
  margin: 4px 0;
  font-size: 24px;
}

.profit-published-head .head-actions {
  position: relative;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.profit-published-tabs {
  margin: 12px 0 18px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profit-published-body {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profit-published-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.profit-published-kpis article {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.profit-published-kpis span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.profit-published-kpis strong {
  font-size: 24px;
}

.profit-published-table {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.profit-published-table table {
  min-width: 1180px;
  width: 100%;
  border-collapse: collapse;
}

.profit-published-table th,
.profit-published-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-published-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f7fb;
  color: var(--muted);
}

.profit-published-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #172033;
}

.profit-published-loading p {
  margin: 0;
  color: #667085;
}

.profit-loading-orbit {
  --loader-thickness: 10px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  position: relative;
  background: transparent;
}

.profit-loading-orbit::after {
  top: 1px;
  left: 15px;
  width: 28px;
  height: 15px;
  transform-origin: 14px 28px;
}

.profit-loading-orbit span {
  display: none;
}

.button-spinner {
  --loader-thickness: 3px;
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  background: transparent;
}

.button-spinner::after {
  top: 0;
  left: 4px;
  width: 9px;
  height: 5px;
  transform-origin: 4.5px 8.5px;
  animation-duration: 1s;
}

.profit-pub-hero {
  --hero-bg-start: #eef7ff;
  --hero-bg-mid: #e7f2ff;
  --hero-bg-end: #d8ebff;
  --hero-circle-a: rgba(91, 165, 255, 0.32);
  --hero-circle-b: rgba(42, 124, 236, 0.24);
  --hero-circle-c: rgba(93, 203, 235, 0.26);
  --hero-card-bg: rgba(255, 255, 255, 0.76);
  --hero-card-border: rgba(255, 255, 255, 0.86);
  --hero-pill: rgba(147, 197, 253, 0.92);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(390px, 1.28fr) minmax(225px, 0.66fr) minmax(225px, 0.66fr) minmax(128px, 0.36fr);
  align-items: center;
  gap: 22px;
  min-height: 238px;
  padding: 36px 38px;
  border: 1px solid rgba(191, 219, 254, 0.58);
  border-radius: 24px;
  color: #111827;
  background: linear-gradient(105deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 48%, var(--hero-bg-end) 100%);
  box-shadow: none;
}

.profit-pub-hero::before,
.profit-pub-hero::after {
  content: none;
}

.profit-pub-theme-blue {
  --hero-bg-start: #eff7ff;
  --hero-bg-mid: #e5f1ff;
  --hero-bg-end: #d6eaff;
  --hero-circle-a: rgba(91, 165, 255, 0.34);
  --hero-circle-b: rgba(37, 107, 224, 0.24);
  --hero-circle-c: rgba(73, 198, 232, 0.28);
  --hero-pill: rgba(147, 197, 253, 0.94);
}

.profit-pub-theme-green {
  --hero-bg-start: #f1fbf6;
  --hero-bg-mid: #e8f8f0;
  --hero-bg-end: #dff7ec;
  --hero-circle-a: rgba(16, 185, 129, 0.25);
  --hero-circle-b: rgba(45, 133, 112, 0.22);
  --hero-circle-c: rgba(92, 202, 166, 0.26);
  --hero-pill: rgba(110, 231, 183, 0.9);
}

.profit-pub-theme-purple {
  --hero-bg-start: #f7f3ff;
  --hero-bg-mid: #eee8ff;
  --hero-bg-end: #e9e1ff;
  --hero-circle-a: rgba(139, 92, 246, 0.25);
  --hero-circle-b: rgba(88, 119, 235, 0.22);
  --hero-circle-c: rgba(190, 120, 230, 0.2);
  --hero-pill: rgba(196, 181, 253, 0.92);
}

.profit-pub-theme-warm {
  --hero-bg-start: #fbfbf8;
  --hero-bg-mid: #f2f4f7;
  --hero-bg-end: #eef2f6;
  --hero-circle-a: rgba(148, 163, 184, 0.24);
  --hero-circle-b: rgba(116, 147, 190, 0.2);
  --hero-circle-c: rgba(201, 213, 225, 0.34);
  --hero-pill: rgba(180, 198, 222, 0.88);
}

.profit-pub-theme-navy {
  --hero-bg-start: #edf4ff;
  --hero-bg-mid: #e5efff;
  --hero-bg-end: #dce8ff;
  --hero-circle-a: rgba(30, 64, 175, 0.2);
  --hero-circle-b: rgba(49, 118, 232, 0.24);
  --hero-circle-c: rgba(72, 177, 220, 0.2);
  --hero-pill: rgba(125, 168, 235, 0.92);
}

.profit-pub-geo {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  opacity: 1;
  filter: saturate(1.04);
}

.profit-pub-geo-a {
  right: -9%;
  top: -104%;
  width: min(54%, 700px);
  background: linear-gradient(135deg, var(--hero-circle-a), transparent 74%);
  animation: profitHeroCircleA 9s ease-in-out infinite alternate;
}

.profit-pub-geo-b {
  right: -2%;
  bottom: -78%;
  width: min(34%, 450px);
  background: linear-gradient(160deg, var(--hero-circle-b), transparent 70%);
  animation: profitHeroCircleB 11s ease-in-out infinite alternate-reverse;
}

.profit-pub-geo-c {
  left: 39%;
  bottom: -70%;
  width: min(31%, 410px);
  background: linear-gradient(0deg, var(--hero-circle-c), transparent 74%);
  animation: profitHeroCircleC 10s ease-in-out infinite alternate;
}

.profit-pub-hero > :not(.profit-pub-geo) {
  position: relative;
  z-index: 1;
}

.profit-pub-hero-title p,
.profit-pub-hero-title span {
  display: block;
  margin: 0;
  color: #4b5563;
  font-weight: 800;
}

.profit-pub-hero-title p {
  font-size: 17px;
  letter-spacing: 0;
}

.profit-pub-hero-title h3 {
  margin: 10px 0 12px;
  color: #151922;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1.06;
  letter-spacing: 0;
}

.profit-pub-hero-title span {
  margin-top: 5px;
  font-size: 17px;
  color: #303846;
}

.profit-pub-hero-card {
  display: grid;
  align-content: center;
  min-height: 154px;
  height: 154px;
  padding: 28px 28px;
  border: 1px solid var(--hero-card-border);
  border-radius: 22px;
  background: var(--hero-card-bg);
  backdrop-filter: blur(12px);
  box-shadow: none;
}

.profit-pub-hero-card small,
.profit-pub-hero-card dt {
  color: #1f2937;
  font-size: 19px;
  font-weight: 900;
}

.profit-pub-hero-card strong {
  margin-top: 10px;
  color: #202124;
  font-size: clamp(30px, 2.16vw, 42px);
  line-height: 0.98;
  letter-spacing: 0;
}

.profit-pub-hero-card em {
  width: fit-content;
  margin-top: 16px;
  padding: 5px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--hero-pill);
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
}

.profit-pub-hero dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profit-pub-hero-mini dt {
  font-size: 15px;
}

.profit-pub-hero dd {
  margin: 6px 0 0;
  color: #202124;
  font-size: 22px;
  font-weight: 900;
}

@keyframes profitHeroCircleA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-24px, 12px, 0) scale(1.035); }
}

@keyframes profitHeroCircleB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, -16px, 0) scale(1.05); }
}

@keyframes profitHeroCircleC {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, -12px, 0) scale(1.04); }
}

.profit-pub-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

.profit-published-filter {
  position: relative;
}

.profit-published-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profit-published-filter-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-published-filter-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: 320px;
  padding: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.profit-published-filter-popover h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.profit-published-filter-popover input[type="text"],
.profit-published-filter-popover input[data-profit-published-group-filter-search] {
  width: 100%;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 10px;
}

.profit-published-filter-popover hr {
  border: 0;
  border-top: 1px solid #edf2f7;
  margin: 10px 0;
}

.profit-filter-list {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.profit-filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 9px;
  color: #344054;
  font-weight: 700;
}

.profit-filter-option:hover {
  background: #f8fafc;
}

.profit-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.profit-filter-foot div {
  display: flex;
  gap: 8px;
}

.profit-published-filter-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
}

.profit-published-filter-notice span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 900;
}

.profit-published-filter-notice p {
  margin: 0;
  font-weight: 700;
}

.profit-dashboard-grid {
  display: grid;
  gap: 16px;
}

.profit-dashboard-row-1 {
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
}

.profit-dashboard-row-2,
.profit-dashboard-row-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profit-dashboard-widget {
  min-height: 360px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.profit-dashboard-widget.wide {
  min-width: 0;
}

.profit-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.profit-widget-head h4 {
  margin: 0;
  color: #172033;
  font-size: 17px;
}

.profit-widget-head p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}

.profit-waterfall-svg,
.profit-trend-svg {
  width: 100%;
  height: 300px;
  overflow: visible;
}

.profit-chart-zero,
.profit-grid-line {
  stroke: #e5edf6;
  stroke-width: 1;
}

.profit-waterfall-connector {
  stroke: #cbd5e1;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.profit-chart-bar {
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.profit-chart-bar:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.profit-chart-bar.income {
  fill: #60a5fa;
}

.profit-chart-bar.cost {
  fill: #fb923c;
}

.profit-chart-bar.result {
  fill: #22c55e;
}

.profit-chart-value {
  fill: #344054;
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.profit-chart-label {
  fill: #667085;
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.profit-widget-toggle,
.profit-compare-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}

.profit-widget-toggle button,
.profit-compare-switch button {
  min-width: 34px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.profit-widget-toggle button.active,
.profit-compare-switch button.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.profit-donut-layout {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 12px;
}

.profit-donut-chart {
  width: 260px;
  height: 260px;
}

.profit-donut-chart path {
  transition: opacity 0.18s ease, stroke-width 0.18s ease;
}

.profit-donut-chart path:hover {
  opacity: 0.82;
  stroke-width: 28;
}

.profit-donut-label {
  fill: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.profit-donut-total {
  fill: #172033;
  font-size: 18px;
  font-weight: 900;
  text-anchor: middle;
}

.profit-donut-legend,
.profit-contribution-list,
.profit-attention-list,
.profit-dashboard-cost-chart,
.profit-compare-bars {
  display: grid;
  gap: 10px;
}

.profit-donut-legend div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.profit-donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.profit-donut-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  max-width: 360px;
}

.profit-chart-tooltip {
  position: fixed;
  z-index: 10000;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, .92);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  color: #475569;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .16);
  pointer-events: none;
  font-size: 13px;
  line-height: 1.45;
}

.profit-chart-tooltip.hidden {
  display: none;
}

.profit-chart-tooltip b {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 800;
}

.profit-chart-tooltip div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profit-chart-tooltip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.profit-chart-tooltip span {
  color: #6b7280;
  white-space: nowrap;
}

.profit-chart-tooltip strong {
  color: #475569;
  font-weight: 900;
  white-space: nowrap;
}

.profit-dashboard-cost-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 1fr) 150px;
  align-items: center;
  gap: 12px;
}

.profit-dashboard-cost-row span,
.profit-compare-row span {
  color: #475467;
  font-weight: 800;
}

.profit-dashboard-cost-row div,
.profit-compare-pair {
  display: grid;
  gap: 5px;
}

.profit-dashboard-cost-row div {
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.profit-dashboard-cost-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.profit-dashboard-cost-row strong {
  text-align: right;
  color: #172033;
}

.profit-dashboard-cost-row em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.profit-chart-legend {
  display: flex;
  gap: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.profit-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}

.profit-chart-legend .sales::before {
  background: #60a5fa;
}

.profit-chart-legend .profit::before {
  background: #22c55e;
}

.profit-line-sales,
.profit-line-profit {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-line-sales {
  stroke: #3b82f6;
  fill: none;
}

.profit-line-sales-point {
  stroke: #3b82f6;
  fill: #3b82f6;
}

.profit-line-profit {
  stroke: #22c55e;
  fill: none;
}

.profit-line-profit-point {
  stroke: #22c55e;
  fill: #22c55e;
}

.profit-compare-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
}

.profit-compare-pair i {
  display: block;
  height: 10px;
  border-radius: 999px;
}

.profit-compare-pair .previous {
  background: #dbeafe;
}

.profit-compare-pair .current {
  background: #60a5fa;
}

.profit-chart-empty {
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 1px dashed #dbe5f0;
  border-radius: 12px;
  color: #94a3b8;
  font-weight: 800;
}

.profit-contribution-list article,
.profit-attention-list article {
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.profit-contribution-list article div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profit-contribution-list strong,
.profit-attention-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-contribution-list b {
  display: block;
  margin: 10px 0 4px;
  font-size: 20px;
  color: #172033;
}

.profit-contribution-list em,
.profit-attention-list em,
.profit-attention-list span {
  color: #64748b;
  font-style: normal;
  font-weight: 800;
}

.profit-contribution-list i {
  display: block;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.profit-contribution-list i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.profit-attention-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.profit-attention-list article > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profit-attention-list i {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.profit-pub-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.profit-pub-panel-head,
.profit-pub-section-head,
.profit-pub-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profit-pub-panel-head h4,
.profit-pub-section-head h4,
.profit-pub-product-head h4 {
  margin: 0;
  font-size: 18px;
}

.profit-pub-panel-head p,
.profit-pub-section-head p,
.profit-pub-product-head p {
  margin: 4px 0 0;
  color: #667085;
}

.profit-waterfall {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 230px;
}

.profit-waterfall-item {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #475467;
}

.profit-waterfall-bar {
  width: 52px;
  border-radius: 8px 8px 3px 3px;
  background: #93c5fd;
}

.profit-waterfall-item.cost .profit-waterfall-bar {
  background: #fecaca;
}

.profit-waterfall-item.result .profit-waterfall-bar {
  background: #86efac;
}

.profit-waterfall-item strong {
  font-size: 12px;
  color: #172033;
}

.profit-cost-bars {
  display: grid;
  gap: 12px;
}

.profit-cost-bar-row {
  display: grid;
  grid-template-columns: 90px minmax(120px, 1fr) 160px;
  align-items: center;
  gap: 12px;
}

.profit-cost-bar-row span {
  color: #475467;
  font-weight: 800;
}

.profit-cost-bar-row div {
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.profit-cost-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #34d399);
}

.profit-cost-bar-row strong {
  text-align: right;
  color: #172033;
}

.profit-cost-bar-row em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.profit-pub-rank-cards,
.profit-product-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profit-pub-rank-cards article,
.profit-product-podium article,
.profit-product-rank-list {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.profit-pub-rank-cards h5 {
  margin: 0 0 12px;
  font-size: 15px;
}

.profit-pub-rank-cards article div,
.profit-product-rank-list div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
}

.profit-pub-rank-cards article div:first-of-type,
.profit-product-rank-list div:first-child {
  border-top: 0;
}

.profit-pub-rank-cards b,
.profit-product-rank-list b,
.profit-product-rank-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-quadrant {
  position: relative;
  min-height: 320px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #d9e1ec calc(50% - 1px), #d9e1ec calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), #d9e1ec calc(50% - 1px), #d9e1ec calc(50% + 1px), transparent calc(50% + 1px)),
    #f8fafc;
  overflow: hidden;
}

.profit-quadrant button {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.profit-product-podium article {
  min-height: 178px;
  display: grid;
  align-content: space-between;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.profit-product-podium article span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
}

.profit-product-podium article.rank-1 span {
  background: #fef3c7;
  color: #b45309;
}

.profit-product-podium article.rank-2 span {
  background: #f1f5f9;
  color: #475467;
}

.profit-product-podium article.rank-3 span {
  background: #ffedd5;
  color: #c2410c;
}

.profit-product-podium strong {
  font-size: 20px;
}

.profit-product-podium p {
  min-height: 36px;
  margin: 0;
  color: #475467;
  overflow: hidden;
}

.profit-product-podium b {
  font-size: 24px;
}

.profit-product-podium em {
  color: #667085;
  font-style: normal;
  font-weight: 800;
}

.profit-product-rank-list {
  margin: 14px 0;
  padding: 8px 14px;
}

.profit-product-rank-list div {
  grid-template-columns: 34px 180px minmax(0, 1fr) auto;
}

.profit-product-page-v2 {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.profit-product-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profit-product-stat {
  min-height: 136px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  border: 1px solid #dfe8f4;
  border-radius: 22px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.profit-product-stat.green {
  background: linear-gradient(135deg, #f3fff9, #ffffff);
}

.profit-product-stat.orange {
  background: linear-gradient(135deg, #fff8ed, #ffffff);
}

.profit-product-stat.purple {
  background: linear-gradient(135deg, #f7f3ff, #ffffff);
}

.profit-product-stat h5 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  color: #16a34a;
  font-size: 15px;
  font-weight: 950;
}

.profit-product-stat.orange h5 {
  color: #ea580c;
}

.profit-product-stat.purple h5 {
  color: #7c3aed;
}

.profit-product-stat strong {
  color: #172033;
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
}

.profit-product-stat p {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
}

.profit-product-mini-ring {
  --ring-color: #22c55e;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(15, 23, 42, 0.07) 0);
}

.profit-product-stat.orange .profit-product-mini-ring {
  --ring-color: #f59e0b;
}

.profit-product-mini-ring span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #172033;
  font-size: 15px;
  font-weight: 950;
}

.profit-product-spark {
  flex: 0 0 100px;
  height: 84px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 9px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.11);
}

.profit-product-spark i {
  width: 12px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
}

.profit-product-spark i:nth-child(1) { height: 32px; }
.profit-product-spark i:nth-child(2) { height: 48px; }
.profit-product-spark i:nth-child(3) { height: 64px; }
.profit-product-spark i:nth-child(4) { height: 40px; }

.profit-product-rank-section,
.profit-product-table-section {
  border: 1px solid #dfe8f4;
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profit-product-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profit-product-section-head h4 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 950;
}

.profit-product-section-head p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.profit-product-rank-switch {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: #edf2f7;
}

.profit-product-rank-switch button {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
}

.profit-product-rank-switch button.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.08);
}

.profit-product-top3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profit-product-top3 article {
  position: relative;
  min-height: 214px;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.42);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fffdf7, #fff7ed);
  isolation: isolate;
}

.profit-product-top3 article.rank-2 {
  border-color: rgba(148, 163, 184, 0.48);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.profit-product-top3 article.rank-3 {
  border-color: rgba(251, 146, 60, 0.48);
  background: linear-gradient(135deg, #fffaf5, #fff2e7);
}

.profit-product-top3 .rank-medal {
  position: absolute;
  right: -16px;
  top: 20px;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 31%, rgba(251, 191, 36, 0.16) 32% 48%, rgba(251, 191, 36, 0.07) 49% 64%, transparent 65%);
  color: rgba(180, 83, 9, 0.11);
  font-size: 82px;
  font-weight: 950;
  pointer-events: none;
  z-index: 0;
}

.profit-product-top3 .rank-medal::before,
.profit-product-top3 .rank-medal::after {
  content: "";
  position: absolute;
  bottom: -24px;
  width: 42px;
  height: 72px;
  background: rgba(251, 191, 36, 0.08);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 50% 72%, 24% 100%);
}

.profit-product-top3 .rank-medal::before {
  left: 40px;
  transform: rotate(14deg);
}

.profit-product-top3 .rank-medal::after {
  right: 40px;
  transform: rotate(-14deg);
}

.profit-product-top3 article.rank-2 .rank-medal {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 31%, rgba(148, 163, 184, 0.13) 32% 48%, rgba(148, 163, 184, 0.06) 49% 64%, transparent 65%);
  color: rgba(100, 116, 139, 0.11);
}

.profit-product-top3 article.rank-2 .rank-medal::before,
.profit-product-top3 article.rank-2 .rank-medal::after {
  background: rgba(148, 163, 184, 0.08);
}

.profit-product-top3 article.rank-3 .rank-medal {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.58) 0 31%, rgba(251, 146, 60, 0.14) 32% 48%, rgba(251, 146, 60, 0.06) 49% 64%, transparent 65%);
  color: rgba(194, 65, 12, 0.11);
}

.profit-product-top3 article.rank-3 .rank-medal::before,
.profit-product-top3 article.rank-3 .rank-medal::after {
  background: rgba(251, 146, 60, 0.08);
}

.profit-product-rank-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 96px);
  min-width: 0;
}

.rank-crown {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: #f59e0b;
  filter: drop-shadow(0 2px 3px rgba(245, 158, 11, 0.18));
}

.rank-crown.silver {
  color: #94a3b8;
}

.rank-crown.bronze {
  color: #d97706;
}

.profit-product-top3 article > *:not(.rank-medal) {
  position: relative;
  z-index: 1;
}

.profit-product-rank-title strong {
  color: #172033;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-product-group-tags {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-width: 100%;
}

.profit-product-group-tags i {
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-product-rank-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 18px;
}

.profit-product-rank-metrics p {
  margin: 0;
}

.profit-product-rank-metrics span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.profit-product-rank-metrics b {
  color: #172033;
  font-size: 15px;
  font-weight: 950;
}

.profit-product-rank-metrics b.positive,
.profit-product-alert-list b.positive {
  color: #16a34a;
}

.profit-product-rank-metrics b.negative,
.profit-product-alert-list b.negative {
  color: #ef4444;
}

.profit-product-progress,
.profit-product-rank-list-v2 i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.profit-product-progress {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.profit-product-progress i,
.profit-product-rank-list-v2 em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.profit-product-rank-list-v2 {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.profit-product-rank-list-v2 article {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1.1fr) repeat(4, minmax(88px, 0.8fr)) 120px;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  border: 1px solid #e6edf5;
  border-radius: 13px;
  padding: 8px 14px;
  background: #fff;
  transition: background .16s ease, border-color .16s ease;
}

.profit-product-rank-list-v2 article:hover {
  background: #f8fbff;
  border-color: #d7e4f4;
}

.profit-product-rank-list-v2 article > span {
  color: #172033;
  font-weight: 950;
}

.profit-product-rank-list-v2 strong,
.profit-product-rank-list-v2 b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-product-rank-list-v2 strong {
  color: #172033;
  font-weight: 950;
}

.profit-product-rank-list-v2 b {
  color: #172033;
  font-weight: 900;
}

.profit-rank-mini-metric {
  min-width: 0;
}

.profit-rank-mini-metric small {
  display: block;
  margin-bottom: 2px;
  color: #8a97aa;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.profit-rank-mini-metric b {
  color: #172033;
  font-size: 13px;
  font-weight: 950;
}

.profit-product-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 100%;
  min-width: 0;
}

.profit-product-chart-grid-two {
  align-items: stretch;
}

.profit-product-chart-card {
  min-height: 340px;
}

.profit-product-donut-wrap {
  min-width: 0;
}

.profit-product-donut,
.profit-product-histogram {
  width: 100%;
  height: auto;
  max-height: 290px;
}

.profit-product-donut-segment,
.profit-product-histogram g {
  cursor: pointer;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.profit-product-donut-segment:hover,
.profit-product-histogram g:hover rect:not(.profit-product-histogram-hit) {
  opacity: 0.88;
  filter: drop-shadow(0 6px 10px rgba(59, 130, 246, 0.18));
}

.profit-product-legend {
  display: grid;
  gap: 9px;
}

.profit-product-legend span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.profit-product-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.profit-product-legend b {
  color: #172033;
}

.profit-product-histogram text {
  fill: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.profit-product-alert-list {
  display: grid;
  gap: 11px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.profit-product-alert-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 90px;
  gap: 12px;
  align-items: center;
  border: 1px solid #e6edf5;
  border-radius: 15px;
  padding: 13px 16px;
  background: #fbfdff;
  transition: background .16s ease, border-color .16s ease;
}

.profit-product-alert-list article:hover {
  background: #f8fbff;
  border-color: #d7e4f4;
}

.profit-product-alert-list strong,
.profit-product-alert-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-product-alert-list strong {
  color: #172033;
  font-weight: 950;
}

.profit-product-alert-list small {
  margin-top: 4px;
  color: #64748b;
  font-weight: 750;
}

.profit-product-alert-list em {
  color: #64748b;
  font-style: normal;
  font-weight: 900;
}

.profit-product-alert-list p {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.profit-product-alert-list p span {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.profit-product-alert-list .red { background: #fee2e2; color: #dc2626; }
.profit-product-alert-list .orange { background: #ffedd5; color: #ea580c; }
.profit-product-alert-list .blue { background: #dbeafe; color: #2563eb; }
.profit-product-alert-list .purple { background: #ede9fe; color: #7c3aed; }

.profit-product-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto 150px auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
}

.profit-product-table-toolbar input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 800;
}

.profit-product-table-toolbar select {
  height: 40px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font-weight: 850;
}

.profit-product-table-toolbar span {
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .profit-product-table-toolbar {
    grid-template-columns: 1fr auto auto;
  }

  .profit-product-table-toolbar select,
  .profit-product-table-toolbar [data-profit-published-product-export],
  .profit-product-table-toolbar span {
    grid-column: auto;
  }
}

.profit-product-full-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  overscroll-behavior: contain;
}

.profit-product-full-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.profit-product-full-table th:nth-child(1),
.profit-product-full-table td:nth-child(1) { width: 220px; }
.profit-product-full-table th:nth-child(2),
.profit-product-full-table td:nth-child(2) { width: 260px; }
.profit-product-full-table th:nth-child(3),
.profit-product-full-table td:nth-child(3) { width: 190px; }
.profit-product-full-table th:nth-child(4),
.profit-product-full-table td:nth-child(4),
.profit-product-full-table th:nth-child(5),
.profit-product-full-table td:nth-child(5) { width: 84px; }
.profit-product-full-table th:nth-child(6),
.profit-product-full-table td:nth-child(6),
.profit-product-full-table th:nth-child(7),
.profit-product-full-table td:nth-child(7),
.profit-product-full-table th:nth-child(8),
.profit-product-full-table td:nth-child(8),
.profit-product-full-table th:nth-child(9),
.profit-product-full-table td:nth-child(9),
.profit-product-full-table th:nth-child(10),
.profit-product-full-table td:nth-child(10) { width: 128px; }
.profit-product-full-table th:nth-child(11),
.profit-product-full-table td:nth-child(11) { width: 96px; }

.profit-product-full-table th,
.profit-product-full-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e6edf5;
  color: #172033;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-product-full-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f3f7fb;
  color: #64748b;
  font-weight: 950;
}

.profit-product-main-row:hover td {
  background: #f8fbff;
}

.profit-product-main-row button {
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  background: #fff;
  color: #2563eb;
  font-weight: 950;
}

.profit-product-full-table td.positive,
.profit-product-full-table .positive {
  color: #16a34a;
}

.profit-product-full-table td.negative,
.profit-product-full-table .negative {
  color: #ef4444;
}

.profit-product-variants-row td {
  background: #f8fafc;
}

.profit-product-variants {
  padding: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.profit-product-variants table {
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.profit-product-variants th,
.profit-product-variants td {
  padding: 10px 12px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#product-list,
#product-list .panel-like,
#product-list .product-groups,
#product-list .children,
#product-list .sku-detail,
#product-list .pager {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#product-list .panel-like {
  overflow: hidden;
}

#product-list .children {
  overscroll-behavior-x: contain;
}

#product-list .sku-detail-row,
#product-list .sku-detail-row td {
  max-width: 100%;
  overflow: hidden;
}

#product-list .row-actions button {
  max-width: 100%;
}

@media (max-width: 1500px) {
  .profit-product-top3 {
    grid-template-columns: 1fr;
  }

  .profit-product-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .profit-product-stat-grid {
    grid-template-columns: 1fr;
  }

  .profit-product-donut-wrap {
    grid-template-columns: 1fr;
  }

  .profit-product-rank-list-v2 article {
    grid-template-columns: 34px minmax(120px, 1fr) repeat(2, minmax(92px, auto));
  }

  .profit-product-rank-list-v2 article b:nth-of-type(3),
  .profit-product-rank-list-v2 article b:nth-of-type(4),
  .profit-product-rank-list-v2 article i {
    display: none;
  }
}

.profit-bi-toolbar .secondary.active {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.profit-group-page {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profit-group-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  max-width: 100%;
  min-width: 0;
}

.profit-group-kpi {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  min-height: 154px;
  padding: 22px 26px;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  background: #fff;
  box-shadow: none;
  min-width: 0;
}

.profit-group-kpi.green {
  background: linear-gradient(135deg, #f0fff8, #ffffff);
  --kpi-color: #26c281;
  --kpi-deep: #15905d;
  --kpi-soft: rgba(38, 194, 129, 0.14);
}

.profit-group-kpi.orange {
  background: linear-gradient(135deg, #fff8ed, #ffffff);
  --kpi-color: #f59e0b;
  --kpi-deep: #c56d08;
  --kpi-soft: rgba(245, 158, 11, 0.14);
}

.profit-group-kpi.purple {
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
  --kpi-color: #7c3aed;
  --kpi-deep: #5b21b6;
  --kpi-soft: rgba(124, 58, 237, 0.13);
}

.profit-group-kpi-copy {
  min-width: 0;
}

.profit-group-kpi-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--kpi-deep);
  font-size: 14px;
  font-weight: 900;
}

.profit-group-kpi-title svg {
  width: 18px;
  height: 18px;
}

.profit-group-kpi strong {
  display: block;
  margin-top: 16px;
  color: #172033;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.profit-group-kpi strong small {
  margin-left: 5px;
  color: #475467;
  font-size: 17px;
  font-weight: 900;
}

.profit-group-kpi em {
  display: block;
  margin-top: 14px;
  color: #667085;
  font-style: normal;
  font-weight: 800;
}

.profit-group-kpi-ring {
  width: 112px;
  height: 112px;
  overflow: visible;
}

.profit-group-kpi-ring .ring-bg,
.profit-group-kpi-ring .ring-value {
  fill: none;
  stroke-width: 12;
}

.profit-group-kpi-ring .ring-bg {
  stroke: var(--kpi-soft);
}

.profit-group-kpi-ring .ring-value {
  stroke: var(--kpi-color);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.profit-group-kpi-ring text {
  fill: #172033;
  text-anchor: middle;
  font-size: 18px;
  font-weight: 950;
}

.profit-group-kpi-ring .ring-caption {
  fill: #667085;
  font-size: 10px;
  font-weight: 900;
}

.profit-group-kpi-trend {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 14px;
  width: 112px;
  height: 88px;
  padding: 14px 10px 18px;
  border-radius: 22px;
  background: var(--kpi-soft);
}

.profit-group-kpi-trend span {
  position: relative;
  width: 24px;
  border-radius: 999px 999px 5px 5px;
  background: rgba(124, 58, 237, 0.32);
}

.profit-group-kpi-trend span.current {
  background: var(--kpi-color);
}

.profit-group-kpi-trend i {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  color: #667085;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.profit-group-table-card,
.profit-group-widget {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
}

.profit-group-table-card {
  padding: 18px;
  overflow: hidden;
}

.profit-group-table-head,
.profit-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
}

.profit-group-table-head h4,
.profit-widget-head h4 {
  margin: 0;
  color: #172033;
  font-size: 19px;
}

.profit-group-table-head p,
.profit-widget-head p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.profit-group-table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.profit-group-search {
  height: 42px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #172033;
  font-weight: 800;
}

.profit-group-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  padding: 0 13px;
  color: #94a3b8;
}

.profit-group-search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.profit-group-search input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
  font-weight: 850;
}

.profit-group-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #e5edf6;
  border-radius: 18px;
  background: #f8fafc;
}

.profit-group-table {
  width: 2040px;
  min-width: 2040px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.profit-group-table.operating-expanded {
  width: 2470px;
  min-width: 2470px;
}

.profit-group-table.logistics-expanded {
  width: 2670px;
  min-width: 2670px;
}

.profit-group-table.operating-expanded.logistics-expanded {
  width: 3100px;
  min-width: 3100px;
}

.profit-group-table col.profit-group-col-name {
  width: 340px;
}

.profit-group-table col.profit-group-col-sales {
  width: 210px;
}

.profit-group-table col.profit-group-col-count {
  width: 140px;
}

.profit-group-table col.profit-group-col-money {
  width: 190px;
}

.profit-group-table col.profit-group-col-operating,
.profit-group-table col.profit-group-col-logistics {
  width: 190px;
}

.profit-group-table.operating-expanded col.profit-group-col-operating {
  width: 620px;
}

.profit-group-table.logistics-expanded col.profit-group-col-logistics {
  width: 820px;
}

.profit-group-table col.profit-group-col-rate {
  width: 140px;
}

.profit-group-table col.profit-group-col-contribution {
  width: 210px;
}

.profit-group-table col.profit-group-col-status {
  width: 120px;
}

.profit-group-table th,
.profit-group-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e6edf5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.profit-group-table th {
  background: #f3f7fb;
  color: #64748b;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
}

.profit-group-table tbody tr {
  background: #fff;
  transition: background 0.16s ease;
}

.profit-group-table tbody tr:nth-child(even) {
  background: #f9fbfd;
}

.profit-group-table tbody tr:hover {
  background: #eff6ff;
}

.profit-group-table td b {
  color: #172033;
  font-weight: 900;
  font-size: 15px;
}

.profit-group-table td small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.profit-group-table td.positive b {
  color: #16a34a;
}

.profit-group-table td.negative b {
  color: #ef4444;
}

.profit-group-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 300px;
}

.profit-group-name-cell strong {
  display: block;
  max-width: 258px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #172033;
  font-weight: 950;
}

.profit-group-name-cell .plain-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.profit-bi-inline-ratio {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e8f7ee;
  color: #16834b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.profit-center-trash-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #526176;
  font-weight: 850;
}

.profit-center-trash-button:hover {
  border-color: #b9c9de;
  background: #f7f9fc;
  color: #315f9b;
}

.profit-center-trash-button svg,
.profit-published-audit-eye svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profit-pub-hero-title {
  min-width: 0;
}

.profit-pub-hero-title h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-pub-hero-title.is-medium h3 {
  font-size: clamp(30px, 2.5vw, 42px);
}

.profit-pub-hero-title.is-long h3 {
  font-size: clamp(25px, 2vw, 34px);
}

.profit-pub-period-line,
.profit-group-title-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.profit-published-period-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profit-published-audit-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #66809f;
}

.profit-published-audit-eye:hover {
  background: rgba(255,255,255,.62);
  color: #2f6be5;
}

.profit-pub-hero-profit.is-negative strong,
.profit-pub-hero-profit.is-negative em {
  color: #b84f5a;
}

.profit-pub-hero-profit.is-negative em {
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(184, 79, 90, .2);
}

.profit-published-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profit-published-audit-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e9f2;
  border-radius: 10px;
  background: #f8fafc;
}

.profit-published-audit-grid span,
.profit-published-audit-grid strong {
  display: block;
}

.profit-published-audit-grid span {
  color: #748197;
  font-size: 12px;
  font-weight: 800;
}

.profit-published-audit-grid strong {
  margin-top: 6px;
  color: #172033;
  font-size: 15px;
}

.profit-published-audit-help,
.profit-published-audit-note {
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.profit-published-audit-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #f5f8fc;
}

.profit-published-audit-note .profit-published-audit-eye {
  width: 24px;
  height: 24px;
}

.profit-group-cost-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.profit-group-cost-toggle span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e8eef7;
  color: #58708e;
  font-size: 10px;
}

.profit-group-cost-toggle.active span {
  background: #dceafe;
  color: #2563c9;
}

.profit-group-cost-cell.operating.expanded,
.profit-group-cost-cell.logistics.expanded {
  background: #f5f9ff;
}

.profit-group-cost-breakdown {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 8px;
}

.profit-group-cost-breakdown span {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: #eaf2fd;
}

.profit-group-cost-breakdown small,
.profit-group-cost-breakdown b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .profit-pub-hero-title h3,
  .profit-pub-hero-title.is-medium h3,
  .profit-pub-hero-title.is-long h3 {
    white-space: normal;
    font-size: 28px;
  }

  .profit-published-audit-grid {
    grid-template-columns: 1fr;
  }

  .profit-published-audit-note {
    align-items: flex-start;
  }
}

.profit-group-contribution {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profit-group-contribution span {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.profit-group-contribution i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.profit-group-contribution i.positive {
  background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.profit-group-contribution i.negative {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}

.profit-group-status {
  display: inline-flex;
  min-width: 56px;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.profit-group-status.profit {
  background: #dcfce7;
  color: #15803d;
}

.profit-group-status.loss {
  background: #fee2e2;
  color: #dc2626;
}

.profit-group-status.flat {
  background: #f1f5f9;
  color: #64748b;
}

.profit-group-sort {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 20px;
  width: 20px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.profit-group-sort:hover,
.profit-group-sort.active {
  background: #eaf2ff;
  color: #2563eb;
}

.profit-group-sort .tri {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.profit-group-sort .tri.up {
  border-bottom: 6px solid currentColor;
}

.profit-group-sort .tri.down {
  border-top: 6px solid currentColor;
}

.profit-group-sort .tri:not(.on) {
  color: #b6c1d1;
}

.profit-group-th-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.profit-group-th-main > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-group-table th.sticky-col,
.profit-group-table td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
}

.profit-group-table th.sticky-col {
  z-index: 5;
  background: #f3f7fb;
}

.profit-group-table td.sticky-col {
  background: #fff;
}

.profit-group-table tbody tr:nth-child(even) td.sticky-col {
  background: #f9fbfd;
}

.profit-group-table tbody tr:hover td.sticky-col {
  background: #eff6ff;
}

.profit-group-table tfoot td {
  background: #f8fafc;
  border-top: 1px solid #d8e2ef;
  font-weight: 950;
}

.profit-group-table tfoot td.sticky-col {
  background: #f8fafc;
  z-index: 4;
}

.profit-group-table .sticky-last {
  border-right: 1px solid #ccd7e5;
}

.profit-group-pin {
  width: 28px;
  height: 28px;
}

.profit-group-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.profit-group-widget {
  min-height: 360px;
  padding: 20px;
  overflow: hidden;
}

.profit-group-donut-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.85fr);
  align-items: center;
  gap: 16px;
}

.profit-group-donut {
  width: min(260px, 100%);
  margin: 0 auto;
}

.profit-donut-bg {
  fill: none;
  stroke: #edf2f7;
  stroke-width: 12;
}

.profit-donut-segment {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: opacity 0.18s ease, stroke-width 0.18s ease;
}

.profit-donut-segment:hover {
  opacity: 0.78;
  stroke-width: 14;
}

.profit-donut-center b,
.profit-donut-center span {
  display: block;
  text-align: center;
}

.profit-donut-center span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

.profit-donut-center b {
  color: #172033;
  font-size: 18px;
  font-weight: 950;
}

.profit-group-donut-legend,
.profit-radar-legend {
  display: grid;
  gap: 10px;
}

.profit-group-donut-legend div,
.profit-radar-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.profit-group-donut-legend i,
.profit-radar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.profit-group-histogram {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin-top: 8px;
  overflow: visible;
}

.profit-group-histogram text {
  font-size: 12px;
}

.profit-group-histogram .profit-histogram-bar {
  fill: url("#profitGroupHistogramGradient");
  fill: #60a5fa;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.profit-group-histogram .profit-histogram-bar:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.profit-radar-wrap {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(140px, 0.75fr);
  align-items: center;
  gap: 10px;
}

.profit-group-radar {
  width: 100%;
  min-height: 260px;
}

.profit-radar-ring,
.profit-radar-axis {
  fill: none;
  stroke: #dbe7f4;
  stroke-width: 1;
}

.profit-radar-label {
  fill: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.profit-radar-series {
  fill: var(--radar-color);
  fill-opacity: 0.14;
  stroke: var(--radar-color);
  stroke-width: 2;
  transition: fill-opacity 0.18s ease, stroke-width 0.18s ease;
  pointer-events: auto;
}

.profit-radar-series:hover {
  fill-opacity: 0.24;
  stroke-width: 3;
}

.profit-filter-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3f6fb;
  color: #475467;
  font-weight: 800;
}

.profit-filter-notice i {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-style: normal;
}

@media (max-width: 1280px) {
  .profit-pub-overview-grid,
  .profit-pub-rank-cards,
  .profit-product-podium,
  .profit-group-kpi-grid,
  .profit-group-chart-grid {
    grid-template-columns: 1fr;
  }

  .profit-group-donut-box,
  .profit-radar-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .profit-pub-hero {
    grid-template-columns: 1fr;
  }
}

/* Sidebar responsive rules kept last to win over legacy breakpoints. */
@media (min-width: 1200px) {
  body:not(.sidebar-collapsed) {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body:not(.sidebar-collapsed) .sidebar {
    width: 260px;
  }
}

@media (min-width: 901px) and (max-width: 1199px) {
  body:not(.sidebar-collapsed) {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body:not(.sidebar-collapsed) .sidebar {
    width: 260px;
  }

  body.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar.collapsed {
    width: 72px;
    padding: 20px 8px 14px;
  }

  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .sidebar-user,
  .sidebar.collapsed .menu-group-label,
  .sidebar.collapsed .menu-home-label,
  .sidebar.collapsed .menu-chevron,
  .sidebar.collapsed .menu-group-items,
  .sidebar.collapsed .settings-menu span:not(.menu-settings-icon) {
    display: none;
  }

  .sidebar.collapsed .menu,
  .sidebar.collapsed .settings-menu-wrap {
    display: flex;
  }

  .sidebar.collapsed .menu {
    flex-direction: column;
    overflow: visible;
  }

  .sidebar.collapsed .menu-group-head,
  .sidebar.collapsed .menu-item,
  .sidebar.collapsed .settings-menu {
    justify-content: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  .sidebar,
  .sidebar.collapsed {
    width: min(260px, 88vw);
    padding: 20px 12px 14px;
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 18px 0 48px rgba(15, 23, 42, .18);
  }

  .sidebar:not(.collapsed) .brand-text,
  .sidebar:not(.collapsed) .menu-group-label,
  .sidebar:not(.collapsed) .menu-chevron,
  .sidebar:not(.collapsed) .menu-group-items,
  .sidebar:not(.collapsed) .settings-menu span:not(.menu-settings-icon) {
    display: initial;
  }

  .sidebar:not(.collapsed) .menu {
    display: flex;
  }

  .sidebar:not(.collapsed) .settings-menu-wrap {
    display: block;
  }

  .mobile-sidebar-trigger {
    position: fixed;
    z-index: 75;
    left: 14px;
    top: 14px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--panel-bg);
    color: var(--text-main);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .1);
  }

  .mobile-sidebar-trigger svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.sidebar-drawer-open .mobile-sidebar-trigger {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.sidebar-drawer-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .page-head {
    padding-left: 52px;
  }
}
/* Unified permission and account-management surfaces */
.permission-hidden { display: none !important; }
.permission-disabled { cursor: not-allowed !important; opacity: .58; }
.permission-denied-view { min-height: min(68vh, 680px); place-items: center; }
.permission-denied-view.active { display: grid; }
.permission-denied-card { width: min(520px, calc(100vw - 40px)); padding: 52px 42px; text-align: center; background: #fff; border: 1px solid #e3e9f2; border-radius: 20px; }
.permission-denied-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; color: #4774d8; background: #eef4ff; border-radius: 18px; }
.permission-denied-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.permission-denied-card h3 { margin: 0 0 10px; font-size: 24px; color: #182230; }
.permission-denied-card p { margin: 0 0 24px; color: #667085; }
.user-readonly-notice { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; color: #58677c; background: #eef2f7; border-radius: 9px; font-size: 13px; font-weight: 700; }

.user-account-dialog { width: min(1120px, calc(100vw - 40px)); height: min(90vh, 960px); max-width: none; max-height: 90vh; padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(15, 23, 42, .24); }
.user-account-dialog::backdrop { background: rgba(19, 28, 43, .48); backdrop-filter: blur(5px); }
.user-account-panel { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; overflow: hidden; color: #182230; }
#user-form-content { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; min-height: 0; overflow: hidden; }
.user-account-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 16px 26px; border-bottom: 1px solid #e7ebf1; }
.user-account-header h3 { margin: 0; font-size: 23px; }
.user-account-header p { margin: 3px 0 0; color: #8792a3; font-size: 12px; letter-spacing: .04em; }
.user-account-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #475467; background: transparent; border: 0; border-radius: 10px; font-size: 27px; font-weight: 300; }
.user-account-close:hover { background: #f1f4f8; }
.user-account-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 20px 24px 30px; background: #f7f9fc; }
.user-account-summary { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(280px, .9fr); gap: 20px; align-items: center; padding: 20px 22px; margin-bottom: 14px; background: linear-gradient(135deg, #fff 0%, #f5f8ff 100%); border: 1px solid #e1e7f0; border-radius: 16px; }
.user-account-avatar { width: 76px; height: 76px; font-size: 24px; }
.user-account-identity h4 { margin: 0 0 6px; font-size: 22px; }
.user-account-identity p { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: #667085; }
.user-account-identity p button { width: 26px; height: 26px; padding: 4px; color: #667085; background: transparent; border: 0; }
.user-account-identity p button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.user-account-identity > div { display: flex; gap: 8px; align-items: center; }
.user-account-login-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; padding-left: 22px; border-left: 1px solid #dce3ed; }
.user-account-login-meta div { min-width: 0; }
.user-account-login-meta dt { color: #8a96a8; font-size: 12px; }
.user-account-login-meta dd { margin: 4px 0 0; overflow: hidden; color: #344054; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-account-section { margin-top: 14px; padding: 19px 20px 21px; background: #fff; border: 1px solid #e1e7f0; border-radius: 16px; }
.user-account-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.user-account-section-head h4 { margin: 0; font-size: 17px; }
.user-account-section-head p { margin: 4px 0 0; color: #7a8699; font-size: 12px; }
.user-account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.user-account-fields > label:not(.user-account-toggle), .user-security-grid > label:not(.user-account-toggle) { display: grid; gap: 7px; color: #4a5668; font-size: 13px; font-weight: 650; }
.user-account-fields > label:not(.user-account-toggle) { align-self:start; }
.user-field-label { display:inline-flex; align-items:center; gap:4px; color:#4a5668 !important; }
.user-field-label i { color:#e04452; font-style:normal; }
.user-account-fields input, .user-account-fields textarea, .user-security-grid input { width: 100%; min-height: 42px; padding: 10px 12px; color: #182230; background: #fff; border: 1px solid #d8e0ea; border-radius: 9px; outline: none; }
.user-account-fields input:focus, .user-account-fields textarea:focus, .user-security-grid input:focus { border-color: #7aa1ff; box-shadow: 0 0 0 3px rgba(82, 127, 244, .1); }
.user-account-fields textarea { min-height: 90px; resize: vertical; }
.user-account-fields small { color: #98a2b3; font-weight: 400; }
.user-account-note { grid-row: span 2; }
.user-account-toggle { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 11px 12px; background: #f7f9fc; border: 1px solid #e5eaf1; border-radius: 10px; }
.user-account-toggle input { width: 17px; height: 17px; min-height: 0; margin-top: 2px; accent-color: #3971ed; }
.user-account-toggle span { display: grid; gap: 3px; color: #344054 !important; font-size: 13px; font-weight: 700; }
.user-account-toggle small { color: #8b96a8; font-size: 11px; font-weight: 400; }
.permission-mode-actions { display: flex; align-items: center; gap: 10px; }
.permission-mode-actions strong { color: #526176; font-size: 12px; }
.permission-mode-actions button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.user-role-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.user-role-option { display: flex; align-items: flex-start; gap: 9px; min-height: 78px; padding: 12px; text-align: left; color: #475467; background: #fff; border: 1px solid #dde4ed; border-radius: 12px; }
.user-role-option i { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 4px; background: #91a0b4; border-radius: 50%; }
.user-role-option span { display: grid; gap: 4px; }
.user-role-option strong { color: #253247; }
.user-role-option small { color: #8a95a6; font-size: 10px; line-height: 1.35; }
.user-role-option.active { border-color: #6f91ed; background: #f3f7ff; box-shadow: 0 0 0 2px rgba(73, 116, 231, .08); }
.user-role-option.role-admin i { background: #8a63dd; }.user-role-option.role-operator i { background: #30a66f; }.user-role-option.role-operator_assistant i { background: #2e9ebd; }.user-role-option.role-boss i { background: #d89929; }.user-role-option.role-visitor i { background: #7589a3; }
.permission-role-notice { margin: -3px 0 15px; padding: 10px 12px; color: #6941c6; background: #f4f0ff; border-radius: 9px; font-size: 12px; }
.permission-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.permission-module-card { min-width: 0; padding: 13px; background: #fbfcfe; border: 1px solid #e1e7ef; border-radius: 12px; }
.permission-module-card header { display: flex; align-items: center; gap: 8px; min-height: 27px; margin-bottom: 9px; }
.permission-module-card header > span { display: grid; place-items: center; width: 24px; height: 24px; color: #5277c6; }
.permission-module-card header svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.permission-module-card h5 { flex: 1; margin: 0; color: #26364b; font-size: 13px; }
.permission-module-card header input { width: 16px; height: 16px; accent-color: #3971ed; }
.permission-module-card > div { display: grid; gap: 7px; }
.permission-check { display: flex; align-items: flex-start; gap: 8px; color: #526176; font-size: 12px; line-height: 1.35; }
.permission-check input { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; accent-color: #3971ed; }
.permission-check span { display: grid; gap: 2px; }
.permission-check small { color: #a0a9b7; font-size: 9px; }
.permission-check.is-dependent-disabled { opacity: .46; }
.permission-module-card.system-derived p { margin: 0; color: #667085; font-size: 11px; line-height: 1.55; }
.permission-lock { color: #8b96a8; font-size: 10px; font-style: normal; }
.user-security-grid { display: grid; grid-template-columns: minmax(260px, 420px); gap: 12px; align-items: start; }
.password-input-line { display: flex; gap: 8px; }.password-input-line input { flex: 1; }.password-input-line button { flex: 0 0 auto; min-width: 88px; }
.reset-password-panel-button { min-height: 42px; justify-self: start; }
.user-account-footer { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 13px 24px; background: rgba(255, 255, 255, .96); border-top: 1px solid #e1e7ef; backdrop-filter: blur(10px); }
.user-account-footer > div { display: flex; gap: 10px; }
.user-account-footer button { min-height: 42px; padding: 0 18px; border-radius: 9px; }
.user-footer-active { display:flex; align-items:center; gap:10px; color:#344054; font-size:13px; font-weight:700; cursor:pointer; }
.user-footer-active input { position:relative; width:42px; height:24px; margin:0; appearance:none; border-radius:999px; background:#cbd2dc; transition:.18s ease; }
.user-footer-active input::after { position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.2); content:""; transition:.18s ease; }
.user-footer-active input:checked { background:#38a169; }
.user-footer-active input:checked::after { transform:translateX(18px); }
.user-login-history { margin-top:14px; border-top:1px solid #e5eaf1; padding-top:12px; }
.user-login-history summary { color:#3971ed; font-size:13px; font-weight:700; cursor:pointer; }
.user-login-history > div { display:grid; gap:7px; margin-top:10px; }
.user-login-history article { display:grid; grid-template-columns:24px 150px minmax(0,1fr); gap:8px; align-items:center; padding:8px 10px; border-radius:8px; background:#f7f9fc; }
.user-login-history article span { color:#98a2b3; }
.user-login-history article strong { font-size:12px; }
.user-login-history article small { overflow:hidden; color:#7a8699; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.danger-text { color: #d92d3d; background: transparent; border: 1px solid transparent; }
.danger-text:hover { background: rgba(217, 45, 61, .07); }.danger-text:disabled { opacity: .4; cursor: not-allowed; }
.user-role-badge.assistant { color: #087f9b; background: #e4f7fb; }.user-role-badge.boss { color: #946200; background: #fff3d6; }.user-role-badge.visitor { color: #52657c; background: #edf2f7; }
.square-cards .user-account-dialog, .square-cards .user-account-summary, .square-cards .user-account-section, .square-cards .permission-module-card, .square-cards .user-role-option { border-radius: 0 !important; }
body.card-shadow-enabled .user-account-section, body.card-shadow-enabled .user-account-summary { box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }

@media (max-width: 900px) {
  .user-account-dialog { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .user-account-panel { height: 100%; max-height: none; }
  .user-account-scroll { padding: 14px; }
  .user-account-summary { grid-template-columns: auto 1fr; }
  .user-account-login-meta { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid #dce3ed; }
  .user-role-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .user-access-dialog { width: calc(100vw - 20px); }
  .user-access-dialog-card { padding: 22px 18px 16px; }
  .user-dialog-details > div { grid-template-columns: 1fr; gap: 5px; }
  .user-account-fields, .permission-card-grid, .user-role-picker { grid-template-columns: 1fr; }
  .user-account-footer { padding: 10px 14px; }
  .user-account-footer > div:first-child { display: none; }
  .user-account-footer > div:last-child { width: 100%; }.user-account-footer > div:last-child button { flex: 1; }
}

/* 2026-08 UI convergence: transparent page shells and profile center */
#business-memos-app.business-workspace,
#business-warehouse-app.business-workspace,
#business-returns-app.business-workspace,
#business-gifts-app.business-workspace { padding:0; border:0; background:transparent; box-shadow:none; }
.account-center-title { grid-column:1 / -1; display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.account-center-title h3 { margin:0; font-size:22px; }
.account-center-title p { margin:4px 0 0; color:#7d8ba1; }
.account-center-section-head { margin-bottom:4px; }
.account-center-section-head h4 { margin:0; color:#182230; font-size:16px; }
.account-center-section-head p { margin:4px 0 0; color:#98a2b3; font-size:12px; }
.account-center-avatar-preview { min-height:132px; display:grid; place-items:center; border:1px dashed #cfd8e6; border-radius:13px; background:#f8fafc; }
.settings-popover { border:1px solid rgba(226,232,240,.9); background:rgba(255,255,255,.94); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:0 18px 48px rgba(15,23,42,.14); }
.settings-popover-user { padding:12px; border-radius:12px; background:linear-gradient(135deg,#f3f8ff,#eef2ff); }
.profit-config-dialog-card { width:min(1080px,calc(100vw - 48px)); max-height:min(88vh,900px); overflow:auto; border:1px solid rgba(255,255,255,.78); background:linear-gradient(140deg,rgba(255,255,255,.96),rgba(248,251,255,.88)); box-shadow:0 24px 70px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.85); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }

.product-type-card-selector { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.product-type-card-selector button { min-height:50px; display:flex; align-items:center; justify-content:center; gap:8px; padding:8px 10px; border:1px solid #dce4ee; border-radius:10px; color:#526075; background:#f8fafc; box-shadow:none; }
.product-type-card-selector button:hover { border-color:#a8c1f4; background:#f2f6ff; }
.product-type-card-selector button.active { color:#2466d9; border-color:#75a4f4; background:#eaf2ff; box-shadow:inset 0 0 0 1px rgba(37,99,235,.12); }
.product-type-card-selector svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.product-import-panel .panel-head h3 { display:flex; align-items:center; gap:8px; color:#176b4e; }
.product-import-panel .panel-head h3 .ui-line-icon { color:#20a878; }
.import-drop-copy { display:grid; justify-items:center; gap:5px; color:#64748b; text-align:center; }
.import-drop-copy svg { width:38px; height:38px; fill:none; stroke:#36aa7d; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.import-drop-copy strong { color:#355f51; }
.import-drop-copy span { font-size:12px; color:#8ca099; }
.import-result-card { margin-top:16px; padding:16px; border:1px solid #d6ebe2; border-radius:13px; background:rgba(255,255,255,.68); }
.import-result-card h4 { margin:0 0 10px; color:#176b4e; }
.product-import-panel .result-box { min-height:120px; display:grid; place-items:center; border:1px solid #e0ece7; border-radius:10px; background:rgba(255,255,255,.72); }

.quick-access-icon.tone-addProduct { color:#0f9f76; background:#e5f8f1; }
.quick-access-icon.tone-inventoryImport { color:#3182ce; background:#e9f3ff; }
.quick-access-icon.tone-reportNew { color:#6f56d9; background:#f0ebff; }
.quick-access-icon.tone-inventoryStatus { color:#3976e8; background:#eaf2ff; }
.quick-access-icon.tone-replenishmentPlan { color:#149873; background:#e7f8f1; }
.quick-access-icon.tone-purchaseOrder { color:#8357cf; background:#f1ebff; }
.quick-access-icon.tone-shipmentNew { color:#2786d5; background:#e8f4ff; }
.quick-access-icon.tone-shipmentCompare { color:#168b8f; background:#e6f8f8; }
.quick-access-icon.tone-todoNew { color:#7654d6; background:#f2edff; }
.quick-access-icon.tone-giftOrder { color:#d66b8d; background:#fff0f5; }
.quick-access-icon.tone-returnEntry { color:#de7750; background:#fff0e9; }
.quick-access-icon.tone-aiAssistant { color:#4e6de6; background:#ebefff; }
.quick-dock-edit-row .quick-access-icon svg, .quick-dock-available .quick-access-icon svg { width:23px; height:23px; stroke-width:1.8; }

#system-notifications-app,
#system-login-popups-app { padding:0; border:0; background:transparent; box-shadow:none; }
#system-notifications-app .system-grid,
#system-login-popups-app .system-grid { grid-template-columns:minmax(360px,.78fr) minmax(560px,1.22fr); min-height:calc(100vh - 190px); }
#system-notifications-app .system-panel:first-child,
#system-login-popups-app .system-panel:first-child { background:linear-gradient(150deg,#fbfcff,#f4f7fb); }
#system-notifications-app .system-panel:last-child,
#system-login-popups-app .system-panel:last-child { display:flex; flex-direction:column; }
#system-notifications-app .fixed-table,
#system-login-popups-app .fixed-table { flex:1; min-height:360px; }

@media (max-width:900px) {
  #system-notifications-app .system-grid, #system-login-popups-app .system-grid { grid-template-columns:1fr; }
  .product-type-card-selector { grid-template-columns:1fr; }
}

/* Reference-aligned visual pass: compact SaaS workspaces, restrained color and density. */
.business-workspace { gap:18px; }
.business-overview { gap:14px; }
.business-summary-card {
  min-height:112px;
  padding:17px 18px;
  gap:14px;
  border-color:#e2e8f2;
  border-radius:14px;
  box-shadow:none;
}
.business-summary-card::after {
  right:-34px;
  bottom:-52px;
  width:150px;
  height:104px;
  opacity:.055;
}
.business-summary-icon {
  width:48px;
  height:48px;
  flex-basis:48px;
  border-radius:50%;
  background:color-mix(in srgb, currentColor 9%, white 91%);
}
.business-summary-icon .ui-line-icon { width:24px; height:24px; stroke-width:1.9; }
.business-summary-card h4 { margin:0 0 4px; color:#556176; font-size:13px; font-weight:700; }
.business-summary-card strong { font-size:28px; line-height:1.05; letter-spacing:-.02em; }
.business-summary-card p { margin:5px 0 0; font-size:11px; }
.business-summary-card.tone-blue { color:#4f6ff0; background:linear-gradient(135deg,#f8f9ff 0%,#eef1ff 100%); border-color:#dce2ff; }
.business-summary-card.tone-orange { color:#f08a35; background:linear-gradient(135deg,#fffaf6 0%,#fff1e6 100%); border-color:#fae2d2; }
.business-summary-card.tone-cyan { color:#397ce8; background:linear-gradient(135deg,#f7faff 0%,#edf4ff 100%); border-color:#dce8fb; }
.business-summary-card.tone-green { color:#2aac75; background:linear-gradient(135deg,#f6fdf9 0%,#eaf9f1 100%); border-color:#d8f0e3; }
.business-summary-card.tone-red { color:#ea5d6f; background:linear-gradient(135deg,#fff9fa 0%,#ffedf0 100%); border-color:#f8dce1; }

.business-data-card {
  min-height:calc(100vh - 390px);
  padding:16px 18px 14px;
  gap:14px;
  border-radius:16px;
  border-color:#e1e7f0;
  background:#fff;
}
.business-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.business-toolbar .business-filters { flex:1 1 auto; display:flex; flex-wrap:wrap; gap:10px; min-width:0; }
.business-toolbar .head-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.business-filters .business-search-field { flex:1 1 280px; max-width:360px; }
.business-filters > select { flex:0 0 140px !important; min-width:140px; }
.business-filters > input[type="month"] { flex:0 0 168px !important; min-width:168px; }
.business-filters > .clear-filter-button { flex:0 0 auto !important; }
.business-filters select, .business-filters input, .business-filters button { min-height:42px; border-radius:8px; }
.business-filters select { min-width:132px; }
.clear-filter-button { color:#4f6ff0; border-color:transparent; background:transparent; }
.clear-filter-button:hover { background:#f2f5ff; border-color:#dfe5ff; }
.add-action-button {
  min-height:42px;
  padding:0 17px;
  border-radius:8px;
  background:linear-gradient(135deg,#386cf3,#4c78ee);
  border-color:#386cf3;
  color:#fff;
}
.excel-action-button {
  min-height:42px;
  padding:0 15px;
  border-radius:8px;
  color:#23865c;
  border-color:#d7e7df;
  background:#fff;
}
.excel-action-button .ui-line-icon { color:#27a66f; }
.business-table-shell { min-height:330px; border:1px solid #e2e8f0; border-radius:12px; }
.business-table { min-width:100%; }
.business-table thead th { height:46px; padding:0 14px; color:#667085; font-size:12px; font-weight:700; background:#f5f8fc; border-bottom:1px solid #dde5ef; }
.business-table tbody td { height:58px; padding:9px 14px; color:#344054; border-bottom:1px solid #edf0f5; }
.business-table tbody tr:hover td { background:#fafcff; }
.business-creator-cell { display:flex; align-items:center; gap:9px; min-width:0; }
.business-creator-cell strong { min-width:0; max-width:132px; overflow:hidden; color:#344054; font-size:13px; font-weight:680; text-overflow:ellipsis; white-space:nowrap; }
.business-creator-avatar { display:grid; flex:0 0 28px; width:28px; height:28px; place-items:center; overflow:hidden; border:1px solid #e1e7f0; border-radius:50%; background:linear-gradient(145deg,#eef3ff,#f7f9fd); color:#536783; font-size:11px; font-weight:800; }
.business-creator-avatar img { width:100%; height:100%; object-fit:cover; }
.business-table-footer { display:flex; align-items:center; justify-content:space-between; min-height:36px; color:#718096; }
.business-page-size { padding:7px 10px; border:1px solid #e2e8f0; border-radius:7px; background:#fff; font-size:12px; }
.row-actions { white-space:nowrap; }
.icon-action { width:34px; height:34px; display:inline-grid; place-items:center; padding:0; margin-right:5px; border:1px solid #dfe5ee; border-radius:8px; background:#fff; box-shadow:none; }
.icon-action .ui-line-icon { width:16px; height:16px; }
.icon-action.edit-action { color:#3976e8; border-color:#d7e4fb; background:#f8fbff; }
.icon-action.delete-action { color:#d94f5c; border-color:#f2d9dd; background:#fffafb; }
.icon-action.success-outline { color:#20a56f; border-color:#d5eddf; background:#f8fdfb; }
.icon-action.quick-ship-action {
  width:34px;
  min-width:34px;
  padding:0;
  color:#188a62;
  border-color:#cfe9dc;
  background:#f5fcf8;
  font-size:12px;
  font-weight:750;
}
.icon-action.quick-ship-action:hover { border-color:#9fd6bd; background:#eaf8f1; }
.icon-action.quick-ship-action .ui-line-icon { width:19px; height:19px; }

#business-dialog .business-dialog-card {
  width:min(760px,calc(100vw - 48px));
  padding:24px 24px 0;
  max-height:min(90vh,900px);
  border:1px solid rgba(255,255,255,.9);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.985),rgba(247,250,255,.955));
  box-shadow:0 24px 70px rgba(17,28,51,.20),inset 0 1px 0 rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
}
#business-dialog[data-business-kind="warehouse"] .business-dialog-card,
#business-dialog[data-business-kind="returns"] .business-dialog-card,
#business-dialog[data-business-kind="gifts"] .business-dialog-card { width:min(1080px,calc(100vw - 48px)); }
.business-dialog-head { padding:0 0 16px; border-bottom:0; }
.business-dialog-head h3 { font-size:20px; }
.business-dialog-mark { width:44px; height:44px; border-radius:50%; background:#e9f0ff; color:#3976e8; }
.business-dialog-sections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:2px 0 18px; }
.business-form-memos { grid-template-columns:1fr; }
.business-form-section { min-width:0; padding:16px; border:1px solid #e2e8f1; border-radius:12px; background:rgba(255,255,255,.82); }
.business-section-title { display:flex; align-items:center; gap:7px; margin:-2px 0 13px; color:#3976e8; font-size:13px; font-weight:800; }
.business-section-title .ui-line-icon { width:16px; height:16px; }
.business-section-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 14px; }
.business-section-grid label { min-width:0; margin:0; color:#475467; font-size:12px; font-weight:650; }
.business-section-grid input, .business-section-grid select { min-height:40px; margin-top:6px; }
.business-section-grid textarea { min-height:96px; margin-top:6px; }
.business-section-grid .span-full { grid-column:1 / -1; }
#business-dialog .business-items { margin:0 0 18px; padding:16px; border:1px solid #e2e8f1; border-radius:12px; background:#fff; }
#business-dialog .dialog-actions { margin:0 -24px; padding:14px 24px; border-top:1px solid #e2e8f0; background:rgba(255,255,255,.94); }
#business-dialog .dialog-actions button { min-height:40px; border-radius:8px; }

.purchase-dialog-card > h3, .shipment-dialog-card > h3 { display:flex; align-items:center; gap:10px; margin:0 0 15px; font-size:20px; }
.purchase-dialog-card > h3::before, .shipment-dialog-card > h3::before { content:"+"; width:34px; height:34px; display:grid; place-items:center; border-radius:50%; color:#3976e8; background:#eaf1ff; font-size:20px; font-weight:500; }
#purchase-fields, #shipment-fields { padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:rgba(255,255,255,.82); }
.purchase-items-head, .shipment-items-head { margin-top:14px; padding:12px 14px; border:1px solid #e2e8f0; border-bottom:0; border-radius:12px 12px 0 0; background:#f8fafc; }
.purchase-items-scroll, .shipment-items-scroll { border:1px solid #e2e8f0; border-radius:0 0 12px 12px; background:#fff; }
.profit-config-dialog-card .profit-dialog-section { margin-bottom:13px; padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:rgba(255,255,255,.82); }
.profit-config-dialog-card .profit-dialog-section h4 { margin:0 0 13px; color:#3976e8; font-size:13px; }

/* Product creation follows the numbered-card reference while retaining original fields. */
#add-product .grid-two { grid-template-columns:minmax(0,1fr) minmax(330px,390px); gap:18px; }
#add-product #product-form { padding:18px; background:#fff; }
#add-product #product-form > .panel-head { margin-bottom:14px; padding:12px 14px; border:1px solid #d8e6fb; border-radius:10px; background:#f6faff; }
#add-product #product-form > .panel-head h3 { margin-bottom:3px; font-size:20px; }
#add-product .form-section {
  position:relative;
  margin:12px 0 0;
  padding:18px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
}
#add-product .form-section h4 { margin:0 0 15px; font-size:16px; }
#add-product .form-section h4::before { display:none; }
#add-product #product-form > .form-section:nth-of-type(2) h4::after { content:"1"; }
#add-product #product-form > .form-section:nth-of-type(3) h4::after { content:"2"; }
#add-product #product-form > .form-section:nth-of-type(4) h4::after { content:"3"; }
#add-product .form-section h4::after { order:-1; width:24px; height:24px; display:grid; place-items:center; border-radius:50%; color:#2767db; background:#eaf2ff; font-size:12px; font-weight:800; }
#add-product .form-grid { gap:12px 14px; }
#add-product .form-grid label { color:#526075; font-size:12px; }
#add-product .form-grid input, #add-product .form-grid select { min-height:40px; margin-top:6px; border-radius:8px; }
#add-product #product-form > .form-section:nth-of-type(2) .form-grid label { background:transparent; border:0; padding:0; }
#add-product #product-form > .form-section:nth-of-type(3) .form-grid label:nth-child(n+5):nth-child(-n+7) { padding:9px; border:1px solid #d7e5f7; border-radius:8px; background:#f4f9ff; }
#add-product #product-form > .form-section:nth-of-type(3) .form-grid label:nth-child(n+8):nth-child(-n+10) { padding:9px; border:1px solid #f0dfc6; border-radius:8px; background:#fff9f1; }
#add-product .form-actions { position:sticky; bottom:0; z-index:2; margin:14px -18px -18px; padding:12px 18px; border-top:1px solid #e2e8f0; background:rgba(255,255,255,.94); }
.product-import-panel { padding:20px; background:linear-gradient(155deg,#f3fcf8 0%,#eaf8f1 58%,#f9fdfb 100%) !important; }
.product-import-panel .panel-head { padding:14px; margin:-4px -4px 14px; border-radius:12px; background:rgba(255,255,255,.52); }
.product-import-panel .panel-head h3 { color:#166a4d; font-size:19px; }
.import-box { padding:15px; background:rgba(255,255,255,.58); }
.import-box .upload-form { min-height:220px; align-content:center; border-color:#8ed1b3; background:rgba(255,255,255,.72); }
.import-box .upload-form button { min-height:44px; border-radius:8px; background:linear-gradient(135deg,#199969,#26ad7b); }
.import-result-card { background:rgba(255,255,255,.58); }

/* Personal center uses the reference hero + four compact account cards. */
.account-center-card { padding:24px; gap:16px; background:#fff; }
.account-center-title h3 { font-size:21px; }
.account-center-head {
  position:relative;
  min-height:160px;
  display:flex;
  align-items:center;
  gap:28px;
  padding:22px 32px;
  border:1px solid #d7e4f8;
  border-radius:16px;
  background:radial-gradient(circle at 86% 18%,rgba(93,133,255,.17),transparent 30%),linear-gradient(135deg,#eef7ff 0%,#f8fbff 48%,#e9efff 100%);
  overflow:hidden;
}
.account-center-head::after { content:""; position:absolute; right:-70px; top:-120px; width:430px; height:360px; border:1px solid rgba(77,119,238,.13); border-radius:50%; transform:rotate(-18deg); pointer-events:none; }
.account-center-head .avatar-lg { width:112px; height:112px; border:5px solid rgba(255,255,255,.8); box-shadow:0 8px 24px rgba(51,91,159,.13); }
.account-center-head h3 { margin:0 0 8px; font-size:30px; color:#17345c; }
.account-center-head p { margin:5px 0; color:#52657b; }
#account-center-profile-form, #account-center-avatar-form, #account-center-password-form { padding:18px 20px; border-radius:14px; background:#fff; }
.account-center-avatar-preview { min-height:126px; background:#fbfcfe; }
#account-center-password-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px 18px; }
#account-center-password-form > label { grid-column:1; }
#account-center-password-form > .password-guidance { grid-column:2; grid-row:2 / span 3; align-self:stretch; margin:0; padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; }
#account-center-password-form > .dialog-actions { grid-column:1 / -1; }

#settings-basic .account-settings-panel { padding:24px; }
#settings-basic .account-settings-title { margin:0 0 16px; font-size:20px; }
#settings-basic .account-settings-hero {
  min-height:142px;
  display:flex;
  align-items:center;
  gap:24px;
  padding:20px 26px;
  margin:0 0 18px;
  border-color:#d7e4f8;
  background:radial-gradient(circle at 86% 14%,rgba(93,133,255,.15),transparent 30%),linear-gradient(135deg,#eef7ff,#f8fbff 50%,#e9efff);
}
#settings-basic .account-settings-hero .avatar-xl { width:104px; height:104px; border:4px solid rgba(255,255,255,.8); }
#settings-basic .account-settings-form {
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  grid-template-areas:
    "name email"
    "toggle toggle"
    "note note"
    "avatar avatar"
    "password-title password-title"
    "current guidance"
    "new guidance"
    "confirm guidance"
    "save save";
  gap:12px 18px;
}
#settings-basic .account-settings-form > label:has([name="display_name"]) { grid-area:name; }
#settings-basic .account-settings-form > label:has([name="email"]) { grid-area:email; }
#settings-basic .account-settings-form > label:has([name="display_name"]),
#settings-basic .account-settings-form > label:has([name="email"]) { align-self:start; }
#settings-basic .account-settings-form > .toggle-line { grid-area:toggle; }
#settings-basic .account-settings-form > small { grid-area:note; }
#settings-basic .account-settings-form > .avatar-upload-row { grid-area:avatar; padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:#fbfcfe; }
#settings-basic .account-settings-form > .password-section-title { grid-area:password-title; margin:8px 0 0; padding-top:17px; border-top:1px solid #e6ebf2; }
#settings-basic .account-settings-form > label:has([name="current_password"]) { grid-area:current; }
#settings-basic .account-settings-form > label:has([name="new_password"]) { grid-area:new; }
#settings-basic .account-settings-form > label:has([name="confirm_password"]) { grid-area:confirm; }
#settings-basic .account-settings-form > .password-guidance { grid-area:guidance; align-self:stretch; margin:0; padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; }
#settings-basic .account-settings-form > button[type="submit"] { grid-area:save; min-height:44px; }

/* Dual-pane system editors stay plain and close to the compact reference. */
#system-notifications-app .system-grid, #system-login-popups-app .system-grid { gap:0; overflow:hidden; border:1px solid #e1e7ef; border-radius:12px; background:#fff; }
#system-notifications-app .system-panel, #system-login-popups-app .system-panel { border:0; border-radius:0; background:#fff !important; }
#system-notifications-app .system-panel:first-child, #system-login-popups-app .system-panel:first-child { border-right:1px solid #e1e7ef; background:#f7f9fc !important; }
#system-notifications-app .system-panel h3, #system-login-popups-app .system-panel h3 { font-size:16px; }

@media (max-width:1100px) {
  .business-toolbar { align-items:stretch; flex-direction:column; }
  .business-toolbar .head-actions { justify-content:flex-end; }
  #add-product .grid-two { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .business-dialog-sections, .business-section-grid { grid-template-columns:1fr; }
  .business-toolbar .head-actions { justify-content:stretch; flex-wrap:wrap; }
  .business-toolbar .head-actions button { flex:1 1 auto; }
  #account-center-password-form { grid-template-columns:1fr; }
  #account-center-password-form > label, #account-center-password-form > .password-guidance, #account-center-password-form > .dialog-actions { grid-column:1; grid-row:auto; }
  #settings-basic .account-settings-form {
    grid-template-columns:1fr;
    grid-template-areas:"name" "email" "toggle" "note" "avatar" "password-title" "current" "new" "confirm" "guidance" "save";
  }
}

/* 2026-08-10 icon semantics, dialog glass shell and sizing corrections */
.standard-plus-icon {
  display:inline-grid;
  place-items:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
  color:inherit;
  font-size:22px;
  font-weight:400;
  line-height:1;
}
.business-summary-icon .asset-icon { width:28px; height:28px; }
.business-dialog-mark .business-modal-icon { width:23px; height:23px; }
#business-dialog.is-editing-record .business-dialog-mark { display:none; }

.purchase-dialog-card > h3::before,
.shipment-dialog-card > h3::before {
  content:"";
  width:34px;
  height:34px;
  flex:0 0 34px;
  background:currentColor;
  -webkit-mask:url("/assets/ui-icons/add.svg") center / 21px 21px no-repeat;
  mask:url("/assets/ui-icons/add.svg") center / 21px 21px no-repeat;
  box-shadow:inset 0 0 0 999px #eaf1ff;
}
#purchase-dialog.is-editing-record .purchase-dialog-card > h3::before,
#shipment-dialog.is-editing-record .purchase-dialog-card > h3::before { display:none; }

.profit-dialog-title-copy { display:flex; align-items:center; gap:11px; min-width:0; }
.profit-dialog-title-copy h3 { margin:0; }
.profit-dialog-title-icon {
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#3976e8;
  background:#eaf1ff;
}
.profit-dialog-title-icon .asset-icon { width:21px; height:21px; }

.product-type-card-selector .product-type-asset-icon { width:22px; height:22px; color:currentColor; }
.product-import-panel .panel-head h3 .asset-icon { width:27px; height:27px; }
.import-drop-copy > .asset-icon { width:48px; height:48px; margin-bottom:3px; color:#2fa87b; }

/* Backdrop remains a neutral dimmer; translucency belongs to the dialog shell. */
#business-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#profit-config-dialog::backdrop {
  background:rgba(25,35,51,.46);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
#business-dialog,
#purchase-dialog,
#shipment-dialog,
#profit-config-dialog { background:transparent; overflow:hidden; }
#business-dialog .business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card {
  border:1px solid rgba(255,255,255,.76);
  background:linear-gradient(145deg,rgba(250,252,255,.78),rgba(232,240,252,.68));
  box-shadow:0 26px 72px rgba(15,23,42,.22),inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter:blur(24px) saturate(138%);
  -webkit-backdrop-filter:blur(24px) saturate(138%);
  scrollbar-width:thin;
  scrollbar-color:rgba(100,119,148,.56) rgba(255,255,255,.22);
}
#business-dialog .business-dialog-card::-webkit-scrollbar,
.purchase-dialog-card::-webkit-scrollbar,
.shipment-dialog-card::-webkit-scrollbar,
.profit-config-dialog-card::-webkit-scrollbar { width:10px; }
#business-dialog .business-dialog-card::-webkit-scrollbar-track,
.purchase-dialog-card::-webkit-scrollbar-track,
.shipment-dialog-card::-webkit-scrollbar-track,
.profit-config-dialog-card::-webkit-scrollbar-track {
  margin:10px 0;
  border-radius:999px;
  background:rgba(255,255,255,.24);
}
#business-dialog .business-dialog-card::-webkit-scrollbar-thumb,
.purchase-dialog-card::-webkit-scrollbar-thumb,
.shipment-dialog-card::-webkit-scrollbar-thumb,
.profit-config-dialog-card::-webkit-scrollbar-thumb {
  border:2px solid transparent;
  border-radius:999px;
  background:linear-gradient(180deg,rgba(125,145,176,.72),rgba(85,105,137,.58)) padding-box;
}
.business-form-section,
#business-dialog .business-items,
#purchase-fields,
#shipment-fields,
.purchase-items-scroll,
.shipment-items-scroll,
.profit-config-dialog-card .profit-dialog-section,
.profit-config-dialog-card .profit-dialog-body > .form-grid {
  background:#fff !important;
}
.profit-config-dialog-card .profit-dialog-body > .form-grid {
  padding:16px;
  border:1px solid #e2e8f0;
  border-radius:12px;
}
#business-dialog .dialog-actions,
.purchase-dialog-card .dialog-actions,
.shipment-dialog-card .dialog-actions,
.profit-config-dialog-card .dialog-actions {
  background:linear-gradient(180deg,rgba(248,251,255,.82),rgba(239,245,253,.9));
  backdrop-filter:blur(18px) saturate(125%);
  -webkit-backdrop-filter:blur(18px) saturate(125%);
}

/* Profit reference editors are wide enough for their forms and never scroll sideways. */
#profit-config-dialog {
  width:min(1240px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
}
#profit-config-dialog .profit-config-dialog-card {
  width:100%;
  max-width:100%;
  overflow-x:hidden !important;
}
.profit-config-dialog-card .profit-dialog-body { overflow-x:hidden; }
.profit-config-dialog-card .compact-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.profit-config-dialog-card .check-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Product creation columns share a stable parent-variant baseline. */
#add-product .grid-two { align-items:start; }
#add-product #product-form { min-height:780px; }
#add-product .product-import-panel {
  height:780px;
  max-height:780px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
#add-product .product-import-panel > .panel-head,
#add-product .product-import-panel > .import-box { flex:0 0 auto; }
#add-product .product-import-panel > .import-result-card {
  min-height:150px;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  overflow:hidden;
}
#add-product .product-import-panel .result-box {
  min-height:110px;
  max-height:230px;
  overflow:auto;
  align-content:start;
}
#add-product .product-import-panel:has(#import-result:not(.muted)) {
  height:auto;
  min-height:780px;
  max-height:940px;
}

@media (max-width:900px) {
  .profit-config-dialog-card .check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .profit-config-dialog-card .compact-form,
  .profit-config-dialog-card .check-grid { grid-template-columns:1fr; }
  #add-product #product-form { min-height:0; }
  #add-product .product-import-panel { height:auto; max-height:none; }
}

/* 2026-08-06 reference fidelity + interaction regression fixes */
.asset-icon {
  --asset-icon:none;
  display:inline-block;
  width:1.2em;
  height:1.2em;
  flex:0 0 auto;
  background:currentColor;
  -webkit-mask:var(--asset-icon) center / contain no-repeat;
  mask:var(--asset-icon) center / contain no-repeat;
  vertical-align:-0.18em;
}
.asset-icon[data-icon="add"]{--asset-icon:url("/assets/ui-icons/add.svg")}
.asset-icon[data-icon="add-product"]{--asset-icon:url("/assets/ui-icons/add-product.svg?v=20260810-2")}
.asset-icon[data-icon="product-child-variant"]{--asset-icon:url("/assets/ui-icons/product-child-variant.svg")}
.asset-icon[data-icon="move"]{--asset-icon:url("/assets/ui-icons/move.svg")}
.quick-dock-grip .asset-icon[data-icon="move"] { width:22px; height:22px; color:#64748b; }
.widget-drag-handle .asset-icon[data-icon="move"] { width:18px; height:18px; color:currentColor; }
.asset-icon[data-icon="inventory-status"]{--asset-icon:url("/assets/ui-icons/inventory-status.svg")}
.asset-icon[data-icon="inventory-import"]{--asset-icon:url("/assets/ui-icons/inventory-import.svg")}
.asset-icon[data-icon="inventory-data"]{--asset-icon:url("/assets/ui-icons/inventory-data.svg")}
.asset-icon[data-icon="sales-data"]{--asset-icon:url("/assets/ui-icons/sales-data.svg")}
.asset-icon[data-icon="inventory-sellable"]{--asset-icon:url("/assets/ui-icons/inventory-sellable.svg")}
.asset-icon[data-icon="inventory-inbound"]{--asset-icon:url("/assets/ui-icons/inventory-inbound.svg")}
.asset-icon[data-icon="sales-table"]{--asset-icon:url("/assets/ui-icons/sales-table.svg")}
.asset-icon[data-icon="inventory-total"]{--asset-icon:url("/assets/ui-icons/inventory-total.svg")}
.asset-icon[data-icon="inventory-safe"]{--asset-icon:url("/assets/ui-icons/inventory-safe.svg")}
.asset-icon[data-icon="inventory-need"]{--asset-icon:url("/assets/ui-icons/inventory-need.svg")}
.asset-icon[data-icon="inventory-urgent"]{--asset-icon:url("/assets/ui-icons/inventory-urgent.svg")}
.asset-icon[data-icon="inventory-nosales"]{--asset-icon:url("/assets/ui-icons/inventory-nosales.svg")}
.asset-icon[data-icon="inventory-reorder"]{--asset-icon:url("/assets/ui-icons/inventory-reorder.svg")}
.asset-icon[data-icon="inventory-sync"]{--asset-icon:url("/assets/ui-icons/inventory-sync.svg?v=20260825-1")}
.asset-icon[data-icon="maximize"]{--asset-icon:url("/assets/ui-icons/maximize.svg")}
.asset-icon[data-icon="replenishment"]{--asset-icon:url("/assets/ui-icons/replenishment.svg")}
.asset-icon[data-icon="purchase-order"]{--asset-icon:url("/assets/ui-icons/purchase-order.svg")}
.asset-icon[data-icon="shipment"]{--asset-icon:url("/assets/ui-icons/shipment.svg")}
.asset-icon[data-icon="gift-shipping"]{--asset-icon:url("/assets/ui-icons/gift-shipping.svg")}
.asset-icon[data-icon="shipment-new"]{--asset-icon:url("/assets/ui-icons/shipment-new.svg")}
.asset-icon[data-icon="shipment-compare"]{--asset-icon:url("/assets/ui-icons/shipment-compare.svg")}
.asset-icon[data-icon="report-new"]{--asset-icon:url("/assets/ui-icons/report-new.svg")}
.asset-icon[data-icon="todo"]{--asset-icon:url("/assets/ui-icons/todo.svg")}
.asset-icon[data-icon="gift"]{--asset-icon:url("/assets/ui-icons/gift.svg")}
.asset-icon[data-icon="return"]{--asset-icon:url("/assets/ui-icons/return.svg")}
.asset-icon[data-icon="ai"]{--asset-icon:url("/assets/ui-icons/ai.svg")}
.asset-icon[data-icon="quick-access"]{--asset-icon:url("/assets/ui-icons/quick-access.svg")}
.asset-icon[data-icon="quick-links"]{--asset-icon:url("/assets/ui-icons/quick-links.svg")}
.asset-icon[data-icon="excel-import"]{--asset-icon:url("/assets/ui-icons/excel-import.svg")}
.asset-icon[data-icon="excel-upload"]{--asset-icon:url("/assets/ui-icons/excel-upload.svg")}
.asset-icon[data-icon="excel-export"]{--asset-icon:url("/assets/ui-icons/excel-export.svg")}
.asset-icon[data-icon="upload"]{--asset-icon:url("/assets/ui-icons/upload.svg")}
.asset-icon[data-icon="warehouse-issue"]{--asset-icon:url("/assets/ui-icons/warehouse-issue.svg")}
.asset-icon[data-icon="personnel-cost"]{--asset-icon:url("/assets/ui-icons/personnel-cost.svg")}
.asset-icon[data-icon="copy"]{--asset-icon:url("/assets/ui-icons/copy.svg")}
.asset-icon[data-icon="save"]{--asset-icon:url("/assets/ui-icons/save.svg")}
.asset-icon[data-icon="clear"]{--asset-icon:url("/assets/ui-icons/clear.svg")}
.asset-icon[data-icon="upload"]{--asset-icon:url("/assets/ui-icons/upload.svg")}
.asset-icon[data-icon="base-info"]{--asset-icon:url("/assets/ui-icons/base-info.svg")}
.asset-icon[data-icon="issue-description"]{--asset-icon:url("/assets/ui-icons/issue-description.svg")}
.asset-icon[data-icon="recipient"]{--asset-icon:url("/assets/ui-icons/recipient.svg")}
.asset-icon[data-icon="note"]{--asset-icon:url("/assets/ui-icons/note.svg")}
.asset-icon[data-icon="owner"]{--asset-icon:url("/assets/ui-icons/owner.svg")}
.asset-icon[data-icon="all"]{--asset-icon:url("/assets/ui-icons/all.svg")}
.asset-icon[data-icon="pending"]{--asset-icon:url("/assets/ui-icons/pending.svg")}
.asset-icon[data-icon="progress"]{--asset-icon:url("/assets/ui-icons/progress.svg")}
.asset-icon[data-icon="completed"]{--asset-icon:url("/assets/ui-icons/completed.svg")}
.asset-icon[data-icon="urgent"]{--asset-icon:url("/assets/ui-icons/urgent.svg")}
.asset-icon[data-icon="warehouse-issue"]{--asset-icon:url("/assets/ui-icons/warehouse-issue.svg")}
.asset-icon[data-icon="evidence"]{--asset-icon:url("/assets/ui-icons/evidence.svg")}
.asset-icon[data-icon="processing-fee"]{--asset-icon:url("/assets/ui-icons/processing-fee.svg")}
.asset-icon[data-icon="utilities"]{--asset-icon:url("/assets/ui-icons/utilities.svg")}
.asset-icon[data-icon="ad-management"]{--asset-icon:url("/assets/ui-icons/ad-management.svg?v=20260821-3")}
.asset-icon[data-icon="order-center"]{--asset-icon:url("/assets/ui-icons/order-center.svg?v=20260911-weight2")}
.asset-icon[data-icon="order-center-store"]{--asset-icon:url("/assets/ui-icons/order-center-store.svg?v=20260911")}
.asset-icon[data-icon="settings"]{--asset-icon:url("/assets/ui-icons/settings.svg?v=20260817-1")}

.menu-profit .menu-module-icon { transform:scale(.9025); transform-origin:center; }
.menu-ad-analysis .menu-module-icon { transform:scale(.95); transform-origin:center; }
[data-menu-group="orders"] .menu-module-icon { transform:scale(.945); transform-origin:center; }

.ui-line-icon.asset-icon { display:inline-block; width:18px; height:18px; color:inherit; }
.dashboard-widget-title .asset-icon,
.dashboard-wide-header .asset-icon,
.quick-dock-title .asset-icon { width:20px; height:20px; }
.quick-access-icon .asset-icon { width:24px; height:24px; }

.business-summary-icon .asset-icon,
.business-modal-icon.asset-icon { width:22px; height:22px; }
.excel-action-button .asset-icon,
.clear-filter-button .asset-icon,
.save-action-button .asset-icon,
.add-action-button .asset-icon {
  width:17px;
  height:17px;
  flex:0 0 17px;
}
.asset-icon[data-icon="processing-fee"],
.asset-icon[data-icon="inventory-status"],
.asset-icon[data-icon="shipment-compare"] { transform:scale(.9); }

#settings-about.settings-section {
  width:min(1320px,calc(100vw - 132px));
  max-width:none;
}
#settings-about .about-page { width:100%; max-width:none; }
.settings-section.active:not(#settings-about) {
  display:grid;
  gap:18px;
}
.settings-section.active:not(#settings-about) > .settings-panel,
.settings-section.active:not(#settings-about) > .panel {
  margin:0;
}

/* Business KPI cards: compact, unique glyphs, no decorative bubbles. */
.business-overview {
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
}
.business-summary-card {
  min-height:92px;
  padding:14px 16px;
  gap:12px;
  align-items:center;
}
.business-summary-card::before,
.business-summary-card::after { display:none !important; }
.business-summary-icon {
  width:42px;
  height:42px;
  flex-basis:42px;
  border-radius:12px;
  background:color-mix(in srgb,currentColor 10%,white 90%);
}
.business-summary-icon .ui-line-icon { width:22px; height:22px; stroke-width:1.85; }
.business-summary-card h4 { margin:0 0 5px; }
.business-summary-card strong { font-size:27px; }
.business-workspace,
.business-data-card,
.business-table-shell { min-width:0; max-width:100%; box-sizing:border-box; }
.business-data-card { width:100%; overflow:hidden; }
.business-table-shell { width:100%; overflow:auto; overscroll-behavior-inline:contain; }
.business-table { width:100%; min-width:max-content; }
#business-gifts-app .business-data-card,
#business-gifts-app .business-table-shell { max-width:100%; }
#business-gifts-app .business-table { min-width:1380px; }
#business-gifts-app .business-table .business-select-column,
#business-warehouse-app .business-table .business-select-column {
  width:46px;
  min-width:46px;
  max-width:46px;
  padding-inline:8px;
  text-align:center;
}
#business-gifts-app .business-table .business-select-column input[type="checkbox"],
#business-warehouse-app .business-table .business-select-column input[type="checkbox"] {
  width:16px;
  height:16px;
  min-height:0;
  margin:0;
}
.business-workspace { overflow:hidden; }
.business-data-card { min-height:calc(100vh - 350px); display:flex; flex-direction:column; }
.business-data-card .business-table-shell { flex:1 1 auto; }
.clear-filter-button { display:inline-flex; align-items:center; gap:7px; }
.clear-filter-button .ui-line-icon { width:16px; height:16px; }
.business-loading-row .button-spinner { margin-right:8px; }
.business-load-error button { margin-left:12px; }
.add-action-button,
.excel-action-button,
.clear-filter-button { position:relative; z-index:0; }
.add-action-button > *,
.excel-action-button > *,
.clear-filter-button > * { pointer-events:none; }

/* Dialog shells: readable Apple-like glass, no horizontal scroll. */
dialog.app-dialog::backdrop,
#business-dialog::backdrop,
#gift-shipping-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#account-center-dialog::backdrop {
  background:rgba(29,39,57,.42);
  backdrop-filter:blur(7px) saturate(112%);
  -webkit-backdrop-filter:blur(7px) saturate(112%);
}
#business-dialog .business-dialog-card,
.gift-shipping-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card {
  border:1px solid rgba(255,255,255,.78);
  background:linear-gradient(145deg,rgba(255,255,255,.93),rgba(244,248,255,.86));
  box-shadow:0 28px 80px rgba(15,23,42,.22),inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter:blur(22px) saturate(130%);
  -webkit-backdrop-filter:blur(22px) saturate(130%);
  overflow-x:hidden !important;
}
#business-dialog .business-dialog-card { overflow-y:auto; }
#gift-shipping-dialog .gift-shipping-dialog-card {
  width:min(720px,calc(100vw - 32px));
  padding:24px 24px 0;
  border-radius:18px;
}
.gift-shipping-dialog-context { display:flex; align-items:center; gap:10px; margin-bottom:18px; color:#5f6e83; }
.gift-shipping-dialog-context strong { overflow:hidden; font-size:13px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.gift-shipping-dialog-mark {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:10px;
  color:#188a62;
  background:#eaf8f1;
}
.gift-shipping-dialog-mark .ui-line-icon { width:21px; height:21px; }
.gift-shipping-fields { display:grid; grid-template-columns:minmax(300px,1.55fr) minmax(210px,.8fr); gap:16px; }
.gift-shipping-fields label { color:#475467; font-size:12px; font-weight:700; }
.gift-shipping-fields input { width:100%; min-height:44px; margin-top:7px; border-radius:9px; box-sizing:border-box; }
.gift-shipping-fields input:focus { border-color:#6ab895; outline:2px solid rgba(35,134,92,.12); box-shadow:0 0 0 3px rgba(35,134,92,.06); }
.gift-shipping-hint { margin:14px 0; color:#8491a3; font-size:11px; line-height:1.4; }
#gift-shipping-dialog .dialog-actions { display:flex; flex-flow:row nowrap; align-items:center; justify-content:flex-end; gap:10px; margin:0 -24px; padding:14px 24px; border-top:1px solid #e2e8f0; background:rgba(250,252,255,.94); }
#gift-shipping-dialog .dialog-actions button { min-height:40px; border-radius:8px; }

@media (max-width:640px) {
  .gift-shipping-fields { grid-template-columns:1fr; }
}
#business-dialog .dialog-actions,
.gift-shipping-dialog-card .dialog-actions,
.purchase-dialog-card .dialog-actions,
.shipment-dialog-card .dialog-actions,
.profit-config-dialog-card .dialog-actions {
  z-index:12;
  background:rgba(250,252,255,.94);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
#business-dialog .business-items .table-scroll { position:relative; z-index:1; max-width:100%; overflow:auto; }
#business-dialog .business-items thead { position:relative; z-index:1 !important; }
#business-dialog .business-items thead th { position:relative !important; z-index:1 !important; }
.save-action-button,
dialog .dialog-actions button[type="submit"]:not(.secondary),
.profile-primary-action {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  border:1px solid #2f66e8;
  border-radius:8px;
  background:linear-gradient(135deg,#3370ee,#275fd8);
  color:#fff;
  box-shadow:0 5px 14px rgba(47,102,232,.16);
}
.save-action-button .ui-line-icon,
dialog .dialog-actions button[type="submit"] .ui-line-icon { width:17px; height:17px; stroke-width:1.9; }

/* Return note spans the row; gift sections follow the horizontal reference. */
.business-form-returns .business-form-section:nth-child(3) { grid-column:1 / -1; }
.business-form-gifts {
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  grid-template-rows:auto auto;
  align-items:stretch;
}
.business-form-gifts .business-form-section:nth-child(1) { grid-column:1; grid-row:1; }
.business-form-gifts .business-form-section:nth-child(2) { grid-column:2; grid-row:1 / span 2; }
.business-form-gifts .business-form-section:nth-child(3) { grid-column:1; grid-row:2; }
.business-form-gifts .business-form-section:nth-child(2) .business-section-grid { grid-template-columns:1fr; }

/* Wider profit configuration dialogs and strictly vertical overflow. */
.profit-config-dialog-card {
  width:min(1180px,calc(100vw - 42px));
  max-width:calc(100vw - 42px);
  overflow-y:auto !important;
}
.profit-config-dialog-card .profit-dialog-body,
.profit-config-dialog-card .form-grid,
.profit-config-dialog-card .check-grid { min-width:0; max-width:100%; }
.profit-config-dialog-card input,
.profit-config-dialog-card select,
.profit-config-dialog-card textarea { min-width:0; max-width:100%; box-sizing:border-box; }
dialog .dialog-card { max-width:calc(100vw - 32px); overflow-x:hidden; }
dialog form,
dialog .dialog-card,
dialog .business-dialog-card { box-sizing:border-box; overscroll-behavior:contain; }

/* Personal profile/account hero: technology-line layer instead of plain gradient. */
.account-center-head,
#settings-basic .account-settings-hero {
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:linear-gradient(135deg,#edf6ff 0%,#f9fbff 53%,#e6edff 100%);
}
.account-center-head::after,
#settings-basic .account-settings-hero::after {
  content:"";
  position:absolute;
  z-index:0;
  right:-2%;
  top:-16%;
  width:58%;
  height:150%;
  border:0;
  border-radius:0;
  background:
    repeating-radial-gradient(ellipse at 110% 45%,transparent 0 13px,rgba(79,116,235,.13) 14px 15px,transparent 16px 27px),
    linear-gradient(118deg,transparent 10%,rgba(111,142,255,.06) 48%,rgba(102,125,235,.14) 100%);
  transform:rotate(-8deg);
  pointer-events:none;
}
.account-center-head > *,
#settings-basic .account-settings-hero > * {
  position:relative;
  z-index:1;
}
.toggle-line { display:flex; align-items:center; gap:10px; }
.toggle-line input[type="checkbox"] {
  appearance:none;
  width:42px;
  height:23px;
  margin:0;
  border:0;
  border-radius:999px;
  background:#cfd7e5;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.08);
  transition:background .18s ease;
  cursor:pointer;
}
.toggle-line input[type="checkbox"]::before {
  content:"";
  display:block;
  width:19px;
  height:19px;
  margin:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(15,23,42,.22);
  transition:transform .18s ease;
}
.toggle-line input[type="checkbox"]:checked { background:#2f6fe7; }
.toggle-line input[type="checkbox"]:checked::before { transform:translateX(19px); }
.avatar-upload-row,
.account-avatar-layout {
  display:grid !important;
  grid-template-columns:132px minmax(0,1fr);
  gap:16px;
  align-items:stretch;
}
.account-avatar-layout { grid-template-rows:auto 132px 1fr auto; }
#settings-basic .avatar-upload-row { grid-template-rows:132px; align-self:start; margin-bottom:0; }
.account-avatar-layout .account-center-section-head { grid-column:1 / -1; }
.avatar-upload-preview,
.account-center-avatar-preview {
  width:132px;
  min-height:132px;
  aspect-ratio:1;
  border:1px solid #dce4ef;
  border-radius:10px;
  overflow:hidden;
  background:#f7f9fc;
}
.avatar-drop-zone {
  position:relative;
  min-height:132px;
  display:grid !important;
  place-items:center;
  padding:14px !important;
  border:1px dashed #cbd6e7 !important;
  border-radius:10px;
  background:rgba(250,252,255,.76);
  cursor:pointer;
  font-size:0;
}
.avatar-drop-zone > input[type="file"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.avatar-upload-glyph { display:grid; justify-items:center; gap:7px; color:#667085; text-align:center; pointer-events:none; }
.avatar-upload-glyph svg { width:30px; height:30px; fill:none; stroke:#3f6fdc; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.avatar-upload-glyph strong { color:#344054; font-size:13px; }
.avatar-upload-glyph small { color:#8a96a8; font-size:11px; }
.account-avatar-layout .profile-primary-action { grid-column:1 / -1; grid-row:4; }

/* Product import: fixed independent card, clean green module + blue result. */
#add-product .grid-two { align-items:start; }
#add-product .product-import-panel {
  align-self:start;
  height:640px;
  max-height:640px;
  overflow-y:auto;
  padding:18px;
  border:1px solid #e1e7ef;
  background:#fff !important;
}
.product-import-panel > .panel-head,
.product-import-panel > .import-box {
  background:linear-gradient(180deg,#d9f4e8 0%,#edf9f4 62%,#fbfefd 100%) !important;
}
.product-import-panel > .panel-head { margin:0; padding:18px 18px 10px; border-radius:12px 12px 0 0; }
.product-import-panel > .import-box { padding:10px 18px 18px; border-radius:0 0 12px 12px; }
.import-box .upload-form { min-height:260px; display:grid; gap:12px; padding:0; border:0; background:transparent; }
.import-drop-zone {
  min-height:185px;
  display:grid;
  place-items:center;
  padding:16px;
  border:1.5px dashed #7bc5a9;
  border-radius:10px;
  background:rgba(255,255,255,.72);
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease;
}
.import-drop-zone:hover,
.import-drop-zone.is-dragging { border-color:#239b70; background:#fff; }
.import-drop-zone.has-file { border-style:solid; background:#f7fffb; }
.import-drop-zone input[type="file"] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.import-drop-copy em { color:#2f8d6a; font-size:12px; font-style:normal; font-weight:700; }
.import-box .upload-form > button { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; }
.import-box .upload-form > button .ui-line-icon { width:18px; height:18px; }
.import-result-card {
  background:#f1f7ff !important;
  border-color:#d8e7fb !important;
}
.import-result-card h4 { color:#3869bd !important; }
.product-import-panel .result-box { background:rgba(255,255,255,.82) !important; border-color:#d9e5f5 !important; }
#add-product .form-actions { position:static; z-index:auto; margin:16px 0 0; padding:14px 0 0; background:#fff; }
input[type="file"] { font:inherit; color:#5e6c80; }
input[type="file"]::file-selector-button {
  min-height:34px;
  margin:3px 10px 3px 3px;
  padding:0 13px;
  border:1px solid #d6deea;
  border-radius:7px;
  background:#f7f9fc;
  color:#344054;
  font-weight:700;
  cursor:pointer;
}

/* Editors use the system light toolbar, not default black buttons. */
.editor-toolbar button,
.editor-toolbar select {
  min-height:32px;
  border:1px solid #dfe5ee !important;
  border-radius:6px !important;
  background:#fff !important;
  color:#475467 !important;
  box-shadow:none !important;
}

.editor-toolbar button:hover { border-color:#b9c8df !important; background:#f4f7fb !important; color:#285fca !important; }

/* Keep table headers under sticky dialog actions while scrolling long forms. */
#business-dialog .business-items thead,
#business-dialog .business-items th,
.purchase-dialog-card thead,
.shipment-dialog-card thead { z-index:1 !important; }
#business-dialog .dialog-actions,
.purchase-dialog-card .dialog-actions,
.shipment-dialog-card .dialog-actions { z-index:30 !important; }

/* Upload copy uses the actual accepted formats and remains vertically centred. */
.avatar-drop-zone .avatar-upload-glyph,
.import-drop-zone .import-drop-copy { font-size:13px; }
.avatar-drop-zone:focus-within,
.import-drop-zone:focus-within { outline:2px solid rgba(47,111,231,.18); outline-offset:2px; }

@media (max-width:760px) {
  #settings-about.settings-section { width:100%; }
  .business-form-gifts { grid-template-columns:1fr; grid-template-rows:auto; }
  .business-form-gifts .business-form-section:nth-child(n) { grid-column:1; grid-row:auto; }
  .avatar-upload-row,.account-avatar-layout { grid-template-columns:96px minmax(0,1fr); }
  .avatar-upload-preview,.account-center-avatar-preview { width:96px; min-height:96px; }
}

/* 2026-08-10 final cascade corrections: add.svg is reserved for create-dialog titles. */
.purchase-dialog-card > h3::before,
.shipment-dialog-card > h3::before { display:none !important; content:none !important; }
.dialog-new-title-icon {
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#3976e8;
  background:#eaf1ff;
}
.dialog-new-title-icon .asset-icon { width:21px; height:21px; }

/* Normalize supplied asset dimensions at the end of the cascade. */
.business-summary-icon .asset-icon { width:29px !important; height:29px !important; }
.business-dialog-mark .business-modal-icon { width:23px !important; height:23px !important; }
.product-type-card-selector .product-type-asset-icon { width:23px !important; height:23px !important; }
.product-import-panel .panel-head h3 .asset-icon { width:29px !important; height:29px !important; }
.import-drop-copy > .asset-icon { width:50px !important; height:50px !important; margin-bottom:4px; }

/* Keep the import column complete and stable for the parent-variant form. */
#add-product .product-import-panel {
  height:780px;
  max-height:780px;
  overflow:hidden;
}
#add-product .product-import-panel > .import-result-card {
  min-height:150px;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  overflow:hidden;
}
#add-product .product-import-panel .result-box {
  min-height:110px;
  max-height:230px;
  overflow:auto;
}
#add-product .product-import-panel:has(#import-result:not(.muted)) {
  height:auto;
  min-height:780px;
  max-height:940px;
}

/* The page behind the modal only dims; glass belongs to the shell itself. */
#business-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#profit-config-dialog::backdrop {
  background:rgba(25,35,51,.48) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
#business-dialog .business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card {
  border:1px solid rgba(255,255,255,.78) !important;
  background:linear-gradient(145deg,rgba(252,253,255,.79),rgba(229,238,251,.70)) !important;
  box-shadow:0 26px 72px rgba(15,23,42,.22),inset 0 1px 0 rgba(255,255,255,.94) !important;
  backdrop-filter:blur(24px) saturate(138%) !important;
  -webkit-backdrop-filter:blur(24px) saturate(138%) !important;
}
.business-form-section,
#business-dialog .business-items,
#purchase-fields,
#shipment-fields,
.purchase-items-scroll,
.shipment-items-scroll,
.profit-config-dialog-card .profit-dialog-section,
.profit-config-dialog-card .profit-dialog-body > .form-grid {
  background:#fff !important;
}
#profit-config-dialog {
  width:min(1240px,calc(100vw - 24px)) !important;
  max-width:calc(100vw - 24px) !important;
  overflow-x:hidden !important;
}
#profit-config-dialog .profit-config-dialog-card {
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
}

@media (max-width:700px) {
  #add-product .product-import-panel { height:auto; max-height:none; }
}

/* 2026-08-10 translucent dialog shells, semantic move icons and profile line art. */
#business-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#profit-config-dialog::backdrop,
#account-center-dialog::backdrop,
.user-account-dialog::backdrop {
  background:rgba(22,31,47,.28) !important;
  backdrop-filter:blur(8px) saturate(118%) brightness(.92) !important;
  -webkit-backdrop-filter:blur(8px) saturate(118%) brightness(.92) !important;
}
#business-dialog .business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card,
#account-center-dialog .account-center-card,
.user-account-dialog .user-account-card {
  border:1px solid rgba(255,255,255,.82) !important;
  background:
    radial-gradient(80% 95% at 4% 0%,rgba(124,183,255,.22),transparent 58%),
    radial-gradient(72% 92% at 100% 100%,rgba(185,145,255,.18),transparent 62%),
    linear-gradient(142deg,rgba(255,255,255,.61),rgba(236,245,255,.39)) !important;
  box-shadow:0 30px 86px rgba(15,23,42,.20),inset 0 1px 0 rgba(255,255,255,.94),inset 0 -1px 0 rgba(255,255,255,.34) !important;
  backdrop-filter:blur(30px) saturate(172%) brightness(1.08) !important;
  -webkit-backdrop-filter:blur(30px) saturate(172%) brightness(1.08) !important;
}
#business-dialog .dialog-actions,
.purchase-dialog-card .dialog-actions,
.shipment-dialog-card .dialog-actions,
.profit-config-dialog-card .dialog-actions {
  border-top-color:rgba(255,255,255,.55) !important;
  background:linear-gradient(180deg,rgba(246,250,255,.46),rgba(238,245,255,.68)) !important;
  backdrop-filter:blur(24px) saturate(155%) !important;
  -webkit-backdrop-filter:blur(24px) saturate(155%) !important;
  box-shadow:none !important;
}

/* 2026-08-10 neutral frosted glass: translucent white only, without color gradients. */
#business-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#profit-config-dialog::backdrop,
#account-center-dialog::backdrop,
.user-account-dialog::backdrop {
  background:rgba(24,34,49,.16) !important;
  backdrop-filter:blur(6px) saturate(108%) !important;
  -webkit-backdrop-filter:blur(6px) saturate(108%) !important;
}
#business-dialog .business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card,
#account-center-dialog .account-center-card,
.user-account-dialog .user-account-card {
  border:1px solid rgba(255,255,255,.92) !important;
  background:rgba(255,255,255,.68) !important;
  background-image:none !important;
  box-shadow:
    0 26px 72px rgba(15,23,42,.15),
    inset 0 1px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(255,255,255,.52) !important;
  backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
  -webkit-backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
}
.business-form-section,
#business-dialog .business-items,
#purchase-fields,
#shipment-fields,
.purchase-items-scroll,
.shipment-items-scroll,
.profit-config-dialog-card .profit-dialog-section,
.profit-config-dialog-card .profit-dialog-body > .form-grid,
.profit-config-dialog-card .profit-published-audit-grid > div {
  background:rgba(255,255,255,.94) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.94);
}
.profit-dialog-close-action {
  min-height:42px;
  border:1px solid #2f66e8;
  border-radius:8px;
  background:linear-gradient(135deg,#3370ee,#275fd8);
  color:#fff;
}
#business-dialog .business-dialog-card::-webkit-scrollbar-track,
.purchase-dialog-card::-webkit-scrollbar-track,
.shipment-dialog-card::-webkit-scrollbar-track,
.profit-config-dialog-card::-webkit-scrollbar-track {
  background:rgba(255,255,255,.20) !important;
  border-radius:999px;
}
#business-dialog .business-dialog-card::-webkit-scrollbar-thumb,
.purchase-dialog-card::-webkit-scrollbar-thumb,
.shipment-dialog-card::-webkit-scrollbar-thumb,
.profit-config-dialog-card::-webkit-scrollbar-thumb {
  background:linear-gradient(180deg,rgba(102,121,151,.56),rgba(83,105,140,.40)) !important;
  border:2px solid rgba(255,255,255,.42) !important;
  border-radius:999px;
}
.account-center-head,
#settings-basic .account-settings-hero {
  background:linear-gradient(135deg,#edf6ff 0%,#fbfdff 56%,#e7edff 100%) !important;
}
.account-center-head::after,
#settings-basic .account-settings-hero::after {
  right:-2% !important;
  top:0 !important;
  width:64% !important;
  height:100% !important;
  opacity:.72;
  transform:none !important;
  background-color:transparent !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 780 240' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23799cff' stroke-opacity='.24' stroke-width='1.15'%3E%3Cpath d='M-20 258 C190 48 365 262 800 -36'/%3E%3Cpath d='M-8 272 C202 62 378 276 812 -22'/%3E%3Cpath d='M6 286 C216 76 392 290 826 -8'/%3E%3Cpath d='M20 300 C230 90 406 304 840 6'/%3E%3Cpath d='M34 314 C244 104 420 318 854 20'/%3E%3Cpath d='M48 328 C258 118 434 332 868 34'/%3E%3Cpath d='M62 342 C272 132 448 346 882 48'/%3E%3Cpath d='M76 356 C286 146 462 360 896 62'/%3E%3Cpath d='M90 370 C300 160 476 374 910 76'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right center !important;
  background-size:100% 100% !important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 18%,#000 58%,#000 100%);
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 18%,#000 58%,#000 100%);
}

/* 2026-08-10 final neutral frosted glass: translucent white only. */
#business-dialog::backdrop,
#purchase-dialog::backdrop,
#shipment-dialog::backdrop,
#profit-config-dialog::backdrop,
#account-center-dialog::backdrop,
.user-account-dialog::backdrop {
  background:rgba(24,34,49,.16) !important;
  backdrop-filter:blur(6px) saturate(108%) !important;
  -webkit-backdrop-filter:blur(6px) saturate(108%) !important;
}
#business-dialog .business-dialog-card,
.purchase-dialog-card,
.shipment-dialog-card,
.profit-config-dialog-card,
#account-center-dialog .account-center-card,
.user-account-dialog .user-account-card {
  border:1px solid rgba(255,255,255,.92) !important;
  background:rgba(255,255,255,.68) !important;
  background-image:none !important;
  box-shadow:0 26px 72px rgba(15,23,42,.15),inset 0 1px 0 rgba(255,255,255,.96),inset 0 -1px 0 rgba(255,255,255,.52) !important;
  backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
  -webkit-backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
}
#business-dialog .dialog-actions,
.purchase-dialog-card .dialog-actions,
.shipment-dialog-card .dialog-actions {
  border-top:1px solid rgba(255,255,255,.68) !important;
  background:rgba(255,255,255,.78) !important;
  background-image:none !important;
  backdrop-filter:blur(20px) saturate(110%) !important;
  -webkit-backdrop-filter:blur(20px) saturate(110%) !important;
  box-shadow:0 -8px 24px rgba(15,23,42,.035),inset 0 1px 0 rgba(255,255,255,.72) !important;
}
.profit-config-dialog-card .dialog-actions {
  border-top-color:transparent !important;
  background:transparent !important;
  background-image:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  box-shadow:none !important;
}

/* 2026-08-10 dialog footer alignment and profile-shell transparency. */
#purchase-dialog .purchase-dialog-card,
#shipment-dialog .purchase-dialog-card {
  /* The action footer supplies the bottom inset; keeping card padding here
     produced the exposed strip visible below a sticky footer. */
  padding-bottom:0 !important;
}
#purchase-dialog .purchase-dialog-card .dialog-actions,
#shipment-dialog .purchase-dialog-card .dialog-actions {
  bottom:0 !important;
  width:auto !important;
  min-height:72px;
  margin:8px -18px 0 !important;
  padding:14px 18px max(14px,env(safe-area-inset-bottom)) !important;
  border-radius:0 0 18px 18px;
  box-sizing:border-box;
}

/* Reference-editor actions scroll with their form, so they need breathing
   room but no separate footer slab. */
.profit-config-dialog-card .dialog-actions {
  margin-top:20px !important;
  padding-top:10px !important;
}

/* The account-center dialog element used to keep the browser's opaque dialog
   canvas behind its translucent card, effectively making the card solid. */
#account-center-dialog {
  background:transparent !important;
  box-shadow:none !important;
  overflow:hidden;
}
#account-center-dialog .account-center-card {
  background-color:rgba(255,255,255,.68) !important;
}
.user-account-dialog {
  background:rgba(255,255,255,.68) !important;
  background-image:none !important;
  backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
  -webkit-backdrop-filter:blur(28px) saturate(112%) brightness(1.04) !important;
}

/* 2026-08-11 purchase-order workspace refinement. */
#purchase-orders-app {
  min-height:calc(100vh - 150px);
  display:flex;
  flex-direction:column;
}
#purchase-orders-app .purchase-stats {
  width:100%;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
#purchase-orders-app .purchase-stats article {
  min-width:0;
  min-height:94px;
  border-radius:12px;
  box-shadow:none;
}
#purchase-orders-app .purchase-stats article:nth-child(1) { background:linear-gradient(135deg,#f1f7ff,#fbfdff); border-color:#d8e7fb; }
#purchase-orders-app .purchase-stats article:nth-child(2) { background:linear-gradient(135deg,#f8f3ff,#fdfbff); border-color:#e7dcf8; }
#purchase-orders-app .purchase-stats article:nth-child(3) { background:linear-gradient(135deg,#eefbfa,#fbfefe); border-color:#d4eeee; }
#purchase-orders-app .purchase-stats article:nth-child(4) { background:linear-gradient(135deg,#fff7ed,#fffdf9); border-color:#f3e2cb; }
#purchase-orders-app [data-po-tabs] {
  width:100%;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:0;
}
#purchase-orders-app [data-po-tabs] button {
  width:100%;
  min-width:0;
  justify-content:center;
  text-align:center;
}
#purchase-orders-app .purchase-table-wrap {
  width:100%;
  height:clamp(480px,calc(100vh - 430px),720px);
  min-height:480px;
  max-height:720px;
  flex:0 0 auto;
  overflow-x:auto;
  overflow-y:auto;
  border:1px solid #e1e7ef;
  border-radius:12px;
  background:#fff;
}
#purchase-orders-app .purchase-table {
  width:100%;
  min-width:1120px;
  table-layout:fixed;
}
#purchase-orders-app .purchase-table th,
#purchase-orders-app .purchase-table td {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
#purchase-orders-app .purchase-table .po-col-select { width:40px; }
#purchase-orders-app .purchase-table .po-col-expand { width:44px; }
#purchase-orders-app .purchase-table .po-col-number { width:132px; }
#purchase-orders-app .purchase-table .po-col-date { width:104px; }
#purchase-orders-app .purchase-table .po-col-supplier { width:126px; }
#purchase-orders-app .purchase-table .po-col-status { width:104px; }
#purchase-orders-app .purchase-table .po-col-qty,
#purchase-orders-app .purchase-table .po-col-cartons { width:78px; }
#purchase-orders-app .purchase-table .po-col-volume { width:88px; }
#purchase-orders-app .purchase-table .po-col-amount { width:112px; }
#purchase-orders-app .purchase-table .po-col-shipped { width:122px; }
#purchase-orders-app .purchase-table .po-col-actions { width:168px; }
#purchase-orders-app .purchase-table th:nth-child(1),
#purchase-orders-app .purchase-table td:nth-child(1),
#purchase-orders-app .purchase-table th:nth-child(2),
#purchase-orders-app .purchase-table td:nth-child(2) {
  padding-left:6px;
  padding-right:6px;
  text-align:center;
}
#purchase-orders-app .expand-btn {
  width:28px;
  min-height:28px;
  border:1px solid #dbe4ef;
  border-radius:7px;
  background:#f7f9fc;
}
#purchase-orders-app .row-actions {
  display:flex;
  align-items:center;
  gap:5px;
}
#purchase-orders-app .row-actions button { margin:0; }
.purchase-view-action {
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  padding:0;
  display:inline-grid;
  place-items:center;
  color:#3976e8;
  border-color:#d5e2f7;
  background:#f7faff;
  cursor:pointer;
}
.purchase-view-action svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.purchase-detail-row > td {
  padding:12px !important;
  overflow:visible !important;
  white-space:normal !important;
  background:#f7f9fc !important;
}
.purchase-order-detail-card {
  min-width:0;
  min-height:clamp(430px,calc(100vh - 500px),640px);
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border:1px solid #dfe6ef;
  border-radius:12px;
  background:#fff;
}
.purchase-order-detail-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}
.purchase-order-detail-heading > div { display:grid; gap:3px; }
.purchase-order-detail-heading span,
.purchase-order-detail-heading small { color:#7d8ba1; font-size:12px; }
.purchase-order-detail-heading strong { color:#182230; font-size:17px; }
.purchase-order-detail-summary {
  display:grid;
  grid-template-columns:repeat(8,minmax(90px,1fr)) minmax(220px,1.7fr);
  align-items:stretch;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:linear-gradient(135deg,#fbfdff,#f6f9fd);
  overflow:hidden;
}
.purchase-order-detail-summary dl {
  min-width:0;
  margin:0;
  padding:13px 12px;
  border-right:1px solid #e6ebf2;
}
.purchase-order-detail-summary dt { margin:0 0 6px; color:#7b8799; font-size:11px; }
.purchase-order-detail-summary dd { margin:0; color:#253247; font-size:13px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.purchase-order-progress-card { min-width:0; display:grid; align-content:center; gap:8px; padding:11px 14px; background:#fff; }
.purchase-order-progress-card > div:first-child { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; }
.purchase-order-progress-card span { color:#728096; font-size:11px; }
.purchase-order-progress-card strong { color:#253247; font-size:13px; }
.purchase-order-progress-card em { color:#22a46c; font-size:12px; font-style:normal; font-weight:800; }
.purchase-order-progress-track { height:6px; overflow:hidden; border-radius:999px; background:#e4e9ef; }
.purchase-order-progress-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4ccf91,#20ad6e); }
.purchase-order-progress-card p { display:flex; justify-content:space-between; gap:12px; margin:0; }
.purchase-order-detail-table-shell {
  min-width:0;
  flex:1;
  overflow:visible;
  border:1px solid #e3e8ef;
  border-radius:10px;
  background:#fff;
}
.purchase-order-detail-table {
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
}
.purchase-order-detail-table .detail-col-sku { width:9%; }
.purchase-order-detail-table .detail-col-upc { width:10%; }
.purchase-order-detail-table .detail-col-name { width:15%; }
.purchase-order-detail-table .detail-col-number { width:5.2%; }
.purchase-order-detail-table .detail-col-volume { width:7%; }
.purchase-order-detail-table .detail-col-money { width:8%; }
.purchase-order-detail-table .detail-col-progress { width:9%; }
.purchase-order-detail-table .detail-col-notes { width:10%; }
.purchase-order-detail-table th,
.purchase-order-detail-table td {
  height:42px;
  padding:8px 9px;
  border-bottom:1px solid #edf0f4;
  color:#344054;
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.purchase-order-detail-table th { color:#68768c; background:#f5f8fc; font-weight:700; }
.purchase-order-detail-table .num { text-align:right; }
.purchase-item-progress { display:grid; grid-template-columns:minmax(24px,1fr) auto; align-items:center; gap:6px; }
.purchase-item-progress::before { content:""; grid-column:1; grid-row:1; height:4px; border-radius:999px; background:#e4e9ef; }
.purchase-item-progress i { grid-column:1; grid-row:1; height:4px; border-radius:999px; background:#2db778; }
.purchase-item-progress b { grid-column:2; color:#26845d; font-size:10px; }
#purchase-detail-dialog {
  width:min(1540px,calc(100vw - 34px));
  max-width:calc(100vw - 34px);
  max-height:92vh;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  box-shadow:none;
}
#purchase-detail-dialog::backdrop {
  background:rgba(24,34,49,.16);
  backdrop-filter:blur(6px) saturate(108%);
  -webkit-backdrop-filter:blur(6px) saturate(108%);
}
.purchase-detail-dialog-card {
  width:100%;
  max-height:92vh;
  overflow:auto;
  padding:22px;
  border:1px solid rgba(255,255,255,.92);
  border-radius:20px;
  background:rgba(255,255,255,.68);
  box-shadow:0 26px 72px rgba(15,23,42,.15),inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter:blur(28px) saturate(112%) brightness(1.04);
  -webkit-backdrop-filter:blur(28px) saturate(112%) brightness(1.04);
}
.purchase-detail-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.purchase-detail-dialog-head span { color:#7b8799; font-size:12px; }
.purchase-detail-dialog-head h3 { margin:4px 0 0; font-size:22px; }
.purchase-detail-dialog-card .purchase-order-detail-card { min-height:calc(92vh - 105px); }

/* 2026-08-11 purchase typography and two-level sticky headers. */
#purchase-orders-app .list-head h3 { font-size:21px; }
#purchase-orders-app .list-head p { font-size:14px; }
#purchase-orders-app .purchase-stats article span { font-size:14px; }
#purchase-orders-app .purchase-stats article strong { font-size:28px; }
#purchase-orders-app .purchase-filters input,
#purchase-orders-app .purchase-filters select,
#purchase-orders-app .purchase-filters button {
  min-height:48px;
  font-size:14px;
}
#purchase-orders-app [data-po-tabs] button {
  min-height:48px;
  font-size:14px;
  font-weight:700;
}
#purchase-orders-app .purchase-table > thead > tr > th {
  top:0;
  z-index:20;
  height:50px;
  padding-top:0;
  padding-bottom:0;
  color:#55647a;
  font-size:13px;
  background:#eef3f9;
  box-shadow:inset 0 -1px 0 #d6e0eb,0 4px 10px rgba(38,55,79,.05);
}
#purchase-orders-app .purchase-table > tbody > tr:not(.purchase-detail-row) > td {
  height:62px;
  font-size:14px;
}
#purchase-orders-app .purchase-table > tbody > tr:not(.purchase-detail-row) > td .biz-badge,
#purchase-orders-app .purchase-table > tbody > tr:not(.purchase-detail-row) > td button {
  font-size:13px;
}
.purchase-order-detail-heading > div { display:flex; align-items:center; gap:12px; }
.purchase-order-detail-heading span,
.purchase-order-detail-heading strong {
  color:#253247;
  font-size:16px;
  font-weight:700;
  line-height:1.4;
}
.purchase-order-detail-heading small { font-size:13px; }
.purchase-order-detail-summary dt { font-size:12px; }
.purchase-order-detail-summary dd { font-size:14px; }
.purchase-order-progress-card span { font-size:12px; }
.purchase-order-progress-card strong { font-size:14px; }
.purchase-order-progress-card em { font-size:13px; }
.purchase-order-detail-table th,
.purchase-order-detail-table td {
  height:50px;
  font-size:13px;
}
.purchase-order-detail-table td { font-size:14px; }
.purchase-detail-row .purchase-order-detail-table > thead > tr > th {
  position:sticky;
  top:50px;
  z-index:14;
  color:#60718a;
  background:rgba(248,251,255,.98);
  border-top:1px solid #e0e8f2;
  border-bottom:1px solid #cfdae8;
  box-shadow:0 7px 14px rgba(42,61,87,.09);
  backdrop-filter:blur(10px) saturate(110%);
  -webkit-backdrop-filter:blur(10px) saturate(110%);
}
.purchase-detail-dialog-card .purchase-order-detail-table > thead > tr > th {
  top:0;
  z-index:8;
}
@media (max-width:1280px) {
  .purchase-order-detail-summary { grid-template-columns:repeat(4,minmax(110px,1fr)); }
  .purchase-order-progress-card { grid-column:1 / -1; }
  .purchase-detail-dialog-card .purchase-order-detail-table-shell { overflow-x:auto; }
  .purchase-detail-dialog-card .purchase-order-detail-table { min-width:1120px; }
}
@media (max-width:900px) {
  #purchase-orders-app .purchase-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #purchase-orders-app [data-po-tabs] { display:flex; overflow-x:auto; }
  #purchase-orders-app [data-po-tabs] button { min-width:126px; }
  #purchase-orders-app .purchase-table-wrap { height:calc(100vh - 360px); min-height:420px; }
}

/* 2026-08-11 unified purchase workspace: segmented tabs, shipment and compare views. */
#purchase-orders-app [data-po-tabs],
#shipments-app [data-shipment-tabs],
#purchase-compare-app [data-compare-tabs] {
  width:100%;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:4px;
  margin:10px 0 14px;
  padding:5px;
  border:1px solid #e0e7ef;
  border-radius:12px;
  background:#edf2f7;
}
#purchase-orders-app [data-po-tabs] button,
#shipments-app [data-shipment-tabs] button,
#purchase-compare-app [data-compare-tabs] button {
  width:100%;
  min-width:0;
  min-height:44px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:8px;
  color:#66758a;
  background:transparent;
  font-size:14px;
  font-weight:700;
  text-align:center;
  transition:color .18s ease,background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
#purchase-orders-app [data-po-tabs] button::after,
#shipments-app [data-shipment-tabs] button::after,
#purchase-compare-app [data-compare-tabs] button::after { display:none !important; }
#purchase-orders-app [data-po-tabs] button:hover,
#shipments-app [data-shipment-tabs] button:hover,
#purchase-compare-app [data-compare-tabs] button:hover {
  color:#344054;
  background:rgba(255,255,255,.5);
}
#purchase-orders-app [data-po-tabs] button.active,
#shipments-app [data-shipment-tabs] button.active,
#purchase-compare-app [data-compare-tabs] button.active {
  color:#2563d9;
  border-color:#dce5f0;
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.07),inset 0 1px 0 rgba(255,255,255,.95);
}
.purchase-detail-row .purchase-order-detail-table > thead > tr > th {
  border-bottom:1px solid #c8d4e2;
  box-shadow:inset 0 -1px 0 rgba(112,132,158,.18),0 7px 14px rgba(42,61,87,.08);
}

#shipments-app,
#purchase-compare-app {
  min-height:calc(100vh - 150px);
  display:flex;
  flex-direction:column;
}
#shipments-app .purchase-stats,
#purchase-compare-app .purchase-stats { width:100%; }
#shipments-app .purchase-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
#purchase-compare-app .purchase-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
#shipments-app .purchase-stats article,
#purchase-compare-app .purchase-stats article {
  min-width:0;
  min-height:94px;
  border-radius:12px;
  box-shadow:none;
}
#shipments-app .purchase-stats article:nth-child(1),
#purchase-compare-app .purchase-stats article:nth-child(1) { background:linear-gradient(135deg,#f1f7ff,#fbfdff);border-color:#d8e7fb; }
#shipments-app .purchase-stats article:nth-child(2),
#purchase-compare-app .purchase-stats article:nth-child(2) { background:linear-gradient(135deg,#eefbfa,#fbfefe);border-color:#d4eeee; }
#shipments-app .purchase-stats article:nth-child(3),
#purchase-compare-app .purchase-stats article:nth-child(3) { background:linear-gradient(135deg,#f8f3ff,#fdfbff);border-color:#e7dcf8; }
#shipments-app .purchase-stats article:nth-child(4),
#purchase-compare-app .purchase-stats article:nth-child(4) { background:linear-gradient(135deg,#fff7ed,#fffdf9);border-color:#f3e2cb; }
#shipments-app .purchase-stats article:nth-child(5) { background:linear-gradient(135deg,#fff3f4,#fffafa);border-color:#f3dce0; }
#shipments-app .purchase-filters { grid-template-columns:minmax(280px,1fr) 190px auto; }
#purchase-compare-app .purchase-filters { grid-template-columns:minmax(260px,1fr) 170px 190px auto; }
#purchase-compare-app [data-compare-tabs] { grid-template-columns:repeat(5,minmax(0,1fr)); }
#shipments-app .purchase-filters input,
#shipments-app .purchase-filters select,
#shipments-app .purchase-filters button,
#purchase-compare-app .purchase-filters input,
#purchase-compare-app .purchase-filters select,
#purchase-compare-app .purchase-filters button {
  min-height:48px;
  font-size:14px;
}
#shipments-app .purchase-table-wrap,
#purchase-compare-app .purchase-table-wrap {
  width:100%;
  height:clamp(480px,calc(100vh - 430px),720px);
  min-height:480px;
  max-height:720px;
  flex:0 0 auto;
  overflow:auto;
  border:1px solid #e1e7ef;
  border-radius:12px;
  background:#fff;
}
#shipments-app .purchase-table,
#purchase-compare-app .purchase-table {
  width:100%;
  table-layout:fixed;
}
#shipments-app .purchase-table { min-width:1420px; }
#purchase-compare-app .purchase-table { min-width:1120px; }
#shipments-app .purchase-table th,
#shipments-app .purchase-table td,
#purchase-compare-app .purchase-table th,
#purchase-compare-app .purchase-table td {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
#shipments-app .purchase-table > thead > tr > th,
#purchase-compare-app .purchase-table > thead > tr > th {
  top:0;
  z-index:20;
  height:50px;
  padding-top:0;
  padding-bottom:0;
  color:#55647a;
  font-size:13px;
  background:#eef3f9;
  box-shadow:inset 0 -1px 0 #d6e0eb,0 4px 10px rgba(38,55,79,.05);
}
#shipments-app .purchase-table > tbody > tr:not(.purchase-detail-row) > td,
#purchase-compare-app .purchase-table > tbody > tr > td {
  height:62px;
  font-size:14px;
}
#shipments-app .ship-col-select { width:40px; }
#shipments-app .ship-col-expand { width:44px; }
#shipments-app .ship-col-number { width:148px; }
#shipments-app .ship-col-date { width:102px; }
#shipments-app .ship-col-po { width:160px; }
#shipments-app .ship-col-status { width:96px; }
#shipments-app .ship-col-number-small { width:78px; }
#shipments-app .ship-col-volume { width:92px; }
#shipments-app .ship-col-amount { width:112px; }
#shipments-app .ship-col-actions { width:138px; }
#purchase-compare-app .compare-col-po { width:130px; }
#purchase-compare-app .compare-col-sku { width:120px; }
#purchase-compare-app .compare-col-upc { width:126px; }
#purchase-compare-app .compare-col-name { width:220px; }
#purchase-compare-app .compare-col-number { width:92px; }
#purchase-compare-app .compare-col-shipment { width:170px; }
#purchase-compare-app .compare-col-status { width:104px; }
#shipments-app .purchase-table th:nth-child(1),
#shipments-app .purchase-table td:nth-child(1),
#shipments-app .purchase-table th:nth-child(2),
#shipments-app .purchase-table td:nth-child(2) { padding-left:6px;padding-right:6px;text-align:center; }
#shipments-app .expand-btn {
  width:28px;
  min-height:28px;
  border:1px solid #dbe4ef;
  border-radius:7px;
  background:#f7f9fc;
}
.shipment-detail-summary {
  display:grid;
  grid-template-columns:repeat(8,minmax(100px,1fr));
  border:1px solid #e2e8f0;
  border-radius:10px;
  overflow:hidden;
  background:linear-gradient(135deg,#fbfdff,#f6f9fd);
}
.shipment-detail-summary dl { min-width:0;margin:0;padding:13px 12px;border-right:1px solid #e6ebf2; }
.shipment-detail-summary dl:last-child { border-right:0; }
.shipment-detail-summary dt { margin:0 0 6px;color:#7b8799;font-size:12px; }
.shipment-detail-summary dd { margin:0;color:#253247;font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.shipment-detail-table th:nth-child(1) { width:12%; }
.shipment-detail-table th:nth-child(2) { width:9%; }
.shipment-detail-table th:nth-child(3) { width:10%; }
.shipment-detail-table th:nth-child(4) { width:16%; }
.shipment-detail-table th:nth-child(5),
.shipment-detail-table th:nth-child(6),
.shipment-detail-table th:nth-child(7) { width:6%; }
.shipment-detail-table th:nth-child(8) { width:8%; }
.shipment-detail-table th:nth-child(9),
.shipment-detail-table th:nth-child(10) { width:10%; }
.shipment-detail-table th:nth-child(11) { width:11%; }
@media (max-width:1200px) {
  #shipments-app .purchase-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #purchase-compare-app .purchase-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #shipments-app .purchase-filters,
  #purchase-compare-app .purchase-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  #shipments-app .purchase-stats,
  #purchase-compare-app .purchase-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #purchase-orders-app [data-po-tabs],
  #shipments-app [data-shipment-tabs],
  #purchase-compare-app [data-compare-tabs] { display:flex;overflow-x:auto; }
  #purchase-orders-app [data-po-tabs] button,
  #shipments-app [data-shipment-tabs] button,
  #purchase-compare-app [data-compare-tabs] button { min-width:126px; }
  #shipments-app .purchase-table-wrap,
  #purchase-compare-app .purchase-table-wrap { height:calc(100vh - 360px);min-height:420px; }
}
.profit-composite-card {
  background: linear-gradient(135deg, #edf6ff 0%, #e3f0ff 55%, #e8f7f4 100%);
  border-color: #cbdff5;
  overflow: hidden;
}
.profit-composite-card .profit-center-card-content { position: relative; z-index: 2; }
.profit-composite-visual { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.profit-composite-visual span { position: absolute; border-radius: 50%; border: 22px solid rgba(59,130,246,.12); will-change:transform; }
.profit-composite-visual span:nth-child(1) { width: 270px; height: 270px; right: -92px; top: -118px; animation:reportShapeBreathe 8s ease-in-out infinite alternate; }
.profit-composite-visual span:nth-child(2) { width: 180px; height: 180px; right: 116px; bottom: -104px; border-color: rgba(16,185,129,.13); animation:reportShapeDrift 10s ease-in-out infinite alternate-reverse; }
.profit-composite-visual span:nth-child(3) { width: 112px; height: 112px; right: 36px; bottom: 34px; border-width:0; background:radial-gradient(circle,rgba(14,165,233,.2) 2px,transparent 2.8px); background-size:18px 18px; animation:reportDotsDrift 7s ease-in-out infinite alternate; }
.profit-composite-badge { color: #2563eb; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.profit-composite-help { margin: 0 0 14px; color: #64748b; line-height: 1.6; }
.profit-composite-filters { display:grid; grid-template-columns:minmax(220px,1.5fr) repeat(2,minmax(150px,.7fr)); gap:10px; margin-bottom:12px; }
.profit-composite-filters label { display:flex; align-items:center; gap:8px; min-width:0; padding:0 11px; border:1px solid #dbe4ef; border-radius:9px; background:#fff; color:#64748b; }
.profit-composite-filters label > span { flex:none; font-size:11px; font-weight:700; }
.profit-composite-filters input { min-width:0; width:100%; height:40px; padding:0; border:0; outline:0; background:transparent; }
.profit-composite-search svg { flex:none; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.profit-composite-picker { display: grid; gap: 8px; max-height: 430px; overflow-y: auto; }
.profit-composite-picker label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; cursor: pointer; }
.profit-composite-picker label:hover { background: #f8fbff; border-color: #bcd4f4; }
.profit-composite-picker input { width: 18px; height: 18px; }
.profit-composite-picker span { min-width: 0; display: grid; gap: 3px; }
.profit-composite-picker b { color: #172033; }
.profit-composite-picker small { color: #718096; }
.profit-personnel-toggle, .profit-copy-button, .profit-report-home-button { display: inline-flex; align-items: center; gap: 7px; }
.profit-personnel-toggle .asset-icon, .profit-copy-button .asset-icon { width:18px; height:18px; }
.profit-report-home-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.profit-personnel-toggle.active { color: #0f766e; border-color: #99d5ca; background: #ecfdf8; }
.profit-group-ratio-toggle { width: 42px; height: 42px; padding: 0; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; color: #64748b; font-weight: 800; }
.profit-group-ratio-toggle.active { color: #2563eb; border-color: #93b8ef; background: #eff6ff; }
.profit-group-cost-cell > small, .profit-group-table td > small { display: block; margin-top: 3px; color: #8290a5; font-size: 11px; }
.profit-group-cost-breakdown em { color: #8290a5; font-style: normal; font-size: 10px; }
.profit-cost-category { cursor: pointer; flex-wrap: wrap; }
.profit-cost-legend-item { cursor: default; }

/* Report cards use three deliberately uneven, clipped elements. */
.profit-center-card .geometry-main { width:320px; height:320px; right:-138px; bottom:-158px; filter:none; opacity:.12; animation-duration:8s; }
.profit-center-card .geometry-ring { width:196px; height:196px; right:92px; bottom:-118px; border-width:18px; opacity:.13; animation-duration:10s; }
.profit-center-card .geometry-dots { width:132px; height:132px; top:-34px; right:12px; background-size:18px 18px; opacity:.11; animation-duration:7s; }
.profit-center-grid > .profit-center-card:nth-child(3n+2) .geometry-main { right:-116px; bottom:-184px; width:350px; height:350px; }
.profit-center-grid > .profit-center-card:nth-child(3n+2) .geometry-ring { right:126px; bottom:-92px; width:164px; height:164px; }
.profit-center-grid > .profit-center-card:nth-child(3n+2) .geometry-dots { right:-18px; top:24px; width:150px; height:150px; }
.profit-center-grid > .profit-center-card:nth-child(3n) .geometry-main { right:-176px; bottom:-96px; width:338px; height:338px; }
.profit-center-grid > .profit-center-card:nth-child(3n) .geometry-ring { right:74px; bottom:-138px; width:222px; height:222px; }
.profit-center-grid > .profit-center-card:nth-child(3n) .geometry-dots { right:42px; top:-48px; width:118px; height:118px; }
@media (max-width: 900px) {
  .profit-composite-picker { max-height: 52vh; }
  .profit-composite-filters { grid-template-columns:1fr; }
  .profit-personnel-toggle span { display: none; }
  .profit-group-table-tools { flex-wrap: wrap; }
}

/* 2026-08-14 visual refresh: calm aurora report cards, role-tier profile heroes,
   and an original pulse-orbit loader. Kept as one override layer for rollback. */
.profit-center-card {
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--report-bg-start) 92%, #fff) 0%, color-mix(in srgb,var(--report-bg-start) 52%,#fff) 48%, color-mix(in srgb, var(--report-bg-end) 90%, #fff) 100%) !important;
  border-color: color-mix(in srgb, var(--report-shape-primary) 22%, #dfe7f1) !important;
}
.profit-center-card .geometry-main,
.profit-center-card .geometry-ring,
.profit-center-card .geometry-diamond,
.profit-center-card .geometry-arc,
.profit-center-card .geometry-glow { display:none !important; }
.profit-center-card .geometry-wave {
  display:block !important;
  left:-7% !important;
  right:auto !important;
  top:auto !important;
  bottom:-46px !important;
  width:116% !important;
  height:176px !important;
  background:linear-gradient(100deg,
    color-mix(in srgb,var(--report-shape-soft) 44%,transparent) 0%,
    color-mix(in srgb,var(--report-shape-secondary) 68%,transparent) 48%,
    color-mix(in srgb,var(--report-shape-primary) 88%,transparent) 100%) !important;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 220' preserveAspectRatio='none'%3E%3Cpath d='M0 122 C175 70 275 176 455 116 C650 50 805 66 1000 18 L1000 220 L0 220 Z' fill='black'/%3E%3C/svg%3E") center/100% 100% no-repeat !important;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 220' preserveAspectRatio='none'%3E%3Cpath d='M0 122 C175 70 275 176 455 116 C650 50 805 66 1000 18 L1000 220 L0 220 Z' fill='black'/%3E%3C/svg%3E") center/100% 100% no-repeat !important;
  opacity:.16 !important;
  filter:
    saturate(1.04)
    drop-shadow(0 -8px 16px color-mix(in srgb,var(--report-shape-primary) 25%,transparent))
    drop-shadow(0 7px 24px color-mix(in srgb,var(--report-shape-secondary) 16%,transparent));
  animation:reportAuroraDrift 14s ease-in-out infinite alternate !important;
}
.profit-center-card .geometry-ribbon {
  display:block !important;
  left:-4% !important;
  right:auto !important;
  top:auto !important;
  bottom:49px !important;
  width:111% !important;
  height:54px !important;
  background:linear-gradient(90deg,transparent 2%,var(--report-shape-secondary) 52%,var(--report-shape-primary) 98%) !important;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 80' preserveAspectRatio='none'%3E%3Cpath d='M0 52 C180 15 300 76 472 42 C664 4 818 32 1000 5 L1000 11 C818 40 664 13 474 50 C298 84 178 24 0 60 Z' fill='black'/%3E%3C/svg%3E") center/100% 100% no-repeat !important;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 80' preserveAspectRatio='none'%3E%3Cpath d='M0 52 C180 15 300 76 472 42 C664 4 818 32 1000 5 L1000 11 C818 40 664 13 474 50 C298 84 178 24 0 60 Z' fill='black'/%3E%3C/svg%3E") center/100% 100% no-repeat !important;
  opacity:.16 !important;
  transform:none !important;
  animation:reportContourDrift 16s ease-in-out infinite alternate;
}
.profit-center-card .geometry-dots {
  display:block !important;
  top:24px !important;
  right:20px !important;
  width:92px !important;
  height:74px !important;
  background-image:radial-gradient(circle,var(--report-shape-primary) 1.55px,transparent 2px) !important;
  background-size:14px 14px !important;
  opacity:.09 !important;
  -webkit-mask-image:linear-gradient(120deg,transparent 0%,#000 35%,#000 78%,transparent 100%);
  mask-image:linear-gradient(120deg,transparent 0%,#000 35%,#000 78%,transparent 100%);
  animation:reportDotFloat 11s ease-in-out infinite alternate !important;
}
@keyframes reportAuroraDrift {
  from { transform:translate3d(-8px,5px,0) scaleX(1.01); }
  to { transform:translate3d(10px,-5px,0) scaleX(.99); }
}
@keyframes reportContourDrift {
  from { transform:translate3d(-5px,2px,0); opacity:.12; }
  to { transform:translate3d(8px,-3px,0); opacity:.2; }
}
@keyframes reportDotFloat {
  from { transform:translate3d(0,-3px,0); }
  to { transform:translate3d(-7px,6px,0); }
}

/* Membership-inspired profile palettes; existing technology wave line art remains. */
[data-profile-tier="diamond"] { --profile-a:#eef0ff;--profile-b:#f9f5ff;--profile-c:#e7f3ff;--profile-line-filter:hue-rotate(38deg) saturate(1.28);--profile-accent:#6656c8;--profile-border:#d9d4fb; }
[data-profile-tier="gold"] { --profile-a:#fff6dd;--profile-b:#fffaf0;--profile-c:#ffe6ad;--profile-line-filter:hue-rotate(175deg) saturate(1.55);--profile-accent:#9a6814;--profile-border:#f1d28d; }
[data-profile-tier="silver"] { --profile-a:#eff5f7;--profile-b:#fbfdfe;--profile-c:#dcebef;--profile-line-filter:grayscale(.75) hue-rotate(145deg) saturate(.72);--profile-accent:#537484;--profile-border:#cadde2; }
[data-profile-tier="blue"] { --profile-a:#edf6ff;--profile-b:#fbfdff;--profile-c:#e7edff;--profile-line-filter:none;--profile-accent:#315f9f;--profile-border:#d7e4f8; }
.account-center-head[data-profile-tier],
#settings-basic .account-settings-hero[data-profile-tier] {
  background:linear-gradient(132deg,var(--profile-a) 0%,var(--profile-b) 54%,var(--profile-c) 100%) !important;
  border-color:var(--profile-border) !important;
}
.account-center-head[data-profile-tier]::after,
#settings-basic .account-settings-hero[data-profile-tier]::after { filter:var(--profile-line-filter); }
.account-center-head[data-profile-tier] h3,
#settings-basic .account-settings-hero[data-profile-tier] h3 { color:var(--profile-accent); }
.account-center-head[data-profile-tier] .badge,
#settings-basic .account-settings-hero[data-profile-tier] .badge {
  color:var(--profile-accent);
  background:color-mix(in srgb,var(--profile-c) 72%,#fff);
  border:1px solid color-mix(in srgb,var(--profile-border) 82%,#fff);
}
.settings-popover-user[data-profile-tier] {
  border:1px solid var(--profile-border);
  background:linear-gradient(132deg,var(--profile-a),var(--profile-b) 58%,var(--profile-c)) !important;
}
.settings-popover-user[data-profile-tier] strong { color:var(--profile-accent); }

@media (prefers-reduced-motion:reduce) {
  .profit-center-card .geometry-wave,.profit-center-card .geometry-ribbon,.profit-center-card .geometry-dots { animation:none !important; }
}

/* 2026-08-14 refinement pass. */
.profit-center-card .geometry-ribbon { display:none !important; }
.profit-center-card .geometry-dots {
  top:18px !important;
  right:14px !important;
  width:126px !important;
  height:96px !important;
  background-size:17px 17px !important;
  opacity:.14 !important;
  animation:reportDotShimmer 5.8s ease-in-out infinite alternate !important;
}
@keyframes reportDotShimmer {
  0% { transform:translate3d(2px,-2px,0); opacity:.11; }
  55% { transform:translate3d(-4px,4px,0); opacity:.18; }
  100% { transform:translate3d(-8px,7px,0); opacity:.14; }
}

.avatar-upload-glyph img {
  display:block;
  width:34px;
  height:34px;
  object-fit:contain;
  opacity:.82;
}

@media (prefers-reduced-motion:reduce) {
  .profit-center-card .geometry-dots { animation:none !important; }
}

/* Inline details share the parent workspace scroller. No nested horizontal
   scrollbar is created: the outer purchase/shipment table scrolls the order
   row, summary and every detail column as one continuous surface. */
.purchase-detail-row > td {
  box-sizing:border-box;
  overflow:clip !important;
}
.purchase-detail-row .purchase-order-detail-card {
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.purchase-detail-row .purchase-order-detail-table-shell {
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible !important;
}
.purchase-detail-row .purchase-order-detail-table {
  width:100%;
  min-width:100%;
}

/* User management overview: one continuous summary surface with restrained
   dividers instead of seven competing cards. */
.user-summary-grid {
  grid-template-columns:repeat(7,minmax(118px,1fr));
  gap:0;
  overflow:hidden;
  border:1px solid #e1e7f0;
  border-radius:12px;
  background:linear-gradient(135deg,#fff 0%,#fbfcff 58%,#f8faff 100%);
}
.user-summary-card {
  min-height:106px;
  padding:15px 14px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none !important;
}
.user-summary-card::after { display:none; }
.user-summary-card + .user-summary-card::before {
  content:"";
  position:absolute;
  left:0;
  top:20px;
  bottom:20px;
  width:1px;
  background:linear-gradient(180deg,transparent,rgba(148,163,184,.24) 22%,rgba(148,163,184,.24) 78%,transparent);
}
.user-summary-card:hover {
  border-color:transparent;
  background:color-mix(in srgb,var(--summary-accent) 4%,transparent);
  box-shadow:none !important;
}
.user-summary-icon {
  flex-basis:38px;
  width:38px;
  height:38px;
}
.user-summary-icon svg { width:20px; height:20px; }
.user-summary-copy strong { font-size:25px; }
.user-summary-copy span { font-size:12px; }
.user-summary-copy small { max-width:100%; font-size:10px; }
body.square-cards .user-summary-grid { border-radius:0; }
body.card-shadow-enabled .user-summary-grid { box-shadow:0 5px 18px rgba(15,23,42,.06); }
body.card-shadow-enabled .user-summary-card { box-shadow:none !important; }

@media (max-width:1080px) {
  .user-summary-grid { grid-template-columns:repeat(4,minmax(130px,1fr)); }
  .user-summary-card:nth-child(4n+1)::before { display:none; }
}
@media (max-width:760px) {
  .user-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .user-summary-card:nth-child(odd)::before { display:none; }
}
@media (max-width:520px) {
  .user-summary-grid { grid-template-columns:1fr; }
  .user-summary-card {
    min-height:86px;
    padding:13px 16px;
  }
  .user-summary-card:nth-child(n+2)::before {
    display:block;
    top:0;
    bottom:auto;
    left:16px;
    right:16px;
    width:auto;
    height:1px;
    background:linear-gradient(90deg,transparent,rgba(148,163,184,.22) 18%,rgba(148,163,184,.22) 82%,transparent);
  }
}

/* Inventory status toolbar: search, range, filters and export form one compact
   working row on desktop, then reflow without changing filter behaviour. */
#inventory-status .list-head { margin-bottom:14px; }
#inventory-status .filters {
  grid-template-columns:minmax(230px,320px) 124px repeat(4,minmax(105px,1fr)) max-content max-content;
  align-items:center;
  gap:10px;
}
#inventory-status .filters > input,
#inventory-status .filters > select,
#inventory-status .filters > button {
  width:100%;
  min-width:0;
  min-height:42px;
}
#inventory-status .filters > button { width:auto; white-space:nowrap; }
#inventory-status .inventory-export-button {
  justify-content:center;
  min-width:154px;
}

@media (max-width:1280px) {
  #inventory-status .filters {
    grid-template-columns:minmax(240px,1.4fr) 124px repeat(2,minmax(130px,1fr));
  }
  #inventory-status .filters > button { justify-self:start; }
}
@media (max-width:760px) {
  #inventory-status .filters {
    display:flex;
    flex-wrap:wrap;
  }
  #inventory-status .filters > input,
  #inventory-status .filters > .inventory-search-wrap { flex:1 0 100%; }
  #inventory-status .filters > select { flex:1 1 150px; }
  #inventory-status .filters > button { flex:0 0 auto; }
}

/* Inventory status dashboard: compact operational metrics, two health
   summaries and a search-led filter row, matching the report workspace UI. */
#inventory-status .inventory-metrics {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
#inventory-status .inventory-metric-card {
  min-width:0;
  min-height:104px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 14px;
  border:1px solid #e3e9f2;
  border-radius:12px;
  background:linear-gradient(145deg,#fff 22%,#fbfdff 100%);
  box-shadow:none;
}
#inventory-status .inventory-metric-card > div { min-width:0; }
#inventory-status .inventory-metric-card > div > span {
  margin:0 0 4px;
  overflow:hidden;
  color:#64748b;
  font-size:12px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#inventory-status .inventory-metric-card strong {
  display:block;
  color:#172033;
  font-size:25px;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
}
#inventory-status .inventory-metric-card small {
  display:block;
  margin-top:5px;
  color:#8491a5;
  font-size:10px;
  white-space:nowrap;
}
#inventory-status .inventory-metric-icon {
  position:relative;
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eaf4ff;
  color:#2584ea;
  align-self:center;
  margin:auto 0;
  padding:0;
  line-height:0;
}
#inventory-status .inventory-metric-icon > .asset-icon {
  width:22px;
  height:22px;
  display:block;
  margin:0;
  vertical-align:0;
  transform:translateY(1px);
}
#inventory-status .metric-safe .inventory-metric-icon { background:#efeaff; color:#7b5ce6; font-size:20px; font-weight:850; }
#inventory-status .metric-need .inventory-metric-icon { background:#fff2e2; color:#f08a24; }
#inventory-status .metric-urgent .inventory-metric-icon { background:#ffebf0; color:#e94b72; }
#inventory-status .metric-nosales .inventory-metric-icon { background:#eaf2ff; color:#397de8; }
#inventory-status .metric-quantity .inventory-metric-icon { background:#f1eaff; color:#825ee8; }
#inventory-status .metric-cartons .inventory-metric-icon { background:#e4f8f6; color:#10aeb5; }
#inventory-status .metric-clock::before {
  content:"";
  width:18px;
  height:18px;
  border:2px solid currentColor;
  border-radius:50%;
}
#inventory-status .metric-clock::after {
  content:"";
  position:absolute;
  width:5px;
  height:6px;
  margin:-3px 0 0 3px;
  border-left:2px solid currentColor;
  border-bottom:2px solid currentColor;
}
#inventory-status .metric-bars { display:flex; align-items:flex-end; justify-content:center; gap:3px; }
#inventory-status .metric-bars i { width:3px; border:2px solid currentColor; border-radius:4px; }
#inventory-status .metric-bars i:nth-child(1) { height:12px; }
#inventory-status .metric-bars i:nth-child(2) { height:20px; }
#inventory-status .metric-bars i:nth-child(3) { height:16px; }

#inventory-status .inventory-health-grid {
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr) minmax(230px,.7fr);
  gap:14px;
  margin-bottom:14px;
}
#inventory-status .inventory-health-card {
  min-width:0;
  min-height:180px;
  padding:16px 18px;
  border:1px solid #e3e9f2;
  border-radius:12px;
  background:#fff;
  box-shadow:none;
}
#inventory-status .inventory-health-heading { display:flex; align-items:baseline; gap:7px; margin-bottom:12px; }
#inventory-status .inventory-health-heading h4 { margin:0; color:#263247; font-size:14px; }
#inventory-status .inventory-health-heading span { color:#8290a5; font-size:11px; }
#inventory-status .inventory-health-content { display:grid; grid-template-columns:180px minmax(0,1fr); align-items:center; gap:18px; }
#inventory-status .inventory-health-donut {
  width:122px;
  height:122px;
  margin:auto;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(#e5eaf1 0 100%);
  transition:background .2s ease-out;
}
#inventory-status .inventory-health-donut::before {
  content:"";
  grid-area:1/1;
  width:78px;
  height:78px;
  border-radius:50%;
  background:#fff;
}
#inventory-status .inventory-health-donut > div { z-index:1; grid-area:1/1; display:grid; text-align:center; }
#inventory-status .inventory-health-donut strong { color:#172033; font-size:24px; line-height:1.1; font-variant-numeric:tabular-nums; }
#inventory-status .inventory-health-donut span { color:#7b8798; font-size:10px; }
#inventory-status .inventory-health-legend { display:grid; gap:7px; }
#inventory-status .inventory-health-legend > div { display:grid; grid-template-columns:10px minmax(64px,1fr) auto; align-items:center; gap:7px; }
#inventory-status .inventory-health-legend span { color:#526175; font-size:11px; }
#inventory-status .inventory-health-legend strong { color:#435166; font-size:11px; font-variant-numeric:tabular-nums; }
#inventory-status .inventory-health-legend p { margin:1px 0 0 17px; color:#a0aabc; font-size:9px; }
#inventory-status .health-dot { display:inline-block; width:7px; height:7px; border-radius:50%; }
#inventory-status .health-dot.safe { background:#45b76f; }
#inventory-status .health-dot.need { background:#f5a914; }
#inventory-status .health-dot.urgent { background:#fb5d62; }
#inventory-status .health-dot.nosales { background:#9ba9bd; }
#inventory-status .inventory-urgency-bar { height:14px; display:flex; overflow:hidden; border-radius:99px; background:#edf1f6; }
#inventory-status .inventory-urgency-bar i { width:0; height:100%; transition:width .25s ease-out; }
#inventory-status .inventory-urgency-bar .urgent { background:#fb5d62; }
#inventory-status .inventory-urgency-bar .need { background:#f5a914; }
#inventory-status .inventory-urgency-bar .safe { background:#45b76f; }
#inventory-status .inventory-urgency-bar .nosales { background:#9ba9bd; }
#inventory-status .inventory-urgency-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:18px; }
#inventory-status .inventory-urgency-metrics > div { position:relative; display:grid; justify-items:center; gap:2px; padding:0 10px; }
#inventory-status .inventory-urgency-metrics > div + div { border-left:1px solid #e9edf3; }
#inventory-status .inventory-urgency-metrics span { display:flex; align-items:center; gap:6px; color:#64748b; font-size:10px; }
#inventory-status .inventory-urgency-metrics strong { color:#172033; font-size:21px; font-variant-numeric:tabular-nums; }
#inventory-status .inventory-urgency-metrics small { color:#8b97aa; font-size:10px; }
#inventory-status .inventory-value-card { display:flex; flex-direction:column; }
#inventory-status .inventory-value-content {
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  min-width:0;
  padding:10px 4px 16px;
}
#inventory-status .inventory-value-symbol {
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  flex:0 0 54px;
  border-radius:16px;
  background:#edf4ff;
  color:#397de8;
  font-size:25px;
  font-weight:800;
}
#inventory-status .inventory-value-content > div { min-width:0; }
#inventory-status .inventory-value-content strong {
  display:block;
  overflow:hidden;
  color:#172033;
  font-size:25px;
  font-weight:820;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
#inventory-status .inventory-value-content p { margin:7px 0 0; color:#8290a5; font-size:11px; }
#inventory-status .inventory-total-value-content {
  display:grid;
  grid-template-rows:1fr 1px 1fr;
  gap:0;
  align-content:center;
  padding:7px 8px 13px;
}
#inventory-status .inventory-value-stat {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-width:0;
  padding:9px 4px;
}
#inventory-status .inventory-value-card .inventory-health-heading h4 { font-size:16px; }
#inventory-status .inventory-value-card .inventory-health-heading span { font-size:12px; }
#inventory-status .inventory-value-stat > span { color:#7d8ba0; font-size:12px; font-weight:700; }
#inventory-status .inventory-value-stat p { display:flex; align-items:baseline; justify-content:flex-end; gap:5px; min-width:0; margin:0; }
#inventory-status .inventory-value-stat strong { color:#172033; font-size:28px; font-weight:820; line-height:1.1; font-variant-numeric:tabular-nums; }
#inventory-status .inventory-quantity-stat strong { color:#16885a; }
#inventory-status .inventory-value-stat em { color:#7f8ca0; font-size:12px; font-style:normal; font-weight:700; }
#inventory-status .inventory-value-divider { display:block; width:100%; height:1px; background:#e6ebf2; }

#inventory-status .panel { padding:14px 16px 16px; }
#inventory-status .panel .list-head { display:none; }
#inventory-status .filters {
  grid-template-columns:minmax(300px,1fr) 112px repeat(4,116px) max-content max-content;
  gap:9px;
}
#inventory-status .filters > select { padding-left:10px; padding-right:28px; }
#inventory-status .inventory-search-wrap { position:relative; min-width:0; }
#inventory-status .inventory-search-wrap input { box-sizing:border-box; width:100%; height:100%; padding-left:39px; }
#inventory-status .inventory-search-icon {
  position:absolute;
  z-index:2;
  top:50%;
  left:13px;
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  color:#718198;
  transform:translateY(-50%);
  pointer-events:none;
}
#inventory-status .inventory-search-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
#inventory-status .inventory-table-wrap { height:calc(100vh - 590px); min-height:330px; }
body.square-cards #inventory-status .inventory-metric-card,
body.square-cards #inventory-status .inventory-health-card { border-radius:0; }
body.card-shadow-enabled #inventory-status .inventory-metric-card,
body.card-shadow-enabled #inventory-status .inventory-health-card { box-shadow:0 5px 18px rgba(15,23,42,.06); }

@media (max-width:1280px) {
  #inventory-status .filters { grid-template-columns:minmax(280px,1fr) 110px repeat(3,112px); }
  #inventory-status .filters > button { justify-self:start; }
}
@media (max-width:1180px) {
  #inventory-status .inventory-metrics { grid-template-columns:repeat(4,minmax(150px,1fr)); }
}
@media (max-width:1050px) {
  #inventory-status .inventory-health-grid { grid-template-columns:1fr; }
  #inventory-status .inventory-metrics { grid-template-columns:repeat(3,minmax(145px,1fr)); }
  #inventory-status .inventory-table-wrap { height:calc(100vh - 720px); }
}
@media (max-width:760px) {
  #inventory-status .inventory-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #inventory-status .inventory-metric-card { min-height:92px; padding:13px 12px; }
  #inventory-status .inventory-health-content { grid-template-columns:130px minmax(0,1fr); gap:10px; }
  #inventory-status .inventory-health-donut { width:108px; height:108px; }
  #inventory-status .inventory-health-donut::before { width:68px; height:68px; }
  #inventory-status .inventory-urgency-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 0; }
  #inventory-status .inventory-urgency-metrics > div:nth-child(3) { border-left:0; }
  #inventory-status .filters > select { flex:0 1 130px; }
}

/* 2026-08-12 inventory paging and fixed detail-dialog workspace. */
#inventory-status .filters {
  grid-template-columns:minmax(240px,1.8fr) repeat(4,minmax(110px,1fr)) max-content;
  align-items:center;
}
#inventory-status .inventory-table-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:52px;
  margin:12px 0 0;
  padding:7px 10px;
  border:1px solid #dfe6ef;
  border-bottom:0;
  border-radius:11px 11px 0 0;
  background:#f7f9fc;
}
#inventory-status .inventory-table-toolbar-label { color:#75879f; font-size:12px; font-weight:600; letter-spacing:.04em; }
#inventory-status .inventory-table-toolbar-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:6px; margin-left:auto; }
#inventory-status .inventory-table-toolbar button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; padding:7px 11px; border:0; border-radius:7px; background:transparent; color:#526d91; line-height:1.4; font-family:inherit; font-size:13px; font-weight:600; box-shadow:none; }
#inventory-status .inventory-table-toolbar button:hover { background:#eaf0f8; color:#326ac4; }
#inventory-status .inventory-table-toolbar button .asset-icon { width:19px; height:19px; flex:0 0 19px; }
#inventory-status .inventory-table-toolbar + .inventory-table-wrap { border-radius:0 0 11px 11px; }
#inventory-status .inventory-sync-button .asset-icon { width:22px; height:22px; }
#inventory-status .filters > input,
#inventory-status .filters > .inventory-search-wrap,
#inventory-status .filters > select { min-width:0; }
#inventory-status .inventory-table { border-collapse:separate; border-spacing:0; }
#inventory-status .inventory-table th,
#inventory-status .inventory-table td {
  border-right:1px solid #e3e9f1;
  text-align:center;
  vertical-align:middle;
}
#inventory-status .inventory-table th:last-child,
#inventory-status .inventory-table td:last-child { border-right:0; }
#inventory-status .inventory-table thead th {
  min-height:48px;
  padding-top:14px;
  padding-bottom:14px;
  background:#eef3f9;
  color:#34445a;
  font-size:14px;
  font-weight:700;
  letter-spacing:.01em;
  z-index:20;
  box-shadow:inset 0 -1px 0 #d8e1ec;
}
#inventory-status .inventory-th-inner { display:inline-flex; align-items:center; justify-content:center; gap:6px; width:100%; }
#inventory-status .inventory-table thead .sort-link { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0; min-height:24px; font:inherit; color:inherit; background:transparent; border:0; box-shadow:none; }
#inventory-status .inventory-table thead .sort-link:hover { color:#2e6ac8; }
#inventory-status .inventory-table thead .help-dot { vertical-align:middle; margin-left:4px; }
#inventory-status .inventory-pin { flex:0 0 auto; }
#inventory-status .inventory-table .inventory-sticky-cell {
  position:sticky !important;
  left:var(--inventory-sticky-left) !important;
  z-index:16;
  background:#fff;
}
#inventory-status .inventory-table thead .inventory-sticky-cell { z-index:44; background:#eef3f9; }
#inventory-status .inventory-table .inventory-sticky-edge { border-right:1px solid #cbd5e1; box-shadow:none; }
#inventory-status .inventory-table tbody td.inventory-sellable-value {
  color:#16885a;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

/* Inventory automatic synchronization V1. */
#settings-inventory { gap:18px; }
#settings-inventory .inventory-sync-settings-panel { margin-top:18px; }
#settings-inventory .inventory-sync-settings-form { gap:18px; }
#settings-inventory .inventory-source-options {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0;
  padding:0;
  border:0;
}
#settings-inventory .inventory-source-options legend { grid-column:1/-1; margin-bottom:8px; color:#344054; font-size:13px; font-weight:800; }
#settings-inventory .inventory-source-options label {
  display:flex;
  align-items:center;
  gap:11px;
  min-height:72px;
  padding:13px 15px;
  border:1px solid #dfe6f0;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
#settings-inventory .inventory-source-options label:has(input:checked) { border-color:#78a5f4; background:#f5f9ff; box-shadow:0 0 0 2px rgba(55,121,234,.08); }
#settings-inventory .inventory-source-options input { width:17px; height:17px; margin:0; accent-color:#3478e5; }
#settings-inventory .inventory-source-options span { display:grid; gap:4px; }
#settings-inventory .inventory-source-options strong { color:#243248; font-size:14px; }
#settings-inventory .inventory-source-options small { color:#8490a3; font-size:12px; font-weight:500; }
#settings-inventory .inventory-automatic-options { display:grid; gap:14px; padding:16px; border:1px solid #e2e8f1; border-radius:13px; background:#f8fafc; }
#settings-inventory .inventory-switch-row { display:flex; align-items:center; justify-content:space-between; gap:18px; }
#settings-inventory .inventory-switch-row > span:first-child { display:grid; gap:3px; }
#settings-inventory .inventory-switch-row strong { color:#27364a; font-size:14px; }
#settings-inventory .inventory-switch-row small { color:#8793a5; font-size:12px; }
#settings-inventory .switch-control { position:relative; width:46px; height:26px; flex:0 0 46px; }
#settings-inventory .switch-control input { position:absolute; opacity:0; pointer-events:none; }
#settings-inventory .switch-control i { position:absolute; inset:0; border-radius:999px; background:#cbd3de; cursor:pointer; transition:background .18s ease; }
#settings-inventory .switch-control i::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(22,34,52,.2); transition:transform .18s ease; }
#settings-inventory .switch-control input:checked + i { background:#43a56f; }
#settings-inventory .switch-control input:checked + i::after { transform:translateX(20px); }
#settings-inventory .inventory-sync-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid #e4e9f1; border-radius:12px; overflow:hidden; }
#settings-inventory .inventory-sync-summary > div { display:grid; gap:6px; min-width:0; padding:13px 15px; background:#fff; }
#settings-inventory .inventory-sync-summary > div + div { border-left:1px solid #e9edf3; }
#settings-inventory .inventory-sync-summary span { color:#8793a6; font-size:11px; }
#settings-inventory .inventory-sync-summary strong { overflow:hidden; color:#26354a; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
#settings-inventory .inventory-sync-settings-actions { display:flex; gap:10px; }

#inventory-status .inventory-sync-button { color:#2e6e51; border-color:#b9dbc8; background:#f2fbf6; }
#inventory-status .inventory-sync-button:hover { background:#e8f7ee; }
#inventory-status .inventory-sync-button:disabled { opacity:.62; cursor:wait; }
#inventory-status .inventory-table-toolbar .inventory-sync-button,
#inventory-status .inventory-table-toolbar .inventory-export-button {
  border:0;
  background:transparent;
  box-shadow:none;
}
#inventory-status .inventory-table-toolbar .inventory-sync-button:hover,
#inventory-status .inventory-table-toolbar .inventory-export-button:hover { background:#eaf0f6; }
#inventory-import #inventory-onhand-import-card.is-source-disabled { position:relative; border-color:#d8dee8; background:#f4f6f9; filter:saturate(.3); }
#inventory-import #inventory-onhand-import-card.is-source-disabled .inventory-import-card-body,
#inventory-import #inventory-onhand-import-card.is-source-disabled .inventory-import-copy { opacity:.54; }
#inventory-import .inventory-onhand-disabled-note { position:relative; z-index:2; margin:0 30px 12px; padding:10px 13px; border:1px solid #dbe3ee; border-radius:9px; background:#fff; color:#66758a; font-size:12px; font-weight:700; }

#inventory-sync-dialog .inventory-sync-dialog-card { width:min(840px,calc(100vw - 40px)); max-width:840px; }
#inventory-sync-dialog .inventory-sync-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
#inventory-sync-dialog .inventory-sync-dialog-head h3 { margin:0; }
#inventory-sync-dialog .inventory-sync-dialog-head p { margin:6px 0 0; color:#7f8ca0; }
#inventory-sync-dialog .inventory-sync-result-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:20px 0; }
#inventory-sync-dialog .inventory-sync-result-grid article { display:grid; gap:5px; padding:13px; border:1px solid #e2e8f0; border-radius:11px; background:#f8fafc; }
#inventory-sync-dialog .inventory-sync-result-grid span { color:#8390a3; font-size:11px; }
#inventory-sync-dialog .inventory-sync-result-grid strong { color:#25344a; font-size:19px; font-variant-numeric:tabular-nums; }
#inventory-sync-dialog .inventory-sync-issues { border-top:1px solid #e6ebf2; padding-top:16px; }
#inventory-sync-dialog .inventory-sync-issues h4 { margin:0 0 10px; color:#2d3b50; }
#inventory-sync-dialog .inventory-sync-issue-list { max-height:250px; overflow:auto; border:1px solid #e3e8ef; border-radius:10px; }
#inventory-sync-dialog .inventory-sync-issue-list > div { display:grid; grid-template-columns:minmax(160px,190px) minmax(150px,190px) minmax(260px,1fr); gap:16px; min-width:650px; padding:11px 13px; color:#58677c; font-size:12px; line-height:1.5; }
#inventory-sync-dialog .inventory-sync-issue-list > div + div { border-top:1px solid #edf0f4; }
#inventory-sync-dialog .inventory-sync-issue-list > div > * { min-width:0; }
#inventory-sync-dialog .inventory-sync-issue-list > div > span:first-child { overflow-wrap:anywhere; word-break:break-word; }
#inventory-sync-dialog .inventory-sync-issue-list code { overflow:hidden; color:#2c3a50; text-overflow:ellipsis; white-space:nowrap; }
#inventory-sync-dialog .inventory-sync-issue-list .is-empty { display:block; padding:24px; text-align:center; color:#8a96a8; }

#inventory-sync-loading { position:fixed; z-index:20000; inset:0; display:grid; place-items:center; background:rgba(37,46,61,.34); backdrop-filter:blur(5px); }
#inventory-sync-loading.hidden { display:none; }
#inventory-sync-loading > div { display:grid; justify-items:center; min-width:310px; padding:28px 34px; border:1px solid rgba(255,255,255,.75); border-radius:18px; background:rgba(255,255,255,.94); box-shadow:0 18px 45px rgba(28,39,57,.18); }
#inventory-sync-loading strong { margin-top:13px; color:#27364a; font-size:16px; }
#inventory-sync-loading p { margin:7px 0 0; color:#8190a5; font-size:12px; }
#inventory-sync-loading .inventory-sync-spinner { width:31px; height:31px; border:3px solid #dbe7f8; border-top-color:#3d7ce4; border-radius:50%; animation:inventory-sync-spin .8s linear infinite; }
@keyframes inventory-sync-spin { to { transform:rotate(360deg); } }

@media (max-width:900px) {
  #settings-inventory .inventory-source-options { grid-template-columns:1fr; }
  #settings-inventory .inventory-sync-summary,
  #inventory-sync-dialog .inventory-sync-result-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
body.theme-midnight #inventory-status .inventory-table .inventory-sticky-cell { background:#1d222b; }
body.theme-midnight #inventory-status .inventory-table thead .inventory-sticky-cell { background:#252b36; }
#inventory-status .inventory-table-wrap {
  height:clamp(495px,66vh,820px);
  min-height:495px;
}
#inventory-status .inventory-table-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:58px;
  padding:10px 2px 0;
}
#inventory-status .inventory-table-footer .table-counter { padding:0; }
#inventory-status .inventory-pagination { display:flex; align-items:center; gap:8px; color:#667085; font-size:13px; white-space:nowrap; }
#inventory-status .inventory-pagination button {
  width:36px;
  min-width:36px;
  height:36px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:9px;
  font-size:19px;
}
#inventory-status .inventory-pagination select {
  box-sizing:border-box;
  width:150px;
  min-width:150px;
  height:36px;
  min-height:36px;
  padding:0 28px 0 10px;
  border:1px solid #dce4ee;
  border-radius:9px;
  background:#fff;
  color:#344054;
  font-size:13px;
}
#inventory-status .inventory-pagination .system-control,
#inventory-status .inventory-pagination .system-control-trigger {
  width:150px;
  min-width:150px;
  height:36px;
  min-height:36px;
}
#inventory-status .inventory-pagination .system-control-trigger {
  gap:6px;
  padding:0 10px;
  border-color:#dce4ee;
  border-radius:9px;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
#inventory-status .inventory-pagination .system-control-value { white-space:nowrap; }
#inventory-status .inventory-pagination .system-control-chevron {
  width:16px;
  height:16px;
  margin-left:2px;
}

#purchase-orders-app .purchase-table > thead > tr > th:last-child,
#shipments-app .purchase-table > thead > tr > th:last-child { text-align:center; }
#purchase-orders-app .purchase-table .row-actions,
#shipments-app .purchase-table .row-actions { justify-content:center; text-align:center; }
.purchase-view-action .asset-icon {
  width:19px;
  height:19px;
  pointer-events:none;
}

#purchase-detail-dialog { height:min(92vh,900px); }
.purchase-detail-dialog-card {
  height:100%;
  max-height:none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.purchase-detail-dialog-head { flex:0 0 auto; padding-bottom:15px; }
#purchase-detail-dialog-content { flex:1 1 auto; min-height:0; overflow:hidden; }
.purchase-detail-dialog-card .purchase-order-detail-card {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.purchase-detail-dialog-card .purchase-order-detail-summary,
.purchase-detail-dialog-card .shipment-detail-summary { flex:0 0 auto; }
.purchase-detail-dialog-card .purchase-order-detail-table-shell {
  flex:1 1 auto;
  min-height:300px;
  overflow:auto;
  overscroll-behavior:contain;
  background:#fff;
}
.purchase-detail-dialog-card .purchase-order-detail-table > thead > tr > th {
  position:sticky;
  top:0;
  z-index:12;
  background:#f3f7fc;
  border-bottom:1px solid #d5deea;
  box-shadow:0 5px 12px rgba(40,57,80,.06);
}
.purchase-detail-dialog-card .purchase-order-detail-table tbody { background:#fff; }

@media (max-width:1380px) {
  #inventory-status .filters { grid-template-columns:minmax(220px,1.6fr) repeat(4,minmax(100px,1fr)) max-content; }
  #inventory-status .filters > button { justify-self:start; }
}
@media (max-width:900px) {
  #inventory-status .inventory-table-wrap { height:clamp(440px,62vh,700px); min-height:440px; }
  #inventory-status .inventory-table-footer { align-items:flex-start; flex-direction:column; }
  #inventory-status .inventory-pagination { align-self:flex-end; }
  .purchase-detail-dialog-card { padding:16px; }
}

/* Profit report builder: unified overview, responsive 8-step flow and Step 1 form */
.profit-wizard-overview {
  margin: 0 0 18px;
  padding: 22px 24px 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  border-radius: var(--card-radius, 8px);
}

/* The report builder is now two independent cards: overview/stepper + active step. */
#profit-new-app.panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profit-wizard-overview .profit-new-head {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  align-items: flex-end;
}

.profit-new-heading { min-width: 0; }
.profit-new-heading h3 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -.02em; }
.profit-new-heading p { margin: 0; color: #69778c; }
.profit-new-eyebrow {
  display: block;
  color: #6480aa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profit-new-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.profit-new-actions .profit-switcher {
  display: flex;
  align-items: center;
  min-width: min(360px, 36vw);
  color: #59677b;
  font-size: 12px;
  font-weight: 700;
}

.profit-new-actions .profit-switcher select {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  background-color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding-right: 44px;
}

.profit-new-actions .profit-switcher .system-control,
.profit-new-actions .profit-switcher .system-control-trigger {
  height: 46px;
  min-height: 46px;
}
.profit-new-actions .profit-switcher .system-control-trigger {
  padding: 0 18px;
  font-size: 16px;
  font-weight: 750;
}

.profit-new-actions .profit-abandon-btn {
  height: 46px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #dc3545;
  background: #dc3545;
  color: #fff;
  box-shadow: none;
}
.profit-new-actions .profit-abandon-btn:hover {
  border-color: #c92f3e;
  background: #c92f3e;
  color: #fff;
  box-shadow: none;
}

/* System form controls: one visual language for native select/date inputs. */
.system-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.system-control-source {
  position: absolute !important;
  inset: auto auto 0 0 !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.system-control-trigger {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid #cbd7e7;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  color: #26354a;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 180ms ease-out, background-color 180ms ease-out, box-shadow 180ms ease-out;
}
.system-control-trigger:hover {
  border-color: #aebed5;
  background: #fff;
}
.system-control-trigger:focus-visible,
.system-control-trigger[aria-expanded="true"] {
  outline: none;
  border-color: #7898c5;
  box-shadow: 0 0 0 3px rgba(80,124,194,.10);
}
.system-control-trigger:disabled { opacity: .58; cursor: not-allowed; }
.system-control-trigger.is-placeholder .system-control-value { color: #8a97aa; font-weight: 500; }
.system-control-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.system-control-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0 0 0 8px;
  fill: none;
  stroke: #607087;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(0deg);
  transition: transform 180ms ease-out;
}
.system-control-trigger[aria-expanded="true"] .system-control-chevron { transform: rotate(180deg); }
.system-control-calendar {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: #3f72f2;
  -webkit-mask: url('/assets/icons/profit-wizard/calendar.svg') center / contain no-repeat;
  mask: url('/assets/icons/profit-wizard/calendar.svg') center / contain no-repeat;
}
.system-control-popover {
  position: fixed;
  z-index: 20050;
  overflow: auto;
  padding: 8px;
  border: 1px solid #cbd7e7;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  color: #26354a;
  box-shadow: 0 18px 44px rgba(34,52,78,.14), 0 2px 8px rgba(34,52,78,.06);
  overscroll-behavior: contain;
}
.system-control-popover.is-dialog-popover {
  z-index: 2147483000;
}

/* The command palette trigger belongs to the translucent search rail, not to a white field. */
#command-dialog .command-search .system-select-control {
  min-width: 142px;
}
#command-dialog .command-search .system-select-trigger {
  min-height: 38px;
  height: 38px;
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
#command-dialog .command-search .system-select-trigger:hover,
#command-dialog .command-search .system-select-trigger[aria-expanded="true"] {
  border-color: rgba(117, 132, 160, .16);
  background: rgba(255, 255, 255, .18);
  box-shadow: none;
}

/* Roomier month fields without letting search inputs consume the whole toolbar. */
#purchase-orders-app .purchase-filters {
  grid-template-columns: minmax(360px, 680px) 216px 200px auto;
  justify-content: start;
}
#shipments-app .purchase-filters {
  grid-template-columns: minmax(360px, 680px) 216px auto;
  justify-content: start;
}
#purchase-compare-app .purchase-filters {
  grid-template-columns: minmax(340px, 620px) 216px 200px auto;
  justify-content: start;
}
.business-toolbar .business-filters > .system-date-control {
  flex: 0 0 196px !important;
  min-width: 196px !important;
  max-width: 196px !important;
}

@media (max-width: 1200px) {
  #purchase-orders-app .purchase-filters,
  #shipments-app .purchase-filters,
  #purchase-compare-app .purchase-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #purchase-orders-app .purchase-filters,
  #shipments-app .purchase-filters,
  #purchase-compare-app .purchase-filters {
    grid-template-columns: 1fr;
  }
  .business-toolbar .business-filters > .system-date-control {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}
.system-select-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #2c3a4e;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.system-select-option:hover { background: #f3f6fb; }
.system-select-option.is-selected { background: #edf2ff; color: #2462d5; }
.system-select-option:disabled { opacity: .45; cursor: not-allowed; }
.system-select-group { padding: 10px 14px 5px; color: #8793a5; font-size: 11px; font-weight: 800; }
.system-date-popover { padding: 14px; overflow: hidden auto; }
.system-date-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.system-date-head strong { text-align: center; font-size: 15px; }
.system-date-head button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: #f3f6fb;
  color: #53657e;
  font-size: 24px;
  cursor: pointer;
}
.system-date-head button:hover { background: #eaf0f9; color: #2765df; }
.system-date-week,
.system-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.system-date-week { margin-bottom: 4px; }
.system-date-week span {
  padding: 7px 0;
  color: #8390a3;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}
.system-date-grid button,
.system-month-grid button {
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #2b394d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.system-date-grid button:hover,
.system-month-grid button:hover { background: #f1f5fb; }
.system-date-grid button.is-selected,
.system-month-grid button.is-selected { background: #e7edff; color: #225ed0; }
.system-date-grid button.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1px #a8bde5; }
.system-date-grid button:disabled,
.system-month-grid button:disabled { opacity: .28; cursor: not-allowed; }
.system-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* The draft deletion action is deliberately solid danger, never a glow/outline button. */
.profit-new-actions button.profit-abandon-btn,
.profit-new-actions button.profit-abandon-btn.danger-soft {
  border-color: #dc3545 !important;
  background: #dc3545 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.profit-new-actions button.profit-abandon-btn:hover,
.profit-new-actions button.profit-abandon-btn.danger-soft:hover {
  border-color: #c92f3e !important;
  background: #c92f3e !important;
  color: #fff !important;
  box-shadow: none !important;
}

.profit-control-icon {
  display: inline-block;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.profit-delete-icon {
  width: 19px;
  height: 19px;
  -webkit-mask-image: url('/assets/icons/profit-wizard/delete.svg');
  mask-image: url('/assets/icons/profit-wizard/delete.svg');
}

.profit-wizard-flow {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 0;
  margin: 14px 0 0;
  padding: 18px 0 15px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c8d3e2 transparent;
}

.profit-flow-step {
  width: 100%;
  min-width: 0;
  min-height: 92px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  gap: 6px;
  padding: 4px 8px 8px;
  text-align: center;
}

.profit-flow-step::after {
  left: calc(50% + 21px);
  right: calc(-50% + 21px);
  top: 21px;
  height: 3px;
  transform: none;
  background: #b9c8dc;
}

.profit-flow-step:last-child::after { display: none; }

.profit-flow-index {
  width: 36px;
  height: 36px;
  border: 1px solid #ced8e6;
  background: #f5f7fb;
  color: #6d7b90;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.profit-flow-step.current .profit-flow-index {
  border-color: #6484f5;
  background: linear-gradient(135deg, #3f7cff, #7567eb);
  color: #fff;
  box-shadow: 0 6px 16px rgba(71, 101, 229, .22);
}

.profit-flow-step.current .profit-flow-index::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(82, 112, 242, .34);
  border-radius: inherit;
  opacity: .25;
  animation: profit-step-pulse 2.4s ease-out infinite;
}

.profit-flow-step.current .profit-flow-text strong { color: #365bc4; }
.profit-flow-step.done .profit-flow-index {
  background: #e7f8f1;
  border-color: #a6ddca;
  color: #13835f;
}
.profit-flow-step.done::after { background: linear-gradient(90deg, #7ecfb2, #b8c9ee); }
.profit-flow-text { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.profit-flow-text strong { color: #344054; font-size: 14px; }
.profit-flow-text small { color: #8a96a8; font-size: 11px; }

@keyframes profit-step-pulse {
  0% { transform: scale(.86); opacity: .5; }
  70%, 100% { transform: scale(1.2); opacity: 0; }
}

.profit-step-panel {
  margin-top: 0;
  border-radius: var(--card-radius, 8px);
}

.profit-basic-step-panel {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .94);
}

.profit-step-header {
  margin: 18px;
  padding: 18px 20px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: linear-gradient(105deg, #fbfdff 0%, #f4f8ff 58%, #f8f7ff 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: auto;
  height: 110px;
  min-height: 110px;
  box-sizing: border-box;
}

/* Legacy steps retain their content padding. Compensate only the shared header
   so Steps 2-8 use the exact same outer geometry as Step 1. */
.profit-step-panel:not(.profit-basic-step-panel) > .profit-step-header {
  margin: -6px -6px 18px;
}

.profit-step-header .profit-step-title { margin: 0; }
.profit-step-header .profit-step-title h4 { margin: 2px 0 5px; font-size: 21px; color: #1f2a3d; }
.profit-step-header .profit-step-title p { font-size: 13px; }
.profit-step-kicker {
  color: #4772e8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profit-step-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: nowrap; }
.profit-step-header-actions .profit-inline-actions { display: contents; }
.profit-step-header-actions button { min-height: 44px; border-radius: 10px; padding-inline: 18px; }
.profit-step-header-actions .profit-step-primary {
  border-color: #346af0;
  background: linear-gradient(135deg, #326cf3, #4f6fe8);
  color: #fff;
  box-shadow: none;
}

.profit-step-header-actions .profit-step-primary:hover,
.profit-step-header-actions .profit-step-primary:focus-visible {
  box-shadow: none;
}

.profit-basic-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 22px;
  padding: 5px 24px 28px;
}

.profit-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.profit-field > span:first-child em { margin-left: 3px; color: #e5484d; font-style: normal; }
.profit-field > small { min-height: 16px; color: #8490a3; font-size: 11px; line-height: 1.45; font-weight: 500; }
.profit-field input,
.profit-field select,
.profit-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c7d3e2;
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  color: #273448;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .02);
}

.profit-field input,
.profit-field select { height: 50px; padding: 0 14px; }
.profit-field textarea { min-height: 112px; padding: 14px 16px 34px; resize: vertical; }
.profit-field input:focus,
.profit-field select:focus,
.profit-field textarea:focus {
  outline: none;
  border-color: #7191f3;
  box-shadow: 0 0 0 3px rgba(84, 115, 230, .1);
}

.profit-input-shell,
.profit-brand-control { position: relative; display: block; min-width: 0; }
.profit-input-shell > input { padding-right: 86px; }
.profit-input-suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a96a8;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}
.profit-textarea-shell .profit-input-suffix { top: auto; bottom: 11px; transform: none; }

.profit-brand-control > input,
.profit-brand-control > select { padding-left: 49px; }
.profit-brand-icon {
  position: absolute;
  z-index: 2;
  left: 13px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #4772e8;
  font-weight: 900;
}
.profit-brand-icon img { max-width: 24px; max-height: 22px; object-fit: contain; display: block; }
.profit-brand-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profit-field-wide { grid-column: 1 / -1; }

.profit-date-control,
.profit-platform-picker {
  position: relative;
  display: block;
  min-width: 0;
}
.profit-date-control input { padding-left: 48px; }
.profit-calendar-icon,
.profit-store-icon {
  position: absolute;
  z-index: 2;
  left: 15px;
  top: 50%;
  width: 21px;
  height: 21px;
  transform: translateY(-50%);
  color: #4c72df;
  pointer-events: none;
}
.profit-calendar-icon {
  -webkit-mask-image: url('/assets/icons/profit-wizard/calendar.svg');
  mask-image: url('/assets/icons/profit-wizard/calendar.svg');
}
.profit-store-icon {
  -webkit-mask-image: url('/assets/icons/profit-wizard/store.svg');
  mask-image: url('/assets/icons/profit-wizard/store.svg');
}
.profit-field input[type="date"]::-webkit-calendar-picker-indicator,
.profit-field input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 24px;
  cursor: pointer;
}
.profit-date-trigger {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 48px;
  border: 1px solid #c7d3e2;
  border-radius: 10px;
  background: rgba(255,255,255,.98);
  color: #273448;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.profit-date-trigger:hover { border-color: #9eb2d3; }
.profit-date-trigger:focus-visible {
  outline: none;
  border-color: #7191f3;
  box-shadow: 0 0 0 3px rgba(84,115,230,.1);
}
.profit-date-trigger::after {
  content: "";
  position: absolute;
  right: 19px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #5b687b;
  border-bottom: 2px solid #5b687b;
  transform: translateY(-70%) rotate(45deg);
}
.profit-date-menu {
  display: none;
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #d5dfec;
  border-radius: 12px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 16px 36px rgba(30,47,75,.16);
}
.profit-date-control.is-open .profit-date-menu { display: block; }
.profit-date-menu-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.profit-date-menu-head strong { text-align: center; font-size: 13px; }
.profit-date-menu-head button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f3f6fb;
  color: #53627a;
  cursor: pointer;
}
.profit-date-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
.profit-date-grid.is-day-grid { grid-template-columns: repeat(7, minmax(0,1fr)); }
.profit-date-weekday { padding: 4px 0; color: #8a96a8; font-size: 10px; text-align: center; }
.profit-date-option {
  min-width: 0;
  min-height: 34px;
  padding: 5px 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  cursor: pointer;
}
.profit-date-option:hover { background: #f0f5ff; color: #315fc8; }
.profit-date-option.is-selected { background: #e8efff; color: #2457c5; font-weight: 800; }
.profit-date-option.is-blank { visibility: hidden; pointer-events: none; }
.profit-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b687b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 46px;
}
.profit-platform-trigger {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 14px;
  border: 1px solid #c7d3e2;
  border-radius: 10px;
  background: rgba(255,255,255,.98);
  color: #273448;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  cursor: pointer;
}
.profit-platform-trigger .profit-brand-icon {
  position: static;
  transform: none;
  flex: 0 0 24px;
}
.profit-platform-trigger strong { font-size: 14px; text-align: left; }
.profit-select-chevron {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #5b687b;
  border-bottom: 2px solid #5b687b;
  transform: translateY(-70%) rotate(45deg);
}
.profit-platform-menu {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  border: 1px solid #d5dfec;
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 30px rgba(30,47,75,.13);
}
.profit-platform-picker.is-open .profit-platform-menu { display: grid; gap: 3px; }
.profit-platform-menu button {
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2d394d;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  justify-content: flex-start;
  cursor: pointer;
}
.profit-platform-menu button:hover,
.profit-platform-menu button[aria-selected="true"] { background: #f0f5ff; color: #315fc8; }
.profit-platform-menu img,
.profit-platform-fallback { width: 24px; height: 24px; object-fit: contain; display: grid; place-items: center; }

/* Keep the report builder aligned with the global card-corner preference. */
body.square-cards .profit-wizard-overview,
body.square-cards .profit-step-panel { border-radius: 0; }

@media (max-width: 1250px) {
  .profit-basic-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .profit-wizard-overview { padding: 18px 16px 14px; }
  .profit-wizard-overview .profit-new-head,
  .profit-step-header { align-items: stretch; flex-direction: column; }
  .profit-new-actions { align-items: stretch; flex-direction: column; }
  .profit-step-header { width: auto; height: auto; min-height: 110px; }
  .profit-step-header-actions { justify-content: flex-start; flex-wrap: wrap; }
  .profit-new-actions .profit-switcher { min-width: 0; width: 100%; }
  .profit-wizard-flow { grid-template-columns: repeat(8, minmax(105px, 1fr)); }
  .profit-basic-form { grid-template-columns: 1fr; padding-inline: 18px; }
  .profit-field-wide { grid-column: auto; }
  .profit-step-header-actions button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .profit-flow-step.current .profit-flow-index::before { animation: none; }
}

/* 2026-08-14 final corrections: explicit layout beats inherited button rules. */
.sidebar.collapsed .settings-menu[data-tooltip] {
  overflow: visible !important;
}
.sidebar.collapsed .settings-menu[data-tooltip]::after {
  left: 52px !important;
  top: 50% !important;
  width: auto !important;
  min-width: 68px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#inventory-status .inventory-pagination .system-control {
  display: inline-block !important;
  width: 140px !important;
  min-width: 140px !important;
  flex: 0 0 140px !important;
}
#inventory-status .inventory-pagination .system-control-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-flow: row nowrap !important;
  width: 140px !important;
  min-width: 140px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  gap: 8px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
#inventory-status .inventory-pagination .system-control-value {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  line-height: 34px !important;
  white-space: nowrap !important;
}
#inventory-status .inventory-pagination .system-control-chevron {
  display: block !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.account-center-head,
#settings-basic .account-settings-hero,
.settings-popover-user[data-profile-tier] {
  border: 0 !important;
  outline: 0 !important;
}
.account-center-head .avatar-lg,
#settings-basic .account-settings-hero .avatar-xl {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Restore the project's original loading indicators. */
.profit-operation-spinner {
  display: inline-block !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  border: 4px solid #dbeafe !important;
  border-top-color: #2563eb !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: profit-spin .82s linear infinite !important;
}
.profit-operation-spinner::before,
.profit-operation-spinner::after { display: none !important; }
.profit-loading-orbit {
  display: block !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  border: 1px solid #dbe5f2 !important;
  position: relative !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}
.profit-loading-orbit::before,
.profit-loading-orbit::after { display: none !important; }
.profit-loading-orbit span {
  display: block !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: 50% !important;
  border: 4px solid transparent !important;
  border-top-color: #2563eb !important;
  border-right-color: #10b981 !important;
  animation: profitOrbitSpin .9s linear infinite !important;
}
.button-spinner {
  display: inline-block !important;
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
  border: 2px solid currentColor !important;
  border-right-color: transparent !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: profit-spin .72s linear infinite !important;
}
.button-spinner::before,.button-spinner::after { display:none !important; }
@keyframes profit-spin { to { transform: rotate(360deg); } }
@keyframes profitOrbitSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .profit-operation-spinner,.profit-loading-orbit span,.button-spinner { animation-duration: 2s !important; }
}

/* Permission crown ornaments: one transparent sprite, tier-specific quadrant. */
.account-center-head[data-profile-tier]::before,
#settings-basic .account-settings-hero[data-profile-tier]::before,
.settings-popover-user[data-profile-tier]::before {
  content:"";
  position:absolute;
  z-index:1;
  width:320px;
  height:320px;
  right:-52px;
  top:-62px;
  background-image:url("/assets/profile-crowns-v1.webp");
  background-repeat:no-repeat;
  background-size:200% 200%;
  opacity:.21;
  pointer-events:none;
  will-change:transform;
  animation:profileCrownFloat 5.8s ease-in-out infinite alternate;
}
.account-center-head[data-profile-tier="diamond"]::before,
#settings-basic .account-settings-hero[data-profile-tier="diamond"]::before,
.settings-popover-user[data-profile-tier="diamond"]::before { background-position:0 0; }
.account-center-head[data-profile-tier="gold"]::before,
#settings-basic .account-settings-hero[data-profile-tier="gold"]::before,
.settings-popover-user[data-profile-tier="gold"]::before { background-position:100% 0; }
.account-center-head[data-profile-tier="silver"]::before,
#settings-basic .account-settings-hero[data-profile-tier="silver"]::before,
.settings-popover-user[data-profile-tier="silver"]::before { background-position:0 100%; }
.account-center-head[data-profile-tier="blue"]::before,
#settings-basic .account-settings-hero[data-profile-tier="blue"]::before,
.settings-popover-user[data-profile-tier="blue"]::before { background-position:100% 100%; }

.settings-popover-user[data-profile-tier] {
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.settings-popover-user[data-profile-tier]::before {
  width:112px;
  height:112px;
  right:-22px;
  top:-27px;
  opacity:.16;
  animation-duration:5.2s;
}
.settings-popover-user[data-profile-tier] > * {
  position:relative;
  z-index:2;
}
.account-center-head[data-profile-tier] > *,
#settings-basic .account-settings-hero[data-profile-tier] > * { z-index:2; }
@keyframes profileCrownFloat {
  from { transform:translate3d(0,-5px,0) rotate(-1.2deg); }
  to { transform:translate3d(-3px,8px,0) rotate(1.2deg); }
}
@media (max-width:760px) {
  .account-center-head[data-profile-tier]::before,
  #settings-basic .account-settings-hero[data-profile-tier]::before {
    width:250px;
    height:250px;
    right:-62px;
    top:-38px;
    opacity:.23;
  }
}
@media (prefers-reduced-motion:reduce) {
  .account-center-head[data-profile-tier]::before,
  #settings-basic .account-settings-hero[data-profile-tier]::before,
  .settings-popover-user[data-profile-tier]::before { animation:none !important; }
}

/* Report-card wave motion: a full, restrained breathing cycle. */
.profit-center-card .geometry-wave {
  left:-22% !important;
  bottom:-50px !important;
  width:144% !important;
  height:184px !important;
  transform-origin:50% 100%;
  background-size:180% 100% !important;
  will-change:transform,background-position,opacity;
  animation:reportWaveCycle 12s cubic-bezier(.45,.05,.55,.95) infinite !important;
}
.profit-center-grid > .profit-center-card:nth-child(3n+2) .geometry-wave { animation-delay:-4s !important; }
.profit-center-grid > .profit-center-card:nth-child(3n) .geometry-wave { animation-delay:-8s !important; }
@keyframes reportWaveCycle {
  0% {
    transform:translate3d(-3.5%,5px,0) scaleY(.94) skewX(-1deg);
    background-position:0% 50%;
    opacity:.18;
  }
  25% {
    transform:translate3d(0,-5px,0) scaleY(1.04) skewX(.7deg);
    background-position:32% 50%;
    opacity:.22;
  }
  50% {
    transform:translate3d(3.5%,-1px,0) scaleY(1.08) skewX(1.2deg);
    background-position:66% 50%;
    opacity:.25;
  }
  75% {
    transform:translate3d(0,6px,0) scaleY(.98) skewX(-.5deg);
    background-position:100% 50%;
    opacity:.21;
  }
  100% {
    transform:translate3d(-3.5%,5px,0) scaleY(.94) skewX(-1deg);
    background-position:0% 50%;
    opacity:.18;
  }
}
@media (prefers-reduced-motion:reduce) {
  .profit-center-card .geometry-wave { animation:none !important; }
}

/* Report-builder detail workspaces: one clean toolbar and compact pager. */
.profit-data-tools,
.profit-data-tools.has-tab-selector,
.profit-data-tools.is-tab-locked {
  display:grid;
  grid-template-columns:minmax(320px,1fr) minmax(210px,280px) max-content;
  align-items:center;
  gap:12px;
  margin:18px 0 16px;
}
.profit-data-tools.is-tab-locked {
  grid-template-columns:minmax(320px,1fr) max-content;
}
.profit-data-tools .profit-search-wrap {
  min-width:0;
  width:100%;
  flex:none;
}
.profit-data-tools .profit-search-wrap input {
  width:100%;
  height:44px;
  padding-right:58px;
  border-color:#d8e1ed;
  border-radius:10px;
}
.profit-data-tools .profit-search-icon-button {
  right:5px;
  width:42px;
  height:36px;
}
.profit-data-tools .profit-search-icon-button svg {
  width:21px;
  height:21px;
  stroke-width:2.2;
}
.profit-data-tools > #profit-data-tab,
.profit-data-tools > .system-control {
  width:100%;
  min-width:0;
}
.profit-data-tools .system-control-trigger {
  height:44px;
  min-height:44px;
}
.profit-data-tools .profit-clear-search-button {
  min-height:40px;
  justify-self:end;
  padding:0 10px;
  border:1px solid transparent;
  color:#4f6ff0;
  background:transparent;
  box-shadow:none;
  white-space:nowrap;
}
.profit-data-tools .profit-clear-search-button:hover:not(:disabled) {
  border-color:#dfe5ff;
  background:#f2f5ff;
}

#profit-data-pagination.profit-pagination {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:10px;
  min-height:58px;
  margin-top:12px;
}
#profit-data-pagination .profit-page-arrow {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border-radius:10px;
  font-size:24px;
  line-height:1;
}
#profit-data-pagination .profit-page-jump-control {
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 126px;
  width:126px;
  height:44px;
  color:#667085;
  font-size:14px;
  white-space:nowrap;
}
#profit-data-pagination .profit-page-display {
  transition:opacity .15s ease;
}
#profit-data-pagination .profit-page-display strong {
  color:#26354a;
  font-size:16px;
}
#profit-data-pagination #profit-data-page-jump {
  position:absolute;
  inset:3px 0;
  width:100%;
  height:38px;
  margin:0;
  padding:0 10px;
  border:1px solid #8eacf0;
  border-radius:9px;
  background:#fff;
  color:#26354a;
  box-shadow:0 0 0 3px rgba(79,111,240,.08);
  font-weight:750;
  text-align:center;
  opacity:0;
  pointer-events:none;
  appearance:textfield;
  transition:opacity .15s ease;
}
#profit-data-pagination #profit-data-page-jump::-webkit-inner-spin-button,
#profit-data-pagination #profit-data-page-jump::-webkit-outer-spin-button { appearance:none; margin:0; }
#profit-data-pagination .profit-page-jump-control:hover .profit-page-display,
#profit-data-pagination .profit-page-jump-control:focus-within .profit-page-display { opacity:0; }
#profit-data-pagination .profit-page-jump-control:hover #profit-data-page-jump,
#profit-data-pagination .profit-page-jump-control:focus-within #profit-data-page-jump {
  opacity:1;
  pointer-events:auto;
}
#profit-data-pagination > #profit-data-page-size,
#profit-data-pagination > .system-control {
  flex:0 0 150px;
  width:150px;
  min-width:150px;
}
#profit-data-pagination .system-control-trigger {
  height:44px;
  min-height:44px;
  flex-flow:row nowrap;
  white-space:nowrap;
}

@media (max-width:900px) {
  .profit-data-tools,
  .profit-data-tools.has-tab-selector,
  .profit-data-tools.is-tab-locked { grid-template-columns:1fr; }
  .profit-data-tools .profit-clear-search-button { justify-self:start; }
  #profit-data-pagination.profit-pagination { justify-content:flex-start; overflow-x:auto; }
}

/* Exception and cost-review workspaces share the same refined metric language. */
.stage-a-overview .tone-muted { --metric-accent:#8793a5; --metric-tint:#f4f6f8; }
.profit-run-meta-strip { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }

.profit-exception-filter {
  display:grid;
  grid-template-columns:minmax(320px,1fr) repeat(4,minmax(150px,190px)) max-content;
  align-items:center;
  gap:10px;
  margin:18px 0 14px;
}
.profit-exception-filter .profit-search-wrap {
  width:100%;
  min-width:0;
}
.profit-exception-filter .profit-search-wrap input {
  width:100%;
  height:44px;
  padding-right:58px;
  border-color:#d8e1ed;
  border-radius:10px;
}
.profit-exception-filter .profit-search-icon-button {
  right:5px;
  width:42px;
  height:36px;
}
.profit-exception-filter .profit-search-icon-button svg {
  width:21px;
  height:21px;
  stroke-width:2.2;
}
.profit-exception-filter > select,
.profit-exception-filter > .system-control {
  width:100%;
  min-width:0;
}
.profit-exception-filter .system-control-trigger {
  min-height:44px;
  height:44px;
  white-space:nowrap;
}
.profit-exception-clear-button {
  justify-self:end;
  min-height:40px;
  padding:0 10px;
  border:1px solid transparent;
  color:#4f6ff0;
  background:transparent;
  box-shadow:none;
  white-space:nowrap;
}
.profit-exception-clear-button:hover:not(:disabled) {
  border-color:#dfe5ff;
  background:#f2f5ff;
}

.profit-exception-table-shell {
  width:100%;
  min-width:0;
  max-width:100%;
  contain:inline-size;
  overflow:hidden;
  border:1px solid #dde5ef;
  border-radius:14px;
  background:#fff;
}
.profit-exception-table-shell .profit-table-wrap.fixed-height {
  width:100%;
  min-width:0;
  max-width:100%;
  border:0;
  border-top:1px solid #e7edf4;
  border-radius:0;
}
.profit-exception-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;
  gap:18px;
  min-height:68px;
  margin:0;
  padding:11px 14px;
  border:0;
  border-radius:0;
  background:linear-gradient(100deg,#f7f9fd 0%,#fbfcff 52%,#f7faff 100%);
}
.profit-batch-title {
  display:flex;
  align-items:center;
  flex:0 0 auto;
  gap:9px;
  color:#26354a;
  white-space:nowrap;
}
.profit-batch-title strong { font-size:15px; }
.profit-batch-title small {
  color:#8a98aa;
  font-size:12px;
  font-weight:600;
}
.profit-batch-buttons {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.profit-batch-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:0 13px;
  border:1px solid #dbe3ed;
  border-radius:9px;
  color:#46566d;
  background:rgba(255,255,255,.9);
  box-shadow:none;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.profit-batch-button:hover {
  border-color:#adc2ef;
  color:#315fbd;
  background:#f7f9ff;
  transform:translateY(-1px);
}
.profit-batch-button.is-exclude {
  border-color:#f0d5d8;
  color:#c24d59;
  background:#fff8f8;
}
.profit-batch-button.is-resolve {
  border-color:#bce7d1;
  color:#16885a;
  background:#f0fbf6;
}
.profit-batch-button.is-resolve:hover { border-color:#79d2a6; background:#e6f8ef; }
.profit-batch-button.is-ignore {
  border-color:#d7dee8;
  color:#69778a;
  background:#f5f7fa;
}
.profit-batch-button.is-ignore:hover { border-color:#b6c0cf; color:#435168; background:#edf1f5; }
.profit-action-icon {
  display:inline-block;
  flex:0 0 auto;
  width:17px;
  height:17px;
  background:currentColor;
  -webkit-mask-position:center;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-size:contain;
  mask-position:center;
  mask-repeat:no-repeat;
  mask-size:contain;
}
.profit-action-icon.icon-batch {
  width:22px;
  height:22px;
  color:#4f6ff0;
  -webkit-mask-image:url('/assets/ui-icons/batch-process-v2.svg');
  mask-image:url('/assets/ui-icons/batch-process-v2.svg');
}
.profit-action-icon.icon-resolve {
  -webkit-mask-image:url('/assets/ui-icons/mark-resolved.svg');
  mask-image:url('/assets/ui-icons/mark-resolved.svg');
}
.profit-action-icon.icon-ignore {
  -webkit-mask-image:url('/assets/ui-icons/ignore.svg');
  mask-image:url('/assets/ui-icons/ignore.svg');
}

@media (max-width:1500px) {
  .profit-exception-filter { grid-template-columns:minmax(300px,1fr) repeat(2,minmax(150px,1fr)); }
  .profit-exception-clear-button { justify-self:start; }
  .profit-exception-actions { align-items:flex-start; flex-direction:column; }
  .profit-batch-buttons { justify-content:flex-start; }
}
@media (max-width:820px) {
  .profit-exception-filter { grid-template-columns:1fr; }
  .profit-batch-title { align-items:flex-start; flex-wrap:wrap; white-space:normal; }
  .profit-batch-buttons { width:100%; }
  .profit-batch-button { flex:1 1 calc(50% - 8px); }
}

/* Review, cost confirmation and publishing use a compact audit-summary system. */
.profit-review-summary-grid {
  display:grid;
  grid-template-columns:repeat(var(--summary-count),minmax(0,1fr));
  gap:10px;
  margin:18px 0 0;
}
.profit-review-summary-grid article {
  --summary-accent:#6688d8;
  --summary-tint:#f3f6fc;
  position:relative;
  display:block;
  min-width:0;
  min-height:88px;
  overflow:hidden;
  padding:17px 16px 15px;
  border:1px solid color-mix(in srgb,var(--summary-accent) 18%,#e4e9f1);
  border-radius:12px;
  background:linear-gradient(145deg,#fff 24%,color-mix(in srgb,var(--summary-tint) 78%,#fff) 100%);
}
.profit-review-summary-grid article::before {
  content:"";
  position:absolute;
  top:0;
  right:0;
  left:0;
  height:4px;
  background:linear-gradient(90deg,var(--summary-accent),color-mix(in srgb,var(--summary-accent) 28%,#fff));
  pointer-events:none;
}
.profit-review-summary-grid article::after {
  content:"";
  position:absolute;
  right:14px;
  bottom:14px;
  width:30px;
  height:4px;
  border-radius:2px;
  background:var(--summary-accent);
  opacity:.14;
  pointer-events:none;
}
.profit-review-summary-grid article > div { position:relative; z-index:1; min-width:0; }
.profit-review-summary-grid article span {
  display:block;
  overflow:hidden;
  color:#69778b;
  font-size:13px;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profit-review-summary-grid article strong {
  display:block;
  overflow:hidden;
  margin-top:9px;
  color:#202d40;
  font-size:23px;
  line-height:1.05;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profit-review-summary-grid .tone-primary { --summary-accent:#5d80d6; --summary-tint:#f1f5fd; }
.profit-review-summary-grid .tone-success { --summary-accent:#24aa74; --summary-tint:#eef9f4; }
.profit-review-summary-grid .tone-finance { --summary-accent:#8068d7; --summary-tint:#f4f1fc; }
.profit-review-summary-grid .tone-warning { --summary-accent:#db923d; --summary-tint:#fff7ed; }
.profit-review-summary-grid .tone-danger { --summary-accent:#d95c6a; --summary-tint:#fff1f3; }
.profit-review-summary-grid .tone-muted { --summary-accent:#8995a6; --summary-tint:#f3f5f7; }
.profit-review-summary-grid.is-publish article {
  border-color:color-mix(in srgb,var(--summary-accent) 23%,#e2e7f3);
  background:linear-gradient(142deg,#fff 8%,color-mix(in srgb,var(--summary-tint) 78%,#eef1ff) 100%);
}
.profit-exception-step .profit-exception-filter { margin-top:28px; }
.profit-cost-review-step .profit-report-meta {
  margin:22px 0 28px;
  padding:12px 15px;
  border-left:3px solid #8aa5ea;
  border-radius:0 10px 10px 0;
  background:#f7f9fd;
}
.profit-cost-review-step .profit-data-tools { margin-top:0; }

/* Batch actions are lightweight text tools separated by hairlines. */
.profit-batch-buttons { gap:0; }
.profit-batch-button {
  position:relative;
  min-height:36px;
  padding:4px 14px;
  border:0;
  border-radius:0;
  color:#55657a;
  background:transparent;
  box-shadow:none;
  font-size:14px;
  font-weight:750;
}
.profit-batch-button + .profit-batch-button { border-left:1px solid #dfe5ed; }
.profit-batch-button:hover {
  border-color:#dfe5ed;
  color:#315fbd;
  background:transparent;
  box-shadow:none;
  transform:translateY(-1px);
}
.profit-batch-button.is-exclude,
.profit-batch-button.is-resolve,
.profit-batch-button.is-ignore { background:transparent; }
.profit-batch-button.is-exclude { color:#b95661; }
.profit-batch-button.is-exclude:hover { color:#df4657; background:transparent; }
.profit-batch-button.is-resolve { color:#16885a; }
.profit-batch-button.is-resolve:hover { color:#0aa168; background:transparent; }
.profit-batch-button.is-ignore { color:#758195; }
.profit-batch-button.is-ignore:hover { color:#45546a; background:transparent; }
.profit-batch-button .profit-action-icon { width:18px; height:18px; }

/* Store overview is grouped by business meaning; ratios use compact bars. */
.profit-store-overview {
  display:grid;
  gap:18px;
  margin-top:18px;
}
.profit-overview-group {
  --overview-accent:#5f83df;
  --overview-soft:#f4f7fe;
  padding:18px 20px 20px;
  border:1px solid color-mix(in srgb,var(--overview-accent) 15%,#e6eaf1);
  border-radius:16px;
  background:linear-gradient(145deg,#fff 18%,var(--overview-soft) 100%);
}
.profit-overview-group.is-sales { --overview-accent:#4e83e5; --overview-soft:#f1f6ff; }
.profit-overview-group.is-costs { --overview-accent:#8a6bd7; --overview-soft:#f7f3ff; }
.profit-overview-group.is-profit { --overview-accent:#20a976; --overview-soft:#effaf5; }
.profit-overview-group.is-audit { --overview-accent:#d89038; --overview-soft:#fff7ec; }
.profit-overview-group > header {
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:15px;
}
.profit-overview-group-mark {
  flex:0 0 8px;
  width:8px;
  height:32px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--overview-accent),color-mix(in srgb,var(--overview-accent) 24%,#fff));
}
.profit-overview-group > header h5 {
  margin:0;
  color:#27364a;
  font-size:16px;
  line-height:1.2;
}
.profit-overview-group > header p {
  margin:3px 0 0;
  color:#8290a3;
  font-size:12px;
}
.profit-overview-group .profit-bi-card-row {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:11px;
  margin:0;
}
.profit-overview-group.is-profit .profit-bi-card-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.profit-overview-group .profit-bi-card-row article {
  min-height:96px;
  padding:15px 16px;
  border:1px solid color-mix(in srgb,var(--overview-accent) 12%,#e2e7ef);
  border-radius:12px;
  background:rgba(255,255,255,.8);
  box-shadow:none;
}
.profit-overview-group.is-costs .profit-bi-card-row article { min-height:126px; }
.profit-overview-group.is-profit .profit-bi-card-row article {
  min-height:112px;
  background:linear-gradient(135deg,rgba(255,255,255,.92),color-mix(in srgb,var(--overview-accent) 8%,#fff));
}
.profit-overview-group .profit-bi-card-main > span {
  margin-bottom:8px;
  color:#6a788c;
  font-size:12px;
  font-weight:750;
}
.profit-overview-group .profit-bi-card-main > strong {
  color:#1d2a3d;
  font-size:21px;
}
.profit-bi-ratio {
  position:absolute;
  right:15px;
  bottom:14px;
  left:15px;
  z-index:2;
}
.profit-bi-ratio > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
}
.profit-bi-ratio > div span {
  margin:0;
  color:#8a96a8;
  font-size:11px;
}
.profit-bi-ratio > div strong {
  color:var(--overview-accent);
  font-size:12px;
  font-weight:850;
}
.profit-bi-ratio > i {
  display:block;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:color-mix(in srgb,var(--overview-accent) 12%,#edf1f5);
}
.profit-bi-ratio > i > b {
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,color-mix(in srgb,var(--overview-accent) 48%,#fff),var(--overview-accent));
}

@media (max-width:1100px) {
  .profit-review-summary-grid { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
  .profit-overview-group .profit-bi-card-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .profit-review-summary-grid,
  .profit-overview-group .profit-bi-card-row,
  .profit-overview-group.is-profit .profit-bi-card-row { grid-template-columns:1fr; }
  .profit-batch-button { flex:1 1 50%; }
  .profit-batch-button + .profit-batch-button { border-left:0; }
}

/* Report-builder header controls: compact, equal height and readable report name. */
.profit-new-actions .profit-switcher select,
.profit-new-actions .profit-switcher .system-control,
.profit-new-actions .profit-switcher .system-control-trigger,
.profit-new-actions button.profit-abandon-btn {
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
}
.profit-new-actions .profit-switcher .system-control-trigger {
  padding:0 16px;
  font-size:17px;
  font-weight:760;
  line-height:1;
}
.profit-new-actions .profit-switcher .system-control-value {
  font-size:17px;
  font-weight:760;
  line-height:1.1;
}
.profit-new-actions button.profit-abandon-btn {
  padding:0 16px;
  border-width:1px;
  font-size:14px;
  line-height:1;
}
.profit-new-actions .profit-delete-icon { width:18px; height:18px; }

/* Step 6–8 use one continuous audit strip instead of a row of separate cards. */
.profit-review-summary-grid {
  display:grid;
  grid-template-columns:repeat(var(--summary-count),minmax(0,1fr));
  gap:0;
  overflow:hidden;
  margin:20px 0 0;
  border:1px solid #dfe5ed;
  border-radius:16px;
  background:linear-gradient(110deg,#fff 0%,#fafbfd 58%,#f7f9fc 100%);
  box-shadow:0 8px 24px rgba(38,51,73,.045);
}
.profit-review-summary-grid article,
.profit-review-summary-grid.is-publish article {
  --summary-accent:#6688d8;
  position:relative;
  display:flex;
  align-items:center;
  min-width:0;
  min-height:94px;
  overflow:visible;
  padding:19px 18px 16px;
  border:0;
  border-radius:0;
  background:transparent;
}
.profit-review-summary-grid article + article { border-left:1px solid #e6eaf0; }
.profit-review-summary-grid article::before {
  content:"";
  position:absolute;
  top:0;
  right:18px;
  left:18px;
  width:auto;
  height:3px;
  margin:0;
  border-radius:0 0 3px 3px;
  background:var(--summary-accent);
  opacity:.52;
}
.profit-review-summary-grid article::after { display:none; }
.profit-review-summary-grid article span { color:#738095; font-size:12px; font-weight:730; letter-spacing:.01em; }
.profit-review-summary-grid article strong { margin-top:8px; color:#202e42; font-size:22px; }
.profit-review-summary-grid.is-publish {
  border-color:#dfe4ef;
  background:linear-gradient(105deg,#fff 0%,#faf9ff 52%,#f5f6fc 100%);
}

/* Replenishment planning workspace. */
#replenishment-planner > .panel { padding:20px; }
#replenishment-planner .list-head {
  margin-bottom:20px;
  padding-bottom:17px;
  border-bottom:1px solid #e7ebf1;
}
#replenishment-planner .list-head h3 { margin:0 0 5px; font-size:22px; }
#replenishment-planner .list-head p { margin:0; }
#planner-refresh,
#planner-settings-link,
.planner-action-bar > button,
.planner-action-bar > .planner-action {
  height:40px;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:0 14px;
  line-height:1;
}
.planner-setup-grid {
  display:grid;
  grid-template-columns:minmax(430px,1.05fr) minmax(540px,1.25fr);
  gap:18px;
  align-items:stretch;
  margin-bottom:22px;
}
.planner-setup-card {
  min-width:0;
  padding:21px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}
.planner-product-picker { background:linear-gradient(145deg,#fff 0%,#f7faff 100%); }
.planner-parameter-card { background:linear-gradient(145deg,#fff 0%,#f8fafc 100%); }
.planner-setup-head { margin-bottom:18px; }
.planner-setup-head > div { min-width:0; }
.planner-setup-head h4 { margin:3px 0 5px; color:#1f2d40; font-size:18px; }
.planner-setup-head p { margin:0; color:#7b889a; font-size:13px; line-height:1.55; }
.planner-kicker {
  color:#6081d5;
  font-size:10px;
  font-weight:850;
  letter-spacing:.14em;
}
.planner-product-controls {
  display:grid;
  grid-template-columns:minmax(220px,1.05fr) minmax(220px,.95fr);
  gap:12px;
  align-items:end;
}
.planner-product-controls > label,
.planner-settings-form > label {
  position:relative;
  display:grid;
  gap:8px;
  min-width:0;
  color:#58677c;
  font-size:13px;
  font-weight:750;
}
.planner-product-controls select,
.planner-product-controls .system-control,
.planner-product-controls .system-control-trigger { width:100%; height:42px; min-height:42px; }
.planner-search-wrap { position:relative; }
.planner-search-wrap > input {
  width:100%;
  height:42px;
  padding-left:40px;
  border-radius:10px;
  background:#fff;
}
.planner-search-icon {
  position:absolute;
  z-index:2;
  top:50%;
  left:14px;
  width:15px;
  height:15px;
  border:2px solid #718198;
  border-radius:50%;
  transform:translateY(-58%);
  pointer-events:none;
}
.planner-search-icon::after {
  content:"";
  position:absolute;
  right:-5px;
  bottom:-4px;
  width:6px;
  height:2px;
  border-radius:2px;
  background:#718198;
  transform:rotate(45deg);
}
.planner-search-results {
  position:absolute;
  z-index:80;
  top:calc(100% + 7px);
  right:0;
  left:0;
  max-height:340px;
  overflow:auto;
  padding:6px;
  border:1px solid #dfe6ef;
  border-radius:12px;
  background:#fff;
  box-shadow:0 16px 34px rgba(35,49,72,.15);
}
.planner-search-results[hidden] { display:none; }
.planner-search-option {
  width:100%;
  min-height:60px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  gap:11px;
  align-items:center;
  padding:7px 9px;
  border:0;
  border-radius:9px;
  color:#253347;
  background:transparent;
  text-align:left;
}
.planner-search-option:hover { color:#234fa7; background:#f2f6fd; box-shadow:none; transform:none; }
.planner-search-thumb {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #e1e7ef;
  border-radius:9px;
  background:#f2f5fa;
}
.planner-search-thumb img { width:100%; height:100%; object-fit:cover; }
.planner-search-thumb b { color:#6b80a4; font-size:17px; }
.planner-search-option > span:nth-child(2) { min-width:0; }
.planner-search-option strong,
.planner-search-option small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.planner-search-option strong { font-size:13px; }
.planner-search-option small { margin-top:4px; color:#78869a; font-size:12px; font-weight:600; }
.planner-search-option i { color:#8a97a8; font-size:11px; font-style:normal; white-space:nowrap; }
.planner-search-option mark { padding:0 1px; color:#315fb9; background:#e9f0ff; }
.planner-search-no-result { display:grid; gap:4px; padding:18px 14px; text-align:center; }
.planner-search-no-result strong { color:#415168; font-size:13px; }
.planner-search-no-result span { color:#8b97a7; font-size:12px; }
.planner-product-result {
  min-height:126px;
  display:grid;
  grid-template-columns:104px minmax(0,1fr);
  gap:17px;
  align-items:center;
  margin-top:16px;
  padding:15px;
  border:1px solid #dfe7f2;
  border-radius:14px;
  background:rgba(255,255,255,.82);
}
.planner-product-result.is-empty { grid-template-columns:72px minmax(0,1fr); min-height:92px; border-style:dashed; }
.planner-product-result.is-empty strong { color:#536278; font-size:14px; }
.planner-product-result.is-empty p { margin:5px 0 0; color:#8b97a8; font-size:12px; }
.planner-product-empty-art {
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border-radius:0;
  background:transparent;
}
.planner-product-empty-art img { width:58px; height:58px; object-fit:contain; opacity:.78; }
.planner-product-image {
  width:104px;
  height:104px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:12px;
  background:linear-gradient(145deg,#edf3fb,#e4ecf8);
}
.planner-product-image img { width:100%; height:100%; object-fit:cover; }
.planner-product-image > span { color:#7289ad; font-size:32px; font-weight:850; }
.planner-product-image.is-placeholder { overflow:visible; border-radius:0; background:transparent; }
.planner-product-image .planner-product-placeholder-icon { width:72px; height:72px; object-fit:contain; opacity:.78; }
.planner-product-copy { min-width:0; }
.planner-product-title > span { color:#6580b1; font-size:11px; font-weight:800; }
.planner-product-title > strong { display:block; overflow:hidden; margin-top:3px; color:#223146; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.planner-product-title > p { margin:5px 0 11px; color:#748399; font-size:12px; }
.planner-product-copy dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0; }
.planner-product-copy dl > div { min-width:0; }
.planner-product-copy dt { color:#96a0ae; font-size:10px; }
.planner-product-copy dd { overflow:hidden; margin:3px 0 0; color:#4d5b6f; font-size:12px; font-weight:720; text-overflow:ellipsis; white-space:nowrap; }
.planner-parameter-card .planner-setup-head { align-items:flex-start; }
.planner-parameter-card #planner-settings-link { flex:0 0 auto; border-radius:9px; }
.planner-settings {
  grid-template-columns:repeat(4,minmax(90px,1fr));
  gap:0;
  overflow:hidden;
  border:1px solid #e2e7ee;
  border-radius:12px;
  background:rgba(255,255,255,.72);
}
.planner-settings article {
  min-width:0;
  padding:13px 14px;
  border:0;
  border-right:1px solid #e8ecf1;
  border-bottom:1px solid #e8ecf1;
  background:transparent;
}
.planner-settings article:nth-child(4n) { border-right:0; }
.planner-settings article:nth-last-child(-n+3) { border-bottom:0; }
.planner-settings article.is-coverage { grid-column:span 2; border-right:0; background:#f1f6ff; }
.planner-settings span { margin:0 0 5px; font-size:11px; }
.planner-settings strong { color:#2b3a4f; font-size:17px; }
.planner-settings strong small { margin-left:3px; color:#8491a3; font-size:10px; }
.planner-parameter-divider { height:1px; margin:17px 0; background:#e6eaf0; }
.planner-settings-form {
  display:grid;
  grid-template-columns:minmax(170px,.7fr) minmax(270px,1.3fr);
  gap:18px;
  align-items:end;
}
.planner-input-suffix { position:relative; display:block; }
.planner-input-suffix input { width:100%; height:42px; padding-right:42px; border-radius:10px; background:#fff; }
.planner-input-suffix b { position:absolute; top:50%; right:14px; color:#8591a2; font-size:12px; transform:translateY(-50%); }
.planner-checks { min-height:42px; justify-content:flex-start; gap:18px; padding:0; }
.planner-checks .toggle-line { min-height:42px; padding:0 14px; border:1px solid #e1e7ee; border-radius:10px; background:#fff; color:#56657a; font-size:13px; white-space:nowrap; }
#replenishment-planner .planner-block {
  gap:15px;
  margin-top:18px;
  padding:20px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}
#replenishment-planner .planner-block:first-of-type { margin-top:0; }
#replenishment-planner .planner-block-head h4,
#replenishment-planner .planner-block > h4 { margin:0; color:#27364a; font-size:17px; }
.planner-action-bar { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.planner-action-bar > button,
.planner-action-bar > .planner-action { border-radius:9px; font-size:13px; font-weight:740; }
.planner-action-bar .small-upload { border:1px solid #dbe3ed; background:#f7f9fc; color:#46566d; }
.planner-action-bar .small-upload:hover { border-color:#b9c9e5; color:#315fb9; background:#f1f5fc; }
.planner-table .planner-sticky-edge {
  border-right:1px solid #d9e1eb !important;
  box-shadow:none !important;
}

@media (max-width:1180px) {
  .planner-setup-grid { grid-template-columns:1fr; }
  .planner-product-controls { grid-template-columns:1fr 1fr; }
  .profit-review-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profit-review-summary-grid article:nth-child(odd):not(:first-child) { border-left:0; }
  .profit-review-summary-grid article:nth-child(n+3) { border-top:1px solid #e6eaf0; }
}
@media (max-width:680px) {
  .planner-product-controls,
  .planner-settings-form { grid-template-columns:1fr; }
  .planner-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .planner-settings article:nth-child(4n) { border-right:1px solid #e8ecf1; }
  .planner-settings article:nth-child(2n) { border-right:0; }
  .planner-settings article:nth-last-child(-n+3) { border-bottom:1px solid #e8ecf1; }
  .planner-settings article:last-child { border-bottom:0; }
  .planner-settings article.is-coverage { grid-column:span 2; }
  .planner-product-copy dl { grid-template-columns:1fr; }
  .profit-review-summary-grid { grid-template-columns:1fr; }
  .profit-review-summary-grid article + article { border-top:1px solid #e6eaf0; border-left:0; }
}

/* Latest review summary direction: independent, quiet gradient cards. */
.profit-review-summary-grid,
.profit-review-summary-grid.is-publish {
  display:grid;
  grid-template-columns:repeat(var(--summary-count),minmax(0,1fr));
  gap:12px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.profit-review-summary-grid article,
.profit-review-summary-grid.is-publish article {
  min-height:88px;
  padding:16px 17px;
  border:1px solid color-mix(in srgb,var(--summary-accent) 17%,#e3e8ef);
  border-radius:13px;
  background:linear-gradient(138deg,#fff 12%,color-mix(in srgb,var(--summary-tint) 76%,#fff) 100%);
  box-shadow:none;
}
.profit-review-summary-grid article + article { border-left:1px solid color-mix(in srgb,var(--summary-accent) 17%,#e3e8ef); }
.profit-review-summary-grid article::before,
.profit-review-summary-grid article::after { display:none; }
.profit-review-summary-grid article span { color:#6f7d91; }
.profit-review-summary-grid article strong { margin-top:8px; font-size:22px; }

/* Planner actions share one exact baseline and use the product blue primary. */
#replenishment-planner .planner-action-bar {
  min-height:40px;
  align-items:center;
}
#replenishment-planner .planner-action-bar > button,
#replenishment-planner .planner-action-bar > .planner-action,
#replenishment-planner .planner-action-bar > .small-upload {
  height:40px !important;
  min-height:40px !important;
  max-height:40px !important;
  align-self:center;
  box-sizing:border-box;
  margin:0 !important;
  padding:0 14px !important;
  line-height:1 !important;
}
#replenishment-planner #planner-save-plan {
  border-color:#4a70d8;
  background:linear-gradient(135deg,#4b7bea,#596fd8);
  color:#fff;
  box-shadow:none;
}
#replenishment-planner #planner-save-plan:hover {
  border-color:#3e64cb;
  background:linear-gradient(135deg,#416fdf,#5066ce);
  box-shadow:none;
}

/* Publishing is the terminal action: stronger hierarchy with a restrained sweep. */
.profit-step-header-actions .profit-publish-button {
  position:relative;
  isolation:isolate;
  min-width:154px;
  overflow:hidden;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid #5964d8;
  background:linear-gradient(125deg,#505bd5 0%,#6d63df 52%,#4778e7 100%);
  color:#fff;
  box-shadow:0 7px 18px rgba(76,87,205,.18);
  font-weight:800;
}
.profit-step-header-actions .profit-publish-button > span,
.profit-step-header-actions .profit-publish-button > svg { position:relative; z-index:2; }
.profit-step-header-actions .profit-publish-button svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .2s ease;
}
.profit-step-header-actions .profit-publish-button::before {
  content:"";
  position:absolute;
  z-index:1;
  top:-70%;
  bottom:-70%;
  left:-42%;
  width:28%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.42),transparent);
  transform:skewX(-18deg);
  animation:profitPublishSweep 3.8s ease-in-out infinite;
}
.profit-step-header-actions .profit-publish-button:hover {
  border-color:#4d58ce;
  background:linear-gradient(125deg,#4652cc,#655bd7 52%,#3f70de);
  box-shadow:0 9px 22px rgba(76,87,205,.24);
  transform:translateY(-1px);
}
.profit-step-header-actions .profit-publish-button:hover svg { transform:translateX(2px); }
.profit-step-header-actions .profit-publish-button:disabled {
  border-color:#d8deea;
  background:#e9edf4;
  color:#9aa5b5;
  box-shadow:none;
  transform:none;
}
.profit-step-header-actions .profit-publish-button:disabled::before { display:none; }
@keyframes profitPublishSweep {
  0%,55% { left:-42%; opacity:0; }
  66% { opacity:.8; }
  86%,100% { left:122%; opacity:0; }
}
@media (max-width:1180px) {
  .profit-review-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profit-review-summary-grid article:nth-child(n) { border:1px solid color-mix(in srgb,var(--summary-accent) 17%,#e3e8ef); }
}
@media (max-width:620px) {
  .profit-review-summary-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .profit-step-header-actions .profit-publish-button::before { animation:none; }
}

/* Replenishment history detail follows the large purchase-detail workspace. */
#planner-view-dialog {
  width:min(1540px,calc(100vw - 34px));
  max-width:calc(100vw - 34px);
  height:min(92vh,900px);
  max-height:92vh;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  box-shadow:none;
}
#planner-view-dialog::backdrop {
  background:rgba(24,34,49,.16);
  backdrop-filter:blur(6px) saturate(108%);
  -webkit-backdrop-filter:blur(6px) saturate(108%);
}
.planner-view-dialog-card {
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:22px;
  border:1px solid rgba(255,255,255,.92);
  border-radius:20px;
  background:rgba(255,255,255,.72);
  box-shadow:0 26px 72px rgba(15,23,42,.15),inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter:blur(28px) saturate(112%) brightness(1.04);
  -webkit-backdrop-filter:blur(28px) saturate(112%) brightness(1.04);
}
.planner-view-dialog-head {
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding-bottom:15px;
}
.planner-view-dialog-head span { color:#7b8799; font-size:12px; }
.planner-view-dialog-head h3 { margin:4px 0 0; color:#243247; font-size:22px; }
#planner-view-content { flex:1 1 auto; min-height:0; overflow:hidden; }
.planner-detail-card {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow:hidden;
}
.planner-detail-summary {
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(8,minmax(112px,1fr));
  overflow:hidden;
  border:1px solid #dfe6ef;
  border-radius:13px;
  background:linear-gradient(135deg,#fbfdff,#f5f8fc);
}
.planner-detail-summary dl {
  min-width:0;
  margin:0;
  padding:14px 13px;
  border-right:1px solid #e4e9f0;
}
.planner-detail-summary dl:last-child { border-right:0; }
.planner-detail-summary dt { margin:0 0 6px; color:#7b889b; font-size:11px; }
.planner-detail-summary dd { overflow:hidden; margin:0; color:#27364b; font-size:14px; font-weight:760; text-overflow:ellipsis; white-space:nowrap; }
.planner-detail-section-head {
  flex:0 0 auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}
.planner-detail-section-head h4 { margin:0; color:#27364a; font-size:16px; }
.planner-detail-section-head p { margin:4px 0 0; color:#8490a1; font-size:12px; }
.planner-view-dialog-card .planner-detail-wrap {
  flex:1 1 auto;
  min-height:300px;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid #dfe5ed;
  border-radius:12px;
  background:#fff;
}
.planner-view-dialog-card .planner-detail-table { min-width:1180px; margin:0; }
.planner-view-dialog-card .planner-detail-table th,
.planner-view-dialog-card .planner-detail-table td { height:48px; padding:0 13px; font-size:13px; }
.planner-view-dialog-card .planner-detail-table thead th {
  position:sticky;
  top:0;
  z-index:12;
  color:#607089;
  background:#f3f7fc;
  border-bottom:1px solid #d5deea;
  box-shadow:0 5px 12px rgba(40,57,80,.06);
  white-space:nowrap;
}
.planner-view-dialog-card .planner-detail-table tfoot td {
  position:sticky;
  bottom:0;
  z-index:10;
  color:#2d3c51;
  background:#f7f9fc;
  border-top:1px solid #d8e0ea;
  font-weight:800;
}
.planner-view-dialog-card .planner-detail-table tbody tr:hover td { background:#f8fbff; }
@media (max-width:1180px) {
  .planner-detail-summary { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .planner-detail-summary dl:nth-child(4n) { border-right:0; }
  .planner-detail-summary dl:nth-child(n+5) { border-top:1px solid #e4e9f0; }
}
@media (max-width:680px) {
  #planner-view-dialog { width:calc(100vw - 18px); max-width:calc(100vw - 18px); }
  .planner-view-dialog-card { padding:16px; border-radius:16px; }
  .planner-detail-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .planner-detail-summary dl:nth-child(2n) { border-right:0; }
  .planner-detail-summary dl:nth-child(n+3) { border-top:1px solid #e4e9f0; }
}

/* Preserve the continuous tier gradient: technology lines fade away before
   reaching the translucent crown instead of placing a colored shield below it. */
.account-center-head[data-profile-tier]::after,
#settings-basic .account-settings-hero[data-profile-tier]::after {
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.34) 16%,#000 40%,#000 49%,rgba(0,0,0,.48) 58%,transparent 70%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.34) 16%,#000 40%,#000 49%,rgba(0,0,0,.48) 58%,transparent 70%,transparent 100%);
}
