:root {
  color-scheme: light;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #201a32;
  background: #f8f8fc;
  font-synthesis: none;
  --ink: #201a32;
  --muted: #686278;
  --line: #e9e6ef;
  --violet: #6444d5;
  --violet-dark: #5032b8;
  --wash: #f0eafd;
  --paper: #fff;
  --green: #187451;
  --amber: #925409;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #9c83ff; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
h1, h2, h3, p { margin: 0; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; background: white;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 23px 17px 16px;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 0 7px; margin-bottom: 27px; }
.mark {
  display: grid; place-content: center; width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(145deg,#8061ee,#5231c4); color: white; font-size: 23px; font-weight: 700;
  box-shadow: 0 5px 12px #6444d53a;
}
.brand strong { display: block; font-size: 20px; line-height: 1; letter-spacing: -.055em; }
.brand small { color: var(--muted); font-size: 11px; display: block; margin-top: 4px; }
.scope {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px; margin-bottom: 22px; font-size: 12px; line-height: 1.45;
}
.scope strong { display: block; font-size: 12px; }
.scope small, .profile small { color: var(--muted); }
.scope-symbol { background: #eae4fb; color: #5334b4; }
.initials {
  display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px;
  border-radius: 9px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
}
.nav-label { padding: 0 10px; color: #756f84; text-transform: uppercase; font-size: 9px; font-weight: 750; letter-spacing: .12em; margin: 2px 0 8px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px; margin-bottom: 3px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #534c65; }
.nav a:hover, .quiet:hover { background: #f6f2ff; }
.nav a[aria-current] { background: #ede7fc; color: #5233ba; font-weight: 700; }
.icon { width: 17px; height: 17px; flex: 0 0 auto; vertical-align: middle; }
.nav-divider { margin: 16px 0; border-top: 1px solid var(--line); }
.sidebar-footer { margin-top: auto; position: relative; padding-top: 15px; }
.profile { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 4px; border: 0; background: transparent; border-radius: 8px; }
.profile > span:nth-child(2) { flex: 1; }
.profile strong, .profile small { display: block; line-height: 1.5; font-size: 11px; }
.profile .initials { background: #e8d9fc; color: #553887; border-radius: 50%; width: 33px; height: 33px; }
.profile-menu { position: absolute; bottom: 66px; left: 0; right: 0; z-index: 3; display: grid; gap: 3px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 35px #24154213; }
.topbar { height: 61px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 30px; }
.crumbs, .row, .top-actions { display: flex; align-items: center; gap: 9px; }
.crumbs { font-size: 12px; color: var(--muted); min-width: 0; }
.crumbs > :last-child { color: var(--ink); font-weight: 650; }
.crumbs a:hover { color: var(--violet); }
.crumbs .icon { width: 12px; }
.demo { display: inline-flex; align-items: center; gap: 6px; background: #f3eefb; color: #634998; border-radius: 20px; padding: 5px 9px; white-space: nowrap; font-size: 10px; font-weight: 650; }
.demo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8a62dc; }
.main { padding: 25px 30px 34px; max-width: 1570px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 19px; }
.page-head h1 { font-size: clamp(27px, 3vw, 34px); line-height: 1.08; letter-spacing: -.052em; }
.page-head p, .sub { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; white-space: nowrap; border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--ink); padding: 9px 12px; font-size: 12px; font-weight: 650; min-height: 35px; }
.btn:hover { border-color: #bfb0e7; background: #faf8ff; }
.btn.primary { color: white; background: var(--violet); border-color: var(--violet); box-shadow: 0 3px 6px #6444d523; }
.btn.primary:hover { background: var(--violet-dark); }
.btn .icon { width: 14px; height: 14px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--violet-dark); }
.btn.quiet:hover { background: var(--wash); }
.btn.light { color: #332266; border-color: #e4dafb; background: #f8f4ff; }
.hero {
  position: relative; overflow: hidden; isolation: isolate; min-height: 160px;
  border-radius: 15px; color: #fff; padding: 20px 24px; margin-bottom: 14px;
  background: radial-gradient(ellipse at 77% 105%,#784de1 0%,transparent 58%), linear-gradient(111deg,#241643 0%,#39236f 56%,#513299 100%);
}
.hero-content { position: relative; z-index: 1; display: grid; width: fit-content; gap: 8px; }
.hero-label { color: #e0d3ff; font-size: 11px; font-weight: 600; }
.hero strong { font-size: clamp(31px, 4.2vw, 49px); line-height: 1; font-weight: 680; letter-spacing: -.055em; }
.hero-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 10.5px; color: #e7dbff; }
.spark { border: 1px solid #e5d7ff43; background: #ffffff15; border-radius: 20px; padding: 4px 7px; color: #f0e6ff; font-size: 10px; font-weight: 650; }
.hero .btn { min-height: 28px; padding: 4px 9px; font-size: 10.5px; }
.hero-art { position: absolute; inset: 0 0 0 43%; pointer-events: none; }
.hero-art::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(90deg,#e6dcff 1px,transparent 1px),linear-gradient(#e6dcff 1px,transparent 1px); background-size: 29px 29px; transform: skewX(-20deg); mask-image: linear-gradient(to right,transparent,#000); }
.ribbon { position: absolute; height: 270px; width: 320px; right: 12%; bottom: -172px; border: 1px solid #ddc6ff6b; border-radius: 57px; transform: rotate(-28deg) skewX(12deg); background: linear-gradient(100deg,#9a6bff00,#d7b5ff34); box-shadow: 0 0 30px #c69afd18; }
.ribbon:nth-child(2) { bottom: -144px; right: 9%; }
.ribbon:nth-child(3) { bottom: -116px; right: 6%; }
.ribbon:nth-child(4) { bottom: -88px; right: 3%; }
.ribbon:nth-child(5) { bottom: -60px; right: 0; }
.kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.stacked-card { margin-top: 14px; }
.metric { text-align: left; min-width: 0; padding: 13px; color: inherit; width: 100%; }
.metric:hover { border-color: #cabeef; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.metric-top .row { gap: 7px; }
.metric-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; background: #eee8ff; color: #6240c7; }
.metric-icon .icon { width: 13px; height: 13px; }
.metric-icon.green { color: #137658; background: #e5f7ee; }
.metric-icon.peach { color: #9b510c; background: #fff0df; }
.metric strong { display: block; font-size: clamp(21px, 2.7vw, 29px); letter-spacing: -.055em; margin: 6px 0 2px; line-height: 1; }
.metric small { color: var(--muted); font-size: 10.5px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(228px, 1fr); gap: 15px; align-items: start; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 14px 15px 11px; }
.card-head h2, .form h2 { font-size: 16px; letter-spacing: -.03em; }
.card-head p { font-size: 11px; margin-top: 3px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 15px 11px; }
.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 0 9px; border-radius: 7px; color: var(--muted); min-width: 0; min-height: 32px; background: white; }
.search input { min-width: 0; width: 167px; border: 0; background: transparent; padding: 5px 0; font-size: 11.5px; color: var(--ink); outline: none; }
.search:focus-within { outline: 2px solid #a084ef; }
.search .icon { width: 13px; height: 13px; }
.filters select, .date-filter { border: 1px solid var(--line); color: #4f4760; background: white; border-radius: 7px; font-size: 11.5px; padding: 6px 8px; }
.table-wrap { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11.5px; }
th { white-space: nowrap; background: #f9f8fc; color: #615a70; font-weight: 650; padding: 9px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid #f0eef4; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 15px; }
tr:last-child td { border-bottom: 0; }
.table-wrap a:not(.btn):hover { color: var(--violet); text-decoration: underline; }
td strong { display: block; font-size: 12px; }
.cell-sub { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.table-icon { width: 27px; height: 27px; font-size: 9px; background: #ece4ff; color: #5d3fb8; }
.table-icon.teal { background: #e5f5f2; color: #087462; }
.table-icon.blush { background: #fceaf3; color: #8d3b66; }
.status { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-size: 9.5px; padding: 4px 7px; border-radius: 20px; background: #efedf3; color: #5c5569; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.active, .status.confirmed { background: #e8f6ee; color: #167148; }
.status.pending, .status.setup { background: #fff2dc; color: #875105; }
.status.suspended { background: #fdedf0; color: #963854; }
.open-link { color: var(--violet-dark); font-weight: 650; }
.card-foot { border-top: 1px solid var(--line); padding: 8px 15px; font-size: 10.5px; color: var(--muted); }
.queue { padding: 0 15px; }
.queue-item { display: flex; gap: 9px; align-items: center; padding: 10px 0; border-top: 1px solid #efedf4; font-size: 11.5px; }
.queue-item > span:nth-child(2) { flex: 1; }
.queue-item strong { font-size: 11.5px; display: block; }
.queue-item:hover strong { color: var(--violet-dark); }
.queue-item .icon { width: 13px; height: 13px; }
.queue-caption { white-space: nowrap; color: var(--muted); font-size: 10px; }
.queue-link { display: block; color: var(--violet-dark); border-top: 1px solid var(--line); padding: 11px 15px; font-weight: 650; font-size: 11px; }
.tabs { display: flex; gap: 13px; overflow: auto; border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.tabs a { font-size: 12px; white-space: nowrap; padding: 11px 3px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--violet-dark); border-color: var(--violet); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: minmax(0,660px) minmax(190px,250px); gap: 16px; align-items: start; }
.form, .note { padding: 19px; }
.form section + section { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.field { display: grid; align-content: start; gap: 5px; font-size: 12px; font-weight: 600; }
.field input, .field select { width: 100%; min-height: 38px; border: 1px solid #ded9e9; background: white; color: var(--ink); padding: 7px 9px; border-radius: 7px; min-width: 0; }
.field [aria-invalid] { border-color: #b63355; }
.field-error { color: #a32647; font-size: 11px; font-weight: 550; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.checks label { display: flex; align-items: center; gap: 5px; font-size: 12px; }
input[type=checkbox] { accent-color: var(--violet); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 13px; }
.note h2 { font-size: 14px; }
.note ol { padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 9px 0 0; }
.empty { white-space: normal; text-align: center; padding: 29px; color: var(--muted); }
.empty .btn { margin-top: 10px; }
.toast { position: fixed; z-index: 5; right: 18px; bottom: 18px; padding: 12px 16px; background: #281b42; color: #fff; border-radius: 9px; box-shadow: 0 10px 24px #2c184539; font-size: 12px; }
.toast:empty { display: none; }
.mobile-nav { display: none; }
.auth-screen { min-height: 100dvh; display: grid; grid-template-columns: minmax(315px, .85fr) minmax(0,1fr); background: white; }
.auth-story { min-height: 100%; position: relative; isolation: isolate; overflow: hidden; color: white; background: radial-gradient(at 105% 88%, #7550da 0%, transparent 45%), linear-gradient(150deg,#261742,#483089 80%); display: flex; flex-direction: column; justify-content: space-between; padding: 36px clamp(27px,4.6vw,62px); }
.auth-story-brand .brand { padding: 0; margin: 0; width: fit-content; }
.auth-story-brand .brand small { color: #ece0ff; }
.auth-story-brand .mark { box-shadow: none; }
.auth-story-copy { position: relative; z-index: 1; max-width: 375px; margin: 38px 0; }
.auth-story-copy span, .auth-story-foot { font-size: 11px; color: #e0d2ff; letter-spacing: .08em; }
.auth-story-copy h2 { margin: 9px 0; font-size: clamp(34px,4.2vw,59px); line-height: 1.04; letter-spacing: -.059em; }
.auth-story-copy p { font-size: 14px; color: #e0d4f6; line-height: 1.55; }
.auth-art { position: absolute; bottom: -145px; right: -120px; width: 360px; height: 360px; transform: rotate(-20deg); pointer-events: none; }
.auth-art i { position: absolute; inset: 0; border-radius: 58px; border: 1px solid #e2cafd6e; background: linear-gradient(132deg,#d5b3ff3d,#b78bff00); }
.auth-art i:nth-child(2) { inset: -25px 15px 25px -15px; }
.auth-art i:nth-child(3) { inset: -50px 30px 50px -30px; }
.auth-main { display: grid; place-items: center; padding: 38px clamp(21px,5.5vw,75px); }
.auth-main-inner { width: min(100%,462px); min-width: 0; }
.auth-main h1 { margin-top: 10px; font-size: clamp(27px,3.1vw,39px); line-height: 1.13; letter-spacing: -.055em; }
.auth-main h1 + p { margin: 8px 0 17px; overflow-wrap: anywhere; }
.auth-mobile-brand { display: none; }
.auth-form .fields { display: grid; grid-template-columns: 1fr; gap: 10px; }
.auth-form .field-error, .auth-form .auth-actions { margin-top: 10px; }
.auth-form .field-error:empty { display: none; }
.auth-actions, .auth-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.auth-links { margin-top: 10px; }
.auth-hint { display: block; font-size: 11px; margin: 8px 0 0; color: var(--muted); line-height: 1.4; }
.auth-password { position: relative; }
.auth-password input { padding-right: 63px; }
.auth-password .btn { position: absolute; right: 3px; bottom: 2px; padding: 4px 7px; min-height: 32px; font-size: 11px; }
.auth-notice, .auth-scope { margin: 12px 0; padding: 10px 12px; background: #f4edff; border: 1px solid #e7dbfa; border-radius: 8px; color: #513888; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.auth-scope strong, .auth-scope span { display: block; }
.auth-inbox { display: grid; gap: 7px; margin: 12px 0; }
.auth-inbox a { position: relative; display: block; padding: 9px 30px 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.auth-inbox a:hover { background: #faf6ff; }
.auth-inbox strong { font-size: 12px; }
.auth-inbox small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.auth-inbox .icon { position: absolute; right: 9px; top: 40%; }
@media (max-width: 670px) {
  .auth-screen { display: block; }
  .auth-story { display: none; }
  .auth-mobile-brand { display: block; margin-bottom: 12px; }
  .auth-mobile-brand .brand { padding: 0; margin: 0; width: fit-content; }
  .auth-main { padding: 22px 16px; }
}
@media (max-width: 1110px) {
  .shell { grid-template-columns: 192px minmax(0,1fr); }
  .main, .topbar { padding-inline: 19px; }
  .sidebar { padding-inline: 12px; }
  .workspace-grid { grid-template-columns: minmax(0,2fr) minmax(196px,1fr); }
  .queue-caption { display: none; }
}
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0,1fr); }
  .queue-caption { display: inline; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .shell { display: block; }
  .sidebar { display: none; position: fixed; z-index: 4; width: min(76vw,250px); box-shadow: 100vw 0 0 100vw #1c123c45; }
  .sidebar.shown { display: flex; }
  .mobile-nav { display: inline-flex; }
  .topbar { height: auto; min-height: 51px; flex-wrap: wrap; padding-block: 6px; }
  .topbar, .main { padding-inline: 13px; }
  .main { padding-top: 18px; }
  .hero { padding: 16px; min-height: 140px; }
  .hero-art { opacity: .5; }
  .page-head { align-items: start; }
  .kpis { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .metric { padding: 8px; }
  .metric-icon { display: none; }
  .metric strong { font-size: 20px; }
  .metric small { font-size: 9px; }
  .top-actions .demo { display: none; }
  .topbar > .row, .top-actions, .top-actions > div { min-width: 0; max-width: 100%; }
  .top-actions select, .filters select { max-width: 100%; }
  .crumbs { flex-wrap: wrap; overflow-wrap: anywhere; }
  .crumbs > * { min-width: 0; }
  .card-head { flex-wrap: wrap; overflow-wrap: anywhere; }
  .search { max-width: 100%; }
  .metric strong, .metric small, .page-head h1 { overflow-wrap: anywhere; }
}
@media (max-width: 390px) {
  .page-head { flex-direction: column; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .metric { transition: background-color .15s,border-color .15s; }
}
.finance-picker { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.finance-picker span { font-weight: 650; }
.finance-picker select { max-width: min(40vw,240px); }
.finance-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.finance-stack { display: grid; gap: 14px; }
.finance-back { margin: -4px 0 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.finance-back .sub { margin: 0; }
.finance-details { margin: 0; padding: 2px 15px 12px; }
.finance-details > div { display: grid; grid-template-columns: minmax(98px, .9fr) minmax(0,1.1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #f0eef4; font-size: 12px; }
.finance-details dt { color: var(--muted); }
.finance-details dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.finance-footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); }
.inner-tabs { padding: 0 15px; }
.inner-tabs .tabs { margin-bottom: 11px; }
.inner-tabs .tabs a { padding-top: 5px; }
.finance-notice { margin: 0 15px 12px; padding: 10px 12px; border-radius: 8px; color: #795013; background: #fff6e6; font-size: 12px; line-height: 1.5; }
.demo-proof { display: flex; align-items: center; gap: 9px; margin: 0 15px 14px; padding: 10px; border-radius: 8px; background: #f6f1ff; color: #4b367a; }
.demo-proof > span { flex: 1; font-size: 11.5px; }
.demo-proof small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.finance-money { font-weight: 700; }
.finance-money.inflow { color: var(--green); }
.finance-money.outflow { color: #8d3b57; }
.status.credited, .status.verified { background: #e8f6ee; color: #167148; }
.status.needs, .status.awaiting, .status.motor { background: #fff2dc; color: #875105; }
.status.rejected, .status.duplicate, .status.amount { background: #fdedf0; color: #963854; }
.finance-dialog { width: min(calc(100% - 28px), 460px); padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); box-shadow: 0 14px 55px #24154235; }
.finance-dialog::backdrop { background: #24154266; }
.finance-dialog .finance-details { padding: 13px 0 0; }
.finance-dialog .form-actions { margin-top: 12px; }
.finance-dialog textarea { font: inherit; border: 1px solid #ded9e9; border-radius: 7px; padding: 8px; resize: vertical; }
.finance-reason { margin-top: 13px; }
.settlement-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.settlement-head .actions { align-items: end; justify-content: flex-end; }
.settlement-filters { align-items: center; }
.settlement-filters .field-error { flex-basis: 100%; }
.settlement-filters .field-error:empty { display: none; }
.settlement-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; list-style: none; padding: 10px 15px 16px; margin: 0; }
.settlement-steps li { position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 11px; color: var(--muted); isolation: isolate; }
.settlement-steps li:not(:last-child)::after { content: ""; width: 100%; height: 1px; position: absolute; top: 13px; left: 50%; background: #ded8eb; z-index: -1; }
.settlement-steps li.done::after { background: #a995e8; }
.settlement-steps li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f2eff7; border: 1px solid #e6e0ef; color: #5e566e; font-weight: 700; }
.settlement-steps li.done span { background: #e9e1fb; border-color: #e9e1fb; color: var(--violet-dark); }
.settlement-steps li.current { color: var(--violet-dark); font-weight: 700; }
.settlement-steps li.current span { color: white; background: var(--violet); border-color: var(--violet); }
.settlement-invoice { margin: 0 15px 13px; font-size: 11px; color: var(--muted); }
.settlement-transfer-fields { display: grid; gap: 9px; margin-top: 10px; }
.settlement-form-error { margin-top: 7px; }
.status.paid, .status.settled, .status.finalized { background: #e8f6ee; color: #167148; }
.status.held, .status.payment, .status.month { background: #fff2dc; color: #875105; }
.status.failed, .status.mismatch, .status.review { background: #fdedf0; color: #963854; }
.ops-step > .status { margin: 8px 0 5px; }
.ops-step small { display: block; }
.status.issued, .status.ready, .status.posted, .status.resolved { background: #e8f6ee; color: #167148; }
.status.waiting, .status.reserved, .status.requote { background: #fff2dc; color: #875105; }
.ops-timeline { list-style: none; margin: 0 15px 12px; padding: 0 0 0 14px; border-left: 1px solid #e2daef; }
.ops-timeline li { position: relative; padding: 9px 0; font-size: 12px; }
.ops-timeline li::before { content: ""; position: absolute; top: 13px; left: -18px; width: 7px; height: 7px; border-radius: 100%; background: #7e5bdd; }
.ops-timeline li span { color: var(--muted); margin-left: 7px; font-size: 10px; }
.ops-timeline li p, .ops-copy p { color: var(--muted); line-height: 1.5; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-copy { font-size: 12px; padding: 11px 15px 16px; border-top: 1px solid var(--line); }
.ops-field-stack { display: grid; gap: 9px; margin-top: 11px; }
.ops-ticket-form { max-width: 720px; }
.ops-ticket-form textarea { font: inherit; border: 1px solid #ded9e9; border-radius: 7px; padding: 8px; resize: vertical; }
.ops-ticket-form small { color: var(--muted); font-weight: 400; }
.ops-ticket-form .field-error:empty { display: none; }
.help-launcher { min-height: 30px; padding: 5px 7px; }
.help-panel { position: fixed; top: 55px; right: 24px; z-index: 6; width: min(384px,calc(100vw - 24px)); max-height: calc(100dvh - 70px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 60px #26164536; }
.help-title { display: flex; align-items: start; justify-content: space-between; padding: 15px; color: white; background: linear-gradient(115deg,#312054,#6b47cf); }
.help-title h2 { font-size: 19px; letter-spacing: -.035em; }
.help-title p { margin-top: 3px; color: #eee6ff; font-size: 11px; }
.help-title .btn { color: white; min-height: 28px; padding: 4px 8px; }
.help-title .btn:hover { background: #ffffff24; }
.help-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 13px; gap: 12px; }
.help-tabs button { color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 3px; font-size: 12px; }
.help-tabs button[aria-pressed=true] { color: var(--violet-dark); font-weight: 700; border-color: var(--violet); }
.help-body { padding: 13px; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.help-body .search input { width: 100%; }
.help-footer { border-top: 1px solid var(--line); padding: 4px 9px; }
.help-group { margin-top: 13px; }
.help-group h3 { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.help-group button { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 7px 4px; text-align: left; background: white; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12px; }
.help-group button:hover { color: var(--violet-dark); background: #f8f5ff; }
.help-group .icon { width: 13px; height: 13px; }
.help-article { padding: 10px 5px; }
.help-article h3 { font-size: 15px; }
.help-article p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 8px; }
.chat-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.chat-messages { padding: 9px 13px; display: grid; gap: 8px; max-height: 230px; overflow: auto; }
.help-panel .chat-messages { padding-inline: 0; }
.chat-bubble { background: #f1ebfc; color: var(--ink); border-radius: 9px; padding: 7px 10px; max-width: 88%; justify-self: end; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12px; line-height: 1.45; }
.chat-bubble.agent { justify-self: start; background: #ebf5f0; }
.chat-bubble small { color: var(--muted); font-size: 10px; }
.chat-compose { display: grid; gap: 5px; }
.inbox-compose { padding: 10px 15px 15px; }
.chat-compose textarea { font: inherit; width: 100%; border: 1px solid #ded9e9; border-radius: 7px; padding: 7px; resize: vertical; }
.chat-compose small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.chat-compose .btn { justify-self: start; }
.chat-snippet { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 690px) { .help-panel { right: 12px; top: 49px; } .help-launcher { font-size: 11px; } }
.desk-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; padding: 10px 13px; }
.desk-agents, .desk-agent-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.desk-agent { display: flex; align-items: center; gap: 7px; padding: 5px 7px; min-width: 107px; border-radius: 8px; border: 1px solid transparent; }
.desk-acting { background: #f6f1ff; border-color: #e8ddfa; }
.desk-agent strong, .desk-agent small { display: block; line-height: 1.35; }
.desk-agent strong { font-size: 11px; }
.desk-agent small { color: var(--muted); font-size: 10px; }
.desk-layout { display: grid; grid-template-columns: minmax(225px, 1fr) minmax(290px, 1.8fr) minmax(235px, 1.07fr); gap: 12px; align-items: start; }
.desk-queue { min-width: 0; overflow: hidden; }
.desk-queues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 0 11px 8px; }
.desk-queues button, .desk-compose-tabs button { border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: white; font-size: 11px; padding: 6px 7px; text-align: left; }
.desk-queues button { display: flex; gap: 4px; align-items: center; justify-content: space-between; }
.desk-queues button[aria-pressed=true], .desk-compose-tabs button[aria-pressed=true] { color: var(--violet-dark); background: #f1ebfc; border-color: #e6d9fa; font-weight: 700; }
.desk-queues button span { padding: 2px 4px; background: #ece6f5; border-radius: 9px; }
.desk-filters { display: grid; gap: 6px; padding: 0 11px 10px; }
.desk-filters .search input { width: 100%; }
.desk-filters .btn { justify-self: start; min-height: 28px; padding-block: 4px; }
.desk-filters .row { gap: 5px; }
.desk-filters .row select { flex: 1; min-width: 0; }
.desk-queue-list { max-height: 450px; overflow: auto; border-top: 1px solid var(--line); }
.desk-queue-row { display: block; padding: 9px 11px; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); }
.desk-queue-row:hover, .desk-queue-row.selected { background: #f7f3ff; }
.desk-queue-row.selected { border-left-color: var(--violet); }
.desk-queue-row > div { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.desk-queue-row > div:first-child { justify-content: space-between; }
.desk-queue-row strong { font-size: 12px; }
.desk-queue-row > div:first-child span, .desk-queue-row small { font-size: 10px; color: var(--muted); }
.desk-queue-row p { font-size: 11px; line-height: 1.35; margin: 3px 0 2px; overflow-wrap: anywhere; }
.desk-queue-row > div:last-child { margin-top: 5px; }
.desk-thread { min-width: 0; overflow: hidden; }
.desk-thread-top { border-bottom: 1px solid var(--line); }
.desk-thread-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 10px; }
.desk-thread-actions:empty { display: none; }
.desk-thread-actions .btn { min-height: 28px; padding: 5px 7px; }
.desk-thread .chat-messages { max-height: 355px; min-height: 155px; align-content: start; background: #fbfaff; padding: 14px; }
.chat-bubble.ai { justify-self: start; background: #f0eafa; outline: 1px solid #e5d8f7; }
.chat-bubble.internal { justify-self: start; background: #fff4dc; }
.chat-source.btn { min-height: 23px; padding: 1px 0; font-size: 10px; }
.desk-compose { padding: 10px 13px 13px; border-top: 1px solid var(--line); }
.desk-compose-tabs { display: flex; gap: 4px; margin-bottom: 7px; }
.desk-compose .field-error:empty, .help-panel .field-error:empty { display: none; }
.desk-context { display: grid; gap: 10px; min-width: 0; }
.desk-context .finance-details { padding-bottom: 5px; }
.desk-context .finance-details > div { font-size: 11px; grid-template-columns: minmax(65px,.8fr) minmax(0,1.2fr); padding: 6px 0; }
.desk-context .finance-footer { padding: 8px 11px; gap: 5px; }
.desk-context .btn { white-space: normal; min-height: 29px; padding: 5px 7px; font-size: 11px; }
.desk-card-links { display: grid; justify-items: start; gap: 2px; padding: 3px 11px 7px; }
.desk-card-links small { color: var(--muted); font-size: 10px; }
.desk-ai { margin: 0 11px 10px; padding: 8px 9px; border-radius: 7px; background: #f5efff; color: #493877; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.help-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; font-size: 11px; color: var(--muted); }
.help-history { display: grid; gap: 6px; margin-bottom: 9px; }
.help-history button { padding: 7px; text-align: left; background: #f8f5ff; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--ink); }
.help-history button small { display: block; color: var(--muted); margin-top: 3px; }
.status.queued, .status.transfer, .status.high { background: #fff2dc; color: #875105; }
.status.assigned, .status.fix { background: #e8f6ee; color: #167148; }
.status.escalated, .status.urgent { background: #fdedf0; color: #963854; }
.staff-preview-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid #e7d9fb; border-radius: 10px; background: #f2ebff; color: #523587; font-size: 12px; margin-bottom: 14px; }
.staff-preview-banner span { display: block; font-size: 10px; padding-top: 3px; }
.staff-preview-banner .btn { min-height: 29px; }
.staff-permissions { margin-top: 12px; border: 1px solid #e9e0f7; background: #faf7ff; border-radius: 8px; padding: 9px 10px; color: #514267; font-size: 12px; }
.staff-permissions p, .staff-permissions small { display: block; margin-top: 4px; line-height: 1.45; }
.staff-permissions .checks label { font-size: 11px; }
.staff-permission-cell { display: block; max-width: 310px; min-width: 135px; white-space: normal; line-height: 1.45; }
.staff-inline-error { flex-basis: 100%; }
.staff-inline-error:empty { display: none; }
.audit-paging { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.audit-privacy { background: #f6f1ff; color: #614987; }
.status.success { background: #e8f6ee; color: #167148; }
.status.denied, .status.revoked { background: #fdedf0; color: #963854; }
.status.connected, .status.enabled { background: #e8f6ee; color: #167148; }
.status.verification, .status.needs, .status.deal { background: #fff2dc; color: #875105; }
.status.unavailable, .status.paused { background: #fdedf0; color: #963854; }
.product-note { margin-top: 3px; }
.product-history { border-top: 1px solid var(--line); }
.product-history summary { padding: 10px 15px; color: var(--violet-dark); cursor: pointer; font-size: 12px; font-weight: 650; }
.product-history .empty { padding: 8px 15px 14px; font-size: 11px; }
.portal-grant-actions { flex-wrap: wrap; max-width: 310px; }
.portal-grant-actions .btn { min-height: 26px; padding: 4px 6px; }
.portal-scope-list { display: grid; gap: 6px; margin-top: 10px; max-height: 240px; overflow: auto; }
.portal-scope-list label, .portal-delegate { display: flex; align-items: start; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; cursor: pointer; }
.portal-scope-list label:has(input:checked), .portal-delegate:has(input:checked) { border-color: #dfcff8; background: #f8f3ff; }
.portal-scope-list input, .portal-delegate input { accent-color: var(--violet); margin: 2px 0 0; }
.portal-scope-list small, .portal-delegate small { color: var(--muted); display: block; font-size: 11px; margin-top: 3px; }
.portal-delegate { margin-top: 8px; }
.portal-preview-note { margin-inline: 0; }
.recharge-methods { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.recharge-method { display: flex; align-items: start; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.recharge-method:has(input:checked) { background: #f6f0ff; border-color: #d8c4f4; }
.recharge-method input { accent-color: var(--violet); margin: 2px 0 0; }
.recharge-method strong { display:block; color:var(--ink); font-size:12px; }
.recharge-method small { display:block; margin-top:3px; color:var(--muted); font-size:10.5px; line-height:1.35; }
@media (max-width: 670px) { .recharge-methods { grid-template-columns: 1fr; } }
@media (max-width: 1060px) {
  .desk-layout { grid-template-columns: minmax(200px, .8fr) minmax(250px, 1.3fr); }
  .desk-context { grid-column: 2; }
}
@media (max-width: 690px) {
  .desk-layout { grid-template-columns: minmax(0,1fr); }
  .desk-context { grid-column: auto; }
  .desk-queue-list { max-height: 245px; }
  .desk-agent { min-width: 0; }
}
@media (max-width: 850px) {
  .finance-split { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .finance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-kpis .metric:last-child:nth-child(3) { grid-column: span 2; }
}
