:root {
  --theme-primary: #0f4c81;
  --theme-primary-dark: #0b3f6a;
  --theme-primary-soft: #d9e7f5;
  --theme-primary-soft-2: #edf3fa;
  --theme-primary-soft-3: #eff5fb;
  --theme-accent-soft: #f2faf7;
  --theme-secondary: #17624c;
  --theme-danger: #b42318;
  --theme-success: #0f6b43;
  --theme-text: #17324d;
  --theme-text-strong: #1d3652;
  --theme-muted: #5b748f;
  --theme-bg: #f3f6fb;
  --theme-surface: #fff;
  --theme-border: #c7d4e3;
  --theme-nav-start: #0f4c81;
  --theme-nav-end: #0b6b68;
}
body.theme-slate { --theme-primary: #334155; --theme-primary-dark: #1e293b; --theme-primary-soft: #dbe5f0; --theme-primary-soft-2: #edf2f7; --theme-primary-soft-3: #e8eef5; --theme-secondary: #475569; --theme-nav-start: #334155; --theme-nav-end: #475569; }
body.theme-emerald { --theme-primary: #0f766e; --theme-primary-dark: #115e59; --theme-primary-soft: #d7f0ee; --theme-primary-soft-2: #e9f8f7; --theme-primary-soft-3: #e4f7f4; --theme-accent-soft: #edf9f4; --theme-secondary: #047857; --theme-nav-start: #0f766e; --theme-nav-end: #047857; }
body.theme-teal { --theme-primary: #0f766e; --theme-primary-dark: #134e4a; --theme-primary-soft: #d5f1ee; --theme-primary-soft-2: #ebfbf8; --theme-primary-soft-3: #e3f7f3; --theme-accent-soft: #edfafe; --theme-secondary: #0f766e; --theme-nav-start: #0f766e; --theme-nav-end: #0891b2; }
body.theme-indigo { --theme-primary: #4338ca; --theme-primary-dark: #3730a3; --theme-primary-soft: #e0e3fb; --theme-primary-soft-2: #eef1ff; --theme-primary-soft-3: #e8ebff; --theme-accent-soft: #eef2ff; --theme-secondary: #4f46e5; --theme-nav-start: #4338ca; --theme-nav-end: #4f46e5; }
body.theme-amber { --theme-primary: #b45309; --theme-primary-dark: #92400e; --theme-primary-soft: #f6dfc5; --theme-primary-soft-2: #fff6eb; --theme-primary-soft-3: #fcebd7; --theme-accent-soft: #fff7ed; --theme-secondary: #a16207; --theme-nav-start: #b45309; --theme-nav-end: #d97706; }
body.theme-crimson { --theme-primary: #be123c; --theme-primary-dark: #9f1239; --theme-primary-soft: #f7d7df; --theme-primary-soft-2: #fff1f4; --theme-primary-soft-3: #fee7ee; --theme-accent-soft: #fff1f5; --theme-secondary: #9f1239; --theme-nav-start: #be123c; --theme-nav-end: #e11d48; }
body.theme-graphite { --theme-primary: #1f2937; --theme-primary-dark: #111827; --theme-primary-soft: #dbe0e7; --theme-primary-soft-2: #f3f5f8; --theme-primary-soft-3: #e8ecf2; --theme-accent-soft: #f9fafb; --theme-secondary: #374151; --theme-nav-start: #1f2937; --theme-nav-end: #4b5563; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: var(--theme-bg); color: var(--theme-text); }
a { color: var(--theme-primary); text-decoration: none; }
button, .button-link { background: var(--theme-primary); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; line-height: 1.2; font: inherit; text-decoration: none; vertical-align: middle; }
button:disabled { opacity: .6; cursor: not-allowed; }
.btn-small { padding: 6px 10px; font-size: 12px; }
.btn-danger { background: var(--theme-danger); }
.btn-secondary { background: var(--theme-secondary); }
.icon-only-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
.icon-action-button { background: var(--theme-primary); }
.icon-delete-button { background: var(--theme-danger); }
.hidden { display: none !important; }
.container { width: 100%; padding: 16px 18px; max-width: none; margin: 0; }
.nav { background: linear-gradient(90deg, var(--theme-nav-start), var(--theme-nav-end)); color: #fff; padding: 16px 24px; display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.nav-title { font-size: 22px; font-weight: 700; }
.nav-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #fff; }
.logout-form { margin: 0; }
.card { background: var(--theme-surface); border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(15, 76, 129, 0.08); }
.hero-card {
  padding: 22px 20px;
  border-radius: 20px;
  border: 1px solid #ebf1f7;
  background: linear-gradient(90deg, #f8fafc 0%, #f8fbfd 56%, var(--theme-accent-soft) 100%);
  box-shadow: 0 10px 26px rgba(17, 55, 92, 0.06);
}
.hero-row, .toolbar-row, .modal-actions, .inline-form, .bulk-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-row { justify-content: space-between; align-items: center; gap: 24px; flex-wrap: nowrap; min-height: 116px; }
.hero-copy { min-width: 0; }
.hero-title { margin: 0 0 26px; font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--theme-text-strong); }
.hero-subtitle { margin: 0; font-size: 15px; line-height: 1.45; color: #627588; }
.hero-actions { margin-left: auto; display: flex; gap: 26px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; text-align: left; }
.hero-summary {
  min-width: 132px;
  padding: 2px 0;
  display: grid;
  gap: 10px;
}
.hero-summary-item { line-height: 1.2; }
.hero-summary-item strong { display: inline-block; margin-bottom: 4px; color: var(--theme-text-strong); font-size: 15px; }
.hero-summary-item .muted { font-size: 14px; color: #6b7e90; }
.hero-declare-button {
  min-width: 186px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--theme-primary);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.toolbar-row { align-items: stretch; }
.toolbar-row > button,
.toolbar-row > .button-link,
.toolbar-row > form > button { min-width: 140px; }
.scope-switch-row {
  justify-content: center;
}
.scope-switch-row .button-link {
  background: #e3e8ef;
  color: var(--theme-primary);
}
.scope-switch-row .button-link.is-active {
  background: var(--theme-primary);
  color: #fff;
}
.segment-switch-card {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}
.sortable-head {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sortable-head.is-active {
  color: #fff;
  font-weight: 700;
}
.asset-category-grid th.sort-active {
  background: var(--theme-primary);
  color: #fff;
}
.sortable-head:hover {
  text-decoration: underline;
}
.office-page-head { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.grid label, .split label { display: grid; gap: 8px; font-weight: 600; color: #204261; }
.field-label-row,
.field-head-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mandatory-marker {
  display: inline-block;
  margin-left: 4px;
  font-weight: 800;
}
.mandatory-marker-input {
  color: #12385d;
}
.mandatory-marker-final {
  color: #9ab0c4;
}
.field-head-row {
  width: 100%;
  justify-content: flex-start;
}
.field-help-button {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  box-shadow: none;
}
.field-help-button:hover {
  background: var(--theme-primary);
  color: #fff;
}
.field-help-table {
  flex: 0 0 auto;
}
.field-help-inline {
  align-self: center;
}
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.board-filters-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
input, select, textarea { width: 100%; border: 1px solid var(--theme-border); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; color: var(--theme-text); }
textarea { resize: vertical; }
.filter-picker {
  position: relative;
}
.filter-picker.is-selected [data-filter-picker-input] {
  background: var(--theme-primary);
  color: #fff;
  border-color: var(--theme-primary);
  font-weight: 600;
}
.filter-picker.is-selected [data-filter-picker-input]::placeholder {
  color: rgba(255, 255, 255, 0.8);
}
.filter-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 76, 129, 0.14);
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 30;
  padding: 6px;
}
.filter-picker.is-open .filter-picker-menu {
  display: block;
}
.filter-picker-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #17324d;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.filter-picker-option:hover {
  background: var(--theme-primary-soft-2);
}
.filter-picker-option.is-disabled {
  color: #93a4b7;
  background: #f6f8fb;
  cursor: not-allowed;
}
.filter-picker-option.is-disabled:hover {
  background: #f6f8fb;
}
.filter-picker-option[hidden] {
  display: none;
}
.inline-edit,
.inline-readonly {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: none;
}
.inline-edit:hover,
.inline-edit.is-editing,
.inline-edit:focus {
  background: #fff;
  border-color: var(--theme-primary-soft);
  outline: none;
}
.inline-readonly {
  color: #4f6781;
}
.status-active { color: var(--theme-success); font-weight: 700; }
.status-inactive { color: var(--theme-danger); font-weight: 700; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-check,
.grid label.inline-check,
.split label.inline-check {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  row-gap: 0;
  font-weight: 600;
  color: #204261;
}
.inline-check input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  margin: 0;
  align-self: start;
  justify-self: center;
}
.inline-check span {
  display: block;
  min-width: 0;
  text-align: left;
  line-height: 1.3;
  align-self: start;
}
.field-options-box { min-width: 220px; min-height: 84px; }
.segmented-control {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: var(--theme-primary-soft-2);
  gap: 6px;
}
.download-level1-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
}
.download-manager-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.download-manager-page {
  display: grid;
  gap: 16px;
}
.download-manager-info-grid,
.download-manager-segment-grid {
  display: grid;
  gap: 16px;
}
.download-manager-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.download-manager-segment-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.download-manager-info-card {
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  background: #fbfdff;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.download-manager-info-card h3 {
  margin: 0;
}
.download-preview-list,
.download-level2-field-list,
.download-manager-placeholder {
  display: grid;
  gap: 10px;
}
.download-preview-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  background: #fff;
}
.download-token-helper-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.download-token-helper-grid .download-preview-row {
  grid-template-columns: minmax(0, 1fr);
  min-height: 52px;
  padding: 10px 12px;
  align-items: center;
}
.download-token-helper-grid .download-preview-label {
  min-width: 0;
}
.download-token-helper-grid .download-preview-label code {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}
.download-preview-serial {
  font-weight: 700;
  color: var(--theme-primary);
}
.download-placeholder-line {
  padding: 8px 10px;
  border: 1px dashed #c6d6e7;
  border-radius: 12px;
  background: #fff;
  color: #4d6784;
}
.download-manager-table td {
  vertical-align: top;
}
.download-manager-table {
  width: 100%;
  table-layout: fixed;
}
.download-manager-table th:nth-child(1),
.download-manager-table td:nth-child(1) {
  width: 10%;
}
.download-manager-table th:nth-child(2),
.download-manager-table td:nth-child(2),
.download-manager-table th:nth-child(3),
.download-manager-table td:nth-child(3) {
  width: 45%;
}
.download-level1-table {
  width: 100%;
  table-layout: fixed;
}
.download-level1-table th,
.download-level1-table td {
  vertical-align: middle;
}
.download-level1-table th:nth-child(1),
.download-level1-table td:nth-child(1) {
  width: 28%;
}
.download-level1-table th:nth-child(2),
.download-level1-table td:nth-child(2) {
  width: 10%;
  text-align: center;
}
.download-level1-table th:nth-child(3),
.download-level1-table td:nth-child(3) {
  width: 12%;
  text-align: center;
}
.download-level1-table th:nth-child(4),
.download-level1-table td:nth-child(4) {
  width: 12%;
}
.download-level1-table th:nth-child(5),
.download-level1-table td:nth-child(5) {
  width: 18%;
}
.download-level1-table th:nth-child(6),
.download-level1-table td:nth-child(6) {
  width: 20%;
}
.download-level1-table input[type="number"],
.download-level1-table select {
  width: 100%;
}
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="is_level"],
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="serial"],
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="sorting"] {
  display: none;
}
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="field"] {
  width: 48%;
}
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="show"] {
  width: 14%;
}
[data-download-output-mode="zip"] .download-level1-table [data-download-level1-col="filter"] {
  width: 38%;
}
.download-manager-cell {
  display: grid;
  gap: 10px;
}
.download-manager-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.download-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  column-gap: 8px;
  padding: 7px 8px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--theme-border);
  background: var(--theme-primary-soft-2);
  color: var(--theme-text);
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
}
.download-chip.is-active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
}
.download-chip.is-removed {
  opacity: .45;
  background: #f4f6f9;
}
.download-chip-label {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.download-chip-action {
  width: 24px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-chip-remove {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 14px;
  line-height: 1;
}
.download-chip-remove:hover {
  background: var(--theme-danger);
  color: #fff;
}
.segment {
  background: #e3e8ef;
  color: var(--theme-primary);
  border-radius: 999px;
}
.segment.is-active {
  background: var(--theme-primary);
  color: #fff;
}
.download-modal-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.download-modal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.download-modal-row-single {
  grid-template-columns: minmax(0, 1fr);
}
.download-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.download-data-modal-card {
  width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.download-data-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 0;
  flex: 1 1 auto;
}
.download-modal-pages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.download-modal-page {
  display: grid;
  gap: 18px;
  align-content: start;
}
.download-layer-card {
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  padding: 16px;
  background: #fbfdff;
  display: grid;
  gap: 14px;
}
.download-layer-head h4,
.download-config-box h5 {
  margin: 0 0 4px;
}
.download-layer-head p,
.download-config-box p {
  margin: 0;
}
.download-subhead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.download-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
}
.download-common-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.download-common-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  background: #fff;
}
.download-common-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding-top: 2px;
}
.download-common-meta {
  display: grid;
  gap: 8px;
}
.download-common-order,
.download-common-sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.download-common-order input {
  width: 90px;
}
.download-common-sort-controls select {
  min-width: 88px;
}
.download-field-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.download-inline-check {
  padding: 8px 10px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  background: #fff;
}
.download-level1-values,
.download-segment-block {
  display: grid;
  gap: 12px;
}
.download-segment-block {
  border-top: 1px solid #e5edf5;
  padding-top: 14px;
}
.download-segment-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 14px;
}
.download-config-box {
  border: 1px solid #dbe6f1;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}
.download-filter-box {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  width: 100%;
}
.download-filter-box > h5 {
  grid-column: 1 / -1;
}
.download-filter-group {
  border: 1px solid #e5edf5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  min-width: 0;
}
.download-filter-group h6 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}
.download-filter-body {
  display: grid;
  gap: 10px;
}
.download-filter-range {
  align-content: start;
}
.download-filter-group .download-choice-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.download-filter-group .download-inline-check {
  min-height: 0;
  padding: 10px 12px;
  align-items: center;
}
.download-filter-group .download-inline-check span {
  align-self: center;
}
.download-filter-tree {
  display: grid;
  gap: 10px;
}
.download-filter-tree-node {
  display: grid;
  gap: 8px;
}
.download-filter-tree-children {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  margin-left: 28px;
}
.download-tree-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.download-tree-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.download-tree-check span {
  display: block;
  text-align: left;
  padding-top: 1px;
}
.download-office-tree,
.download-conditional-tree {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}
.download-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.download-sort-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}
.audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.audit-choice-bar .segment {
  padding: 10px 16px;
}
.audit-summary-table {
  table-layout: auto;
  width: 100%;
}
.audit-summary-table .audit-col-sl,
.audit-summary-table .audit-col-count {
  width: 72px;
  white-space: nowrap;
}
.audit-summary-table th,
.audit-summary-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.audit-summary-table th:first-child,
.audit-summary-table td:first-child,
.audit-summary-table th:last-child,
.audit-summary-table td:last-child {
  text-align: center;
}
.download-sort-compact {
  display: grid;
  gap: 10px;
}
.office-kind-panel { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert.success { background: #e8f7ef; color: var(--theme-success); }
.alert.error { background: #fdeceb; color: var(--theme-danger); }
.muted, .hint { color: #5b748f; }
.table-wrap { width: 100%; overflow: hidden; }
.table-load-more-footer {
  position: relative;
  margin-top: -28px;
  padding: 44px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.table-load-more-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(248, 251, 255, 0.05), rgba(248, 251, 255, 0.88) 38%, rgba(248, 251, 255, 0.98));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  border-radius: 0 0 16px 16px;
}
.table-load-more-button {
  position: relative;
  z-index: 1;
  min-width: 132px;
}
.table-load-more-button[disabled] {
  opacity: 0.72;
  cursor: wait;
}
table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
th, td { border-bottom: 1px solid #e5edf5; padding: 8px 10px; text-align: left; vertical-align: top; word-break: break-word; overflow-wrap: anywhere; white-space: normal; font-size: 13px; }
th { background: var(--theme-primary-soft-3); color: var(--theme-text); }
tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}
tbody tr td {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}
tbody tr:hover td {
  background: var(--theme-primary-soft-2);
}
tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--theme-primary);
}
.sticky-table-header-layer {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  z-index: 220;
  background: transparent;
}
.sticky-table-header-layer.is-visible {
  display: block;
}
.sticky-table-header-layer table {
  margin: 0;
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.12);
}
.sticky-table-header-layer th,
.sticky-table-header-layer td {
  position: static;
}
.board-grid, .asset-category-grid { display: grid; gap: 20px; }
.operational-budget-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.time-filter-modal-card { width: min(620px, 100%); }
.time-filter-datetime-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.time-filter-datetime-row .inline-check {
  min-height: 44px;
}
.action-icon-row { display: inline-flex; align-items: center; gap: 6px; }
.table-action-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.preview-title { font-weight: 700; margin-bottom: 8px; }
.preview-panel { min-height: 220px; border: 1px solid #dbe6f1; border-radius: 12px; background: #fbfdff; padding: 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.56); display: none; justify-content: center; align-items: center; padding: 18px; z-index: 1000; }
.modal-backdrop.open { display: flex; }
.modal-card { background: #fff; border-radius: 18px; padding: 20px; width: min(760px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); }
.welcome-modal-card { width: min(640px, 100%); position: relative; padding: 24px 24px 20px; }
.welcome-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 0;
  min-height: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #47627e;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}
.welcome-modal-close:hover { background: #eef4f9; color: #17324d; }
.welcome-message-body { width: 100%; padding-top: 4px; }
.welcome-message-body > :first-child { margin-top: 0; }
.welcome-message-body > :last-child { margin-bottom: 0; }
.flash-modal-card { width: min(520px, 100%); }
.flash-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.flash-modal-head h3 { margin: 0; }
.flash-modal-alert { margin-bottom: 0; }
.download-hidden-frame { width: 0; height: 0; border: 0; position: absolute; left: -9999px; top: -9999px; }
.download-wait-modal-card { width: min(520px, 100%); overflow: hidden; }
.download-wait-spinner { display: flex; justify-content: center; align-items: center; padding: 10px 0 4px; }
.download-wait-spinner-ring {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid #dbe6f1;
  border-top-color: var(--brand, #245b92);
  animation: download-spin 0.8s linear infinite;
}
@keyframes download-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.asset-entry-modal { width: min(35vw, 100%); min-width: 360px; }
.modal-wide { width: min(1280px, 100%); }
.import-review-modal-card { width: min(95vw, 100%); }
.audit-table .has-errors { background: #fff2f2; }
.audit-table .is-valid { background: #f8fcfa; }
.import-review-modal-card .table-wrap {
  width: 100%;
  overflow: visible;
}
.audit-table {
  width: 100%;
  table-layout: fixed;
}
.audit-table th,
.audit-table td {
  font-size: 11px;
  padding: 6px 6px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.review-input {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  min-height: 40px;
  padding: 8px 8px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  width: 100%;
  min-width: 0;
}
.review-textarea {
  min-width: 0;
  min-height: 78px;
  line-height: 1.35;
  resize: vertical;
}
.audit-table textarea.review-input,
.audit-table input.review-input,
.audit-table select.review-input {
  height: auto;
}
.audit-table select.review-input {
  min-height: 54px;
}
.audit-table .cell-valid,
.audit-table .cell-error {
  vertical-align: top;
}
.review-input:hover,
.review-input:focus { border-color: #98b6d5; background: #fff; outline: none; }
.cell-valid .review-input { border-color: transparent; background: transparent; }
.cell-error .review-input { border-color: #d92d20; background: #fff8f7; }
.bimh-field { display: grid; gap: 6px; min-width: 0; position: relative; }
.bimh-input-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: start; }
.bimh-picker-button { grid-column: 1; grid-row: 1; min-width: 38px; width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bimh-id-input { grid-column: 2; grid-row: 1; min-width: 0; }
.bimh-suggestion-menu {
  position: absolute;
  z-index: 45;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 76, 129, 0.14);
  max-height: 320px;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  justify-items: stretch;
}
.bimh-suggestion-menu[hidden] {
  display: none;
}
.bimh-suggestion-option {
  width: 100%;
  min-height: 0;
  text-align: left;
  border: 0;
  background: transparent;
  color: #17324d;
  padding: 10px 14px 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
}
.bimh-suggestion-option:hover {
  background: var(--theme-primary-soft-2);
}
.bimh-suggestion-id {
  font-weight: 700;
  color: #17324d;
  width: 100%;
  text-align: left;
  line-height: 1.25;
}
.bimh-suggestion-name {
  font-size: 12px;
  color: #5b748f;
  width: 100%;
  text-align: left;
  line-height: 1.35;
}
.bimh-est-name-box {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #f6f9fc;
  color: #23415f;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bimh-est-name-box.is-not-found {
  color: #b42318;
  background: #fff1f1;
  border-color: #f0b7b7;
}
.bimh-est-name-inline {
  display: inline-block;
  min-height: 0;
  padding: 4px 8px;
}
.bimh-picker-modal-card { width: min(1100px, 100%); }
.bimh-picker-modal-card .flash-modal-head { align-items: flex-start; }
.bimh-picker-modal-card .welcome-modal-close {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
}
.bimh-picker-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bimh-picker-table th,
.bimh-picker-table td { vertical-align: top; }
.audit-cell { min-width: 220px; }
.error-text { color: #b42318; font-size: 12px; margin-bottom: 4px; }
.success-text { color: #0f6b43; font-weight: 700; }
.compact-grid { gap: 8px; }
.auth-body { min-height: 100vh; background: linear-gradient(135deg, #e8f2fb, #effaf7); display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-wrap { width: min(1160px, 100%); display: grid; gap: 22px; justify-items: center; }
.auth-logo-row,
.auth-title-row { width: 100%; display: flex; justify-content: center; text-align: center; }
.logo-stack { display: inline-flex; align-items: center; justify-content: center; }
.auth-grid { width: min(1020px, 100%); display: grid; grid-template-columns: minmax(320px, 420px) minmax(380px, 560px); gap: 24px; align-items: stretch; justify-content: center; }
.auth-card, .auth-info { background: rgba(255,255,255,.95); border-radius: 18px; padding: 24px; box-shadow: 0 18px 50px rgba(15, 76, 129, 0.12); }
.auth-info { display: flex; align-items: center; justify-content: center; }
.auth-info-content { width: min(100%, 520px); }
.auth-info-content > :first-child { margin-top: 0; }
.auth-info-content > :last-child { margin-bottom: 0; }
.auth-title-row h1 { margin: 0; font-size: clamp(32px, 4vw, 42px); line-height: 1.1; color: #17324d; }
.auth-logo { max-height: 108px; width: auto; display: block; }
.login-grid { display: grid; gap: 12px; }
.login-password-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.login-password-wrap .login-input {
  margin: 0;
}
.login-password-toggle {
  min-width: 76px;
  padding: 10px 14px;
}
.login-title { font-size: 22px; font-weight: 700; }
.login-actions { display: grid; gap: 12px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-form { max-width: 520px; }
.bulk-actions { margin-top: 10px; }
.office-manage-users-head { align-items: flex-start; }
.office-manage-users-permission { margin: 12px 0 16px; }
.office-users-table input[readonly] { background: #f6f9fc; color: #5b748f; }
.office-users-table td { vertical-align: middle; }
.office-users-table .action-row { flex-wrap: wrap; }
.column-visibility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.column-visibility-grid .inline-check {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}
.column-visibility-grid .inline-check input[type="checkbox"] {
  margin: 0;
  justify-self: end;
}
.column-visibility-grid .inline-check span {
  justify-self: start;
  padding-left: 2px;
}
.column-visibility-modal .modal-actions { flex-wrap: wrap; }
.asset-history-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.field-help-modal-card { width: min(760px, 100%); }
.field-help-label { margin: 0 0 10px; font-weight: 700; color: #17324d; }
.field-help-body { display: grid; gap: 10px; color: #36516d; }
.field-help-body p { margin: 0; }
.field-help-video { margin-top: 16px; display: grid; gap: 10px; }
.field-help-video iframe,
.field-help-video video {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 12px;
  background: #000;
}
.declaration-toggle-row {
  justify-content: center;
  margin-bottom: 16px;
}
.declaration-status-table td,
.declaration-status-table th {
  vertical-align: middle;
}
.declaration-status-cell {
  font-size: 13px;
}
.declaration-status-cell.is-unsent {
  background: #feeceb;
  color: #c4322b;
}
.declaration-status-cell.is-sent {
  background: var(--theme-primary);
  color: #fff;
}
.btn-danger-soft {
  background: #fff1ef;
  color: #c4322b;
}
.btn-danger-soft:hover {
  background: #c4322b;
  color: #fff;
}
.asset-history-list { display: grid; gap: 12px; }
.asset-history-entry { border: 1px solid #dbe6f1; border-radius: 12px; padding: 12px 14px; background: #fbfdff; }
.asset-history-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.asset-history-details { display: grid; gap: 6px; }
.asset-history-detail-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.asset-history-detail-label { font-weight: 700; color: #17324d; min-width: 120px; }
.file-link-list { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; max-width: 100%; }
.file-delete-chip { display: grid; gap: 6px; }
.file-cell-meta { margin-bottom: 6px; font-size: 12px; color: #5b748f; }
.inline-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.inline-file-upload-form { display: inline-flex; align-items: center; margin: 6px 0 0; }
.inline-file-add-button { min-width: 0; }
.file-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d5e0ea;
  background: #f9fbfd;
  color: #17324d;
  box-shadow: 0 4px 10px rgba(15, 76, 129, 0.06);
}
.file-chip-icon-only {
  width: 32px;
  min-width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  gap: 0;
  justify-content: center;
  border-radius: 10px;
}
.file-chip:hover { border-color: #98b6d5; background: #fff; }
.file-chip.is-pdf { border-left: 4px solid #c7362f; }
.file-chip.is-image { border-left: 4px solid #2b8a5c; }
.file-chip.is-doc { border-left: 4px solid #1f5faa; }
.file-chip.is-sheet { border-left: 4px solid #1f7a52; }
.file-chip.is-text { border-left: 4px solid #7a5f1f; }
.file-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(180deg, #dd5a52, #b42318);
}
.file-chip-icon-only .file-chip-icon {
  width: 22px;
  height: 22px;
  font-size: 9px;
  border-radius: 6px;
}
.file-chip.is-image .file-chip-icon { background: linear-gradient(180deg, #3da271, #17624c); }
.file-chip.is-doc .file-chip-icon { background: linear-gradient(180deg, #4b87d9, #1f5faa); }
.file-chip.is-sheet .file-chip-icon { background: linear-gradient(180deg, #3da271, #1f7a52); }
.file-chip.is-text .file-chip-icon { background: linear-gradient(180deg, #c89b43, #7a5f1f); }
.file-chip-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .download-token-helper-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .download-token-helper-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .container { padding: 16px; }
  .split, .auth-grid { grid-template-columns: 1fr; }
  .nav { padding: 16px; align-items: flex-start; flex-direction: column; }
  .modal-card, .modal-wide, .asset-entry-modal { width: 100%; min-width: 0; }
  .hero-row,
  .hero-actions { flex-wrap: wrap; }
  .hero-row { min-height: 0; }
  .hero-title { margin-bottom: 12px; }
  .download-modal-row { grid-template-columns: 1fr; }
  .download-segment-config-grid,
  .download-date-range,
  .download-sort-row {
    grid-template-columns: 1fr;
  }
  .download-filter-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-wrap { gap: 18px; }
  .auth-grid { width: min(540px, 100%); }
  .asset-category-grid .table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .asset-category-grid table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
  }
  .asset-category-grid th,
  .asset-category-grid td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }
  .asset-history-head,
  .asset-history-detail-row { display: grid; }
  .time-filter-datetime-row { grid-template-columns: minmax(0, 1fr); }
  .column-visibility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .column-visibility-grid { grid-template-columns: minmax(0, 1fr); }
  .download-filter-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-grid { grid-template-columns: minmax(0, 1fr); }
}


.audit-detail-row {
  cursor: pointer;
}
.audit-detail-row:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: -2px;
}
.audit-detail-row.is-active-audit-row td {
  background: var(--theme-primary-soft-2);
}
.audit-detail-modal-card {
  width: min(920px, 100%);
}
.audit-detail-toggle-bar {
  margin-bottom: 14px;
}
.audit-detail-content {
  min-height: 220px;
}
.audit-detail-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5b748f;
}
.audit-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.audit-detail-list-item,
.audit-detail-tree-node {
  border: 1px solid #d5e3f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.audit-detail-list-item.is-provided,
.audit-detail-tree-node.is-provided {
  background: #e8f7ef;
  color: #11613f;
  border-color: #b9e6cf;
}
.audit-detail-list-item.is-missing,
.audit-detail-tree-node.is-missing {
  background: #fdeceb;
  color: #a33630;
  border-color: #f4c5c1;
}
.audit-detail-list-item.is-na,
.audit-detail-tree-node.is-na {
  background: whitesmoke;
  color: #111111;
  border-color: #d7d7d7;
}
.audit-detail-node-label {
  font-weight: 600;
}
.audit-detail-tree .download-filter-tree-children {
  margin-top: 10px;
}

.office-row-inactive td {
  background: #e5e7eb;
  color: #111827;
}
.office-row-inactive td .status-inactive {
  color: #111827;
}
.office-row-inactive input,
.office-row-inactive select,
.office-row-inactive textarea {
  background: #f3f4f6;
  color: #111827;
  border-color: #cbd5e1;
}
.audit-page-topbar {
  justify-content: space-between;
  align-items: center;
}
.audit-detail-modal-card {
  position: relative;
  width: min(920px, 100%);
  padding-top: 48px;
}
.audit-detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
}
.audit-detail-head {
  margin-bottom: 8px;
}
.audit-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.audit-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.audit-detail-count {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eef4f9;
  color: #17324d;
  font-weight: 700;
}
.office-row-no-provider td {
  background: #eceff3;
  color: #111827;
}
.office-row-no-provider td .status-inactive,
.office-row-no-provider td .status-active,
.office-row-no-provider td span {
  color: #111827;
}
.office-row-no-provider input,
.office-row-no-provider select,
.office-row-no-provider textarea {
  background: #f5f6f8;
  color: #111827;
  border-color: #d2d8e0;
}
@media (max-width: 900px) {
  .audit-detail-toolbar {
    align-items: flex-start;
  }
}
