:root {
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: #f8f4ff;
  background: #100d15;
  font-synthesis: none;
  --ink: #f8f4ff;
  --muted: #b9adc9;
  --soft: #281f33;
  --line: #332841;
  --panel: #191420;
  --accent: #c5abff;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --surface: #21192b;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid #c5abff; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
input, select, textarea { min-width: 0; }
[hidden] { display: none !important; }

.icon { display: inline-block; width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.subtext { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.number { font-variant-numeric: tabular-nums; }
.loading { min-height: 70svh; display: grid; place-items: center; color: var(--muted); }
.loading.inline { min-height: 160px; }
.wrap-long { overflow-wrap: anywhere; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.secondary:hover { background: #281f33; border-color: #674b8d; }
.button.quiet:hover { background: #241b2f; }
.button.small { min-height: 35px; padding: 6px 10px; font-size: .875rem; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--soft); color: var(--ink); }
.text-button { border: 0; padding: 0; background: none; text-align: left; font-weight: 650; }
.text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; text-align: left; }
.brand img { width: 42px; height: 42px; }
.brand strong { display: block; font-size: 1.25rem; letter-spacing: -.055em; line-height: 1.06; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .025em; }

.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100svh; }
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 35px;
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 24px 16px 18px;
  background: #15101c;
  border-right: 1px solid var(--line);
}
.sidebar > .brand { margin-left: 8px; }
.navigation { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.navigation button {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  font-size: .92rem;
  font-weight: 610;
  white-space: nowrap;
  color: var(--muted);
}
.navigation button:hover { background: #281f33; }
.navigation button[aria-current] { color: #e1d4ff; background: #31204d; border-color: #4a306d; }
.navigation button[aria-current] .icon { stroke-width: 1.95; }
.navigation-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.navigation button:has(.bank-request-count:not([hidden])) { gap: 6px; padding-inline: 7px; }
.bank-request-count { flex: 0 0 auto; margin-left: auto; padding: 2px 5px; border-radius: 6px; color: #26163d; background: #e3d3ff; font-size: .75rem; font-weight: 750; }
.account-footer { display: flex; gap: 9px; align-items: center; margin-top: auto; padding: 14px 0 0 3px; border-top: 1px solid var(--line); }
.account-footer .who { min-width: 0; flex: 1; }
.account-footer .who strong, .account-footer .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-footer .who strong { font-size: .875rem; }
.account-footer .who span { color: var(--muted); font-size: .76rem; margin-top: 3px; }
.account-footer .icon-button { width: 32px; height: 36px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 67px; padding: 10px 32px; border-bottom: 1px solid var(--line); background: #15101c; }
.topbar-label { color: var(--muted); font-size: .875rem; font-weight: 580; }
.topbar-right, .demo-controls { display: flex; align-items: center; gap: 10px; }
.demo-tag { padding: 5px 8px; border-radius: 6px; color: #e2d0ff; background: #302044; font-size: .8rem; font-weight: 650; }
.demo-controls select { min-height: 35px; padding-top: 5px; padding-bottom: 5px; font-size: .85rem; }
.today { color: var(--muted); font-size: .87rem; white-space: nowrap; }
.content { max-width: 1560px; margin: 0 auto; padding: 29px 32px 40px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.page-heading h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.058em; line-height: 1.12; font-weight: 740; }
.page-heading p { color: var(--muted); margin-top: 7px; font-size: .98rem; line-height: 1.45; }
.heading-action { display: flex; align-items: center; gap: 9px; }

.referral-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 21px 25px;
  border-radius: var(--radius);
  background: linear-gradient(110deg, #3d1c73 0%, #602db7 100%);
  color: #fff;
}
.referral-card::after, .applicant-earnings::after, .entry-aside::after, .highlight::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: -110px -65px -110px 34%;
  transform: rotate(-14deg);
  background: url("./ourhouse-icon.png") 20px 10px / 116px 116px repeat;
  mask-image: linear-gradient(90deg, transparent, #000 62%);
  opacity: .26;
  pointer-events: none;
}
.referral-card h2 { font-size: clamp(1.3rem, 3vw, 1.72rem); font-weight: 720; letter-spacing: -.035em; }
.referral-card p { color: #ede1ff; line-height: 1.45; max-width: 63ch; margin-top: 5px; }
.referral-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.button.referral-primary { color: #29144c; background: #eadcff; }
.button.referral-primary:hover { background: #fff; }
.button.referral-secondary { color: #fff; border-color: #d5bafb85; background: #27134435; }
.button.referral-secondary:hover { background: #36215e; }
.referral-card :focus-visible { outline-color: #eadcff; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.owner-stats, .employee-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { position: relative; overflow: hidden; padding: 15px 17px; min-height: 129px; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-head { display: flex; align-items: center; gap: 9px; justify-content: space-between; font-size: .875rem; font-weight: 650; }
.stat-head .icon { width: 17px; height: 17px; }
.stat-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--accent); background: #2d2140; }
.stat-value { position: relative; color: var(--ink); font-size: clamp(1.45rem, 2.45vw, 2.15rem); font-weight: 735; letter-spacing: -.055em; line-height: 1.13; overflow-wrap: anywhere; }
.stat-hint { color: var(--muted); font-size: .8rem; position: relative; }
.stat-card.highlight { isolation: isolate; color: #fff; background: #4a2580; border-color: #4a2580; }
.highlight::before { background-size: 72px 72px; opacity: .21; }
.highlight .stat-head { position: relative; }
.highlight .stat-value { color: #fff; }
.highlight .stat-hint { color: #eadcfb; }
.highlight .stat-icon { color: #eadcff; background: #dcbfff22; }

.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 15px 17px 12px; }
.panel-header h2, .profile-card h2 { font-size: 1.05rem; font-weight: 725; letter-spacing: -.023em; }
.panel-header p { margin-top: 4px; }
.bank-requests { margin-bottom: 15px; }
.bank-requests ul { list-style: none; margin: 0; padding: 0 17px; }
.bank-requests li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.bank-requests li .subtext { display: block; overflow-wrap: anywhere; }
.bank-request-creator { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.bank-requests-empty { padding: 0 17px 15px; }
.insights { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 13px; margin-bottom: 16px; }
.panel + .insights { margin-top: 16px; }
.chart-panel { padding-bottom: 13px; }
.chart {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: 112px auto;
  gap: 7px 8px;
  margin: 7px 20px 0 17px;
  font-size: .76rem;
  color: var(--muted);
}
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-variant-numeric: tabular-nums; }
.chart-grid { display: grid; position: relative; grid-template-rows: repeat(4, 1fr); }
.chart-grid::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 25%); border-bottom: 1px solid var(--line); pointer-events: none; }
.chart-bars, .chart-labels { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 5px; }
.chart-bars { position: absolute; z-index: 1; inset: 0; }
.chart-bars > div { display: flex; justify-content: center; align-items: flex-end; min-width: 0; }
.chart-bar { background: #9063db; border-radius: 5px 5px 1px 1px; width: min(58%, 35px); height: var(--bar-height); }
.chart-bar.strong { background: var(--accent); }
.chart-labels { grid-column: 2; text-align: center; white-space: nowrap; }
.chart-labels span { overflow: hidden; text-overflow: ellipsis; }
.chart-unit { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.team-mini { display: grid; gap: 8px; padding: 2px 17px 13px; }
.team-line { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(26px, 65px) 22px; gap: 7px; align-items: center; font-size: .86rem; }
.team-line .member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 625; }
.team-line .mini-total { text-align: right; font-weight: 670; }
.team-line.personal-line { grid-template-columns: minmax(0, 1fr) minmax(26px, 65px) 22px; min-height: 24px; }
.meter { display: block; overflow: hidden; height: 5px; border-radius: 6px; background: #302740; }
.meter span { display: block; height: 100%; width: var(--meter); background: var(--person-fill, #9d72e9); border-radius: inherit; }
.minor-empty { color: var(--muted); font-size: .9rem; padding: 10px 0; }

.avatar, .creator {
  --person-bg: #3a2852;
  --person-ink: #e8d6ff;
  --person-fill: #9a6dd9;
  --avatar-light: #553d70;
  --avatar-line: #70558e;
}
[data-color="0"] { --person-bg: #222229; --person-ink: #f8f6fc; --person-fill: #aeabb8; --avatar-light: #393940; --avatar-line: #53525e; }
[data-color="1"] { --person-bg: #e5d6fa; --person-ink: #502782; --person-fill: #a67ada; --avatar-light: #f5edff; --avatar-line: #b99add; }
[data-color="2"] { --person-bg: #d8ebdc; --person-ink: #20583a; --person-fill: #59a87a; --avatar-light: #eef9ef; --avatar-line: #9cc8ab; }
[data-color="3"] { --person-bg: #d6e7fb; --person-ink: #234e90; --person-fill: #629cde; --avatar-light: #eff7ff; --avatar-line: #9bbfe8; }
[data-color="4"] { --person-bg: #edddcf; --person-ink: #603d2b; --person-fill: #b98563; --avatar-light: #faf0e5; --avatar-line: #c9a78e; }
.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--avatar-line);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--avatar-light), var(--person-bg) 75%);
  box-shadow: 0 2px 5px #10081950, inset 0 1px 0 #ffffff28;
  color: var(--person-ink);
  font-size: .85rem;
  font-weight: 780;
  line-height: 1;
}
.avatar.compact { width: 28px; height: 28px; border-radius: 9px; font-size: .75rem; }
.creator { display: inline-flex; max-width: 208px; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; background: var(--person-bg); color: var(--person-ink); font-size: .815rem; font-weight: 650; white-space: nowrap; vertical-align: middle; }
.creator span { overflow: hidden; text-overflow: ellipsis; }
.creator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--person-fill); flex: 0 0 auto; }

.table-scroller { max-width: 100%; overflow: auto; scrollbar-width: thin; }
.records { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.records th { color: var(--muted); background: #21192b; padding: 9px 13px; font-size: .8125rem; font-weight: 630; white-space: nowrap; }
.records td { padding: 11px 13px; border-bottom: 1px solid #332841; font-size: .9rem; }
.records tr:last-child td { border-bottom: 0; }
.records tbody tr:hover { background: #15101c; }
.records :is(th, td):first-child { padding-left: 17px; }
.records :is(th, td):last-child { padding-right: 17px; }
.records .lead-name { min-width: 155px; overflow-wrap: anywhere; }
.team-records { min-width: 0; }
.team-records :is(th, td):last-child { text-align: right; }
.team-records .badge { white-space: normal; }
.cell-detail { display: block; color: var(--muted); margin-top: 3px; font-size: .78rem; overflow-wrap: anywhere; }
.cell-money, .cell-date { white-space: nowrap; }
.cell-money { font-weight: 640; font-variant-numeric: tabular-nums; }
.cell-date { font-size: .85rem !important; color: var(--muted); }
.cell-person { display: flex; gap: 9px; align-items: center; }
.badge { display: inline-block; border-radius: 7px; padding: 4px 7px; background: #2c2437; color: #ded1ee; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.badge.new { color: #2c5290; background: #e7effd; }
.badge.working, .badge.pending, .badge.setup { color: #76531d; background: #f9eedc; }
.badge.inactive { color: #5f447e; background: #f0eaf8; }
.badge.active, .badge.paid, .badge.ready { color: #286046; background: #e6f2e9; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 10px 17px; color: var(--muted); font-size: .87rem; }
.table-footer > div { display: flex; gap: 6px; }
.empty { display: grid; justify-items: center; gap: 7px; text-align: center; padding: 29px 18px 35px; color: var(--muted); }
.empty .icon { width: 24px; height: 24px; color: var(--accent); }
.empty h3 { font-size: 1rem; color: var(--ink); }
.empty .button { margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; padding: 13px 17px; }
.search { position: relative; flex: 1 1 230px; }
.search .icon { position: absolute; left: 11px; top: 11px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding-left: 37px; }

.control, select, textarea {
  display: block;
  border: 1px solid #453656;
  border-radius: 9px;
  min-height: 41px;
  padding: 8px 11px;
  background-color: #17121e;
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.35;
}
.control::placeholder, textarea::placeholder { color: #b8abc8; opacity: .86; }
select { appearance: none; padding-right: 29px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c5abff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 15px; background-repeat: no-repeat; background-position: right 8px center; }
.form { display: grid; gap: 14px; }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; }
.field { display: grid; gap: 6px; font-size: .875rem; font-weight: 630; min-width: 0; }
.field .hint { color: var(--muted); font-weight: 400; }
.field textarea { min-height: 80px; resize: vertical; }
.control:focus, select:focus, textarea:focus { border-color: #a57be3; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .notice { font-size: .88rem; line-height: 1.42; border-radius: 8px; padding: 8px 10px; background: #41212f; color: #ffc6cc; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; line-height: 1.45; color: var(--ink); }
.check input { margin: 3px 0 0; width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--primary); }
.read-only { background: #21192b; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.profile-card { padding: 19px; }
.profile-card .button { margin-top: 15px; }
.profile-card p { margin-top: 8px; }
.details { display: grid; gap: 11px; margin: 0; }
.profile-card .details { margin-top: 13px; }
.details > div { display: grid; gap: 3px; }
.details dt { color: var(--muted); font-size: .85rem; }
.details dd { margin: 0; color: var(--ink); font-size: .96rem; font-weight: 580; overflow-wrap: anywhere; white-space: pre-wrap; }

.entry { min-height: 100svh; display: flex; flex-direction: column; }
.entry-bar { background: #15101c; min-height: 67px; padding: 10px 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry-inner { width: min(100%, 1020px); margin: auto; padding: 35px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr); align-items: stretch; gap: 15px; }
.entry-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: clamp(22px, 4vw, 40px); min-height: 405px; border: 1px solid #4a2580; border-radius: 20px; background: linear-gradient(140deg, #32175b, #51258b); }
.entry-aside::after { inset: -30px -82px -96px 24%; background-size: 105px 105px; }
.entry-aside img { position: relative; width: 47px; height: 47px; background: #faf2ff; border-radius: 13px; }
.entry-aside h2 { font-size: clamp(1.75rem, 3.4vw, 2.8rem); font-weight: 700; line-height: 1.09; letter-spacing: -.055em; max-width: 11ch; }
.entry-aside p { margin-top: 11px; color: #e3d4f8; line-height: 1.55; max-width: 29ch; }
.entry-aside > * { position: relative; z-index: 1; }
.entry-card { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 19px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 38px); }
.entry-card h1 { font-size: clamp(1.55rem, 2.7vw, 2.1rem); line-height: 1.14; font-weight: 730; letter-spacing: -.045em; }
.entry-card h1 + p { margin-top: 7px; }
.steps { display: grid; gap: 11px; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: #e8d9f7; }
.steps li span { width: 24px; height: 24px; display: grid; place-items: center; font-size: .8rem; border: 1px solid #e5d4ff66; border-radius: 50%; }
.steps li[aria-current] { color: #fff; font-weight: 680; }
.steps li[aria-current] span { background: #eadcff; color: #361758; border-color: #eadcff; }
.bank-options { display: grid; gap: 9px; }
.bank-choice { width: 100%; min-height: 55px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; padding-left: 13px; }
.bank-choice .icon { color: var(--accent); }
.instructions { margin: 0; padding: 0 0 0 24px; display: grid; gap: 10px; color: var(--ink); line-height: 1.45; font-size: .94rem; }
.instructions li { padding-left: 3px; }
.instructions li::marker { color: var(--accent); font-weight: 700; }
.entry .footnote { font-size: .85rem; line-height: 1.48; color: var(--muted); }

.application-main { width: min(100%, 570px); margin: auto; padding: 25px 14px 36px; }
.application-card { display: grid; gap: 17px; padding: clamp(19px, 5vw, 33px); border-radius: 20px; }
.application-card h1 { font-size: clamp(1.65rem, 4.5vw, 2.2rem); line-height: 1.1; letter-spacing: -.045em; }
.application-card h1 + p { margin-top: 7px; }
.application-card p { line-height: 1.45; }
.application-card .form { gap: 12px; margin-top: 2px; }
.application-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #241b2f; border: 1px solid #332841; border-radius: 11px; }
.application-tabs button { min-height: 42px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); font-weight: 650; }
.application-tabs button[aria-pressed="true"] { background: #37244f; border-color: #53346f; color: var(--accent); box-shadow: 0 1px 3px #0c051d40; }
.application-tabs button[aria-pressed="false"]:hover { background: #281f33; }
.consent { color: var(--muted); font-size: .865rem; line-height: 1.45; }
.consent summary { cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.consent p { margin-top: 7px; }

.colleague-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), 1fr)); gap: 10px; list-style: none; padding: 3px 17px 17px; margin: 0; }
.date-range { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; padding: 0 17px 13px; }
.team-panel > .date-range { padding-top: 13px; }
.content > .date-range { padding-inline: 0; }
.date-range-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.date-range-buttons .button { min-height: 40px; padding: 7px 12px; font-size: .875rem; white-space: nowrap; }
.date-range-buttons .icon { width: 16px; height: 16px; }
.date-range-buttons :is([aria-pressed="true"], .selected) { background: #37244f; border-color: #7352a0; color: #eadcff; }
.date-range-summary { color: var(--muted); font-size: .875rem; }
.date-range-summary:empty { display: none; }
.date-calendar { width: min(100%, 340px); margin-inline: auto; }
.date-calendar > p { text-align: center; }
.date-calendar-month { display: grid; align-items: center; grid-template-columns: 38px 1fr 38px; margin-block: 8px 4px; text-align: center; }
.date-calendar-month strong::first-letter { text-transform: uppercase; }
.date-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.date-calendar-days > span { color: var(--muted); padding-block: 6px; font-size: .875rem; }
.date-calendar-day { position: relative; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: var(--surface); }
.date-calendar-day[data-in-range] { background: #302142; }
.date-calendar-day:hover { background: #38284e; }
.date-calendar-day[aria-pressed="true"] { background: #5c3692; border-color: #9872cd; color: #fff; }
.date-calendar-day[aria-current="date"]::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; transform: translateX(-50%); background: var(--accent); border-radius: 50%; }
.manual-dates { border-top: 1px solid var(--line); padding-top: 11px; }
.manual-dates summary { cursor: pointer; color: var(--accent); font-size: .875rem; }
.manual-dates .form { margin-top: 11px; }
.manual-dates input { color-scheme: dark; }
.colleague-card { display: grid; gap: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.colleague-card h2 { font-size: 1rem; }
.colleague-count { display: grid; gap: 4px; }
.colleague-count strong { font-size: 1.7rem; line-height: 1.1; }
.colleague-count span { color: var(--muted); font-size: .87rem; }

.applicant-content { max-width: 1250px; }
.applicant-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .46fr); align-items: start; gap: 15px; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.profile-tabs .button[aria-pressed="true"] { color: #eadcff; background: #37244f; border-color: #53346f; }
.applicant-profile-fields { padding: 13px 20px 20px; }
.applicant-bank-step { display: grid; gap: 14px; padding-top: 5px; }
.applicant-bank-step :is(h2, p) { margin: 0; }
.applicant-bank-step .bank-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.applicant-bank-instructions { display: grid; gap: 12px; line-height: 1.5; }
.applicant-bank-instructions h2 { text-align: center; font-weight: 750; }
.applicant-profile-fields > .details, .applicant-statistics .details { gap: 0; }
:is(.applicant-profile-fields, .applicant-statistics) .details > div { display: grid; grid-template-columns: minmax(120px, .6fr) minmax(0, 1fr); align-items: baseline; gap: 10px; padding-block: 11px; border-bottom: 1px solid var(--line); }
:is(.applicant-profile-fields, .applicant-statistics) .details > div:last-child { border-bottom: 0; }
.applicant-statistics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.applicant-statistics .details dd { text-align: right; }
.applicant-earnings { position: relative; isolation: isolate; overflow: hidden; margin-bottom: 14px; padding: 25px 28px; border: 1px solid #774add; border-radius: 19px; background: linear-gradient(112deg, #462183, #6838c0 68%, #7439dc); color: #fff; }
.applicant-earnings::after { inset-inline-start: 27%; background-size: 126px 126px; opacity: .3; }
.applicant-earnings p { font-size: 1rem; font-weight: 670; }
.applicant-earnings strong { display: block; padding-top: 6px; font-size: clamp(2.5rem, 6vw, 4.1rem); line-height: 1.08; letter-spacing: -.06em; overflow-wrap: anywhere; }
.applicant-earnings div span { display: block; padding-top: 9px; color: #efe2ff; font-size: .9rem; }
.balance-card { margin-bottom: 0; padding: 19px 20px 20px; }
.balance-card strong { font-size: clamp(2rem, 4vw, 3rem); }
.button.withdraw-action { min-height: 49px; padding-inline: 16px; margin-top: 15px; font-size: 1.48rem; font-weight: 740; color: #a4fac0; background: #1b2525; border-color: #82dba792; }
.button.withdraw-action:hover { color: #ccffdc; background: #263a2e; }
.applicant-stats .stat-card { min-height: 110px; }
.updated-stamp { margin-top: 12px; }

dialog { width: min(100% - 26px, 530px); max-height: min(92svh, 820px); margin: auto; border: 1px solid var(--line); border-radius: 19px; padding: 0; box-shadow: 0 20px 75px #0c051d82; color: var(--ink); background: var(--panel); }
dialog::backdrop { background: #10081a9e; }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 13px; padding: 18px 18px 10px 22px; }
.sheet-head h2 { margin-top: 5px; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.sheet-body { display: grid; gap: 17px; padding: 2px 22px 22px; }
.sheet-body hr { width: 100%; margin: 0; border: 0; height: 1px; background: var(--line); }
.toast { position: fixed; z-index: 4; right: 20px; bottom: 18px; max-width: min(360px, 100% - 28px); padding: 11px 14px; border-radius: 10px; background: #4d2884; color: #fff; font-size: .9rem; line-height: 1.45; box-shadow: 0 8px 24px #130b23a0; }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 181px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .navigation button:has(.bank-request-count:not([hidden])) { gap: 5px; padding-inline: 6px; font-size: .85rem; }
  .navigation button:has(.bank-request-count:not([hidden])) .icon { width: 16px; height: 16px; }
  .topbar { padding-inline: 22px; }
  .content { padding-inline: 22px; }
  .insights { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

@media (max-width: 850px) {
  .shell { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); height: auto; gap: 10px 12px; padding: 10px 16px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar > .brand { margin: 0; }
  .account-footer { justify-self: end; margin: 0; padding: 0; border: 0; grid-row: 1; grid-column: 2; }
  .account-footer .who { max-width: 145px; }
  .navigation { display: flex; flex-wrap: wrap; gap: 5px; grid-column: 1 / -1; }
  .navigation button { min-height: 35px; padding: 6px 8px; gap: 5px; font-size: .86rem; }
  .navigation .icon { width: 16px; height: 16px; }
  .topbar { padding-inline: 16px; min-height: 50px; }
  .content { padding: 20px 16px 30px; }
  .entry-bar { padding-inline: 16px; }
}

@media (max-width: 630px) {
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; }
  .page-heading p { margin-top: 5px; }
  .referral-card { padding: 16px; margin-bottom: 10px; }
  .referral-card::after { opacity: .2; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
  .stat-card { padding: 11px; min-height: 110px; }
  .stat-head { gap: 3px; }
  .stat-icon { width: 27px; height: 27px; }
  .stat-value { font-size: 1.5rem; }
  .stat-hint { font-size: .77rem; }
  .insights, .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
  .panel + .insights { margin-top: 10px; }
  .chart { margin-right: 15px; margin-left: 12px; }
  .panel-header, .filters, .table-footer { padding-inline: 12px; }
  .filters > select { max-width: 100%; flex: 1 1 auto; }
  .today { display: none; }
  .entry-inner { grid-template-columns: minmax(0, 1fr); padding: 16px 12px; margin: 0 auto; }
  .entry-aside { min-height: 0; padding: 16px; gap: 13px; }
  .entry-aside h2 { max-width: none; font-size: 1.4rem; }
  .entry-aside p { max-width: none; margin-top: 5px; font-size: .9rem; }
  .entry-aside > img { display: none; }
  .steps { display: flex; flex-wrap: wrap; gap: 7px 10px; }
  .steps li { font-size: .78rem; gap: 5px; }
  .steps li span { width: 20px; height: 20px; }
  .entry-card { gap: 14px; }
  .entry-bar { flex-wrap: wrap; }
  .entry-bar .topbar-right { margin-left: auto; }
  .demo-controls select { max-width: 12rem; }
  .entry-bar .button.small { padding-inline: 7px; }
  .applicant-profile-grid, .applicant-statistics-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .applicant-profile-fields { padding-inline: 13px; }
  .profile-tabs { padding-inline: 12px; }
  .profile-tabs .button { padding-inline: 9px; }
  .applicant-shell .topbar { flex-wrap: wrap; }
  .applicant-shell .topbar-right { margin-left: auto; }
  .applicant-earnings { padding: 18px 16px; }
  .applicant-earnings::after { opacity: .24; }
  .colleague-grid { padding-inline: 12px; }
  .date-range { padding-inline: 12px; }
  input.control, textarea, .form select { font-size: 1rem; }
}

@media (max-width: 385px) {
  .entry-bar .brand img { width: 34px; height: 34px; }
  .account-footer .avatar { display: none; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .stat-head .stat-icon { width: 20px; height: 25px; background: none; }
}
