:root {
  --sidebar: #0d1930;
  --sidebar-active: #1b2d4a;
  --sidebar-text: #aebbd0;
  --sidebar-muted: #70809b;
  --page: #f3f6fa;
  --panel: #ffffff;
  --ink: #162033;
  --text: #3f4d63;
  --muted: #7a879a;
  --line: #e0e6ed;
  --line-soft: #edf0f4;
  --blue: #176fe6;
  --blue-dark: #1554b8;
  --blue-soft: #edf5ff;
  --green: #079968;
  --green-soft: #eaf8f3;
  --red: #d64e4e;
  --red-soft: #fdf0f0;
  --orange: #d66c25;
  --orange-soft: #fff2e8;
  --purple: #6557d9;
  --purple-soft: #f3f1ff;
  --shadow: 0 2px 9px rgba(29, 42, 69, 0.04);
  --font: "Microsoft YaHei", "微软雅黑", sans-serif;
  --mono: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.unmatched-link { font:inherit; color:#93431b; cursor:pointer; background:none; border:0; padding:0; text-decoration:underline dotted; text-underline-offset:3px; }
.unmatched-dialog { box-sizing:border-box; width:min(1500px,96vw); max-height:92vh; padding:clamp(14px,2vw,24px); border:1px solid #d8dfe6; border-radius:14px; color:#263544; background:white; }
.unmatched-dialog::backdrop {background:#16243399;}
.unmatched-dialog header {display:flex;justify-content:space-between;align-items:center;}
.unmatched-dialog h2 {margin:4px 0;font-size:20px;}
.unmatched-dialog small {color:#985127;}
.unmatched-dialog button,.unmatched-dialog select {padding:6px 10px;font:inherit;max-width:100%;}
.unmatched-scroll {overflow:auto;max-height:58vh;margin-top:8px;}
.unmatched-scroll td {max-width:32rem;overflow-wrap:anywhere;}
.unmatched-dialog .unmatched-scroll table {table-layout:auto;width:max-content;min-width:100%;}
.unmatched-dialog .unmatched-scroll td {white-space:normal;min-width:6em;}
.unmatched-scroll table {width:100%;border-collapse:collapse;font-size:14px;}
.unmatched-scroll td,.unmatched-scroll th {padding:8px;border-bottom:1px solid #e1e6ec;text-align:left;white-space:nowrap;}
.unmatched-scroll th {position:sticky;top:0;background:#f5f7fa;}

/* Fixed-period person daily report: keep all three source blocks readable. */
#dashboardMode.multi-section-daily-mode > .dashboard-kpis,
#dashboardMode.multi-section-daily-mode > .dashboard-grid {
  display: none;
}

#dashboardMode.multi-section-daily-mode .ranking-panel {
  margin-top: 14px;
}

.daily-report-sections {
  display: grid;
  gap: 18px;
  padding: 4px;
}

/* Finance reuses the workspace tables without changing other report styles. */
.finance-profit-section .daily-report-table { overflow-x: auto; }
.finance-profit-section .daily-report-table table { min-width: 1180px; }

.daily-report-section {
  min-width: 0;
  border: 1px solid #e2e7ee;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.daily-report-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8f3 0%, #ffffff 62%);
  border-bottom: 1px solid #e8edf3;
}

.daily-report-section > header span {
  display: block;
  color: #c65f2b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.daily-report-section > header h4 {
  margin: 3px 0 0;
  color: #253448;
  font-size: 16px;
}

.daily-report-section > header small {
  color: #718096;
}

.daily-report-table {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.daily-report-table table {
  min-width: max-content;
}

.daily-report-table th,
.daily-report-table td {
  white-space: nowrap;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1180px;
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 216px;
  display: flex;
  flex-direction: column;
  padding: 20px 15px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #46505a transparent;
  color: var(--sidebar-text);
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #09223b;
  background: linear-gradient(140deg, #74d6ff, #91f1c0);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand div > span {
  margin-top: 2px;
  color: #71829e;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-nav {
  display: grid;
  gap: 4px;
}

.nav-group-label {
  margin: 9px 0 3px;
  padding: 0 10px;
  color: var(--sidebar-muted);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.app-nav [data-tab] {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: var(--sidebar-text);
  background: transparent;
  text-align: left;
  font-size: 12px;
}

.app-nav [data-tab]:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.app-nav [data-tab].active {
  color: #fff;
  background: var(--sidebar-active);
}

.nav-icon {
  width: 17px;
  color: #7bc8ff;
  text-align: center;
}

.workbench-nav-group {
  min-width: 0;
}

.workbench-nav-toggle {
  width: 100%;
}

.app-nav .workbench-nav-toggle.active::after {
  display: none;
}

.nav-expand-icon {
  margin-left: auto;
  color: #8292ab;
  font-size: 15px;
  line-height: 1;
  transition: transform 160ms ease;
}

.workbench-nav-group.expanded .nav-expand-icon {
  transform: rotate(180deg);
}

.sidebar-reports {
  margin: 5px 0 8px 18px;
  padding: 8px 0 3px 10px;
  border-top: 0;
  border-left: 1px solid #243550;
  overflow: visible;
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 7px;
  color: #8292ab;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-section-head button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 6px;
  color: #91d8ff;
  background: #173956;
}

.report-nav {
  display: grid;
  gap: 4px;
}

.report-nav button[data-report-id] {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: #aebbd0;
  background: transparent;
  text-align: left;
}

.report-nav button[data-report-id]:hover,
.report-nav button[data-report-id].active {
  color: #fff;
  background: #182944;
}

.report-nav strong,
.report-nav span {
  display: block;
}

.report-nav strong {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.report-nav span {
  margin-top: 4px;
  color: #70819d;
  font-size: 9px;
}

.report-list-group + .report-list-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #243550;
}

.report-list-heading {
  margin: 0 8px 4px;
  color: #8292ab;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.danger-action {
  color: #b42318;
  border-color: #f0b8b2;
  background: #fff5f4;
}

.sidebar-create-form {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #2b3f60;
  border-radius: 9px;
  background: #13223b;
}

.sidebar-create-form label {
  display: grid;
  gap: 4px;
  color: #8090aa;
  font-size: 9px;
}

.sidebar-create-form input,
.sidebar-create-form select {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #314767;
  border-radius: 6px;
  color: #eef4ff;
  background: #0f1d34;
  font-size: 10px;
}

.sidebar-create-form .inline-actions {
  display: flex;
  gap: 6px;
}

.sidebar-create-form button {
  flex: 1;
  height: 29px;
  border: 1px solid #314767;
  border-radius: 6px;
  color: #bfd0e7;
  background: transparent;
  font-size: 9px;
}

.sidebar-create-form button.primary {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.report-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 29, 52, 0.28);
}

.report-dialog::backdrop {
  background: rgba(15, 29, 52, 0.5);
  backdrop-filter: blur(3px);
}

.report-dialog form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.report-dialog header,
.report-dialog .inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-dialog header p,
.report-dialog header h2,
.report-dialog .dialog-description,
.report-dialog .dialog-hint {
  margin: 0;
}

.report-dialog header p {
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.report-dialog header h2 {
  margin-top: 4px;
  font-size: 20px;
}

.report-dialog .dialog-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f2f5f9;
  font-size: 20px;
}

.report-dialog .dialog-description,
.report-dialog .dialog-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.report-dialog .dialog-hint.warn {
  padding: 9px 11px;
  border-radius: 8px;
  color: #9a4d1c;
  background: var(--orange-soft);
}

.report-dialog label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.report-dialog input,
.report-dialog select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.report-dialog .inline-actions {
  justify-content: flex-end;
}

.report-dialog .inline-actions button {
  min-width: 94px;
  height: 36px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.report-dialog .password-input-wrap input {
  padding-right: 58px;
}

.password-input-wrap > button {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 42px;
  height: 28px;
  padding: 0 7px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  color: var(--blue);
  background: #f1f5fa;
  box-shadow: none;
  font-size: 10px;
}

.account-security-dialog {
  width: min(500px, calc(100vw - 32px));
}

.account-security-dialog .auth-message {
  min-height: 18px;
  margin: -4px 0 0;
}

.publish-report-dialog {
  width: min(620px, calc(100vw - 32px));
}

.publish-report-dialog form {
  max-height: min(86vh, 780px);
  overflow-y: auto;
}

.publish-template-fields {
  display: grid;
  gap: 16px;
}

.template-sharing-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.template-sharing-scope legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.report-dialog .scope-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.report-dialog .scope-choice:has(input:checked) {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 0 0 2px rgba(213, 101, 39, 0.08);
}

.report-dialog .scope-choice input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.scope-choice span {
  display: grid;
  gap: 4px;
}

.scope-choice strong {
  font-size: 12px;
}

.scope-choice small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.dialog-error {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff1f1;
  color: #b42318;
  font-size: 11px;
}

.template-selection-preview {
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.template-selection-preview strong {
  color: var(--ink);
  font-size: 11px;
}

.template-selection-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .template-sharing-scope {
    grid-template-columns: 1fr;
  }
}

.session-replaced-dialog {
  width: min(460px, calc(100vw - 32px));
}

.session-replaced-dialog form {
  justify-items: center;
  text-align: center;
}

.session-replaced-dialog form > div p,
.session-replaced-dialog form > div h2 {
  margin: 0;
}

.session-replaced-dialog form > div p {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.session-replaced-dialog form > div h2 {
  margin-top: 5px;
  font-size: 21px;
}

.session-replaced-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #efc4ad;
  border-radius: 50%;
  color: #a34424;
  background: #fff4ee;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
}

.session-replaced-dialog .dialog-description {
  max-width: 38ch;
  font-size: 12px;
}

.session-replaced-dialog .primary {
  min-width: 128px;
}

.update-notice-editor-dialog {
  width: min(520px, calc(100vw - 32px));
}

.report-dialog textarea {
  width: 100%;
  padding: 10px;
  resize: vertical;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  line-height: 1.65;
}

.update-notice-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #efc4ad;
  border-radius: 14px;
  color: #b65122;
  background: #fff4ee;
  font-size: 23px;
  font-weight: 800;
}

.update-notice-heading p,
.update-notice-heading h2 {
  margin: 0;
}

.update-notice-heading p {
  color: var(--accent, #cf642a);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.update-notice-heading h2 {
  margin-top: 5px;
  font-size: 21px;
}

.update-notice-image-preview {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e3e7ed;
  border-radius: 10px;
  background: #f7f8fa;
}

.update-notice-image-preview[hidden] {
  display: none;
}

.update-notice-image-preview img,
.system-update-notice-image,
.notification-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.update-notice-image-preview img {
  max-height: 220px;
  margin: 0 auto;
}

.update-notice-image-preview > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.update-notice-image-preview button {
  width: auto;
  height: 28px;
  padding: 0 9px;
}

.system-update-notice-image {
  margin: 0 auto;
  border: 1px solid #e6e9ee;
}

.system-update-notice-image[hidden] {
  display: none;
}

.notification-image {
  max-height: 180px;
  margin-top: 8px;
  border: 1px solid var(--line-soft);
}

.update-notice-meta {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.system-update-notice-dialog .primary {
  min-width: 132px;
}

/* Rich update notices: editing stays compact while reading feels like a document. */
.update-notice-editor-dialog {
  width: min(780px, calc(100vw - 28px));
}

.update-notice-editor-dialog form {
  max-height: min(86vh, 760px);
  overflow-y: auto;
}

.update-notice-editor-field {
  display: grid;
  gap: 0;
}

.update-notice-editor-label {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.update-notice-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 43px;
  padding: 6px 8px;
  border: 1px solid #dfe4eb;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f7f8fa;
  box-shadow: 0 4px 14px rgba(31, 43, 58, 0.04);
}

.update-notice-toolbar select,
.update-notice-toolbar button {
  width: auto;
  height: 30px;
  min-width: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #4b586b;
  background: transparent;
  font-size: 10px;
}

.update-notice-toolbar select {
  min-width: 84px;
  border-color: #dfe4eb;
  background: #fff;
}

.update-notice-toolbar button:hover:not(:disabled) {
  border-color: #e5c4b3;
  color: #b65327;
  background: #fff7f2;
}

.update-notice-toolbar button.toolbar-accent {
  margin-left: auto;
  border-color: #ebc2ad;
  color: #b65327;
  background: #fff7f2;
  font-weight: 700;
}

.update-notice-toolbar .toolbar-divider {
  width: 1px;
  height: 19px;
  margin: 0 2px;
  background: #dfe4eb;
}

.update-notice-rich-editor {
  min-height: 310px;
  max-height: 48vh;
  padding: 26px 34px;
  overflow-y: auto;
  border: 1px solid #dfe4eb;
  border-radius: 0 0 10px 10px;
  outline: none;
  color: #2f3b4d;
  background: #fff;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  box-shadow: inset 0 1px 0 rgba(31, 43, 58, 0.02);
}

.update-notice-rich-editor:focus {
  border-color: #cf8b68;
  box-shadow: 0 0 0 3px rgba(207, 100, 42, 0.09);
}

.update-notice-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa4b2;
  pointer-events: none;
}

.update-notice-rich-editor h2,
.update-notice-rich-editor h3,
.update-notice-rich-editor p,
.update-notice-rich-editor ul,
.update-notice-rich-editor ol,
.update-notice-rich-editor blockquote,
.update-notice-content h2,
.update-notice-content h3,
.update-notice-content p,
.update-notice-content ul,
.update-notice-content ol,
.update-notice-content blockquote {
  margin: 0 0 12px;
}

.update-notice-rich-editor h2,
.update-notice-content h2 {
  color: #243143;
  font-size: 20px;
  line-height: 1.45;
}

.update-notice-rich-editor h3,
.update-notice-content h3 {
  color: #324055;
  font-size: 15px;
  line-height: 1.5;
}

.update-notice-rich-editor ul,
.update-notice-rich-editor ol,
.update-notice-content ul,
.update-notice-content ol {
  padding-left: 23px;
}

.update-notice-rich-editor blockquote,
.update-notice-content blockquote {
  padding: 9px 13px;
  border-left: 3px solid #d57546;
  color: #596578;
  background: #fff7f2;
}

.update-notice-rich-editor figure,
.update-notice-content figure {
  margin: 18px 0;
  padding: 9px;
  border: 1px solid #e4e8ee;
  border-radius: 11px;
  background: #f8f9fb;
}

.update-notice-rich-editor figure img,
.update-notice-content figure img,
.update-notice-content > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 440px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.update-notice-rich-editor img.selected {
  outline: 3px solid rgba(207, 100, 42, 0.42);
  outline-offset: 3px;
}

.update-notice-rich-editor figcaption,
.update-notice-content figcaption {
  margin-top: 7px;
  color: #7b8798;
  font-size: 10px;
  text-align: center;
}

.update-notice-editor-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.system-update-notice-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 72px rgba(24, 34, 48, 0.24);
}

.report-dialog.system-update-notice-dialog form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: clamp(20px, 2.2vw, 30px);
  overflow: hidden;
  justify-items: stretch;
  text-align: left;
}

.update-notice-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f4;
}

.update-notice-hero .update-notice-icon {
  flex: 0 0 46px;
}

.system-update-notice-dialog .update-notice-content {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 6px 14px 6px 2px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  color: #3d495b;
  background: #fff;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 14px;
  line-height: 1.85;
  text-align: left;
  white-space: normal;
}

.system-update-notice-dialog .update-notice-content:focus {
  outline: none;
}

.system-update-notice-dialog .system-update-notice-image {
  max-height: min(24dvh, 240px);
}

.system-update-notice-dialog .update-notice-content figure img,
.system-update-notice-dialog .update-notice-content > img,
.system-update-notice-dialog .system-update-notice-image {
  max-width: 100%;
  cursor: zoom-in;
}

.system-update-notice-dialog .update-notice-content figure img,
.system-update-notice-dialog .update-notice-content > img {
  max-height: none;
}

.system-update-notice-dialog img[data-update-notice-expandable="true"]:focus-visible {
  outline: 3px solid rgba(207, 100, 42, 0.42);
  outline-offset: 4px;
}

.system-update-notice-dialog img[data-update-notice-expandable="true"]:hover {
  filter: brightness(0.98);
  box-shadow: 0 8px 26px rgba(29, 42, 58, 0.14);
}

.system-update-notice-dialog .update-notice-content:not(:has(*)) {
  white-space: pre-wrap;
}

.update-notice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
}

.update-notice-footer p {
  margin: 0;
}

.update-notice-footer .primary {
  flex: 0 0 auto;
  min-width: 150px;
}

.update-notice-image-viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: rgba(8, 14, 24, 0.94);
}

.update-notice-image-viewer::backdrop {
  background: rgba(8, 14, 24, 0.88);
  backdrop-filter: blur(5px);
}

.update-notice-image-viewer-toolbar {
  position: absolute;
  top: 16px;
  right: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.update-notice-image-viewer-toolbar span {
  max-width: calc(100vw - 92px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-notice-image-viewer-toolbar button {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 26px;
  line-height: 1;
}

.update-notice-image-viewer-toolbar button:hover,
.update-notice-image-viewer-toolbar button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.update-notice-image-viewer-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 64px 24px 42px;
  overflow: hidden;
}

.update-notice-image-viewer-stage img {
  display: block;
  max-width: min(96vw, calc(100vw - 48px), 1800px);
  max-height: min(92dvh, calc(100dvh - 112px));
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.update-notice-image-viewer-help {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 640px) {
  .update-notice-toolbar {
    flex-wrap: wrap;
  }

  .update-notice-toolbar button.toolbar-accent {
    margin-left: 0;
  }

  .update-notice-rich-editor {
    min-height: 260px;
    padding: 20px 18px;
  }

  .report-dialog.system-update-notice-dialog form {
    gap: 12px;
    padding: 17px;
  }

  .system-update-notice-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
  }

  .update-notice-hero {
    padding-bottom: 10px;
  }

  .update-notice-image-viewer-stage {
    padding: 62px 10px 38px;
  }

  .update-notice-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .update-notice-footer .primary {
    width: 100%;
  }
}

.report-sheet-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #e1e6ee;
  border-radius: 10px;
  background: #f4f6f9;
}

.report-sheet-tabs button {
  flex: 0 0 auto;
  height: 31px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  color: #647189;
  background: transparent;
  font-size: 10px;
}

.report-sheet-tabs button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 1px 4px rgba(34, 69, 120, 0.12);
}

.report-sheet-tabs .sheet-add-button {
  margin-left: 4px;
  border: 1px dashed #9bb4d8;
  color: var(--blue);
  background: #f8fbff;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 13px 8px 0;
  border-top: 1px solid #263754;
}

.account-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #2c2112;
  background: #e7a86b;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-account label {
  min-width: 0;
  color: #6f809a;
  font-size: 8px;
}

.sidebar-account select {
  width: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  color: #fff;
  background: var(--sidebar);
  outline: 0;
  font-size: 10px;
}

.template-management-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.template-catalog-panel {
  padding: 16px;
  position: sticky;
  top: 12px;
}

.template-management-list {
  display: grid;
  gap: 8px;
}

.template-management-list button {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  background: #fff;
}

.template-management-list button:hover,
.template-management-list button.active {
  border-color: #4d75aa;
  background: #edf4ff;
}

.template-management-list strong,
.template-management-list span {
  display: block;
}

.template-management-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.template-management-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.template-change-log {
  margin: 4px 0 16px;
  color: var(--muted);
}

.template-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.template-sheet-grid section {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.template-sheet-grid strong,
.template-sheet-grid span,
.template-sheet-grid small {
  display: block;
}

.template-sheet-grid span {
  margin-top: 5px;
  color: #315b8c;
  font-size: 12px;
}

.template-sheet-grid small {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.template-version-list {
  display: grid;
  gap: 8px;
}

.template-version-list > section {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.template-version-list > section:last-child {
  border-bottom: 0;
}

.template-version-list span,
.template-version-list small {
  display: block;
}

.template-version-list small {
  margin-top: 5px;
  color: var(--muted);
}

.template-version-dialog {
  width: min(760px, calc(100vw - 36px));
}

#templateDefinitionEditor {
  width: 100%;
  resize: vertical;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre;
}

@media (max-width: 1000px) {
  .template-management-layout {
    grid-template-columns: 1fr;
  }

  .template-catalog-panel {
    position: static;
  }

  .template-sheet-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.app-stage {
  grid-column: 2;
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-heading p,
.topbar-heading h1 {
  margin: 0;
}

.topbar-heading p {
  margin-bottom: 3px;
  color: #8893a4;
  font-size: 9px;
}

.topbar-heading h1 {
  font-size: 17px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #667388;
  background: #fff;
  font-size: 10px;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.icon-button,
.secondary-action,
.report-toolbar button,
.mode-actions button,
.panel-heading button,
.explore-heading button {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #dce2ea;
  border-radius: 7px;
  color: #46536a;
  background: #fff;
  font-size: 10px;
}

.icon-button {
  position: relative;
  width: 34px;
  padding: 0;
}

.notification-count {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid white;
  border-radius: 9px;
  color: white;
  background: var(--blue);
  font-size: 7px;
}

.app-content {
  padding: 17px 22px 32px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.empty-workbench,
.access-denied {
  min-height: calc(100vh - 118px);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-workbench .empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 16px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 25px;
}

.eyebrow,
.empty-workbench .eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.empty-workbench h2,
.empty-workbench p {
  margin: 0;
}

.empty-workbench h2 {
  font-size: 20px;
}

.empty-workbench > p:not(.eyebrow) {
  max-width: 460px;
  margin: 9px auto 18px;
  color: var(--muted);
  line-height: 1.6;
}

button.primary {
  color: #fff;
  border: 1px solid var(--blue);
  background: var(--blue);
}

button.primary:hover {
  background: var(--blue-dark);
}

.empty-workbench button {
  height: 36px;
  padding: 0 15px;
  border-radius: 8px;
}

.report-context {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}

.report-identity {
  min-width: 0;
}

.report-identity p,
.report-identity h2 {
  margin: 0;
}

.report-identity > p:first-child {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.report-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-title-line h2 {
  overflow: hidden;
  font-size: 19px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.report-identity > p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #6c788a;
  background: white;
  font-size: 9px;
}

.status-tag.good {
  color: var(--green);
  border-color: #bfe5d8;
  background: var(--green-soft);
}

.status-tag.warn {
  color: var(--orange);
  border-color: #f3cfb5;
  background: var(--orange-soft);
}

.report-toolbar {
  display: flex;
  align-items: end;
  gap: 7px;
}

.compact-field {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 8px;
}

.compact-field select,
.compact-field input[type="date"],
.custom-date-range input {
  height: 32px;
  padding: 0 9px;
  border: 1px solid #dce2ea;
  border-radius: 7px;
  color: #455267;
  background: #fff;
  font-size: 10px;
}

.custom-date-range {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mode-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.mode-switcher {
  display: flex;
  gap: 3px;
}

.mode-switcher button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: #6b778a;
  background: transparent;
  font-size: 10px;
}

.mode-switcher button.active {
  color: #fff;
  background: var(--sidebar);
}

.mode-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.system-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 11px;
  padding: 11px 13px;
  border: 1px solid #cbdcff;
  border-radius: 9px;
  color: #274c80;
  background: #f2f7ff;
}

.system-banner > div:first-child {
  flex: 1;
}

.system-banner strong,
.system-banner p {
  margin: 0;
}

.system-banner p {
  margin-top: 3px;
  color: #6e85a6;
  font-size: 9px;
}

.system-banner button {
  height: 31px;
  border: 1px solid #b4c9ee;
  border-radius: 7px;
  color: #245598;
  background: white;
  font-size: 9px;
}

#templateUpgradePreview:not(:empty) {
  width: 100%;
}

.workbench-mode {
  display: none;
}

.workbench-mode.active {
  display: block;
}

.data-status-strip {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #718096;
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}

.data-status-strip .good-dot,
.data-status-strip .warn-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--green);
}

.data-status-strip .warn-dot {
  background: var(--orange);
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}

.kpi-card {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 13px 13px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
}

.kpi-card:hover,
.kpi-card.active {
  border-color: #9ec5fa;
  box-shadow: 0 5px 16px rgba(24, 104, 218, 0.08);
}

.kpi-card.primary-kpi {
  color: #fff;
  border-color: var(--blue);
  background: linear-gradient(145deg, #1b73e8, #1551bb);
}

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #738095;
  font-size: 10px;
}

.primary-kpi .kpi-label {
  color: #d2e4ff;
}

.kpi-value {
  margin-top: 10px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.kpi-unit {
  margin-left: 3px;
  color: #8390a3;
  font-size: 9px;
  font-weight: 500;
}

.primary-kpi .kpi-unit {
  color: #d7e7ff;
}

.kpi-meta {
  max-width: 72%;
  margin-top: 7px;
  overflow: hidden;
  color: #7f8b9d;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.primary-kpi .kpi-meta {
  color: #c9dcfb;
}

.kpi-mini-bars {
  position: absolute;
  right: 11px;
  bottom: 12px;
  height: 25px;
  display: flex;
  align-items: end;
  gap: 3px;
  opacity: 0.45;
}

.kpi-mini-bars i {
  width: 3px;
  display: block;
  border-radius: 2px 2px 0 0;
  background: #3982e8;
}

.primary-kpi .kpi-mini-bars i {
  background: white;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(520px, 2fr) minmax(260px, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.bi-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-heading p,
.panel-heading h3,
.panel-heading h2 {
  margin: 0;
}

.panel-heading p {
  margin-bottom: 2px;
  color: #8a95a5;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.panel-heading h3 {
  font-size: 12px;
}

.panel-heading > span {
  color: var(--muted);
  font-size: 9px;
}

.panel-heading select {
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #5c697c;
  background: #fff;
  font-size: 9px;
}

.distribution-chart {
  min-height: 275px;
  padding: 14px;
}

.bar-chart {
  min-height: 240px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(62px, 92px) minmax(120px, 1fr) 58px;
  gap: 8px;
  align-items: center;
  min-height: 20px;
  font-size: 9px;
}

.bar-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f6;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  display: block;
  border-radius: 99px;
  background: linear-gradient(90deg, #357fe9, #69b9fa);
  transform-origin: left;
  animation: grow-bar 420ms ease-out both;
}

.bar-row.highlight .bar-fill {
  background: linear-gradient(90deg, #6557d9, #9d89f5);
}

.bar-value {
  color: #536176;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
}

@keyframes grow-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.chart-empty {
  min-height: 230px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.alert-list {
  min-height: 275px;
  padding: 6px 12px;
}

.alert-item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
}

.alert-item:last-child {
  border: 0;
}

.alert-symbol {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 10px;
}

.alert-symbol.warn {
  color: var(--orange);
  background: var(--orange-soft);
}

.alert-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.alert-item p {
  margin: 0;
  color: #8290a3;
  font-size: 8px;
  line-height: 1.5;
}

.ranking-panel {
  overflow: hidden;
}

.ranking-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ranking-panel-actions button {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

body.ranking-fullscreen-open {
  overflow: hidden;
}

.ranking-panel:fullscreen,
.ranking-panel:-webkit-full-screen,
.ranking-panel.ranking-panel-fullscreen-fallback {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  background: #f6f8fa;
}

.ranking-panel.ranking-panel-fullscreen-fallback {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.ranking-panel:fullscreen > .panel-heading,
.ranking-panel:-webkit-full-screen > .panel-heading,
.ranking-panel.ranking-panel-fullscreen-fallback > .panel-heading {
  position: sticky;
  top: 0;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #fff;
}

.ranking-panel:fullscreen > .bi-table-wrap,
.ranking-panel:-webkit-full-screen > .bi-table-wrap,
.ranking-panel.ranking-panel-fullscreen-fallback > .bi-table-wrap {
  max-width: none;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
}

/* PNG 导出在屏幕外展开完整表格，不受页面滚动区域和当前视口裁切。 */
.ranking-capture-stage {
  position: fixed;
  top: 0;
  left: -100000px;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  background: #fff;
}

.ranking-capture-panel {
  margin: 0;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.ranking-capture-panel > .panel-heading {
  position: static;
  background: #fff;
}

.bi-table-wrap {
  overflow: auto;
}

.bi-table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #39475d;
  font-size: 9px;
}

.bi-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: #7d899b;
  background: #fafbfc;
  text-align: right;
  font-weight: 500;
  white-space: nowrap;
}

.bi-table-wrap thead .group-header th {
  min-height: 34px;
  color: #ffffff;
  background: #ed7d31;
  border-right: 1px solid #1f2937;
  border-bottom-color: #1f2937;
  text-align: center;
  font-weight: 600;
}

.bi-table-wrap thead .group-header + tr th {
  top: 34px;
}

.bi-table-wrap th:first-child,
.bi-table-wrap td:first-child,
.bi-table-wrap th:nth-child(2),
.bi-table-wrap td:nth-child(2) {
  text-align: left;
}

.bi-table-wrap td {
  padding: 9px 12px;
  border-bottom: 1px solid #f0f2f5;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bi-table-wrap tbody tr:hover td {
  background: #f7faff;
}

.bi-table-wrap tbody tr.selected td {
  background: var(--purple-soft);
}

.bi-table-wrap .total-row td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  color: #164c3e;
  background: #e2f3ed;
  font-weight: 700;
}

.rank-number {
  color: #8a96a7;
  font-family: var(--mono);
}

.metric-cell {
  position: relative;
  min-width: 95px;
}

.metric-cell i {
  position: absolute;
  z-index: 0;
  inset: 6px auto 6px 7px;
  border-radius: 3px;
  background: #eaf2ff;
}

.metric-cell span {
  position: relative;
  z-index: 1;
}

.performance-table {
  width: 100%;
  table-layout: fixed;
}

.performance-table tbody tr.report-summary-row td {
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
  border-top: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
  font-weight: 700;
}

.performance-table tbody tr.report-summary-row .metric-cell i {
  opacity: 0.42;
}

.performance-table th:first-child,
.performance-table td:first-child {
  width: 52px;
}

.performance-table th:nth-child(2),
.performance-table td:nth-child(2) {
  width: 112px;
}

.performance-table th:not(:first-child):not(:nth-child(2)) {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

.performance-table .metric-cell {
  min-width: 0;
}

.performance-table.dense th,
.performance-table.dense td {
  padding-right: 5px;
  padding-left: 5px;
  font-size: 10px;
}

.performance-table .performance-group-header th[rowspan] {
  vertical-align: middle;
  text-align: left;
}

.performance-table .performance-group-header .metric-group-header {
  line-height: 1.35;
  white-space: normal;
}

.performance-table .metric-header .metric-column-header {
  width: auto;
  min-width: 0;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.35;
}

.explore-shell {
  min-height: calc(100vh - 205px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.explore-metrics {
  border-right: 1px solid var(--line);
  background: #fcfcfd;
}

.explore-section-head {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10px;
}

.explore-section-head span {
  color: var(--muted);
  font-size: 8px;
}

.explore-metric {
  position: relative;
  min-height: 75px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.explore-metric:hover,
.explore-metric.active {
  background: var(--purple-soft);
}

.explore-metric.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--purple);
}

.explore-metric span {
  display: block;
  color: #737f91;
  font-size: 9px;
}

.explore-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

.explore-metric small {
  display: block;
  margin-top: 4px;
  color: #8a95a4;
  font-size: 8px;
}

.explore-canvas {
  min-width: 0;
}

.explore-heading {
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.explore-heading p,
.explore-heading h2,
.explore-heading span {
  margin: 0;
}

.explore-heading p {
  color: var(--purple);
  font-size: 8px;
}

.explore-heading h2 {
  margin-top: 3px;
  font-size: 15px;
}

.explore-heading span {
  display: block;
  margin-top: 4px;
  color: #8a95a4;
  font-size: 8px;
}

.explore-heading {
  align-items: flex-start;
}

.explore-heading-main {
  min-width: 0;
  flex: 1;
}

.explore-metric-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.explore-heading .metric-scope-badge {
  display: inline-flex;
  width: fit-content;
  margin: 3px 0 0;
  padding: 3px 7px;
  border: 1px solid #bed8f2;
  border-radius: 999px;
  color: #266ea5;
  background: #eef7ff;
  font-size: 9px;
  font-weight: 700;
}

.explore-heading .metric-scope-badge.custom {
  border-color: #ecc5af;
  color: #a44e22;
  background: #fff3ec;
}

.metric-definition-summary {
  max-width: 76ch;
  margin-top: 8px;
  color: #455267;
  font-size: 11px;
  line-height: 1.55;
}

.metric-definition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.metric-definition-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 10px;
}

.metric-definition-actions .metric-ai-action {
  border-color: #e3b798;
  color: #9f4b1f;
  background: #fff8f3;
}

.metric-definition-details {
  max-width: 760px;
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  background: #f9fbfd;
}

.metric-contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.metric-contract-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e7ebf0;
  border-radius: 7px;
  background: #fff;
}

.metric-contract-grid .metric-contract-wide {
  grid-column: 1 / -1;
}

.metric-contract-grid span,
.metric-contract-group-standard > span {
  display: block;
  margin: 0 0 3px;
  color: #8792a2;
  font-size: 9px;
}

.metric-contract-grid strong {
  margin: 0;
  color: #344054;
  font-size: 10px;
  line-height: 1.45;
}

.metric-contract-group-standard {
  margin-top: 8px;
}

.metric-contract-group-standard {
  padding: 7px 8px;
  border-left: 3px solid #d6a181;
  background: #fff9f5;
}

.metric-contract-group-standard p,
.metric-contract-guardrail {
  margin: 0;
  color: #687487;
  font-size: 9px;
  line-height: 1.5;
}

.metric-contract-guardrail {
  margin-top: 8px;
}

.explore-chart {
  min-height: 330px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.explore-chart .bar-row {
  grid-template-columns: minmax(76px, 110px) minmax(150px, 1fr) 65px;
  min-height: 23px;
}

.explore-chart .bar-fill {
  background: linear-gradient(90deg, #6b5add, #9b88f2);
}

.explore-table-head {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 9px;
}

.explore-table-head span {
  color: var(--muted);
  font-size: 8px;
}

.explore-status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fcfcfd;
}

.explore-status-strip section {
  min-width: 0;
  padding: 10px 14px;
}

.explore-status-strip section + section {
  border-left: 1px solid var(--line);
}

.explore-status-strip section > p {
  margin: 0 0 5px;
  color: #8994a3;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.explore-status-strip div {
  color: #6f7b8d;
  font-size: 9px;
  line-height: 1.45;
}

.context-fact {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #e4e8ed;
}

.context-fact:last-child {
  border: 0;
}

.edit-ribbon {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  padding: 7px 11px;
  border: 1px solid #a9d6c7;
  border-radius: 8px;
  color: #255548;
  background: #f3fbf8;
}

.edit-ribbon strong,
.edit-ribbon span {
  display: block;
}

.edit-ribbon strong {
  font-size: 10px;
}

.edit-ribbon span {
  margin-top: 3px;
  color: #6a8b82;
  font-size: 8px;
}

.edit-ribbon button {
  height: 30px;
  border: 1px solid #a9d6c7;
  border-radius: 6px;
  color: #286653;
  background: white;
  font-size: 9px;
}

.edit-ribbon-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.designer-change-count {
  margin: 0 !important;
  padding: 5px 8px;
  border-radius: 999px;
  color: #5e6b78 !important;
  background: rgba(255, 255, 255, .72);
  font-size: 10px !important;
}

.designer-sheet-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.designer-sheet-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
}

.designer-sheet-tab,
.designer-sheet-actions button,
.inspector-add-button,
.column-card-actions button {
  border: 1px solid var(--line);
  color: #586576;
  background: #fff;
}

.designer-sheet-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: grab;
}

.designer-sheet-tab.active {
  border-color: #e0a484;
  color: #a44e29;
  background: #fff6f0;
}

.sheet-drag-handle,
.column-drag-handle {
  margin-right: 6px;
  color: #9ba5b2;
  letter-spacing: -3px;
}

.designer-sheet-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.designer-sheet-actions button,
.inspector-add-button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 10px;
}

.edit-ribbon-actions button.primary {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.edit-ribbon-actions .designer-ai-check-button {
  border-color: #d9dfe5;
  color: #77828e;
  background: #f7f8f9;
  box-shadow: none;
}

.button-help-tooltip {
  position: fixed;
  z-index: 220;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 9px 11px;
  border: 1px solid #737b85;
  border-radius: 8px;
  color: #fff;
  background: #555d67;
  box-shadow: 0 8px 24px rgba(23, 32, 42, .22);
  font-size: 11px;
  line-height: 1.55;
  pointer-events: none;
}

.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  gap: 10px;
}

.edit-data-table {
  max-height: calc(100vh - 310px);
  min-height: 420px;
}

.edit-data-table table {
  min-width: 900px;
}

.edit-data-table th {
  background: #e9eef0;
  color: #3e4b55;
  font-weight: 600;
}

.edit-data-table tbody tr:nth-child(even) td {
  background: #fbfcfc;
}

.coverage-messages:not(:empty) {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--orange-soft);
}

.coverage-messages p {
  margin: 3px 0;
  color: #9a571e;
  font-size: 8px;
}

.edit-inspector {
  display: grid;
  align-content: start;
  gap: 10px;
}

.inspector-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.inspector-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.inspector-heading p,
.inspector-heading h3 {
  margin: 0;
}

.inspector-heading p {
  margin-bottom: 2px;
  color: #8a95a5;
  font-size: 8px;
}

.inspector-heading h3 {
  font-size: 11px;
}

.inspector-heading span {
  color: var(--muted);
  font-size: 8px;
}

.inspector-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.inspector-heading-actions .secondary {
  color: #9d512d;
  border-color: #e4b79f;
  background: #fff8f4;
}

.column-list {
  max-height: 360px;
  overflow-y: auto;
}

.column-card {
  position: relative;
  padding: 10px 11px 10px 32px;
  border-bottom: 1px solid var(--line-soft);
}

.column-card[draggable="true"] {
  cursor: grab;
}

.column-card.dragging,
.designer-sheet-tab.dragging {
  opacity: .42;
}

.column-card .column-drag-handle {
  position: absolute;
  top: 10px;
  right: 11px;
  font-size: 12px;
}

.column-group-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #9a4f2c;
  background: #fff0e7;
  font-size: 9px;
  font-weight: 700;
}

.column-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.column-card-actions button {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 9px;
}

.column-card-actions button:last-child {
  color: #a7463d;
}

.designer-column-dialog {
  width: min(720px, calc(100vw - 40px));
  max-width: 720px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.designer-column-groups-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.report-dialog.designer-column-groups-dialog form {
  width: 100%;
  height: min(780px, calc(100dvh - 32px));
  max-height: min(780px, calc(100dvh - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.designer-column-groups-body {
  min-height: 0;
  padding: 0 24px 20px;
  overflow-y: auto;
}

.designer-column-groups-body > .designer-rule-hint {
  margin: 10px 2px 0;
}

.designer-group-list-section,
.designer-group-editor {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #e2e7eb;
  border-radius: 11px;
  background: #fbfcfc;
}

.designer-group-section-heading,
.designer-group-range-heading,
.designer-group-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.designer-group-section-heading strong,
.designer-group-range-heading strong {
  color: #455361;
  font-size: 12px;
}

.designer-group-section-heading button,
.designer-group-editor-actions button,
.designer-column-group-item button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #596777;
  background: #fff;
  font-size: 10px;
}

.designer-column-group-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.designer-column-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #e6e9ec;
  border-radius: 9px;
  background: #fff;
}

.designer-column-group-item.active {
  border-color: #dc9a76;
  box-shadow: 0 0 0 3px rgba(207, 102, 47, .08);
}

.designer-column-group-item > div:first-child {
  display: grid;
  gap: 3px;
}

.designer-column-group-item > div:last-child {
  display: flex;
  gap: 5px;
}

.designer-column-group-item strong {
  color: #3f4d5b;
  font-size: 12px;
}

.designer-column-group-item span,
.designer-column-group-empty,
.designer-group-range-heading small {
  margin: 0;
  color: #7a8592;
  font-size: 10px;
}

.designer-column-group-item button:last-child {
  color: #a7463d;
}

.designer-group-editor label {
  margin-top: 0;
}

.designer-group-range-heading {
  margin-top: 15px;
}

.designer-column-group-columns {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  padding: 9px;
  overflow-x: auto;
  border: 1px solid #e1e6ea;
  border-radius: 9px;
  background: #f3f6f8;
}

.designer-column-group-columns button {
  display: grid;
  flex: 0 0 112px;
  gap: 3px;
  min-height: 52px;
  padding: 8px 9px;
  border: 1px solid #d9dfe4;
  border-radius: 8px;
  color: #526170;
  background: #fff;
  text-align: left;
}

.designer-column-group-columns button small {
  color: #9ba5af;
  font-size: 8px;
}

.designer-column-group-columns button span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-column-group-columns button.selected {
  border-color: #cf6632;
  color: #994721;
  background: #fff2e9;
  box-shadow: 0 0 0 2px rgba(207, 102, 50, .1);
}

.designer-column-group-columns button.occupied {
  opacity: .48;
  background: #edf0f2;
}

.designer-group-editor-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.designer-group-editor-actions button.primary {
  border-color: #c95e29;
  color: #fff;
  background: #c95e29;
}

.report-dialog.designer-column-dialog form {
  width: min(720px, calc(100vw - 40px));
  max-width: 100%;
  height: min(780px, calc(100dvh - 40px));
  max-height: min(780px, calc(100dvh - 40px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.designer-column-scroll-body {
  min-width: 0;
  min-height: 0;
  padding: 4px 24px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.report-dialog.designer-column-dialog .dialog-actions {
  margin-top: 0;
  box-shadow: 0 -8px 22px rgba(23, 32, 42, .05);
}

.designer-action-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: 440px;
  overflow: hidden;
}

.designer-draft-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  overflow: hidden;
}

.report-dialog.designer-draft-dialog form {
  width: 100%;
  height: min(760px, calc(100dvh - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 0;
  gap: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.designer-draft-intro {
  margin: 18px 24px 0;
  padding: 13px 15px;
  border: 1px solid #edcfbd;
  border-radius: 11px;
  background: #fdf7f3;
}

.designer-draft-intro strong {
  color: #9a4d1c;
  font-size: 13px;
}

.designer-draft-intro p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.designer-draft-preview {
  min-height: 0;
  padding-top: 3px;
  overflow-y: auto;
}

.designer-draft-preview .draft-panel {
  margin: 15px 24px 18px;
}

.designer-draft-dialog .dialog-actions {
  flex: 0 0 auto;
  margin-top: 0;
  box-shadow: 0 -8px 22px rgba(23, 32, 42, .04);
}

.designer-action-dialog form {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  padding: 0;
  gap: 0;
  overflow: hidden auto;
  box-sizing: border-box;
}

.designer-dialog-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(145deg, #ffffff 0%, #fbf7f3 100%);
}

.designer-dialog-header > div {
  min-width: 0;
}

.designer-dialog-header p,
.designer-dialog-header h2 {
  margin: 0;
}

.designer-dialog-header p {
  color: #b95b2d !important;
}

.designer-dialog-header h2 {
  margin-top: 5px !important;
  color: var(--text);
  font-size: 20px !important;
}

.designer-action-context {
  margin: 18px 24px 0;
  padding: 12px 14px;
  border: 1px solid #ece7e2;
  border-radius: 10px;
  background: #faf8f6;
}

.designer-action-context span {
  display: block;
  margin-bottom: 4px;
  color: #9a8171;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.designer-action-context .dialog-description {
  color: #536171;
  line-height: 1.55;
}

.designer-action-dialog .designer-action-field {
  margin: 16px 24px 0;
}

.designer-action-dialog .designer-action-field input,
.designer-action-dialog .designer-action-field select {
  min-width: 0;
  box-sizing: border-box;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.designer-action-dialog .designer-action-field input:focus,
.designer-action-dialog .designer-action-field select:focus {
  outline: 0;
  border-color: #d48a62;
  box-shadow: 0 0 0 3px rgba(210, 106, 44, .11);
}

.designer-action-dialog .designer-action-field small {
  color: #7a8592;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}

.designer-dialog .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding: 15px 24px 20px;
  border-top: 1px solid var(--line-soft);
  background: #fcfcfb;
}

.designer-dialog .dialog-actions button {
  min-width: 88px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #586575;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.designer-dialog .dialog-actions button.primary {
  border-color: #c95e29;
  color: #fff;
  background: #c95e29;
  box-shadow: 0 6px 14px rgba(201, 94, 41, .18);
}

.designer-action-dialog .dialog-actions {
  margin-top: 18px;
}

.designer-dialog label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.designer-dialog label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.designer-dialog select,
.designer-dialog input,
.designer-dialog textarea {
  width: 100%;
  min-height: 40px;
}

.designer-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 9px;
  background: #eef2f5;
}

.designer-mode-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  color: #657182;
  background: transparent;
  font-weight: 700;
}

.designer-mode-tabs button.active {
  color: #9d4824;
  background: white;
  box-shadow: 0 2px 8px rgba(36, 47, 61, .09);
}

.designer-field-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
}

.designer-dimension-field {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.designer-advanced-field {
  padding: 10px 11px;
  border: 1px solid #e1e6ea;
  border-radius: 9px;
  background: #fff;
}

.designer-advanced-field summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #687482;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.designer-advanced-field summary::-webkit-details-marker {
  display: none;
}

.designer-advanced-field summary::before {
  content: "＋";
  flex: 0 0 auto;
  color: #8a949f;
}

.designer-advanced-field[open] summary::before {
  content: "－";
}

.designer-advanced-field summary > span {
  flex: 1 1 auto;
}

.designer-advanced-field > .designer-rule-hint {
  margin: 0;
}

.designer-dimension-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.designer-dimension-heading small,
.designer-advanced-field summary small {
  margin-left: 4px;
  color: #929ca8;
  font-size: 10px;
  font-weight: 500;
}

.designer-dimension-heading strong,
.designer-advanced-field summary strong {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #7b8794;
  background: #edf1f4;
  font-size: 10px;
}

.designer-dimension-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  overflow: visible;
}

.designer-dimension-option {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid #d9e0e6;
  border-radius: 9px;
  color: #536171;
  background: #fff;
  font-size: 12px;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.designer-dimension-check {
  width: 18px;
  height: 18px;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid #cbd3db;
  border-radius: 5px;
  color: transparent;
  background: #f7f9fa;
  font-size: 11px;
}

.designer-dimension-option[aria-pressed="true"] {
  border-color: #d58a61;
  color: #9d4824;
  background: #fff7f2;
}

.designer-dimension-option[aria-pressed="true"] .designer-dimension-check {
  border-color: #c95e29;
  color: #fff;
  background: #c95e29;
}

.designer-dimension-option:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.designer-dimension-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed #d9e0e6;
  border-radius: 9px;
  color: #87929f;
  background: #fff;
  font-size: 11px;
}

.designer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.designer-form-grid label,
.designer-field-section > label {
  margin-top: 0;
}

.designer-rule-hint {
  margin: 9px 0;
  padding: 8px 10px;
  border-left: 3px solid #d26a2c;
  color: #6a5a4d;
  background: #fff7f1;
  font-size: 10px;
}

.designer-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.designer-filter-heading button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #526171;
  background: white;
}

.designer-filter-rows {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.designer-filter-row {
  display: grid;
  grid-template-columns: 1.1fr .8fr 1.3fr auto;
  gap: 6px;
}

.designer-filter-row button {
  border: 1px solid #efd2cd;
  border-radius: 6px;
  color: #a7463d;
  background: #fff8f7;
}

.designer-trial-preview {
  max-width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #bcd9cf;
  border-radius: 9px;
  background: #f4fbf8;
  color: #355c50;
  font-size: 12px;
  overflow-x: auto;
  box-sizing: border-box;
}

.designer-trial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.designer-trial-heading > strong {
  color: #176c54;
  font-size: 14px;
}

.designer-trial-heading > span {
  color: #59766e;
  text-align: right;
}

.designer-trial-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.designer-trial-summary article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d8e9e3;
  border-radius: 8px;
  background: #fff;
}

.designer-trial-summary span,
.designer-trial-summary small {
  display: block;
  color: #71847e;
}

.designer-trial-summary article > strong {
  display: block;
  margin: 3px 0;
  overflow-wrap: anywhere;
  color: #253d36;
  font-size: 18px;
  line-height: 1.35;
}

.designer-trial-summary article:first-child > strong {
  color: #176c54;
  font-size: 24px;
}

.designer-trial-dimension {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  color: #59766e;
}

.designer-trial-dimension > strong {
  flex: 0 0 auto;
  color: #355c50;
}

.designer-trial-table-wrap {
  max-height: min(420px, 46dvh);
  overflow: auto;
  border: 1px solid #d8e9e3;
  border-radius: 8px;
  background: #fff;
  scrollbar-gutter: stable;
}

.designer-trial-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 7px;
}

.designer-trial-table-heading > strong {
  color: #355c50;
}

.designer-trial-table-heading > span {
  color: #71847e;
}

.designer-trial-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.designer-trial-table-wrap th,
.designer-trial-table-wrap td {
  padding: 7px 9px;
  border-bottom: 1px solid #e7efec;
  text-align: left;
  white-space: nowrap;
}

.designer-trial-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8f6;
}

.designer-trial-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.designer-trial-empty {
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed #c9ddd6;
  border-radius: 8px;
  background: #fff;
  color: #71847e;
  text-align: center;
}

@media (max-width: 720px) {
  .designer-form-grid,
  .designer-filter-row {
    grid-template-columns: 1fr;
  }

  .designer-trial-summary {
    grid-template-columns: 1fr;
  }

  .designer-action-dialog .designer-dialog-header {
    padding: 18px 18px 15px;
  }

  .designer-action-context,
  .designer-action-dialog .designer-action-field {
    margin-right: 18px;
    margin-left: 18px;
  }

  .designer-dialog .dialog-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .designer-column-scroll-body {
    padding-right: 18px;
    padding-left: 18px;
  }
}

.column-card::before {
  content: attr(data-index);
  position: absolute;
  left: 10px;
  top: 12px;
  color: #9aa4b2;
  font-family: var(--mono);
  font-size: 8px;
}

.column-card > span,
.column-card > strong,
.column-card > p {
  display: block;
  margin: 0;
}

.column-card > span:first-of-type {
  color: #8a95a4;
  font-size: 8px;
}

.column-card > strong {
  margin-top: 3px;
  font-size: 10px;
}

.column-card .metric-code {
  margin-top: 3px;
  color: var(--purple);
  font-family: var(--mono);
  font-size: 7px;
}

.column-card > p {
  margin-top: 5px;
  color: #7b8798;
  font-size: 8px;
  line-height: 1.45;
}

.version-list {
  max-height: 290px;
  overflow-y: auto;
}

.version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}

.version-item strong {
  display: block;
  font-size: 9px;
}

.version-item .muted {
  margin-top: 3px;
  overflow: hidden;
  color: #8a95a4;
  font-size: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.version-item button {
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #627086;
  background: white;
  font-size: 8px;
}

.side-drawer {
  position: fixed;
  z-index: 80;
  inset: 0 0 0 auto;
  width: min(420px, 38vw);
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: white;
  box-shadow: -18px 0 55px rgba(21, 34, 56, 0.17);
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(9, 19, 36, 0.24);
  backdrop-filter: blur(1px);
}

.drawer-heading {
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}

.drawer-heading p,
.drawer-heading h2 {
  margin: 0;
}

.drawer-heading p {
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 8px;
}

.drawer-heading h2 {
  font-size: 16px;
}

.drawer-heading button {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 7px;
  color: #7a8698;
  background: #f4f6f8;
  font-size: 18px;
}

.drawer-context {
  margin: 13px;
  padding: 11px;
  border: 1px solid #dedaf5;
  border-radius: 8px;
  background: #f8f7ff;
}

.drawer-context span,
.drawer-context strong {
  display: block;
}

.drawer-context span {
  color: #8c82c0;
  font-size: 8px;
}

.drawer-context strong {
  margin-top: 3px;
  font-size: 11px;
}

.drawer-context p {
  margin: 6px 0 0;
  color: #7b739b;
  font-size: 8px;
  line-height: 1.5;
}

.ai-connection-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-connection-status i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #8190a5;
}

.ai-connection-status div {
  min-width: 0;
}

.ai-connection-status strong,
.ai-connection-status span {
  display: block;
}

.ai-connection-status strong {
  color: #2e3949;
  font-size: 11px;
}

.ai-connection-status span {
  margin-top: 3px;
  color: #738095;
  font-size: 9px;
  line-height: 1.45;
}

.ai-connection-status.connected {
  border-color: #b9dfd2;
  background: #f0faf6;
}

.ai-connection-status.connected i {
  background: #1f9d71;
}

.ai-connection-status.needs-config {
  border-color: #f1d59c;
  background: #fff9ec;
}

.ai-connection-status.needs-config i {
  background: #d59015;
}

.drawer-chat-form {
  display: grid;
  gap: 8px;
  padding: 0 13px 13px;
}

.drawer-chat-form textarea,
.chat-form textarea {
  width: 100%;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: 0;
  font-size: 10px;
  line-height: 1.5;
}

.drawer-chat-form textarea:focus,
.chat-form textarea:focus {
  border-color: #9d91e9;
  box-shadow: 0 0 0 3px rgba(101, 87, 217, 0.08);
}

.drawer-chat-form button {
  height: 34px;
  border-radius: 7px;
  font-size: 10px;
}

.draft-panel {
  margin: 0 13px 13px;
  padding: 11px;
  border: 1px solid #bfd5f3;
  border-radius: 8px;
  background: #f4f8ff;
}

.draft-panel h3,
.draft-panel p {
  margin: 0;
}

.draft-panel h3 {
  margin-bottom: 6px;
  font-size: 11px;
}

.draft-panel p {
  margin: 5px 0;
  color: #657791;
  font-size: 8px;
}

.draft-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  margin: 2px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #667386;
  background: #fafbfc;
  font-size: 8px;
}

.conversation-heading {
  display: flex;
  justify-content: space-between;
  padding: 11px 13px 8px;
  border-top: 1px solid var(--line);
  color: #516075;
  font-size: 9px;
}

.conversation-heading small {
  color: #929ca9;
  font-size: 7px;
}

.conversation {
  display: grid;
  gap: 8px;
  padding: 0 13px 18px;
}

.message {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 8px;
  color: #5f6d80;
  background: #f3f5f7;
  font-size: 9px;
  line-height: 1.5;
}

.message.user {
  justify-self: end;
  color: #fff;
  background: var(--purple);
}

.notification-list {
  padding: 8px 13px 20px;
}

.drawer-heading-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-heading .drawer-text-action {
  width: auto;
  padding: 0 10px;
  border: 1px solid #e5c0aa;
  color: #a94c23;
  background: #fff7f2;
  font-size: 9px;
  font-weight: 700;
}

.notification {
  padding: 11px 3px;
  border-bottom: 1px solid var(--line-soft);
}

.notification.unread strong::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.notification strong {
  font-size: 10px;
}

.notification p {
  margin: 5px 0 0;
  color: #7d8999;
  font-size: 8px;
  line-height: 1.5;
}

.utility-page {
  display: grid;
  gap: 12px;
}

.import-progress-panel {
  overflow: hidden;
}

.import-progress-panel .panel-heading strong {
  color: var(--accent, #cf642a);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.import-progress-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.import-progress-body progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #edf0f2;
  accent-color: var(--accent, #cf642a);
}

.import-progress-body progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #edf0f2;
}

.import-progress-body progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #c95e28, #e58a45);
}

.import-progress-meta,
.import-stage-timings {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  color: #65717c;
  font-size: 13px;
}

.import-stage-timings {
  justify-content: flex-start;
}

.import-stage-timings span {
  padding: 5px 9px;
  border: 1px solid #e4e8eb;
  border-radius: 999px;
  background: #f8f9fa;
}

.preprocessing-page {
  --logic-accent: #c9632d;
  --logic-ink: #24313d;
  --logic-muted: #6c7781;
}

.preprocessing-boundary-note {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 18px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid #eed9cd;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff7f1, #fffdfb);
  color: var(--logic-ink);
}

.preprocessing-boundary-note strong {
  color: var(--logic-accent);
}

.preprocessing-boundary-note p {
  margin: 0;
  color: var(--logic-muted);
  line-height: 1.65;
}

.preprocessing-toolbar {
  align-items: center;
}

.preprocessing-filters {
  display: flex;
  gap: 10px;
  min-width: min(520px, 55vw);
}

.preprocessing-filters input,
.preprocessing-filters select {
  min-height: 40px;
  border: 1px solid #dfe4e8;
  border-radius: 10px;
  background: #fff;
  color: var(--logic-ink);
}

.preprocessing-filters input {
  flex: 1;
  min-width: 220px;
  padding: 0 13px;
}

.preprocessing-filters select {
  min-width: 170px;
  padding: 0 34px 0 12px;
}

.preprocessing-logic-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f5f7f8;
}

.preprocessing-logic-card {
  overflow: hidden;
  border: 1px solid #e2e6e9;
  border-radius: 13px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.preprocessing-logic-card[open] {
  border-color: #e3b79e;
  box-shadow: 0 10px 28px rgba(68, 50, 39, 0.07);
}

.preprocessing-logic-card > summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.preprocessing-logic-card > summary::-webkit-details-marker {
  display: none;
}

.preprocessing-card-title {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}

.preprocessing-index {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  background: #f3eee9;
  color: var(--logic-accent);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.preprocessing-card-title strong {
  color: var(--logic-ink);
  font-size: 16px;
}

.preprocessing-card-title p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--logic-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preprocessing-card-badges {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.preprocessing-card-badges span,
.preprocessing-verification span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f4;
  color: #66727c;
  font-size: 12px;
}

.preprocessing-card-badges .required {
  background: #fff0e7;
  color: #b9501e;
}

.preprocessing-card-badges .optional {
  background: #edf4f0;
  color: #527060;
}

.preprocessing-card-body {
  display: grid;
  gap: 20px;
  padding: 0 18px 20px 65px;
  border-top: 1px solid #edf0f2;
}

.preprocessing-facts {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 10px;
  padding-top: 16px;
}

.preprocessing-facts > div {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 10px;
  background: #f7f8f9;
}

.preprocessing-facts span {
  display: block;
  margin-bottom: 6px;
  color: #84909a;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.preprocessing-facts strong {
  display: block;
  overflow-wrap: anywhere;
  color: #3a4650;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.preprocessing-card-body h4 {
  margin: 0 0 10px;
  color: var(--logic-ink);
  font-size: 13px;
}

.preprocessing-steps ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.preprocessing-steps li {
  padding-left: 4px;
  color: #4f5c67;
  line-height: 1.65;
}

.preprocessing-steps li::marker {
  color: var(--logic-accent);
  font-weight: 700;
}

.preprocessing-verification > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preprocessing-metric-boundary {
  border-top: 1px dashed #dfe4e7;
  padding-top: 12px;
  color: #65717b;
}

.preprocessing-metric-boundary summary {
  cursor: pointer;
  color: #495762;
  font-size: 13px;
  font-weight: 650;
}

.preprocessing-metric-boundary p {
  margin: 9px 0 0;
  line-height: 1.65;
}

.preprocessing-empty {
  padding: 50px 20px;
  color: var(--logic-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .preprocessing-boundary-note,
  .preprocessing-facts {
    grid-template-columns: 1fr;
  }

  .preprocessing-toolbar,
  .preprocessing-logic-card > summary {
    align-items: stretch;
    flex-direction: column;
  }

  .preprocessing-filters {
    width: 100%;
    min-width: 0;
  }

  .preprocessing-card-body {
    padding-left: 18px;
  }
}

@media (max-width: 620px) {
  .preprocessing-filters {
    flex-direction: column;
  }

  .preprocessing-filters input,
  .preprocessing-filters select {
    width: 100%;
    min-width: 0;
  }
}

.utility-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.utility-heading p,
.utility-heading h2 {
  margin: 0;
}

.utility-heading p {
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.utility-heading h2 {
  font-size: 19px;
}

.utility-heading > span {
  color: var(--muted);
  font-size: 9px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 9px;
}

.stat {
  min-height: 80px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  box-shadow: var(--shadow);
}

.stat span,
.stat b {
  display: block;
}

.stat span {
  color: var(--muted);
  font-size: 9px;
}

.stat b {
  margin-top: 9px;
  font-size: 22px;
}

.form-panel,
.padded-panel {
  padding: 13px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 9px;
  align-items: end;
}

.query-grid {
  grid-template-columns: 1.2fr 1.2fr repeat(5, minmax(120px, 0.8fr)) auto;
}

.grid-form label {
  display: grid;
  gap: 4px;
  color: #768295;
  font-size: 8px;
}

.grid-form select,
.grid-form input {
  min-width: 0;
  height: 33px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #455267;
  background: white;
  font-size: 9px;
}

.grid-form select[multiple] {
  height: 120px;
  padding: 6px;
}

.grid-form button {
  height: 33px;
  border-radius: 7px;
  font-size: 9px;
}

.utility-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.chat-form {
  display: flex;
  align-items: end;
  gap: 9px;
}

.chat-form textarea {
  min-height: 74px;
  flex: 1;
}

.chat-form button {
  height: 34px;
  border-radius: 7px;
}

.personal-chat-heading {
  align-items: flex-end;
}

.personal-chat-actions {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.personal-chat-actions label span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
}

.personal-chat-actions select {
  min-width: 220px;
  height: 32px;
}

.personal-chat-actions button {
  height: 32px;
}

.personal-conversation {
  display: grid;
  gap: 7px;
  max-height: 260px;
  margin: 10px 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafbfc;
}

.personal-message {
  max-width: 84%;
  padding: 8px 10px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgb(30 42 58 / 6%);
}

.personal-message.user {
  justify-self: end;
  background: var(--purple-soft);
}

.personal-message span {
  color: var(--muted);
  font-size: 8px;
}

.personal-message p {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.5;
}

.reason {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: #667386;
  font-size: 9px;
}

.reason strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.reason a {
  display: inline-block;
  margin-top: 5px;
  color: var(--blue);
  text-decoration: none;
}

.empty-chart-state {
  min-height: 440px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-chart-state > span {
  font-size: 31px;
  color: var(--blue);
}

.empty-chart-state h3 {
  margin: 12px 0 5px;
}

.empty-chart-state p {
  margin: 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.good {
  color: var(--green);
}

.warn {
  color: var(--orange);
}

.draft-preview-note {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid #d26a2c;
  color: #76513c;
  background: #fff7f1;
  font-size: 11px;
}

pre {
  overflow: auto;
  padding: 10px;
  border-radius: 7px;
  color: #455267;
  background: #f4f6f8;
  font-family: var(--mono);
  font-size: 8px;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 9px 0;
}

.diff-grid > div {
  padding: 8px;
  border: 1px solid #ccdaee;
  border-radius: 7px;
  background: white;
  text-align: center;
}

.diff-grid strong,
.diff-grid p {
  display: block;
  margin: 0;
}

.diff-grid p {
  margin-top: 4px;
  font-size: 16px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #fff;
  background: #17243a;
  box-shadow: 0 12px 35px rgba(18, 31, 53, 0.25);
  font-size: 10px;
}

.toast.error {
  background: #a33d3d;
}

.skeleton-block {
  position: relative;
  overflow: hidden;
}

.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: skeleton 1.15s infinite;
}

@keyframes skeleton {
  to { transform: translateX(100%); }
}

@media (max-width: 1320px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: minmax(430px, 1.4fr) minmax(250px, 0.8fr);
  }

  .dashboard-grid > article:last-child {
    grid-column: 1 / -1;
  }

  .explore-shell {
    grid-template-columns: 205px minmax(500px, 1fr) 235px;
  }

  .report-toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* Authenticated entry and personnel governance */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  background: #f3f6fb;
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 84px);
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 137, 74, 0.32), transparent 36%),
    linear-gradient(150deg, #142947 0%, #203f68 58%, #142b4b 100%);
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -170px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(255, 255, 255, 0.025), 0 0 0 128px rgba(255, 255, 255, 0.02);
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.auth-brand-lockup div { display: grid; gap: 3px; }
.auth-brand-lockup strong { font-size: 19px; }
.auth-brand-lockup span:last-child { color: rgba(255, 255, 255, 0.62); font-size: 12px; letter-spacing: 0.08em; }

.auth-brand-copy { position: relative; z-index: 1; max-width: 560px; }
.auth-brand-copy p { color: #ff9c63; font-size: 12px; letter-spacing: 0.16em; font-weight: 700; }
.auth-brand-copy h1 { margin: 12px 0 18px; font-size: clamp(38px, 5vw, 68px); line-height: 1.08; letter-spacing: -0.04em; }
.auth-brand-copy > span { color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1.8; }

.auth-form-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(100%, 480px); padding: 36px; border: 1px solid #dfe6ef; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(30, 53, 83, 0.12); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 30px; padding: 4px; border-radius: 12px; background: #f1f4f8; }
.auth-tabs button { border: 0; background: transparent; color: #64748b; box-shadow: none; }
.auth-tabs button.active { background: #fff; color: #1b365d; box-shadow: 0 4px 14px rgba(32, 52, 78, 0.09); }
.auth-form { display: grid; gap: 17px; }
.auth-form > div p { margin: 0 0 4px; color: #e87936; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.auth-form h2 { margin: 0 0 7px; color: #193354; }
.auth-form label { display: grid; gap: 7px; color: #41546d; font-size: 13px; font-weight: 600; }
.auth-form input, .auth-form select { min-height: 44px; }
.auth-form > button { min-height: 46px; margin-top: 4px; }
.auth-hint, .auth-message { margin: 0; font-size: 12px; line-height: 1.65; }
.auth-hint { color: #718096; }
.auth-message { min-height: 20px; color: #c64e32; }

.account-identity { min-width: 0; display: grid; gap: 3px; flex: 1; }
.account-identity strong, .account-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { font-size: 13px; }
.account-identity span { color: rgba(255, 255, 255, 0.58); font-size: 11px; }
.account-logout { padding: 5px 7px; border: 0; background: transparent; color: rgba(255, 255, 255, 0.66); font-size: 11px; box-shadow: none; }
.account-logout:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.page-guidance { margin: -6px 0 18px; color: #697b91; font-size: 13px; }
.people-store-groups { display: grid; gap: 18px; }
.people-store-card { overflow: hidden; }
.people-store-card .panel-heading { padding: 18px 20px; }
.people-table { min-width: 900px; }
.people-table td, .people-table th { vertical-align: middle; }
.people-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.people-actions button { padding: 6px 9px; font-size: 12px; }
.person-status-deleted { opacity: 0.58; }
.person-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.person-form-grid label { display: grid; gap: 7px; }
.person-permission-section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dfe5eb;
  border-radius: 14px;
  background: #f8fafc;
}
.person-permission-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 14px;
}
.person-permission-heading > div { display: grid; gap: 4px; }
.person-permission-heading span { color: #697b91; font-size: 12px; }
.person-permission-heading label { display: grid; gap: 5px; min-width: 190px; }
.person-permission-groups { display: grid; gap: 12px; }
.person-permission-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid #e2e7ec;
  border-radius: 11px;
  background: #fff;
}
.person-permission-group legend {
  padding: 0 6px;
  color: #42566f;
  font-size: 12px;
  font-weight: 700;
}
.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border-radius: 9px;
  background: #f7f9fb;
  cursor: pointer;
}
.permission-option.risk-high { background: #fff5ef; }
.permission-option input { margin-top: 3px; }
.permission-option span { display: grid; gap: 3px; min-width: 0; }
.permission-option strong { color: #27384c; font-size: 12px; }
.permission-option small { color: #718096; font-size: 11px; line-height: 1.45; }
.permission-chip,
.permission-summary {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: #53657a;
  font-size: 11px;
  white-space: nowrap;
}
.permission-summary.system { background: #fff0e7; color: #b95622; font-weight: 700; }
.permission-summary.default { background: #eef5fb; color: #466781; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 260px; padding: 32px; }
  .auth-brand-copy h1 { font-size: 38px; }
  .auth-form-panel { padding: 22px; }
}

@media (max-width: 560px) {
  .auth-card { padding: 24px 20px; }
  .person-form-grid { grid-template-columns: 1fr; }
  .person-permission-heading { display: grid; align-items: stretch; }
  .person-permission-group { grid-template-columns: 1fr; }
}

/* ========================================================================== */
/* 2026 visual system refresh — presentation only, behavior remains unchanged */
/* ========================================================================== */

:root {
  --sidebar: #17202a;
  --sidebar-active: #2a333c;
  --sidebar-text: #c8ced4;
  --sidebar-muted: #818b95;
  --page: #f3f5f7;
  --panel: #ffffff;
  --ink: #25313d;
  --text: #45515d;
  --muted: #66727f;
  --line: #dee3e8;
  --line-soft: #ebeef1;
  --blue: #c8642d;
  --blue-dark: #ad5122;
  --blue-soft: #fbeee7;
  --purple: #c8642d;
  --purple-soft: #fbeee7;
  --green: #2f7d66;
  --green-soft: #edf6f2;
  --red: #b44b4b;
  --red-soft: #fbefef;
  --orange: #a86a22;
  --orange-soft: #fbf3e8;
  --shadow: 0 12px 34px -26px rgba(23, 32, 42, 0.34);
  --shadow-raised: 0 20px 48px -28px rgba(23, 32, 42, 0.36);
  --font: "Microsoft YaHei", "微软雅黑", sans-serif;
  --mono: "Microsoft YaHei", "微软雅黑", sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

html {
  min-width: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--page);
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(37, 49, 61, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(37, 49, 61, 0.018) 1px, transparent 1px),
    var(--page);
  background-size: 32px 32px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

button,
select,
input,
textarea {
  color: inherit;
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out);
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(.99);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(200, 100, 45, .66);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100dvh;
  grid-template-columns: 240px minmax(0, 1fr);
}

.app-sidebar {
  width: 240px;
  padding: 24px 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .028), transparent 35%),
    var(--sidebar);
  box-shadow: 18px 0 48px -34px rgba(23, 32, 42, .85);
}

.brand {
  gap: 12px;
  padding: 0 8px 25px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px 5px 12px 5px;
  color: #fff;
  background: var(--blue);
  box-shadow: inset 0 1px rgba(255, 255, 255, .24);
  font-family: var(--mono);
  font-size: 15px;
}

.brand strong {
  font-size: 15px;
  letter-spacing: .02em;
}

.brand div > span {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 10px;
  letter-spacing: .11em;
}

.app-nav {
  gap: 5px;
}

.nav-group-label {
  margin: 14px 0 4px;
  padding: 0 12px;
  color: #77828c;
  font-size: 10px;
  letter-spacing: .16em;
}

.app-nav [data-tab] {
  min-height: 42px;
  height: auto;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 560;
}

.app-nav [data-tab]:hover {
  background: rgba(255, 255, 255, .055);
}

.app-nav [data-tab].active {
  position: relative;
  background: var(--sidebar-active);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.app-nav [data-tab].active::after {
  content: "";
  position: absolute;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.nav-icon {
  width: 20px;
  color: #d98a5f;
  font-family: var(--mono);
  font-size: 14px;
}

.sidebar-reports {
  margin-top: 5px;
  padding-top: 8px;
  border-left-color: rgba(255, 255, 255, .09);
}

.sidebar-section-head {
  padding: 0 9px 9px;
  color: #89939d;
  font-size: 10px;
}

.sidebar-section-head button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(200, 100, 45, .28);
  border-radius: 8px;
  color: #f2c0a4;
  background: rgba(200, 100, 45, .13);
}

.report-nav {
  gap: 5px;
}

.report-nav button[data-report-id] {
  min-height: 48px;
  padding: 10px 11px;
  border-left: 2px solid transparent;
  border-radius: 4px 10px 10px 4px;
}

.report-nav button[data-report-id]:hover,
.report-nav button[data-report-id].active {
  border-left-color: var(--blue);
  background: #252f38;
}

.report-nav strong {
  font-size: 12px;
}

.report-nav span {
  color: #87919a;
  font-size: 10px;
}

.sidebar-account {
  position: relative;
  display: block;
  padding: 16px 7px 0;
  border-top-color: rgba(255, 255, 255, .09);
}

.account-menu-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, .07);
}

.account-menu-chevron {
  color: rgba(255, 255, 255, .52);
  font-size: 13px;
  transition: transform .18s ease;
}

.account-menu-button[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  right: 7px;
  bottom: calc(100% + 8px);
  left: 7px;
  z-index: 20;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: #252f38;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.account-menu[hidden] {
  display: none;
}

.account-menu button {
  display: grid;
  gap: 2px;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, .88);
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.account-menu button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.account-menu button small {
  color: rgba(255, 255, 255, .5);
  font-size: 9px;
}

.account-avatar {
  width: 36px;
  height: 36px;
  color: #fff;
  background: #925132;
  font-family: var(--mono);
}

.account-logout {
  color: #ffc2b9 !important;
}

.app-stage {
  grid-column: 2;
  min-width: 0;
}

.app-topbar {
  min-height: 76px;
  padding: 12px clamp(18px, 2.4vw, 36px);
  border-bottom-color: rgba(222, 227, 232, .92);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(1.15);
}

.topbar-heading p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-heading h1 {
  font-size: clamp(1.25rem, 1.5vw, 1.65rem);
  font-weight: 720;
  letter-spacing: -.025em;
}

.topbar-actions {
  gap: 9px;
}

.status-pill,
.icon-button,
.secondary-action,
.report-toolbar button,
.mode-actions button,
.panel-heading button,
.explore-heading button {
  min-height: 38px;
  height: 38px;
  border-color: var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 580;
}

.status-pill {
  padding: 0 12px;
}

.status-pill i {
  width: 7px;
  height: 7px;
  animation: status-breathe 2.4s var(--ease-out) infinite;
}

.icon-button {
  width: 40px;
}

.notification-count {
  right: -4px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--blue);
  font-family: var(--mono);
  font-size: 9px;
}

.app-content {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: clamp(18px, 2vw, 30px) clamp(16px, 2.4vw, 36px) 48px;
}

.tab-panel.active {
  animation: panel-enter 180ms var(--ease-out) both;
}

.eyebrow,
.empty-workbench .eyebrow,
.utility-heading p,
.report-identity > p:first-child,
.panel-heading p,
.drawer-heading p,
.inspector-heading p {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

button.primary {
  min-height: 38px;
  color: #fff;
  border-color: var(--blue);
  border-radius: 9px;
  background: var(--blue);
  box-shadow: 0 10px 24px -18px rgba(200, 100, 45, .9);
  font-weight: 650;
}

button.primary:hover {
  background: var(--blue-dark);
}

.empty-workbench,
.access-denied {
  min-height: calc(100dvh - 154px);
  padding: 40px 20px;
}

.empty-workbench .empty-icon {
  width: 64px;
  height: 64px;
  border: 1px solid #f0d2c1;
  border-radius: 20px 8px 20px 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 26px;
}

.empty-workbench h2 {
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -.02em;
}

.empty-workbench > p:not(.eyebrow) {
  max-width: 58ch;
  margin: 10px auto 22px;
  font-size: 14px;
}

.report-context {
  display: grid;
  grid-template-columns: minmax(220px, .62fr) minmax(620px, 1.38fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 14px;
}

.report-title-line h2 {
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -.025em;
}

.report-identity > p:first-child,
.report-identity > p:last-child {
  font-size: 11px;
}

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr)) repeat(3, auto);
  gap: 8px;
}

.compact-field {
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.compact-field select,
.compact-field input[type="date"],
.custom-date-range input {
  min-height: 38px;
  height: 38px;
  padding: 0 11px;
  border-color: var(--line);
  border-radius: 9px;
  font-size: 12px;
}

.mode-bar {
  min-height: 58px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.mode-switcher {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: #eef1f3;
}

.mode-switcher button {
  min-height: 36px;
  height: 36px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.mode-switcher button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px -15px rgba(23, 32, 42, .55);
}

.mode-actions {
  flex-wrap: wrap;
}

.status-tag {
  min-height: 27px;
  height: auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f8f9fa;
  font-size: 11px;
  font-weight: 600;
}

.system-banner,
.data-status-strip {
  border-color: #edcfbd;
  color: #7c4528;
  background: #fdf5f0;
}

.system-banner {
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: 11px;
}

.system-banner p,
.data-status-strip {
  color: var(--muted);
  font-size: 11px;
}

.data-update-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 9px 14px;
  border: 1px solid #edcfbd;
  border-radius: 10px;
  color: #7c4528;
  background: #fdf5f0;
  font-size: 12px;
}

.data-update-divider[hidden] {
  display: none;
}

.data-update-divider span {
  font-weight: 700;
}

.data-update-divider strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.data-update-divider small {
  margin-left: auto;
  color: var(--muted);
}

.report-sheet-tabs {
  gap: 5px;
  margin: 14px 0;
  padding: 5px;
  border-radius: 11px;
  background: #eceff2;
  scrollbar-width: thin;
}

.report-sheet-tabs button {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.report-sheet-tabs button.active {
  color: var(--ink);
  box-shadow: 0 8px 18px -16px rgba(23, 32, 42, .6);
}

.report-sheet-tabs .sheet-add-button {
  border-color: #d8aa90;
  color: var(--blue);
  background: #fffaf7;
}

.dashboard-kpis {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 11px;
  margin-bottom: 12px;
}

.kpi-card {
  min-height: 128px;
  padding: 16px 15px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.kpi-card.primary-kpi {
  grid-column: span 2;
  color: #fff;
  border-color: #8f4723;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 55%),
    #a84f25;
}

.kpi-card:hover,
.kpi-card.active {
  border-color: #dfac90;
  box-shadow: var(--shadow-raised);
  transform: translateY(-1px);
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.primary-kpi .kpi-label,
.primary-kpi .kpi-meta,
.primary-kpi .kpi-unit {
  color: rgba(255, 255, 255, .76);
}

.kpi-value {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: clamp(25px, 2.15vw, 34px);
  font-weight: 700;
}

.kpi-unit,
.kpi-meta {
  font-size: 11px;
}

.kpi-mini-bars i,
.primary-kpi .kpi-mini-bars i {
  background: currentColor;
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-grid > article:nth-child(1) { grid-column: span 8; }
.dashboard-grid > article:nth-child(2) { grid-column: span 4; }

.bi-panel,
.inspector-section {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel-heading,
.inspector-heading {
  min-height: 62px;
  padding: 13px 17px;
}

.panel-heading p,
.inspector-heading p {
  margin-bottom: 3px;
  font-size: 10px;
}

.panel-heading h3,
.inspector-heading h3 {
  font-size: 15px;
  letter-spacing: -.01em;
}

.panel-heading > span,
.inspector-heading span {
  font-size: 11px;
}

.panel-heading select {
  min-height: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
}

.distribution-chart,
.alert-list {
  min-height: 290px;
  padding: 18px;
}

.bar-row {
  grid-template-columns: minmax(76px, 110px) minmax(120px, 1fr) 72px;
  min-height: 26px;
  font-size: 12px;
}

.bar-track {
  height: 8px;
  background: #edf0f2;
}

.bar-fill,
.bar-row.highlight .bar-fill,
.explore-chart .bar-fill {
  background: var(--blue);
}

.bar-value {
  font-size: 11px;
}

.alert-item p {
  font-size: 11px;
}

.alert-item {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
}

.alert-symbol {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
}

.alert-item strong {
  font-size: 12px;
}

.bi-table-wrap {
  max-width: 100%;
  scrollbar-color: #c3c9cf transparent;
}

.bi-table-wrap table {
  color: var(--text);
  font-size: 12.5px;
}

.bi-table-wrap th {
  padding: 11px 13px;
  color: #5d6975;
  background: #f5f7f8;
  font-size: 11px;
  font-weight: 700;
}

.bi-table-wrap thead .group-header th {
  color: #fff;
  border-right-color: rgba(255, 255, 255, .2);
  border-bottom-color: #9f4c24;
  background: #bd5b2a;
  font-size: 12px;
}

/* 驾驶舱采用网页式信息层级：暖色只作强调，不复刻 Excel 的整块橙底。 */
.bi-table-wrap .performance-table .performance-group-header th {
  color: #a8562c;
  border-right: 1px solid #e3e7eb;
  border-bottom: 1px solid #dfe4e9;
  background: #fbf6f2;
  box-shadow: inset 0 2px 0 rgba(214, 108, 37, .16);
  font-size: 11px;
  font-weight: 700;
}

.bi-table-wrap .performance-table .performance-group-header th[rowspan] {
  color: #536171;
  background: #f5f7f8;
  box-shadow: none;
  vertical-align: middle;
  text-align: left;
}

.bi-table-wrap .performance-table .metric-header .metric-column-header {
  color: #5d6975;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid var(--line);
  background: #f8f9fa;
  font-weight: 700;
}

.bi-table-wrap .performance-table .metric-header .metric-column-header.group-start {
  border-left: 1px solid #d8dee5;
}

.bi-table-wrap .performance-table .metric-header .metric-column-header.is-sort-metric {
  color: #a84e22;
  background: #fff3eb;
  box-shadow: inset 0 -2px 0 var(--orange);
}

/* Targets are reference values, not attainment alerts. Shared by fullscreen/PNG. */
table thead th.channel-target-column,
.bi-table-wrap table thead th.channel-target-column,
.bi-table-wrap .performance-table .metric-header .metric-column-header.channel-target-column {
  background: #ffe4ce;
  color: #8a451f;
}
table tbody td.channel-target-column {
  background: #fff7ef;
}
/* A target is not an actual-result data bar. Summary rows never receive this class. */
table tbody td.channel-target-column > i {
  display: none;
}

/* Finance uses the same two-level performance header, with two identity columns. */
.bi-table-wrap .finance-performance-table col.finance-identity-column { width: 92px; }
.bi-table-wrap .finance-performance-table col.finance-identity-column:first-child { width: 68px; }
.bi-table-wrap .finance-performance-table th,
.bi-table-wrap .finance-performance-table td {
  width: auto; min-width: 0; padding: 10px 5px; font-size: 11px;
}
.bi-table-wrap .finance-performance-table .metric-header th {
  white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.5;
}
.bi-table-wrap .finance-performance-table .metric-group-header { text-align: center; }
.bi-table-wrap .finance-performance-table tbody td {
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.bi-table-wrap .finance-performance-table tbody td:nth-child(-n+2) { text-align: left; }
.bi-table-wrap .finance-performance-table tbody td:nth-child(n+3) { text-align: right; }
.bi-table-wrap .finance-performance-table .subtotal-row td {
  background: #fbf6f2; color: #86502f; font-weight: 600; border-top: 1px solid #e5d9d0;
}
.bi-table-wrap .finance-performance-table .total-row td {
  background: #fff0e2; color: #9a431b; font-weight: 700; border-top: 2px solid #deb99e;
}

.performance-table .metric-column-header.is-sort-metric::after {
  margin-left: 3px;
  content: "↓";
  font-size: 9px;
}

/* 人员绩效宽表横向滚动时始终保留排名/身份列，避免数值与人员失去对应。 */
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table {
  --performance-rank-width: 52px;
  --performance-owner-width: 112px;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody tr {
  --performance-sticky-background: #fff;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody tr:hover,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody tr.selected {
  --performance-sticky-background: #fdf4ef;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody tr.report-summary-row {
  --performance-sticky-background: color-mix(in srgb, var(--accent-soft) 72%, white);
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-supervisor {
  --performance-sticky-background: #e6f3d5;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-manager {
  --performance-sticky-background: #ddebf7;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-region,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-store {
  --performance-sticky-background: #fff0e2;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-rank-column,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-owner-column {
  position: sticky;
  box-sizing: border-box;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-rank-column {
  left: 0;
  width: var(--performance-rank-width);
  min-width: var(--performance-rank-width);
  max-width: var(--performance-rank-width);
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-owner-column {
  left: 0;
  width: var(--performance-owner-width);
  min-width: var(--performance-owner-width);
  background: var(--performance-sticky-background, #fff);
  box-shadow: 1px 0 0 var(--line), 9px 0 14px -14px rgba(31, 41, 55, .62);
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-with-rank .performance-owner-column {
  left: var(--performance-rank-width);
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.additional-value-performance-table .performance-owner-column {
  width: 72px;
  min-width: 72px;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody .performance-rank-column,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table tbody .performance-owner-column {
  z-index: 3;
  background: var(--performance-sticky-background, #fff);
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table thead .performance-rank-column,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table thead .performance-owner-column {
  z-index: 8;
  background: #f5f7f8;
}

.bi-table-wrap td {
  padding: 11px 13px;
  border-bottom-color: var(--line-soft);
  font-family: var(--mono);
}

.bi-table-wrap td:first-child,
.bi-table-wrap td:nth-child(2) {
  font-family: var(--font);
}

.bi-table-wrap tbody tr:hover td,
.bi-table-wrap tbody tr.selected td {
  background: #fdf4ef;
}

.performance-control { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.performance-control select { width: auto; max-width: 210px; min-height: 34px; padding: 6px 10px; }
.performance-control[hidden] { display: none; }
.ranking-panel-actions #toggleUnmatchedPerformanceButton[aria-pressed="true"] {
  background: #fff2e8;
  border-color: #e6b799;
  color: #9c4b22;
}
.performance-visibility-notice {
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid #e5eaf0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  background: #f8fafc;
}
.performance-visibility-notice[hidden] { display: none; }
.performance-control { white-space: nowrap; }
/* Cross-store leader view: identity columns remain frozen even with rowspans. */
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table { table-layout: fixed; min-width: 100%; }
/* Let the wider of the metric name and rule set each warning column's width.
   Only the table scrolls on narrow screens; identity columns retain their sticky offsets. */
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap .performance-table {
  table-layout: auto !important;
  width: auto !important;
  min-width: 100% !important;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap .performance-table thead th.warning-metric-header {
  width: auto;
  max-width: none;
  padding: 8px 10px;
  text-align: right;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap .warning-metric-header > * {
  display: block;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.45;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap .warning-metric-header small {
  margin-top: 2px;
  color: #526579;
  font-size: .92em;
  font-weight: 400;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap th[data-warning-result] {
  background-color: #e4eef7;
  color: #284963;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap tbody tr:not(.report-summary-row) td[data-warning-result] {
  background-color: #f1f6fa;
  color: #284963;
  font-weight: 600;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap td[data-warning-result] > i {
  display: none;
}
:is(#dashboardRankingTable, #lifelineWarningTable).warning-performance-wrap [data-warning-result="items"] {
  border-right: 2px solid #95adc1;
}
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table td,
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table th { min-width: 86px; }
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table .performance-store-column {
  position: sticky; left: 0; width: 108px; min-width: 108px; max-width: 108px;
  box-sizing: border-box; z-index: 3; background: #f5f7f8;
  text-align: center; vertical-align: middle; white-space: normal;
}
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table .performance-owner-column {
  left: 108px; width: 128px; min-width: 128px; box-sizing: border-box;
  white-space: normal; text-align: left;
}
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table thead .performance-store-column { z-index: 8; }
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table .report-summary-row td { background: #fff0e2; font-weight: 700; }
:is(#dashboardRankingTable, #lifelineWarningTable) .leader-performance-table td.leader-metric-cell { text-align: right; font-family: var(--mono); width: auto; }
.performance-summary-table .performance-region-heading th { background: #e9eef4; color: #334155; text-align: left; padding: 10px 12px; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-supervisor td { background: #e6f3d5; font-weight: 600; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-manager td { background: #ddebf7; font-weight: 600; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-region td,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table .performance-level-store td { background: #fff0e2; color: #9a431b; font-weight: 700; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table { min-width: 100%; table-layout: auto; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table thead tr:not(.metric-header) th:first-child,
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table tbody td:first-child { width: 180px; min-width: 180px; max-width: none; white-space: normal; overflow-wrap: break-word; left: 0; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table th:nth-child(n+2),
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table td:nth-child(n+2) { min-width: 90px; width: auto; text-align: right; left: auto; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table thead .performance-group-header th.metric-group-header { text-align: center; }
:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.performance-summary-table.daily-team-summary-table .daily-text-cell { text-align: left; }
@media (max-width: 900px) { .ranking-panel-actions { flex-wrap: wrap; } .performance-control select { max-width: 170px; } }

/* 三张 OKR 表字段较多：人员绩效局部横向滚动，并用紧凑列宽控制总行程。 */
.bi-table-wrap.okr-horizontal-scroll {
  max-width: 100%;
  padding-bottom: 4px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
  scrollbar-color: #aeb7c1 #eef1f4;
  scrollbar-gutter: stable;
}

.bi-table-wrap.okr-horizontal-scroll::-webkit-scrollbar {
  height: 10px;
}

.bi-table-wrap.okr-horizontal-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef1f4;
}

.bi-table-wrap.okr-horizontal-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f4;
  border-radius: 999px;
  background: #aeb7c1;
}

/* 附加产值月报取消排名列，所有业务字段按可用页面宽度均分。 */
.bi-table-wrap.additional-value-fit-table {
  max-width: 100%;
  padding-bottom: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.bi-table-wrap .performance-table.additional-value-performance-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  box-sizing: border-box;
}

.performance-table.additional-value-performance-table col.additional-value-owner-column {
  width: 72px;
}

.performance-table.additional-value-performance-table col.additional-value-metric-column {
  width: auto;
}

.bi-table-wrap .performance-table.additional-value-performance-table th,
.bi-table-wrap .performance-table.additional-value-performance-table td {
  box-sizing: border-box;
  min-width: 0;
  padding-right: 1px;
  padding-left: 1px;
  font-size: 8px;
}

.bi-table-wrap .performance-table.additional-value-performance-table thead tr:not(.metric-header) th:first-child,
.bi-table-wrap .performance-table.additional-value-performance-table tbody td:first-child {
  width: 72px;
  padding-right: 4px;
  padding-left: 5px;
  text-align: left;
}

.bi-table-wrap .performance-table.additional-value-performance-table .metric-header th:first-child,
.bi-table-wrap .performance-table.additional-value-performance-table th:nth-child(2),
.bi-table-wrap .performance-table.additional-value-performance-table td:nth-child(2),
.bi-table-wrap .performance-table.additional-value-performance-table .metric-column-header,
.bi-table-wrap .performance-table.additional-value-performance-table .metric-cell {
  width: auto;
  min-width: 0;
  overflow: hidden;
}

.bi-table-wrap .performance-table.additional-value-performance-table .metric-column-header {
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.15;
}

.bi-table-wrap .performance-table.additional-value-performance-table .metric-cell {
  white-space: nowrap;
}

.bi-table-wrap .performance-table.additional-value-performance-table .metric-cell span {
  font-size: 8px;
}

.bi-table-wrap .performance-table.okr-compact-performance-table {
  table-layout: fixed;
}

.bi-table-wrap .performance-table.okr-compact-performance-table th,
.bi-table-wrap .performance-table.okr-compact-performance-table td {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-right: 4px;
  padding-left: 4px;
}

.performance-table.okr-compact-performance-table col.okr-rank-column {
  width: 44px;
}

:is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.okr-compact-performance-table {
  --performance-rank-width: 44px;
  --performance-owner-width: 104px;
}

.performance-table.okr-compact-performance-table col.okr-owner-column {
  width: 104px;
}

.performance-table.okr-compact-performance-table col.okr-metric-column {
  width: 64px;
}

.bi-table-wrap .performance-table.okr-compact-performance-table .metric-column-header {
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.bi-table-wrap .performance-table.okr-compact-performance-table .metric-cell {
  min-width: 0;
}

.metric-cell i {
  background: #f7dfd1;
}

.explore-shell {
  min-height: calc(100dvh - 230px);
  grid-template-columns: 235px minmax(0, 1fr);
  border-radius: 14px;
}

.explore-metric {
  min-height: 82px;
  padding: 12px 14px;
}

.explore-metric:hover,
.explore-metric.active {
  background: var(--blue-soft);
}

.explore-metric.active::before {
  background: var(--blue);
}

.explore-metric span,
.explore-metric small,
.explore-heading span,
.explore-status-strip div {
  font-size: 11px;
}

.explore-metric strong {
  font-family: var(--mono);
  font-size: 22px;
}

.explore-heading {
  min-height: 78px;
  padding: 13px 18px;
}

.explore-heading p,
.explore-status-strip section > p {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.explore-heading h2 {
  font-size: 18px;
}

.explore-status-strip section {
  padding: 11px 16px;
}

.edit-ribbon {
  min-height: 54px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: 11px;
}

.edit-ribbon strong {
  font-size: 12px;
}

.edit-ribbon span {
  font-size: 10px;
}

.edit-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
}

.column-card {
  padding: 12px 13px 12px 38px;
}

.column-card::before,
.column-card > span:first-of-type,
.column-card .metric-code,
.column-card > p,
.version-item .muted {
  font-size: 10px;
}

.column-card > strong,
.version-item strong {
  font-size: 12px;
}

.side-drawer {
  width: min(460px, 42vw);
  border-left-color: var(--line);
  box-shadow: -24px 0 70px -38px rgba(23, 32, 42, .6);
}

.drawer-backdrop {
  background: rgba(23, 32, 42, .38);
  backdrop-filter: blur(2px);
}

.drawer-heading {
  height: 76px;
  padding: 13px 18px;
}

.drawer-heading h2 {
  font-size: 19px;
}

.drawer-context,
.draft-panel {
  margin: 15px;
  padding: 13px;
  border-color: #edcfbd;
  border-radius: 11px;
  background: #fdf7f3;
}

.drawer-context span,
.drawer-context p,
.draft-panel p,
.conversation-heading,
.message,
.notification p {
  font-size: 11px;
}

.drawer-context strong,
.draft-panel h3,
.notification strong {
  font-size: 13px;
}

.drawer-chat-form textarea,
.chat-form textarea {
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
}

.drawer-chat-form textarea:focus,
.chat-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(200, 100, 45, .11);
}

.message {
  padding: 10px 12px;
  border-radius: 11px;
}

.message.user,
.personal-message.user {
  color: #fff;
  background: #a95027;
}

.utility-page {
  gap: 16px;
}

.utility-heading {
  align-items: end;
  gap: 24px;
  padding: 3px 0 4px;
}

.utility-heading p {
  margin-bottom: 5px;
  font-size: 10px;
}

.utility-heading h2 {
  font-size: clamp(22px, 2vw, 29px);
  letter-spacing: -.025em;
}

.utility-heading > span,
.page-guidance {
  color: var(--muted);
  font-size: 13px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 11px;
}

.people-management-page .summary-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.summary-grid > article,
.stat {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid #d9b29c;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.summary-grid > article span,
.stat span {
  color: var(--muted);
  font-size: 12px;
}

.summary-grid > article strong,
.stat b {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 25px;
}

.form-panel,
.padded-panel {
  padding: 17px;
}

.grid-form {
  grid-template-columns: repeat(5, minmax(135px, 1fr)) auto;
  gap: 11px;
}

.query-grid {
  grid-template-columns: 1.25fr 1.25fr repeat(5, minmax(125px, .8fr)) auto;
}

.grid-form label,
.person-form-grid label {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.grid-form select,
.grid-form input,
.personal-chat-actions select,
.report-dialog input,
.report-dialog select {
  min-height: 40px;
  height: 40px;
  border-color: var(--line);
  border-radius: 9px;
  font-size: 12px;
}

.grid-form select[multiple] {
  height: 136px;
  padding: 8px;
}

.grid-form button,
.chat-form button,
.personal-chat-actions button {
  min-height: 40px;
  height: 40px;
  border-radius: 9px;
  font-size: 12px;
}

.utility-grid {
  grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.18fr);
  gap: 12px;
}

.template-management-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}

.template-catalog-panel {
  top: 92px;
  padding: 13px;
}

.template-management-list button {
  min-height: 58px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.template-management-list button:hover,
.template-management-list button.active {
  border-color: #d9aa90;
  background: var(--blue-soft);
}

.template-sheet-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 11px;
}

.template-sheet-grid section {
  min-height: 104px;
  padding: 14px;
  border-radius: 11px;
}

.people-store-groups {
  gap: 16px;
}

.people-store-card .panel-heading {
  padding: 15px 18px;
}

.people-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
}

.danger-action {
  color: var(--red) !important;
  border-color: #ecc6c6 !important;
  background: var(--red-soft) !important;
}

.report-dialog {
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 18px;
  box-shadow: 0 30px 90px -35px rgba(23, 32, 42, .72);
}

.report-dialog::backdrop {
  background: rgba(23, 32, 42, .48);
  backdrop-filter: blur(3px);
}

.report-dialog form {
  gap: 18px;
  padding: 26px;
}

.report-dialog header p {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.report-dialog header h2 {
  font-size: 22px;
  letter-spacing: -.02em;
}

.report-dialog .dialog-description,
.report-dialog .dialog-hint,
.report-dialog label {
  font-size: 12px;
}

.report-dialog .dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.auth-shell {
  min-height: 100dvh;
  grid-template-columns: minmax(360px, .88fr) minmax(480px, 1.12fr);
  background: var(--page);
}

.auth-brand-panel {
  isolation: isolate;
  padding: clamp(34px, 6vw, 88px);
  background: var(--sidebar);
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 22px 8px 22px 8px;
  pointer-events: none;
}

.auth-brand-panel::after {
  right: -155px;
  bottom: -185px;
  width: 440px;
  height: 440px;
  border-color: rgba(200, 100, 45, .25);
  box-shadow: 0 0 0 72px rgba(200, 100, 45, .035), 0 0 0 144px rgba(200, 100, 45, .022);
}

.auth-brand-lockup,
.auth-brand-copy {
  z-index: 1;
}

.auth-brand-copy {
  max-width: 52ch;
}

.auth-brand-copy p {
  color: #e7a17c;
  font-size: 11px;
}

.auth-brand-copy h1 {
  margin: 14px 0 20px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1.06;
  letter-spacing: -.055em;
}

.auth-brand-copy > span {
  max-width: 48ch;
  color: rgba(255, 255, 255, .68);
  font-size: 15px;
}

.auth-form-panel {
  padding: clamp(24px, 5vw, 72px);
}

.auth-card {
  width: min(100%, 510px);
  padding: clamp(28px, 4vw, 44px);
  border-color: var(--line);
  border-radius: 20px 8px 20px 8px;
  box-shadow: 0 30px 70px -42px rgba(23, 32, 42, .52);
}

.auth-tabs {
  gap: 5px;
  margin-bottom: 32px;
  padding: 5px;
  border-radius: 11px;
  background: #eceff2;
}

.auth-tabs button {
  min-height: 40px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.auth-tabs button.active {
  color: var(--ink);
  box-shadow: 0 9px 22px -18px rgba(23, 32, 42, .55);
}

.auth-form {
  gap: 19px;
}

.auth-form > div p {
  color: var(--blue);
  font-size: 10px;
}

.auth-form h2 {
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -.025em;
}

.auth-form label {
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.auth-form input,
.auth-form select {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}

.auth-form > button {
  min-height: 46px;
}

.auth-hint,
.auth-message {
  font-size: 12px;
}

.toast {
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: var(--sidebar);
  box-shadow: 0 24px 60px -28px rgba(23, 32, 42, .7);
  font-size: 12px;
}

#reconcileSummary:empty,
#reconcileReasons:empty,
#reconcileDetails:empty,
.bi-panel.padded-panel:has(> #queryMeta:empty):has(> #queryResult:empty) {
  display: none;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes status-breathe {
  0%, 100% { opacity: .7; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1); }
}

.manual-input-page {
  gap: 18px;
}

.manual-input-heading > span {
  max-width: 520px;
}

.manual-input-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px 7px 18px 7px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 10%, rgba(52, 137, 255, .33), transparent 33%),
    linear-gradient(124deg, #111f34 0%, #182f4f 62%, #153b65 100%);
  box-shadow: 0 24px 56px -42px rgba(16, 35, 60, .9);
}

.manual-input-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  bottom: -190px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
}

.manual-input-hero .eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: #82baff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .18em;
}

.manual-input-hero h3 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -.025em;
}

.manual-input-hero p {
  max-width: 680px;
  margin: 0;
  color: #b9c9dd;
  line-height: 1.75;
}

.manual-input-period {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 120px 110px auto;
  align-items: end;
  gap: 9px;
}

.manual-input-period label,
.manual-upload-form > label:not(.file-picker) {
  display: grid;
  gap: 7px;
  font-size: 11px;
  font-weight: 650;
}

.manual-input-period label {
  color: #c5d2e2;
}

.manual-input-period input,
.manual-input-period select {
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  background: rgba(6, 20, 37, .45);
}

.manual-input-period select option {
  color: var(--ink);
}

.manual-input-period button {
  min-height: 39px;
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.manual-input-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #e9edf2;
}

.manual-input-tabs button {
  min-width: 145px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.manual-input-tabs button.active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 8px 18px -15px rgba(21, 84, 184, .75);
}

.manual-input-panel {
  display: none;
  gap: 16px;
  animation: panel-enter .22s ease-out;
}

.manual-input-panel.active {
  display: grid;
}

.manual-input-card {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(500px, 1.25fr);
  align-items: center;
  gap: 32px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 15px 6px 15px 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.manual-input-card-copy {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.manual-input-index {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 12px 4px 12px 4px;
  color: var(--blue);
  background: var(--blue-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
}

.manual-input-card h3 {
  margin: 1px 0 7px;
  font-size: 17px;
}

.manual-input-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.manual-upload-form {
  display: grid;
  grid-template-columns: 130px minmax(250px, 1fr) auto;
  align-items: end;
  gap: 11px;
}

.architecture-upload-form {
  grid-template-columns: 130px minmax(250px, 1fr) auto;
}

.manual-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.manual-form-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.manual-form-status:empty {
  display: none;
}

.manual-form-status.pending {
  color: #72520b;
  border-color: #ecd28f;
  background: #fff9e8;
}

.manual-form-status.success {
  color: #176342;
  border-color: #a8d9c1;
  background: #effaf4;
}

.manual-form-status.error {
  color: #a12b2b;
  border-color: #ebbbbb;
  background: #fff2f2;
}

.manual-upload-form > label:not(.file-picker) {
  color: var(--text);
}

.manual-upload-form input[type="number"],
.manual-upload-form input[type="month"] {
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
}

.file-picker {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 0 13px;
  border: 1px dashed #aebbd0;
  border-radius: 9px;
  color: var(--blue-dark);
  background: #f7faff;
  cursor: pointer;
}

.file-picker:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.manual-upload-form button {
  min-height: 43px;
  white-space: nowrap;
}

.headquarters-sales-form {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(260px, 1.4fr);
  align-items: end;
  gap: 11px;
}

.headquarters-sales-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.headquarters-sales-form input[type="text"],
.headquarters-sales-form input:not([type]) {
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
}

.headquarters-sales-form small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.headquarters-sales-enabled {
  grid-column: 1 / -1;
  display: flex !important;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 8px !important;
}

.headquarters-sales-enabled input {
  width: 16px;
  height: 16px;
}

.headquarters-sales-form .manual-form-actions,
.headquarters-sales-form .manual-form-status {
  grid-column: 1 / -1;
}

.headquarters-sales-table table {
  min-width: 780px;
}

.headquarters-sales-state {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.headquarters-sales-state.active {
  color: #176342;
  background: #e8f7ef;
}

.headquarters-sales-state.inactive {
  color: #7b8491;
  background: #eef1f4;
}

.headquarters-sales-actions {
  display: flex;
  gap: 6px;
}

.headquarters-sales-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--blue-dark);
  background: #fff;
}

.headquarters-sales-actions button.danger {
  color: #a12b2b;
}

@media (max-width: 900px) {
  .headquarters-sales-form {
    grid-template-columns: 1fr;
  }

  .headquarters-sales-enabled,
  .headquarters-sales-form .manual-form-actions,
  .headquarters-sales-form .manual-form-status {
    grid-column: 1;
  }
}

#manualArchitectureTable {
  max-height: min(70vh, 760px);
  overflow: auto;
}

#manualArchitectureTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f7fb;
}

.manual-input-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.manual-input-summary:empty {
  display: none;
}

.manual-input-summary > article {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.manual-input-summary span,
.manual-input-summary small {
  color: var(--muted);
  font-size: 11px;
}

.manual-input-summary strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 730;
}

.manual-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 170px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.manual-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.manual-input-history .panel-heading > span {
  color: var(--muted);
  font-size: 11px;
}

#manualCommissionTables {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.manual-sheet-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.manual-sheet-preview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-blue);
}

.manual-sheet-preview > header div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.manual-sheet-preview > header span,
.manual-sheet-preview > header small {
  color: var(--muted);
  font-size: 11px;
}

/* Persisted chart assets */
.chart-assets-page {
  gap: 16px;
}

.chart-assets-heading {
  align-items: center;
  padding: 19px 22px;
  border: 1px solid #182b47;
  border-radius: 15px 5px 15px 5px;
  color: #fff;
  background:
    radial-gradient(circle at 76% -70%, rgba(244, 122, 42, .32), transparent 43%),
    linear-gradient(118deg, #0c1a30, #152d4d 72%, #213957);
  box-shadow: 0 16px 38px -27px rgba(12, 26, 48, .85);
}

.chart-assets-heading h2,
.chart-assets-heading p {
  color: #fff;
}

.chart-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

.chart-heading-actions > span {
  color: #b8c7da;
  font-size: 11px;
}

.chart-heading-actions button {
  min-height: 39px;
  border-color: #f47a2a;
  background: #f47a2a;
  box-shadow: 0 9px 20px -13px rgba(244, 122, 42, .95);
}

.chart-assets-layout {
  min-height: 680px;
  display: grid;
  grid-template-columns: 270px minmax(520px, 1fr) 330px;
  align-items: stretch;
  gap: 14px;
}

.chart-asset-library,
.chart-asset-assistant,
.chart-asset-canvas {
  min-width: 0;
  border-radius: 12px 4px 12px 4px;
}

.chart-asset-library {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chart-asset-library > header,
.chart-asset-assistant > header {
  min-height: 72px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.chart-asset-library > header > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.chart-filter-stack {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #f9fbfd;
}

.chart-filter-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.chart-filter-stack select,
.chart-filter-stack input {
  width: 100%;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

.chart-filter-stack .custom-date-range {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.chart-filter-stack .custom-date-range span {
  display: none;
}

.chart-template-library {
  padding: 13px 11px 11px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf6, #fff);
}

.chart-template-library > header,
.chart-own-assets-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chart-template-library > header p {
  margin: 0 0 2px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .09em;
}

.chart-template-library h4,
.chart-own-assets-heading strong {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}

.chart-template-library > header > span,
.chart-own-assets-heading span,
.chart-template-hint {
  color: var(--muted);
  font-size: 9px;
}

.chart-template-hint {
  margin: 7px 0 9px;
  line-height: 1.55;
}

.chart-template-list {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.chart-template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #f0d7c4;
  border-radius: 8px 3px 8px 3px;
  background: #fff;
}

.chart-template-card div > span,
.chart-template-card strong,
.chart-template-card small {
  display: block;
}

.chart-template-card div > span {
  color: #a95820;
  font-size: 8px;
}

.chart-template-card strong {
  margin: 2px 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chart-template-card small {
  color: var(--muted);
  font-size: 8px;
}

.chart-template-card button {
  min-height: 29px;
  padding: 0 8px;
  border-color: #efc8ac;
  color: #9b4d18;
  background: var(--orange-soft);
  font-size: 9px;
}

.chart-own-assets-heading {
  padding: 11px 14px 0;
}

.chart-asset-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 11px;
  overflow-y: auto;
}

.chart-asset-list-item {
  width: 100%;
  min-height: 65px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.chart-asset-list-item:hover {
  border-color: #d9e4f2;
  background: #f7faff;
}

.chart-asset-list-item.active {
  border-color: #bdd4f2;
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.chart-asset-type-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px 3px 8px 3px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #31a7da);
  font-size: 17px;
}

.chart-asset-list-item strong,
.chart-asset-list-item small {
  overflow: hidden;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chart-asset-list-item strong {
  color: var(--ink);
  font-size: 12px;
}

.chart-asset-list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.chart-asset-list-item em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
}

.chart-asset-list-item em small {
  display: block;
  margin-top: 3px;
  font-size: 7px;
  opacity: .72;
}

.chart-library-empty {
  display: grid;
  gap: 7px;
  padding: 24px 15px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.chart-library-empty strong {
  color: var(--ink);
}

.chart-asset-canvas {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.chart-canvas-empty,
.chart-loading {
  min-height: 520px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.chart-canvas-empty > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #cfdbe9;
  border-radius: 18px 6px 18px 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 25px;
}

.chart-canvas-empty h3,
.chart-canvas-empty p,
.chart-loading p {
  margin: 0;
}

.chart-canvas-empty h3 {
  margin-top: 5px;
  color: var(--ink);
  font-size: 17px;
}

.chart-canvas-empty.error > span {
  color: var(--red);
  border-color: #ebbbbb;
  background: var(--red-soft);
}

.chart-loading > span {
  width: 27px;
  height: 27px;
  border: 3px solid #d8e7f8;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: chart-spin .7s linear infinite;
}

@keyframes chart-spin {
  to { transform: rotate(360deg); }
}

.chart-canvas-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.chart-canvas-heading p,
.chart-canvas-heading h2,
.chart-canvas-heading span {
  margin: 0;
}

.chart-canvas-heading p {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chart-canvas-heading h2 {
  margin: 4px 0 3px;
  font-size: 19px;
}

.chart-canvas-heading span {
  color: var(--muted);
  font-size: 10px;
}

.chart-canvas-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.chart-canvas-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
}

.chart-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfe;
}

.chart-kpi-strip article {
  display: grid;
  gap: 3px;
  padding: 12px 18px;
  border-right: 1px solid var(--line-soft);
}

.chart-kpi-strip article:last-child {
  border-right: 0;
}

.chart-kpi-strip span {
  color: var(--muted);
  font-size: 10px;
}

.chart-kpi-strip strong {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.chart-visual-stage {
  min-height: 420px;
  display: grid;
  place-items: stretch;
  padding: 18px;
  background:
    linear-gradient(rgba(224, 230, 237, .28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 230, 237, .28) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
}

.chart-kpi-cards {
  min-height: 320px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: center;
  gap: 16px;
}

.chart-kpi-cards article {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid #dce6f2;
  border-radius: 14px 4px 14px 4px;
  background: linear-gradient(145deg, #f7fbff, #fff);
  text-align: center;
}

.chart-kpi-cards span,
.chart-kpi-cards small {
  color: var(--muted);
}

.chart-kpi-cards strong {
  color: var(--blue);
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 48px);
}

.chart-generic-table {
  width: 100%;
  max-height: 520px;
  overflow: auto;
}

.chart-series-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  padding: 6px;
}

.chart-series-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.chart-series-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.china-map-wrap {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  gap: 8px;
}

.china-tile-map {
  width: 100%;
  height: 100%;
  min-height: 360px;
  overflow: visible;
}

.province-tile polygon {
  fill: rgba(23, 111, 230, var(--tile-opacity));
  stroke: #fff;
  stroke-width: 2;
  transition: fill .18s ease, transform .18s ease;
}

.province-tile:hover polygon {
  fill: rgba(244, 122, 42, .8);
  transform: translateY(-2px);
}

.province-tile.interactive,
.city-marker.interactive,
.asset-bar-row.interactive,
.asset-pie-legend > .interactive,
.asset-line-chart g.interactive {
  cursor: pointer;
}

.province-tile.interactive:focus polygon,
.city-marker.interactive:focus circle,
.asset-line-chart g.interactive:focus circle {
  outline: none;
  stroke: var(--orange);
  stroke-width: 4;
}

.asset-bar-row.interactive:hover,
.asset-pie-legend > .interactive:hover {
  background: var(--orange-soft);
}

.province-tile text {
  fill: #29415f;
  font-size: 11px;
  font-weight: 650;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker circle {
  fill: rgba(244, 122, 42, .76);
  stroke: #fff;
  stroke-width: 2;
}

.city-marker text {
  fill: #8d3f12;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, .93);
}

.map-legend > span {
  width: 38px;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(23, 111, 230, .08), rgba(23, 111, 230, .9));
}

.map-legend small {
  flex: 1;
}

.map-legend strong {
  color: var(--text);
  font-size: 10px;
}

.asset-bar-chart {
  min-height: 390px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 8px 12px;
}

.asset-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(180px, 1fr) 70px;
  align-items: center;
  gap: 10px;
}

.asset-bar-row > span {
  overflow: hidden;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.asset-bar-row > div {
  height: 18px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(224, 230, 237, .65);
}

.asset-bar-row i {
  height: 100%;
  display: block;
  border-radius: 3px;
  background: var(--bar-color);
}

.asset-bar-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.asset-stacked-chart {
  min-height: 390px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 8px 12px;
}

.asset-stacked-row {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(180px, 1fr) 70px;
  align-items: center;
  gap: 10px;
}

.asset-stacked-row > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.asset-stacked-row > div {
  height: 20px;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(224, 230, 237, .65);
}

.asset-stacked-row > div i {
  height: 100%;
  background: var(--bar-color);
}

.asset-stacked-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.asset-stacked-row.interactive {
  cursor: pointer;
}

.asset-stacked-row.interactive:hover,
.asset-stacked-row.interactive:focus {
  background: var(--orange-soft);
  outline: none;
}

.asset-pie-layout {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(230px, .9fr) minmax(210px, 1fr);
  place-items: center;
  gap: 24px;
  padding: 22px;
}

.asset-pie {
  width: min(260px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.asset-pie > span {
  width: 48%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px rgba(29, 42, 69, .12);
  font-size: 20px;
  font-weight: 750;
}

.asset-pie.pie > span {
  width: auto;
  min-width: 70px;
  height: auto;
  aspect-ratio: auto;
  padding: 8px 12px;
  border-radius: 999px;
}

.asset-pie > span small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.asset-pie-legend {
  width: 100%;
  display: grid;
  gap: 7px;
}

.asset-pie-legend > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.asset-pie-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.asset-line-chart {
  min-width: 0;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.asset-line-chart svg {
  width: 100%;
  overflow: visible;
}

.asset-line-chart .axis-line {
  stroke: #cfd9e5;
  stroke-width: 1;
}

.asset-line-chart .trend-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.asset-line-chart .area-fill {
  opacity: .13;
}

.asset-line-chart circle {
  fill: #fff;
  stroke: var(--orange);
  stroke-width: 3;
}

.asset-line-chart text {
  fill: var(--muted);
  font-size: 10px;
  text-anchor: middle;
}

.asset-line-chart .value-label {
  fill: var(--ink);
  font-weight: 700;
}

.chart-data-table {
  border-top: 1px solid var(--line);
}

.chart-data-table > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 17px;
  background: #f8fafc;
}

.chart-data-table > header span {
  color: var(--muted);
  font-size: 10px;
}

.chart-data-table .bi-table-wrap {
  max-height: 260px;
  overflow: auto;
}

.chart-asset-assistant {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  overflow: hidden;
}

.chart-asset-assistant .status-tag {
  color: #96501e;
  border-color: #f1ccb1;
  background: var(--orange-soft);
}

.chart-ai-conversation {
  min-height: 260px;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  overflow-y: auto;
  background: #f7f9fc;
}

.chart-ai-message {
  align-self: flex-start;
  max-width: 92%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px 11px 11px 3px;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
  white-space: pre-wrap;
}

.chart-ai-message.user {
  align-self: flex-end;
  color: #fff;
  border-color: var(--blue);
  border-radius: 11px 11px 3px 11px;
  background: var(--blue);
}

.chart-ai-message.error {
  color: var(--red);
  border-color: #ebbbbb;
  background: var(--red-soft);
}

.chart-ai-message.followup {
  border-color: #efd2b9;
  color: #8f4a1d;
  background: var(--orange-soft);
}

.chart-template-dialog,
.chart-interaction-dialog {
  width: min(760px, calc(100vw - 32px));
}

.chart-template-dialog textarea {
  width: 100%;
  resize: vertical;
}

.chart-interaction-dialog > section {
  display: grid;
  gap: 14px;
}

.chart-interaction-dialog > section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chart-interaction-content .bi-table-wrap {
  max-height: 480px;
  overflow: auto;
}

.chart-ai-form {
  display: grid;
  gap: 9px;
  padding: 13px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chart-ai-form textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfe;
  line-height: 1.55;
}

.chart-ai-form textarea:focus {
  outline: 2px solid rgba(23, 111, 230, .16);
  border-color: var(--blue);
}

.chart-ai-form button {
  min-height: 39px;
}

.chart-asset-draft:empty {
  display: none;
}

.chart-draft-card {
  display: grid;
  gap: 9px;
  margin: 0 13px 13px;
  padding: 13px;
  border: 1px solid #f0c9aa;
  border-left: 3px solid var(--orange);
  border-radius: 5px;
  background: var(--orange-soft);
}

.chart-diagnostic-card {
  border-color: #b8d1ee;
  border-left-color: var(--blue);
  background: #f2f7fd;
}

.chart-diagnostic-card > p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.65;
}

.chart-draft-card > span {
  color: #9a531e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .09em;
}

.chart-draft-card h4 {
  margin: 0;
  font-size: 14px;
}

.chart-draft-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 11px;
  margin: 0;
}

.chart-draft-card dl > div {
  min-width: 0;
}

.chart-draft-card dt {
  color: var(--muted);
  font-size: 9px;
}

.chart-draft-card dd {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--text);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chart-draft-card button {
  min-height: 36px;
  margin-top: 2px;
}

/* Export center */
.export-center-page {
  max-width: 1480px;
  margin: 0 auto;
}

.export-center-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.export-center-heading-actions > span {
  color: var(--muted);
  font-size: 10px;
}

.export-summary-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.export-task-panel {
  overflow: hidden;
}

.export-job-list {
  display: grid;
}

.export-job-card {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(320px, 1.6fr) minmax(150px, .65fr);
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}

.export-job-card:first-child {
  border-top: 0;
}

.export-job-card:hover {
  background: #fbfcfe;
}

.export-job-identity,
.export-job-progress,
.export-job-actions {
  min-width: 0;
}

.export-job-title-line,
.export-progress-meta,
.export-job-timing,
.export-job-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.export-job-title-line strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.export-job-identity > p,
.export-job-timing,
.export-progress-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.export-job-progress > strong {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.export-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.export-progress-track > i {
  width: var(--export-progress);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #5d9cf0);
  transition: width .35s ease;
}

.export-job-card.status-completed .export-progress-track > i {
  background: #2c9a68;
}

.export-job-card.status-failed .export-progress-track > i,
.export-job-card.status-cancelled .export-progress-track > i {
  background: #c45c57;
}

.export-progress-meta {
  justify-content: space-between;
}

.export-job-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.export-job-actions button {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 10px;
}

.export-status-badge {
  flex: none;
  padding: 3px 7px;
  border: 1px solid #d6e0ec;
  border-radius: 999px;
  color: #52708f;
  background: #f5f8fc;
  font-size: 9px;
  font-weight: 700;
}

.export-status-badge.running,
.export-status-badge.queued {
  color: #2265b1;
  border-color: #bad2ed;
  background: #edf5ff;
}

.export-status-badge.completed {
  color: #287654;
  border-color: #b9decf;
  background: #eff9f5;
}

.export-status-badge.failed,
.export-status-badge.cancelled,
.export-status-badge.expired {
  color: #a34d49;
  border-color: #e7c5c3;
  background: #fff4f3;
}

.export-empty-state {
  padding: 54px 24px;
  color: var(--muted);
  text-align: center;
}

.export-estimate-dialog {
  width: min(680px, calc(100vw - 32px));
}

.export-estimate-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.export-estimate-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.export-estimate-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.export-estimate-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.export-estimate-summary .export-estimate-wide {
  grid-column: 1 / -1;
}

.export-sheet-selection-dialog {
  width: min(560px, calc(100vw - 32px));
  border-radius: 14px;
}

.export-sheet-selection-dialog form {
  gap: 12px;
  padding: 20px;
}

.export-sheet-selection-dialog header h2 {
  font-size: 19px;
}

.export-sheet-selection-dialog .dialog-description {
  font-size: 11px;
}

.export-sheet-selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f3;
}

.export-sheet-selection-actions button {
  width: auto;
  height: 27px;
  min-height: 0;
  padding: 0 9px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  color: #596472;
  background: #fff;
  font-size: 10px;
}

.export-sheet-selection-actions button:hover {
  border-color: #bcc6cf;
  background: #f7f8f9;
}

.export-sheet-selection-actions span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.export-sheet-selection-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: min(42vh, 310px);
  padding: 0 2px 0 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.export-sheet-selection-dialog .export-sheet-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #e4e7eb;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.export-sheet-selection-dialog .export-sheet-option:hover {
  border-color: #bcc6cf;
  background: #fafbfc;
}

.export-sheet-selection-dialog .export-sheet-option:has(input:checked) {
  border-color: #9bb5c4;
  background: #f4f8fa;
}

.export-sheet-selection-dialog .export-sheet-option input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.export-sheet-selection-dialog .export-sheet-option span {
  display: block;
  min-width: 0;
}

.export-sheet-selection-dialog .export-sheet-option strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-sheet-selection-dialog .inline-actions {
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
}

.export-sheet-selection-dialog .inline-actions button {
  min-width: 78px;
  height: 32px;
  min-height: 0;
}

@media (max-width: 1050px) {
  .export-job-card {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .export-job-actions {
    justify-content: flex-start;
  }

  .export-center-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .export-summary-grid,
  .export-estimate-summary {
    grid-template-columns: 1fr 1fr;
  }

  .export-sheet-selection-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) {
  .chart-assets-layout {
    grid-template-columns: 245px minmax(500px, 1fr) 300px;
  }

  .manual-input-card {
    grid-template-columns: 1fr;
  }

  .report-context {
    grid-template-columns: 1fr;
  }

  .report-toolbar {
    justify-self: stretch;
  }
}

@media (max-width: 1380px) {
  .chart-assets-layout {
    grid-template-columns: 235px minmax(480px, 1fr);
  }

  .chart-asset-assistant {
    grid-column: 1 / -1;
    grid-template-columns: minmax(300px, .8fr) minmax(400px, 1.2fr);
    grid-template-rows: auto auto;
  }

  .chart-asset-assistant > header {
    grid-column: 1 / -1;
  }

  .chart-ai-conversation {
    min-height: 230px;
    max-height: 330px;
  }

  .chart-ai-form {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .chart-asset-draft {
    grid-column: 2;
  }

  .people-management-page .summary-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .dashboard-kpis {
    grid-template-columns: repeat(4, minmax(125px, 1fr));
  }

  .dashboard-grid > article:nth-child(1) { grid-column: span 7; }
  .dashboard-grid > article:nth-child(2) { grid-column: span 5; }

  .query-grid,
  .grid-form {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .grid-form button {
    align-self: end;
  }
}

@media (max-width: 1120px) {
  .chart-assets-layout {
    grid-template-columns: 1fr;
  }

  .chart-asset-library,
  .chart-asset-assistant {
    grid-column: auto;
  }

  .chart-asset-list {
    max-height: 310px;
  }

  .chart-asset-assistant {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .chart-asset-assistant > header,
  .chart-asset-draft {
    grid-column: auto;
  }

  .chart-ai-form {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .manual-input-hero,
  .manual-upload-form,
  .architecture-upload-form {
    grid-template-columns: 1fr;
  }

  .manual-form-actions {
    justify-content: flex-start;
  }

  .manual-input-period {
    grid-template-columns: 1fr 1fr;
  }

  .manual-input-period button {
    grid-column: 1 / -1;
  }

  .manual-input-summary {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .app-sidebar {
    width: 208px;
    padding-inline: 12px;
  }

  .app-stage {
    grid-column: 2;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .dashboard-grid > article:nth-child(n) {
    grid-column: span 6;
  }

  .dashboard-grid > article:nth-child(3) {
    grid-column: 1 / -1;
  }

  .explore-shell {
    grid-template-columns: 210px minmax(430px, 1fr);
  }

  .edit-layout,
  .template-management-layout,
  .utility-grid {
    grid-template-columns: 1fr;
  }

  .template-catalog-panel {
    position: static;
  }

  .template-management-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    font-size: 14px;
    background: var(--page);
  }

  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 12px;
    padding: 15px 14px;
  }

  .brand {
    padding: 0;
  }

  .app-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(136px, max-content);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-group-label {
    display: none;
  }

  .app-nav [data-tab] {
    min-height: 44px;
  }

  .app-nav [data-tab].active::after {
    right: 10px;
  }

  .workbench-nav-group {
    width: min(320px, 82vw);
  }

  .sidebar-reports {
    margin: 4px 0 0 14px;
    padding: 8px 0 2px 9px;
  }

  .report-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 78vw);
    overflow-x: auto;
  }

  .sidebar-account {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .account-identity {
    display: none;
  }

  .app-stage {
    min-width: 0;
  }

  .app-topbar {
    position: sticky;
    min-height: 68px;
    padding: 10px 14px;
  }

  .topbar-heading p,
  .status-pill,
  #importButton {
    display: none;
  }

  .topbar-heading h1 {
    font-size: 20px;
  }

  .app-content {
    padding: 16px 12px 34px;
  }

  .report-context,
  .report-toolbar,
  .mode-bar,
  .utility-heading,
  .edit-ribbon,
  .personal-chat-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-toolbar,
  .grid-form,
  .query-grid,
  .summary-grid,
  .template-sheet-grid,
  .person-form-grid {
    grid-template-columns: 1fr;
  }

  .report-toolbar button,
  .mode-actions button,
  .utility-heading button,
  .grid-form button,
  .chat-form button,
  .personal-chat-actions button {
    min-height: 44px;
    width: 100%;
  }

  .custom-date-range,
  .mode-actions,
  .edit-ribbon-actions,
  .personal-chat-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mode-switcher {
    grid-auto-flow: row;
  }

  .mode-switcher button {
    min-height: 44px;
  }

  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .kpi-card.primary-kpi {
    grid-column: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > article:nth-child(n) {
    grid-column: auto;
  }

  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .distribution-chart,
  .alert-list {
    min-height: 240px;
    padding: 14px;
  }

  .bar-row,
  .explore-chart .bar-row {
    grid-template-columns: 82px minmax(80px, 1fr) 58px;
    gap: 7px;
  }

  .explore-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .explore-metrics {
    max-height: 300px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .explore-status-strip {
    grid-template-columns: 1fr;
  }

  .explore-status-strip section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .edit-layout,
  .template-management-layout,
  .utility-grid {
    grid-template-columns: 1fr;
  }

  .template-management-list {
    grid-template-columns: 1fr;
  }

  .side-drawer {
    width: 100%;
  }

  .report-dialog,
  .template-version-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .report-dialog form {
    padding: 20px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 270px;
    padding: 28px;
  }

  .auth-brand-panel::before {
    inset: 12px;
  }

  .auth-brand-copy h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .auth-form-panel {
    padding: 20px 12px 30px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .chat-form,
  .personal-chat-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .personal-chat-actions select {
    width: 100%;
    min-width: 0;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

/* Strategic reports: web-first editorial layout, compact enough for operations screens. */
.strategic-report-heading {
  align-items: flex-end;
}

.strategic-report-heading > div:first-child > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.strategic-analysis-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f6f8;
}

.strategic-analysis-switch button {
  display: grid;
  gap: 3px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.strategic-analysis-switch button strong {
  color: var(--ink);
  font-size: 12px;
}

.strategic-analysis-switch button span {
  font-size: 9px;
}

.strategic-analysis-switch button.active {
  border-color: #efc5a7;
  background: #fff;
  box-shadow: 0 4px 14px rgb(42 55 68 / 7%);
}

.strategic-analysis-switch button.active strong {
  color: var(--orange);
}

.strategic-report-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.strategic-report-actions label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.strategic-report-actions input,
.strategic-report-actions select,
.strategic-report-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.strategic-report-actions button.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.strategic-report-page .summary-grid article small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.strategic-report-layout {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}

.strategic-report-catalog {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

.strategic-report-catalog .panel-heading {
  padding: 16px;
}

.strategic-report-list {
  max-height: calc(100vh - 235px);
  overflow-y: auto;
  padding: 7px;
  scrollbar-gutter: stable;
}

.strategic-report-list-item {
  width: 100%;
  display: grid;
  gap: 6px;
  margin: 0 0 5px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.strategic-report-list-item:hover {
  background: #f7f9fc;
}

.strategic-report-list-item.active {
  border-color: #efc5a7;
  background: linear-gradient(135deg, var(--orange-soft), #fff);
}

.strategic-report-list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strategic-report-list-top b {
  color: var(--ink);
  font-size: 13px;
}

.strategic-report-list-top i {
  border-radius: 999px;
  background: #e9eef4;
  color: #607086;
  padding: 2px 7px;
  font-size: 10px;
  font-style: normal;
}

.strategic-report-list-item > strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.strategic-report-list-item > small,
.strategic-report-list-empty span {
  color: var(--muted);
  font-size: 10px;
}

.strategic-report-list-empty,
.strategic-report-empty,
.strategic-report-loading {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.strategic-report-empty > span {
  color: var(--orange);
  font-size: 28px;
}

.strategic-report-document {
  overflow: hidden;
}

.strategic-document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff 40%, #fff8f3 100%);
}

.strategic-document-header p,
.strategic-document-header h2 {
  margin: 0;
}

.strategic-document-header p {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.strategic-document-header h2 {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.3;
}

.strategic-document-header span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.strategic-document-header button {
  flex: none;
  min-height: 38px;
}

.strategic-metadata {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 26px 0;
}

.strategic-metadata span {
  border-radius: 999px;
  background: #f0f3f7;
  color: #5c697b;
  padding: 5px 9px;
  font-size: 10px;
}

.strategic-executive {
  margin: 18px 26px 4px;
  padding: 17px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: #fff8f3;
}

.strategic-executive span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.strategic-executive p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.75;
}

.strategic-executive small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font: 10px var(--mono);
}

.strategic-management-snapshot {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 26px 20px;
}

.strategic-management-snapshot article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.strategic-management-snapshot span,
.strategic-management-snapshot small {
  color: var(--muted);
  font-size: 10px;
}

.strategic-management-snapshot strong {
  color: var(--ink);
  font-size: 19px;
}

.strategic-management-snapshot article.good {
  border-color: #bdd7c3;
  background: linear-gradient(150deg, #fff, #f0f8f2);
}

.strategic-management-snapshot article.watch {
  border-color: #ead1a9;
  background: linear-gradient(150deg, #fff, #fff8ec);
}

.strategic-management-snapshot article.risk {
  border-color: #e6b7bd;
  background: linear-gradient(150deg, #fff, #fff2f3);
}

.strategic-management-snapshot b.up { color: var(--green); }
.strategic-management-snapshot b.down { color: var(--red); }
.strategic-management-snapshot b.flat { color: #607086; }
.strategic-management-snapshot b.unavailable { color: #9aa5b1; }

.strategic-report-document > section:not(.strategic-executive) {
  padding: 20px 26px;
  border-top: 1px solid var(--line-soft);
}

.strategic-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.strategic-section-title > span {
  color: #bcc5d0;
  font: 700 12px var(--mono);
}

.strategic-section-title h3,
.strategic-section-title p {
  margin: 0;
}

.strategic-section-title h3 {
  font-size: 16px;
}

.strategic-section-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.strategic-section-title > b {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
}

.strategic-section-title > b.valid {
  background: var(--green-soft);
  color: var(--green);
}

.strategic-section-title > b.attention {
  background: var(--red-soft);
  color: var(--red);
}

.strategic-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.strategic-table-wrap table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.strategic-table-wrap.compact table {
  min-width: 520px;
}

.strategic-table-wrap th,
.strategic-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.strategic-table-wrap th {
  background: #f3f6f9;
  color: #536176;
  font-size: 10px;
}

.strategic-table-wrap th:first-child,
.strategic-table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
}

.strategic-table-wrap th:first-child {
  background: #f3f6f9;
}

.strategic-gap-table td:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.strategic-status-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: 700;
}

.strategic-status-chip.good {
  background: var(--green-soft);
  color: var(--green);
}

.strategic-status-chip.watch {
  background: #fff3df;
  color: #9a6726;
}

.strategic-status-chip.risk {
  background: var(--red-soft);
  color: var(--red);
}

.strategic-status-chip.unavailable {
  background: #f0f3f7;
  color: #667487;
}

.strategic-decision-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: #fff7f0;
  color: #5e4a3c;
  line-height: 1.6;
}

.strategic-bottleneck {
  margin-top: 10px;
  color: var(--text);
}

.strategic-drill-grid {
  display: grid;
  gap: 12px;
}

.strategic-drill-grid > article > h4,
.strategic-drill-grid > article > p {
  margin: 0;
}

.strategic-drill-grid > article > h4 {
  font-size: 13px;
}

.strategic-drill-grid > article > p {
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 10px;
}

.strategic-findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strategic-findings article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.strategic-findings header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.strategic-findings header span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}

.strategic-findings h4 {
  margin: 4px 0 9px;
  font-size: 14px;
}

.strategic-findings header b {
  height: fit-content;
  border-radius: 999px;
  background: #f0f3f7;
  color: #667487;
  padding: 3px 7px;
  font-size: 9px;
}

.strategic-findings p {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  margin: 7px 0;
  color: var(--text);
  line-height: 1.65;
}

.strategic-findings p strong {
  color: var(--muted);
  font-size: 10px;
}

.strategic-findings p.recommendation {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.strategic-findings p.strategic-decision {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff5ec;
}

.strategic-findings p.strategic-verification {
  color: #526170;
}

.strategic-action-contract {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.strategic-action-contract span {
  border: 1px solid #dce3ea;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f7f9fb;
  color: #5f6e7c;
  font-size: 9px;
  font-weight: 700;
}

.strategic-findings footer {
  color: var(--muted);
  font: 10px var(--mono);
}

.strategic-warning-list,
.strategic-limit-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.8;
}

.strategic-ok {
  margin: 0;
  color: var(--green);
}

.strategic-recording-warning,
.strategic-management-gap {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  line-height: 1.6;
}

.strategic-recording-warning {
  border: 1px solid #efd5a9;
  background: #fff9ee;
  color: #806437;
}

.strategic-recording-warning strong {
  color: #a1671e;
}

.strategic-management-gap {
  border: 1px solid #e3e7eb;
  background: #f7f8fa;
  color: #687582;
}

.strategic-subsection,
.strategic-execution-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.strategic-subsection h4,
.strategic-execution-grid h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.strategic-section-note {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.strategic-section-note.warning {
  padding: 10px 12px;
  border-left: 3px solid #d79a40;
  border-radius: 0 8px 8px 0;
  background: #fff9ef;
  color: #765d37;
}

.strategic-review-chip {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff0e8;
  color: #b95825;
  font-size: 9px;
}

.strategic-review-chip.ok {
  background: var(--green-soft);
  color: var(--green);
}

.strategic-ignored-anomalies {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #d9e4ec;
  border-radius: 10px;
  background: #f5f9fc;
  color: #536176;
}

.strategic-ignored-anomalies strong {
  color: #356a83;
}

.strategic-ignored-anomalies details,
.strategic-findings details,
.strategic-data-details {
  margin-top: 7px;
}

.strategic-ignored-anomalies summary,
.strategic-findings summary,
.strategic-data-details > summary {
  width: fit-content;
  cursor: pointer;
  color: #607086;
  font-size: 11px;
  font-weight: 700;
}

.strategic-ignored-anomalies ul {
  margin: 7px 0 0;
  padding-left: 20px;
}

.strategic-change-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.strategic-change-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(150deg, #fff, #f7f9fb);
}

.strategic-change-grid span,
.strategic-change-grid small {
  color: var(--muted);
  font-size: 10px;
}

.strategic-change-grid strong {
  color: var(--ink);
  font: 700 21px var(--mono);
}

.strategic-change-grid small b {
  margin-left: 4px;
  font: 700 10px var(--mono);
}

.strategic-change-grid b.up { color: var(--green); }
.strategic-change-grid b.down { color: var(--red); }
.strategic-change-grid b.flat { color: #607086; }
.strategic-change-grid b.unavailable { color: #9aa5b1; }

.strategic-chart-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strategic-chart-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.strategic-chart-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.strategic-chart-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.strategic-chart-card svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.strategic-chart-grid {
  stroke: #e8edf2;
  stroke-width: 1;
}

.strategic-chart-axis {
  fill: #7a8793;
  font: 10px var(--mono);
}

.strategic-chart-axis-label {
  fill: #5c697b;
  font: 600 10px var(--sans);
}

.strategic-chart-axis-right {
  fill: #5f7f69;
}

.strategic-brief-chart-note {
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.strategic-chart-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 9px;
}

.strategic-chart-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.strategic-chart-legend i {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: var(--series-color);
}

.strategic-chart-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.strategic-brief-page {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 520px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.strategic-brief-page::after {
  position: absolute;
  right: 26px;
  bottom: 14px;
  color: #c3cbd4;
  content: "PAGE " attr(data-brief-page) " / 03";
  font: 700 9px var(--mono);
  letter-spacing: .12em;
}

.additional-value-section::after {
  content: "PAGE " attr(data-brief-page) " / 02";
}

.additional-value-section {
  min-height: 0;
}

.additional-value-snapshot {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.additional-value-table th,
.additional-value-table td {
  white-space: nowrap;
}

.additional-value-table td small {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: 8px;
}

.additional-value-rank {
  display: inline-block;
  min-width: 48px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1e8;
  color: var(--orange);
  font-size: 9px;
  text-align: center;
}

.additional-value-diagnoses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.additional-value-diagnoses article {
  padding: 10px 12px;
  border-left: 3px solid #7895a7;
  border-radius: 0 8px 8px 0;
  background: #f3f7f9;
}

.additional-value-diagnoses article.attention {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.additional-value-diagnoses span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.additional-value-diagnoses p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.55;
}

.additional-value-diagnoses article.attention p,
.additional-value-diagnoses article.attention span,
.additional-value-table .attention-text {
  color: var(--red);
}

.additional-value-methodology {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f4f6f8;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.strategic-brief-page .strategic-section-title {
  margin-bottom: 0;
}

.strategic-brief-executive {
  margin: 0;
}

.strategic-brief-executive > span,
.strategic-executive-points {
  font-size: 9pt;
}

.strategic-executive-points {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.5;
}

.strategic-executive-points li {
  padding-left: 2px;
}

.strategic-executive-points li.attention,
.strategic-management-snapshot .attention-text,
.strategic-brief-bar-row b.attention {
  color: var(--red);
}

.strategic-decision-note.attention,
.strategic-bottleneck.attention,
.strategic-section-note.attention {
  border-left-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.strategic-bottleneck.attention,
.strategic-section-note.attention {
  padding: 8px 10px;
  border-left: 3px solid var(--red);
  border-radius: 0 7px 7px 0;
}

.strategic-brief-actions header b.attention {
  background: var(--red-soft);
  color: var(--red);
}

.strategic-brief-snapshot {
  margin: 0;
}

.strategic-brief-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.strategic-brief-chart {
  min-height: 310px;
  box-shadow: 0 8px 22px rgb(42 55 68 / 5%);
}

.strategic-brief-bar-chart {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.strategic-brief-bar-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.strategic-brief-bar-row > strong {
  overflow: hidden;
  color: #455565;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategic-brief-bar-row > div {
  display: grid;
  gap: 4px;
}

.strategic-brief-bar-row span {
  display: grid;
  grid-template-columns: 62px minmax(80px, 1fr) 54px;
  align-items: center;
  gap: 7px;
}

.strategic-brief-bar-row small,
.strategic-brief-bar-row b {
  color: var(--muted);
  font: 9px var(--mono);
}

.strategic-brief-bar-row b {
  color: #455565;
  text-align: right;
}

.strategic-brief-bar-row span > i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}

.strategic-brief-bar-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--series-color);
}

.strategic-brief-special {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.strategic-brief-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 20px;
}

.strategic-brief-actions article {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.strategic-brief-actions header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.strategic-brief-actions header span,
.strategic-brief-actions header b {
  color: var(--orange);
  font-size: 9px;
}

.strategic-brief-actions header b {
  border-radius: 999px;
  background: #fff1e8;
  padding: 3px 6px;
}

.strategic-brief-actions h4 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategic-brief-actions p {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  margin: 8px 0;
  color: var(--text);
  font-size: 10px;
  line-height: 1.55;
}

.strategic-brief-actions p strong {
  color: var(--muted);
  font-size: 9px;
}

.strategic-brief-actions p.strategic-decision {
  padding: 7px;
  border-radius: 7px;
  background: #fff6ef;
}

.strategic-brief-actions footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.strategic-brief-actions footer span {
  border-radius: 999px;
  background: #f2f5f8;
  padding: 3px 6px;
  color: #607086;
  font-size: 8px;
}

.strategic-pace-chart {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.strategic-pace-row {
  display: grid;
  grid-template-columns: 112px minmax(180px, 1fr) 68px;
  align-items: center;
  gap: 10px;
}

.strategic-pace-row > strong {
  overflow: hidden;
  color: #455565;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategic-pace-row > b {
  color: #455565;
  font: 700 11px var(--mono);
  text-align: right;
}

.strategic-pace-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}

.strategic-pace-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.strategic-pace-track > span.good { background: #6b8e72; }
.strategic-pace-track > span.watch { background: #d19a5a; }
.strategic-pace-track > span.risk { background: #d57b7b; }

.strategic-pace-track .target-line {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 66.6667%;
  width: 2px;
  background: #ad384a;
}

.strategic-data-details {
  padding-top: 4px;
}

.strategic-data-details[open] > summary {
  margin-bottom: 10px;
}

.strategic-funnel-chart,
.strategic-structure-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.strategic-funnel-chart article,
.strategic-structure-chart article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.strategic-funnel-chart header,
.strategic-structure-chart header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.strategic-funnel-chart header strong,
.strategic-structure-chart header strong {
  color: var(--ink);
  font-size: 12px;
}

.strategic-funnel-chart header b,
.strategic-structure-chart header b {
  color: var(--orange);
  font: 700 12px var(--mono);
}

.strategic-funnel-chart article > div,
.strategic-structure-chart article > div {
  display: grid;
  grid-template-columns: 50px minmax(80px, 1fr) 58px;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.strategic-funnel-chart div > span,
.strategic-structure-chart div > span,
.strategic-funnel-chart div > small,
.strategic-structure-chart div > small {
  color: var(--muted);
  font-size: 9px;
}

.strategic-funnel-chart div > small,
.strategic-structure-chart div > small {
  font-family: var(--mono);
  text-align: right;
}

.strategic-funnel-chart div > i,
.strategic-structure-chart div > i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}

.strategic-funnel-chart em,
.strategic-structure-chart em {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.strategic-funnel-chart em.current,
.strategic-structure-chart em.current { background: var(--orange); }
.strategic-funnel-chart em.previous,
.strategic-structure-chart em.previous { background: #7693a5; }
.strategic-funnel-chart em.baseline,
.strategic-structure-chart em.baseline { background: #b8c2ca; }

.strategic-findings details {
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.strategic-findings details p {
  margin-bottom: 5px;
}

@media (max-width: 1320px) {
  .strategic-report-layout {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .strategic-findings {
    grid-template-columns: 1fr;
  }

  .strategic-change-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .strategic-management-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategic-brief-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .strategic-report-layout {
    grid-template-columns: 1fr;
  }

  .strategic-report-catalog {
    position: static;
    max-height: none;
  }

  .strategic-report-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
  }

  .strategic-document-header {
    flex-wrap: wrap;
  }

  .strategic-chart-grid-layout {
    grid-template-columns: 1fr;
  }

  .strategic-brief-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .strategic-analysis-switch,
  .additional-value-diagnoses {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .additional-value-snapshot {
    grid-template-columns: 1fr;
  }

  .strategic-report-list {
    grid-template-columns: 1fr;
  }

  .strategic-report-actions,
  .strategic-report-actions label,
  .strategic-report-actions input,
  .strategic-report-actions select,
  .strategic-report-actions button {
    width: 100%;
  }

  .strategic-document-header,
  .strategic-report-document > section:not(.strategic-executive) {
    padding-left: 16px;
    padding-right: 16px;
  }

  .strategic-executive {
    margin-left: 16px;
    margin-right: 16px;
  }

  .strategic-management-snapshot {
    grid-template-columns: 1fr;
    margin-left: 16px;
    margin-right: 16px;
  }

  .strategic-change-grid,
  .strategic-funnel-chart,
  .strategic-structure-chart {
    grid-template-columns: 1fr;
  }

  .strategic-brief-bar-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .strategic-pace-row {
    grid-template-columns: 90px minmax(120px, 1fr) 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.feedback-hub {
  display: grid;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.feedback-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff 0%, #f4f7fa 62%, #eef3f6 100%);
  box-shadow: 0 18px 45px rgba(25, 40, 55, .07);
}

.feedback-hero p,
.feedback-detail-panel > header p,
.feedback-history-card > header p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.feedback-hero h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 36px); }
.feedback-hero > div > span { color: var(--muted); font-size: 14px; }
.feedback-account-note {
  min-width: 210px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}
.feedback-account-note span,
.feedback-account-note strong { display: block; }
.feedback-account-note span { color: var(--muted); font-size: 11px; }
.feedback-account-note strong { margin-top: 5px; font-size: 14px; }

.feedback-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feedback-choice-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 180px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 14px 34px rgba(25, 40, 55, .06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feedback-choice-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(25, 40, 55, .1); }
.feedback-choice-card.issue:hover { border-color: #c56c34; }
.feedback-choice-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #fff;
  background: var(--accent);
  font-size: 23px;
  font-weight: 800;
}
.feedback-choice-card.issue .feedback-choice-icon { background: #c56c34; }
.feedback-choice-card.record:hover { border-color: #3d8a6f; }
.feedback-choice-card.record .feedback-choice-icon { background: #3d8a6f; }
.feedback-choice-card p { margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.feedback-choice-card h3 { margin: 0 0 8px; font-size: 23px; }
.feedback-choice-card div > span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.feedback-choice-card i { color: var(--accent); font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.feedback-choice-card.issue i { color: #b65d29; }
.feedback-choice-card.record i { color: #31745d; }

.feedback-detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 40, 55, .06);
}
.feedback-detail-panel > header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.feedback-detail-panel > header button,
.feedback-history-card > header button {
  border: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 700;
}
.feedback-detail-panel > header h3,
.feedback-history-card > header h4 { margin: 0; }
.survey-embed-panel iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 720px; border: 0; background: #f3f5f7; }

.issue-feedback-form { display: grid; max-width: 860px; gap: 18px; padding: 28px; margin: 0 auto; }
.issue-feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.issue-feedback-form label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.issue-feedback-form select,
.issue-feedback-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.issue-feedback-form select { min-height: 44px; padding: 0 12px; }
.issue-feedback-form textarea { resize: vertical; padding: 12px; line-height: 1.7; }
.issue-feedback-form select:focus,
.issue-feedback-form textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(31, 104, 122, .1); }
.feedback-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.feedback-form-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.feedback-form-footer p.success { color: #27765d; }
.feedback-form-footer p.error,
.feedback-empty.error { color: #b34b4b; }

.feedback-attachment-field { display: grid; gap: 9px; }
.feedback-attachment-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.feedback-attachment-heading span { color: var(--ink); font-size: 13px; font-weight: 700; }
.feedback-attachment-heading small { color: var(--muted); font-size: 10px; font-weight: 500; }
.feedback-attachment-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px dashed #b9c9ce;
  border-radius: 11px;
  background: #f8fbfc;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.feedback-attachment-dropzone.dragging {
  border-color: var(--accent);
  background: rgba(31, 104, 122, .07);
  box-shadow: 0 0 0 3px rgba(31, 104, 122, .08);
}
.feedback-attachment-dropzone button {
  width: auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(31, 104, 122, .24);
  border-radius: 8px;
  color: var(--accent);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.feedback-attachment-dropzone > span { color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }
.feedback-attachment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feedback-attachment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.feedback-attachment-item img,
.feedback-attachment-file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  object-fit: cover;
  color: var(--accent);
  background: rgba(31, 104, 122, .09);
  font-size: 9px;
  font-weight: 800;
}
.feedback-attachment-item > div { display: grid; min-width: 0; gap: 3px; }
.feedback-attachment-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.feedback-attachment-item small { color: var(--muted); font-size: 10px; }
.feedback-attachment-item > button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 17px;
}
.feedback-attachment-item > button:hover { color: #b34b4b; background: #fff1f1; }

.feedback-record-panel > header > div { flex: 1; }
.feedback-record-panel > header > div > span { color: var(--muted); font-size: 11px; }
.feedback-record-refresh { margin-left: auto; white-space: nowrap; }
.feedback-history-list { display: grid; gap: 14px; }
.feedback-record-list { min-height: 280px; max-height: calc(100vh - 300px); padding: 18px; overflow: auto; background: #f7f9fa; }
.feedback-history-item { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-left: 4px solid #c4ced2; border-radius: 14px; background: #fff; }
.feedback-history-item.status-open { border-left-color: #d7674f; }
.feedback-history-item.status-processing { border-left-color: #d5a135; }
.feedback-history-item.status-resolved { border-left-color: #3d8a6f; }
.feedback-history-item > header,
.feedback-history-item > header > div,
.feedback-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-history-item > header > div { justify-content: flex-start; flex-wrap: wrap; }
.feedback-history-category { font-weight: 800; }
.feedback-history-item code { color: var(--muted); font-size: 10px; }
.feedback-history-status { padding: 4px 9px; border-radius: 999px; color: #a14437; background: #fff0ed; font-size: 11px; font-weight: 750; }
.feedback-history-item.status-processing .feedback-history-status { color: #8a661e; background: #fff6df; }
.feedback-history-item.status-resolved .feedback-history-status { color: #287057; background: #e9f6f0; }
.feedback-history-item.status-closed .feedback-history-status { color: #667282; background: #eef1f3; }
.feedback-history-meta { justify-content: flex-start; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.feedback-history-description { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.feedback-history-item .feedback-history-attachments { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.feedback-history-attachments a {
  overflow: hidden;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--accent);
  background: rgba(31, 104, 122, .08);
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-history-attachments a:hover { background: rgba(31, 104, 122, .14); }
.feedback-progress { padding-top: 12px; border-top: 1px solid var(--line); }
.feedback-progress h5 { margin: 0 0 12px; font-size: 12px; }
.feedback-progress-timeline { display: grid; }
.feedback-progress-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding-bottom: 14px; }
.feedback-progress-item:last-child { padding-bottom: 0; }
.feedback-progress-item::before { content: ""; position: absolute; top: 15px; bottom: 0; left: 5px; width: 1px; background: #d9e2e5; }
.feedback-progress-item:last-child::before { display: none; }
.feedback-progress-item > i { z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #c7d3d7; border-radius: 50%; background: #fff; }
.feedback-progress-item.submitted > i { border-color: var(--accent); }
.feedback-progress-item > div { display: grid; gap: 4px; }
.feedback-progress-item header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-progress-item strong { font-size: 11px; }
.feedback-progress-item time,
.feedback-progress-item small { color: var(--muted); font-size: 9px; }
.feedback-progress-item p { margin: 0; color: #536171; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.feedback-empty { margin: 0; padding: 24px 8px; color: var(--muted); text-align: center; }

.feedback-admin-page { display: grid; gap: 18px; }
.feedback-admin-heading { align-items: flex-end; }
.feedback-admin-heading > div:last-child { display: flex; align-items: center; gap: 12px; }
.feedback-admin-heading > div:last-child span { color: var(--muted); font-size: 12px; }
.feedback-admin-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #eef3f4;
}
.feedback-admin-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}
.feedback-admin-tabs button.active { color: var(--accent); background: #fff; box-shadow: 0 3px 10px rgba(25, 40, 55, .08); }
.feedback-admin-tabs button span { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: rgba(31, 104, 122, .09); font-size: 10px; text-align: center; }
.feedback-admin-panel { display: grid; gap: 18px; }
.feedback-admin-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.feedback-admin-summary .summary-card { min-height: 112px; }
.feedback-admin-content { overflow: hidden; }
.feedback-admin-toolbar { align-items: flex-end; }
.feedback-admin-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.feedback-admin-filters select { min-width: 135px; min-height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 11px; }
.feedback-admin-table { max-height: 620px; overflow: auto; }
.feedback-admin-table table { min-width: 1080px; }
.feedback-admin-table td { vertical-align: top; }
.feedback-admin-table button { width: auto; min-height: 30px; padding: 0 10px; border: 1px solid rgba(31, 104, 122, .2); border-radius: 7px; color: var(--accent); background: #fff; font-size: 11px; font-weight: 700; }
.feedback-admin-problem { overflow: hidden; max-width: 300px; text-overflow: ellipsis; white-space: nowrap; }
.feedback-admin-empty { padding: 48px 20px; color: var(--muted); text-align: center; }
.feedback-admin-issue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; background: #f7f9fa; }
.feedback-admin-issue { display: grid; gap: 11px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #c4ced2; border-radius: 12px; background: #fff; }
.feedback-admin-issue.status-open { border-left-color: #d7674f; }
.feedback-admin-issue.status-processing { border-left-color: #d5a135; }
.feedback-admin-issue.status-resolved { border-left-color: #3d8a6f; }
.feedback-admin-issue > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feedback-admin-issue > header > div { display: grid; gap: 5px; }
.feedback-admin-issue > header strong { font-size: 13px; }
.feedback-admin-issue time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.feedback-admin-category { width: fit-content; padding: 3px 7px; border-radius: 6px; color: var(--accent); background: rgba(31, 104, 122, .08); font-size: 10px; font-weight: 750; }
.feedback-admin-issue > p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.feedback-admin-issue-meta { display: flex; align-items: center; gap: 7px 14px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.feedback-admin-issue-meta code { margin-left: auto; }
.feedback-admin-attachments { display: flex; gap: 6px; flex-wrap: wrap; }
.feedback-admin-attachments a { padding: 5px 8px; border-radius: 7px; color: var(--accent); background: rgba(31, 104, 122, .08); font-size: 10px; text-decoration: none; }
.feedback-admin-progress { display: grid; gap: 7px; padding: 10px 12px; border-radius: 9px; background: #f7f9fa; }
.feedback-admin-progress > h4 { margin: 0; font-size: 10px; }
.feedback-admin-progress article { padding-top: 7px; border-top: 1px solid var(--line); }
.feedback-admin-progress article header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-admin-progress article strong { font-size: 10px; }
.feedback-admin-progress article p { margin: 4px 0; color: #536171; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.feedback-admin-progress article small { color: var(--muted); font-size: 9px; }
.feedback-admin-handle { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: end; gap: 10px; padding-top: 11px; border-top: 1px solid var(--line); }
.feedback-admin-handle label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 650; }
.feedback-admin-handle select,
.feedback-admin-handle textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; }
.feedback-admin-handle select { min-height: 36px; padding: 0 28px 0 9px; }
.feedback-admin-handle textarea { min-height: 58px; padding: 8px; resize: vertical; line-height: 1.5; }
.feedback-admin-handle button { width: auto; min-height: 36px; padding: 0 13px; white-space: nowrap; }
.feedback-admin-dialog { width: min(820px, calc(100vw - 32px)); max-height: 86vh; padding: 0; overflow: hidden; }
.feedback-admin-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.feedback-admin-dialog > header p,
.feedback-admin-dialog > header h2 { margin: 0; }
.feedback-admin-dialog > header p { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.feedback-admin-dialog-meta { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 12px 22px; color: var(--muted); background: #f7f9fa; font-size: 11px; }
.feedback-admin-dialog-meta code { margin-left: auto; }
.feedback-admin-dialog-content { display: grid; gap: 10px; max-height: calc(86vh - 140px); padding: 18px 22px 24px; overflow: auto; }
.feedback-admin-dialog-content article { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.feedback-admin-dialog-content article span { color: var(--accent); font-size: 9px; font-weight: 750; }
.feedback-admin-dialog-content article strong { font-size: 12px; }
.feedback-admin-dialog-content article p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }

@media (max-width: 980px) {
  .feedback-choice-grid { grid-template-columns: 1fr; }
  .survey-embed-panel iframe { height: 900px; }
  .feedback-admin-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feedback-admin-issue-list { grid-template-columns: 1fr; }
  .feedback-admin-handle { grid-template-columns: 130px minmax(0, 1fr); }
  .feedback-admin-handle button { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 640px) {
  .feedback-hero { align-items: stretch; flex-direction: column; padding: 22px; }
  .feedback-account-note { min-width: 0; }
  .feedback-choice-card { grid-template-columns: 46px 1fr; padding: 20px; }
  .feedback-choice-card i { grid-column: 2; }
  .feedback-choice-icon { width: 46px; height: 46px; }
  .issue-feedback-grid { grid-template-columns: 1fr; }
  .feedback-attachment-dropzone { align-items: flex-start; flex-direction: column; }
  .feedback-attachment-dropzone > span { text-align: left; }
  .feedback-attachment-list { grid-template-columns: 1fr; }
  .feedback-admin-heading { align-items: stretch; }
  .feedback-admin-heading > div:last-child { align-items: stretch; flex-direction: column; }
  .feedback-admin-tabs { width: 100%; }
  .feedback-admin-tabs button { flex: 1; justify-content: center; }
  .feedback-admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedback-admin-toolbar { align-items: stretch; }
  .feedback-admin-filters { justify-content: stretch; }
  .feedback-admin-filters select { flex: 1 1 100%; }
  .feedback-admin-handle { grid-template-columns: 1fr; }
  .feedback-admin-handle button { grid-column: auto; width: 100%; }
  .feedback-admin-dialog-meta code { width: 100%; margin-left: 0; }
  .feedback-form-footer { align-items: stretch; flex-direction: column; }
  .feedback-form-footer button { width: 100%; }
}

/* System usage analytics */
.usage-analytics-page { display: grid; gap: 18px; }
.usage-analytics-heading { align-items: flex-end; }
.usage-period-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.usage-period-controls select,
.usage-period-controls input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.usage-period-controls select { min-width: 150px; padding: 0 34px 0 12px; }
.usage-period-controls input { padding: 0 10px; }
.usage-tracking-note {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid rgba(31, 104, 122, .2);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 104, 122, .07), rgba(255, 255, 255, .9));
}
.usage-tracking-note div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.usage-tracking-note strong { color: var(--ink); font-size: 14px; }
.usage-tracking-note span,
.usage-tracking-note p,
.usage-tracking-note small { color: var(--muted); }
.usage-tracking-note p { margin: 0; font-size: 12px; line-height: 1.65; }
.usage-tracking-note small { font-size: 11px; }
.usage-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.usage-summary-grid .summary-card { min-height: 116px; }
.usage-quality-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 18px; }
.usage-quality-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.usage-quality-cards > div { display: grid; gap: 6px; min-width: 0; padding: 17px 15px; border-right: 1px solid var(--line); }
.usage-quality-cards > div:last-child { border-right: 0; }
.usage-quality-cards span,
.usage-quality-cards small { color: var(--muted); }
.usage-quality-cards span { font-size: 11px; font-weight: 700; }
.usage-quality-cards strong { color: var(--ink); font-size: 18px; }
.usage-quality-cards small { font-size: 10px; line-height: 1.5; }
.usage-maturity-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.usage-maturity-legend li { display: flex; align-items: flex-start; gap: 8px; padding: 15px 11px; border-right: 1px solid var(--line); }
.usage-maturity-legend li:last-child { border-right: 0; }
.usage-maturity-legend i { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #aeb8bf; flex: 0 0 auto; }
.usage-maturity-legend i[data-level="2"] { background: #6e9eb0; }
.usage-maturity-legend i[data-level="3"] { background: #d69a54; }
.usage-maturity-legend i[data-level="4"] { background: #d06a2c; }
.usage-maturity-legend i[data-level="5"] { background: #2e8066; }
.usage-maturity-legend span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.usage-maturity-legend strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.usage-table-panel { overflow: hidden; }
.usage-table-panel .bi-table-wrap { max-height: 460px; overflow: auto; }
.usage-table-panel table { min-width: 100%; white-space: nowrap; }
.usage-table-panel th { position: sticky; top: 0; z-index: 1; background: #f3f6f7; }
.usage-table-panel td,
.usage-table-panel th { padding: 11px 13px; }

@media (max-width: 1380px) {
  .usage-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-quality-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .usage-analytics-heading { align-items: stretch; flex-direction: column; }
  .usage-period-controls { justify-content: flex-start; }
  .usage-quality-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-quality-cards > div { border-bottom: 1px solid var(--line); }
  .usage-maturity-legend { grid-template-columns: 1fr; }
  .usage-maturity-legend li { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .usage-summary-grid,
  .usage-quality-cards { grid-template-columns: 1fr; }
  .usage-period-controls { align-items: stretch; flex-direction: column; }
  .usage-period-controls > * { width: 100%; }
  .usage-tracking-note div { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Mobile workbench v1. Desktop layout remains untouched above 900px. */
.mobile-bottom-nav,
.mobile-report-picker-trigger,
.mobile-filter-summary,
.mobile-report-actions-trigger,
.mobile-chart-fullscreen-button,
.mobile-bottom-sheet {
  display: none;
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  body.mobile-sheet-open,
  body.mobile-chart-fullscreen-open {
    overflow: hidden;
  }

  .app-sidebar {
    display: none;
  }

  .app-stage {
    width: 100%;
    min-height: 100dvh;
  }

  .app-topbar {
    z-index: 45;
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 14px 8px;
    box-shadow: 0 8px 24px -22px rgba(23, 32, 42, .7);
  }

  .topbar-heading h1 {
    max-width: calc(100vw - 86px);
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .topbar-actions .icon-button {
    width: 42px;
    min-height: 42px;
  }

  .app-content {
    width: 100%;
    padding: 12px 10px calc(84px + env(safe-area-inset-bottom));
  }

  #appShell[hidden] + .mobile-bottom-nav {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding: 5px 4px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(216, 222, 228, .95);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -14px 36px -28px rgba(23, 32, 42, .7);
    backdrop-filter: blur(18px) saturate(1.15);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 3px 2px;
    border: 0;
    border-radius: 10px;
    color: #7d8791;
    background: transparent;
  }

  .mobile-bottom-nav button span {
    height: 20px;
    color: currentColor;
    font: 700 15px/20px var(--mono);
  }

  .mobile-bottom-nav button strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.active {
    color: var(--orange);
    background: var(--blue-soft);
  }

  .report-context {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .report-identity,
  .report-toolbar {
    display: none;
  }

  .mobile-report-picker-trigger,
  .mobile-filter-summary {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    align-items: center;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    text-align: left;
  }

  .mobile-report-picker-trigger span,
  .mobile-filter-summary span {
    color: var(--orange);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .12em;
  }

  .mobile-report-picker-trigger strong,
  .mobile-filter-summary strong {
    grid-column: 1;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-report-picker-trigger i,
  .mobile-filter-summary i {
    grid-column: 2;
    grid-row: 1 / 3;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
  }

  .mode-bar {
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 12px;
  }

  .mode-switcher {
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #acquireLockButton {
    display: none;
  }

  .mode-switcher button {
    min-width: 0;
    min-height: 38px;
    height: 38px;
    padding: 0 6px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-actions {
    display: none;
  }

  .mobile-report-actions-trigger {
    min-width: 72px;
    min-height: 42px;
    display: block;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--orange);
    background: #fff9f5;
    font-size: 11px;
    font-weight: 700;
  }

  .system-banner {
    padding: 11px 12px;
  }

  .report-sheet-tabs {
    position: sticky;
    z-index: 35;
    top: 58px;
    display: flex;
    margin: 8px -10px 10px;
    padding: 5px 10px;
    overflow-x: auto;
    border: solid var(--line);
    border-width: 1px 0;
    border-radius: 0;
    background: rgba(243, 245, 247, .96);
    box-shadow: 0 10px 24px -24px rgba(23, 32, 42, .7);
    scrollbar-width: none;
    backdrop-filter: blur(16px);
  }

  .report-sheet-tabs::-webkit-scrollbar {
    display: none;
  }

  .report-sheet-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    height: 38px;
    padding: 0 12px;
  }

  .data-status-strip {
    gap: 4px 10px;
    padding: 9px 11px;
    overflow: hidden;
  }

  .data-status-strip span {
    font-size: 10px;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi-card,
  .kpi-card.primary-kpi {
    grid-column: auto;
    min-height: 108px;
    padding: 12px 11px 10px;
    border-radius: 12px;
  }

  .kpi-card.primary-kpi {
    grid-column: 1 / -1;
  }

  .kpi-label {
    font-size: 10px;
  }

  .kpi-value {
    margin-top: 8px;
    font-size: clamp(22px, 7vw, 29px);
  }

  .kpi-meta {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-grid {
    gap: 9px;
  }

  .bi-panel {
    border-radius: 12px;
  }

  .panel-heading {
    min-height: 56px;
    padding: 11px 12px;
  }

  .dashboard-chart-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .dashboard-chart-actions select {
    width: 100%;
  }

  .mobile-chart-fullscreen-button {
    display: block;
    min-width: 56px;
  }

  .dashboard-primary-chart.mobile-chart-fullscreen {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .dashboard-primary-chart.mobile-chart-fullscreen .distribution-chart {
    min-height: 0;
    flex: 1;
    overflow: auto;
  }

  .data-update-divider {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 8px;
    padding: 9px 10px;
    font-size: 10px;
  }

  .data-update-divider small {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .ranking-panel .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .ranking-panel-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
    align-items: stretch;
  }

  /* Long metric names must not set the toolbar's intrinsic grid width. */
  .ranking-panel-actions > * {
    min-width: 0;
    max-width: 100%;
  }

  .ranking-panel-actions .performance-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    white-space: normal;
    font-size: 12px;
  }

  .ranking-panel-actions .performance-control[hidden] {
    display: none;
  }

  .ranking-panel-actions .performance-control select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .ranking-panel-actions #performanceSortControl,
  .ranking-panel-actions #performanceDirectionControl {
    grid-column: 1 / -1;
  }

  .ranking-panel-actions #performanceDirectionControl {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
  }

  .ranking-panel-actions #openExploreFromRanking {
    display: none;
  }

  .ranking-panel-actions > button {
    min-height: 42px;
    height: auto;
    padding: 0 9px;
    font-size: 12px;
    white-space: normal;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable).bi-table-wrap,
  #exploreRankingTable.bi-table-wrap,
  .daily-report-table {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-color: #b1bac2 #edf0f2;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable)::before,
  .daily-report-table::before {
    position: sticky;
    left: 8px;
    z-index: 6;
    display: inline-block;
    margin: 7px 0 6px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #6f7a84;
    background: #eef1f3;
    content: "左右滑动查看更多";
    font-size: 9px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table {
    width: max-content !important;
    min-width: calc(122px + var(--mobile-metric-count, 6) * 84px) !important;
    table-layout: auto !important;
  }

  .bi-table-wrap.additional-value-fit-table {
    overflow-x: auto !important;
  }

  .bi-table-wrap .performance-table.additional-value-performance-table th,
  .bi-table-wrap .performance-table.additional-value-performance-table td,
  .bi-table-wrap .performance-table.additional-value-performance-table .metric-cell span {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table th,
  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table td {
    min-width: 82px;
    padding: 9px 8px;
    font-size: 11px;
    white-space: normal;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table thead th {
    position: sticky;
    z-index: 4;
    top: 0;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table thead .metric-header th {
    top: 37px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table {
    --performance-rank-width: 46px;
    --performance-owner-width: 96px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-rank-column {
    min-width: 46px;
    width: 46px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table .performance-owner-column {
    min-width: 96px;
    width: 96px;
  }

  :is(#dashboardRankingTable, #lifelineWarningTable) .performance-table.additional-value-performance-table .performance-owner-column {
    min-width: 96px;
    width: 96px;
  }

  .side-drawer {
    inset: 0;
    width: 100%;
    height: 100dvh;
    border-left: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .side-drawer .drawer-heading {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  #aiDrawer .conversation,
  #notificationDrawer .notification-list {
    overscroll-behavior: contain;
  }

  #aiDrawer .drawer-chat-form {
    position: sticky;
    z-index: 3;
    bottom: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #fff;
  }

  .mobile-bottom-sheet[open] {
    position: fixed;
    z-index: 150;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 760px);
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px 20px 0 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 -28px 70px -30px rgba(23, 32, 42, .72);
  }

  .mobile-bottom-sheet::backdrop {
    background: rgba(23, 32, 42, .48);
    backdrop-filter: blur(2px);
  }

  .mobile-bottom-sheet > section,
  .mobile-bottom-sheet > form {
    max-height: min(88dvh, 760px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px calc(16px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .mobile-bottom-sheet header {
    min-height: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 11px;
    border-bottom: 1px solid var(--line-soft);
  }

  .mobile-bottom-sheet header p {
    margin: 0 0 2px;
    color: var(--orange);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .13em;
  }

  .mobile-bottom-sheet header h2 {
    margin: 0;
    font-size: 19px;
  }

  .mobile-bottom-sheet header button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 24px;
  }

  .mobile-report-picker-list,
  .mobile-action-list,
  .mobile-more-nav-list {
    display: grid;
    gap: 7px;
  }

  .mobile-report-picker-list {
    max-height: 54dvh;
    overflow-y: auto;
  }

  .mobile-report-picker-list button,
  .mobile-action-list button,
  .mobile-more-nav-list button {
    width: 100%;
    min-height: 56px;
    display: grid;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    text-align: left;
  }

  .mobile-report-picker-list button {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
  }

  .mobile-report-picker-list button.active {
    border-color: #e5ad8e;
    background: #fff7f2;
  }

  .mobile-report-picker-list button span,
  .mobile-report-picker-list button small,
  .mobile-action-list small {
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-report-picker-list button strong {
    grid-column: 1;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-report-picker-list button small {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .mobile-action-list button {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .mobile-action-list button span {
    display: grid;
    gap: 3px;
  }

  .mobile-action-list button i,
  .mobile-more-nav-list button i {
    color: var(--muted);
    font-style: normal;
  }

  .mobile-action-list button:disabled,
  .mobile-more-nav-list button:disabled {
    opacity: .45;
  }

  .mobile-sheet-primary,
  .mobile-logout-button {
    width: 100%;
    min-height: 46px;
    border-radius: 11px;
    font-weight: 700;
  }

  .mobile-sheet-primary {
    border: 1px solid var(--orange);
    color: #fff;
    background: var(--orange);
  }

  .mobile-filter-dialog label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
  }

  .mobile-filter-dialog select,
  .mobile-filter-dialog input {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
  }

  .mobile-custom-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-account-summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 13px;
    color: #fff;
    background: var(--sidebar);
  }

  .mobile-account-summary > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--orange);
    font-weight: 800;
  }

  .mobile-account-summary div {
    display: grid;
    gap: 2px;
  }

  .mobile-account-summary small {
    color: #aeb8c1;
    font-size: 10px;
  }

  .mobile-account-security-button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 1px 9px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: #fff;
    text-align: left;
    box-shadow: none;
  }

  .mobile-account-security-button > span {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #a94f24;
    background: var(--orange-soft);
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-account-security-button strong {
    font-size: 12px;
  }

  .mobile-account-security-button small {
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-account-security-button i {
    grid-column: 3;
    grid-row: 1 / 3;
    color: var(--muted);
    font-style: normal;
  }

  .mobile-more-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-more-nav-list button {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 9px;
  }

  .mobile-more-nav-list button > span {
    color: var(--orange);
    text-align: center;
  }

  .mobile-more-nav-list button strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-logout-button {
    border: 1px solid #f0c9c5;
    color: #a33b32;
    background: #fff7f6;
  }

  .mobile-sheet-empty {
    padding: 26px 12px;
    color: var(--muted);
    text-align: center;
  }

  .report-dialog,
  .template-version-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .report-dialog form {
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .mode-switcher button {
    font-size: 10px;
  }

  .ranking-panel-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-more-nav-list {
    grid-template-columns: 1fr;
  }
}
.manual-input-page.invoice-mode .manual-input-hero,
.manual-input-page.invoice-mode .manual-input-history { display: none; }
.manual-input-page { grid-template-columns: minmax(0, 1fr); }
.manual-input-page > * { min-width: 0; }
.manual-input-page .manual-input-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.manual-input-page .manual-input-tabs button { flex: 1 0 130px; min-width: 0; white-space: nowrap; }
#manualPanelInvoiceDates { min-width: 0; }
.invoice-date-card { display: block; min-width: 0; padding: 26px; border-radius: 18px; }
.invoice-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.invoice-heading h3 { font-size: 23px; margin: 6px 0; }
.invoice-heading p { margin: 0; color: #748193; line-height: 1.7; }
.invoice-security-tag { white-space: nowrap; background: #fff5ed; border: 1px solid #f1d9c7; color: #a9582d; border-radius: 20px; padding: 7px 12px; font-size: 12px; }
.invoice-filters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; align-items: end; padding: 20px; border: 1px solid #e6ebf0; border-radius: 14px; background: #f7f9fb; }
.invoice-filters .invoice-keyword { grid-column: span 2; }
.invoice-filters .invoice-search { justify-self: end; width: 90px; }
.invoice-filters select:disabled { background: #edf1f5; color: #617185; opacity: 1; cursor: default; }
.invoice-store-hint { margin: 12px 0 0; color: #617185; font-size: 12px; line-height: 1.7; }
.invoice-filters > label { display: grid; gap: 8px; min-width: 0; color: #617185; font-size: 13px; font-weight: 600; }
.invoice-filters input:not([type="checkbox"]), .invoice-filters select { box-sizing: border-box; width: 100%; min-width: 0; height: 43px; padding: 0 12px; border: 1px solid #d9e1e9; border-radius: 9px; background: #fff; color: #344357; font: inherit; font-weight: 400; }
.invoice-filters input::placeholder { color: #929dad; }
.invoice-date-card button, .invoice-history button { font: inherit; font-size: 13px; border: 1px solid #d8e0e8; border-radius: 9px; padding: 9px 13px; background: #fff; color: #46576a; cursor: pointer; transition: background .15s; }
.invoice-date-card button:hover:not(:disabled), .invoice-history button:hover { background: #f7f9fb; border-color: #bdc8d6; }
.invoice-date-card button:disabled { opacity: .45; cursor: default; }
.invoice-date-card button:focus-visible, .invoice-filters input:focus-visible, .invoice-filters select:focus-visible { outline: 2px solid #cb713e; outline-offset: 2px; }
.invoice-date-card .invoice-search { height: 43px; color: white; background: #c45f27; border-color: #c45f27; font-weight: 600; }
.invoice-date-card .invoice-search:hover:not(:disabled) { color: white; background: #ae4e1d; border-color: #ae4e1d; }
.invoice-filter-secondary { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.invoice-filter-secondary label { display: flex; align-items: center; gap: 7px; color: #536477; font-size: 13px; }
.invoice-filter-secondary input { accent-color: #c45f27; width: 16px; height: 16px; }
.invoice-filter-secondary button { padding: 5px 10px; margin-left: 6px; background: transparent; border-color: transparent; color: #a85529; }
.invoice-filter-hint { color: #7d8999; font-size: 12px; line-height: 1.7; margin: 12px 0 24px; }
.invoice-result-heading, .invoice-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.invoice-result-heading { margin: 0 0 14px; }
.invoice-result-heading h4 { margin: 0; font-size: 16px; color: #344357; }
.invoice-result-heading span, .invoice-pagination > span { color: #7a8798; font-size: 12px; }
.invoice-pagination { margin-top: 18px; }
.invoice-pagination button + button { margin-left: 8px; }
.invoice-date-card .table-scroll, .invoice-history .table-scroll, #invoiceDatePreview { overflow-x: auto; max-width: 100%; }
#invoiceDateResults { border: 1px solid #e5eaf0; border-radius: 12px; }
.invoice-date-card table, .invoice-history table, #invoiceDatePreview table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
.invoice-date-card th, .invoice-date-card td, .invoice-history th, .invoice-history td,
#invoiceDatePreview th, #invoiceDatePreview td { padding: 14px 13px; border-bottom: 1px solid #edf0f4; text-align: left; }
.invoice-date-card th, .invoice-history th, #invoiceDatePreview th { background: #f4f7f9; color: #6d7b8d; font-size: 12px; font-weight: 600; }
#invoiceDateResults td strong { font-size: 13px; font-weight: 500; color: #344357; }
#invoiceDateResults td small { display: block; margin-top: 6px; color: #8a95a4; font-size: 11px; }
.invoice-vin, .invoice-date-value, .invoice-numbers { font-variant-numeric: tabular-nums; }
#invoiceDateResults tbody tr:last-child td { border-bottom: 0; }
#invoiceDateResults th:last-child, #invoiceDateResults td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -3px 0 6px #e5e9ef66; }
#invoiceDateResults th:last-child { background: #f4f7f9; }
#invoiceDateResults td:last-child button { color: #bd5c28; border-color: #e8c3ac; white-space: nowrap; }
.invoice-date-value.changed { color: #b35b2f; font-weight: 600; }
.invoice-status { display: inline-block; padding: 5px 9px; border-radius: 6px; font-size: 11px; color: #8090a1; background: #f0f3f7; white-space: nowrap; }
.invoice-status.is-adjusted { color: #2f866c; background: #eaf6f1; }
.invoice-empty { padding: 46px 18px; text-align: center; color: #8591a1; }
.invoice-empty strong { display: block; color: #566679; font-weight: 500; margin-bottom: 10px; }
.invoice-empty span { display: block; font-size: 12px; }
.invoice-guidance { border-top: 1px solid #edf0f4; margin-top: 22px; padding-top: 16px; color: #7a8798; font-size: 12px; }
.invoice-guidance summary, .invoice-history summary { cursor: pointer; }
.invoice-guidance p { line-height: 1.9; margin-bottom: 0; }
.invoice-history { margin-top: 16px; padding: 20px 24px; background: #fff; border: 1px solid #e2e8ef; border-radius: 14px; min-width: 0; }
.invoice-history summary { font-size: 14px; font-weight: 600; color: #526174; }
.invoice-history summary span { margin-left: 12px; color: #929bab; font-size: 12px; font-weight: 400; }
.invoice-history[open] summary { margin-bottom: 16px; }
.invoice-history td:nth-child(6) { white-space: normal; min-width: 180px; max-width: 320px; overflow-wrap: anywhere; }
#invoiceDateDialog { width: min(860px, calc(100vw - 32px)); }
#invoiceDatePreview { margin: 20px 0; }
.invoice-preview-context { display: flex; flex-direction: column; gap: 7px; padding-bottom: 14px; }
.invoice-preview-context strong { color: #334357; font-size: 17px; }
.invoice-preview-context span { color: #7d8a9c; font-size: 13px; }
.invoice-preview-notice { padding: 14px 16px; background: #fff6ef; color: #a8572c; border-left: 3px solid #c66b36; border-radius: 6px; font-size: 13px; }
@media (max-width: 1100px) {
  .invoice-heading { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 600px) {
  .invoice-date-card { padding: 16px; }
  .invoice-filters { padding: 14px; gap: 12px; grid-template-columns: 1fr; }
  .invoice-filters .invoice-keyword { grid-column: 1; }
  .invoice-filters .invoice-search { width: 100%; }
  .invoice-heading h3 { font-size: 20px; }
  .invoice-result-heading, .invoice-pagination { flex-wrap: wrap; }
  .invoice-history { padding: 16px; }
  .invoice-history summary span { display: block; margin: 8px 0 0; line-height: 1.6; }
}
