:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #18324a;
  background: #f3f7fb;
  font-synthesis: none;
  --navy-950: #0b2944;
  --navy-900: #12375b;
  --blue-800: #174d78;
  --blue-700: #1b5a8d;
  --blue-600: #2f78ad;
  --blue-100: #dcecf7;
  --blue-050: #eff7fc;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --canvas: #f3f7fb;
  --border: #dce6ef;
  --border-strong: #c8d7e5;
  --text: #18324a;
  --muted: #62758a;
  --subtle: #8292a2;
  --success: #20735a;
  --success-bg: #eaf6f1;
  --warning: #8a5c18;
  --warning-bg: #fff7e8;
  --danger: #a23b3b;
  --danger-bg: #fff0f0;
  --shadow-sm: 0 5px 18px rgba(22, 55, 86, .07);
  --shadow-md: 0 18px 55px rgba(12, 45, 73, .13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 340px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 340px;
  min-height: 100vh;
  color: var(--text);
  background: var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 120, 173, .28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 6px;
  color: #fff;
  background: var(--navy-950);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.skip-app {
  display: none;
}

body.is-authenticated .skip-login {
  display: none;
}

body.is-authenticated .skip-app {
  display: block;
}

.eyebrow {
  margin: 0;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.muted,
.page-description,
.modal-description {
  color: var(--muted);
  line-height: 1.8;
}

.brand-mark {
  display: inline-grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 0 8px 20px rgba(11, 41, 68, .18);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-mark-small {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 21px;
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.primary-button {
  color: #fff;
  background: var(--blue-700);
  box-shadow: 0 7px 16px rgba(27, 90, 141, .16);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-800);
}

.secondary-button {
  border: 1px solid var(--border-strong);
  color: var(--blue-800);
  background: #fff;
}

.secondary-button:hover:not(:disabled) {
  border-color: #9fb8ce;
  background: var(--blue-050);
}

.quiet-button {
  border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.quiet-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .16);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.danger-button:hover:not(:disabled) {
  background: #853030;
}

.icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  color: #587087;
  background: #f1f5f8;
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover:not(:disabled) {
  color: var(--navy-900);
  background: #e5edf4;
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.28fr) minmax(440px, .92fr);
  background: #edf4f9;
}

.login-scene {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 46px clamp(48px, 6vw, 96px) 38px;
  color: var(--navy-950);
  background:
    radial-gradient(circle at 79% 17%, rgba(255, 255, 255, .9), transparent 21%),
    linear-gradient(145deg, #dcecf6 0%, #eff7fb 49%, #cfe3f0 100%);
}

.login-scene::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(38, 94, 135, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 94, 135, .04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .46), transparent 75%);
}

.login-brand,
.app-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-owner,
.brand-subtitle,
.app-brand-title,
.app-brand-subtitle {
  margin: 0;
}

.brand-owner {
  color: var(--navy-900);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-subtitle {
  margin-top: 5px;
  color: #5d7890;
  font-size: 12px;
  letter-spacing: 1px;
}

.scene-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin-top: clamp(78px, 12vh, 140px);
}

.scene-copy h1 {
  max-width: 660px;
  margin: 19px 0 0;
  color: var(--navy-950);
  font-size: clamp(28px, 2.55vw, 43px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.35;
}

.scene-copy h2 {
  margin: 31px 0 0;
  color: var(--blue-700);
  font-size: clamp(24px, 2.1vw, 35px);
  font-weight: 600;
  line-height: 1.45;
}

.scene-copy h2 span {
  color: var(--navy-900);
}

.scene-lead {
  max-width: 550px;
  margin: 20px 0 0;
  color: #516e86;
  font-size: 15px;
  line-height: 2;
}

.security-points {
  display: grid;
  max-width: 525px;
  gap: 10px;
  margin: 29px 0 0;
  padding: 0;
  list-style: none;
}

.security-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #365a76;
  font-size: 13px;
  line-height: 1.65;
}

.security-points li span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid rgba(35, 98, 143, .22);
  border-radius: 50%;
  color: var(--blue-700);
  background: rgba(255, 255, 255, .6);
  font-size: 10px;
  font-weight: 700;
}

.landscape-art {
  position: absolute;
  z-index: 1;
  right: -6%;
  bottom: -16px;
  width: min(900px, 108%);
  height: auto;
  pointer-events: none;
}

.landscape-sky {
  fill: transparent;
}

.landscape-sun {
  fill: rgba(255, 255, 255, .58);
}

.mountain-back {
  fill: rgba(108, 158, 191, .18);
}

.mountain-mid {
  fill: rgba(79, 136, 174, .19);
}

.river {
  fill: rgba(242, 249, 252, .72);
}

.city {
  fill: rgba(38, 91, 127, .2);
}

.city-line,
.landscape-line {
  fill: none;
  stroke: rgba(31, 85, 123, .28);
  stroke-width: 2;
}

