:root {
  font-family: Tahoma, "Segoe UI", sans-serif;
  color: #19323f;
  background: #f4f7f9;
  font-size: 14px;
  line-height: 1.8;
  --navy: #102d3b;
  --teal: #087f78;
  --teal-dark: #06645f;
  --border: #dfe7ec;
  --muted: #607581;
  --shadow: 0 4px 24px rgb(21 50 65 / 4%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
input, select { min-width: 0; }
input, select, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #23a39a; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: -.7px; line-height: 1.65; }
h2 { font-size: 19px; line-height: 1.7; }
h3 { font-size: 15px; }
.muted { color: var(--muted); font-size: 12px; }
.eyebrow { display: block; color: var(--teal); font-size: 11px; font-weight: bold; margin-bottom: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: fixed; top: -80px; right: 20px; z-index: 20; background: var(--navy); color: white; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.boot-screen { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.loader { width: 28px; height: 28px; border: 3px solid #dce9e8; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-shell { max-width: 1030px; margin: 9vh auto; display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 22px; overflow: hidden; box-shadow: 0 16px 70px rgb(16 45 59 / 9%); background: white; }
.login-intro { background: var(--navy); color: white; padding: 44px; display: flex; flex-direction: column; }
.login-intro .eyebrow { color: #77d9cf; margin-top: 62px; }
.login-intro h1 { font-size: 34px; margin: 12px 0 18px; line-height: 1.8; }
.login-intro > p { color: #c1d4dd; font-size: 13px; max-width: 375px; line-height: 2.1; }
.intro-note { display: flex; gap: 10px; color: #aec6d0; border-top: 1px solid #34525f; padding-top: 24px; margin-top: 54px; font-size: 11px; line-height: 2; }
.intro-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #69cfc3; margin-top: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.brand-symbol { display: inline-grid; place-items: center; width: 42px; height: 42px; background: #e1f3ef; color: var(--teal); border-radius: 12px; flex-shrink: 0; }
.brand-symbol svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 16px; line-height: 1.5; letter-spacing: -.3px; }
.brand div > span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.brand-light { color: white; font-weight: bold; font-size: 18px; }
.brand-light .brand-symbol { background: #254f59; color: #84dacf; }
.login-card { padding: 65px 42px 40px; }
.login-card h2 { font-size: 25px; margin-bottom: 8px; }
.login-card form { margin-top: 30px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #385363; font-size: 12px; font-weight: bold; }
.field input, .field select { width: 100%; border: 1px solid #cedce3; background: white; color: #203c49; height: 43px; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: normal; transition: border-color .15s; }
.field input::placeholder { color: #8b9aa3; font-size: 11px; }
.field input:focus, .field select:focus { border-color: var(--teal); }
.field input:disabled, .field select:disabled { background: #f4f6f7; }
.login-card .field + .field { margin-top: 19px; }
.button { border: 1px solid transparent; border-radius: 8px; min-height: 42px; padding: 8px 17px; font-size: 12px; font-weight: bold; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.button.primary { background: var(--teal); color: white; }
.button.primary:hover:not(:disabled) { background: var(--teal-dark); }
.button.secondary { background: white; border-color: #cddce4; color: #244857; }
.button.secondary:hover:not(:disabled) { background: #f1f7f8; border-color: #9fbfc6; }
.button.ghost { background: transparent; color: #56717e; }
.button.ghost:hover:not(:disabled) { background: #eaf1f4; }
.button.danger { background: #fff4f2; border-color: #edc8c2; color: #9f3f32; }
.button.danger:hover:not(:disabled) { background: #ffece8; }
.button.compact { min-height: 34px; padding: 5px 11px; font-size: 11px; }
.full-width { width: 100%; }
.login-card .button.primary { margin-top: 25px; }
.login-footer { font-size: 10px; color: #8b9ca6; text-align: center; margin-top: 25px; }
.form-message { padding: 10px 12px; margin-top: 12px; border-radius: 7px; color: #9a3f35; background: #fff2ef; font-size: 12px; }
.form-message.success { color: #086e61; background: #e9f7f1; }
.app-shell { max-width: 1472px; padding: 0 32px; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 102px; border-bottom: 1px solid var(--border); }
.topbar-actions, .inline-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.user-label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; margin-left: 8px; }
.user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.overview { display: flex; justify-content: space-between; gap: 25px; align-items: center; margin: 31px 0 22px; }
.overview .muted { margin-top: 5px; }
.refresh-state { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #6a7e88; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; background: #8fa3ad; border-radius: 50%; flex-shrink: 0; }
.status-dot.good { background: #168b74; }
.status-dot.warning { background: #c78d26; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 19px 22px; box-shadow: var(--shadow); }
.stat-card > span { font-size: 12px; color: #526d7b; display: block; }
.stat-card strong { font-size: 29px; font-family: Tahoma, "Segoe UI", sans-serif; color: var(--navy); display: block; line-height: 1.7; margin-top: 3px; }
.stat-card small { color: #82929b; font-size: 10px; }
.tabs { display: flex; align-items: center; gap: 3px; margin: 26px 0 17px; overflow-x: auto; border-bottom: 1px solid #d9e4e9; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 23px; font-size: 12px; font-weight: bold; color: #73858f; white-space: nowrap; min-height: 49px; }
.tabs button[aria-selected="true"] { color: var(--teal); border-color: var(--teal); }
.tabs button:hover { color: var(--navy); background: #edf3f5; }
.panel { background: white; border: 1px solid var(--border); border-radius: 13px; padding: 25px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading p { color: #6c818c; font-size: 11px; margin-top: 5px; max-width: 670px; line-height: 2; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: bold; white-space: nowrap; }
.pill.neutral { color: #577281; background: #edf3f6; }
.pill.teal { color: #087264; background: #e7f5ef; }
.pill.blue { color: #305c87; background: #ecf2fa; }
.pill.amber { color: #956319; background: #fff4dc; }
.pill.red { color: #9c4036; background: #fff0eb; }
.filters { display: grid; grid-template-columns: minmax(185px, 1fr) minmax(220px, 1.55fr) auto; gap: 18px; align-items: end; background: #f8fafb; border: 1px solid #e6edf1; border-radius: 9px; padding: 16px; margin-bottom: 20px; }
.check-field { display: flex; align-items: center; gap: 9px; color: #4e6977; font-size: 11px; min-height: 43px; font-weight: normal; }
.check-field input { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; flex-shrink: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid #e1e9ee; border-radius: 9px; }
.data-table { border-collapse: collapse; width: 100%; text-align: right; }
.destinations-table { min-width: 1120px; }
.rules-table { min-width: 950px; }
.data-table thead { background: #f6f9fb; }
.data-table th { color: #5d7887; font-size: 10px; font-weight: bold; padding: 13px 12px; border-bottom: 1px solid #e1e9ee; white-space: nowrap; }
.data-table td { padding: 14px 12px; border-bottom: 1px solid #edf1f4; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfd; }
.data-table .numeric { font-family: Consolas, "Courier New", monospace; font-size: 12px; direction: ltr; unicode-bidi: isolate; display: inline-block; overflow-wrap: anywhere; }
.cell-primary { display: block; color: #254455; font-weight: bold; margin-bottom: 3px; }
.cell-secondary { display: block; font-size: 10px; color: #8295a0; max-width: 240px; overflow-wrap: anywhere; }
.cell-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cell-actions .button { min-height: 31px; padding: 4px 9px; font-size: 10px; }
.rules-table .cell-actions { flex-wrap: nowrap; }
.order-button { min-width: 30px; font-size: 13px !important; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 17px; }
.pagination { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pagination label { color: #78909c; font-size: 10px; display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; }
.pagination select { padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; color: #557280; background: white; min-height: 32px; font-size: 11px; }
.section-note { margin-top: 21px; color: #7a8f9b; font-size: 10px; line-height: 2; border-top: 1px solid #edf2f5; padding-top: 14px; }
.empty-state { text-align: center; padding: 42px 20px; color: #748a98; border: 1px dashed #d8e3ea; border-radius: 9px; margin: 16px 0; }
.empty-state strong { color: #4e6b7b; font-size: 13px; font-weight: normal; }
.empty-state p { font-size: 11px; margin-top: 8px; line-height: 2; }
.compact-empty { padding: 24px 20px; }
.notice { padding: 13px 16px; border-radius: 8px; font-size: 11px; margin-bottom: 18px; line-height: 2; background: #edf6fa; color: #3a6580; border: 1px solid #d2e6ef; }
.notice.warning { background: #fff8e9; border-color: #f1dfb3; color: #926424; }
.notice.error { background: #fff2ef; border-color: #efd0c8; color: #9b453b; }
.notice.success { background: #ebf8f1; border-color: #cce9db; color: #16775c; }
.policy-settings { display: grid; grid-template-columns: minmax(230px, 360px) 1fr; align-items: center; gap: 24px; margin-bottom: 20px; }
.draft-state { font-size: 11px; color: #78909c; padding-top: 18px; }
.draft-state.dirty { color: #986c25; }
.fixed-box { background: #f3f7f9; border: 1px solid #e0e9ee; padding: 16px; border-radius: 9px; margin-bottom: 22px; }
.fixed-box > strong { font-size: 11px; color: #547181; }
.fixed-box > p { font-size: 10px; color: #8096a2; margin: 5px 0 10px; }
.fixed-list { display: flex; flex-wrap: wrap; gap: 7px; }
.fixed-address { padding: 4px 8px; border-radius: 5px; font-family: Consolas, monospace; direction: ltr; unicode-bidi: isolate; font-size: 11px; color: #597581; background: white; border: 1px solid #e1eaee; }
.rule-editor { background: #f9fbfc; border: 1px solid #e1e9ee; border-radius: 10px; padding: 19px; margin-top: 22px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.editor-grid { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(95px, .6fr) minmax(110px, .75fr) minmax(165px, 1.15fr); gap: 14px; }
.editor-bottom { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 20px; margin-top: 15px; }
.editor-bottom .button { margin-bottom: 1px; }
.clients-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.client-card { border: 1px solid #dfe8ed; padding: 19px; border-radius: 11px; background: #fcfdfd; display: flex; flex-direction: column; gap: 15px; }
.client-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.client-card h3 { color: #244755; font-size: 14px; overflow-wrap: anywhere; }
.client-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 10px; }
.client-card dt { color: #8498a4; }
.client-card dd { margin: 0; color: #4c6a79; text-align: left; overflow-wrap: anywhere; }
.client-card .button { align-self: flex-start; margin-top: auto; }
.client-error { color: #a46833; background: #fff6e7; border-radius: 6px; padding: 8px 10px; font-size: 10px; }
.enroll-form { display: flex; gap: 14px; align-items: end; border: 1px solid #e2ebef; background: #f8fbfc; border-radius: 9px; padding: 17px; margin-bottom: 22px; }
.enroll-form .field { flex: 1; max-width: 400px; }
.account-panel { min-height: 520px; }
.password-form { max-width: 445px; display: grid; gap: 17px; }
.password-form .button { justify-self: start; min-width: 160px; }
.password-hint { margin-top: -5px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; color: #98a9b3; font-size: 10px; padding: 25px 4px 35px; }
.enrollment-dialog { border: 1px solid #d6e4e9; box-shadow: 0 16px 80px rgb(13 40 54 / 18%); border-radius: 16px; padding: 27px; max-width: 530px; width: calc(100% - 34px); color: #385866; }
.enrollment-dialog::backdrop { background: rgb(14 38 50 / 45%); }
.dialog-icon { width: 44px; height: 44px; background: #e3f4eb; color: #168367; display: grid; place-items: center; border-radius: 14px; font-size: 22px; margin-bottom: 17px; }
.enrollment-dialog > p { font-size: 12px; margin: 12px 0 17px; }
.enrollment-dialog .button + .button { margin-top: 9px; }
.enrollment-dialog .notice { margin: 20px 0; }
.noscript-message { background: #fff2e0; color: #865924; padding: 24px; text-align: center; }
@media (max-width: 1120px) {
  .app-shell { padding: 0 22px; }
  .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1.5fr; }
  .filters .check-field { grid-column: 1 / -1; min-height: 25px; }
  .editor-grid { grid-template-columns: 1.8fr 1fr; }
  .editor-bottom { grid-template-columns: 1fr auto; }
  .editor-bottom .note-field { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .login-shell { margin: 30px 18px; grid-template-columns: 1fr; max-width: 470px; }
  .login-intro { padding: 27px; }
  .login-intro .eyebrow { margin-top: 25px; }
  .login-intro h1 { font-size: 25px; margin: 7px 0 12px; }
  .login-intro h1 br { display: none; }
  .intro-note { margin-top: 22px; padding-top: 15px; }
  .login-card { padding: 28px; }
  .app-shell { padding: 0 15px; }
  .topbar { min-height: 88px; flex-wrap: wrap; gap: 15px; padding: 20px 0; }
  .topbar-actions { margin-right: auto; gap: 4px; }
  .user-label { font-size: 10px; margin-left: 2px; }
  .overview { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 24px; }
  h1 { font-size: 23px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px 11px; }
  .stat-card > span { font-size: 9px; }
  .stat-card strong { font-size: 22px; }
  .stat-card small { font-size: 8px; line-height: 1.8; display: block; }
  .tabs { margin-top: 20px; }
  .tabs button { padding: 11px 16px; font-size: 11px; }
  .panel { padding: 17px; }
  .section-heading { flex-wrap: wrap; gap: 13px; }
  h2 { font-size: 17px; }
  .filters { grid-template-columns: 1fr; padding: 13px; gap: 13px; }
  .filters .check-field { grid-column: auto; }
  .table-footer { flex-direction: column; align-items: flex-start; gap: 13px; }
  .policy-settings { grid-template-columns: 1fr; gap: 10px; }
  .draft-state { padding-top: 0; }
  .clients-grid { grid-template-columns: 1fr; }
  .enroll-form { flex-direction: column; align-items: stretch; gap: 13px; }
  .enroll-form .field { max-width: none; }
  .editor-grid { grid-template-columns: 1fr 1fr; }
  .editor-grid .address-field { grid-column: 1 / -1; }
  .editor-grid .field:last-child { grid-column: 1 / -1; }
  .editor-bottom { grid-template-columns: 1fr; gap: 12px; }
  .editor-bottom .note-field { grid-column: auto; }
  .editor-bottom .button { width: 100%; }
  .app-footer { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}
