:root {
  --ink: #16242c;
  --ink-soft: #344c56;
  --muted: #6e7f86;
  --muted-2: #93a1a5;
  --line: #e8e1d6;
  --line-strong: #d8cfc0;
  --snow: #ffffff;
  --page: #f4f1ea;
  --brand: #0f6b74;
  --brand-dark: #0a4f57;
  --brand-ice: #55b3bd;
  --accent: #c1843e;
  --danger: #b4443c;
  --success: #2f7d5d;
  --shadow-soft: 0 18px 40px -34px rgba(22, 36, 44, 0.45);
  --shadow-card: 0 26px 50px -42px rgba(22, 36, 44, 0.5);
  --radius: 18px;
  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Inter", "PingFang SC", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1100px 620px at 88% -8%, rgba(85, 179, 189, 0.16) 0%, transparent 60%),
    radial-gradient(900px 540px at -10% 16%, rgba(193, 132, 62, 0.1) 0%, transparent 55%), var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
p {
  word-break: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.is-strong {
  font-weight: 700;
}

.is-negative {
  color: var(--danger) !important;
}

.is-positive {
  color: var(--success) !important;
}

.is-profit {
  color: var(--success);
  font-weight: 700;
}

/* ---------- boot / noscript ---------- */

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(800px 500px at 50% 20%, #e3f2f9, transparent 65%), var(--page);
}

.boot__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1d6fa5, #5cc7dd);
  box-shadow: 0 20px 40px -18px rgba(22, 108, 158, 0.7);
  animation: boot-pulse 1.8s ease-in-out infinite;
}

.boot__logo .icon {
  width: 34px;
  height: 34px;
}

.boot__logo--image {
  background: none;
  box-shadow: 0 24px 44px -20px rgba(5, 16, 22, 0.55);
}

.boot__logo--image img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.boot__text {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6b8194;
}

@keyframes boot-pulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.noscript {
  padding: 40px;
  text-align: center;
  font-size: 14px;
}

/* ---------- shell ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  color: #dbe9f6;
  background: linear-gradient(180deg, #0a2036 0%, #0f3350 52%, #0d3857 100%);
  box-shadow: 18px 0 50px -40px rgba(4, 25, 43, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #062335;
  background: linear-gradient(135deg, #6ad2e6, #2b93b7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 26px -16px rgba(80, 200, 225, 0.8);
}

.brand-mark .icon {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

.brand-mark--logo {
  width: 88px;
  height: 52px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.brand-mark--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.11em;
  color: #89aec8;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav__group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav__group-label {
  margin: 0 12px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #6d93ad;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #bcd4e7;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav__link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(92, 199, 221, 0.22), rgba(92, 199, 221, 0.03));
}

.nav__link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: #5cc7dd;
  transform: translateY(-50%);
}

.nav__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #7fb0cf;
}

.nav__icon .icon {
  width: 18px;
  height: 18px;
}

.nav__link.is-active .nav__icon {
  color: #6fd4e8;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.sidebar-user__info {
  flex: 1;
  min-width: 0;
}

.sidebar-user__info strong {
  display: block;
  font-size: 12.5px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__info small {
  font-size: 10.5px;
  color: #8fb2cc;
}

.sidebar-version {
  margin: 8px 0 0;
  padding: 0 10px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: #5f829c;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 252px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  background: rgba(244, 248, 252, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__menu {
  display: none;
}

.topbar__titles {
  min-width: 0;
}

.topbar__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.topbar__sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar__today .icon {
  width: 14px;
  height: 14px;
  color: #7d9cb0;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.topbar__user-text b {
  display: block;
  font-size: 11.5px;
  line-height: 1.2;
}

.topbar__user-text small {
  font-size: 9.5px;
  color: var(--muted);
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 28px 64px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: block;
  background: rgba(5, 22, 38, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.nav-open .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- avatars / badges ---------- */

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f85b0, #15597f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  background: #eef4f9;
  color: #45627a;
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge--amount {
  background: #e6f3f7;
  color: #166c8c;
}

.badge--season {
  background: #f1ecfb;
  color: #6a4fa1;
}

.badge--busy {
  background: #fdeede;
  color: #a5601c;
}

.badge--regular {
  background: #e7f6ee;
  color: #2a7a58;
}

.badge--admin {
  background: #fdf0dd;
  color: #a06a1f;
}

.badge--muted {
  background: #eff3f7;
  color: #7c8fa0;
}

.badge--type {
  background: #eef4f9;
  color: #54718a;
  font-weight: 500;
}

.badge--employment {
  background: #e7f6ee;
  color: #2a7a58;
}

.badge--employment.is-external {
  background: #fdeede;
  color: #a5601c;
}

.badge-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, #186c9e, #2b95b2);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(24, 108, 158, 0.8);
}

