/* MAXIMUS Control Center — local assets, responsive and accessible. */
:root {
  color-scheme: light;
  --ink: #152926;
  --muted: #697570;
  --subtle: #8b948e;
  --canvas: #f5f5ef;
  --surface: #fff;
  --line: #e5e8de;
  --lime: #d4f26b;
  --lime-hover: #c5e759;
  --green: #276344;
  --red: #a33d38;
  --amber: #86611f;
  --radius: 15px;
  --shadow: 0 6px 25px rgb(21 41 38 / 4%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration-color: currentColor; }
button, a { touch-action: manipulation; }
svg { display: inline-block; flex-shrink: 0; vertical-align: middle; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
p { margin-bottom: 1em; }
small { font-size: 12px; }
strong { font-weight: 650; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7c9e36; outline-offset: 3px; }
::selection { color: var(--ink); background: var(--lime); }

.app-shell { display: flex; min-height: 100dvh; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #dce4dc;
  padding: 31px 19px 17px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #42514a transparent;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 37px;
  color: var(--lime);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -6px;
  line-height: 1;
  transform: skew(-8deg);
}
.brand-word { display: block; color: #fff; font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: 1.5px; }
.brand-sub { display: block; margin-top: 5px; color: #a3b0a5; font-size: 9px; font-weight: 500; letter-spacing: 2.1px; text-transform: uppercase; }
.workspace-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 34px 8px 22px;
  padding: 11px 10px;
  color: #e4e9df;
  border: 1px solid #3a4b40;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
}
.workspace-label .status-dot { background: var(--lime); }
.nav-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 24px; }
.nav-label { margin: 0 13px 9px; color: #a7b3a9; font-size: 9px; font-weight: 600; letter-spacing: 1.7px; text-transform: uppercase; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 12px;
  padding: 11px 14px;
  color: #bfcbbf;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 12px;
  font-weight: 450;
  transition: color 150ms, background 150ms;
}
.nav-item:hover { background: #263a30; color: #fff; }
.nav-item.active { color: var(--ink); background: var(--lime); font-weight: 650; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; opacity: .9; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-item .tag { margin-left: auto; padding: 1px 6px; font-size: 9px; background: #314738; color: #becdbf; }
.nav-item.active .tag { color: #244828; background: #bdd956; }
.sidebar-footer { margin-top: auto; padding: 18px 9px 0; border-top: 1px solid #33483b; }
.sidebar-footer > p { color: #a6b4a9; font-size: 10px; line-height: 1.7; }
.identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.identity-avatar, .row-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e4eddb;
  color: #3c5939;
  font-size: 11px;
  font-weight: 700;
}
.sidebar .identity-avatar { background: #344b3d; color: #d9e7cf; }
.identity-name { color: inherit; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.identity-role { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sidebar .identity-role { color: #a7b5aa; }
.sidebar .btn { margin-top: 12px; color: #d0ddcf; font-size: 11px; min-height: 33px; }
.sidebar-footer .identity > div { flex: 1; min-width: 0; }
.sidebar-footer .identity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .identity > .btn { flex: 0 0 29px; width: 29px; min-height: 32px; margin: 0; padding: 5px; }
.sidebar-footer .identity > .btn:hover { background: #30463a; }
.sidebar-scrim { display: none; }
.main-area { min-width: 0; width: calc(100% - 244px); margin-left: 244px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 75px;
  padding: 17px 38px;
  background: #fafbf7;
  border-bottom: 1px solid var(--line);
}
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 11px; }
.breadcrumb strong, .breadcrumb span:last-child { color: #38493e; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.top-security { display: flex; align-items: center; gap: 6px; color: #65795c; font-size: 10px; white-space: nowrap; }
.top-security .icon { width: 13px; height: 13px; }
.breadcrumb > .icon { width: 12px; height: 12px; color: #a1ac99; }
.environment-tag { display: inline-flex; align-items: center; gap: 7px; color: #5a6a58; font-size: 10px; white-space: nowrap; }
.status-dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #769259; }
.status-dot.offline, .status-dot.gray { background: #99a198; }
.status-dot.warning { background: #be9847; }
.mobile-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 8px; }
.page-content { max-width: 1600px; margin: 0 auto; padding: 34px 38px 48px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 8px; color: #6a7b55; font-size: 9px; font-weight: 700; letter-spacing: 1.9px; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(24px, 2.1vw, 31px); font-weight: 650; letter-spacing: -1px; line-height: 1.2; }
.page-description { max-width: 670px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  transition: background 150ms, border-color 150ms, transform 150ms;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: #21351c; }
.btn-primary:hover:not(:disabled) { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn-secondary { background: #fff; border-color: #dce2d6; }
.btn-secondary:hover:not(:disabled) { background: #f0f4e8; border-color: #c3ceb9; }
.btn-ghost { border-color: transparent; color: #5f705b; }
.btn-ghost:hover:not(:disabled) { background: #e8eddf; }
.btn-danger { background: #fff1ef; border-color: #ebc9c3; color: var(--red); }
.btn-danger:hover:not(:disabled) { background: #ffe4df; }
.btn-small { min-height: 30px; padding: 6px 10px; font-size: 10px; }
.btn-block { width: 100%; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn + .btn { margin-left: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dashboard-columns { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; }
.profile-layout { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); align-items: start; }
.stats-grid.network-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px 21px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #6b766a; font-size: 11px; }
.stat-label svg { width: 16px; height: 16px; color: #8c9b7e; }
.stat-value { margin-top: 13px; font-size: 33px; line-height: 1.15; font-weight: 600; letter-spacing: -1.3px; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 9px; color: #7b8477; font-size: 9px; }
.panel { min-width: 0; margin-bottom: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px 23px 17px; }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.panel-title svg { width: 17px; height: 17px; color: #6c805c; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.panel-body { padding: 5px 23px 23px; }
.panel-footer { padding: 13px 23px; border-top: 1px solid var(--line); background: #fcfdf9; color: #718069; font-size: 10px; }
.panel-footer .btn { padding-top: 5px; padding-bottom: 5px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: #738f4c; font-size: 10px; font-weight: 550; white-space: nowrap; }
.text-link:hover { color: #43652b; text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 13px; height: 13px; }
.tag { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; padding: 4px 8px; border-radius: 5px; font-size: 9px; line-height: 1.5; font-weight: 550; white-space: nowrap; }
.tag-green { color: #3d6231; background: #edf5de; }
.tag-amber { color: #86611f; background: #faf1db; }
.tag-red { color: #a1443d; background: #fff0ed; }
.tag-gray { color: #677268; background: #eff1eb; }
.tag-blue { color: #3f6772; background: #e9f2f5; }
.dashboard-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 202px;
  margin-bottom: 24px;
  padding: 28px 31px;
  overflow: hidden;
  border: 1px solid #dfe6d0;
  border-radius: var(--radius);
  background: #eaf0dd;
}
.hero-copy { position: relative; z-index: 2; width: 65%; }
.hero-kicker { margin-bottom: 11px; color: #61734b; font-size: 9px; font-weight: 650; letter-spacing: 1.7px; text-transform: uppercase; }
.hero-title { margin: 0 0 10px; max-width: 580px; font-size: clamp(22px, 2.1vw, 30px); font-weight: 600; letter-spacing: -.9px; line-height: 1.25; }
.hero-text { max-width: 470px; margin-bottom: 15px; color: #66785b; font-size: 11px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero-directions { color: #6d8058; font-size: 7px; font-weight: 600; letter-spacing: .65px; white-space: nowrap; }
.hero-directions span { margin: 0 4px; color: #9aab82; }
.hero-actions .btn-primary { background: var(--ink); color: #f4f8ec; border-color: var(--ink); }
.hero-actions .btn-primary:hover:not(:disabled) { background: #2f493c; border-color: #2f493c; }
.hero-art { position: absolute; z-index: 0; top: -38px; right: -5px; width: 310px; height: 320px; transform: rotate(-18deg); border-radius: 24px; background: #d3deb9; opacity: .95; }
.hero-art::before { content: ""; position: absolute; inset: 24px 39px; border: 1px solid rgb(255 255 255 / 70%); }
.hero-art::after { content: ""; position: absolute; inset: 71px 62px; border: 1px solid rgb(255 255 255 / 70%); }
.hero-art-label { position: absolute; right: 44px; bottom: 37px; color: #839364; font-size: 7px; font-weight: 600; letter-spacing: 1.7px; }
.court-line { position: absolute; top: 50%; right: 22px; left: 22px; border-top: 1px solid rgb(255 255 255 / 80%); }
.court-line::after { content: ""; position: absolute; width: 1px; height: 175px; top: -87px; left: 50%; background: rgb(255 255 255 / 70%); }
.ball { position: absolute; z-index: 1; width: 83px; height: 83px; top: 143px; left: 53px; overflow: hidden; border-radius: 50%; background: var(--lime); box-shadow: 10px 18px 20px rgb(61 83 19 / 15%); }
.ball::before, .ball::after { content: ""; position: absolute; width: 82px; height: 82px; border: 2px solid rgb(255 255 255 / 85%); border-radius: 50%; }
.ball::before { left: -47px; top: -12px; }
.ball::after { right: -51px; top: 14px; }
.table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d3dcc7 transparent; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.data-table th { padding: 11px 23px; border-top: 1px solid #edf0e6; border-bottom: 1px solid #edf0e6; background: #fafbf7; color: #7c8776; font-size: 9px; font-weight: 550; white-space: nowrap; }
.data-table td { max-width: 340px; padding: 16px 23px; border-bottom: 1px solid #eef0e8; color: #52604d; vertical-align: middle; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcf7; }
.data-table td:last-child { white-space: nowrap; }
.row-title { color: #2d402b; font-size: 11px; font-weight: 600; }
.row-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-subtle { display: block; margin-top: 3px; color: #808b7b; font-size: 9px; line-height: 1.7; }
.row-avatar { width: 32px; height: 32px; border-radius: 8px; font-size: 10px; }
.contact-person { display: flex; align-items: center; gap: 11px; min-width: 170px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 32px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; color: #7d9561; border: 1px solid #e2eacb; border-radius: 12px; background: #f3f7e9; }
.empty-icon svg { width: 21px; height: 21px; }
.empty-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.empty-text { max-width: 370px; margin-bottom: 15px; color: #7a8574; font-size: 11px; line-height: 1.8; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel > .toolbar { padding: 18px 23px; margin-bottom: 0; }
.search-form { display: flex; align-items: center; flex: 1; min-width: 0; gap: 9px; }
.search-input { width: min(100%, 330px); min-height: 38px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 11px; }
label.search-input { display: flex; align-items: center; gap: 8px; }
.search-input > .icon { width: 14px; height: 14px; color: #9ca98f; }
.search-input > input { display: block; min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: inherit; outline: 0; }
.search-input > input::placeholder { color: #98a38d; opacity: 1; }
label.search-input:focus-within { border-color: #879e62; box-shadow: 0 0 0 3px rgb(160 185 108 / 15%); }
.section-gap { margin-top: 5px; }
.checklist-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0e6; color: #6e815f; font-size: 11px; line-height: 1.7; }
.checklist-item:last-child { border-bottom: 0; }
.checklist-item .icon { width: 16px; height: 16px; margin-top: 1px; color: #739447; }
.format-help { padding: 13px 0 0; color: #78896b; font-size: 11px; }
.format-help summary { cursor: pointer; font-weight: 550; }
.format-help .field-help { overflow-wrap: anywhere; }
.direction-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.filter-select { min-height: 38px; max-width: 230px; padding: 8px 30px 8px 12px; color: #52624a; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; }
.connection-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdf9; }
.panel.connection-card { padding: 0; border-radius: var(--radius); background: #fff; }
.connection-heading { display: flex; align-items: center; gap: 12px; }
.connection-heading .connection-logo { margin-bottom: 0; }
.connection-logo { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; background: #f0f2e9; color: #688051; border: 1px solid #e2e8d8; border-radius: 8px; font-size: 12px; font-weight: 650; }
.connection-logo svg { width: 18px; height: 18px; }
.connection-name { margin-bottom: 5px; color: #2f442c; font-size: 12px; font-weight: 650; }
.connection-note { margin: 8px 0 0; color: #7c8874; font-size: 10px; line-height: 1.8; }
.connection-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; color: #87907e; font-size: 9px; }
.executor-mini-list { padding-top: 0; padding-bottom: 13px; }
.executor-mini { display: flex; align-items: center; gap: 10px; padding: 15px 0; border-bottom: 1px solid #edf0e6; }
.executor-mini:last-child { border-bottom: 0; }
.executor-mini .connection-logo { flex-shrink: 0; width: 30px; height: 30px; margin-bottom: 0; font-size: 11px; }
.executor-mini-copy { flex: 1; min-width: 0; }
.executor-mini-copy .row-title { display: block; }
.executor-mini-copy .row-subtle { font-size: 8px; }
.executor-mini > .tag { max-width: 112px; white-space: normal; text-align: center; font-size: 8px; }
.integration-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; color: #647659; border-bottom: 1px solid #edf0e6; font-size: 11px; }
.integration-row:last-child { border-bottom: 0; }
.event-list { margin: 0; padding: 0; list-style: none; }
.event-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0e6; }
.event-item:last-child { border-bottom: 0; padding-bottom: 0; }
.event-icon { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 8px; background: #f1f5e6; color: #7d915e; }
.event-icon svg { width: 14px; height: 14px; }
.event-copy { flex: 1; min-width: 0; }
.event-title { margin: 0; color: #3c5035; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.event-meta { margin-top: 4px; color: #86907e; font-size: 9px; line-height: 1.8; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { display: block; margin-bottom: 7px; color: #43583b; font-size: 11px; font-weight: 600; }
.field-help { margin-top: 6px; color: #7b8874; font-size: 10px; line-height: 1.7; }
.input, .textarea, .select { display: block; width: 100%; min-height: 41px; padding: 10px 12px; border: 1px solid #dfe5d6; border-radius: 7px; background: #fff; color: #253c24; font-size: 12px; line-height: 1.5; transition: border-color 150ms, box-shadow 150ms; }
.input::placeholder, .textarea::placeholder, .search-input::placeholder { color: #9aa390; opacity: 1; }
.input:hover, .textarea:hover, .select:hover { border-color: #b8c6a6; }
.input:focus, .textarea:focus, .select:focus, .search-input:focus, .filter-select:focus { border-color: #879e62; box-shadow: 0 0 0 3px rgb(160 185 108 / 15%); outline: 0; }
.input:disabled, .textarea:disabled, .select:disabled { color: #899580; background: #f1f4eb; cursor: not-allowed; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #cc8278; }
.textarea { min-height: 98px; resize: vertical; }
.select { padding-right: 27px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0; }
.checkbox-group { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 4px; }
.checkbox-row input { width: 15px; height: 15px; margin: 2px 0 0; flex: 0 0 15px; accent-color: #47652f; cursor: pointer; }
.checkbox-label { color: #627458; font-size: 11px; line-height: 1.75; }
.checkbox-label a { color: #35572c; text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-error { padding: 11px 13px; margin: 12px 0; background: #fff0ed; border: 1px solid #f0d0c9; border-radius: 7px; color: #9f4840; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.form-success { padding: 11px 13px; margin: 12px 0; background: #edf5e2; border: 1px solid #d8e8c2; border-radius: 7px; color: #4e7135; font-size: 11px; line-height: 1.7; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 26px; background: rgb(18 35 25 / 50%); backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 640px; max-height: calc(100dvh - 52px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e3ead8; border-radius: 17px; box-shadow: 0 25px 100px rgb(13 31 18 / 20%); }
.modal-wide { max-width: 750px; }
body.modal-open { overflow: hidden; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 25px 19px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-body { min-height: 0; padding: 23px 25px; overflow-y: auto; overscroll-behavior: contain; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 25px; background: #fafcf6; border-top: 1px solid var(--line); }
.close-button { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 6px; background: #f1f4ea; color: #6f7e60; font-size: 20px; line-height: 1; }
.close-button:hover { background: #e6eddb; }
.toast-container { position: fixed; z-index: 150; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(360px, calc(100% - 44px)); pointer-events: none; }
.toast { padding: 14px 17px; border: 1px solid #4b6645; border-radius: 9px; background: var(--ink); color: #f0f5e7; box-shadow: 0 10px 40px rgb(17 35 14 / 15%); font-size: 12px; line-height: 1.6; pointer-events: auto; }
.toast.error, .toast-error { border-color: #a76554; background: #613e36; }
.login-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; background: #fafbf7; }
.login-story { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100dvh; overflow: hidden; padding: 52px 64px; background: var(--ink); color: #f1f6e8; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 0; padding: 0; }
.login-brand .brand-word { font-size: 26px; }
.login-story-body { position: relative; padding-top: 64px; margin: auto 0; }
.login-story .eyebrow { margin-bottom: 22px; color: var(--lime); font-size: 9px; letter-spacing: 2px; }
.login-title { position: relative; z-index: 2; max-width: 510px; margin: 0 0 24px; font-size: clamp(35px, 4.2vw, 62px); font-weight: 500; line-height: 1.12; letter-spacing: -2.5px; }
.login-title em { color: var(--lime); font-style: normal; }
.login-copy { position: relative; z-index: 2; max-width: 385px; margin-bottom: 26px; color: #b6c6b5; font-size: 13px; line-height: 1.9; }
.login-directions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.login-directions span { padding: 6px 10px; border: 1px solid #415644; border-radius: 5px; color: #a9bea4; font-size: 8px; font-weight: 600; letter-spacing: 1.3px; }
.login-foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 14px; margin-top: auto; margin-bottom: 0; padding-top: 26px; color: #a2b59f; font-size: 8px; letter-spacing: .9px; }
.login-foot span { color: #7f997b; }
.court-illustration { position: relative; width: min(390px, 95%); height: 215px; margin: 32px 0 15px 14px; transform: rotate(-11deg); }
.court-outline { position: absolute; inset: 15px 4px; background: #244331; border: 1px solid #718568; box-shadow: 0 15px 50px rgb(7 22 12 / 12%); }
.court-outline::before { content: ""; position: absolute; inset: 0 31px; border-right: 1px solid #718568; border-left: 1px solid #718568; }
.court-service { position: absolute; inset: 41px 31px; border-top: 1px solid #718568; border-bottom: 1px solid #718568; }
.court-service::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid #718568; }
.court-net { position: absolute; inset: 50% -10px auto; border-top: 1px solid #9cab8a; box-shadow: 0 2px 7px #142e1b; }
.court-net::before, .court-net::after { content: ""; position: absolute; top: -3px; width: 2px; height: 6px; background: #b5c69c; }
.court-net::before { left: 0; }
.court-net::after { right: 0; }
.tennis-ball { position: absolute; z-index: 2; bottom: 9px; right: 39px; width: 69px; height: 69px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 32% 25%, #e6ff9c, #cfec68 65%, #aec541); box-shadow: 8px 14px 20px rgb(0 0 0 / 23%); }
.tennis-ball::before, .tennis-ball::after { content: ""; position: absolute; width: 62px; height: 72px; border: 2px solid #f9ffda; border-radius: 50%; }
.tennis-ball::before { top: -18px; left: -32px; }
.tennis-ball::after { bottom: -17px; right: -31px; }
.login-story .hero-art { right: -158px; top: auto; bottom: -75px; width: 430px; height: 475px; background: #294634; opacity: .5; }
.login-story .ball { width: 102px; height: 102px; top: 255px; left: 38px; }
.login-side { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 65px 48px 90px; }
.login-card { width: 100%; max-width: 368px; }
.login-card > .tag { margin-bottom: 24px; font-size: 9px; }
.login-card > .tag .icon { width: 12px; height: 12px; }
.login-card h1, .login-card h2 { margin-bottom: 9px; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.9px; }
.login-card > p { color: #7a8872; font-size: 12px; line-height: 1.8; }
.login-card form { margin-top: 28px; }
.login-card .field { margin: 0; }
.login-card .input { min-height: 46px; }
.login-card .form-actions { border-top: 0; padding-top: 0; margin-top: 24px; }
.login-card .btn-block { min-height: 46px; justify-content: space-between; padding-left: 19px; padding-right: 16px; }
.login-card form > .btn-primary { width: 100%; min-height: 45px; margin-top: 9px; }
.login-card .inline-note { margin-top: 23px; }
.login-card .permission-note { margin-top: 24px; padding: 14px; font-size: 10px; }
.login-bottom { position: absolute; right: 25px; bottom: 24px; left: 25px; margin: 0; color: #a0a996; text-align: center; font-size: 9px; }
.public-page { min-height: 100dvh; padding: 29px 20px 60px; background: radial-gradient(ellipse at 50% 0, #e8efda, transparent 65%), var(--canvas); }
.public-brand { display: flex; align-items: center; justify-content: center; gap: 10px; width: max-content; margin: 0 auto 28px; }
.public-brand .brand-word { color: var(--ink); font-size: 23px; }
.public-brand .brand-sub { color: #708063; }
.public-brand .brand-mark { color: #65813d; }
.public-card { max-width: 480px; margin: 0 auto; padding: 31px; border: 1px solid #e0e7d5; border-radius: 19px; background: #fff; box-shadow: 0 15px 50px rgb(69 91 38 / 5%); }
.public-heading { margin-bottom: 20px; font-size: 26px; font-weight: 600; letter-spacing: -.9px; line-height: 1.25; }
.public-card > .tag + .public-heading { margin-top: 18px; }
.public-heading + p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.public-source { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; padding: 12px 14px; background: #f2f6e8; border: 1px solid #e3ebd4; border-radius: 8px; color: #5d7547; font-size: 11px; line-height: 1.65; }
.public-card .field { margin-bottom: 18px; }
.public-card form > .btn-primary { width: 100%; margin-top: 15px; min-height: 44px; }
.public-footer { margin: 24px auto 0; color: #849476; text-align: center; font-size: 9px; }
.steps { display: flex; gap: 8px; margin: 26px 0 20px; }
.step { flex: 1; min-width: 0; padding: 0 0 9px; border-bottom: 3px solid #e8eedd; color: #94a285; font-size: 9px; line-height: 1.6; }
.step.active { color: #527235; border-bottom-color: #a1c451; font-weight: 600; }
.consent-section { padding-top: 13px; }
.consent-section .checkbox-row { margin: 15px 0; }
.legal-details { margin: 19px 0; padding: 13px 0; border-top: 1px solid #e5ebdb; border-bottom: 1px solid #e5ebdb; font-size: 10px; line-height: 1.85; }
.legal-details summary { color: #587342; cursor: pointer; font-weight: 550; }
.legal-details p { margin: 11px 0 0; color: #7f8f70; }
.login-prompt { margin: 24px 0 14px; color: #7c8d6d; text-align: center; font-size: 11px; }
.login-prompt a { color: #3d642b; font-weight: 550; text-decoration: underline; text-underline-offset: 3px; }
.public-card .inline-note:has(.registration-id) { display: block; }
.registration-id { display: block; margin-top: 9px; padding: 8px; border: 1px solid #e0e9d2; border-radius: 5px; background: #fff; color: #6b8256; font-size: 10px; }
.qr-preview { display: flex; align-items: center; justify-content: center; width: 176px; height: 176px; margin: 0 auto; padding: 11px; background: #fff; border: 1px solid #e4e9db; border-radius: 12px; }
.qr-preview img, .qr-preview svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.qr-card { padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: #fdfef9; text-align: center; }
.qr-card .panel-title { justify-content: center; margin-top: 16px; }
.qr-card .tag { margin-bottom: 15px; }
.qr-card .btn { margin-top: 13px; }
.qr-card .mono { display: block; margin-top: 13px; font-size: 9px; }
.qr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.panel.qr-card { padding: 0; text-align: left; }
.panel.qr-card .panel-header { align-items: flex-start; }
.panel.qr-card .panel-title { justify-content: flex-start; margin-top: 0; overflow-wrap: anywhere; }
.panel.qr-card .tag { margin-bottom: 0; }
.panel.qr-card .btn { margin-top: 0; }
.panel.qr-card .form-actions { flex-wrap: wrap; justify-content: center; margin-top: 17px; padding-top: 14px; }
.panel.qr-card .form-actions .btn { flex: 1 1 100%; }
.panel.qr-card .panel-footer { text-align: center; }
.qr-preview:has(.empty-state) { width: 100%; height: auto; padding: 0; background: transparent; border: 0; }
.qr-preview .empty-state { min-height: 200px; padding: 16px 5px; }
.qr-warning { max-width: 300px; margin: 12px auto 0; color: #8d7b46; text-align: center; }
.qr-link { margin-top: 13px; padding: 10px; border: 1px solid #e8edde; border-radius: 6px; background: #f6f9f0; color: #71855f; overflow-wrap: anywhere; word-break: break-word; }
.order-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding-bottom: 7px; }
.order-summary .connection-note { margin: 0; }
.order-conditions { margin-top: 24px; padding-top: 17px; border-top: 1px solid #e1e9d5; }
.order-conditions > summary { color: #627c4b; font-size: 12px; font-weight: 550; cursor: pointer; }
.order-conditions > form { margin-top: 19px; }
#order-status, #accept-order-terms { margin-top: 24px; }
.inline-note, .warning-note { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; padding: 12px 14px; border: 1px solid #e3e9d8; border-radius: 8px; background: #f7f9f1; color: #758468; font-size: 10px; line-height: 1.8; }
.inline-note svg, .warning-note svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; }
.inline-note p, .warning-note p { margin: 0; }
.inline-note.compact { margin-top: 14px; margin-bottom: 0; padding: 9px 11px; font-size: 9px; }
.warning-note { border-color: #ede2c5; background: #fffbf0; color: #8b713b; }
.disabled-module { position: relative; padding: 20px; border: 1px dashed #d5deca; border-radius: 10px; background: #f9fbf4; }
.disabled-module h3 { margin-bottom: 7px; color: #617653; font-size: 12px; font-weight: 600; }
.disabled-module p { margin-bottom: 0; color: #7e8c70; font-size: 11px; line-height: 1.8; }
.disabled-module .tag { margin-bottom: 11px; }
.panel.disabled-module { padding: 0; }
.panel.disabled-module .panel-header .tag { margin-bottom: 0; }
.reward-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.reward-item { min-width: 0; padding: 16px 12px; background: #f3f6ec; border: 1px solid #e5ebda; border-radius: 9px; }
.reward-item .stat-label { display: block; min-height: 32px; color: #76876a; font-size: 10px; line-height: 1.6; }
.reward-value { display: block; margin: 10px 0 11px; color: #8c9b7f; font-size: 24px; line-height: 1; font-weight: 450; }
.reward-item .field-help { display: block; margin: 0; font-size: 9px; }
.source-compact-list .integration-row > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.source-compact-list .icon { width: 16px; height: 16px; color: #819b60; }
.progress-track { width: 100%; height: 5px; overflow: hidden; border-radius: 6px; background: #e8eddf; }
.progress-bar { height: 100%; min-width: 0; max-width: 100%; border-radius: inherit; background: #a2c155; transition: width 200ms; }
.profile-completion { padding: 16px 20px; margin-bottom: 23px; border: 1px solid #dfe8cd; border-radius: 10px; background: #f0f5e4; }
.profile-completion p { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 10px; color: #60764a; font-size: 11px; }
.profile-completion .field-help { margin: 9px 0 0; }
.profile-layout .profile-completion { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0 21px; padding: 25px 13px; text-align: center; }
.profile-layout .profile-completion .identity-avatar { width: 48px; height: 48px; background: #dce9bd; color: #55773a; font-size: 19px; font-weight: 500; }
.profile-layout .profile-completion .panel-title { margin: 0; }
.profile-layout .profile-completion .connection-note { display: block; margin: 0; overflow-wrap: anywhere; }
.profile-progress-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: #7c8d6d; font-size: 10px; }
.profile-progress-label strong { color: #607b46; }
.profile-progress { display: block; width: 100%; height: 6px; appearance: none; overflow: hidden; border: 0; border-radius: 6px; background: #e8eddf; accent-color: #a2c155; }
.profile-progress::-webkit-progress-bar { background: #e8eddf; border-radius: 6px; }
.profile-progress::-webkit-progress-value { background: #a2c155; border-radius: 6px; }
.profile-progress::-moz-progress-bar { background: #a2c155; border-radius: 6px; }
.profile-layout .detail-label, .profile-layout .detail-value { display: block; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.detail-row { padding: 13px 0; border-bottom: 1px solid #edf0e7; }
.detail-label { margin-bottom: 5px; color: #89927f; font-size: 10px; }
.detail-value { margin: 0; color: #425838; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 22px; max-width: 100%; margin-bottom: 22px; border-bottom: 1px solid #dfe6d4; overflow-x: auto; }
.tab { min-height: 44px; padding: 12px 0 11px; border: 0; border-bottom: 2px solid transparent; background: none; color: #829074; font-size: 11px; font-weight: 500; white-space: nowrap; }
.tab.active { border-bottom-color: #769846; color: #3e5b2b; }
.tab:hover { color: #3e5b2b; }
.loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 200px; color: #869577; font-size: 12px; }
.loading::before { content: ""; width: 18px; height: 18px; border: 2px solid #e0e7d4; border-top-color: #769846; border-radius: 50%; animation: spin 700ms linear infinite; }
.loading-dot { display: none; }
.skeleton { min-height: 20px; border-radius: 6px; background: linear-gradient(100deg, #edf1e6 20%, #f5f7f0 40%, #edf1e6 60%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.permission-note { display: flex; align-items: flex-start; gap: 10px; padding: 20px; color: #758768; border: 1px solid #e3e9d7; border-radius: 10px; background: #f9fbf4; font-size: 12px; line-height: 1.85; }
.permission-note > .icon { width: 16px; height: 16px; margin-top: 1px; color: #78975a; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; overflow-wrap: anywhere; }
.result-json { max-width: 100%; padding: 14px; border: 1px solid #e1e9d5; border-radius: 8px; background: #f5f8ee; color: #61734f; overflow: auto; font: 10px/1.8 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 23px; border-top: 1px solid #e7eddd; color: #8a957d; font-size: 10px; }
.pagination .btn { min-width: 32px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }

@media (min-width: 1500px) {
  .page-content { padding: 40px 46px 60px; }
  .topbar { padding-right: 46px; padding-left: 46px; }
  .dashboard-hero { min-height: 220px; }
  .hero-art { width: 365px; right: 20px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 220px; padding-right: 14px; padding-left: 14px; }
  .main-area { width: calc(100% - 220px); margin-left: 220px; }
  .topbar { padding-right: 26px; padding-left: 26px; }
  .page-content { padding: 28px 26px 40px; }
  .stats-grid { gap: 11px; }
  .stat-card { padding: 17px 15px; }
  .stat-value { font-size: 29px; }
  .stat-label { font-size: 10px; }
  .grid-3, .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { width: 72%; }
  .hero-art { right: -90px; }
  .data-table th, .data-table td { padding-left: 18px; padding-right: 18px; }
  .login-story { padding: 45px; }
}
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .profile-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .reward-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { max-width: 47%; flex-wrap: wrap; justify-content: flex-end; }
  .hero-copy { width: 77%; }
  .hero-art { opacity: .6; right: -126px; }
  .top-actions { gap: 11px; }
  .topbar .identity-name, .topbar .identity-role { display: none; }
  .login-title { font-size: 40px; letter-spacing: -1.5px; }
  .login-story { padding: 38px; }
  .login-side { padding: 34px; }
}
@media (max-width: 760px) {
  .sidebar { width: 250px; transform: translateX(-100%); transition: transform 180ms ease; box-shadow: 20px 0 60px rgb(13 32 17 / 15%); }
  .sidebar.open, .app-shell.sidebar-open .sidebar, body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  .sidebar-scrim { display: block; position: fixed; z-index: 35; inset: 0; pointer-events: none; opacity: 0; background: rgb(17 35 25 / 45%); backdrop-filter: blur(2px); transition: opacity 180ms; }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main-area { width: 100%; margin-left: 0; }
  .topbar { position: sticky; z-index: 30; top: 0; min-height: 65px; padding: 12px 21px; background: rgb(250 251 247 / 95%); backdrop-filter: blur(10px); }
  .topbar > .breadcrumb { margin-right: auto; }
  .mobile-toggle { display: inline-flex; flex-shrink: 0; }
  .breadcrumb { font-size: 10px; gap: 7px; }
  .topbar .environment-tag { font-size: 9px; }
  .page-content { padding: 25px 21px 35px; }
  .page-title { font-size: 27px; }
  .page-heading { gap: 14px; }
  .heading-actions { max-width: 43%; }
  .dashboard-hero { min-height: 203px; padding: 25px; }
  .hero-copy { width: 72%; }
  .hero-art { right: -40px; opacity: .8; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: 275px; padding: 29px 31px; }
  .login-story-body { margin: 0; padding-top: 0; }
  .login-brand { margin-bottom: 28px; }
  .login-brand .brand-word { font-size: 21px; }
  .login-title { max-width: 380px; margin: 0 0 11px; font-size: 33px; letter-spacing: -1.2px; }
  .login-copy { max-width: 390px; margin-bottom: 0; font-size: 11px; }
  .login-story .eyebrow { font-size: 8px; margin-bottom: 14px; }
  .login-directions { margin-top: 18px; }
  .login-directions span { font-size: 7px; padding: 5px 8px; }
  .court-illustration { position: absolute; width: 245px; height: 180px; right: -146px; bottom: -68px; margin: 0; opacity: .4; }
  .tennis-ball { width: 55px; height: 55px; right: 13px; }
  .login-foot { display: none; }
  .login-story .hero-art { right: -115px; bottom: -242px; width: 340px; height: 440px; opacity: .35; }
  .login-side { padding: 36px 26px 62px; }
  .login-card { max-width: 390px; }
  .login-card h1, .login-card h2 { font-size: 26px; }
}
@media (max-width: 480px) {
  :root { font-size: 13px; }
  .topbar { gap: 10px; min-height: 62px; padding-right: 16px; padding-left: 16px; }
  .topbar .identity-avatar { width: 29px; height: 29px; font-size: 9px; }
  .top-actions { gap: 8px; }
  .topbar .environment-tag { max-width: 75px; font-size: 8px; line-height: 1.5; white-space: normal; }
  .breadcrumb { gap: 6px; font-size: 9px; }
  .breadcrumb > span:first-of-type, .breadcrumb > .icon { display: none; }
  .top-security { font-size: 9px; gap: 4px; }
  .top-security .icon { width: 12px; height: 12px; }
  .topbar:has(.environment-tag) .top-security { font-size: 0; gap: 0; }
  .page-content { padding: 23px 16px 33px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 19px; }
  .page-title { font-size: 25px; letter-spacing: -.8px; }
  .page-description { font-size: 11px; }
  .heading-actions { max-width: none; justify-content: flex-start; }
  .heading-actions .btn { flex: 1; }
  .eyebrow { font-size: 8px; }
  .stats-grid { gap: 10px; margin-bottom: 17px; }
  .stat-card { padding: 16px 14px; border-radius: 11px; }
  .stat-label { align-items: flex-start; font-size: 9px; }
  .stat-label svg { width: 13px; height: 13px; }
  .stat-value { margin-top: 12px; font-size: 29px; }
  .stat-foot { font-size: 8px; line-height: 1.7; }
  .dashboard-hero { min-height: 221px; margin-bottom: 18px; padding: 23px 21px; border-radius: 12px; }
  .hero-copy { width: 100%; }
  .hero-title { max-width: 245px; font-size: 25px; letter-spacing: -.8px; }
  .hero-text { max-width: 235px; font-size: 10px; }
  .hero-art { width: 245px; right: -175px; top: -9px; opacity: .47; }
  .hero-kicker { font-size: 8px; }
  .hero-actions { gap: 6px; }
  .hero-actions .btn { padding: 8px 10px; min-height: 36px; font-size: 10px; }
  .hero-directions { width: 100%; padding-top: 4px; font-size: 7px; }
  .panel { margin-bottom: 17px; border-radius: 12px; }
  .panel-header { padding: 18px 16px 15px; gap: 10px; }
  .panel-title { font-size: 13px; }
  .panel-subtitle { font-size: 9px; }
  .panel-body { padding: 3px 16px 17px; }
  .panel-footer { padding: 12px 16px; font-size: 9px; }
  .grid-3, .qr-grid { grid-template-columns: 1fr; gap: 12px; }
  .stats-grid.network-stats { grid-template-columns: 1fr; }
  .network-stats .stat-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 15px; }
  .network-stats .stat-label { grid-column: 1; align-items: center; justify-content: flex-start; gap: 9px; font-size: 11px; }
  .network-stats .stat-value { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; }
  .network-stats .stat-foot { grid-column: 1; font-size: 9px; margin-top: 5px; }
  .reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .reward-item { padding: 14px 11px; }
  .reward-item:last-child { grid-column: 1 / -1; }
  .reward-item:last-child .stat-label { min-height: 0; }
  .data-table th, .data-table td { padding-left: 16px; padding-right: 16px; }
  .empty-state { min-height: 205px; padding: 29px 15px; }
  .empty-text { font-size: 10px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .panel > .toolbar { padding: 15px 16px; }
  .toolbar > .tag { align-self: flex-start; }
  .search-form { width: 100%; }
  .search-form > .btn { min-height: 40px; }
  .search-input, .filter-select { width: 100%; max-width: none; min-height: 40px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .detail-grid { gap: 0; }
  .input, .textarea, .select, .search-input, .filter-select { font-size: 16px; }
  .input, .select { min-height: 44px; padding: 9px 11px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { min-height: 40px; flex: 1; }
  .modal-backdrop { align-items: flex-end; padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); border-radius: 15px; }
  .modal-header { padding: 20px 18px 16px; }
  .modal-header h2 { font-size: 19px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px; }
  .modal-footer .btn { min-height: 40px; flex: 1; }
  .public-page { padding: 24px 14px 35px; }
  .public-card { padding: 25px 21px; border-radius: 15px; }
  .public-heading { font-size: 25px; }
  .step { font-size: 8px; }
  .legal-details { font-size: 10px; }
  .public-brand { margin-bottom: 22px; }
  .tabs { gap: 19px; }
  .tab { font-size: 10px; }
  .connection-note { font-size: 10px; }
  .pagination { padding: 13px 16px; }
  .toast-container { right: 16px; bottom: 16px; width: calc(100% - 32px); }
}
@media (max-width: 480px) {
  #worker-sessions .data-table, #worker-sessions tbody, #worker-sessions tr { display: block; width: 100%; }
  #worker-sessions thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #worker-sessions tr { padding: 10px 0; border-bottom: 1px solid #eef0e8; }
  #worker-sessions tr:last-child { border-bottom: 0; }
  #worker-sessions td, #worker-sessions td:last-child { display: block; max-width: none; padding: 7px 16px; border-bottom: 0; white-space: normal; }
  #worker-sessions td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #7c8776; font-size: 10px; }
  .email-review-table, .email-review-table tbody, .email-review-table tr { display: block; width: 100%; }
  .email-review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .email-review-table tr { padding: 12px 0; border-bottom: 1px solid #eef0e8; }
  .email-review-table tr:last-child { border-bottom: 0; }
  .email-review-table td, .email-review-table td:last-child { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 12px; max-width: none; padding: 7px 16px; border-bottom: 0; white-space: normal; }
  .email-review-table td::before { content: attr(data-label); color: #7c8776; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .heading-actions, .toast-container, .modal-backdrop { display: none !important; }
  .main-area { width: 100%; margin: 0; }
  .page-content { max-width: none; padding: 0; }
  .panel, .stat-card { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  .dashboard-hero { display: none; }
}

/* Stage 2: one calm, legible operating system for the store and its members. */
:root {
  --ink:#182742; --muted:#52627b; --subtle:#607087; --canvas:#f3f6fb;
  --surface:#fff; --line:#dce3ed; --lime:#2457d6; --lime-hover:#1946b6;
  --green:#17613f; --red:#a12b3b; --amber:#80561a;
  --radius:12px; --shadow:none;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:15px; line-height:1.55;
}
:focus-visible { outline:3px solid #366ee8; outline-offset:3px; }
::selection { color:#182742; background:#dbe7ff; }
.skip-link { position:fixed; left:12px; top:-100px; z-index:200; padding:12px 18px; background:#fff; border:2px solid #2457d6; border-radius:6px; }
.skip-link:focus { top:12px; }
.sidebar { width:232px; padding:28px 14px 18px; background:#fff; color:var(--ink); border-right:1px solid var(--line); scrollbar-color:#bdc8d9 transparent; }
.brand { gap:10px; padding:0 10px; }
.brand-mark { color:#fff; background:#2457d6; border-radius:9px; font-size:21px; }
.brand-word { font-size:21px; letter-spacing:.4px; color:inherit; }
.brand-sub { color:var(--muted); font-size:11px; letter-spacing:0; text-transform:none; margin-top:1px; }
.workspace-label { margin:22px 10px 20px; padding:0; font-size:12px; color:var(--muted); border:0; background:none; }
.nav-group { margin-bottom:22px; }
.nav-label { padding-left:12px; color:#61718b; font-size:11px; font-weight:600; letter-spacing:0; text-transform:none; }
.nav-item { min-height:43px; padding:10px 12px; gap:10px; color:#4f5d75; border-radius:7px; font-size:13px; line-height:1.35; }
.nav-item:hover { color:#203d72; background:#f3f6fc; }
.nav-item.active { color:#1849bd; background:#eaf0ff; box-shadow:none; font-weight:650; }
.nav-item.active::before { display:none; }
.nav-item .icon { width:19px; height:19px; color:inherit; }
.sidebar-footer { border-color:var(--line); margin-top:auto; }
.identity { gap:8px; }
.identity-avatar { background:#edf2fc; color:#284d90; border-color:#dce5f5; }
.identity-name { color:var(--ink); font-size:12px; }
.identity-role { color:var(--muted); font-size:11px; }
.sidebar-footer .btn { color:#52627b; padding:6px; min-height:40px; min-width:40px; }
.main-area { margin-left:232px; width:calc(100% - 232px); min-width:0; }
.topbar { min-height:70px; padding:14px 32px; background:#fff; border-color:var(--line); }
.breadcrumb { color:#63728b; font-size:13px; }
.breadcrumb strong { color:var(--ink); font-weight:600; }
.top-security { color:#52627b; font-size:12px; }
.environment-tag { color:#715117; background:#fff6df; border:1px solid #e9d5a3; font-size:11px; }
.page-content { padding:28px 32px 48px; max-width:1660px; }
.sync-region { padding:12px 32px 0; max-width:1660px; margin:auto; }
.page-heading { margin-bottom:24px; gap:18px; }
.page-title { font-size:clamp(28px,2.5vw,34px); letter-spacing:-.8px; font-weight:700; line-height:1.15; }
.page-description { color:var(--muted); font-size:14px; line-height:1.65; max-width:70ch; margin-top:10px; }
.eyebrow { color:#536888; font-size:11px; font-weight:550; letter-spacing:0; text-transform:none; margin-bottom:7px; }
.btn { font-size:13px; font-weight:600; line-height:1.4; min-height:40px; border-radius:7px; padding:10px 14px; }
.btn-primary { color:#fff; background:#2457d6; border-color:#2457d6; box-shadow:none; }
.btn-primary:hover { color:#fff; background:#1946b6; border-color:#1946b6; }
.btn-secondary { color:#284370; background:#fff; border-color:#ccd6e6; }
.btn-secondary:hover { color:#163a83; background:#f2f6ff; border-color:#9fb6e1; }
.btn-ghost { color:#445f8b; }
.btn-ghost:hover { color:#1b4bb8; background:#eef3fd; }
.btn-small { font-size:12px; min-height:34px; padding:7px 10px; }
.btn:disabled { opacity:.65; color:#647087; background:#edf0f5; border-color:#d9e0ea; }
.panel { border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:none; }
.panel-header { padding:20px 22px 17px; border-color:var(--line); }
.panel-title { color:var(--ink); font-size:17px; font-weight:650; letter-spacing:-.2px; }
.panel-subtitle { color:var(--muted); font-size:12px; line-height:1.6; }
.panel-body { padding:20px 22px; }
.panel-footer { padding:14px 22px; color:var(--muted); background:#fafbfe; border-color:var(--line); font-size:12px; display:flex; flex-wrap:wrap; gap:12px; }
.data-table { font-size:13px; line-height:1.55; }
.data-table th { color:#566780; background:#f7f9fd; font-size:11px; letter-spacing:0; text-transform:none; font-weight:600; padding:12px 18px; border-color:var(--line); }
.data-table td { padding:14px 18px; color:#30415d; font-size:13px; border-color:#e8edf5; }
.data-table tr:hover td { background:#fafcff; }
.row-title { color:#213653; font-size:13px; font-weight:600; }
.row-subtle,.cell-secondary { color:#61718b; font-size:11px; line-height:1.65; margin-top:3px; }
.tag { font-size:11px; line-height:1.5; padding:4px 8px; font-weight:550; letter-spacing:0; }
.tag-green { color:#185f41; background:#eaf6ee; border-color:#cce8d7; }
.tag-gray { color:#52627b; background:#f0f3f8; border-color:#e0e6ef; }
.tag-amber { color:#80561a; background:#fff4dc; border-color:#eddaad; }
.tag-red { color:#a12b3b; background:#fff0f1; border-color:#f0cbd1; }
.stats-grid { gap:14px; margin-bottom:22px; }
.stat-card { padding:18px 20px; border-radius:10px; box-shadow:none; background:#fff; border-color:var(--line); }
.stat-label { color:#53647d; font-size:12px; font-weight:550; }
.stat-value { font-size:30px; font-weight:700; line-height:1.15; color:#182742; margin:10px 0; font-variant-numeric:tabular-nums; }
.stat-foot { font-size:11px; line-height:1.65; color:var(--muted); }
.owner-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:24px; }
.owner-workspace .grid-2 { align-items:start; }
.owner-workspace .panel { min-width:0; }
.owner-workspace .panel-body { padding-top:14px; }
.owner-workspace .stat-card { border-top:3px solid #c7d7f7; }
.owner-workspace .page-description { max-width:70ch; }
.owner-workspace .section-gap { margin-top:20px; }
.table-status { padding:10px 18px; color:var(--muted); font-size:12px; }
.collection-scope { margin:0; padding:10px 18px; color:var(--muted); font-size:12px; border-bottom:1px solid var(--line); }
.filter-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 18px; }
.toolbar { gap:10px; }
.search-input,.filter-select { border-color:#ccd6e6; color:var(--ink); background:#fff; font-size:13px; min-height:40px; }
.search-input::placeholder,.input::placeholder,.textarea::placeholder { color:#718099; }
.search-icon { color:#607087; }
.pagination { color:var(--muted); font-size:12px; padding:16px 18px; }
.field-label { color:#334968; font-size:13px; margin-bottom:7px; font-weight:600; }
.field-help,.connection-note { color:var(--muted); font-size:12px; line-height:1.7; }
.input,.textarea,.select { border-color:#cbd5e3; color:var(--ink); font-size:15px; border-radius:7px; min-height:45px; }
.input:hover,.textarea:hover,.select:hover { border-color:#93a9cb; }
.input:focus,.textarea:focus,.select:focus,.search-input:focus,.filter-select:focus { border-color:#416fce; box-shadow:0 0 0 3px #2457d61a; }
.checkbox-row { gap:12px; margin:15px 0; }
.checkbox-row input { width:19px; height:19px; flex-basis:19px; accent-color:#2457d6; }
.checkbox-label { color:#425674; font-size:13px; line-height:1.7; }
.form-error,.form-success { font-size:13px; }
.inline-note,.warning-note,.permission-note { font-size:13px; line-height:1.7; }
.inline-note { background:#f0f5ff; border-color:#dce6f7; color:#395374; }
.warning-note { background:#fff7e6; border-color:#ebd8a6; color:#78551e; }
.permission-note { color:#53647d; }
.empty-state { min-height:210px; padding:32px 22px; }
.empty-icon { color:#4568a0; background:#eef3fc; }
.empty-title { color:var(--ink); font-size:19px; }
.empty-text { color:var(--muted); font-size:14px; line-height:1.7; max-width:55ch; }
.event-icon { color:#4369aa; background:#eef3fc; }
.event-title { color:#314765; font-size:13px; }
.event-meta { color:var(--muted); font-size:11px; }
.detail-label { color:var(--muted); font-size:12px; }
.detail-value { color:#263c5c; font-size:14px; }
.integration-row { font-size:13px; }
.modal { border-color:var(--line); border-radius:12px; box-shadow:0 18px 70px #11243b30; }
.modal-header { padding:22px; border-color:var(--line); }
.modal-body { padding:22px; }
.modal-header h2 { font-size:22px; }
.close-button { width:40px; height:40px; color:#4c6283; background:#f0f3f8; }
.modal-backdrop { background:#13244266; }
.toast { font-size:14px; background:#213a63; color:#fff; border-color:#385480; }
.toast-error { background:#7e2735; }
.tab { font-size:13px; color:#52627b; }
.tab.active { color:#2457d6; border-color:#2457d6; }
.profile-progress { accent-color:#2457d6; }
.profile-progress-label { color:#53647d; font-size:12px; }
.public-page { background:#f3f6fb; padding-top:38px; }
.public-card { border-color:var(--line); border-radius:14px; max-width:570px; padding:30px; box-shadow:none; }
.public-heading { font-size:32px; line-height:1.15; letter-spacing:-.8px; }
.public-source { font-size:13px; color:#3d5c91; background:#edf3ff; }
.public-footer,.login-prompt { font-size:12px; color:var(--muted); }
.login-prompt a { color:#2457d6; text-decoration:underline; text-underline-offset:3px; }
.legal-details { font-size:13px; color:#425674; }
.legal-details summary { min-height:40px; padding-top:8px; cursor:pointer; }
.step { font-size:12px; color:#61718b; }
.step.active { color:#1949b9; background:#edf3ff; border-color:#b5c9f0; }
.login-page { background:#fff; grid-template-columns:minmax(0,1fr) minmax(440px,1fr); }
.login-story { background:#edf3ff; color:var(--ink); padding:50px 62px; }
.login-brand { color:var(--ink); }
.login-title { font-size:clamp(34px,4vw,58px); font-weight:700; letter-spacing:-1.8px; line-height:1.1; color:var(--ink); }
.login-copy { color:#516888; font-size:17px; line-height:1.7; max-width:43ch; }
.login-directions span { color:#496188; border-color:#becde5; background:transparent; font-size:12px; letter-spacing:0; }
.login-features { display:grid; gap:14px; margin-top:45px; color:#385681; font-size:15px; }
.login-features p { display:flex; align-items:center; gap:12px; margin:0; }
.login-foot { color:#5e7394; font-size:12px; letter-spacing:0; }
.login-side { flex-direction:column; align-items:center; gap:30px; padding:60px 48px; background:#fff; }
.login-card { max-width:440px; width:100%; }
.login-card h2 { font-size:30px; margin:24px 0 10px; }
.login-card .page-description { font-size:15px; }
.login-pwa { width:100%; max-width:500px; }
.access-help { margin-top:20px; font-size:13px; color:#4b6386; }
.access-help summary { cursor:pointer; padding:8px 0; }
.access-help p { line-height:1.7; margin-top:10px; }
.personal-qr-layout { display:grid; grid-template-columns:minmax(300px,520px) minmax(250px,1fr); align-items:start; gap:26px; }
.personal-qr-panel .panel-header { align-items:flex-start; }
.personal-qr-panel .panel-title { font-size:18px; }
.personal-qr-image { display:flex; align-items:center; justify-content:center; min-height:290px; padding:16px; margin-bottom:18px; background:#fff; }
.personal-qr-image img { width:256px; height:256px; object-fit:contain; }
.qr-test-label { text-align:center; font-weight:650; color:#80561a; font-size:13px; }
.qr-url-input { font-size:13px; background:#f7f9fd; }
.qr-primary-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.qr-primary-actions .btn { flex:1; }
.qr-downloads { margin-top:24px; }
.qr-downloads .form-actions { margin-top:0; padding-top:7px; border:0; justify-content:flex-start; }
.invitation-steps { padding-left:22px; margin:20px 0; color:#4a607e; font-size:14px; line-height:1.7; }
.invitation-steps li { margin-bottom:18px; padding-left:5px; }
.customer-bottom-nav { display:none; }
.network-stats .stat-card { border-left:3px solid #b9cff9; }
.reward-item { background:#f5f7fb; border-color:#e3e8f0; }
.reward-value { color:#647087; }
.disabled-module .panel-subtitle { color:#63728a; }
@media (max-width:1100px) {
  .owner-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .personal-qr-layout { grid-template-columns:1fr; max-width:720px; }
  .login-story { padding:40px; }
  .login-side { padding:42px 30px; }
}
@media (max-width:900px) {
  .sidebar { width:232px; }
  .main-area { width:100%; margin-left:0; }
  .mobile-toggle { display:inline-flex; min-width:44px; min-height:44px; }
  .topbar { padding:12px 22px; }
  .page-content { padding:24px 22px 40px; }
  .sync-region { padding:12px 22px 0; }
  .customer-bottom-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:fixed; bottom:0; left:0; right:0; z-index:35; padding:5px 8px max(7px,env(safe-area-inset-bottom)); background:#fffffff5; border-top:1px solid var(--line); }
  .customer-bottom-nav .nav-item { display:flex; flex-direction:column; justify-content:center; gap:4px; font-size:11px; padding:7px 2px; min-height:56px; }
  .customer-bottom-nav .nav-icon { width:auto; }
  .customer-shell .page-content { padding-bottom:100px; }
  .customer-shell ~ .toast-container { bottom:90px; }
  .login-page { grid-template-columns:1fr; }
  .login-story { min-height:auto; padding:28px 32px; }
  .login-story-body { padding-top:14px; margin:0; }
  .login-title { font-size:36px; max-width:none; margin-bottom:14px; }
  .login-copy { font-size:15px; max-width:64ch; }
  .login-brand { margin-bottom:18px; }
  .login-directions { margin-top:20px; }
  .login-features { display:none; }
}
@media (max-width:600px) {
  :root { font-size:15px; }
  .topbar { padding:9px 16px; min-height:64px; gap:8px; }
  .breadcrumb { font-size:13px; gap:7px; }
  .topbar .environment-tag { max-width:115px; font-size:10px; line-height:1.35; }
  .topbar:has(.environment-tag) .top-security { display:none; }
  .page-content { padding:24px 16px 40px; }
  .sync-region { padding:10px 16px 0; }
  .page-heading { flex-direction:column; align-items:stretch; gap:16px; margin-bottom:20px; }
  .page-title { font-size:28px; }
  .page-description { font-size:14px; line-height:1.65; }
  .eyebrow { font-size:11px; }
  .btn,.btn-small { min-height:44px; font-size:13px; }
  .heading-actions { max-width:none; justify-content:flex-start; }
  .panel { border-radius:10px; margin-bottom:18px; }
  .panel-header { padding:18px 16px; }
  .panel-body { padding:18px 16px; }
  .panel-footer { padding:14px 16px; }
  .panel-title { font-size:17px; }
  .panel-subtitle { font-size:12px; }
  .owner-metrics { gap:10px; }
  .stat-card { padding:16px; }
  .stat-value { font-size:28px; }
  .stat-label,.stat-foot { font-size:12px; }
  .network-stats .stat-label,.network-stats .stat-foot { font-size:12px; }
  .data-table td { font-size:13px; padding:12px 16px; }
  .data-table th { font-size:12px; padding:12px 16px; }
  .row-subtle { font-size:12px; }
  .table-wrap { overscroll-behavior-x:contain; }
  .filter-row { align-items:stretch; flex-direction:column; padding:12px 16px; }
  .search-input,.filter-select,.input,.textarea,.select { font-size:16px; min-height:46px; }
  .field-label,.checkbox-label { font-size:14px; }
  .field-help,.connection-note { font-size:12px; }
  .empty-text { font-size:14px; }
  .empty-state { padding:28px 16px; }
  .modal-backdrop { padding:10px; }
  .modal-header,.modal-body { padding:18px; }
  .modal-header h2 { font-size:21px; }
  .public-page { padding:26px 14px; }
  .public-card { padding:26px 20px; }
  .public-heading { font-size:30px; }
  .step { font-size:11px; }
  .legal-details { font-size:13px; }
  .login-story { padding:25px 24px; }
  .login-title { font-size:32px; letter-spacing:-.9px; }
  .login-copy { font-size:14px; }
  .login-side { padding:30px 24px 44px; }
  .login-directions span { font-size:11px; }
  .personal-qr-layout { display:block; }
  .personal-qr-image { min-height:260px; padding:8px; }
  .personal-qr-image img { width:min(256px,100%); height:auto; }
  .personal-qr-panel .panel-header { flex-wrap:wrap; }
  .qr-primary-actions { flex-direction:column; }
  .customer-shell .toast-container,.toast-container { bottom:86px; }
  .reward-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #worker-sessions td::before,.email-review-table td::before { font-size:12px; color:var(--muted); }
}
@media print {
  .sync-region,.customer-bottom-nav,.qr-primary-actions,.qr-downloads,.personal-qr-panel .panel-footer,.personal-qr-guide,.skip-link { display:none!important; }
  .personal-qr-layout { display:block; }
  .qr-test-label { border:2px solid #80561a; padding:10px; }
}
.session-recheck { visibility:hidden!important; pointer-events:none; }
.session-recheck-notice { position:fixed; inset:0; z-index:120; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:32px; text-align:center; background:#f3f6fb; }
.session-recheck-notice h1 { font-size:28px; }
.session-recheck-notice p { max-width:48ch; color:var(--muted); line-height:1.7; }
.text-link { color:#355eaa; font-size:12px; white-space:normal; }
.text-link:hover { color:#1946b6; }
.row-avatar,.sidebar .identity-avatar,.profile-layout .profile-completion .identity-avatar { background:#eaf0fb; color:#365789; }
.permission-note { background:#f2f6fc; border-color:#dce5f2; }
.permission-note .icon { color:#5579af; }
.integration-row span { color:var(--muted); }
.table-status { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 20px; }

/* Language switch (RU / EN) on public pages and in the signed-in header. */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lang-option { min-width: 34px; min-height: 30px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; }
.lang-option:hover { color: var(--ink); }
.lang-option.active { background: var(--ink); color: var(--surface); }
.lang-option:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.public-lang { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
