/* Generated from config/asset-bundles.json; manifest-sha256: 8c302c4f78f6ec709831aad81fa2317971e7c73f17aa5d753ebedfa4d7b5884f */
:root {
  --primary: #071426;
  --primary-soft: #10233d;
  --accent: #06b6d4;
  --accent-strong: #0891b2;
  --agency-accent: #06b6d4;
  --dash-blue: #2563eb;
  --dash-green: #16a34a;
  --dash-amber: #f59e0b;
  --dash-violet: #8b5cf6;
  --dash-cyan: #06b6d4;
  --dash-red: #ef4444;
  --dash-blue-soft: #eff6ff;
  --dash-green-soft: #ecfdf3;
  --dash-amber-soft: #fffbeb;
  --dash-violet-soft: #f5f3ff;
  --dash-cyan-soft: #ecfeff;
  --dash-red-soft: #fef2f2;
  --danger: #c62828;
  --warning: #b26b00;
  --success: #237a3b;
  --info: #1f6feb;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-3: #e8edf4;
  --text: #172033;
  --muted: #64748b;
  --border: #d9e1ec;
  --shadow: 0 10px 28px rgba(7, 20, 38, 0.10);
  --shadow-sm: 0 4px 14px rgba(7, 20, 38, 0.08);
  --card-shadow: 0 8px 22px rgba(7, 20, 38, .06);
  --panel-gradient: linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,251,253,.96));
  --accent-panel-gradient: linear-gradient(90deg, color-mix(in srgb, var(--dash-cyan) 12%, transparent), transparent 42%);
  --sidebar-gradient: linear-gradient(180deg, #071426 0%, #08234a 52%, #061629 100%);
  --radius: 8px;
  --sidebar: 268px;
  --tooltip-delay: 180ms;
  --motion-fast: 56ms;
  --motion-base: 72ms;
  --ease-standard: cubic-bezier(.2,.8,.2,1);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--dash-cyan) 26%, transparent);
}
[hidden] { display: none !important; }
.qr-real {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  background: #fff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 400;
  overflow-x: hidden;
}
body.motion-instant {
  --motion-fast: 48ms;
  --motion-base: 64ms;
}
body.motion-reduced *,
body.motion-reduced *::before,
body.motion-reduced *::after {
  scroll-behavior: auto !important;
  transition-duration: 1ms !important;
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.hidden { display: none !important; }
.sr-only {
  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;
}
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 500;
  transform: translateY(-140%);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--motion-fast) var(--ease-standard);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

.login-view, .install-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(7, 20, 38, 0.94), rgba(16, 35, 61, 0.96)),
    url("../../uploads/logo.png");
  background-size: auto, 320px;
  background-position: center;
  background-repeat: repeat;
}
.login-card, .install-panel {
  width: min(440px, 100%);
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 36px;
}
.login-brand, .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0;
}
.login-brand { margin-bottom: 28px; }
.login-card .login-brand {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 10px;
}
.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  padding: 4px;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.login-card .brand-logo {
  width: 86px;
  height: 86px;
}
.login-language {
  display: flex;
  justify-content: center;
  margin: -12px 0 18px;
}
.login-brand strong, .sidebar-brand strong { display: block; color: var(--primary); }
.login-brand span, .sidebar-brand span { color: var(--accent); font-weight: 650; }
.login-card .login-brand strong,
.login-card .login-brand span {
  font-size: 22px;
  line-height: 1.05;
}
.login-card,
.login-card .login-brand strong,
.login-card .login-brand span,
.login-card h1,
.login-card p,
.login-card label,
.login-card .btn {
  font-weight: 400;
}
.login-card h1, .install-panel h1 { margin: 0 0 8px; font-size: 28px; }
.login-card h1, .login-card p { text-align: center; }
.login-card p, .install-panel p { margin: 0 0 24px; color: var(--muted); }
.login-view .legal-quick-links {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.login-view .legal-quick-links a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 28px rgba(0,0,0,.16);
  backdrop-filter: blur(12px);
  transition: transform var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard);
}
.login-view .legal-quick-links a:hover {
  transform: translateY(-2px);
  background: #fff;
}

.stack-form { display: grid; gap: 16px; }
.stack-form label, .install-form label { display: grid; gap: 7px; font-weight: 600; color: var(--text); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--dash-cyan) 28%, transparent);
  border-color: var(--accent);
}
.password-field {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}
.password-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.password-leading-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.password-field input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: 0;
}
.password-field input:focus {
  outline: 0;
  border-color: transparent;
}
.password-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface-2) 72%, #fff);
  color: var(--muted);
}
.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  background: var(--dash-cyan-soft);
  color: var(--dash-blue);
}

/* Login page adapted from the provided auth mockup, scoped to login only. */
.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 2vw, 20px);
  background: #eef3f8;
}
.login-view .auth-wrapper {
  width: min(940px, 100%);
  height: min(600px, calc(100dvh - 16px));
  min-height: 0;
  max-height: calc(100dvh - 16px);
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1fr);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(216, 225, 236, .9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 20, 38, .18);
}
.login-view .auth-form-box {
  min-width: 0;
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
}
.login-view .login-form-panel {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
  text-align: left;
  background: #fff;
}
.login-view .login-form-main {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}
.login-view .login-form-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.login-view .login-brand {
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin: 0;
  gap: 8px;
  text-align: center;
}
.login-view .login-brand .brand-logo {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(7, 20, 38, .10);
}
.login-view .login-brand strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 400;
}
.login-view .login-brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.login-view .login-language {
  width: min(190px, 100%);
  min-width: 0;
  margin: 0;
  justify-content: flex-start;
}
.login-view .login-language .language-control { width: 100%; }
.login-view :where(h1, h2, strong, b, label, button) {
  font-weight: 400 !important;
}
.login-view .language-control {
  max-width: 100%;
  overflow: hidden;
}
.login-view .language-control select {
  min-width: 0;
  min-height: 34px;
  padding: 6px 26px 6px 4px;
  font-size: 11px;
}
.login-view .login-form-panel h1 {
  margin: 0;
  color: var(--primary);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
}
.login-view .login-copy {
  max-width: 36rem;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.login-view .auth-field {
  position: relative;
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.login-view .auth-input-shell,
.login-view .password-field {
  min-height: 48px;
  display: grid;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fc;
  overflow: hidden;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}
.login-view .auth-input-shell {
  grid-template-columns: 44px minmax(0, 1fr);
}
.login-view .password-field {
  grid-template-columns: 44px minmax(0, 1fr) 46px;
}
.login-view .auth-input-shell:focus-within,
.login-view .password-field:focus-within {
  background: #fff;
  border-color: color-mix(in srgb, var(--dash-cyan) 55%, var(--dash-blue));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dash-cyan) 16%, transparent);
}
.login-view .auth-input-shell > i,
.login-view .password-leading-icon {
  width: 44px;
  display: grid;
  place-items: center;
  color: #7b8da6;
  font-size: 14px;
}
.login-view .auth-input-shell input,
.login-view .password-field input {
  min-width: 0;
  height: 46px;
  padding: 0 14px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}
.login-view .auth-input-shell input:focus,
.login-view .password-field input:focus {
  outline: 0;
  border-color: transparent;
}
.login-view .password-toggle {
  width: 46px;
  min-width: 46px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border-left: 1px solid rgba(216, 225, 236, .9);
  background: rgba(255,255,255,.72);
}
.login-view .login-submit {
  min-height: 48px;
  margin-top: 4px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--dash-blue) 24%, transparent);
}
.login-view .form-error {
  margin-top: 0;
}
.login-view .legal-quick-links {
  position: static;
  display: flex;
  gap: 8px;
  margin: 0;
}
.login-view .legal-quick-links a {
  width: 34px;
  height: 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(7,20,38,.07);
  transition: transform var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}
.login-view .legal-quick-links a:hover {
  transform: translateY(-2px);
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--dash-cyan) 36%, var(--border));
}
.login-view .language-control[data-tooltip]::after,
.login-view .password-toggle[data-tooltip]::after,
.login-view .legal-quick-links a[data-tooltip]::after {
  display: none;
}
.login-view .slide-panel-wrapper {
  min-height: 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
}
.login-view .slide-panel {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  color: #fff;
  background: #071426;
}
.login-view .slide-panel::before {
  content: none;
}
.login-view .panel-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
}
.login-view .panel-content p {
  max-width: 26rem;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.6;
}
.login-view .login-feature-grid {
  width: min(320px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.login-view .login-feature-grid span {
  min-width: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}
.login-view .login-feature-grid i {
  font-size: 17px;
  color: #a7f3ff;
}
.login-view .login-feature-grid b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .login-view {
    padding: 8px;
  }
  .login-view .auth-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: 132px minmax(0, 1fr);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 8px;
  }
  .login-view .slide-panel-wrapper {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }
  .login-view .panel-content {
    padding: 16px 20px;
    gap: 8px;
  }
  .login-view .panel-content p {
    max-width: 34rem;
    line-height: 1.35;
  }
  .login-view .login-brand { gap: 5px; }
  .login-view .login-brand .brand-logo { width: 48px; height: 48px; }
  .login-view .login-brand strong { font-size: 15px; }
  .login-view .login-feature-grid { display: none; }
  .login-view .login-form-panel {
    min-height: 0;
    padding: 18px 24px;
    gap: 12px;
  }
  .login-view .auth-form-box {
    grid-column: 1;
    grid-row: 2;
  }
}
@media (max-width: 520px) {
  .login-view .login-form-panel { padding: 14px 16px; }
  .login-view .login-form-main { gap: 10px; }
  .login-view .login-form-panel h1 { font-size: 24px; }
  .login-view .login-form-footer { gap: 8px; padding-top: 10px; }
  .login-view .login-language { width: min(190px, calc(100% - 122px)); }
  .login-view .legal-quick-links { gap: 6px; }
}
@media (max-height: 650px) and (min-width: 861px) {
  .login-view .auth-wrapper { height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .login-view .login-form-panel { padding-block: 18px; }
  .login-view .login-form-main { gap: 10px; }
  .login-view .panel-content { padding: 24px; }
}

[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 300;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(300px, 75vw);
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: #071426;
  color: #fff;
  box-shadow: 0 12px 28px rgba(7,20,38,.24);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease var(--tooltip-delay), transform .14s ease var(--tooltip-delay);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
[data-tooltip]:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tooltips-disabled [data-tooltip]::after {
  display: none;
}
.form-grid label,
.stack-form label,
.export-control label {
  position: relative;
}
.help-tip {
  position: absolute;
  top: 1px;
  right: 2px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--dash-cyan-soft);
  cursor: help;
}
.help-tip[data-tooltip]::after {
  left: auto;
  right: 0;
  transform: translateY(4px);
}
.help-tip[data-tooltip]:hover::after,
.help-tip[data-tooltip]:focus-visible::after {
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 650;
  text-decoration: none;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}
.btn-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--agency-accent) 88%, var(--dash-blue)), var(--dash-blue));
  color: #fff;
  border-color: color-mix(in srgb, var(--agency-accent) 72%, var(--dash-blue));
}
.btn-primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--agency-accent) 76%, var(--dash-blue)), #1d4ed8);
}
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.btn-secondary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { min-height: 32px; padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}
.icon-btn:hover {
  border-color: color-mix(in srgb, var(--agency-accent) 36%, var(--border));
  color: var(--agency-accent);
  box-shadow: 0 8px 18px rgba(7,20,38,.07);
}

