:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #eef2ed;
  --surface-strong: #16211b;
  --ink: #17201c;
  --muted: #6c756f;
  --line: #dfe5df;
  --primary: #9ee548;
  --primary-strong: #72bd1b;
  --coral: #f26a3d;
  --blue: #47a9c2;
  --yellow: #f1c453;
  --red: #d74f4f;
  --shadow: 0 16px 45px rgba(23, 32, 28, 0.08);
  --sidebar: 256px;
  --topbar: 82px;
}

[data-theme="dark"],
[data-theme="white-dark"] {
  --bg: #0f1512;
  --surface: #17201c;
  --surface-soft: #202b25;
  --surface-strong: #0b110e;
  --ink: #f5f7f4;
  --muted: #a7b1aa;
  --line: #303a34;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

[data-theme="pink"] {
  --bg: #f9dce9;
  --surface: #fff0f6;
  --surface-soft: #f5c9db;
  --surface-strong: #6f284a;
  --ink: #3b1728;
  --muted: #885b70;
  --line: #e7aec7;
  --primary: #f08ab6;
  --primary-strong: #bd3f78;
  --coral: #de5b8d;
  --shadow: 0 16px 45px rgba(111, 40, 74, 0.14);
}

[data-theme="blue"] {
  --bg: #dcecff;
  --surface: #eef6ff;
  --surface-soft: #c8e1fb;
  --surface-strong: #183f66;
  --ink: #142e48;
  --muted: #557693;
  --line: #a9cdea;
  --primary: #78b7ee;
  --primary-strong: #2f78b7;
  --blue: #2f78b7;
  --shadow: 0 16px 45px rgba(24, 63, 102, 0.14);
}

[data-theme="pink-light"] .sidebar {
  --surface: #fff0f6;
  --surface-soft: #f5c9db;
  --surface-strong: #6f284a;
  --ink: #3b1728;
  --muted: #885b70;
  --line: #e7aec7;
  --primary: #f08ab6;
  --primary-strong: #bd3f78;
  background: #f9dce9;
}

[data-theme="blue-light"] .sidebar {
  --surface: #eef6ff;
  --surface-soft: #c8e1fb;
  --surface-strong: #183f66;
  --ink: #142e48;
  --muted: #557693;
  --line: #a9cdea;
  --primary: #78b7ee;
  --primary-strong: #2f78b7;
  background: #dcecff;
}

[data-theme="dark-light"] .sidebar {
  --surface: #17201c;
  --surface-soft: #202b25;
  --surface-strong: #0b110e;
  --ink: #f5f7f4;
  --muted: #a7b1aa;
  --line: #303a34;
  --primary: #9ee548;
  --primary-strong: #72bd1b;
  background: #0f1512;
  color-scheme: dark;
}

[data-theme="white-dark"] .sidebar {
  --surface: #ffffff;
  --surface-soft: #eef2ed;
  --surface-strong: #16211b;
  --ink: #17201c;
  --muted: #6c756f;
  --line: #dfe5df;
  --primary: #9ee548;
  --primary-strong: #72bd1b;
  background: #ffffff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

body[data-role="customer"] {
  --primary: #8fc5f5;
  --primary-strong: #2f6f9f;
}

html[data-theme="pink"] body[data-role="customer"],
html[data-theme="pink-light"] body[data-role="customer"] {
  --primary: #f08ab6;
  --primary-strong: #bd3f78;
}

html[data-theme="blue"] body,
html[data-theme="blue-light"] body {
  --primary: #78b7ee;
  --primary-strong: #2f78b7;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

:focus-visible {
  outline: 3px solid rgba(114, 189, 27, 0.3);
  outline-offset: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

html[data-theme="dark"] .sidebar-head .brand-mark,
html[data-theme="dark-light"] .sidebar-head .brand-mark {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
}

.payout-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  align-items: center;
  background: var(--surface);
}

.payout-profile-card.required {
  border-color: color-mix(in srgb, var(--primary-strong) 55%, var(--line));
  box-shadow: inset 4px 0 0 var(--primary);
}

.payout-profile-card p,
.payout-profile-card small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
}

@media (max-width: 680px) {
  .payout-profile-card { grid-template-columns: auto 1fr; }
  .payout-profile-card .secondary-btn { grid-column: 1 / -1; width: 100%; }
}

.brand-text {
  display: grid;
  line-height: 1;
}

.brand-text > span {
  letter-spacing: -1.15px;
}

.brand-text small {
  margin-top: 4px;
  color: var(--primary-strong);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-on-dark {
  position: absolute;
  z-index: 2;
  top: 34px;
  left: 42px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--primary);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.08fr) minmax(460px, 0.92fr);
  background: var(--surface);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  align-items: flex-end;
  padding: 58px 6vw 70px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(11, 17, 14, 0.1), rgba(11, 17, 14, 0.92)),
    url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1600&q=85") center/cover;
}

