/* Leader settings use the existing palette and font throughout. */
.leader-device-warning{box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid var(--ui-line,#c8d9d3);border-radius:12px;background:var(--ui-panel,#fff);color:var(--ui-ink,#183a39)}
.leader-device-warning::backdrop{background:rgba(18,29,42,.45)}
.leader-device-heading,.leader-device-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.leader-device-heading h2{margin:0;font-size:20px;flex:1}.leader-device-heading>button{min-width:36px;min-height:36px;padding:4px 8px}
.leader-device-banner{position:fixed;bottom:16px;left:16px;z-index:1000;max-width:calc(100vw - 32px);box-shadow:0 3px 15px #0003}
.leader-device-banner[hidden]{display:none!important}
.leader-orders-execution { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin-bottom:10px; }
.leader-orders-execution[hidden] { display:none; }
.leader-orders-execution label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0; }
.leader-orders-execution select { width:auto; max-width:100%; min-height:36px; margin:0; padding:6px 10px; border:1px solid var(--ui-line,#c8d9d3); border-radius:8px; background:var(--ui-panel,#fff); color:inherit; font:inherit; }
.leader-orders-execution .field-hint { flex:1 1 300px; margin:0; }
:root[data-color-profile] body.leader-settings-page :is(h1,h2,h3,h4,button,input,select,textarea,.brand strong,.brand small) { font-family:inherit; }
:root[data-color-profile] body.leader-settings-page .site-header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:16px; padding:16px 0; }
:root[data-color-profile] body.leader-settings-page .site-header .brand { max-width:210px; }
:root[data-color-profile] body.leader-settings-page .leader-header-profile { min-width:0; font-size:14px; line-height:1.4; }
:root[data-color-profile] body.leader-settings-page .leader-header-profile strong { font-size:15px; }
:root[data-color-profile] body.leader-settings-page .leader-header-profile .status-badge { padding:0; font-size:14px; }
:root[data-color-profile] body.leader-settings-page .site-header-actions { width:auto; min-width:0; }
:root[data-color-profile] body.leader-settings-page .cabinet-runtime { gap:12px; flex-wrap:wrap; justify-content:flex-end; min-width:0; }
:root[data-color-profile] body.leader-settings-page .cabinet-runtime-version { font-size:12px; }
:root[data-color-profile] body.leader-settings-page #leaderSettingsButton { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:15px; }
:root[data-color-profile] body.leader-settings-page .page-shell:has(.leader-cabinet-layout) { min-height:0; align-items:start; padding-top:8px; padding-bottom:28px; }
:root[data-color-profile] body.leader-settings-page .leader-cabinet-layout .auth-card { padding:20px; }
:root[data-color-profile] body.leader-settings-page .leader-settings-dialog,
:root[data-color-profile] #partnerInviteDialog.leader-settings-dialog { box-sizing:border-box; width:min(660px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); overflow:auto; padding:0; border:1px solid var(--ui-line); border-radius:14px; background:var(--ui-panel); color:var(--ui-ink); font-size:15px; line-height:1.45; }
.leader-settings-dialog::backdrop { background:rgba(18,29,42,.45); }
.leader-settings-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.leader-settings-heading h2 { margin:0; font-size:20px; }
.leader-settings-heading > button { min-width:36px; padding:4px 8px; }
.leader-settings-account:not([hidden]), .leader-settings-service:not(:empty) {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 14px;
  color:var(--ui-muted,var(--muted));
  font-size:13px;
  overflow-wrap:anywhere;
}
.leader-settings-account { padding:0 22px 10px; }
.leader-settings-service:empty { display:none; }
.leader-settings-gear { display:none; }
.leader-header-access { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; }

:root[data-color-profile] body.workspace-cabinet.leader-cabinet-header-active .workspace-frame {
  background-color:var(--workspace-shell);
  background-image:radial-gradient(ellipse at 86% 0%,color-mix(in srgb,var(--workspace-shell),#fff 16%),transparent 65%),linear-gradient(120deg,var(--workspace-deep),var(--workspace-shell));
  box-shadow:inset 0 1px #ffffff38,0 18px 44px #1a172128;
}
:root[data-color-profile] body.workspace-cabinet.leader-cabinet-header-active .leader-orders-tabs [role=tab]::before {
  background:linear-gradient(180deg,#ffffff24,#ffffff0d 38%,#18141a55);
  box-shadow:inset 0 1px #ffffff36;
}
:root[data-color-profile] body.workspace-cabinet.leader-cabinet-header-active .leader-orders-tabs [role=tab][aria-selected=true]::before {
  background:linear-gradient(175deg,#fff,var(--ui-soft) 64%,#fff);
  box-shadow:inset 0 1px #fff,inset 0 -1px var(--ui-line);
}
:root[data-color-profile=pearl] body.workspace-cabinet.leader-cabinet-header-active {
  --workspace-shell:#3c3836; --workspace-deep:#282626; --workspace-accent:#655347; --workspace-canvas:#f0edea;
}
:root[data-color-profile=plum] body.workspace-cabinet.leader-cabinet-header-active {
  --workspace-shell:#393240; --workspace-deep:#24202d; --workspace-accent:#674e76;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header {
  position:relative;
  z-index:2;
  grid-template-areas:'brand profile actions';
  grid-template-columns:minmax(0,200px) minmax(0,1fr) max-content;
  align-items:center;
  gap:16px;
  padding-block:14px;
  border-bottom:1px solid #ffffff36;
  background-image:repeating-linear-gradient(0deg,#ffffff10 0 1px,transparent 1px 5px),linear-gradient(105deg,#1310175c,#ffffff19 76%,#ffffff04);
  box-shadow:inset 0 -1px #0005;
  --cabinet-toolbar-hit:44px;
  --cabinet-toolbar-ink:#f7f5f8;
  --cabinet-toolbar-bg:linear-gradient(180deg,#ffffff17,#17121932);
  --cabinet-toolbar-hover:linear-gradient(180deg,#ffffff29,#17121910);
  --cabinet-toolbar-border:#ffffff3d;
  --cabinet-toolbar-focus:#f3eef7;
  --cabinet-toolbar-radius:9px;
  --cabinet-toolbar-shadow:inset 0 1px #ffffff18;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header .brand { grid-area:brand; max-width:192px; }
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .leader-header-profile {
  grid-area:profile;
  padding-inline-start:16px;
  border-inline-start:1px solid #e7fbf232;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active #cabinetFio {
  font-size:clamp(16px,1.35vw,19px);
  font-weight:600;
  line-height:1.28;
}
.leader-cabinet-header-active .leader-header-access { margin-top:3px; font-size:13px; }
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active #leaderStatus {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  line-height:18px;
  font-weight:600;
  color:#e9f0ee;
}
.leader-cabinet-header-active #leaderStatus:not(:empty)::before {
  content:'';
  flex:0 0 6px;
  height:6px;
  border-radius:50%;
  background:#82c8a8;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active #leaderStatus.is-blocked { color:#ffd0c4; }
.leader-cabinet-header-active #leaderStatus.is-blocked:not(:empty)::before { background:currentColor; }
.leader-cabinet-header-active #leaderTariffStatus { display:none; }
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header-actions {
  grid-area:actions;
  max-width:none;
  justify-self:end;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .cabinet-runtime {
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active #leaderSettingsButton {
  box-sizing:border-box;
  display:grid;
  place-items:center;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border:1px solid var(--cabinet-toolbar-border);
  border-radius:var(--cabinet-toolbar-radius);
  background:var(--cabinet-toolbar-bg);
  box-shadow:var(--cabinet-toolbar-shadow);
}
:root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active #leaderSettingsButton:hover { background:var(--cabinet-toolbar-hover); }
.leader-cabinet-header-active #leaderSettingsButton:focus-visible { outline:2px solid var(--cabinet-toolbar-focus); outline-offset:3px; }
.leader-cabinet-header-active .leader-settings-label { display:none; }
.leader-cabinet-header-active .leader-settings-gear {
  display:block;
  width:30px;
  height:30px;
  object-fit:contain;
  filter:grayscale(1) brightness(1.16) drop-shadow(0 1px 2px #18141a99);
  animation:leader-gear-turn 10s cubic-bezier(.45,0,.25,1) infinite;
}
@keyframes leader-gear-turn {
  0%, 91% { transform:rotate(0turn); }
  100% { transform:rotate(1turn); }
}
@media (prefers-reduced-motion:reduce) {
  .leader-cabinet-header-active .leader-settings-gear { animation:none; }
}
@media screen and (forced-colors:none) {
  :root[data-color-profile] body.workspace-cabinet.leader-cabinet-header-active .site-header .service-brand {
    filter:grayscale(1) drop-shadow(0 1px 1px #1a181d99);
  }
}
@media (max-width:850px) {
  :root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header {
    grid-template-areas:'brand profile' 'actions actions';
    grid-template-columns:minmax(0,150px) minmax(0,1fr);
    gap:7px;
    padding-block:9px;
  }
  :root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header .brand { max-width:100%; }
  :root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .leader-header-profile { grid-column:auto; grid-row:auto; padding-inline-start:8px; }
  :root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header-actions { grid-column:auto; grid-row:auto; justify-self:start; }
}
.leader-settings-dialog > .leader-settings-heading { padding:17px 22px 6px; }
.leader-settings-section { margin:0 22px; padding:14px 0; }
.leader-settings-section + .leader-settings-section { border-top:1px solid var(--ui-line); }
body.leader-cabinet-header-active :is(#leaderSettingsAppearanceButton,#leaderSettingsAppearance) { display:none!important; }
#leaderSettingsAppearance:not([hidden]) { padding-top:14px; }
:root[data-color-profile] body.leader-settings-page .site-header .cabinet-runtime-refresh { box-sizing:border-box; max-width:100%; min-height:36px; padding:6px 8px; white-space:normal; font:inherit; font-size:13px; font-weight:800; }
.leader-settings-section h3 { margin:0 0 8px; font-size:15px; }
.leader-settings-section p { margin:0 0 10px; }
:root[data-color-profile] #leaderSettingsDialog .color-profile-control { display:grid; gap:6px; width:100%; max-width:none; margin:0; font-size:13px; }
:root[data-color-profile] #leaderSettingsDialog .color-profile-control select { width:100%; max-width:100%; margin:0; font:inherit; font-size:16px; }
.leader-settings-actions, #leaderSettingsActionControls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
:root[data-color-profile] #leaderSettingsActionControls > .cabinet-help-open { background:var(--ui-panel); color:var(--ui-ink); border:1px solid var(--ui-line); }
.leader-tracking-channels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.leader-tracking-channel { display:grid; gap:8px; min-width:0; padding:11px 12px; border:1px solid var(--ui-line); border-radius:9px; background:var(--ui-soft); }
.leader-tracking-channel > strong { font-size:15px; }
:root[data-color-profile] #leaderSettingsDialog .leader-tracking-address { box-sizing:border-box; min-width:0; width:100%; padding:8px; border:1px solid var(--ui-line); border-radius:4px; background:var(--ui-panel); color:var(--ui-ink); font:inherit; font-size:13px; }
.leader-tracking-copy-feedback { margin:0!important; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.leader-tracking-copy-feedback:empty { display:none; }
.leader-tracking-confirmation { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; }
.leader-tracking-confirmation input { width:18px; height:18px; margin:0; accent-color:#198044; }
.leader-tracking-confirmation:has(input:checked) { color:var(--ui-success-ink,#226443); }
:is(#leaderTrackingChannelMessage,#leaderTrackingAccessMessage):empty { display:none; }
.leader-tracking-access-content { display:grid; gap:12px; }
.leader-tracking-access-content > :is(h1,p) { margin:0; }
.leader-tracking-access-content .leader-tracking-channel .button { justify-self:start; }
#leaderTrackingAccessView { width:min(660px,100%); margin-inline:auto; padding:clamp(16px,3vw,24px); border:1px solid var(--ui-line); border-radius:14px; background:var(--ui-panel); color:var(--ui-ink); }
#leaderTrackingAccessDialog .leader-tracking-access-content { padding:12px clamp(15px,3vw,22px) 16px; }
#leaderTrackingAccessTitle:focus { outline:none; }
body:has(#leaderTrackingAccessView:not([hidden])) #vip-cabinet-modules { display:none!important; }
:is(#leaderTrackingAccessView,#leaderTrackingAccessDialog) .action-help-icon { display:none!important; }
.leader-settings-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:9px; border-top:1px solid var(--ui-line); padding:13px 22px 16px; background:var(--ui-soft); }
.leader-settings-service .cabinet-runtime-refresh { order:-1; }
:root[data-color-profile] :is(#leaderSettingsDialog,#leaderTrackingAccessDialog) :is(.button,.cabinet-runtime-refresh) {
  width:fit-content; min-width:0; max-width:100%; min-height:38px; margin:0;
  padding:6px 11px; border-radius:7px; font-size:13px; font-weight:600; white-space:normal;
}
:root[data-color-profile] :is(#leaderSettingsDialog [data-close-leader-settings][aria-label],#closeLeaderTrackingAccess) { min-width:38px; font-size:20px; }
#leaderSettingsDialog .finance-actions button { flex:0 1 auto; }
:root[data-color-profile] body.leader-cabinet-header-active :is(#leaderSettingsDialog,#partnerInviteDialog,#leaderTrackingAccessDialog) {
  --ui-line:color-mix(in srgb,var(--workspace-accent) 24%,#ece9ed);
  --ui-ink:color-mix(in srgb,var(--workspace-accent) 58%,#17141b);
  --ui-muted:color-mix(in srgb,var(--workspace-accent) 61%,#45404a);
  --ui-panel:color-mix(in srgb,#fff 86%,var(--ui-soft));
  background-image:linear-gradient(148deg,var(--ui-panel),color-mix(in srgb,var(--ui-panel) 88%,var(--ui-soft)));
}
:root[data-color-profile] body.leader-cabinet-header-active :is(#leaderSettingsDialog,#partnerInviteDialog,#leaderTrackingAccessDialog) :is(.button-secondary,.cabinet-runtime-refresh,.cabinet-help-open) {
  color:var(--ui-ink);
  background:var(--ui-panel);
  border-color:var(--ui-line);
  box-shadow:none;
}
:root[data-color-profile] body.leader-cabinet-header-active :is(#leaderSettingsDialog,#partnerInviteDialog,#leaderTrackingAccessDialog) :is(.button-secondary,.cabinet-runtime-refresh,.cabinet-help-open):hover:not(:disabled) {
  background:var(--ui-soft);
}
:root[data-color-profile] body.leader-cabinet-header-active #leaderSettingsDialog #leaderSettingsTariffControl > .button {
  color:#fff;
  background:var(--workspace-accent);
  border-color:var(--workspace-accent);
}
:root[data-color-profile] body.leader-cabinet-header-active #leaderSettingsDialog #leaderSettingsTariffControl > .button:hover:not(:disabled) {
  background:color-mix(in srgb,var(--workspace-accent),#000 12%);
}
@media(max-width:1050px) {
  :root[data-color-profile] body.leader-settings-page .site-header { grid-template-columns:minmax(0,1fr) auto; gap:10px; }
  :root[data-color-profile] body.leader-settings-page .leader-header-profile { grid-column:1 / -1; grid-row:2; }
  :root[data-color-profile] body.leader-settings-page .site-header-actions { grid-column:2; grid-row:1; max-width:280px; }
}
@media(max-width:600px) {
  :root[data-color-profile] body.leader-settings-page .site-header .brand { max-width:140px; }
  :root[data-color-profile] body.leader-settings-page .site-header-actions { max-width:145px; }
  :root[data-color-profile] body.leader-settings-page .cabinet-runtime { gap:6px; }
  :root[data-color-profile] body.leader-settings-page .cabinet-runtime-version { font-size:12px; overflow-wrap:anywhere; white-space:normal; }
  :root[data-color-profile] body.leader-settings-page.leader-cabinet-header-active .site-header { grid-template-columns:minmax(0,123px) minmax(0,1fr); }
  .leader-settings-dialog > .leader-settings-heading { padding-inline:15px; }
  .leader-settings-account, .leader-settings-footer { padding-inline:15px; }
  .leader-settings-section { margin-inline:15px; }
  :root[data-color-profile] :is(#leaderSettingsDialog,#leaderTrackingAccessDialog) :is(.button,.cabinet-runtime-refresh) { min-height:44px; }
  .leader-tracking-channels { grid-template-columns:minmax(0,1fr); }
}

:root {
  color-scheme: light;
  --ink: #173129;
  --green: #1f6f50;
  --green-dark: #173e31;
  --green-soft: #e9f2ed;
  --gold: #cda95d;
  --paper: #fbfaf6;
  --white: #ffffff;
  --line: #d9e1dc;
  --muted: #617068;
  --error: #a52f2f;
  --warning: #755916;
  --shadow: 0 24px 70px rgba(18, 49, 39, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(205, 169, 93, 0.15), transparent 30rem),
    linear-gradient(145deg, #fdfcf8 0%, #eef5f1 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--green-dark);
}

a:hover {
  color: var(--green);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(31, 111, 80, 0.36);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  background: var(--green-dark);
  transform: translateY(-160%);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(23, 49, 41, 0.24);
  border-radius: 50% 50% 50% 14px;
  background: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.secure-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(31, 111, 80, 0.12);
}

.site-header-actions,
.cabinet-runtime {
  display: flex;
  align-items: center;
}

.site-header-actions {
  gap: 16px;
}

.cabinet-runtime {
  gap: 8px;
}

.cabinet-runtime-version {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.cabinet-runtime-version strong {
  color: var(--green-dark);
}

.cabinet-runtime-refresh {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: var(--white);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.cabinet-runtime-refresh:hover {
  border-color: var(--green);
  background: #f3f8f5;
}

.cabinet-runtime-refresh:disabled {
  cursor: wait;
  opacity: 0.65;
}

.page-shell {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 188px);
  padding: 28px 20px 60px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.8fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.auth-copy {
  max-width: 590px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

#pageLead {
  max-width: 48ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.trust-list li {
  position: relative;
  padding-left: 26px;
}

.trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

.auth-card {
  width: 100%;
  min-height: 360px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(23, 49, 41, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

form,
.state-view,
.cabinet-view {
  display: grid;
  gap: 20px;
}

[hidden] {
  display: none !important;
}

.field {
  display: grid;
  gap: 7px;
}

label,
.link-box > label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #a8b5ae;
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:hover {
  border-color: #70837a;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 111, 80, 0.11);
  outline: none;
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 90px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 36px;
  padding: 5px 8px;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.field-hint,
.field-error {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.field-error {
  color: var(--error);
}

.consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 500;
  line-height: 1.45;
}

.consent-row input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: -10px;
  font-size: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
  transform: none;
}

.button-primary {
  color: var(--white);
  background: var(--green-dark);
}

.button-primary:hover {
  color: var(--white);
  background: var(--green);
}

.button-secondary {
  border-color: #9aac9f;
  color: var(--green-dark);
  background: var(--white);
}

.button-wide {
  width: 100%;
}

.cabinet-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
}
.cabinet-partner-action { flex: 1 1 280px; }
.cabinet-partner-action .field-hint { margin-bottom: 0; }
:root[data-color-profile] #partnerInviteDialog .leader-settings-heading {
  padding-block:12px;
  border-bottom:1px solid var(--ui-line);
  background:var(--ui-soft);
}
:root[data-color-profile] #partnerInviteDialog #partnerInviteTitle {
  padding:0;
  font-size:clamp(18px,4vw,22px);
}
:root[data-color-profile] #partnerInviteDialog #partnerInvite { gap:12px; padding:14px 22px 18px; }
:root[data-color-profile] #partnerInviteDialog .partner-invite-content {
  grid-template-columns:minmax(0,1fr) 156px;
  gap:12px;
  margin-top:0!important;
}
#partnerInviteDialog .partner-invite-details { display:grid; gap:9px; min-width:0; }
#partnerInviteDialog .partner-invite-qr { display:grid; justify-items:center; gap:8px; min-width:0; }
#partnerInviteDialog #partnerInviteStatus { margin:0; }
:root[data-color-profile] #partnerInviteDialog #partnerInviteText {
  padding:10px 12px;
  background:var(--ui-panel);
  font-size:14px;
  line-height:1.45;
}
#partnerInviteDialog #partnerInviteText > :last-child { margin-bottom:0; }
:root[data-color-profile] #partnerInviteDialog #partnerInviteText .partner-invite-url {
  color:var(--ui-muted);
  text-decoration:none;
}
:root[data-color-profile] #partnerInviteDialog #partnerInvite #partnerQrCanvas {
  box-sizing:border-box;
  width:156px;
  border:1px solid var(--ui-line);
  border-radius:9px;
}
:root[data-color-profile] #partnerInviteDialog .partner-invite-actions { display:flex; flex-wrap:wrap; gap:8px; }
:root[data-color-profile] #partnerInviteDialog .button {
  width:fit-content;
  max-width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:6px 12px;
  border-radius:7px;
  font-size:13px;
  font-weight:600;
  white-space:normal;
}
:root[data-color-profile] body.leader-cabinet-header-active #partnerInviteDialog .button-primary {
  background:var(--workspace-accent);
  border-color:var(--workspace-accent);
  color:#fff;
}
:root[data-color-profile] body.leader-cabinet-header-active #partnerInviteDialog .button-primary:hover:not(:disabled) {
  background:color-mix(in srgb,var(--workspace-accent),#000 12%);
}
:root[data-color-profile] #partnerInviteDialog #closePartnerInvite {
  flex:none;
  width:44px;
  padding:0;
  font-size:20px;
}
:root[data-color-profile] #partnerInviteDialog :is(.partner-invite-note,#partnerInviteStatus) {
  color:var(--ui-muted);
  font-size:13px;
}
:root[data-color-profile] #partnerInviteDialog #copyPartnerInvite.is-copied { opacity:.62; }
:root[data-color-profile] #partnerInviteDialog #partnerInviteStatus.is-copy-notice {
  width:fit-content;
  padding:4px 9px;
  border:1px solid var(--ui-line);
  border-radius:7px;
  background:var(--ui-soft);
  color:var(--ui-ink);
}
@media (max-width:560px) {
  :root[data-color-profile] #partnerInviteDialog #partnerInvite { padding-inline:15px; }
  :root[data-color-profile] #partnerInviteDialog .partner-invite-content { grid-template-columns:minmax(0,1fr); }
  :root[data-color-profile] #partnerInviteDialog #partnerInvite #partnerQrCanvas { justify-self:center; width:132px; }
}
.partner-qr-canvas { display: block; max-width: 100%; width: 280px; height: auto; margin: 16px auto; }
.partner-qr-canvas[hidden] { display: none; }

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: -2px 0 0;
  font-size: 13px;
}

.message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #f0b9b9;
  border-radius: 11px;
  color: #7d2424;
  background: #fff2f2;
  font-size: 14px;
}

.message-success {
  border-color: #acd0bd;
  color: #18523b;
  background: #edf8f1;
}

.message-warning {
  margin: 0;
  border-color: #dfcf9b;
  color: var(--warning);
  background: #fff9e8;
}

.state-view {
  place-items: center;
  min-height: 280px;
  text-align: center;
}

.state-view h2,
.state-view p {
  margin: 0;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 28px;
  font-weight: 800;
}

.cabinet-view {
  gap: 22px;
}

.auth-panel.leader-cabinet-layout {
  display: block;
  width: min(1180px, 100%);
  min-width: 0;
}

.leader-cabinet-layout .auth-copy {
  display: none;
}

.leader-cabinet-layout .auth-card {
  min-height: 0;
  padding: clamp(20px, 3vw, 36px);
}

.leader-cabinet-layout :is(.cabinet-view, .leader-orders, .leader-orders-search,
  .leader-orders-list, .leader-summary-group, .leader-summary-group-heading,
  .leader-summary-group-orders, .leader-order-card) {
  grid-template-columns: minmax(0, 1fr);
}

.status-badge {
  justify-self: start;
  padding: 7px 11px;
  border-radius: 999px;
  color: #18523b;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

.status-badge.is-blocked {
  color: var(--warning);
  background: #fff1c8;
}

.profile-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}

.profile-list div {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.link-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: var(--green-soft);
}

.link-box input {
  background: rgba(255, 255, 255, 0.9);
}

.leader-orders {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8faf9;
}

.leader-orders-heading,
.leader-order-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.leader-orders-heading h2,
.leader-orders-heading p,
.leader-order-card p,
.leader-order-card h4 {
  margin: 0;
}

.leader-orders-heading > p,
.leader-orders-message,
.leader-order-card time,
.leader-order-totals {
  color: var(--muted);
  font-size: 13px;
}

.leader-orders-heading > p {
  max-width: 440px;
}

.leader-orders-count {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--white);
  background: var(--green-dark);
  font-size: 14px;
  vertical-align: middle;
}

.leader-orders-message {
  min-height: 20px;
  margin: 0;
}

.leader-orders-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leader-orders-tabs button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #a8b5ae;
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.leader-orders-tabs button[aria-selected="true"] {
  border-color: var(--green-dark);
  color: var(--white);
  background: var(--green-dark);
}

.leader-orders-tabs span {
  margin-left: 4px;
}

.leader-orders-search {
  display: grid;
  gap: 6px;
}

.leader-orders-search input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #a8b5ae;
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.leader-orders-list {
  display: grid;
  gap: 7px;
}

.leader-summary-group {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #cbd8d1;
  border-radius: 15px;
  background: #f7faf8;
}

.leader-summary-group.is-rejected {
  border-color: #e7c4c0;
  background: #fff9f8;
}

.leader-summary-group-heading {
  display: grid;
  gap: 4px;
}

.leader-summary-group-heading .eyebrow,
.leader-summary-group-heading h3,
.leader-summary-group-scope {
  margin: 0;
}

.leader-summary-group-heading h3 {
  color: var(--green-dark);
  font-size: 18px;
}

.leader-summary-group-scope {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.leader-summary-identity {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 3px;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.leader-summary-identity p {
  min-width: 0;
  margin: 0;
}

.leader-summary-group-orders {
  display: grid;
  gap: 7px;
}

.leader-summary-actions {
  padding-bottom: 2px;
}

.leader-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.leader-order-actions > details,
.leader-order-actions > .button {
  flex: 0 1 220px;
}

.leader-order-actions > .button,
.leader-order-actions summary.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  text-align: center;
}

.leader-order-actions > details[open] {
  flex-basis: 100%;
}

.leader-rejected-actions {
  flex: 1 1 100%;
  display: grid;
  gap: 9px;
}

.leader-rejected-action {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf9;
}

.leader-rejected-action p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.leader-rejected-action .button {
  width:100%;min-width:0;min-height:46px;font-size:16px;line-height:1.35;
  white-space:normal;overflow-wrap:break-word;padding:10px 14px;
}

.leader-orders-list .leader-order-totals,
.leader-orders-list .leader-order-card time,
.leader-orders-list .leader-order-contact dt {font-size:14px;line-height:1.45}

.leader-order-cancelled-state {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #654b18;
  background: #fff4d6;
  font-weight: 800;
}

.leader-order-danger {
  border: 1px solid #b33a3a;
  color: #8c2020;
  background: #fff;
}

.leader-order-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.leader-order-card-heading strong {
  color: var(--green-dark);
}

.leader-order-card-heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 6px 12px;
}

.leader-order-partner {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-order-card details {
  margin-top: 0;
}

.leader-order-card summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 800;
}

.leader-order-card details[open] {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.leader-order-card details[open] summary {
  margin-bottom: 8px;
}

.summary-version-superseded {
  color: #7a817d;
}

.leader-order-correction-note {
  grid-column: 1 / -1;
}

.order-correction-badge {
  color: #b3261e;
  font-weight: 800;
}

.summary-version-current {
  color: #176d42;
  font-weight: 800;
  animation: summary-version-glow 1.2s ease-in-out 3;
}

@keyframes summary-version-glow {
  50% { text-shadow: 0 0 9px rgba(28, 157, 88, .8); }
}

.leader-order-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.leader-order-contact div {
  min-width: 0;
}

.leader-order-contact dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.leader-order-contact dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.leader-order-items {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 7px 0 14px;
}

.leader-order-items tr {
  border-bottom: 1px solid var(--line);
}

.leader-order-items th,
.leader-order-items td {
  padding: 6px 8px;
  vertical-align: top;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.leader-order-items th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.leader-order-items :is(th, td):first-child {
  padding-left: 0;
  text-align: left;
}

.leader-order-items :is(th, td):nth-child(2) {
  width: 4rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leader-order-items :is(th, td):nth-child(3) {
  width: 5.5rem;
  padding-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leader-order-comment {
  color: var(--ink);
  font-size: inherit;
}

.order-correction-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}

.order-correction-dialog::backdrop { background: rgb(15 23 42 / 58%); }

.order-correction-heading,
.order-correction-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.order-correction-heading h2,
.order-correction-heading p { margin: 0; }

.order-correction-dialog fieldset {
  min-width: 0;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.order-correction-items { display: grid; gap: 10px; margin-bottom: 12px; }

.order-correction-row > select { min-width: 0; width: 0; flex: 1 1 0; }

.order-correction-row label,
.order-correction-remove { flex-shrink: 0; }

.order-correction-row.is-invalid { outline: 2px solid #b42318; outline-offset: 4px; }

.order-correction-heading { flex-wrap: wrap; overflow-wrap: anywhere; }

.order-correction-row label { display: grid; gap: 4px; font-size: .82rem; }

.order-correction-row label select { width: 76px; }

.order-correction-remove { white-space: nowrap; }

@media (max-width: 640px) {
  .order-correction-row { align-items: end; flex-wrap: wrap; }
  .order-correction-row > select { width: 100%; flex-basis: 100%; }
}

.auth-panel.leader-availability-layout {
  display: block;
  width: min(1440px, 100%);
}

.leader-availability-layout .auth-copy {
  display: none;
}

.leader-availability-layout .auth-card {
  min-height: 0;
  padding: clamp(20px, 3vw, 36px);
}

.leader-availability-view {
  display: grid;
  gap: 16px;
}

.leader-availability-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.leader-availability-heading h2,
.leader-availability-heading p {
  margin: 0;
}

.leader-availability-heading p:last-child {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
}

.leader-availability-tools {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(250px, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf9;
}

.leader-availability-tools label {
  display: grid;
  gap: 6px;
}

.leader-availability-tools input,
.leader-availability-tools select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #a8b5ae;
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.leader-availability-message {
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8faf9;
}

.leader-availability-message.is-error {
  border-color: #f0b9b9;
  color: var(--error);
  background: #fff2f2;
}

.leader-availability-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.leader-availability-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.leader-availability-table th,
.leader-availability-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.leader-availability-table th {
  background: #f5f8f6;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.leader-availability-table tbody tr:last-child td {
  border-bottom: 0;
}

.leader-availability-table tbody tr.is-dirty {
  background: #fff9e8;
}

.leader-availability-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.availability-state {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  color: #18523b;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.availability-state.is-off {
  color: var(--error);
  background: var(--error-soft);
}

.leader-availability-savebar {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(18, 49, 39, 0.12);
}

.leader-availability-savebar[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .summary-version-current { animation: none; text-decoration: underline 2px rgba(28, 157, 88, .45); }
}

.text-action {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(23, 49, 41, 0.1);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.leader-registration .footer-service-description,
.leader-registration .auth-copy :is(.eyebrow, .trust-list),
#registerForm .field-error:empty {
  display: none;
}

:root[data-color-profile] body.leader-registration .site-header {
  width: min(640px, calc(100% - 24px));
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-inline: auto;
  padding: 6px 0;
}

.leader-registration .site-header .service-brand {
  width: 144px;
  max-width: 100%;
  justify-self: start;
  padding: 0;
}
.leader-registration .service-brand img { width: 100%; height: auto; }
.leader-registration .service-brand::before,
.leader-registration .service-brand::after { inset: 0; }

#registrationActions { display: flex; gap: 8px; align-items: center; }
#registrationActions .button {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  font-size: 15px;
  line-height: 1.2;
  transform: none;
}
#registrationMenu { position: relative; }
#registrationMenu summary { list-style: none; }
#registrationMenu summary::-webkit-details-marker { display: none; }
#registrationMenu summary::after { content: '▾'; margin-left: 5px; }
#registrationMenu[open] summary::after { transform: rotate(180deg); }
#registrationMenu .site-header-actions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  right: 0;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-panel);
}
#registrationMenu .cabinet-runtime { align-items: stretch; flex-direction: column; }

#registrationEmailDialog {
  width: min(420px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-panel);
  color: var(--ui-ink);
}
#registrationEmailDialog::backdrop { background: rgba(18, 29, 42, .48); }
#registrationEmailDialog h2 { margin: 0; font-size: 20px; }
#registrationEmailDialog p { margin: 12px 0; font-size: 15px; line-height: 1.4; }
#registrationEmailDialog .button { min-height: 44px; }
body:has(#registrationEmailDialog[open]) #registerForm > :is(button[type="submit"], .action-help-wide) {
  visibility: hidden;
}
#closeRegistrationEmail { flex: none; min-width: 44px; }

:root[data-color-profile] body.leader-registration .page-shell {
  display: block;
  width: min(640px, calc(100% - 24px));
  min-height: 0;
  padding: 4px 0 12px;
}
:root[data-color-profile] body.leader-registration .auth-panel {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-panel);
}
.leader-registration .auth-copy { max-width: none; text-align: left; margin: 0 0 10px; }
.leader-registration #pageTitle { max-width: none; margin: 0; font-size: 26px; line-height: 1.16; }
:root[data-color-profile] body.leader-registration #pageLead { max-width: none; margin: 3px 0 0; font-size: 14px; line-height: 1.35; }
:root[data-color-profile] body.leader-registration .auth-card { min-height: 0; padding: 0; border: 0; box-shadow: none; }
#registerForm { gap: 8px; align-items: start; }
#registerForm .field { gap: 2px; min-width: 0; }
#registerForm label { font-size: 14px; line-height: 1.3; }
#registerForm .field input { min-height: 44px; padding-block: 7px; font-size: 16px; }
#registerForm .field-hint { min-height: 0; line-height: 1.3; }
#registerForm .legal-links { margin: -3px 0 0 32px; gap: 4px 12px; font-size: 13px; line-height: 1.3; }
#registerForm > .action-help-wide > .action-help-icon { left: auto !important; right: 0; }
.leader-registration .site-footer { margin-top: 8px; }

@media (min-width: 720px) {
  .leader-registration .site-header .service-brand { width: 156px; }
  #registerForm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  #registerForm > * { grid-column: 1 / -1; }
  #registerForm > .registration-half { grid-column: auto; }
  #registerForm .field input { min-height: 36px; padding-block: 4px; }
}
@media (max-width: 719px) {
  .leader-settings-page :is(#registerForm, #loginForm) button[type="submit"],
  .leader-settings-page a.button[href="/leader/login"],
  .leader-settings-page #verifyView a.button[href="/leader/register"] { min-height: 44px; }
}

.site-footer p {
  margin: 4px 0;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 30;
  padding: 14px;
  border-radius: 10px;
  color: var(--white);
  background: var(--error);
  text-align: center;
}

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

@media (max-width: 900px) {
  .auth-panel {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 620px;
  }

  .auth-copy {
    text-align: center;
  }

  h1,
  #pageLead {
    margin-right: auto;
    margin-left: auto;
  }

  .trust-list {
    display: none;
  }

  .leader-availability-heading {
    display: grid;
  }

  .leader-availability-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header {
    width: min(100% - 28px, 1180px);
    padding: 16px 0;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .brand strong {
    font-size: 15px;
  }

  .secure-label {
    display: none;
  }

  .site-header-actions {
    gap: 0;
  }

  .cabinet-runtime {
    align-items: flex-end;
    flex-direction: column;
    gap: 3px;
  }

  .cabinet-runtime-refresh {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .page-shell {
    min-height: auto;
    padding: 16px 14px 36px;
  }

  .auth-panel {
    gap: 22px;
  }

  h1 {
    font-size: clamp(35px, 11vw, 48px);
  }

  #pageLead {
    margin-top: 16px;
    font-size: 15px;
  }

  .auth-card {
    min-height: 0;
    padding: 22px 18px;
    border-radius: 19px;
  }

  form,
  .state-view,
  .cabinet-view {
    gap: 17px;
  }

  .profile-list,
  .button-row,
  .leader-order-contact {
    grid-template-columns: 1fr;
  }

  .leader-orders-heading,
  .leader-order-card-heading {
    align-items: start;
    flex-direction: column;
  }

  .leader-cabinet-layout .leader-order-card-heading,
  :root[data-color-profile] .leader-cabinet-layout .leader-order-card-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .leader-cabinet-layout :is(.leader-rejected-actions, .leader-rejected-action) {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .leader-cabinet-layout .leader-order-actions > details {
    min-width: 0;
    max-width: 100%;
  }

  .leader-availability-savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer {
    width: calc(100% - 28px);
    padding-bottom: 24px;
  }
}

@media (min-width: 1500px) {
  .site-header,
  .site-footer {
    width: min(1440px, calc(100% - 80px));
  }

  .auth-panel {
    width: min(1320px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.72fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.leader-summary-view{display:grid;gap:18px}.summary-form{display:grid;gap:16px}.summary-section{padding:18px;border:1px solid var(--line);border-radius:12px;background:#fff}.summary-section h3{margin:0 0 14px;color:var(--ink);font-size:18px}.summary-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.summary-recipient-choice,.summary-payment-choice{display:flex;flex-wrap:wrap;gap:18px;margin-bottom:14px}.summary-recipient-choice label,.summary-payment-choice label,.summary-ozon-warning{display:flex;align-items:flex-start;gap:8px}.summary-recipient-choice input,.summary-payment-choice input,.summary-ozon-warning input,.summary-orders-table input{width:18px;min-width:18px;min-height:18px;margin:2px 0 0}.summary-payment-fields input[type="number"],.summary-payment-fields select,.summary-payment-fields textarea,.summary-payment-fields input[type="file"]{width:100%;min-height:50px;padding:11px 13px;border:1px solid #a8b5ae;border-radius:11px;color:var(--ink);background:var(--white);font:inherit}.summary-payment-fields textarea{min-height:100px;resize:vertical}.summary-payment-wide{grid-column:1/-1}.summary-payment-fields [hidden]{display:none}.summary-ozon-warning{grid-column:1/-1;padding:12px;border:1px solid #e3b3af;border-radius:9px;background:#fff5f3;color:#7f2924}.summary-important{font-weight:800}.summary-orders-table{min-width:900px}.summary-orders-table th,.summary-orders-table td{padding:11px 9px}.summary-total{margin:14px 0 0;font-weight:750}.leader-summary-layout{grid-template-columns:minmax(0,1fr)}.leader-summary-layout>.auth-copy{display:none}.leader-summary-layout>.auth-card{width:100%;max-width:none}.summary-empty{padding:16px;text-align:center;color:var(--muted)}
.summary-orders-help{margin:-5px 0 10px;color:var(--muted);font-size:13px}
.summary-payment-heading{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.summary-help-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;padding:0;border:1px solid var(--ink);border-radius:50%;background:#f3f8f5;color:var(--ink);font-family:inherit;font-size:17px;font-weight:700;line-height:1;cursor:pointer}
.summary-help-button:focus-visible{outline:3px solid #cf9b44;outline-offset:3px}
.summary-orders-wrap{max-height:440px}
.summary-orders-table th{position:sticky;top:0;z-index:1;background:#f5f8f6}
.summary-heading-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}.summary-heading-actions .button{white-space:nowrap}
.summary-finalize-bar{display:flex;justify-content:flex-end}.summary-finalize-button{width:100%;min-height:48px}
.summary-coverage{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;margin-top:14px}.summary-coverage-guidance{grid-column:1/-1;margin:0;padding:10px 12px;border-radius:9px;background:#edf7f1;color:#174c38;font-weight:700}.summary-coverage-guidance.is-warning{background:#fff6f4;color:#8a2d25}.summary-coverage-card{padding:12px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.summary-coverage-card.is-selected{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand)}.summary-coverage-card.is-missing{background:#fff6f4;border-color:#e3b3af}.summary-coverage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:7px}.summary-coverage-card h4{margin:0;font-size:15px}.summary-coverage-badge{display:inline-flex;padding:3px 7px;border-radius:999px;background:#e8eeeb;color:#4c6158;font-size:11px;font-weight:800;line-height:1.25;text-align:center}.summary-coverage-card.is-selected .summary-coverage-badge{background:#dcefe4;color:#174c38}.summary-coverage-card p{margin:4px 0}.summary-coverage-missing{color:#8a2d25;font-size:13px}.summary-coverage-ok{color:#237448;font-weight:700}.summary-coverage-select{width:100%;margin-top:10px}.summary-coverage-select:disabled{cursor:not-allowed;opacity:.65}
.summary-total,.summary-coverage-quantity{color:var(--ink);font-size:15px;font-weight:750;line-height:1.35}

@media (min-width: 601px) {
  .leader-summary-view .button { white-space: nowrap; }
  .summary-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); min-width: 460px; }
  .summary-heading-actions .button,
  .summary-form .leader-availability-savebar .button { width: 100%; }
  .summary-form .leader-availability-savebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); }
}

.summary-delivery-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgb(15 23 42 / 34%);
}

.summary-delivery-dialog::backdrop {
  background: rgb(15 23 42 / 58%);
  backdrop-filter: blur(5px);
}

.summary-delivery-dialog-content {
  display: grid;
  justify-items: center;
  gap: 15px;
  padding: 32px;
  text-align: center;
}

.summary-delivery-dialog h2,
.summary-delivery-dialog p { margin: 0; }

.summary-delivery-dialog.is-success h2 { color: #14563d; }
.summary-delivery-dialog.is-error h2 { color: #8a2d25; }

.summary-delivery-recipients {
  width: 100%;
  margin: 0;
  padding: 14px 18px 14px 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
}

.summary-delivery-recipients li + li { margin-top: 8px; }
.summary-delivery-status { color: var(--muted); }
.summary-delivery-actions { justify-content: center; margin-top: 4px; }
.link-box-explanation{margin:0;color:var(--ink);font-size:14px;line-height:1.45}.link-box-warning{margin:0;color:#b42318!important;font-weight:800}.summary-warehouse-feedback{margin:0;padding:10px 12px;border-radius:10px;font-weight:800}.summary-warehouse-feedback.is-pending{color:#755916;background:#fff0d8}.summary-warehouse-feedback.is-in_work{color:#176139;background:#e3f2e8}.summary-warehouse-feedback.is-rejected{color:#8a2d25;background:#fff0ef}

@media (max-width: 560px) {
  .leader-rejected-action { grid-template-columns: 1fr; }
  .summary-delivery-dialog-content { padding: 24px 18px; }
  .summary-delivery-actions { width: 100%; }
  .summary-delivery-actions .button { width: 100%; }
}

.summary-fields>label:not(.summary-ozon-warning){display:flex;flex-direction:column;gap:7px;min-width:0}.summary-fields>label>input:not([type="checkbox"]),.summary-fields>label>select,.summary-fields>label>textarea{box-sizing:border-box;width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--ui-line,#a8b5ae);border-radius:10px;background:var(--ui-panel,#fff);color:var(--ui-ink,var(--ink));font:inherit}.summary-fields{row-gap:20px}.summary-phone-hint{font-size:13px;line-height:1.4;color:var(--muted)}.summary-field-error{font-size:14px;line-height:1.4;color:#b42318}.summary-field-error:empty{display:none}.summary-form [aria-invalid="true"]{border:2px solid #b42318!important;background:#fff3f3!important;color:#741919!important;scroll-margin:100px}@media(max-width:600px){.summary-fields{grid-template-columns:minmax(0,1fr)}}

.summary-fields[hidden]{display:none}
.leader-summary-view,.summary-form{grid-template-columns:minmax(0,1fr)}

.quantity-remainder-tooltip{position:fixed;z-index:1500;max-width:min(280px,calc(100vw - 16px));padding:9px 12px;border:1px solid #8fc6aa;border-radius:8px;color:#174c38;background:#eef9f3;box-shadow:0 5px 18px rgb(18 56 45 / 16%);font:14px/1.4 Arial,sans-serif;white-space:pre-line;pointer-events:none}
.quantity-remainder-tooltip[hidden]{display:none}
.quantity-remainder-tooltip.is-over{color:#8a2d25;border-color:#cf8b83;background:#fff1ef}
.order-correction-row>.quantity-remainder-tooltip{position:static;grid-column:1/-1;max-width:none;box-shadow:none}
.order-field-dialog.leader-filter-dialog{padding:0;max-height:calc(100dvh - 32px);overflow:hidden}
.order-field-dialog.leader-filter-dialog form{display:flex;flex-direction:column;gap:0;max-height:calc(100dvh - 32px)}
.leader-filter-dialog header,.leader-filter-dialog .button-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;margin:0;padding:14px 18px;background:var(--ui-panel,#fff)}
.leader-filter-dialog header{border-bottom:1px solid var(--ui-line,var(--line))}
.leader-filter-dialog header h2{margin:0;font-size:18px}
.leader-filter-dialog .button-row{border-top:1px solid var(--ui-line,var(--line));flex-wrap:wrap}
.leader-filter-fields{overflow:auto;padding:18px;min-height:0}
.leader-filter-fields>div{display:grid;gap:12px;margin-top:12px}
.leader-filter-close{width:38px;height:38px;padding:0!important;border-radius:6px;font-size:22px!important}
.leader-orders-heading .leader-orders-execution{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