.btn--primary:hover {
  box-shadow: 0 14px 26px -12px rgba(24, 108, 158, 0.9);
}

.btn--soft {
  background: #e3f2f7;
  color: #12617f;
  border-color: #cfe8f1;
}

.btn--soft:hover {
  background: #d9edf5;
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  border-color: #b7ccda;
  background: #fbfdff;
}

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

.btn--lg {
  padding: 12px 20px;
  font-size: 13.5px;
  border-radius: 11px;
}

.btn--sm {
  padding: 7px 11px;
  font-size: 11.5px;
  border-radius: 9px;
}

.btn--xs {
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 8px;
  gap: 4px;
}

.btn--xs .icon {
  width: 13px;
  height: 13px;
}

.btn--block {
  width: 100%;
}

.btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.btn.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: rgba(11, 34, 57, 0.06);
  color: var(--ink);
}

.icon-btn--danger:hover {
  background: #fdecec;
  color: var(--danger);
}

.icon-btn--light {
  color: #8fb2cc;
}

.icon-btn--light:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------- forms ---------- */

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #d3e0ea;
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  resize: vertical;
  line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
  color: #a4b4c1;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #5aa8c9;
  box-shadow: 0 0 0 3px rgba(61, 151, 187, 0.13);
}

.input:disabled,
.select:disabled {
  background: #f3f7fa;
  color: #7b8fa0;
  cursor: not-allowed;
}

.select {
  cursor: pointer;
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667c8f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #40566b;
}

.field__label em {
  color: #d05a5a;
  font-style: normal;
}

.field__hint {
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.45;
}

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field__label-row--start {
  justify-content: flex-start;
  gap: 12px;
}

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

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

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

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inline-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-group .select {
  width: 88px;
  flex: none;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dce7f0;
  border-radius: 10px;
  background: #eef4f9;
}

.segmented__btn {
  border: 0;
  padding: 6px 10px;
  border-radius: 7px;
  background: transparent;
  color: #5b7184;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.segmented__btn:hover {
  color: var(--ink);
}

.segmented__btn.is-active {
  background: #fff;
  color: #0f5f85;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(20, 60, 90, 0.15);
}

.switch-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 11.5px;
  color: #4b6377;
  cursor: pointer;
  user-select: none;
}

.switch-line input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.switch {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cdd9e4;
  transition: background 0.16s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 35, 60, 0.2);
  transition: transform 0.16s ease;
}

.switch-line input:checked + .switch {
  background: var(--brand-ice);
}

.switch-line input:checked + .switch::after {
  transform: translateX(14px);
}

.switch-line input:focus-visible + .switch {
  outline: 2px solid #8ec6dc;
  outline-offset: 2px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #546d80;
  cursor: pointer;
  user-select: none;
}

.check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-ice);
  cursor: pointer;
}

.field__check-control {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.check-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.check-chip input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.check-chip span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  color: #577186;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.check-chip input:checked + span {
  background: #e5f3f8;
  border-color: #8ec6dc;
  color: #0d6488;
  font-weight: 600;
}

.check-chip input:focus-visible + span {
  outline: 2px solid #8ec6dc;
  outline-offset: 1px;
}

/* ---------- cards / page head ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.page-head__sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.card {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.card-head p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.card-head--inset {
  margin: 0;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

/* ---------- filter bar ---------- */