.auth-visual::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 9px;
  content: "";
  background: linear-gradient(90deg, var(--primary) 0 46%, var(--coral) 46% 73%, var(--blue) 73%);
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  width: min(610px, 100%);
}

.auth-visual h1 {
  margin: 12px 0 16px;
  font-size: clamp(46px, 5vw, 74px);
  font-weight: 800;
  line-height: 1;
}

.auth-visual p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
}

.trust-row {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 34px;
}

.trust-row > div:not(.avatar-stack) {
  display: flex;
  flex-direction: column;
}

.trust-row strong {
  font-size: 16px;
}

.trust-row small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.avatar-stack {
  display: flex;
}

.avatar-stack span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-left: -9px;
  place-items: center;
  border: 2px solid #152019;
  border-radius: 50%;
  color: #17201c;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.avatar-stack span:first-child {
  margin-left: 0;
  background: #f6f2e7;
}

.avatar-stack span:last-child {
  background: #78c5d7;
}

.visual-status {
  position: absolute;
  z-index: 2;
  right: 24px;
  top: 32px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(15, 24, 19, 0.7);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
}

.auth-panel {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 52px 7vw;
  place-items: center;
  background: var(--surface);
}

.auth-theme {
  position: absolute;
  top: 28px;
  right: 28px;
}

.auth-box {
  width: min(100%, 490px);
}

.mobile-brand {
  display: none;
  margin-bottom: 34px;
}

.auth-box h2 {
  margin: 8px 0 5px;
  font-size: 31px;
  line-height: 1.15;
}

.auth-copy {
  margin: 0 0 25px;
  color: var(--muted);
}

.role-grid {
  display: grid;
  gap: 8px;
}

.role-card {
  position: relative;
  display: grid;
  min-height: 66px;
  padding: 10px 42px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.role-card:hover {
  transform: translateY(-1px);
  border-color: var(--primary-strong);
}

.role-card.active {
  border-color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 11%, var(--surface));
}

.role-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #16211b;
  background: var(--surface-soft);
}

.role-card.active .role-icon {
  background: var(--primary);
}

.role-card strong,
.role-card small {
  display: block;
}

.role-card strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.role-card small {
  color: var(--muted);
  font-size: 11px;
}

.role-check {
  position: absolute;
  right: 14px;
  color: var(--primary-strong);
  opacity: 0;
}

.role-card.active .role-check {
  opacity: 1;
}

.auth-tabs {
  display: grid;
  margin: 23px 0 20px;
  padding: 4px;
  border-radius: 8px;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-soft);
}

.auth-tabs button {
  min-height: 38px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.auth-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(23, 32, 28, 0.08);
}

form > label,
.form-field > label,
.form-grid label {
  display: block;
  margin: 13px 0 6px;
  font-size: 11px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > svg {
  position: absolute;
  left: 14px;
  width: 17px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap input,
.input-wrap select,
.form-field input,
.form-field select,
.form-field textarea,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
}

.input-wrap input {
  padding: 0 46px 0 42px;
}

.input-wrap input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(114, 189, 27, 0.12);
}

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.form-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
}

.check-label {
  display: flex !important;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 11px !important;
  font-weight: 600 !important;
}

.check-label input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--primary-strong);
}