.form-error, .alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--dash-red) 28%, var(--border));
  background: var(--dash-red-soft);
  color: var(--danger);
}
.alert-info { border-color: color-mix(in srgb, var(--dash-blue) 24%, var(--border)); background: var(--dash-blue-soft); color: var(--primary); }
.alert-success { border-color: color-mix(in srgb, var(--dash-green) 28%, var(--border)); background: var(--dash-green-soft); color: var(--success); }
.credential-box {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.install-form { display: grid; gap: 16px; }
.install-section-title {
  margin: 8px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.app-shell { min-height: 100vh; display: block; }
.sidebar {
  width: var(--sidebar);
  background: var(--sidebar-gradient);
  color: #d9e5f5;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  z-index: 40;
}
.sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand strong { color: #fff; }
.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; overflow-x: hidden; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.72);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin: 2px 0;
  font-weight: 600;
  text-align: left;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.nav-item i { width: 20px; min-width: 20px; flex: 0 0 20px; text-align: center; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,0.10); }
.nav-item.active {
  background: var(--agency-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--agency-accent) 88%, var(--dash-blue)), #1d4ed8);
  box-shadow: 0 10px 26px rgba(29,78,216,.20);
}
.nav-item.logout { margin: 12px 10px 18px; width: calc(100% - 20px); }
.compact-menu { --sidebar: 224px; }
.compact-menu .nav-item { padding: 10px 12px; font-size: 13px; }

.main-panel { min-width: 0; margin-left: var(--sidebar); }
.topbar {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(7,20,38,.04);
}
.topbar h1 { margin: 0; color: var(--primary); font-size: 20px; font-weight: 650; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.topbar-navigation { display: inline-flex; align-items: center; gap: 6px; }
.topbar-navigation .icon-btn { width: 44px; height: 44px; flex: 0 0 44px; }
.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.topbar-actions .icon-btn,
.local-clock-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.local-clock-button {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--primary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.badge-anchor,
.agency-module { position: relative; }
.action-badge {
  position: absolute;
  z-index: 2;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}
.action-badge[hidden] { display: none; }
.module-badge {
  top: 10px;
  right: 10px;
  border-color: var(--surface);
}
.topbar-popover {
  position: fixed;
  inset: 64px 18px auto auto;
  width: min(380px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 82px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.topbar-popover::backdrop { background: transparent; }
.notification-panel > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 7px 14px;
  border-bottom: 1px solid var(--border);
}
.notification-panel > header strong { font-size: 13px; font-weight: 600; }
.notification-list {
  max-height: min(450px, calc(100vh - 140px));
  padding: 6px;
  overflow: auto;
}
.notification-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.notification-item:hover,
.notification-item:focus-visible { background: var(--surface-2); }
.notification-item > span:first-child {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--dash-blue) 10%, #fff);
  color: var(--dash-blue);
}
.notification-item.priority-warning > span:first-child {
  background: #fff7ed;
  color: #c2410c;
}
.notification-item.priority-critical > span:first-child {
  background: #fef2f2;
  color: #dc2626;
}
.notification-kind-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.notification-item strong,
.notification-item small,
.notification-item time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-item strong { font-size: 12px; font-weight: 600; }
.notification-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.notification-item time { margin-top: 3px; color: var(--muted); font-size: 10px; }
.notification-item > svg { color: var(--muted); }
.notification-item .notification-agency {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notification-item .notification-agency svg { width: 11px; height: 11px; flex: 0 0 auto; }
.notification-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.notification-empty svg { width: 22px; height: 22px; color: var(--success); }
.calendar-panel {
  width: min(300px, calc(100vw - 24px));
  padding: 18px;
}
.calendar-panel div { display: grid; gap: 5px; }
.calendar-panel strong { color: var(--primary); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.calendar-panel span { font-size: 13px; text-transform: capitalize; }
.calendar-panel small { color: var(--muted); font-size: 11px; }
.language-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 600;
}
.language-control select {
  width: auto;
  min-width: 68px;
  max-width: min(230px, 42vw);
  border: 0;
  padding: 4px;
  background: transparent;
  font-weight: 650;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  min-width: 0;
  overflow: hidden;
}
.user-chip span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.user-chip small { color: var(--muted); display: block; }
.content-area {
  padding: 24px;
}
.home-mode {
  background: var(--surface-2);
}
.home-mode .sidebar,
.home-mode .topbar {
  display: none;
}
.home-mode .main-panel {
  margin-left: 0;
}
.standalone-mode .sidebar {
  display: none;
}
.standalone-mode .main-panel {
  margin-left: 0;
}
.standalone-mode .topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.home-mode .content-area {
  min-height: 100vh;
  padding: 0;
}
.search-input {
  max-width: 320px;
  border-radius: 999px;
  padding-left: 15px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(216,225,238,.35);
}
.search-input::placeholder {
  color: #7c8aa1;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.toolbar-filter label {
  min-width: 240px;
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard);
}
.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.card-body { padding: 18px; }
.stat-card {
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.stat-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--dash-cyan) 12%, #fff);
  color: var(--accent);
  font-size: 20px;
}
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 2px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; background: var(--surface-2); }
tbody tr { transition: background-color var(--motion-fast) var(--ease-standard); }
tr:hover td { background: color-mix(in srgb, var(--dash-cyan) 6%, #fff); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; min-width: 148px; }
.context-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.context-action-trigger {
  min-width: 36px;
  min-height: 36px;
}
.context-action-menu[popover] {
  position: fixed;
  inset: var(--context-menu-top, 8px) auto auto var(--context-menu-left, 8px);
  width: var(--context-menu-width, 208px);
  max-width: calc(100vw - 16px);
  max-height: min(320px, calc(100vh - 16px));
  margin: 0;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16);
}
.context-action-menu:popover-open {
  display: grid;
  gap: 2px;
  animation: context-menu-in 72ms ease-out;
}
.context-action-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .84rem;
  font-weight: 400;
  text-align: left;
}
.context-action-item:hover,
.context-action-item:focus-visible { background: var(--surface-2); }
.context-action-item.tone-success { color: var(--success); }
.context-action-item.tone-warning { color: var(--warning); }
.context-action-item.tone-danger { color: var(--danger); }
.context-submenu {
  display: grid;
  gap: 2px;
}
.context-submenu-trigger[aria-expanded="true"] { background: var(--surface-2); }
.context-submenu-chevron {
  display: inline-flex;
  margin-left: auto;
  color: var(--muted);
  transition: transform var(--motion-fast) var(--ease-standard);
}
.context-submenu-trigger[aria-expanded="true"] .context-submenu-chevron { transform: rotate(90deg); }
.context-action-submenu {
  display: grid;
  gap: 2px;
  margin: 2px 0 4px 13px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}
.context-action-submenu[hidden] { display: none; }
.context-action-submenu .context-action-item { padding-left: 8px; }
@keyframes context-menu-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .context-action-menu:popover-open { animation: none; }
  .context-submenu-chevron { transition: none; }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-3);
  color: var(--muted);
}
.badge.success { background: var(--dash-green-soft); color: var(--success); }
.badge.warning { background: var(--dash-amber-soft); color: var(--warning); }
.badge.danger { background: var(--dash-red-soft); color: var(--danger); }
.badge.info { background: var(--dash-blue-soft); color: var(--info); }

.chart-bars {
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 4px 0;
}
.chart-bar { flex: 1; display: grid; gap: 6px; align-items: end; min-width: 34px; }
.chart-bar-fill {
  min-height: 6px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--dash-cyan), var(--dash-blue));
}
.chart-bar label { text-align: center; font-size: 11px; color: var(--muted); }
.chart-svg {
  width: 100%;
  min-height: 248px;
  display: block;
}
.status-chart { display: grid; gap: 12px; }
.status-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr 42px;
  align-items: center;
  gap: 10px;
}
.status-chart-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.status-chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.agency-dashboard {
  display: grid;
  gap: 16px;
}
.dashboard-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    var(--panel-gradient),
    var(--accent-panel-gradient);
  box-shadow: var(--card-shadow);
}
.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
}
.dashboard-hero-panel h2 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 650;
  letter-spacing: 0;
}
.dashboard-hero-panel p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.dashboard-hero-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--text);
  font-size: 13px;
}
.dashboard-hero-meta span {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  box-shadow: 0 6px 16px rgba(7,20,38,.04);
}
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 14px;
}
.dashboard-kpi-card {
  min-width: 0;
  min-height: 148px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--card-shadow);
}
.dashboard-kpi-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}
.dashboard-kpi-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--kpi-color) 18%, #fff);
  border-radius: 7px;
  background: color-mix(in srgb, var(--kpi-color) 9%, #fff);
  color: var(--kpi-color);
}
.dashboard-kpi-icon .app-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}
.dashboard-kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-kpi-card strong {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 0;
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.16;
  overflow-wrap: anywhere;
  white-space: normal;
}
.dashboard-kpi-foot {
  display: grid;
  gap: 7px;
}
.dashboard-kpi-foot small {
  min-height: 16px;
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}
.dashboard-sparkline {
  width: 100%;
  height: 34px;
  display: block;
}
.dashboard-grid {
  display: grid;
  gap: 14px;
  align-items: stretch;
}
.dashboard-grid-main {
  grid-template-columns: minmax(260px, .95fr) minmax(360px, 1.45fr) minmax(280px, .95fr);
}
.dashboard-grid-secondary {
  grid-template-columns: minmax(260px, .95fr) minmax(360px, 1.45fr) minmax(280px, .95fr);
}
.dashboard-grid-tertiary {
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, .95fr) minmax(280px, .85fr);
}
.dashboard-card {
  min-width: 0;
  overflow: hidden;
}
.dashboard-card .card-header {
  padding: 15px 16px;
}
.dashboard-card .card-title {
  min-width: 0;
  color: var(--primary);
  font-size: 15px;
  font-weight: 650;
}
.dashboard-card-wide,
.dashboard-card-donut,
.dashboard-side-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}
.dashboard-chip {
  white-space: nowrap;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.dashboard-donut-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  justify-items: center;
  padding: 18px;
}
.dashboard-donut {
  width: min(100%, 142px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--donut);
  position: relative;
}
.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
}
.dashboard-donut span {
  position: relative;
  z-index: 1;
  max-width: 82%;
  display: grid;
  gap: 2px;
  justify-items: center;
  color: var(--primary);
  text-align: center;
}
.dashboard-donut strong {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.dashboard-donut small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.18;
}
.dashboard-donut-list {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  min-width: 0;
}
.dashboard-donut-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
}
.dashboard-donut-list i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.dashboard-donut-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-donut-label {
  color: var(--muted);
  font-size: 13px;
}
.dashboard-donut-list strong {
  color: var(--primary);
  font-weight: 650;
  max-width: 112px;
  overflow-wrap: anywhere;
  text-align: right;
}
.dashboard-card-note {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-line-wrap {
  min-height: 294px;
  padding: 10px 16px 14px;
}
.dashboard-line-chart {
  width: 100%;
  min-height: 252px;
  display: block;
}
.dashboard-line-chart text {
  fill: var(--muted);
  font-size: 12px;
}
.dashboard-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dashboard-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}
.dashboard-legend b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.dashboard-list,
.dashboard-alerts,
.dashboard-deadlines {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.dashboard-list-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-3);
}
.dashboard-list-item:last-child {
  border-bottom: 0;
}
.dashboard-list-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--dash-cyan) 12%, #fff);
}
.dashboard-list-item strong,
.dashboard-list-item small {
  display: block;
  min-width: 0;
}
.dashboard-list-item strong {
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
}
.dashboard-list-item small,
.dashboard-list-item time {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-list-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-performance {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.dashboard-performance-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(130px, auto);
  gap: 8px 14px;
  align-items: center;
}
.dashboard-performance-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-performance-row strong {
  min-width: 0;
  color: var(--primary);
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}
.dashboard-performance-row i,
.dashboard-route-row i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}
.dashboard-performance-row b,
.dashboard-route-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.dashboard-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}
.dashboard-alert.warning {
  border-color: color-mix(in srgb, var(--dash-amber) 28%, var(--border));
  background: var(--dash-amber-soft);
  color: #7a4a00;
}
.dashboard-alert.danger {
  border-color: color-mix(in srgb, var(--dash-red) 26%, var(--border));
  background: var(--dash-red-soft);
  color: #9f1d1d;
}
.dashboard-alert.success {
  border-color: color-mix(in srgb, var(--dash-green) 28%, var(--border));
  background: var(--dash-green-soft);
  color: #1f6b34;
}
.dashboard-route-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.dashboard-route-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
}
.dashboard-route-row strong,
.dashboard-route-row small {
  display: block;
  min-width: 0;
}
.dashboard-route-row strong {
  color: var(--primary);
  font-weight: 650;
}
.dashboard-route-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-route-row span {
  color: var(--primary);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dashboard-route-row b {
  background: linear-gradient(90deg, var(--dash-cyan), var(--dash-blue));
}
.dashboard-deadlines > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-3);
}
.dashboard-deadlines > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.dashboard-deadlines time {
  width: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  background: #fff;
  text-align: center;
}
.dashboard-deadlines time strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.dashboard-deadlines time span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.dashboard-deadlines p {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}
.dashboard-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.dashboard-empty i {
  color: var(--accent-strong);
  font-size: 20px;
}
.cash-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
  gap: 14px;
  align-items: stretch;
}
.cash-chart-card,
.cash-health-card {
  min-width: 0;
  overflow: hidden;
}
.cash-period-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.cash-period-row {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 150px auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.cash-period-row > div:first-child,
.cash-period-row > strong {
  min-width: 0;
}
.cash-period-row strong {
  display: block;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.cash-period-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.cash-period-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(18px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 150px;
}
.cash-period-bars span {
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.cash-period-bars b {
  width: 100%;
  min-height: 4px;
  display: block;
  border-radius: inherit;
}
.cash-period-bars .cash-in b { background: var(--dash-green); }
.cash-period-bars .cash-out b { background: var(--dash-red); }
.cash-period-bars .cash-balance b { background: var(--period-color); }
.cash-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 12px;
}
.cash-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cash-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.cash-chart-legend .cash-in { background: var(--dash-green); }
.cash-chart-legend .cash-out { background: var(--dash-red); }
.cash-chart-legend .cash-balance { background: var(--dash-blue); }
.cash-health-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.cash-health-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.cash-health-list > div.success {
  border-color: color-mix(in srgb, var(--dash-green) 28%, var(--border));
  background: var(--dash-green-soft);
}
.cash-health-list > div.danger {
  border-color: color-mix(in srgb, var(--dash-red) 28%, var(--border));
  background: var(--dash-red-soft);
}
.cash-health-list span,
.cash-health-list strong {
  min-width: 0;
}
.cash-health-list span {
  color: var(--text);
  font-size: 13px;
}
.cash-health-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.cash-health-list strong {
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.mt-18 { margin-top: 18px; }

.transfer-fee-preview {
  align-self: end;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}
.transfer-fee-preview strong {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}
.operation-confirmation {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 10px 0;
}
.operation-confirmation-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dash-green-soft);
  color: var(--dash-green);
  font-size: 24px;
}
.operation-reference {
  max-width: 100%;
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.operation-confirmation dl {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.operation-confirmation dt { color: var(--muted); }
.operation-confirmation dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.form-fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.consent-options {
  padding: 9px 11px;
  background: var(--surface-2);
}
.consent-options .compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.consent-options .checkline {
  min-height: 30px;
  font-size: 12px;
}
.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.package-pricing-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}
.package-pricing-preview span {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}
.package-pricing-preview strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}
.home-panel,
.home-summary {
  min-width: 0;
}
.home-panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.home-panel h2 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-panel p { margin: 0 0 18px; color: var(--muted); }
.agency-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.agency-choice {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}
.agency-choice.active {
  border-color: var(--agency-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--agency-accent) 16%, transparent);
}
.agency-choice-color,
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.agency-choice strong,
.agency-choice small { display: block; }
.agency-choice small { color: var(--muted); margin-top: 3px; }
.agency-select-field {
  display: grid;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.agency-select-field select {
  width: 100%;
  min-height: 50px;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(7, 20, 38, .05);
}
.selected-agency-chip {
  display: flex;
  gap: 12px;
  align-items: center;
}
.selected-agency-chip > span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--chip-color);
}
.selected-agency-chip small { display: block; color: var(--muted); margin-top: 3px; }