.filter-bar {
  margin-bottom: 16px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.filter-bar__grid {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 150px;
  min-width: 140px;
  max-width: 230px;
}

.filter-field--full {
  flex-basis: 100%;
  max-width: none;
}

.filter-field__label {
  font-size: 10.5px;
  font-weight: 600;
  color: #5a7186;
}

.filter-field--scope {
  flex: 1 1 230px;
  max-width: none;
  justify-content: flex-end;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.multi-select {
  position: relative;
  width: 100%;
}

.multi-select__summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #d3e0ea;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  color: #4d6579;
  cursor: pointer;
  list-style: none;
}

.multi-select__summary::-webkit-details-marker {
  display: none;
}

.multi-select__summary > .icon:first-child {
  color: #7e9cb1;
  width: 15px;
  height: 15px;
}

.multi-select__chevron {
  margin-left: auto;
  color: #8ba0b1;
  transition: transform 0.16s ease;
}

.multi-select[open] .multi-select__chevron {
  transform: rotate(180deg);
}

.multi-select__menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  max-height: 290px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 45px -22px rgba(10, 40, 70, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.multi-select__option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.multi-select__option:hover {
  background: #f2f8fb;
}

.multi-select__option input {
  margin-top: 2px;
  accent-color: var(--brand-ice);
}

.multi-select__option-text b {
  display: block;
  font-size: 12px;
}

.multi-select__option-text small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

/* ---------- summary strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.stat-strip__icon {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef5fa;
  color: #3c83a6;
}

.stat-strip__icon .icon {
  width: 15px;
  height: 15px;
}

.stat-strip__text {
  min-width: 0;
}

.stat-strip__label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat-strip__text strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.stat-strip__text .is-big {
  font-size: 16px;
  color: var(--brand-dark);
}

.stat-strip__item--brand {
  background: linear-gradient(135deg, #eaf6fb, #fbfdff);
  border-color: #d6eaf2;
}

.stat-strip__item--brand .stat-strip__icon {
  background: #d9eef7;
  color: #0f6c92;
}

.stat-strip__item--accent strong {
  color: #a5601c;
}

.stat-strip__item--accent .stat-strip__icon {
  background: #fdf0dd;
  color: #b47628;
}

/* ---------- order cards ---------- */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fbfdff, #fff);
}

.order-card__identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.order-no {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.order-no__label {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #8aa0b2;
}

.order-no strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.order-no__legacy {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0f5f9;
  font-size: 10px;
  color: #7b90a2;
}

.order-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 13px;
  font-size: 11px;
  color: var(--muted);
}

.order-head-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.order-head-meta .icon {
  width: 13px;
  height: 13px;
  color: #8aa6b8;
}

.order-card__amount {
  text-align: right;
  flex: none;
}

.order-card__amount span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.order-card__amount strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.data-table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
  color: #7c92a5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef3f7;
  vertical-align: top;
}

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

.data-table tbody tr:hover {
  background: #fbfdff;
}

.cell-main {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: #8398a9;
}

.course-no-link {
  padding: 0;
  border: 0;
  background: none;
  color: #3f6f8c;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.course-no-link:hover {
  color: #22506b;
}

.cell-date strong {
  font-weight: 600;
  white-space: nowrap;
}

.cell-fees {
  min-width: 155px;
}

.cell-actions {
  white-space: nowrap;
}

.cell-profit .cell-main {
  color: var(--success);
}

.th-actions {
  text-align: right !important;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.order-card__foot {
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  background: #fafcfe;
}

.order-foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.order-foot-item span {
  display: block;
  font-size: 9.5px;
  color: #8499aa;
}

.order-foot-item b {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- pager / loading / empty ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pager__info {
  font-size: 11px;
  color: var(--muted);
}

.pager__controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pager__btn,
.pager__nav {
  min-width: 33px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4c6377;
  font-size: 11.5px;
  cursor: pointer;
}

.pager__btn:hover,
.pager__nav:hover:not(:disabled) {
  border-color: #b7ccda;
  background: #fbfdff;
}

.pager__btn.is-active {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  font-weight: 700;
}

.pager__nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager__ellipsis {
  padding: 0 3px;
  color: #8da1b3;
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 62px 20px;
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #d6e6ef;
  border-top-color: var(--brand-ice);
  animation: spin 0.8s linear infinite;
}

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

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
}

.empty__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #eef5fa;
  color: #4c8bad;
}

.empty__icon .icon {
  width: 25px;
  height: 25px;
}

.empty h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.empty p {
  max-width: 380px;
  margin: 6px 0 16px;
  font-size: 12px;
  line-height: 1.65;
}

.empty--error .empty__icon {
  background: #fdecec;
  color: var(--danger);
}

/* ---------- toast ---------- */

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(390px, 90vw);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 11px;
  background: #0f2f49;
  color: #eaf4fb;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 18px 40px -18px rgba(5, 25, 45, 0.8);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast--error {
  background: #8c3232;
}

.toast--info {
  background: #1c5b7a;
}