.scene-status {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: #527188;
  font-size: 11px;
  letter-spacing: .3px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d8267;
  box-shadow: 0 0 0 4px rgba(45, 130, 103, .1);
}

.scene-status-divider {
  width: 1px;
  height: 12px;
  margin: 0 4px;
  background: #a9bfce;
}

.login-card-side {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px clamp(34px, 5vw, 78px) 24px;
  background: #f8fafc;
}

.login-card {
  width: min(438px, 100%);
  padding: clamp(34px, 4.2vw, 50px);
  border: 1px solid rgba(202, 218, 231, .9);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.login-card-heading h2 {
  margin: 12px 0 8px;
  color: var(--navy-950);
  font-size: 29px;
  line-height: 1.35;
}

.login-card-heading .muted {
  margin: 0;
  font-size: 13px;
}

.login-card form {
  margin-top: 30px;
}

.field-group {
  margin-top: 18px;
}

.field-group:first-child {
  margin-top: 0;
}

.field-group label,
.toolbar-selects label {
  display: block;
  margin: 0 0 8px;
  color: #2a435a;
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  background: #fbfdff;
  padding: 8px 12px;
  outline: none;
}

input::placeholder {
  color: #9aa8b5;
}

input:hover,
select:hover {
  border-color: #a9bfd2;
}

input:focus,
select:focus {
  border-color: var(--blue-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 120, 173, .11);
}

.login-button {
  width: 100%;
  min-height: 46px;
  margin-top: 28px;
}

.login-footnote {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid #e9eff4;
}

.login-footnote p {
  margin: 0;
  color: #7a8997;
  font-size: 11px;
  line-height: 1.7;
}

.shield-icon {
  display: inline-grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: var(--success-bg);
  font-size: 11px;
  font-weight: 700;
}

.login-copyright {
  margin: 24px 0 0;
  color: #93a0ad;
  font-size: 10px;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  background: var(--canvas);
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 0 3px 12px rgba(10, 38, 63, .15);
}

.app-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .6px;
}

.app-brand-subtitle {
  margin-top: 3px;
  color: #bfd0df;
  font-size: 10px;
  letter-spacing: .5px;
}

.header-actions,
.header-identity {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 18px;
}

.header-identity {
  gap: 10px;
}

.role-badge {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 99px;
  padding: 5px 10px;
  color: #deebf5;
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
}

.header-account {
  max-width: 190px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  display: grid;
  min-height: calc(100vh - 103px);
  grid-template-columns: 232px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  height: calc(100vh - 68px);
  flex-direction: column;
  padding: 26px 16px 20px;
  border-right: 1px solid var(--border);
  background: #fff;
}

.nav-caption {
  margin: 0 13px 11px;
  color: #91a0ad;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #536a7e;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: var(--blue-800);
  background: var(--blue-050);
}

.nav-item.is-current,
.nav-item.active,
.nav-item[aria-current="page"] {
  color: var(--blue-800);
  background: #e8f2f9;
  font-weight: 700;
}

.nav-icon {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #d2e0eb;
  border-radius: 7px;
  color: var(--blue-700);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.nav-item.is-current .nav-icon,
.nav-item.active .nav-icon,
.nav-item[aria-current="page"] .nav-icon {
  border-color: var(--blue-700);
  color: #fff;
  background: var(--blue-700);
}

.sidebar-boundary {
  margin-top: auto;
  padding: 15px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
}

.sidebar-boundary p {
  margin: 0;
  color: #52687b;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-boundary ul {
  margin: 9px 0 13px;
  padding: 0 0 0 15px;
  color: #7a8996;
  font-size: 10px;
  line-height: 1.8;
}

.environment-badge {
  display: inline-block;
  color: #64778a;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.app-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px clamp(28px, 4vw, 58px) 48px;
}

.page-panel {
  animation: page-in .2s ease-out;
}

@keyframes page-in {
  from { opacity: .55; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 9px 0 7px;
  color: var(--navy-950);
  font-size: 25px;
  line-height: 1.35;
}

.page-description {
  max-width: 720px;
  margin: 0;
  font-size: 13px;
}

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

.summary-card,
.content-card,
.table-card,
.permission-state {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.summary-card {
  position: relative;
  min-height: 144px;
  overflow: hidden;
  padding: 22px 23px;
}

.summary-card::after {
  position: absolute;
  right: -25px;
  bottom: -31px;
  width: 92px;
  height: 92px;
  border: 16px solid rgba(47, 120, 173, .05);
  border-radius: 50%;
  content: "";
}

.summary-card-primary {
  border-top: 3px solid var(--blue-700);
}

.card-label,
.card-value,
.card-note {
  position: relative;
  z-index: 1;
  margin: 0;
}

.card-label {
  color: var(--muted);
  font-size: 12px;
}

.card-value {
  margin-top: 13px;
  overflow-wrap: anywhere;
  color: var(--navy-900);
  font-size: 20px;
  font-weight: 700;
}

.card-note {
  margin-top: 10px;
  color: #8a98a6;
  font-size: 11px;
}

.content-card {
  margin-top: 18px;
  padding: 25px;
}

.content-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf1f5;
}

.content-card-heading h2,
.permission-state h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 16px;
}

.content-card-heading p,
.permission-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.scope-chip {
  flex: 0 0 auto;
  border-radius: 99px;
  padding: 5px 10px;
  color: var(--success);
  background: var(--success-bg);
  font-size: 10px;
  font-weight: 700;
}

.company-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 19px 0 0;
  padding: 0;
  list-style: none;
}