.agency-gate {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(135deg, rgba(247,251,253,0.98), rgba(237,245,249,0.98)),
    linear-gradient(90deg, color-mix(in srgb, var(--dash-cyan) 10%, transparent), transparent 46%);
}
.agency-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(18px, 4vw, 48px);
}
.agency-gate-brand,
.agency-gate-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agency-gate-brand strong {
  display: block;
  color: var(--primary);
  line-height: 1;
}
.agency-gate-brand span {
  color: var(--accent);
  font-weight: 900;
}
.agency-gate-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 54px) 0 48px;
  display: grid;
  grid-template-columns: minmax(280px, .88fr) minmax(360px, 1.12fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
}
.agency-gate-copy h1 {
  margin: 12px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.08;
  color: var(--primary);
}
.agency-gate-copy p {
  margin: 0 0 22px;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.gate-selected {
  width: min(420px, 100%);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.94);
  box-shadow: var(--card-shadow);
}
.gate-entry {
  margin-top: 16px;
  min-width: 220px;
}
.agency-gate-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.96);
  box-shadow: var(--card-shadow);
}
.agency-gate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.agency-gate-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
}
.agency-gate-panel-head span {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}
.agency-map {
  --agency-map-accent: var(--dash-blue);
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
}
.agency-map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 8.6;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7fafd;
}
.agency-map svg {
  display: block;
  width: 100%;
  height: 100%;
}
.agency-map-world-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.agency-map-background { fill: #f7fafd; }
.agency-map-world-country {
  fill: #dfe8f3;
  stroke: #b9c8d9;
  stroke-width: .45;
  vector-effect: non-scaling-stroke;
}
.agency-map-country {
  fill: #e4ebf4;
  stroke: #9fb2c8;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.agency-map-region {
  fill: #edf3f8;
  stroke: #b7c6d7;
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}
.agency-map-region.is-selected {
  fill: color-mix(in srgb, var(--agency-map-accent) 48%, #fff);
  stroke: var(--agency-map-accent);
  stroke-width: 1.8;
}
.agency-map-marker circle:first-child {
  fill: color-mix(in srgb, var(--agency-map-accent) 24%, transparent);
  stroke: var(--agency-map-accent);
  stroke-width: 1;
}
.agency-map-marker circle:last-child {
  fill: var(--agency-map-accent);
  stroke: #fff;
  stroke-width: 2;
}
.agency-map-location {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 #fff, 0 0 8px #fff;
}
.agency-map figcaption {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.agency-map figcaption strong {
  min-width: 0;
  overflow: hidden;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agency-map figcaption span {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agency-map.is-unavailable svg { opacity: .45; }

.chat-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 18px;
}
.chat-sidebar,
.chat-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.chat-sidebar {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}
.chat-sidebar-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.chat-sidebar h2,
.chat-panel h2 {
  margin: 0;
  font-size: 18px;
}
.chat-sidebar p,
.chat-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.chat-security-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--dash-cyan) 26%, var(--border));
  border-radius: var(--radius);
  background: var(--dash-cyan-soft);
  color: var(--primary);
  font-size: 12px;
  line-height: 1.45;
}
.chat-security-note i {
  color: var(--accent);
  font-size: 18px;
  margin-top: 2px;
}
.chat-search {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
}
.chat-search input {
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.chat-search input:focus { box-shadow: none; }
.chat-list-section {
  display: grid;
  gap: 8px;
}
.chat-list-section h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.chat-conversation-list,
.chat-contact-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}
.chat-conversation,
.chat-contact {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  padding: 9px;
  text-align: left;
}
.chat-unread {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--dash-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.chat-conversation:hover,
.chat-contact:hover,
.chat-conversation.active {
  background: var(--surface-2);
  border-color: var(--border);
}
.chat-conversation.active {
  box-shadow: inset 3px 0 0 var(--agency-accent);
}
.chat-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dash-cyan) 13%, #fff);
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
}
.chat-conversation strong,
.chat-contact strong,
.chat-conversation small,
.chat-contact small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-conversation small,
.chat-contact small {
  color: var(--muted);
  margin-top: 2px;
}
.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  overflow: hidden;
}
.chat-panel-head {
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-messages {
  padding: 18px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(245,247,251,0.82), rgba(255,255,255,0.95));
}
.chat-empty {
  align-self: center;
  justify-self: center;
  color: var(--muted);
}
.chat-message {
  max-width: min(620px, 78%);
  position: relative;
}
.chat-message.mine {
  justify-self: end;
}
.chat-message-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.chat-message.mine .chat-message-meta {
  justify-content: flex-end;
}
.chat-bubble {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}
.chat-message.mine .chat-bubble {
  background: linear-gradient(135deg, color-mix(in srgb, var(--agency-accent) 86%, var(--dash-blue)), var(--dash-blue));
  border-color: color-mix(in srgb, var(--agency-accent) 72%, var(--dash-blue));
  color: #fff;
}
.chat-bubble p {
  margin: 0;
  color: inherit;
  line-height: 1.48;
  white-space: normal;
}
.chat-message.deleted .chat-bubble {
  opacity: .72;
  font-style: italic;
}
.chat-delete {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--danger);
}
.chat-attachment {
  margin-top: 8px;
}
.chat-attachment.image img {
  max-width: min(360px, 100%);
  max-height: 280px;
  display: block;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255,255,255,0.16);
}
.chat-attachment figcaption,
.chat-attachment.audio span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  opacity: .82;
}
.chat-attachment.audio audio {
  width: min(360px, 100%);
  display: block;
}
.chat-attachment.document {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: 420px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,0.78);
  color: var(--text);
}
.chat-message.mine .chat-attachment.document {
  background: rgba(255,255,255,0.94);
}
.chat-attachment.document > i {
  color: var(--agency-accent);
  font-size: 22px;
}
.chat-attachment.document span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.chat-attachment.document small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.chat-print-frame {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -9999px;
  top: -9999px;
  border: 0;
}
.chat-composer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, 40px) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.chat-compose-field {
  min-width: 0;
  position: relative;
  display: grid;
  gap: 4px;
}
.chat-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
}
.chat-attach {
  position: relative;
}
.chat-attachment-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.chat-compose-status {
  min-height: 16px;
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.chat-recording-status { color: var(--danger); }
.chat-record.is-recording {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 10%, #fff);
  color: var(--danger);
}
.chat-emoji-picker {
  position: absolute;
  z-index: 25;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(340px, calc(100vw - 36px));
  max-height: 260px;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.chat-emoji-picker[hidden] { display: none; }
.chat-emoji-picker section + section { margin-top: 8px; }
.chat-emoji-picker h3 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.chat-emoji-picker section > div {
  display: grid;
  grid-template-columns: repeat(8, 32px);
  gap: 3px;
}
.chat-emoji-picker button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 19px;
}
.chat-emoji-picker button:hover,
.chat-emoji-picker button:focus-visible { background: var(--surface-2); }
.chat-readonly {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7,20,38,0.58);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal-header, .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-footer { border-bottom: 0; border-top: 1px solid var(--border); justify-content: flex-end; flex-wrap: wrap; }
.modal-body { padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.settings-layout {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.settings-section {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.settings-section h3 {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 15px;
}
.settings-section > *,
.settings-section .form-grid,
.settings-section .table-wrap,
.settings-section input,
.settings-section select,
.settings-section textarea {
  min-width: 0;
  max-width: 100%;
}
.settings-section .table-wrap {
  width: 100%;
  overflow-x: auto;
  contain: inline-size;
}
.settings-section label { font-weight: 500; }
.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.settings-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.connector-counters {
  display: inline-flex;
  gap: 5px;
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.settings-switch {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.settings-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.settings-switch-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 500;
}
.settings-switch-label b {
  font-size: 17px;
  font-weight: 400;
}
.switch-track {
  width: 40px;
  min-width: 40px;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}
.switch-track > span {
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(7, 20, 38, .22);
  transform: translateX(0);
  transition: transform var(--motion-fast) var(--ease-standard);
}
.settings-switch input:checked + .switch-track {
  border-color: var(--dash-blue);
  background: var(--dash-blue);
}
.settings-switch input:checked + .switch-track > span {
  transform: translateX(18px);
}
.settings-switch input:focus-visible + .switch-track {
  box-shadow: var(--focus-ring);
}
.settings-switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: .6;
}
.settings-switch-compact {
  width: 42px;
  min-height: 24px;
  display: inline-flex;
  padding: 0;
  border: 0;
}
.settings-row-code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.user-access-list {
  display: grid;
}
.user-access-row {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.user-access-row:first-child { padding-top: 0; }
.user-access-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.user-access-row > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.user-access-row > header strong,
.user-access-row > header small {
  display: block;
  overflow-wrap: anywhere;
}
.user-access-row > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.user-access-switches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.access-switch {
  min-height: 40px;
  padding: 7px 9px;
}
.checkline {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.checkline input {
  width: auto;
  min-width: 18px;
  height: 18px;
}

.toast-root {
  position: fixed;
  right: 18px;
  top: 88px;
  z-index: 200;
  display: grid;
  gap: 10px;
}
.toast {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  font-weight: 750;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

.timeline { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--dash-cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dash-cyan) 18%, transparent);
}

.id-card-preview {
  width: 85.6mm;
  height: 53.98mm;
  border-radius: 3.18mm;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--dash-blue));
  color: #fff;
  padding: 0;
  display: block;
}
.id-card-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}
.id-card-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: start;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.export-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.export-control label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 750;
}
.card-dimension-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--dash-cyan) 28%, var(--border));
  border-radius: var(--radius);
  background: var(--dash-cyan-soft);
  color: var(--primary);
  font-weight: 750;
}
.exercise-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  font-weight: 850;
}
.privacy-card {
  max-width: 1120px;
  margin: 0 auto;
}
.privacy-policy {
  display: grid;
  gap: 18px;
  line-height: 1.62;
  color: var(--text);
}
.privacy-policy > .legal-hero {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    var(--panel-gradient),
    var(--accent-panel-gradient);
}
.legal-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.privacy-policy h2,
.privacy-policy h3 {
  margin: 0;
  color: var(--primary);
}
.privacy-policy h2 {
  font-size: 22px;
}
.privacy-policy h3 {
  margin-top: 10px;
  font-size: 16px;
}
.privacy-policy p,
.privacy-policy ul {
  margin: 0;
}
.privacy-policy ul {
  padding-left: 20px;
}
.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.legal-summary-item,
.legal-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.legal-summary-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  box-shadow: var(--card-shadow);
}
.legal-summary-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--dash-cyan-soft);
  color: var(--primary);
}
.legal-summary-item h3 {
  font-size: 14px;
}
.legal-summary-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-toc a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.legal-section {
  display: grid;
  gap: 10px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(7, 20, 38, .04);
}
.legal-section p {
  color: var(--text);
}
.legal-section li {
  margin: 5px 0;
  color: var(--muted);
}
body.legal-body {
  min-height: 100vh;
  margin: 0;
  background: #f5f7fb;
  color: var(--text);
}
.modal:has(.legal-shell) {
  width: min(1120px, calc(100% - 24px));
}
.legal-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 6px 0 8px;
}
body.legal-body .legal-shell {
  width: min(1120px, calc(100% - 32px));
  padding: 28px 0 34px;
}
.legal-shell .legal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.legal-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.legal-tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #31435c;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  box-shadow: none;
}
.legal-tabs a.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--agency-accent) 72%, var(--dash-blue));
  background: var(--dash-blue);
}
.legal-title {
  margin-bottom: 20px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border);
}
.legal-title p { margin: 0 0 6px; color: var(--muted); font-weight: 400; }
.legal-title h1 { margin: 0; color: var(--primary); font-size: 25px; font-weight: 500; }
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.legal-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--card-shadow);
}
.legal-card > i {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--dash-cyan);
  border-radius: var(--radius);
  background: var(--dash-cyan-soft);
}
.legal-card:nth-child(2n) > i {
  color: var(--dash-green);
  background: var(--dash-green-soft);
}
.legal-card:nth-child(3n) > i {
  color: var(--dash-amber);
  background: var(--dash-amber-soft);
}
.legal-card h2 { margin: 0; font-size: 17px; color: #172033; }
.legal-card ul { margin: 0; padding-left: 18px; color: #475467; line-height: 1.55; }
.legal-card li + li { margin-top: 6px; }
.legal-document { max-width: 900px; margin: 0 auto; border-top: 1px solid var(--border); }
.legal-section { padding: 22px 2px; border-bottom: 1px solid var(--border); }
.legal-section > header { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; }
.legal-section > header > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; color: var(--dash-blue); background: var(--dash-blue-soft); }
.legal-section h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 500; }
.legal-section ul { margin: 12px 0 0 48px; padding-left: 16px; color: #475467; font-size: 13px; line-height: 1.6; }
.legal-section li + li { margin-top: 5px; }
.legal-footer a { display: inline-flex; align-items: center; gap: 6px; }
.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.legal-footer a { color: var(--primary); font-weight: 800; text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .legal-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .legal-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .privacy-policy > .legal-hero {
    padding: 18px;
  }
  .legal-shell .legal-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .legal-tabs {
    justify-content: flex-start;
  }
  .legal-title {
    padding: 16px;
  }
  .legal-title h1 {
    font-size: 24px;
  }
  .legal-summary-grid {
    grid-template-columns: 1fr;
  }
  .legal-toc a {
    width: 100%;
    border-radius: var(--radius);
  }
  .legal-tabs a span {
    display: none;
  }
  .legal-card {
    grid-template-columns: 1fr;
  }
  .legal-card > i {
    grid-row: auto;
  }
  .legal-section { padding: 18px 0; }
  .legal-section ul { margin-left: 0; }
}
.id-card-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.id-card-body { display: grid; grid-template-columns: 24mm 1fr; gap: 4mm; align-items: center; }
.id-photo { width: 24mm; height: 28mm; background: rgba(255,255,255,0.16); display: grid; place-items: center; overflow: hidden; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-card-name { font-size: 8.9pt; font-weight: 900; line-height: 1.05; }
.id-card-meta { font-size: 7pt; opacity: .9; margin-top: 2mm; }
.qr-box, .barcode-box { background: #fff; color: #000; display: grid; place-items: center; }
.qr-box { width: 18mm; height: 18mm; }
.barcode-box { height: 10mm; }
.qr-box svg, .barcode-box svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.verification-result {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.verification-result.valid { border-color: color-mix(in srgb, var(--dash-green) 28%, var(--border)); background: var(--dash-green-soft); }
.verification-result.invalid { border-color: color-mix(in srgb, var(--dash-red) 26%, var(--border)); background: var(--dash-red-soft); }
.verification-result > i { margin-top: 2px; font-size: 20px; }
.verification-result.valid > i { color: var(--dash-green); }
.verification-result.invalid > i { color: var(--danger); }
.verification-result strong,
.verification-result span {
  display: block;
}
.verification-result dl {
  display: grid;
  grid-template-columns: minmax(34mm, 42mm) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 10px 0 0;
}
.verification-result dt {
  display: inline-flex;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.verification-result dt::after { content: " :"; }
.verification-result dd { margin: 0; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }

.document-page,
.document-page * {
  box-sizing: border-box;
}
.document-page {
  width: min(100%, 980px);
  margin: 26px auto;
  background: #fff;
  color: #111827;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 42px;
  box-shadow: var(--card-shadow);
  break-inside: avoid;
  page-break-inside: avoid;
  font-family: "Segoe UI", Arial, sans-serif;
}
.document-page:not(.receipt-page) {
  min-height: 980px;
  display: flex;
  flex-direction: column;
}
.receipt-page {
  position: relative;
  width: min(100%, 760px);
  min-height: 980px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 32px 36px;
  overflow: hidden;
}
.receipt-header {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 7px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--primary);
}
.receipt-header img { width: 74px; height: 74px; object-fit: contain; }
.receipt-header strong {
  display: block;
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.18;
  max-width: 100%;
}
.receipt-short-name {
  color: var(--accent) !important;
  font-size: 20px !important;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.receipt-header span,
.receipt-header small { display: block; margin-top: 4px; color: #475467; font-size: 13px; line-height: 1.35; }
.receipt-body {
  display: grid;
  align-content: start;
  padding: 8px 0;
}
.receipt-kv {
  grid-template-columns: minmax(96px, 145px) minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 15px;
}
.receipt-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.doc-header {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 26px;
  text-align: center;
}
.doc-brand { display: grid; justify-items: center; gap: 8px; }
.doc-brand img { width: 70px; height: 70px; object-fit: contain; }
.doc-brand strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.18;
  max-width: 100%;
}
.doc-short-name {
  color: var(--accent) !important;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
}
.doc-brand span, .doc-brand small, .doc-contact span { display: block; color: #475467; }
.doc-contact {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  font-size: 13px;
}
.document-page h1 {
  width: 100%;
  margin: 0 0 20px;
  color: var(--accent);
  text-align: center;
  text-transform: uppercase;
  font-size: 24px;
}
.doc-title-row {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-align: center;
}
.doc-title-row h1 { margin-bottom: 0; }
.doc-title-row strong { color: var(--primary); font-size: 18px; }
.doc-verification {
  width: fit-content;
  min-width: 156px;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: auto auto 18px;
  padding: 10px;
  border: 1px solid #bfd1f7;
  border-radius: var(--radius);
  background: var(--dash-blue-soft);
  break-inside: avoid;
}
.receipt-footer .doc-verification { margin: 0; }
.doc-verification svg {
  width: 96px;
  height: 96px;
  display: block;
  background: #fff;
  fill: #000;
  color: #000;
  shape-rendering: crispEdges;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.doc-verification svg rect,
.receipt-qr svg rect,
.report-verification svg rect,
.shipping-label-qr svg rect { fill: #fff; }
.doc-verification svg path,
.receipt-qr svg path,
.report-verification svg path,
.shipping-label-qr svg path { fill: #000; }
.doc-verification span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}
.doc-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  background: #fff;
}
.doc-section h2 { margin: 0 0 12px; font-size: 16px; }
.kv {
  display: grid;
  grid-template-columns: minmax(124px, 168px) minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
}
.kv dt,
.receipt-kv dt {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.kv dt::after,
.receipt-kv dt::after {
  content: " :";
  color: currentColor;
}
.kv dd,
.receipt-kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kv dd { color: #111827; font-weight: 650; }
.receipt-kv dd {
  font-weight: 800;
  color: #111827;
}
.doc-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 8.5pt;
}
.doc-table th,
.doc-table td {
  padding: 2.2mm;
  border: 1px solid #bbb;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.doc-table th {
  background: #f0f2f5;
  color: #111;
  text-align: center;
  text-transform: uppercase;
}
.doc-signatures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px;
  margin-top: 36px;
}
.doc-signatures div { display: grid; gap: 8px; text-align: center; }
.doc-signatures span { height: 54px; border-bottom: 1px solid #98a2b3; }
.doc-signatures small { color: var(--muted); }
.receipt-paid-watermark {
  position: absolute;
  inset: 38% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  border: 2px solid rgba(21, 128, 61, .24);
  color: rgba(21, 128, 61, .18);
  padding: 5px 18px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}
.thanks { margin: 0; font-weight: 800; text-align: center; }

.print-area { display: none; }
.pdf-render-area {
  position: fixed;
  z-index: -1;
  top: 0;
  left: -12000px;
  display: block;
  overflow: visible;
  background: #fff;
  pointer-events: none;
}
.pdf-render-area .document-page {
  width: 794px;
  min-height: 1123px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.pdf-render-area.print-receipt { width: 302px; }
.pdf-render-area.print-receipt .receipt-page {
  width: 302px;
  min-height: 0;
  margin: 0;
  padding: 12px;
  gap: 12px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 11px;
}
.pdf-render-area.print-receipt .receipt-header img { width: 64px; height: 64px; }
.pdf-render-area.print-receipt .receipt-kv { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5px 8px; font-size: 11px; }
.pdf-render-area.print-receipt .doc-verification { min-width: 0; padding: 6px; }
.pdf-render-area.print-receipt .doc-verification svg { width: 102px; height: 102px; }
.pdf-render-area.print-label { width: 384px; height: 576px; }
.pdf-render-area.print-label .shipping-label-page { width: 384px; height: 576px; margin: 0; }
.pdf-render-area.print-card { width: 324px; }
.pdf-render-area.print-card .print-card-cr80 {
  width: 324px;
  height: 204px;
  margin: 0;
  overflow: hidden;
  background: #fff;
}
.pdf-render-area.print-card .print-card-cr80 svg { display: block; width: 100%; height: 100%; }
.print-area.print-document,
.print-area.print-report {
  page: ae-document;
}
.print-area.print-label {
  page: ae-label;
}
@page ae-document {
  size: A4;
  margin: 12mm;
}
@page ae-label {
  size: 101.6mm 152.4mm;
  margin: 4mm;
}
.shipping-label-page,
.shipping-label-page * {
  box-sizing: border-box;
}
.shipping-label-page {
  position: relative;
  width: 93.6mm;
  height: 144.4mm;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 3mm;
  padding: 3.5mm;
  overflow: hidden;
  border: .45mm solid #111827;
  background: #fff;
  color: #111827;
  font-family: "Segoe UI", Arial, sans-serif;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.shipping-label-page header {
  display: grid;
  grid-template-columns: 16mm minmax(0, 1fr);
  gap: 3mm;
  align-items: center;
  padding-bottom: 2.5mm;
  border-bottom: .5mm solid #111827;
}
.shipping-label-page header img {
  width: 16mm;
  height: 16mm;
  object-fit: contain;
}
.shipping-label-page header div,
.shipping-label-page header strong,
.shipping-label-page header span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}
.shipping-label-page header strong { font-size: 12pt; line-height: 1.1; }
.shipping-label-page header span { margin-top: 1mm; font-size: 8pt; }
.shipping-label-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 2mm;
  align-items: center;
  min-height: 14mm;
  padding: 2mm;
  border: .35mm solid #111827;
  text-align: center;
  font-size: 10pt;
  font-weight: 700;
}
.shipping-label-route span { min-width: 0; overflow-wrap: anywhere; }
.shipping-label-route i { font-style: normal; font-size: 16pt; }
.shipping-label-code {
  min-width: 0;
  display: block;
  padding: 1.8mm;
  border: .35mm solid #111827;
  text-align: center;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15pt;
  line-height: 1;
  overflow-wrap: anywhere;
}
.shipping-label-page section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2mm;
}
.shipping-label-page section > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: .7mm;
  padding: 2mm;
  border: .3mm solid #98a2b3;
  overflow: hidden;
}
.shipping-label-page section small { font-size: 7pt; text-transform: uppercase; }
.shipping-label-page section strong,
.shipping-label-page section span { min-width: 0; font-size: 8pt; overflow-wrap: anywhere; }
.shipping-label-page dl {
  align-self: start;
  display: grid;
  grid-template-columns: 27mm minmax(0, 1fr);
  gap: 1mm 2mm;
  margin: 0;
  padding-right: 41mm;
  font-size: 8pt;
}
.shipping-label-page dt { color: #475467; }
.shipping-label-page dd { min-width: 0; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.shipping-label-qr {
  position: absolute;
  right: 3.5mm;
  bottom: 3.5mm;
  width: 36mm;
  height: 36mm;
  display: grid;
  place-items: center;
  padding: 1.5mm;
  border: .35mm solid #111827;
  background: #fff;
}
.shipping-label-qr svg { width: 100%; height: 100%; display: block; color: #000; fill: #000; shape-rendering: crispEdges; }
.shipping-label-paid {
  position: absolute;
  z-index: 1;
  inset: 51% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  padding: 1.5mm 5mm;
  border: .8mm solid rgba(15, 145, 82, .2);
  color: rgba(15, 145, 82, .18);
  font-size: 26pt;
  font-weight: 800;
  text-transform: uppercase;
  pointer-events: none;
}
@media print {
  html,
  body {
    width: auto;
    min-width: 0;
    margin: 0;
    background: #fff !important;
  }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .print-area .no-print { display: none !important; }
  .document-page {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
    break-after: auto;
    page-break-after: auto;
  }
  .receipt-page {
    min-height: calc(297mm - 24mm);
    max-height: none;
    padding: 0;
    gap: 8mm;
    overflow: visible;
  }
  .receipt-header {
    gap: 3mm;
    padding-bottom: 5mm;
  }
  .receipt-header img {
    width: 22mm;
    height: 22mm;
  }
  .receipt-header strong {
    font-size: 14.5px;
    line-height: 1.16;
  }
  .receipt-short-name {
    font-size: 18px !important;
  }
  .receipt-kv {
    grid-template-columns: 31mm minmax(0, 1fr);
    gap: 3.2mm 5mm;
    font-size: 12.5px;
  }
  .receipt-footer {
    padding-top: 5mm;
    margin-top: auto;
  }
  .receipt-footer .doc-verification {
    transform: scale(.92);
    transform-origin: top center;
  }
  .doc-section {
    padding: 12px;
    margin-bottom: 10px;
  }
  .doc-table th,
  .doc-table td {
    padding: 7px 9px;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .print-area.print-label {
    width: 93.6mm;
    height: 144.4mm;
    overflow: hidden;
  }
  .shipping-label-page {
    margin: 0;
  }
}
.ticket-72 {
  width: 72mm;
  font-family: "Courier New", monospace;
  font-size: 9pt;
  line-height: 1.22;
  color: #000;
  background: #fff;
  padding: 3mm;
  overflow-wrap: anywhere;
}
.ticket-72 .center { text-align: center; }
.ticket-72 .line { border-top: 1px dashed #000; margin: 2mm 0; }
.ticket-72 .row { display: flex; justify-content: space-between; gap: 3mm; }
.ticket-logo {
  width: 16mm;
  height: 16mm;
  object-fit: contain;
  display: block;
  margin: 0 auto 1mm;
}
.ticket-title {
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.ticket-doc-title {
  margin: 1mm auto;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 1mm 0;
}
.ticket-meta {
  font-size: 7.5pt;
  text-align: center;
}
.ticket-amount {
  text-align: center;
  font-size: 13pt;
  font-weight: 900;
  padding: 1mm 0;
}
.ticket-note { font-size: 7.5pt; text-align: center; }
.label-72 {
  width: 72mm;
  min-height: 88mm;
  padding: 3mm;
  background: #fff;
  color: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 8.8pt;
  line-height: 1.24;
  position: relative;
  overflow: hidden;
}
.label-72 > *:not(.paid-watermark) {
  position: relative;
  z-index: 1;
}
.paid-watermark {
  position: absolute;
  inset: 18mm 0 auto 0;
  z-index: 0;
  text-align: center;
  transform: rotate(-22deg);
  font-size: 28mm;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(21, 128, 61, .16);
  pointer-events: none;
}
.label-72 .qr-box {
  width: 26mm;
  height: 26mm;
  margin: 2mm auto;
}
.print-card-cr80 { width: 85.6mm; height: 53.98mm; page-break-inside: avoid; }
.report-print {
  font-family: "Courier New", Courier, monospace;
  width: 100%;
  min-height: 100vh;
  padding: 12mm;
  color: #000;
  background: #fff;
}
.report-header {
  display: grid;
  justify-items: center;
  gap: 3mm;
  border-bottom: 2px solid #111;
  padding-bottom: 5mm;
  margin-bottom: 6mm;
  text-align: center;
}
.report-brand {
  display: grid;
  justify-items: center;
  gap: 2mm;
}
.report-brand img {
  width: 20mm;
  height: 20mm;
  object-fit: contain;
}
.report-brand strong {
  display: block;
  font-size: 18pt;
  letter-spacing: 0;
}
.report-brand span, .report-meta {
  font-size: 8pt;
  color: #444;
}
.report-print h1 {
  margin: 0 0 2mm;
  text-align: center;
  font-size: 18pt;
  text-transform: uppercase;
}
.report-print table {
  font-size: 8.5pt;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.report-print th, .report-print td {
  padding: 2.2mm;
  border: 1px solid #bbb;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.report-print th {
  background: #f0f2f5;
  color: #111;
  text-align: center;
  text-transform: uppercase;
}
.report-photo {
  width: 14mm;
  height: 14mm;
  object-fit: cover;
  border: 1px solid #999;
}
.report-footer {
  margin-top: 6mm;
  padding-top: 3mm;
  border-top: 1px solid #999;
  font-size: 8pt;
  color: #444;
  text-align: center;
}
.package-note-grid {
  display: grid;
  grid-template-columns: 1fr 38mm;
  gap: 8mm;
  align-items: start;
}
.note-qr {
  border: 1px solid #111;
  padding: 4mm;
  display: grid;
  place-items: center;
}
.note-qr svg {
  width: 30mm;
  height: 30mm;
}
.note-signatures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16mm;
  margin-top: 14mm;
}
.note-signatures div span {
  display: block;
  height: 18mm;
  border-bottom: 1px solid #111;
}

/* Harmonisation UI globale */
html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.main-panel :where(h1, h2, h3, h4),
.agency-gate :where(h1, h2, h3),
.modal :where(h1, h2, h3) {
  font-weight: 600;
  letter-spacing: 0;
}
.main-panel :where(p, li, td, th, small),
.agency-gate :where(p, li, small),
.modal :where(p, li, td, th, small) {
  line-height: 1.45;
}
.sidebar-brand strong,
.sidebar-brand span,
.agency-gate-brand strong,
.agency-gate-brand span {
  font-weight: 600;
}
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.28) transparent;
}
.nav-item {
  min-height: 42px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}
.nav-item span {
  flex: 1 1 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item.active {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--dash-blue) 20%, transparent);
}
.topbar {
  min-height: 60px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 18px;
}
.topbar-heading { min-width: 0; }
.topbar h1 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar p {
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-right,
.toolbar-actions,
.row-actions {
  min-width: 0;
}
.topbar-right {
  gap: 8px;
  overflow: visible;
}
.topbar-navigation .icon-btn {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.language-control,
.language-control select {
  font-weight: 500;
}
.topbar .language-control,
.agency-gate-tools .language-control {
  min-height: 36px;
  padding: 4px 6px 4px 8px;
  gap: 5px;
  font-size: 12px;
}
.topbar .language-control select,
.agency-gate-tools .language-control select {
  min-height: 26px;
  max-width: 190px;
  padding: 2px 22px 2px 3px;
  font-size: 12px;
}
.user-chip {
  max-width: min(250px, 100%);
  min-width: 0;
  gap: 8px;
  padding: 5px 7px;
}
.user-chip span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}
.user-chip > div {
  min-width: 0;
}
.user-chip strong,
.user-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip strong {
  font-weight: 600;
  line-height: 1.25;
}
.btn {
  flex-shrink: 0;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-primary {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--dash-cyan) 18%, transparent);
}
.btn-outline:hover,
.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--agency-accent) 32%, var(--border));
  box-shadow: 0 8px 18px rgba(7,20,38,.06);
}
.btn-sm {
  min-width: 34px;
}
.btn-sm:has(i:only-child) {
  width: 36px;
  min-width: 36px;
  padding-inline: 0;
  overflow: hidden;
}
.icon-btn {
  flex: 0 0 auto;
}
input,
select,
textarea {
  line-height: 1.35;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}
input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--agency-accent) 26%, var(--border));
}
.stack-form label,
.form-grid label,
.toolbar-filter label,
.export-control label {
  font-weight: 500;
}
.card,
.chat-sidebar,
.chat-panel,
.agency-gate-panel,
.settings-section,
.dashboard-kpi-card {
  box-shadow: 0 8px 22px rgba(7, 20, 38, .06);
}
.card-title,
.dashboard-card .card-title,
.settings-section h3,
.chat-sidebar h2,
.chat-panel h2 {
  font-weight: 600;
  line-height: 1.3;
}
.card-header,
.modal-header,
.modal-footer {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
}
.card-body {
  min-width: 0;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.table-wrap table {
  min-width: 680px;
}
th,
td {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
th {
  color: #475569;
  font-weight: 600;
  text-transform: none;
  background: var(--surface-2);
}
tbody tr:last-child td {
  border-bottom: 0;
}
.badge {
  max-width: 100%;
  font-weight: 600;
  line-height: 1.2;
}
.modal-root {
  backdrop-filter: blur(8px);
}
.modal {
  border: 1px solid rgba(255,255,255,.45);
}
.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.form-error,
.alert,
.chat-security-note,
.card-dimension-note {
  font-weight: 500;
  line-height: 1.45;
}
.toast {
  font-weight: 500;
  line-height: 1.4;
}
.checkline {
  font-weight: 500;
}
.agency-gate-copy h1 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 600;
}
.agency-gate-copy p {
  font-size: 15px;
}
.agency-gate-panel-head span {
  font-weight: 600;
}
.agency-choice strong,
.selected-agency-chip strong {
  font-weight: 600;
}
.agency-choice {
  min-width: 0;
}
.agency-choice span:last-child {
  min-width: 0;
}
.agency-choice strong,
.agency-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-hero-panel h2,
.dashboard-kpi-card strong,
.dashboard-donut strong {
  font-weight: 650;
}
.dashboard-kpi-card strong,
.dashboard-donut strong {
  word-break: normal;
}
.dashboard-kpi-card strong {
  font-size: 20px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dashboard-donut strong {
  font-size: 20px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.dashboard-kicker,
.dashboard-kpi-foot small,
.dashboard-chip,
.dashboard-donut-list strong,
.dashboard-list-item strong,
.dashboard-performance-row strong {
  font-weight: 600;
}
.dashboard-kpi-card,
.dashboard-card {
  border-color: #dbe4ef;
}
.dashboard-kpi-card span,
.dashboard-card-note,
.dashboard-list-item p,
.dashboard-list-item time,
.dashboard-donut small {
  line-height: 1.35;
}
.chat-avatar,
.chat-list-section h3 {
  font-weight: 600;
}
.chat-bubble {
  box-shadow: 0 6px 18px rgba(7, 20, 38, .05);
}
.settings-section h3 {
  color: var(--primary);
}
html,
body,
.app-shell,
.main-panel,
.content-area,
.toolbar,
.card,
.settings-section,
.modal,
.agency-dashboard {
  max-width: 100%;
}

.sidebar-nav .nav-item {
  font-size: .82rem;
  font-weight: 500;
}

.agency-workspace {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.agency-gate-header {
  min-height: 60px;
  padding: 8px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.92);
}

.agency-gate-main {
  padding: 18px 0 30px;
  gap: 24px;
  align-items: start;
}

.agency-gate-copy h1 {
  margin: 4px 0 14px;
}

.agency-gate-panel {
  padding: 15px;
}

.agency-gate-panel-head {
  margin-bottom: 10px;
}

.agency-gate-panel-head h2 {
  font-size: 16px;
  font-weight: 600;
}

.agency-select-field {
  gap: 5px;
  font-size: 12px;
}

.agency-select-field select {
  min-height: 44px;
  padding-block: 8px;
  font-size: 14px;
}

.agency-map {
  margin-top: 12px;
}

.agency-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 12px;
  border-bottom: 1px solid var(--border);
}

.agency-workspace-header h2 {
  margin: 2px 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0;
}

.agency-workspace-header p,
.agency-workspace-header .workspace-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

.agency-change-button {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

.workspace-eyebrow {
  text-transform: uppercase;
}

.initial-page-shell {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 2px;
  border-bottom: 1px solid var(--border);
}

.initial-page-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
}

.initial-page-shell h2 {
  margin: 0 0 5px;
  font-size: 1.15rem;
  font-weight: 600;
}

.initial-page-shell p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
}

.agency-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 16px;
}

.agency-module {
  min-width: 0;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.agency-module:hover,
.agency-module:focus-visible {
  border-color: var(--agency-accent, var(--primary));
  background: var(--surface-2);
  outline: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.agency-module-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(29,78,216,.2);
}
.agency-module-icon::after {
  content: "";
  position: absolute;
  inset: 1px 7px auto;
  height: 28%;
  border-radius: 12px;
  background: rgba(255,255,255,.16);
  pointer-events: none;
}
.agency-module-icon .app-icon { position: relative; z-index: 1; width: 30px; height: 30px; }

.agency-module:nth-child(2) .agency-module-icon { background: linear-gradient(145deg, #22c55e, #15803d); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(21,128,61,.2); }
.agency-module:nth-child(3) .agency-module-icon { background: linear-gradient(145deg, #fb923c, #c2410c); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(194,65,12,.2); }
.agency-module:nth-child(4) .agency-module-icon { background: linear-gradient(145deg, #a855f7, #7e22ce); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(126,34,206,.2); }
.agency-module:nth-child(5) .agency-module-icon { background: linear-gradient(145deg, #22d3ee, #0e7490); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(14,116,144,.2); }
.agency-module:nth-child(6) .agency-module-icon { background: linear-gradient(145deg, #fb7185, #be123c); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 7px 16px rgba(190,18,60,.2); }

.agency-module-label {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: .96rem;
  font-weight: 500;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.workspace-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
}

.workspace-tab:hover,
.workspace-tab:focus-visible {
  color: var(--text);
  background: var(--surface-2);
}

.workspace-tab.active {
  border-color: color-mix(in srgb, var(--agency-accent) 38%, var(--border));
  background: color-mix(in srgb, var(--agency-accent) 9%, var(--surface));
  color: var(--text);
}

.permission-fieldset {
  min-width: 0;
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.permission-fieldset legend {
  padding: 0 6px;
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
}

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

.module-management {
  display: grid;
  gap: 16px;
}
.module-management-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.module-management-header > div { min-width: 0; }
.module-management-header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.module-management-header h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 600;
}
.management-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.management-kpis article {
  min-width: 0;
  min-height: 94px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 20, 38, .05);
}
.management-kpis article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--dash-blue-soft);
  color: var(--dash-blue);
}
.management-kpis article > div { min-width: 0; }
.management-kpis small,
.management-kpis strong { display: block; min-width: 0; overflow-wrap: anywhere; }
.management-kpis small { color: var(--muted); font-size: 11px; }
.management-kpis strong { margin-top: 4px; color: var(--text); font-size: 20px; font-weight: 600; }
.module-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: stretch;
}
.management-chart,
.management-approvals { min-height: 300px; }
.management-chart-body {
  height: 236px;
  display: grid;
  grid-template-columns: repeat(12, minmax(18px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 20px 18px 14px;
}
.management-chart-body > .text-muted:only-child {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  text-align: center;
}
.management-chart-column {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  text-align: center;
}
.management-chart-column > span {
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.management-chart-column i {
  width: min(24px, 74%);
  min-height: 4px;
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--dash-blue);
}
.management-chart-column small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.management-approval-list { display: grid; }
.management-approval-list > .text-muted { padding: 22px; }
.management-approval-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.management-approval-row:last-child { border-bottom: 0; }
.management-approval-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--dash-amber-soft);
  color: var(--dash-amber);
}
.management-approval-row > div:nth-child(2),
.management-approval-row strong,
.management-approval-row small { min-width: 0; }
.management-approval-row strong,
.management-approval-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-approval-row strong { font-size: 12px; font-weight: 600; }
.management-approval-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.management-rates,
.management-operations { min-width: 0; }
.approval-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.approval-summary strong { font-weight: 600; }
.approval-summary span { overflow-wrap: anywhere; }
.approval-summary small { color: var(--muted); }

@media (max-width: 1180px) {
  .stats-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-main,
  .dashboard-grid-secondary,
  .dashboard-grid-tertiary { grid-template-columns: 1fr; }
  .cash-analytics-grid { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr; }
  .agency-gate-main { grid-template-columns: 1fr; align-items: start; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-panel { min-height: 620px; }
  .agency-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .management-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module-management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar-right { grid-column: auto; justify-content: flex-end; width: auto; }
  .agency-gate-header { align-items: center; flex-direction: row; }
  .agency-gate-tools { width: auto; flex-wrap: nowrap; }
}
@media (max-width: 760px) {
  .main-panel { margin-left: 0; }
  .sidebar { z-index: 50; transform: translateX(-100%); transition: transform 90ms var(--ease-standard); }
  .sidebar.open { transform: translateX(0); }
  .nav-item,
  .language-control,
  .language-control select { min-height: 44px; }
}
@media (max-width: 680px) {
  html,
  body,
  .app-shell,
  .main-panel,
  .content-area {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  .user-chip { flex: 0 1 auto; min-width: 0; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px 10px; gap: 7px; }
  .topbar-right { gap: 6px; flex-wrap: nowrap; }
  .topbar-actions > :first-child,
  .topbar-right > .language-control,
  .topbar-right > .user-chip { display: none; }
  .local-clock-button { width: 36px; padding: 0; }
  .local-clock-button span { display: none; }
  .topbar-actions { gap: 3px; }
  .topbar p { display: none; }
  .topbar h1 { font-size: 16px; }
  .topbar .language-control,
  .agency-gate-tools .language-control {
    min-height: 40px;
    padding: 2px 3px;
    gap: 0;
  }
  .topbar .language-control > svg,
  .agency-gate-tools .language-control > svg { display: none; }
  .topbar .language-control select,
  .agency-gate-tools .language-control select {
    width: 84px;
    min-height: 36px;
    max-width: 84px;
    padding: 2px 20px 2px 2px;
    font-size: 10px;
  }
  .topbar .user-chip > div,
  .agency-gate-tools .user-chip > div { display: none; }
  .topbar .user-chip,
  .agency-gate-tools .user-chip { width: 38px; padding: 3px; justify-content: center; }
  .agency-gate-header { gap: 8px; padding-inline: 10px; }
  .agency-gate-brand { gap: 7px; }
  .agency-gate-brand .brand-logo { width: 34px; height: 34px; }
  .agency-gate-brand > div { font-size: 11px; }
  .agency-gate-tools { gap: 6px; }
  .agency-gate-main { width: min(100% - 24px, 1180px); padding-top: 12px; }
  .agency-gate-copy h1 { font-size: 26px; }
  .content-area { padding: 16px; overflow-x: hidden; }
  .table-wrap table { min-width: 560px; }
  .form-grid { grid-template-columns: 1fr; }
  .login-card, .install-panel { padding: 24px; }
  .dashboard-hero-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .dashboard-hero-meta { justify-items: stretch; }
  .dashboard-hero-meta span { justify-content: flex-start; }
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
  .dashboard-donut-body { grid-template-columns: 1fr; justify-items: center; }
  .dashboard-donut-list { width: 100%; }
  .cash-period-chart { grid-template-columns: 1fr; }
  .cash-period-row { grid-template-columns: minmax(0, 1fr) 130px minmax(110px, auto); grid-template-rows: auto; align-items: center; }
  .cash-period-bars { min-height: 112px; }
  .cash-period-bars span { height: 112px; }
  .dashboard-list-item { grid-template-columns: auto minmax(0, 1fr); }
  .dashboard-list-item time { grid-column: 2; }
  .dashboard-performance-row { grid-template-columns: 1fr; }
  .dashboard-performance-row strong { text-align: left; }
  .personnel-table-wrap {
    overflow: visible;
  }
  .personnel-table {
    width: 100%;
    min-width: 0 !important;
  }
  .personnel-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .personnel-table tbody {
    display: grid;
  }
  .personnel-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
  }
  .personnel-table tr:last-child { border-bottom: 0; }
  .personnel-table td {
    min-width: 0;
    padding: 0;
    border: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .personnel-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
  }
  .personnel-table td:nth-child(5),
  .personnel-table td:last-child { grid-column: 1 / -1; }
  .personnel-table td:last-child {
    display: flex;
    justify-content: flex-end;
  }
  .personnel-table td:last-child::before { display: none; }
  .id-card-stack {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .id-card-stack > div { min-width: 0; }
  .id-card-preview {
    width: min(100%, 85.6mm);
    height: auto;
    aspect-ratio: 324 / 204;
  }
  .export-control { grid-template-columns: 1fr 1fr; }
  .home-mode .content-area { padding: 0; }
  .agency-gate-main { width: min(100% - 24px, 1180px); padding-top: 12px; }
  .agency-gate-tools {
    display: flex;
    flex-wrap: nowrap;
  }
  .agency-gate-tools .language-control {
    width: auto;
  }
  .agency-gate-tools .user-chip {
    width: 38px;
    flex: 0 0 38px;
  }
  .agency-gate-copy h1 { font-size: 26px; }
  .agency-map figcaption { align-items: flex-start; flex-direction: column; gap: 2px; }
  .agency-map figcaption span { text-align: left; }
  .agency-choice-grid { grid-template-columns: 1fr; }
  .chat-composer { grid-template-columns: minmax(0, 1fr) repeat(3, 40px); }
  .chat-composer .btn-primary { grid-column: 1 / -1; }
  .chat-message { max-width: 92%; }
  .login-view .legal-quick-links { right: 10px; bottom: 10px; }
  .login-view .legal-quick-links a { width: 34px; height: 34px; }
  .agency-workspace-header { align-items: center; }
  .agency-change-button { min-height: 36px; padding: 6px 9px; font-size: .76rem; }
  .agency-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .agency-module { min-height: 0; aspect-ratio: 1; padding: 10px; }
  .agency-module-icon { width: 58px; height: 58px; }
  .agency-module-label { display: none; }
  .workspace-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .workspace-tab {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .permission-grid { grid-template-columns: 1fr; }
  .management-kpis { grid-template-columns: 1fr; }
  .module-management-header { align-items: flex-start; flex-direction: column; }
  .management-chart-body { grid-template-columns: repeat(6, minmax(18px, 1fr)); overflow-x: auto; }
  .compact-grid,
  .package-pricing-preview { grid-template-columns: 1fr; }
  .settings-switch-grid,
  .settings-toggle-grid,
  .user-access-switches,
  .sensitive-selects { grid-template-columns: minmax(0, 1fr); }
  .settings-section { padding: 14px; }
  .settings-section .table-wrap table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 11px;
  }
  .settings-section .table-wrap th,
  .settings-section .table-wrap td {
    padding: 7px 5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .settings-section .table-wrap input:not([type="checkbox"]),
  .settings-section .table-wrap select {
    width: 100%;
    padding-inline: 6px;
    font-size: 12px;
  }
  .connector-counters {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 460px) {
  .export-control { grid-template-columns: 1fr; }
}

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

.withdrawal-workspace { display: grid; gap: 16px; }
.withdrawal-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.withdrawal-header h2 { margin: 3px 0 0; font-size: 22px; font-weight: 600; }
.section-kicker { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.compact-control { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.compact-control select { min-width: 112px; }
.withdrawal-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cargo-withdrawal-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.withdrawal-metric { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.withdrawal-metric > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--dash-blue); background: var(--dash-blue-soft); }
.withdrawal-metric.tone-green > span { color: var(--dash-green); background: var(--dash-green-soft); }
.withdrawal-metric.tone-amber > span { color: var(--dash-amber); background: var(--dash-amber-soft); }
.withdrawal-metric.tone-cyan > span { color: var(--dash-cyan); background: var(--dash-cyan-soft); }
.withdrawal-metric small, .withdrawal-metric strong { display: block; min-width: 0; overflow-wrap: anywhere; }
.withdrawal-metric small { color: var(--muted); font-size: 10px; }
.withdrawal-metric strong { margin-top: 4px; font-size: 18px; font-weight: 500; }
.withdrawal-lookup { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(280px, 1.3fr); gap: 18px; align-items: center; padding: 16px; border: 1px solid #cbdcf4; border-radius: 8px; background: #f7faff; }
.withdrawal-lookup h3 { margin: 0; font-size: 14px; font-weight: 600; }
.withdrawal-lookup small { color: var(--muted); font-size: 10px; }
.withdrawal-lookup form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.withdrawal-lookup input { min-width: 0; text-transform: uppercase; }
.withdrawal-section { min-width: 0; }
.withdrawal-section summary { display: flex; gap: 8px; align-items: center; padding: 14px; cursor: pointer; font-size: 13px; }
.report-toolbar { gap: 12px; flex-wrap: wrap; }
.segmented-control { display: inline-flex; min-width: 0; padding: 3px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.segmented-control button { min-height: 32px; padding: 5px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.segmented-control button.active { background: #fff; color: var(--dash-blue); box-shadow: 0 1px 4px rgba(7, 20, 38, .1); }
.reference-code { font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 500; white-space: nowrap; }
.thermal-receipt { width: 72mm; margin: 0 auto; color: #000; background: #fff; font: 400 9.5pt/1.32 var(--font-family, Arial, sans-serif); }
.thermal-receipt header { text-align: center; }
.thermal-receipt h1, .thermal-receipt h2, .thermal-receipt p { margin: 0 0 2mm; font-weight: 500; }
.thermal-receipt h1 { font-size: 13pt; }
.thermal-receipt h2 { font-size: 10.5pt; text-transform: uppercase; }
.thermal-receipt .receipt-rule { margin: 2mm 0; border-top: 1px dashed #000; }
.thermal-receipt dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.3mm 2mm; margin: 0; }
.thermal-receipt dt, .thermal-receipt dd { margin: 0; overflow-wrap: anywhere; font-weight: 400; }
.thermal-receipt dd { text-align: right; }
.receipt-qr { display: grid; justify-items: center; gap: 1.5mm; margin-top: 3mm; font-size: 8pt; }
.receipt-qr svg { width: 27mm; height: 27mm; background: #fff; }
.report-document { color: #111827; font-size: 10px; font-weight: 400; }
.report-heading { margin-bottom: 16px; text-align: center; }
.report-heading h1, .report-heading h2, .report-heading p { margin: 0 0 5px; font-weight: 500; }
.report-heading h1 { font-size: 18px; }
.report-heading h2 { font-size: 14px; }
.report-summary { display: flex; gap: 12px; margin-bottom: 14px; }
.report-summary span { flex: 1; padding: 9px; border: 1px solid #dbe4ef; }
.report-summary strong { display: block; margin-top: 4px; font-weight: 500; }
.report-document table { width: 100%; border-collapse: collapse; }
.report-document th, .report-document td { padding: 6px; border: 1px solid #dbe4ef; text-align: left; font-weight: 400; }
.report-verification { display: grid; justify-items: center; margin: 14px auto 0; }
.report-verification svg { width: 28mm; height: 28mm; background: #fff; }
.verification-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #f5f7fb; }
.verification-shell { width: min(100%, 520px); }
.verification-shell > header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.verification-shell > header img { width: 38px; height: 38px; object-fit: contain; }
.verification-result { padding: 28px; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-align: center; box-shadow: var(--shadow-sm); }
.verification-result h1 { margin: 10px 0 22px; font-size: 21px; font-weight: 500; }
.verification-mark { width: 48px; height: 48px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: var(--dash-green-soft); color: var(--dash-green); font-size: 26px; }
.verification-result.is-invalid .verification-mark { background: var(--dash-red-soft); color: var(--dash-red); }
.verification-result dl { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px 18px; margin: 0; text-align: left; }
.verification-result dt, .verification-result dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 400; }
.verification-result dt { color: var(--muted); }
.verification-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}
.verification-back:hover { text-decoration: underline; }
.verification-back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chart-bar label,
.management-chart-column small,
.status-chart-row,
.cash-period-row small,
.cash-chart-legend,
.dashboard-donut small,
.dashboard-donut-list,
.dashboard-performance-row { font-size: 10px; font-weight: 400; }
.dashboard-donut strong { font-size: 20px; font-weight: 400; }
.dashboard-donut-list strong,
.dashboard-performance-row strong,
.cash-period-row strong { font-size: 11px; font-weight: 400; }
.dashboard-line-chart text { font-size: 18px; font-weight: 400; letter-spacing: 0; }

.report-agent-performance {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.report-agent-performance > header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 500;
}
.report-performance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.report-performance-metrics > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.report-performance-metrics span {
  width: 34px;
  height: 34px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--dash-blue);
  background: var(--dash-blue-soft);
}
.report-performance-metrics small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
}
.report-performance-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 500;
}
.report-performance-table {
  border: 1px solid var(--border);
  border-radius: 8px;
}
.report-performance-table tr.is-current td { background: var(--dash-blue-soft); }

.detail-sheet {
  max-height: min(68vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.portal-choice {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
}
.portal-choice-header {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
}
.portal-choice-header img { width: 38px; height: 38px; object-fit: contain; }
.portal-choice-header div { min-width: 0; display: grid; gap: 1px; }
.portal-choice-header strong { color: var(--primary); font-size: 13px; font-weight: 600; }
.portal-choice-header span { color: var(--muted); font-size: 11px; }
.portal-choice-body {
  width: min(860px, calc(100% - 32px));
  margin: auto;
  padding: 32px 0;
}
.portal-choice-title { margin-bottom: 22px; text-align: center; }
.portal-choice-title h1 { margin: 0; color: var(--primary); font-size: 24px; font-weight: 550; }
.portal-choice-title p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.portal-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-option {
  min-height: 150px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.portal-option:hover { border-color: var(--accent); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.portal-option:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.portal-option > span { width: 54px; height: 54px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--dash-blue-soft); }
.portal-option > strong { align-self: end; font-size: 16px; font-weight: 550; }
.portal-option > small { align-self: start; color: var(--muted); font-size: 11px; }
.portal-option > .ae-icon { grid-column: 3; grid-row: 1 / 3; color: var(--muted); }

.executive-space { display: grid; gap: 14px; }
.portal-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.portal-toolbar > div { display: grid; gap: 1px; }
.portal-toolbar span { color: var(--muted); font-size: 10px; }
.portal-toolbar h2 { margin: 0; color: var(--primary); font-size: 18px; font-weight: 550; }
.executive-filter { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.executive-filter label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.executive-filter input { min-height: 38px; }
.executive-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.executive-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.executive-metric > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--dash-blue); background: var(--dash-blue-soft); }
.executive-metric small { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.executive-metric strong { display: block; margin-top: 2px; color: var(--primary); font-size: 17px; font-weight: 550; }
.executive-metric.tone-cyan > span { color: #0891b2; background: #ecfeff; }
.executive-metric.tone-green > span { color: #16a34a; background: #f0fdf4; }
.executive-metric.tone-amber > span { color: #d97706; background: #fffbeb; }
.executive-metric.tone-violet > span { color: #7c3aed; background: #f5f3ff; }
.executive-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, .8fr); gap: 14px; }
.executive-trend { min-height: 220px; display: grid; grid-template-rows: auto 1fr; gap: 12px; padding: 14px; }
.chart-legend { display: flex; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.tone-transfer { background: #2563eb; }
.tone-cargo { background: #16a34a; }
.executive-bars { min-height: 170px; display: grid; grid-template-columns: repeat(12, minmax(16px, 1fr)); align-items: end; gap: 7px; border-bottom: 1px solid var(--border); }
.executive-bar-group { height: 100%; display: grid; grid-template-rows: 1fr 20px; gap: 5px; align-items: end; }
.executive-bar-group > div { height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; }
.executive-bar-group i { width: min(9px, 42%); min-height: 3px; border-radius: 2px 2px 0 0; }
.executive-bar-group small { text-align: center; color: var(--muted); font-size: 9px; }
.executive-status-list { max-height: 230px; overflow: auto; padding: 8px 14px 14px; }
.executive-status-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.executive-status-list span { display: flex; align-items: center; min-width: 0; gap: 7px; }
.executive-status-list i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--agency-color); }
.executive-status-list strong { font-weight: 550; }
.executive-comparison { padding-bottom: 12px; }
.executive-comparison .card-header { align-items: center; }
.comparison-transfer,
.executive-comparison-row .is-transfer { background: #2563eb; }
.comparison-cargo,
.executive-comparison-row .is-cargo { background: #16a34a; }
.executive-comparison-list { display: grid; gap: 7px; padding: 0 14px; }
.executive-comparison-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 74px repeat(2, minmax(0, 1fr)); }
.executive-comparison-row > span { color: var(--muted); font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.executive-comparison-row > div { background: var(--surface-3); border-radius: 4px; height: 18px; overflow: hidden; position: relative; }
.executive-comparison-row > div i { display: block; height: 100%; opacity: 0.78; width: var(--bar-width); }
.executive-comparison-row > div small { color: var(--primary); font-size: 0.62rem; inset: 2px 6px auto auto; position: absolute; }
.modal:has(.executive-detail) { width: min(1040px, 100%); }
.executive-detail { display: grid; gap: 14px; }
.executive-detail > header { align-items: center; display: flex; justify-content: space-between; }
.executive-detail > header h2 { font-size: 0.9rem; font-weight: 500; margin: 2px 0; }
.executive-detail > header span,
.executive-detail > header small { color: var(--muted); font-size: 0.7rem; }
.executive-detail-section { border-top: 1px solid var(--border); padding-top: 12px; }
.executive-detail-section h3 { font-size: 0.78rem; font-weight: 550; margin: 0 0 8px; }
.executive-detail-section th,
.executive-detail-section td { font-size: 0.7rem; }
.executive-detail-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.executive-activity-table { max-height: 310px; }
.table-subline { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; }
.executive-agent-detail { display: grid; gap: 14px; }
.executive-agent-detail h3 { margin: 0; color: var(--primary); font-size: 14px; font-weight: 550; }
.detail-activity-table { max-height: 330px; border: 1px solid var(--border); border-radius: 8px; }
.detail-sheet dl { margin: 0; }
.detail-sheet-row {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}
.detail-sheet-row:last-child { border-bottom: 0; }
.detail-sheet-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.detail-sheet-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--primary);
  font-size: 13px;
}

@media (max-width: 980px) {
  .withdrawal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .executive-grid { grid-template-columns: 1fr; }
  .executive-detail-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .withdrawal-header { align-items: stretch; flex-direction: column; }
  .withdrawal-header .toolbar-actions { justify-content: space-between; }
  .withdrawal-metrics, .withdrawal-lookup { grid-template-columns: 1fr; }
  .withdrawal-lookup form { grid-template-columns: minmax(0, 1fr) auto; }
  .segmented-control { width: 100%; overflow-x: auto; }
  .segmented-control button { flex: 1 0 auto; min-width: 54px; }
  .report-performance-metrics { grid-template-columns: 1fr; }
  .detail-sheet-row { grid-template-columns: 1fr; gap: 3px; }
  .portal-choice-grid { grid-template-columns: 1fr; }
  .portal-choice-body { width: min(100% - 24px, 520px); padding: 20px 0; }
  .portal-option { min-height: 118px; padding: 16px; }
  .portal-choice-title h1 { font-size: 20px; }
  .portal-toolbar { align-items: flex-start; }
  .portal-toolbar .btn span { display: none; }
  .executive-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-filter .btn { grid-column: 1 / -1; }
  .executive-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-bars { overflow-x: auto; grid-template-columns: repeat(12, minmax(28px, 1fr)); }
  .executive-comparison-row { grid-template-columns: 54px repeat(2, minmax(100px, 1fr)); }
  .executive-comparison-list { overflow-x: auto; }
  .executive-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  @page ae-receipt { size: 80mm auto; margin: 3mm; }
  .print-area.print-receipt { page: ae-receipt; width: 74mm; }
  .print-area.print-receipt .receipt-page { width: 74mm; min-height: 0; margin: 0; padding: 0; gap: 3mm; border: 0; box-shadow: none; font-size: 8.5pt; }
  .print-area.print-receipt .receipt-header img { max-width: 18mm; max-height: 18mm; }
  .print-area.print-receipt .receipt-kv { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.2mm 2mm; }
  .print-area.print-receipt .doc-verification svg { width: 27mm; height: 27mm; }
}
.account-status-stack {
  display: inline-grid;
  gap: 4px;
}

.login-view #loginCredentials,
.login-view .login-mfa-challenge {
  align-content: center;
  display: grid;
  gap: 14px;
}

.login-view .login-mfa-challenge > p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.login-view .login-mfa-challenge .btn-link {
  color: var(--muted);
  font-size: 0.78rem;
  min-height: 36px;
  text-decoration: none;
}

.account-status-stack small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
}

.account-security-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-security-summary > span {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 12px;
}

.account-security-summary svg {
  color: var(--primary);
  grid-row: 1 / span 2;
}

.account-security-summary b,
.account-security-summary small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-security-summary b {
  font-size: 0.84rem;
  font-weight: 500;
}

.account-security-summary small,
.access-policy-help,
.recovery-codes p,
.mfa-enrollment p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.account-security-actions {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.mfa-enrollment {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 180px minmax(0, 1fr);
}

.mfa-qr {
  align-items: center;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  width: 180px;
}

.mfa-qr svg {
  display: block;
  height: 100%;
  max-width: 100%;
  width: 100%;
}

.recovery-codes {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.recovery-codes h3 {
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0 0 4px;
}

.recovery-codes > div {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.recovery-codes code {
  background: var(--surface-subtle, #f6f8fc);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.78rem;
  padding: 7px 9px;
  text-align: center;
}

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

.access-policy-row {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 130px;
  padding: 8px 6px;
}

.access-policy-row > span {
  font-size: 0.78rem;
  font-weight: 400;
}

.access-policy-row select {
  min-height: 34px;
  padding-block: 4px;
}

.administration-tabs {
  align-items: center;
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.administration-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.78rem;
  gap: 6px;
  min-height: 40px;
  padding: 7px 11px;
}

.administration-tabs button:hover,
.administration-tabs button:focus-visible,
.administration-tabs button.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.maintenance-space {
  display: grid;
  gap: 12px;
}

.maintenance-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
}

.maintenance-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
  padding: 14px;
}

.maintenance-panel header,
.maintenance-file,
.maintenance-integrity {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  min-width: 0;
}

.maintenance-panel header div { min-width: 0; }
.maintenance-panel h2 { font-size: 0.9rem; font-weight: 550; margin: 0; }
.maintenance-panel small { color: var(--muted); font-size: 0.72rem; }
.maintenance-panel-icon { color: var(--primary); display: inline-grid; flex: 0 0 36px; place-items: center; }
.maintenance-policy { display: grid; grid-template-columns: auto minmax(210px, 1fr) 36px; }
.maintenance-safety-switch { min-width: 210px; }
.maintenance-policy label,
.maintenance-danger label { align-items: center; display: flex; font-size: 0.76rem; gap: 8px; }
.maintenance-policy select,
.maintenance-danger select { min-height: 34px; min-width: 84px; padding-block: 4px; }
.maintenance-list { display: block; padding: 0; }
.maintenance-list table { margin: 0; }
.maintenance-list th,
.maintenance-list td { font-size: 0.74rem; }
.maintenance-file span { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-integrity { font-size: 0.7rem; }
.maintenance-integrity.is-valid { color: var(--success); }
.maintenance-integrity.is-invalid { color: var(--danger); }
.maintenance-empty { color: var(--muted); padding: 34px !important; text-align: center; }
.maintenance-empty svg { margin-right: 7px; vertical-align: middle; }
.maintenance-danger { border-color: rgba(220, 38, 38, 0.24); }

@media (max-width: 900px) {
  .maintenance-summary { grid-template-columns: 1fr; }
  .maintenance-danger { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .maintenance-panel { align-items: stretch; flex-direction: column; }
  .maintenance-policy { grid-template-columns: 1fr 36px; }
  .maintenance-safety-switch { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .account-security-summary,
  .access-policy-grid,
  .mfa-enrollment {
    grid-template-columns: 1fr;
  }

  .mfa-qr {
    justify-self: center;
  }

  .administration-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .administration-tabs {
    margin-left: 0;
    order: 3;
    width: 100%;
  }
}

.app-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  color: currentColor;
  vertical-align: -0.14em;
}

.app-icon-static,
.app-icon-animated,
.app-icon-loading {
  fill: none;
}

.app-icon-loading {
  fill: currentColor;
}

.icon-btn .app-icon,
.btn .app-icon,
.nav-item .app-icon,
.card-title .app-icon,
.help-tip .app-icon {
  width: 1.05em;
  height: 1.05em;
}

.nav-item .app-icon {
  font-size: 16px;
}

.stat-icon .app-icon {
  width: 20px;
  height: 20px;
}

.password-leading-icon.app-icon,
.auth-input-shell > .app-icon {
  justify-self: center;
}

.loading-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-icon-inline {
  display: inline-flex;
}

.loading-icon-wrap .app-icon {
  width: 20px;
  height: 20px;
}

.btn-sm:has(.app-icon:only-child) {
  width: 36px;
  min-width: 36px;
  padding-inline: 0;
  overflow: hidden;
}

.login-view .login-kicker .app-icon {
  color: var(--accent-strong);
}

.login-view .auth-input-shell > .app-icon,
.login-view .password-leading-icon.app-icon {
  color: #7b8da6;
}

.login-view .login-feature-grid .app-icon {
  font-size: 17px;
  color: #a7f3ff;
}

.legal-tabs .app-icon,
.legal-card > .app-icon {
  color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .animated-icon,
  .app-icon-animated,
  .loading-icon-wrap:not([aria-busy="true"]) .app-icon-loading {
    animation: none !important;
    transition: none !important;
  }
}