.toast .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* ---------- modal ---------- */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 18px 24px;
  background: rgba(6, 24, 40, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 18px;
  background: #f7fafc;
  box-shadow: 0 30px 80px -30px rgba(2, 20, 38, 0.6);
  transform: translateY(14px) scale(0.99);
  transition: transform 0.22s ease;
}

.modal-backdrop.is-open .modal {
  transform: none;
}

.modal--sm {
  max-width: 430px;
}

.modal--lg {
  max-width: 1040px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal__titles h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.modal__titles p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.modal__body {
  overflow: auto;
  padding: 20px 22px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.confirm-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- course editor ---------- */

.course-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.course-card {
  overflow: hidden;
  border: 1px solid #dbe7f0;
  border-radius: 15px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.course-card.has-error {
  border-color: #d66;
  box-shadow: 0 0 0 3px rgba(201, 75, 75, 0.1);
}

.course-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(90deg, #f8fbfe, #fff);
}

.course-card__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.course-card__chevron {
  color: #7e95a8;
  transition: transform 0.18s ease;
}

.course-card.is-open .course-card__chevron {
  transform: rotate(180deg);
}

.course-card__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.course-card__index {
  padding: 3px 8px;
  border-radius: 6px;
  background: #e6f2f7;
  color: #0f6c92;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.course-card__summary {
  overflow: hidden;
  font-size: 11px;
  color: #72889a;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.course-card__amount {
  font-size: 15px;
  white-space: nowrap;
}

.course-card__body {
  display: none;
  padding: 4px 16px 16px;
  border-top: 1px solid var(--line);
}

.course-card.is-open .course-card__body {
  display: block;
}

.course-card__confirm {
  display: none;
  padding: 0 16px 14px;
}

.course-card:not(.is-open) .course-card__confirm {
  display: block;
}

.course-card:not(.is-open) .course-card__summary {
  display: none;
}

.course-confirm__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 26px;
  padding: 11px 14px;
  border: 1px solid #e3ebf2;
  border-radius: 12px;
  background: #f8fbfe;
}

.course-confirm__item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.course-confirm__item span,
.course-confirm__fees span {
  font-size: 10.5px;
  color: #72889a;
}

.course-confirm__item b {
  overflow: hidden;
  min-width: 0;
  color: #1d2b36;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-confirm__fees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 10px 2px 0;
}

.course-confirm__fees > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.course-confirm__fees b {
  color: #1d2b36;
  font-size: 13px;
}

.course-confirm__fees .is-strong b {
  color: #0f6c92;
}

.course-confirm__block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #dbe7ef;
}

.course-confirm__block--lead {
  margin-top: 0;
  padding-top: 6px;
  border-top: 0;
}

.course-confirm__item--note {
  flex-basis: 100%;
  color: #72889a;
  font-size: 11px;
}

.course-confirm__block-head {
  margin-bottom: 6px;
}

.course-confirm__block-head h5 {
  margin: 0;
  color: #1d2b36;
  font-size: 11px;
  font-weight: 700;
}

.course-confirm__sets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  color: #4a5c68;
  font-size: 11px;
  line-height: 1.45;
}

.course-confirm__empty {
  margin: 0;
  color: #72889a;
  font-size: 11px;
}

.form-section {
  padding: 15px 0;
  border-top: 1px dashed #e3ebf2;
}

.form-section:first-child {
  border-top: 0;
}

.form-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.form-section__head h3 {
  margin: 0;
  font-size: 13px;
}

.form-section__head p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.form-section__head > .segmented {
  margin-left: auto;
}

.count-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.count-strip.is-loading {
  opacity: 0.5;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f6fa;
  font-size: 10px;
  color: #5e778a;
}

.count-chip b {
  color: #0e6b91;
  font-size: 10.5px;
}

.sub-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e4edf4;
  border-radius: 12px;
  background: #f7fafc;
}

.inline-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed #dce8f0;
  font-size: 11.5px;
  color: #4f687c;
}

.inline-total b {
  font-size: 14px;
}

.sub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 9px;
}

.sub-head h4 {
  margin: 0;
  font-size: 12px;
}

.sub-head p {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--muted);
}