.company-list li {
  position: relative;
  min-height: 46px;
  border: 1px solid #e2eaf1;
  border-radius: 7px;
  padding: 13px 14px 12px 35px;
  color: #34536d;
  background: #f8fbfd;
  font-size: 12px;
  line-height: 1.55;
}

.company-list li::before {
  position: absolute;
  top: 17px;
  left: 15px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  content: "";
  background: var(--blue-600);
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 4px 7px;
  color: var(--muted);
}

.empty-state-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #7d90a2;
  background: var(--surface-muted);
}

.empty-state strong {
  color: #405a70;
  font-size: 13px;
}

.empty-state p {
  margin: 5px 0 0;
  font-size: 11px;
}

.permission-state {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
}

.permission-state-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 20px;
  font-weight: 700;
}

.account-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.toolbar-search {
  width: min(330px, 100%);
}

.toolbar-search input {
  height: 38px;
}

.toolbar-selects {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-selects label {
  margin: 0 2px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.account-count {
  margin: 0 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.account-count strong {
  color: var(--navy-900);
  font-size: 13px;
}

.toolbar-selects select {
  width: auto;
  min-width: 112px;
  height: 38px;
  padding-right: 30px;
}

.table-card {
  position: relative;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 15px 17px;
  border-bottom: 1px solid #edf1f5;
  color: #425b70;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #687b8d;
  background: #f7f9fb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfdff;
}

th:nth-child(1) { width: 18%; }
th:nth-child(2) { width: 12%; }
th:nth-child(3) { width: 9%; }
th:nth-child(4) { width: 23%; }
th:nth-child(5) { width: 16%; }
th:nth-child(6) { width: 22%; }

.account-name {
  color: var(--navy-900);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.scope-summary {
  color: #5e7386;
  line-height: 1.6;
}

td > small,
.company-card small,
.company-option small {
  display: block;
  margin-top: 4px;
  color: #8392a0;
  font-size: 9px;
  line-height: 1.45;
}

.company-name,
.company-key {
  display: block;
}

.company-name {
  color: #34536d;
  font-weight: 650;
}

.company-key {
  overflow-wrap: anywhere;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-buttons button {
  min-height: 30px;
  border: 1px solid #d6e1ea;
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--blue-800);
  background: #fff;
  font-size: 10px;
}

.action-buttons button:hover:not(:disabled) {
  border-color: #aac0d2;
  background: var(--blue-050);
}

.badge {
  display: inline-block;
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-active {
  color: var(--success);
  background: var(--success-bg);
}

.badge-inactive {
  color: #768493;
  background: #edf1f4;
}

.badge-admin {
  color: #6a4a8d;
  background: #f3edf9;
}

.badge-entry {
  color: var(--blue-800);
  background: #e8f2f9;
}

.badge-viewer {
  color: #6b5d27;
  background: #f8f4e5;
}

.badge-role {
  color: var(--blue-800);
  background: #e8f2f9;
}

.loading-state {
  padding: 25px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.empty-state-centered {
  justify-content: center;
  padding: 38px 20px;
}

.security-card {
  max-width: 720px;
  margin-top: 0;
}

.security-card-note {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  color: #49647a;
  background: var(--blue-050);
}

.security-card-note > span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
}

.security-card-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}

.narrow-form {
  max-width: 470px;
  margin-top: 24px;
}

.narrow-form .primary-button {
  margin-top: 8px;
}

.form-hint,
.form-notice,
.form-error {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.form-hint {
  color: #7b8997;
}

.form-notice {
  border-left: 3px solid #9ab8cd;
  padding: 8px 10px;
  color: #62788b;
  background: #f7fafc;
}

.form-error {
  min-height: 19px;
  color: var(--danger);
}

.app-footer {
  height: 35px;
  border-top: 1px solid var(--border);
  color: #8a99a7;
  background: #fff;
  font-size: 9px;
  line-height: 35px;
  text-align: center;
}

.status-message {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  max-width: min(440px, calc(100vw - 48px));
  min-height: 0;
  margin: 0;
  border: 1px solid #b9d9ca;
  border-radius: 8px;
  padding: 11px 14px;
  color: #1d654e;
  background: #f2fbf7;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  line-height: 1.6;
}

.status-message:empty {
  display: none;
}

#message.error,
.status-message.error,
.status-message.is-error {
  border-color: #ecc5c5;
  color: var(--danger);
  background: #fff7f7;
}

.global-busy {
  position: fixed;
  z-index: 95;
  top: 80px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #c9d7e3;
  border-radius: 99px;
  padding: 9px 14px;
  color: #486276;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  transform: translateX(-50%);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #d3e0e9;
  border-top-color: var(--blue-700);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 27px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 32, 52, .27);
}

.modal-wide {
  width: min(680px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(9, 33, 54, .55);
  backdrop-filter: blur(2px);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-heading h2 {
  margin: 8px 0 0;
  color: var(--navy-950);
  font-size: 21px;
}

.modal-description {
  margin: 13px 0 0;
  font-size: 12px;
}

.modal form {
  margin-top: 22px;
}

.account-context {
  margin: 15px 0 0;
  border-radius: 7px;
  padding: 10px 12px;
  color: #5c7183;
  background: #f5f8fa;
  font-size: 12px;
}

.account-context strong {
  color: var(--navy-900);
  overflow-wrap: anywhere;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
}

.check-row input,
.mode-option input,
.company-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  accent-color: var(--blue-700);
}

.check-row strong,
.check-row small,
.mode-option strong,
.mode-option small {
  display: block;
}

.check-row strong,
.mode-option strong {
  color: #344f65;
  font-size: 12px;
}

.check-row small,
.mode-option small {
  margin-top: 4px;
  color: #7b8a98;
  font-size: 10px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #edf1f4;
}

.option-fieldset,
.scope-mode-fieldset {
  min-width: 0;
  margin: 18px 0 0;
  border: 0;
  padding: 0;
}

.option-fieldset legend,
.scope-mode-fieldset legend {
  margin-bottom: 10px;
  color: #324c62;
  font-size: 12px;
  font-weight: 700;
}

.company-options {
  display: grid;
  max-height: 245px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fafcfd;
}

.company-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px;
  color: #496277;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.5;
}

.company-option:hover {
  border-color: #c8d9e6;
}

.company-option > span {
  min-width: 0;
}

.company-option > span > span {
  display: block;
  overflow-wrap: anywhere;
  color: #425f75;
  font-weight: 650;
}

.scope-mode-fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scope-mode-fieldset legend {
  grid-column: 1 / -1;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 10px;
  cursor: pointer;
}

.mode-option:has(input:checked) {
  border-color: var(--blue-600);
  background: var(--blue-050);
  box-shadow: inset 0 0 0 1px rgba(47, 120, 173, .12);
}

.warning-box {
  margin-top: 13px;
  border: 1px solid #eed8af;
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--warning);
  background: var(--warning-bg);
}

.warning-box strong {
  font-size: 12px;
}

.warning-box p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .login-screen {
    grid-template-columns: minmax(420px, 1fr) minmax(400px, .9fr);
  }

  .login-scene {
    padding-inline: 45px;
  }

  .scene-copy {
    margin-top: 90px;
  }

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

  .identity-grid .summary-card:last-child {
    grid-column: 1 / -1;
  }

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

  .account-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-search {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .login-screen {
    display: block;
    background:
      linear-gradient(rgba(236, 246, 251, .88), rgba(247, 250, 252, .98)),
      linear-gradient(145deg, #dcecf6, #f5f9fc);
  }

  .login-scene {
    min-height: auto;
    padding: 25px 24px 54px;
    background: transparent;
  }

  .scene-copy {
    margin-top: 48px;
  }

  .scene-copy h1 {
    font-size: 27px;
  }

  .scene-copy h2 {
    margin-top: 20px;
    font-size: 24px;
  }

  .scene-lead {
    margin-top: 12px;
  }

  .security-points,
  .scene-status {
    display: none;
  }

  .landscape-art {
    right: -24%;
    bottom: -52px;
    width: 112%;
    opacity: .62;
  }

  .login-card-side {
    min-height: auto;
    padding: 0 20px 32px;
    background: transparent;
  }

  .login-card {
    margin-top: -22px;
  }

  .app-header {
    height: 64px;
    padding: 0 17px;
  }

  .app-brand-subtitle,
  .header-identity .role-badge {
    display: none;
  }

  .workspace {
    display: block;
    min-height: calc(100vh - 99px);
  }

  .app-sidebar {
    position: sticky;
    z-index: 15;
    top: 64px;
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav {
    display: flex;
    min-width: max-content;
    gap: 4px;
  }

  .nav-caption,
  .sidebar-boundary {
    display: none;
  }

  .nav-item {
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 6px 11px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .app-main {
    padding: 27px 20px 40px;
  }

  .page-heading {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .brand-owner {
    font-size: 15px;
  }

  .brand-subtitle {
    display: none;
  }

  .login-card {
    padding: 30px 25px;
  }

  .app-brand-title {
    max-width: 205px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark-small {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 18px;
  }

  .header-account {
    display: none;
  }

  .page-heading {
    display: block;
  }

  .page-heading > button {
    width: 100%;
    margin-top: 16px;
  }

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

  .identity-grid .summary-card:last-child {
    grid-column: auto;
  }

  .company-list {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: 19px;
  }

  .toolbar-selects {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .toolbar-selects label {
    margin-left: 0;
  }

  .toolbar-selects select,
  .toolbar-selects button {
    width: 100%;
  }

  .toolbar-selects button {
    grid-column: 1 / -1;
  }

  .scope-mode-fieldset,
  .company-options {
    grid-template-columns: 1fr;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 22px 19px;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* R1 confirmed reference: continuous local landscape, full top bar and real form. */
.login-screen { display: flex; flex-direction: column; min-height: 100vh; background: #eaf3fc; }
.login-topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 96px; padding: 18px clamp(32px,4vw,78px); border-bottom: 1px solid #e4edf6; background: linear-gradient(110deg,#fff 25%,#f0f7ff 65%,#fff); }
.login-topbar .brand-mark { width: 60px; height: 60px; border-radius: 16px; background: linear-gradient(145deg,#316ba1,#174573); box-shadow: 0 4px 10px #163c5d22; }
.login-topbar h1 { margin: 0; color: #123356; font-size: clamp(22px,1.6vw,30px); line-height: 1.35; font-weight: 750; letter-spacing: .3px; }
.login-topbar .brand-subtitle { margin: 7px 0 0; color: #69809a; font-size: 13px; letter-spacing: 2px; }
.login-topbar-meta { display: flex; align-items: center; gap: 28px; font-size: 13px; color: #57708d; white-space: nowrap; }
.local-badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #bbd8f7; border-radius: 30px; padding: 10px 20px; color: #275783; background: #e9f3ff; font-weight: 650; }
.local-badge > span { font-size: 17px; }
.topbar-values { display: flex; align-items: center; gap: 15px; }
.topbar-values > span { border-left: 1px solid #c6d5e5; padding-left: 15px; }
.login-content { position: relative; isolation: isolate; display: grid; flex: 1; grid-template-columns: minmax(0,1fr) minmax(440px, .72fr); align-items: stretch; gap: clamp(36px,5vw,96px); min-height: 760px; padding: 54px clamp(32px,4vw,78px) 32px; }
.login-content::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(180deg,#eef6ff60 0%,transparent 45%,#dceeff55 100%); pointer-events: none; }
.login-landscape { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; pointer-events: none; }
.login-scene { display: flex; position: relative; min-height: 0; padding: 0; overflow: visible; flex-direction: column; color: #15385e; background: none; }
.login-scene::before { display: none; }
.scene-copy { margin: 30px 0 0; max-width: 680px; }
.scene-copy h2 { margin: 0; color: #12375f; font-size: clamp(48px,4.05vw,78px); line-height: 1.26; letter-spacing: 2px; font-weight: 800; text-shadow: 0 2px 0 #ffffff70; }
.scene-accent { display: block; width: 66px; height: 4px; margin-top: 25px; background: linear-gradient(90deg,#2b79c0,#4acfe3); }
.scene-lead { max-width: 630px; margin: 25px 0 0; color: #234a71; font-size: clamp(15px,1.03vw,19px); line-height: 1.9; text-shadow: 0 1px 3px #fff; }
.scene-motto { position: absolute; top: 18px; right: -5px; color: #285781; letter-spacing: 3px; line-height: 1.75; }
.scene-motto p { margin: 0; font-size: 16px; }
.scene-motto > span { display: block; width: 38px; height: 2px; margin: 17px 0; background: #4181b6; }
.scene-motto small { font-size: 12px; }
.assurance-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: auto; padding: 23px 26px; border: 1px solid #ffffff75; border-radius: 14px; background: #f4f9ffe0; box-shadow: 0 7px 35px #285a8310; backdrop-filter: blur(5px); }
.assurance-item { display: flex; gap: 15px; align-items: flex-start; }
.assurance-item > svg { width: 34px; height: 34px; flex: 0 0 34px; fill: none; stroke: #235681; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.assurance-item strong { display: block; font-size: 14px; color: #204e7c; }
.assurance-item p { margin: 6px 0 0; color: #607e99; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.login-card-side { min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; }
.login-card { margin: 0; width: 100%; max-width: 610px; padding: clamp(34px,3vw,54px); border: 1px solid #dce9f7; border-radius: 17px; box-shadow: 0 8px 55px #3e7ca52a; background: #fffffffa; }
.login-card-heading .eyebrow { color: #315779; font-weight: 500; font-size: 15px; letter-spacing: 0; margin: 0; }
.login-card-heading h2 { margin: 17px 0 5px; font-size: clamp(22px,1.55vw,30px); line-height: 1.45; color: #183b60; letter-spacing: -.5px; }
.login-card-subtitle { margin: 0 0 26px; color: #264767; font-size: 21px; }
.login-card-heading .muted { font-size: 14px; color: #75859a; line-height: 1.7; }
.login-card form { margin-top: 30px; }
.login-card .field-group { margin-top: 23px; }
.login-card .field-group:first-child { margin-top: 0; }
.login-card .field-group label { margin-bottom: 9px; font-size: 14px; color: #203e5e; }
.login-input-wrap { position: relative; }
.login-input-wrap > svg { position: absolute; top: 50%; left: 17px; transform: translateY(-50%); width: 23px; height: 23px; stroke: #7086a0; fill: none; stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.login-input-wrap input { height: 54px; padding-left: 52px; font-size: 15px; border-radius: 8px; background: linear-gradient(#fff,#f8fbff); border-color: #c4d3e3; }
.login-button { display: flex; justify-content: center; align-items: center; gap: 20px; min-height: 55px; width: 100%; margin-top: 26px; font-size: 18px; font-weight: 500; letter-spacing: 3px; background: linear-gradient(105deg,#245f92,#214f7e); box-shadow: 0 4px 10px #234f7d15; }
.login-button > span { font-size: 28px; line-height: 1; font-weight: 300; }
.login-validation-note { display: flex; gap: 11px; margin-top: 29px; padding: 17px 16px; border-radius: 10px; background: #edf5ff; color: #597391; }
.login-validation-note > span { display: grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #2d80da; color: #fff; font-size: 12px; font-style: normal; font-weight: 700; }
.login-validation-note strong { font-size: 11px; font-weight: 500; line-height: 1.7; }
.login-validation-note p { margin: 6px 0 0; font-size: 11px; line-height: 1.8; }
.login-privacy-note { margin: 16px 0 0; color: #7d8e9f; font-size: 10px; line-height: 1.7; }
.login-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; min-height: 54px; padding: 14px clamp(32px,4vw,78px); background: #f9fbff; color: #778ba2; font-size: 11px; line-height: 1.7; }
@media (min-width:1600px) {
  .login-content { grid-template-columns: minmax(0,1fr) 610px; }
  .scene-motto { top: 16px; }
}
@media (max-width:1500px) {
  .login-topbar { min-height: 84px; padding-block: 13px; }
  .login-topbar .brand-mark { width: 50px; height: 50px; border-radius: 12px; }
  .login-content { min-height: 630px; gap: 36px; padding-top: 36px; padding-bottom: 24px; grid-template-columns: minmax(0,1fr) minmax(400px,.78fr); }
  .scene-copy { margin-top: 26px; max-width: 500px; }
  .scene-copy h2 { font-size: 58px; }
  .scene-lead { font-size: 16px; }
  .scene-motto { top: 26px; right: -5px; letter-spacing: 2px; }
  .scene-motto p { font-size: 13px; }
  .scene-motto small { font-size: 10px; }
  .login-card { padding: 32px 36px; }
  .login-card-heading h2 { font-size: 24px; }
  .login-card-subtitle { font-size: 19px; margin-bottom: 20px; }
  .assurance-strip { gap: 12px; padding: 20px 17px; }
  .assurance-item { gap: 10px; }
  .assurance-item > svg { width: 28px; height: 28px; flex-basis: 28px; }
  .assurance-item strong { font-size: 12px; }
}
@media (max-width:1270px) {
  .topbar-values { display: none; }
  .login-content { gap: 30px; min-height: 640px; grid-template-columns: minmax(0,1fr) 420px; padding-inline: 32px; }
  .scene-copy h2 { font-size: 49px; }
  .scene-motto { position: static; margin: 32px 0 0; }
  .scene-motto p { font-size: 13px; }
  .scene-motto > span { display: none; }
  .scene-motto small { display: block; margin-top: 9px; }
  .assurance-strip { gap: 14px; padding: 16px; margin-top: auto; }
  .assurance-item { display: block; }
  .assurance-item > svg { width: 27px; height: 27px; margin-bottom: 8px; }
  .assurance-item p { font-size: 10px; }
  .login-card { padding: 30px; }
}
@media (max-width:860px) {
  .login-topbar { padding: 17px 22px; gap: 14px; }
  .login-topbar h1 { font-size: 19px; }
  .login-topbar .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
  .login-topbar .brand-subtitle { font-size: 10px; letter-spacing: 1px; }
  .local-badge { padding: 7px 10px; font-size: 11px; }
  .login-content { display: flex; flex-direction: column; gap: 26px; min-height: 0; padding: 30px 22px; }
  .login-scene { min-height: 0; padding: 0; }
  .scene-copy { margin: 0; }
  .scene-copy h2 { font-size: 42px; }
  .scene-lead { font-size: 14px; }
  .scene-motto, .assurance-strip { display: none; }
  .login-card-side { min-height: 0; padding: 0; }
  .login-card { margin: 0; max-width: 540px; }
  .login-landscape { opacity: .55; object-position: 35% bottom; }
  .login-footer { padding: 14px 22px; }
}
/* R2: content localization only; preserve the approved landscape and layout. */
.version-details { display: block; font-size: 12px; line-height: 1.7; }
.version-details summary { cursor: pointer; color: #385b79; }
.version-details:not([open]) > :not(summary) { display: none; }
.account-name, .company-name, .scope-summary, .header-account, .card-value, .account-context { overflow-wrap: anywhere; }
.company-option > span { min-width: 0; overflow-wrap: anywhere; }
/* Debt core uses the existing PC shell; no alternate visual theme. */
.debt-filters,.debt-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}
.debt-filters{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}
.debt-form textarea{min-height:90px;resize:vertical;width:100%;padding:12px;border:1px solid #cad7e5;border-radius:8px;font:inherit}
.debt-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;grid-column:1/-1;margin:16px 0}
.debt-table{width:100%;border-collapse:collapse;margin-top:22px;min-width:850px}.debt-table th,.debt-table td{padding:14px 10px;text-align:left;border-bottom:1px solid #e5ecf3;overflow-wrap:anywhere}
.debt-table th:nth-child(1){width:23%}.debt-table th:nth-child(2){width:13%}.debt-table th:nth-child(3){width:21%}.debt-table th:nth-child(4){width:11%}.debt-table th:nth-child(5){width:12%}.debt-table th:nth-child(6){width:10%}.debt-table th:nth-child(7){width:10%}
.debt-table td:last-child button{min-width:0;padding:9px 10px;white-space:normal}.debt-status{color:var(--success);margin:14px 0;line-height:1.6}
.debt-detail{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,3fr);gap:0;margin:20px 0}.debt-detail dt,.debt-detail dd{margin:0;padding:12px;border-bottom:1px solid #e5ecf3;overflow-wrap:anywhere;white-space:pre-wrap}.debt-detail dt{color:#526780;background:#f5f8fc}
.debt-change{padding:12px;border-bottom:1px solid #e5ecf3}.debt-change summary{cursor:pointer}.debt-change li{overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:1100px){.debt-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
.debt-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}
.debt-form-grid textarea{width:100%;min-height:82px;padding:12px;border:1px solid #cad7e5;border-radius:8px;font:inherit;resize:vertical}
.debt-detail-grid{display:grid;grid-template-columns:minmax(150px,1fr) minmax(0,3fr);margin:24px 0}
.debt-detail-grid dt,.debt-detail-grid dd{padding:12px;margin:0;border-bottom:1px solid #e5ecf3;white-space:pre-wrap;overflow-wrap:anywhere}
.debt-detail-grid dt{background:#f5f8fc;color:#526780}
.core-summary{display:flex;gap:18px;flex-wrap:wrap;padding:22px 0}.core-summary p{width:100%;margin:0;color:#526780}
.core-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}
.core-chart{padding:20px;background:#f8fbff;border:1px solid #dce6f2;border-radius:12px;min-width:0}
.core-chart-row{margin:14px 0}.core-chart-row button{padding:6px 0;text-align:left;border:0;background:transparent;max-width:100%;overflow-wrap:anywhere}
.core-chart-track{height:16px;background:#e4edf7;border-radius:4px}.core-chart-bar{height:16px;background:#2469ad;border-radius:4px}
#core-workspace:fullscreen{background:#fff;padding:36px;overflow:auto}.core-chart-grid>.debt-table{grid-column:1/-1;min-width:0}
@media(max-width:1100px){.core-chart-grid{grid-template-columns:1fr}}
.primary-nav{display:grid;gap:7px}
.nav-group{min-width:0}
.nav-group>summary{list-style:none;cursor:pointer}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-chevron{margin-left:auto;font-size:24px;line-height:1;transition:transform .15s ease}
.nav-group[open] .nav-chevron{transform:rotate(90deg)}
.nav-children{margin:6px 0 12px 24px;padding-left:12px;border-left:1px solid #cadbe9}
.nav-mode{margin-left:auto;font-size:10px;white-space:nowrap;color:inherit}
.nav-item.nav-subitem{min-height:38px;padding:8px 14px;margin:3px 0;font-size:14px}
body.is-cockpit .nav-children{border-left-color:#2c5369}
body.is-cockpit .nav-group>summary:focus-visible{outline-color:#76ebe2}
@media(max-width:960px){.primary-nav{display:flex;flex-wrap:wrap;min-width:0;align-items:flex-start;gap:4px}.nav-group>summary{width:auto}.nav-children{margin-left:12px}}
.core-workbench-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px;padding:14px;background:#fff;border:1px solid #dce6f2;border-radius:12px}
.core-workbench-shortcuts button{font-size:14px;min-height:40px}
.core-workbench-shortcuts button.is-current{border-color:#276a9d;background:#e7f1fa;color:#174d78;font-weight:700}
.core-event-timeline{padding-left:24px;border-left:2px solid #b8d4e8;margin-left:8px}
.core-event-timeline li{padding:8px 0 14px 8px;overflow-wrap:anywhere}
.core-event-timeline p{margin:6px 0;color:#49647c}
.core-import-steps{display:flex;flex-wrap:wrap;gap:8px;list-style-position:inside;padding:0;margin:18px 0}
.core-import-steps li{padding:10px 14px;border:1px solid #c8d8e7;border-radius:8px;color:#49647c;background:#f6f9fc;font-size:14px}
.core-import-steps .is-complete{background:#eff8f6;border-color:#9ecdc1;color:#235d50}
.core-import-steps .is-current{background:#e9f2fc;border-color:#438ac0;color:#174d78;font-weight:700}
:root { --audit-border: #d6e2ed; }
.password-tools{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;margin:.45rem 0 .7rem;}
.password-tools .button-text{padding:.3rem .5rem;color:#16518a;background:#edf5fc;border:1px solid #c7dced;border-radius:.35rem;cursor:pointer;}
.password-tools span{font-size:.82rem;color:#42627e;flex-basis:100%;}
.audit-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin:1.3rem 0;padding:1rem;background:#f4f8fc;border:1px solid var(--audit-border);border-radius:.7rem;}
.audit-filters label{display:flex;flex-direction:column;gap:.4rem;font-size:.9rem;}
.audit-filters input,.audit-filters select{width:100%;min-width:0;box-sizing:border-box;padding:.55rem;border:1px solid #b9cee1;border-radius:.35rem;background:white;color:#173e60;}
#logs-page td{white-space:pre-line;word-break:break-word;min-width:8rem;vertical-align:top;}
#logs-page table{width:100%;border-collapse:collapse;} 
#logs-page th,#logs-page td{padding:.7rem;border-bottom:1px solid var(--audit-border);text-align:left;}
#logs-page .table-wrap{overflow:auto;}
#logs-page button,#status-page button{margin:.3rem;}
.modal pre{max-height:45vh;overflow:auto;white-space:pre-wrap;word-break:break-word;background:#f1f6fa;padding:1rem;}
.modal .field-group{display:flex;flex-direction:column;gap:.4rem;margin:.7rem 0;}
.modal .field-group input[type=checkbox]{width:1.2rem;height:1.2rem;}

/* The authorization dialog is isolated from the financial workspace. */
#wechat-authorization-dialog .wechat-authorization-image { display: block; width: 240px; max-width: 100%; height: auto; margin: 16px auto; border: 1px solid #dce3eb; background: #fff; }
#wechat-authorization-dialog .wechat-authorization-image[hidden] { display: none; }
#wechat-authorization-dialog .modal-actions { flex-wrap: wrap; }

/* Batch review on the financial list: explicit selection, count and amount before any write. */
.batch-review-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0;padding:12px 14px;border:1px solid #b9d4e8;border-radius:10px;background:#f2f8fd;}
.batch-review-summary{flex:1 1 300px;color:#34506a;font-size:13px;line-height:1.65;}
.batch-review-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.batch-review-actions button{min-height:38px;padding:8px 13px;font-size:12px;}
.batch-review-bar .quiet-button{background:transparent;color:var(--blue-800);}
.debt-table.review-table th:nth-child(1){width:44px;text-align:center;}
.debt-table.review-table th:nth-child(2){width:22%;}
.debt-table.review-table th:nth-child(3){width:12%;}
.debt-table.review-table th:nth-child(4){width:20%;}
.debt-table.review-table th:nth-child(5){width:10%;}
.debt-table.review-table th:nth-child(6){width:11%;}
.debt-table.review-table th:nth-child(7){width:10%;}
.debt-table.review-table th:nth-child(8){width:9%;}
.debt-table .review-select-cell{text-align:center;padding-left:6px;padding-right:6px;}
.review-select,#core-review-select-all{width:18px;height:18px;min-height:0;padding:0;margin:0;accent-color:var(--blue-700);cursor:pointer;background:initial;border:initial;box-shadow:none;vertical-align:middle;}
.batch-review-dialog-list{max-height:260px;overflow:auto;margin:14px 0;border:1px solid #dbe6f0;border-radius:8px;}
.batch-review-dialog-list table{width:100%;border-collapse:collapse;font-size:12px;}
.batch-review-dialog-list th,.batch-review-dialog-list td{padding:9px 10px;text-align:left;border-bottom:1px solid #e5ecf3;overflow-wrap:anywhere;}
.batch-review-dialog-list th{position:sticky;top:0;background:#f5f8fc;color:#526780;font-weight:600;}
.batch-review-dialog-list tr:last-child td{border-bottom:0;}
.batch-review-progress{min-height:20px;margin:10px 0 0;color:var(--blue-800);font-size:12px;line-height:1.6;}
.batch-review-result{margin:0 0 14px;padding:13px 15px;border:1px solid #c9dce9;border-radius:9px;background:#f6fafd;}
.batch-review-result h3{margin:0 0 6px;color:var(--navy-950);font-size:15px;}
.batch-review-result p{margin:0;color:#425c72;font-size:13px;line-height:1.65;}
.batch-review-failures{margin:9px 0 0;padding-left:20px;color:var(--danger);font-size:12px;line-height:1.7;}
.batch-review-failures li{margin:4px 0;overflow-wrap:anywhere;}
@media (max-width:760px){.batch-review-bar{align-items:stretch;}.batch-review-actions{width:100%;}.batch-review-actions button{flex:1 1 auto;}}