.text-btn {
  padding: 0;
  color: var(--primary-strong);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: #142017;
  background: var(--primary);
}

.secondary-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.danger-btn {
  color: #fff;
  background: var(--red);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  justify-content: space-between;
  padding-inline: 18px;
}

.icon-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  padding: 20px 15px 15px;
  border-right: 1px solid var(--line);
  flex-direction: column;
  background: var(--surface);
}

.sidebar-head {
  display: flex;
  padding: 0 5px 21px;
  justify-content: space-between;
  align-items: center;
}

.sidebar-close,
.menu-toggle {
  display: none;
}

.workspace-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.workspace-switch button {
  display: flex;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.workspace-switch button span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-switch button.active {
  color: #142017;
  background: var(--primary);
}

.workspace-switch svg {
  width: 17px;
  height: 17px;
}

.main-nav {
  display: flex;
  overflow: auto;
  padding: 21px 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  padding: 6px 12px 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 8px;
  gap: 11px;
  align-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-item.active {
  color: var(--ink);
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
}

.nav-item.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 0 2px 2px 0;
  content: "";
  background: var(--primary-strong);
}

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 8px;
  color: #17201c;
  background: var(--primary);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.sidebar-foot {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.profile-card {
  display: grid;
  width: 100%;
  padding: 8px 4px;
  grid-template-columns: 36px 1fr 18px;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.profile-avatar,
.avatar-btn,
.table-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #17201c;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.profile-avatar {
  width: 36px;
  height: 36px;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 11px;
}

.profile-copy small {
  color: var(--muted);
  font-size: 9px;
}

.profile-card > svg {
  width: 15px;
  color: var(--muted);
}

.logout-btn {
  display: flex;
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  padding: 0 10px;
  border-radius: 8px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.logout-btn:hover {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, transparent);
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--topbar);
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  gap: 13px;
  align-items: center;
}

.topbar-kicker {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.global-search {
  position: relative;
  display: flex;
  width: min(300px, 26vw);
  align-items: center;
}

.global-search svg {
  position: absolute;
  left: 13px;
  width: 16px;
  color: var(--muted);
}

.global-search input {
  width: 100%;
  height: 40px;
  padding: 0 58px 0 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
}

.global-search kbd {
  position: absolute;
  right: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  font-family: inherit;
  font-size: 8px;
}

.notification-btn {
  position: relative;
}

.notification-btn span {
  position: absolute;
  right: -4px;
  top: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
  font-size: 8px;
  font-weight: 800;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  margin-left: 2px;
}

.page-content {
  width: min(100%, 1510px);
  margin: 0 auto;
  padding: 28px 32px 44px;
}

.page-stack {
  display: grid;
  gap: 22px;
}

.page-intro,
.section-head,
.toolbar,
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.page-intro h2,
.section-head h2,
.card-head h3 {
  margin: 0;
  line-height: 1.25;
}

.page-intro h2 {
  font-size: 22px;
}

.section-head h2 {
  font-size: 17px;
}

.card-head h3 {
  font-size: 13px;
}

.page-intro p,
.section-head p,
.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 270px;
  overflow: hidden;
  padding: 34px;
  border-radius: 8px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  color: #fff;
  background: var(--surface-strong);
}

.hero-panel::after {
  position: absolute;
  right: 0;
  top: 0;
  width: 43%;
  height: 100%;
  content: "";
  background: var(--hero-image) center/cover;
}

.hero-panel::before {
  position: absolute;
  z-index: 1;
  right: 35%;
  top: 0;
  width: 16%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, var(--surface-strong), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 610px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero-content h2 {
  max-width: 520px;
  margin: 10px 0 12px;
  font-size: 30px;
  line-height: 1.14;
}

.hero-content p {
  max-width: 500px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 12px;
}

.hero-actions,
.table-actions,
.filter-group,
.button-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions .secondary-btn {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card,
.panel,
.service-card,
.list-row,
.message-shell,
.settings-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-card {
  min-width: 0;
  padding: 17px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #17201c;
  background: var(--primary);
}

.stat-icon.coral {
  color: #fff;
  background: var(--coral);
}

.stat-icon.blue {
  color: #102126;
  background: var(--blue);
}

.stat-icon.yellow {
  color: #2b2412;
  background: var(--yellow);
}

.stat-trend {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  color: var(--primary-strong);
  font-size: 9px;
  font-weight: 800;
}

.stat-trend.negative {
  color: var(--red);
}

.stat-value {
  display: block;
  overflow: hidden;
  margin-top: 14px;
  font-size: 23px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-pad {
  padding: 19px;
}

.panel .card-head {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.chart-wrap {
  padding: 17px 19px 12px;
}

.bar-chart {
  display: grid;
  height: 205px;
  padding-top: 10px;
  grid-template-columns: repeat(7, 1fr);
  gap: 11px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 50px, var(--line) 51px);
}

.bar-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.bar-column span {
  width: min(32px, 72%);
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  background: var(--primary);
}

.bar-column:nth-child(3n + 2) span {
  background: var(--blue);
}

.bar-column:nth-child(3n) span {
  background: var(--coral);
}

.bar-column small {
  position: absolute;
  margin-top: 226px;
  color: var(--muted);
  font-size: 9px;
}

.chart-foot {
  display: flex;
  padding: 19px 19px 15px;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.chart-total strong,
.chart-total small {
  display: block;
}

.chart-total strong {
  font-size: 18px;
}

.chart-total small {
  color: var(--muted);
  font-size: 9px;
}

.mini-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.mini-legend span::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 2px;
  content: "";
  background: var(--primary);
}

.mini-legend span:nth-child(2)::before {
  background: var(--coral);
}

.insight-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border-radius: 8px;
  color: #fff;
  background: var(--surface-strong);
}

.insight-card::after {
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 90px;
  height: 90px;
  border: 18px solid rgba(71, 169, 194, 0.18);
  border-radius: 50%;
  content: "";
}

.insight-card .stat-icon {
  margin-bottom: 22px;
  background: var(--blue);
}

.insight-card h3 {
  max-width: 260px;
  margin: 0 0 8px;
  font-size: 16px;
}

.insight-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.activity-list,
.compact-list {
  display: grid;
}

.activity-item,
.compact-item {
  display: grid;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 35px 1fr auto;
  gap: 10px;
  align-items: center;
}

.activity-item:last-child,
.compact-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
}

.activity-icon svg {
  width: 15px;
}

.activity-copy strong,
.activity-copy small {
  display: block;
}

.activity-copy strong {
  font-size: 10px;
}

.activity-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.activity-item time,
.compact-item time {
  color: var(--muted);
  font-size: 9px;
}

.toolbar {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.filter-group {
  flex: 1;
}

.filter-search {
  position: relative;
  width: min(330px, 100%);
}

.filter-search svg {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  color: var(--muted);
}

.filter-input,
.filter-select {
  min-height: 40px;
  padding: 0 12px;
  font-size: 11px;
}

.filter-search .filter-input {
  padding-left: 38px;
}

.filter-select {
  width: auto;
  min-width: 145px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.service-image {
  position: relative;
  height: 165px;
  overflow: hidden;
  background: var(--surface-soft);
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.service-card:hover .service-image img {
  transform: scale(1.03);
}

.service-image .icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.42);
  color: #17201c;
  background: rgba(255, 255, 255, 0.88);
}

.service-body {
  padding: 14px;
}

.service-author {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
}

.service-author .table-avatar {
  width: 25px;
  height: 25px;
  font-size: 8px;
}

.service-author .verified {
  width: 13px;
  color: var(--blue);
}

.service-card h3 {
  min-height: 40px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.service-meta {
  display: flex;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  align-items: flex-end;
}

.rating {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}

.rating svg {
  width: 13px;
  color: var(--yellow);
  fill: var(--yellow);
}

.price {
  text-align: right;
}

.price small,
.price strong {
  display: block;
}

.price small {
  color: var(--muted);
  font-size: 8px;
}

.price strong {
  font-size: 14px;
}

.category-strip {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  scrollbar-width: none;
}

.category-chip {
  display: inline-flex;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.category-chip.active {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.category-chip svg {
  width: 14px;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 62%, var(--surface));
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table td {
  font-size: 10px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-soft) 50%, transparent);
}

.table-person {
  display: flex;
  gap: 9px;
  align-items: center;
}

.table-avatar {
  width: 32px;
  height: 32px;
  overflow: hidden;
  flex: 0 0 32px;
}

.table-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-person strong,
.table-person small {
  display: block;
}

.table-person strong {
  font-size: 10px;
}

.table-person small {
  color: var(--muted);
  font-size: 8px;
}

.status {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  align-items: center;
  color: #427a12;
  background: rgba(158, 229, 72, 0.16);
  font-size: 8px;
  font-weight: 800;
}

.status.pending {
  color: #8a6410;
  background: rgba(241, 196, 83, 0.18);
}

.status.info {
  color: #227187;
  background: rgba(71, 169, 194, 0.16);
}

.status.danger {
  color: #a23d3d;
  background: rgba(215, 79, 79, 0.14);
}

.small-icon-btn {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
}

.small-icon-btn:hover {
  color: var(--ink);
  border-color: var(--primary-strong);
}

.small-icon-btn svg {
  width: 14px;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  padding: 15px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.list-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
}

.list-copy h3,
.list-copy p {
  margin: 0;
}

.list-copy h3 {
  font-size: 12px;
}

.list-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.list-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list-price {
  min-width: 90px;
  text-align: right;
}

.list-price strong,
.list-price small {
  display: block;
}

.list-price strong {
  font-size: 12px;
}

.list-price small {
  color: var(--muted);
  font-size: 8px;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 4px;
  background: var(--surface-soft);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary-strong);
}

.message-shell {
  display: grid;
  min-height: 620px;
  overflow: hidden;
  grid-template-columns: 315px 1fr;
}

.thread-list {
  border-right: 1px solid var(--line);
}

.thread-search {
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.thread-item {
  display: grid;
  width: 100%;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 38px 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.thread-item.active {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.thread-item .table-avatar {
  width: 38px;
  height: 38px;
}

.thread-copy {
  min-width: 0;
}

.thread-copy strong,
.thread-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-copy strong {
  font-size: 10px;
}

.thread-copy small {
  color: var(--muted);
  font-size: 9px;
}

.thread-time {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
}

.service-image .icon-btn.selected svg {
  color: var(--coral);
  fill: var(--coral);
}

.thread-time b {
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--coral);
  font-size: 7px;
}

.chat-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-head {
  display: flex;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  display: flex;
  overflow-y: auto;
  padding: 23px;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  background: color-mix(in srgb, var(--surface-soft) 48%, var(--surface));
}

.bubble {
  max-width: min(72%, 520px);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 8px 2px;
  background: var(--surface);
  font-size: 10px;
}

.bubble.mine {
  align-self: flex-end;
  border-color: transparent;
  border-radius: 8px 8px 2px;
  color: #16211b;
  background: var(--primary);
}

.bubble time {
  display: block;
  margin-top: 4px;
  color: inherit;
  opacity: 0.57;
  font-size: 8px;
  text-align: right;
}

.chat-compose {
  display: grid;
  padding: 12px;
  border-top: 1px solid var(--line);
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
}

.chat-compose input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 10px;
}

.balance-card {
  display: flex;
  min-height: 180px;
  padding: 25px;
  border-radius: 8px;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  background: var(--surface-strong);
}

.balance-card small,
.balance-card strong {
  display: block;
}

.balance-card small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.balance-card strong {
  margin: 8px 0 20px;
  font-size: 32px;
}

.balance-card .secondary-btn {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.balance-visual {
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 17px solid rgba(71, 169, 194, 0.35);
  border-top-color: var(--primary);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-nav {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-nav button {
  display: flex;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.settings-nav button.active {
  color: var(--ink);
  background: var(--surface-soft);
}

.settings-section {
  padding: 20px;
}

.form-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 11px 12px;
}

.form-field textarea {
  min-height: 96px;
  resize: vertical;
}

.toggle-row {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  font-size: 11px;
}

.toggle-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 40px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--line);
  transition: background 160ms ease;
}

.switch span::after {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  content: "";
  background: #fff;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--primary-strong);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.avatar-upload {
  display: inline-flex;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  background: var(--surface);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.avatar-upload input {
  display: none;
}

.avatar-upload svg {
  width: 13px;
}

.empty-state {
  display: grid;
  min-height: 340px;
  padding: 30px;
  place-items: center;
  text-align: center;
}

.empty-state > div {
  max-width: 380px;
}

.empty-state .list-icon {
  margin: 0 auto 14px;
  background: var(--primary);
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.modal {
  width: min(580px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.modal::backdrop {
  background: rgba(8, 13, 10, 0.62);
  backdrop-filter: blur(3px);
}

.modal-head {
  display: flex;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  padding: 20px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: grid;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  text-align: left;
}

.notification-item.read {
  background: var(--surface);
  opacity: 0.7;
}

.notification-item strong,
.notification-item small {
  display: block;
}

.notification-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.notification-item time {
  color: var(--muted);
  font-size: 8px;
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-strong);
}

.notification-item.read .notification-dot {
  background: var(--line);
}

.detail-grid {
  display: grid;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.detail-grid > div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.detail-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.detail-timeline {
  display: grid;
  margin-bottom: 16px;
  gap: 8px;
}

.detail-timeline span {
  display: flex;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
}

.detail-timeline span::before {
  width: 8px;
  height: 8px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  content: "";
}

.detail-timeline span.done {
  color: var(--ink);
}

.detail-timeline span.done::before {
  border-color: var(--primary-strong);
  background: var(--primary);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.theme-option:hover {
  transform: translateY(-1px);
  border-color: var(--primary-strong);
}

.theme-option.active {
  border-color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.theme-option > span:nth-child(2),
.theme-option strong,
.theme-option small {
  display: block;
  min-width: 0;
}

.theme-option strong {
  font-size: 11px;
}

.theme-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.theme-option > svg {
  width: 16px;
  color: var(--primary-strong);
}

.theme-preview {
  display: grid;
  width: 58px;
  height: 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 7px;
  grid-template-columns: 38% 62%;
  background: var(--theme-second);
}

.theme-preview i:first-child {
  background: var(--theme-first);
}

.theme-preview i:last-child {
  background: var(--theme-second);
}

.modal-actions {
  display: flex;
  margin-top: 20px;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-role {
  display: grid;
  gap: 14px;
}

.confirm-note {
  padding: 14px;
  border-left: 3px solid var(--primary-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
}

.credential-box {
  display: grid;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.credential-box span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.credential-box strong {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: flex;
  max-width: min(390px, calc(100% - 32px));
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  gap: 9px;
  align-items: center;
  color: #fff;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  color: var(--primary);
}

.floating-messages {
  position: fixed;
  z-index: 45;
  right: 24px;
  bottom: 24px;
}

.message-launcher {
  position: relative;
  display: grid;
  width: auto;
  min-width: 116px;
  height: 56px;
  padding: 0 19px;
  margin-left: auto;
  grid-template-columns: auto 23px;
  place-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  color: #142017;
  background: var(--primary);
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.service-card-tools {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.service-card-tools .icon-btn {
  position: static;
}

.account-security-divider {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.account-security-divider h3 {
  margin: 0 0 6px;
}

.account-security-divider p {
  margin: 0;
  color: var(--muted);
}

.account-password-form {
  margin-top: 22px;
}

.workspace-switch.privileged {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.workspace-switch.privileged button {
  height: 54px;
  min-width: 0;
  padding: 5px 1px;
  flex-direction: column;
  gap: 4px;
  border-radius: 7px;
}

.workspace-switch.privileged button span {
  width: 100%;
  font-size: 7px;
  line-height: 1.1;
  text-align: center;
}

.workspace-switch.privileged svg {
  width: 15px;
  height: 15px;
}

.support-launcher {
  position: absolute;
  right: 128px;
  bottom: 0;
  display: grid;
  width: 116px;
  height: 56px;
  padding: 0 15px;
  grid-template-columns: 23px auto;
  place-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.22);
}

.support-launcher svg { width: 22px; height: 22px; }
.support-launcher:hover { background: color-mix(in srgb, var(--ink) 84%, var(--primary)); }

.message-launcher-label {
  font-size: 12px;
  font-weight: 800;
}

.message-launcher:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--primary) 86%, #fff);
}

.message-launcher svg {
  width: 23px;
  height: 23px;
}

.launcher-badge {
  position: absolute;
  right: -2px;
  top: -3px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
  font-size: 8px;
  font-weight: 800;
}

.floating-chat {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: flex;
  width: min(440px, calc(100vw - 32px));
  height: min(590px, calc(100vh - 130px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-direction: column;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(12, 18, 14, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 180ms ease, transform 180ms ease;
}

.floating-support {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: flex;
  width: min(430px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 130px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-direction: column;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(12, 18, 14, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 180ms ease, transform 180ms ease;
}

.floating-messages.open .floating-chat {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-messages.support-open .floating-support {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-messages.open .message-launcher {
  color: #fff;
  background: var(--surface-strong);
}

.floating-messages.support-open .support-launcher {
  color: #142017;
  background: var(--primary);
}

.floating-chat-head {
  display: flex;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.floating-chat-head h2 {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.25;
}

.floating-chat-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.floating-chat-actions .text-btn {
  padding: 7px 8px;
  color: var(--primary-strong);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.floating-chat-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 132px minmax(0, 1fr);
}

.floating-support-body {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

.floating-support-list {
  display: grid;
  overflow-y: auto;
  padding: 10px;
  gap: 8px;
}

.floating-support-ticket {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.floating-support-ticket .list-icon {
  width: 36px;
  height: 36px;
}

.floating-support-ticket strong,
.floating-support-ticket small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-support-ticket strong {
  font-size: 10px;
}

.floating-support-ticket small,
.floating-support-ticket time {
  color: var(--muted);
  font-size: 8px;
}

.empty-state.compact {
  min-height: 170px;
  padding: 24px;
}

.floating-thread-list {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 52%, var(--surface));
}

.floating-thread {
  position: relative;
  display: grid;
  width: 100%;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.floating-thread:hover,
.floating-thread.active {
  background: var(--surface);
}

.floating-thread.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 30px;
  border-radius: 0 2px 2px 0;
  content: "";
  background: var(--primary-strong);
}

.floating-thread .table-avatar {
  width: 32px;
  height: 32px;
}

.floating-thread-copy {
  min-width: 0;
}

.floating-thread-copy strong,
.floating-thread-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-thread-copy strong {
  font-size: 9px;
}

.floating-thread-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.floating-thread-meta {
  display: none;
}

.floating-chat-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.floating-contact {
  display: flex;
  min-height: 58px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  gap: 9px;
  align-items: center;
}

.floating-contact .table-person {
  min-width: 0;
}

.floating-chat-messages {
  display: flex;
  overflow-y: auto;
  min-height: 0;
  padding: 14px;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  background: color-mix(in srgb, var(--surface-soft) 48%, var(--surface));
}

.floating-chat-messages .bubble {
  max-width: 88%;
}

.floating-compose {
  display: grid;
  min-height: 58px;
  padding: 10px;
  border-top: 1px solid var(--line);
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 7px;
}

.floating-compose input {
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 9px;
}

.floating-compose input:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(114, 189, 27, 0.12);
}

.floating-compose .small-icon-btn {
  width: 34px;
  height: 38px;
}

.bottom-nav,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  }
}

@media (max-width: 960px) {
  :root {
    --topbar: 72px;
  }

  .auth-screen {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .auth-visual {
    padding-inline: 38px;
  }

  .auth-visual h1 {
    font-size: 48px;
  }

  .trust-row {
    flex-wrap: wrap;
  }

  .visual-status {
    display: none;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-toggle {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    background: rgba(8, 13, 10, 0.54);
  }

  .sidebar.open + .app-main + .bottom-nav + .sidebar-backdrop {
    display: block;
  }

  .app-main {
    margin-left: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel::after {
    width: 50%;
    opacity: 0.48;
  }

  .hero-panel::before {
    right: 35%;
    width: 36%;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 66px;
  }

  .auth-screen {
    display: block;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 38px 22px;
  }

  .mobile-brand {
    display: inline-flex;
  }

  .auth-theme {
    top: 20px;
    right: 20px;
  }

  .topbar {
    padding: 0 15px;
  }

  .topbar h1 {
    max-width: 160px;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-kicker,
  .global-search,
  .avatar-btn {
    display: none;
  }

  .page-content {
    padding: 18px 15px 30px;
  }

  .page-stack {
    gap: 16px;
  }

  .page-intro,
  .section-head,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-intro .primary-btn,
  .toolbar > .primary-btn {
    width: 100%;
  }

  .hero-panel {
    min-height: 310px;
    padding: 24px;
  }

  .hero-panel::after {
    inset: auto 0 0;
    width: 100%;
    height: 54%;
    opacity: 0.35;
  }

  .hero-panel::before {
    inset: auto 0 34%;
    width: 100%;
    height: 42%;
    background: linear-gradient(180deg, var(--surface-strong), transparent);
  }

  .hero-content {
    justify-content: flex-start;
  }

  .hero-content h2 {
    font-size: 23px;
  }

  .stat-grid,
  .service-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-value {
    font-size: 19px;
  }

  .filter-group,
  .filter-search,
  .filter-select {
    width: 100%;
  }

  .list-row {
    grid-template-columns: 39px minmax(0, 1fr);
  }

  .list-icon {
    width: 39px;
    height: 39px;
  }

  .list-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .message-shell {
    grid-template-columns: 86px 1fr;
    min-height: 540px;
  }

  .thread-list {
    overflow: hidden;
  }

  .thread-search,
  .thread-copy,
  .thread-time {
    display: none;
  }

  .thread-item {
    display: grid;
    min-height: 66px;
    padding: 11px;
    place-items: center;
    grid-template-columns: 1fr;
  }

  .chat-messages {
    padding: 14px;
  }

  .bubble {
    max-width: 88%;
  }

  .balance-card {
    min-height: 210px;
    align-items: flex-start;
  }

  .balance-visual {
    width: 70px;
    height: 70px;
    border-width: 12px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    display: flex;
    overflow-x: auto;
  }

  .settings-nav button {
    flex: 0 0 auto;
  }

  .bottom-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: 66px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(5, 1fr);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    backdrop-filter: blur(15px);
  }

  .bottom-nav button {
    display: flex;
    min-width: 0;
    padding: 5px 2px;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
    font-size: 8px;
    font-weight: 700;
  }

  .bottom-nav button.active {
    color: var(--primary-strong);
  }

  .bottom-nav svg {
    width: 18px;
  }

  .toast {
    right: 16px;
    bottom: 82px;
  }

  .floating-messages {
    right: 12px;
    bottom: 78px;
  }

  .floating-chat {
    bottom: 64px;
    width: calc(100vw - 24px);
    height: min(620px, calc(100vh - 162px));
  }
}

@media (max-width: 420px) {
  .auth-panel {
    padding-inline: 16px;
  }

  .auth-box h2 {
    font-size: 27px;
  }

  .role-card {
    min-height: 61px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .primary-btn,
  .hero-actions .secondary-btn {
    flex: 1;
  }

  .credential-box {
    grid-template-columns: 1fr;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .floating-chat-body {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .floating-thread {
    display: grid;
    min-height: 58px;
    padding: 9px;
    place-items: center;
    grid-template-columns: 1fr;
  }

  .floating-thread-copy,
  .floating-thread-meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.order-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.order-filter-bar button {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.order-filter-bar button span {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  place-items: center;
  font-size: 9px;
}

.order-filter-bar button:hover,
.order-filter-bar button.active {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  color: var(--ink);
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.order-filter-bar button.active span {
  color: #142019;
  background: var(--primary);
}

.payment-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.payment-total strong {
  font: 800 18px 'Manrope', sans-serif;
}