.equipment-sets {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.equipment-set {
  padding: 12px;
  border: 1px solid #dde9f1;
  border-radius: 11px;
  background: #fff;
}

.equipment-set__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.equipment-set__head h5 {
  margin: 0;
  font-size: 12px;
}

.empty-inline {
  padding: 14px;
  border: 1px dashed #d9e6ef;
  border-radius: 10px;
  background: #fbfdff;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.fee-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dcebf3;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f8fb, #f8fbfd);
}

.fee-panel__empty {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #7e94a6;
}

.fee-panel__empty[hidden] {
  display: none;
}

.fee-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 10.5px;
  color: #6d8497;
}

.fee-panel__rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #557083;
}

.fee-panel__rows > div {
  display: flex;
  justify-content: space-between;
}

.fee-panel__rows > div[hidden] {
  display: none;
}

.fee-panel__rows .is-accent {
  color: #a5601c;
}

.fee-panel__discount {
  align-items: center;
  gap: 10px;
}

.fee-panel__discount .input {
  width: 128px;
  padding: 4px 8px;
  font-size: 11px;
  text-align: right;
  background: #fff;
}

.fee-panel__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #d3e4ee;
  font-size: 11.5px;
  color: #31566d;
}

.fee-panel__total b {
  font-size: 15px;
  color: #0e5f83;
}

.course-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: #698093;
}

.course-breakdown strong {
  color: #0f5f83;
  font-size: 12px;
}

.profit-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid #f3e2c4;
  border-radius: 10px;
  background: #fff8ec;
  font-size: 11.5px;
  color: #7b5b22;
}

.profit-line__hint {
  font-size: 10px;
  color: #a98f63;
}

.profit-line b {
  margin-left: auto;
  font-size: 15px;
}

.supplement {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f4e7cd;
  border-radius: 12px;
  background: #fffdf7;
}

.add-course-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding-top: 4px;
}

.add-course-row__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.add-course-row__hint {
  font-size: 10px;
  color: #8ba0b1;
}

.add-course-row__copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.add-course-row__edit {
  padding-inline: 14px;
}

/* ---------- new order ---------- */

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.order-layout__main {
  min-width: 0;
}

.order-summary {
  position: sticky;
  top: 86px;
}

.summary-card {
  padding: 22px;
  border-radius: 18px;
  color: #eaf5fb;
  background: linear-gradient(180deg, #0e3450, #0b2842);
  box-shadow: 0 26px 55px -30px rgba(6, 35, 58, 0.9);
}

.summary-card__eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #7fa9c4;
}

.summary-total {
  display: block;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: #fff;
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
  color: #a9c7d9;
}

.summary-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.summary-rows b {
  color: #eaf5fb;
  font-weight: 600;
}

.summary-rows .is-strong {
  color: #fff;
}

.summary-rows .is-strong b {
  font-size: 14px;
}

.summary-divider {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.13);
}

.summary-card .btn--primary {
  margin-top: 18px;
  background: linear-gradient(135deg, #59c3db, #2d94b4);
  color: #062335;
  box-shadow: none;
  font-weight: 700;
}

.summary-note {
  margin: 12px 0 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: #7c9db3;
}

.rate-box {
  padding: 10px 12px;
  border: 1px solid #dbe7f0;
  border-radius: 10px;
  background: #fbfdff;
}

.rate-box.is-loading {
  opacity: 0.7;
}

.rate-box.is-manual {
  border-color: #f0e0bf;
  background: #fffbf2;
}

.rate-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rate-value {
  font-size: 12px;
  color: #0d5f83;
}

.rate-box .field__hint {
  font-size: 10px;
}

.manual-rate {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.manual-rate__label {
  font-size: 10px;
  color: #8a6a2b;
}

.manual-rate__prefix {
  font-size: 10.5px;
  color: #7b6a4e;
}

.manual-rate .input {
  max-width: 150px;
}

.deposit-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px dashed #cfe4ee;
  border-radius: 11px;
  background: #f2f8fb;
}

.deposit-summary > div span {
  display: block;
  font-size: 10px;
  color: #72899b;
}

.deposit-summary > div b {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.deposit-summary > div.is-strong b {
  color: var(--brand-dark);
}

.deposit-summary p {
  margin: 0 0 0 auto;
  font-size: 10px;
  color: #8499aa;
}

.lock-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #f2f7fa;
  font-size: 10px;
  color: #7e93a5;
}

.lock-note .icon {
  width: 12px;
  height: 12px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

/* ---------- login ---------- */

.login-page {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  background: #f3f7fa;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 54px;
  color: #e8f3fa;
  background: radial-gradient(120% 90% at 20% 0%, #1b4d70 0%, #0b2437 55%, #071a29 100%);
}

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

.login-brand .brand-mark {
  width: 38px;
  height: 38px;
}

.login-brand .brand-mark--logo {
  width: 88px;
  height: 52px;
}

.login-brand strong {
  display: block;
  font-size: 17px;
}

.login-brand small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #87aec8;
}

.login-visual__content {
  position: relative;
  z-index: 2;
  max-width: 530px;
  margin: auto 0;
  padding: 50px 0;
}

.login-eyebrow {
  margin: 0 0 16px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: #6fb4d0;
}

.login-visual h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.login-lead {
  max-width: 470px;
  margin: 18px 0 28px;
  font-size: 12.5px;
  line-height: 1.85;
  color: #a8c4d6;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #b9d2e2;
}

.login-feature__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: rgba(110, 200, 220, 0.12);
  color: #6fd0e6;
}

.login-feature__icon .icon {
  width: 14px;
  height: 14px;
}

.login-visual__foot {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: #5f87a0;
}

.snow-scene {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 42%;
  pointer-events: none;
  opacity: 0.9;
}

.snow-scene__moon {
  position: absolute;
  top: 10%;
  right: 12%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e4f4ff, #a9d1e6);
  box-shadow: 0 0 60px rgba(180, 225, 245, 0.35);
}

.snow-scene__ridge {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 68%;
  background: linear-gradient(180deg, rgba(120, 170, 200, 0.22), rgba(20, 55, 80, 0.06));
  clip-path: polygon(0 100%, 0 48%, 14% 60%, 28% 26%, 42% 58%, 55% 34%, 70% 62%, 84% 40%, 100% 66%, 100% 100%);
}

.snow-scene__ridge--back {
  height: 84%;
  opacity: 0.55;
  transform: translateY(-14%);
}

.snow-scene__ridge--front {
  background: linear-gradient(180deg, rgba(200, 230, 245, 0.18), rgba(255, 255, 255, 0.03));
  clip-path: polygon(0 100%, 0 62%, 18% 74%, 30% 42%, 46% 72%, 62% 48%, 78% 76%, 90% 54%, 100% 78%, 100% 100%);
}

.snow-scene__flake {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #dff2fd;
  box-shadow: 0 0 8px #bfe6fa;
  animation: snow-float 9s ease-in-out infinite;
}

.snow-scene__flake--1 {
  top: 26%;
  left: 14%;
}

.snow-scene__flake--2 {
  top: 18%;
  left: 38%;
  animation-delay: -2s;
  width: 2px;
  height: 2px;
}

.snow-scene__flake--3 {
  top: 38%;
  left: 62%;
  animation-delay: -4s;
}

.snow-scene__flake--4 {
  top: 12%;
  left: 72%;
  animation-delay: -6s;
  width: 2px;
  height: 2px;
}

@keyframes snow-float {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-18px);
    opacity: 1;
  }
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 70px -45px rgba(9, 40, 65, 0.5);
}

.login-card__head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.login-card__head p {
  margin: 6px 0 22px;
  font-size: 12px;
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field__label {
  font-size: 11px;
  font-weight: 600;
  color: #4d6579;
}

.input-icon {
  position: relative;
}

.input-icon > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: #8aa0b1;
  transform: translateY(-50%);
  pointer-events: none;
}

.input--lg {
  height: 46px;
  border-radius: 11px;
  font-size: 13px;
}

.input-icon .input {
  padding-left: 38px;
}

.input-icon .input--with-action {
  padding-right: 42px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8aa0b1;
  cursor: pointer;
  transform: translateY(-50%);
}

.input-action:hover {
  background: #f1f6fa;
  color: #456;
}

.form-error {
  padding: 9px 11px;
  border: 1px solid #f3cccc;
  border-radius: 8px;
  background: #fdeeee;
  color: #a53c3c;
  font-size: 11.5px;
}

.login-copyright {
  margin: 0;
  font-size: 9.5px;
  color: #9aacba;
}

/* ---------- detail modal ---------- */

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-section {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.detail-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-section__head h3 {
  margin: 0;
  font-size: 12.5px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.info-grid__item dt {
  margin: 0;
  font-size: 9.5px;
  color: #879cab;
}

.info-grid__item dd {
  margin: 3px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.detail-sets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.detail-set {
  padding: 11px 12px;
  border: 1px solid #e4eef5;
  border-radius: 10px;
  background: #f8fbfd;
}

.detail-set__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 10.5px;
}

.detail-set .info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-notes {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.75;
  color: #4d667a;
  white-space: pre-wrap;
}

/* ---------- stats ---------- */

.stats-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.metric-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}

.metric-card__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eff6fa;
  color: #4387a9;
}

.metric-card__icon .icon {
  width: 13px;
  height: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.metric-card p {
  margin: 4px 0 0;
  font-size: 10px;
  color: #8ba0b1;
}

.metric-card--brand {
  border-color: #d3e9f2;
  background: linear-gradient(135deg, #e9f6fb, #f7fcfe);
}

.metric-card--brand strong {
  color: var(--brand-dark);
}

.metric-card--profit strong {
  color: var(--success);
}

.metric-card--accent strong {
  color: #a5601c;
}

.metric-card--ice {
  background: #f5fafe;
}

.stats-table th.num,
.stats-table td.num {
  text-align: right;
  white-space: nowrap;
}

.sales-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sales-cell__info {
  min-width: 110px;
}

.sales-cell__info strong {
  display: block;
  font-size: 11.5px;
}

.rank-bar {
  display: block;
  width: 100px;
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf3f7;
}

.rank-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #63bdd5, #2b8bae);
}

.data-table tfoot td {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: #f7fafc;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tfoot td.num {
  text-align: right;
}

/* ---------- coach settings ---------- */

.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.coach-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.coach-card.is-inactive {
  opacity: 0.7;
}

.coach-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.coach-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #d9eef7, #eef8fd);
  color: #14658a;
  font-size: 14px;
  font-weight: 700;
}

.coach-card__title {
  flex: 1;
  min-width: 0;
}

.coach-card__title h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 14px;
}

.coach-card__title p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.coach-card__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 10.5px;
}

.coach-card__meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coach-card__meta > div > span {
  color: var(--muted);
}

.coach-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.coach-card__foot .muted {
  font-size: 9.5px;
}

.coach-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.coach-card__text {
  max-width: 62%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-avatar--photo {
  object-fit: cover;
  padding: 0;
}

.cert-upload {
  padding: 12px;
  border: 1.5px dashed #c7dbe7;
  border-radius: 14px;
  background: #fafdff;
}

.cert-preview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cert-preview__empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.cert-preview__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- resort settings ---------- */

.resort-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.resort-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.resort-group__head h2 {
  margin: 0;
  font-size: 13px;
}

.resort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.resort-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.resort-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.resort-card__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #d9eef7, #eef8fd);
  color: #14658a;
}

.resort-card__title {
  flex: 1;
  min-width: 0;
}

.resort-card__title h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resort-card__title p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.resort-card__prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7fafc;
  font-size: 11px;
}

.resort-card__prices > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.resort-card__prices span {
  color: var(--muted);
}

.resort-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.resort-card__foot .muted {
  font-size: 9.5px;
}

.resort-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- excel ---------- */

.excel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 16px;
}

.excel-actions .muted {
  max-width: 520px;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.65;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  border: 1.5px dashed #c7dbe7;
  border-radius: 14px;
  background: #fafdff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-zone:hover,
.upload-zone.is-over {
  border-color: #72b7d2;
  background: #f2fafd;
}

.upload-zone > .icon {
  width: 28px;
  height: 28px;
  color: #6aa4bf;
}

.upload-zone__label {
  font-size: 12.5px;
  font-weight: 600;
  color: #315a73;
}

.upload-zone small {
  font-size: 10px;
  color: #8ba0b1;
}

.import-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.import-metrics > div {
  padding: 10px 12px;
  border: 1px solid #e4eef5;
  border-radius: 10px;
  background: #f5fafc;
}

.import-metrics span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.import-metrics b {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.import-warnings {
  max-height: 280px;
  margin-top: 14px;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid #f1e2c7;
  border-radius: 11px;
  background: #fffbf2;
}

.import-warnings h3 {
  margin: 0 0 8px;
  font-size: 11px;
  color: #7d5b20;
}

.import-warnings ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
  color: #7b674a;
}

.import-warnings li {
  line-height: 1.55;
}

.warning-row {
  display: inline-block;
  margin-right: 6px;
  color: #a06a1f;
  font-weight: 700;
}

.inline-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: #a53c3c;
  font-size: 11.5px;
}

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

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

@media (max-width: 1080px) {
  .topbar {
    padding: 12px 20px;
  }

  .content {
    padding: 22px 20px 56px;
  }

  .order-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-summary {
    position: static;
  }

  .summary-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px 24px;
    align-items: center;
  }

  .summary-card__eyebrow,
  .summary-note,
  .summary-divider {
    grid-column: 1 / -1;
  }

  .summary-divider {
    margin: 2px 0;
  }

  .summary-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 20px;
  }

  .summary-card .btn--primary {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .summary-total {
    font-size: 26px;
  }
}

@media (max-width: 980px) {
  .sidebar {
    width: 264px;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  body.nav-open .sidebar {
    transform: none;
  }

  .app-main {
    margin-left: 0;
  }

  .topbar__menu {
    display: grid;
  }

  .topbar {
    padding: 11px 16px;
  }

  .content {
    padding: 20px 16px 54px;
  }

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

  .filter-field {
    max-width: none;
  }

  .filter-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

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

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 280px;
    padding: 28px 26px;
  }

  .login-visual__content {
    margin: 0;
    padding: 34px 0 12px;
  }

  .login-visual h1 {
    font-size: 30px;
  }

  .login-lead {
    margin: 12px 0 0;
  }

  .login-features {
    display: none;
  }

  .login-visual__foot {
    display: none;
  }

  .snow-scene {
    height: 100%;
    opacity: 0.35;
  }

  .login-panel {
    padding: 30px 18px 46px;
  }
}

@media (max-width: 760px) {
  .topbar__today {
    display: none;
  }

  .topbar__user-text {
    display: none;
  }

  .topbar__user {
    padding: 5px;
  }

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

  .page-head h1 {
    font-size: 22px;
  }

  .page-head__actions {
    width: 100%;
  }

  .page-head__actions .btn {
    flex: 1;
  }

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

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

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

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

  .order-card__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .order-card__amount {
    text-align: left;
  }

  .order-card__amount strong {
    font-size: 18px;
  }

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

  .card {
    padding: 17px;
    border-radius: 15px;
  }

  .card-head--inset {
    padding: 16px 17px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(30px);
  }

  .modal__head,
  .modal__body,
  .modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal__body {
    padding-top: 16px;
  }

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

  .summary-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .summary-total {
    font-size: 28px;
  }

  .contact-row {
    grid-template-columns: 100px minmax(0, 1fr) auto;
  }

  .import-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segmented {
    width: 100%;
    justify-content: space-between;
  }

  .segmented__btn {
    flex: 1;
  }

  .course-card__summary {
    display: none;
  }

  .course-card__body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .course-card__confirm {
    padding: 0 12px 12px;
  }

  .form-section__head > .segmented,
  .card-head > .segmented {
    width: auto;
  }

  .form-section__head > .segmented .segmented__btn,
  .card-head > .segmented .segmented__btn {
    flex: none;
  }

  .deposit-summary p {
    margin-left: 0;
  }

  .detail-sets {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    justify-content: center;
    background: radial-gradient(700px 420px at 50% 0%, #e6f3fa, transparent 70%), #f3f7fa;
  }

  .login-card {
    padding: 26px 22px;
  }

  .stat-strip,
  .stats-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-strip__item {
    padding: 10px;
  }

  .stat-strip__icon {
    width: 26px;
    height: 26px;
  }

  .form-grid,
  .form-grid--3,
  .form-grid--4 {
    grid-template-columns: 1fr;
  }

  .filter-field {
    flex-basis: 100%;
  }

  .filter-field--scope {
    flex-basis: 100%;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .content {
    padding: 16px 11px 46px;
  }

  .card {
    padding: 14px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .order-card__head {
    padding: 13px;
  }

  .order-card__foot {
    padding: 11px 13px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }

  .row-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .pager {
    justify-content: center;
  }

  .pager__info {
    width: 100%;
    text-align: center;
  }

  .summary-rows {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr auto;
  }

  .contact-row .select {
    grid-column: 1 / -1;
  }

  .segmented__btn {
    padding: 7px 7px;
    font-size: 10.5px;
  }

  .add-course-row__actions {
    width: 100%;
    margin-left: 0;
    align-items: stretch;
  }

  .add-course-row__actions > .btn {
    justify-content: center;
  }

  .add-course-row__copy {
    width: 100%;
  }

  .modal__footer .btn {
    flex: 1;
  }

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

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

  .login-panel {
    padding: 22px 14px 36px;
  }
}

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