:root {
  --bg: #08080a;
  --surface: #111113;
  --surface-2: #171719;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f2f4f7;
  --muted: #98a2b3;
  --muted-2: #667085;
  --accent: #ff2e88;
  --accent-2: #ff5b9d;
  --danger: #f97066;
  --ok: #32d583;
  --radius: 12px;
  --sidebar: 248px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

h1, h2, h3, p { margin-top: 0; }

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
}

/* auth */

.auth-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 18px;
  background:
    radial-gradient(700px 420px at 80% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(500px 360px at 0% 100%, rgba(255, 46, 136, 0.05), transparent 60%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 420px;
}

.auth-logo, .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-logo { margin-bottom: 22px; }

.auth-logo__mark, .brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #08090b;
  font-weight: 900;
  font-size: 19px;
}

.auth-logo__text, .brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.auth-logo__text b, .brand__text b { font-size: 15px; letter-spacing: 0.12em; }
.auth-logo__text small, .brand__text small { color: var(--muted-2); font-size: 8px; letter-spacing: 0.16em; }

.auth-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.auth-card h1 { margin-bottom: 6px; font-size: 25px; line-height: 1.15; letter-spacing: -0.02em; }
.auth-lead { margin-bottom: 22px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.auth-foot { margin: 18px 0 0; color: var(--muted-2); font-size: 10.5px; text-align: center; }

.auth-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.oauth { display: grid; gap: 8px; }

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11px;
}
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* app */

.app-body { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #090c11;
}

.brand { margin: 0 6px 28px; }

.nav { display: grid; gap: 3px; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.nav__item:hover { background: var(--surface); color: var(--text); }
.nav__item.is-active { background: rgba(255, 46, 136, 0.1); color: var(--accent); }
.nav__icon { width: 16px; color: currentColor; text-align: center; }

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.sidebar__user-info { min-width: 0; display: flex; flex-direction: column; }
.sidebar__user-info b { overflow: hidden; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar__user-info small { color: var(--muted-2); font-size: 9.5px; }
.sidebar__user form { margin-left: auto; }

.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 46, 136, 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}
.avatar--sm { width: 26px; height: 26px; font-size: 9px; }

.main { margin-left: var(--sidebar); min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 12, 0.92);
  backdrop-filter: blur(12px);
}
.topbar__title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.topbar__right { margin-left: auto; }
.topbar__user { color: var(--muted-2); font-size: 11px; }

.menu-btn { display: none; }

.content { max-width: 1240px; padding: 30px 28px 60px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 { margin: 0 0 4px; font-size: 27px; line-height: 1.15; letter-spacing: -0.025em; }
.page-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.page-head__actions { display: flex; gap: 8px; }

.back { display: inline-block; margin-bottom: 8px; color: var(--muted-2); font-size: 11px; text-decoration: none; }
.back:hover { color: var(--accent); }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--accent); color: #08090b; }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--line-2); color: var(--muted); }
.btn--ghost:hover { border-color: rgba(255, 46, 136, 0.4); color: var(--accent); }
.btn--oauth { width: 100%; border-color: var(--line-2); background: var(--surface-2); }
.btn--oauth:hover { border-color: rgba(255, 46, 136, 0.4); }
.btn--block { width: 100%; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 11px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: rgba(255, 46, 136, 0.4); }

/* forms */

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0a0f15;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(255, 46, 136, 0.55); }
.field select { appearance: none; }
.field--inline { display: flex; align-items: center; gap: 8px; }
.field--inline > span { flex-shrink: 0; }
.field--inline select, .field--inline input { min-height: 38px; width: auto; }
.field--grow { flex: 1; }
.field--grow input { width: 100%; }

.form-note { margin: 0; color: var(--muted-2); font-size: 10.5px; }
.form-actions { display: flex; gap: 8px; }

.filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* flashes */

.flash {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.flash--ok { border-color: rgba(50, 213, 131, 0.3); background: rgba(50, 213, 131, 0.08); color: #6ce9a6; }
.flash--error { border-color: rgba(249, 112, 102, 0.35); background: rgba(249, 112, 102, 0.08); color: #fda29b; }

/* stats */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.stat b { display: block; margin: 8px 0 2px; font-size: 26px; line-height: 1; letter-spacing: -0.03em; }
.stat small { color: var(--muted-2); font-size: 10px; }
.stat--accent { border-color: rgba(255, 46, 136, 0.3); background: rgba(255, 46, 136, 0.05); }
.stat--accent b, .stat__money { color: var(--accent); }
.stat__money { font-size: 20px; }

/* panels */

.panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.panel--narrow { max-width: 560px; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.panel__head h2 { margin: 0; font-size: 13px; font-weight: 800; }
.panel > .form, .panel > .facts, .panel > .comment, .panel > .notes, .panel > .empty, .panel > .history { padding: 16px 18px; }
.panel > .form + .panel__head { border-top: 1px solid var(--line); }
.panel > .subhead { margin: 18px 18px 10px; }
.panel > .order-total { margin: 0 18px 18px; }

.empty { padding: 26px 18px; color: var(--muted-2); font-size: 12px; text-align: center; }

.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-muted { color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--accent); }

.subhead { margin: 18px 0 10px; font-size: 12px; font-weight: 800; }

/* tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); font-size: 12px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.table--compact th, .table--compact td { padding: 8px 12px; }
.cell-muted { color: var(--muted-2); }
.cell-right { text-align: right; }

.pagination { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; }

/* statuses */

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--new { border-color: rgba(255, 46, 136, 0.3); color: var(--accent); background: rgba(255, 46, 136, 0.06); }
.status--contacted { border-color: rgba(59, 130, 246, 0.3); color: #93c5fd; background: rgba(59, 130, 246, 0.07); }
.status--measuring { border-color: rgba(192, 132, 252, 0.3); color: #d8b4fe; background: rgba(192, 132, 252, 0.07); }
.status--agreed { border-color: rgba(96, 165, 250, 0.32); color: #93c5fd; background: rgba(96, 165, 250, 0.07); }
.status--install { border-color: rgba(251, 146, 60, 0.3); color: #fdba74; background: rgba(251, 146, 60, 0.07); }
.status--done { border-color: rgba(50, 213, 131, 0.3); color: #6ce9a6; background: rgba(50, 213, 131, 0.07); }
.status--canceled { border-color: rgba(249, 112, 102, 0.3); color: #fda29b; background: rgba(249, 112, 102, 0.07); }
.status--lg { padding: 6px 12px; font-size: 11px; }

.role { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; font-weight: 700; }
.role--owner { border-color: rgba(255, 46, 136, 0.35); color: var(--accent); }
.role--admin { border-color: rgba(59, 130, 246, 0.3); color: #93c5fd; }

/* detail */

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.detail-side { position: sticky; top: 80px; }

.facts { display: grid; gap: 10px; margin: 0; }
.facts > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.facts dt { color: var(--muted-2); font-size: 11px; }
.facts dd { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; }

.comment { padding: 14px 18px; border-top: 1px solid var(--line); }
.comment b { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.comment p { margin: 0; color: var(--text); font-size: 12.5px; white-space: pre-wrap; }

.order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.order-total b { color: var(--accent); font-size: 20px; }

.notes { display: grid; gap: 12px; border-top: 1px solid var(--line); }
.note { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.note:last-child { border-bottom: 0; }
.note__meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 10px; }
.note__meta b { color: var(--muted); }
.note p { margin: 6px 0 0; color: var(--text); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

.history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.history li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 10.5px; }
.history b { color: var(--muted); font-weight: 600; }

.user-cell { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline-flex; }
.inline-form select { min-height: 30px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 11px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-grid .panel:last-child { grid-column: 1 / -1; }

.error-page { padding: 70px 0; text-align: center; }
.error-page__code { display: block; color: rgba(255, 46, 136, 0.22); font-size: 90px; font-weight: 900; line-height: 1; }
.error-page h1 { margin: 8px 0 8px; font-size: 26px; }
.error-page p { color: var(--muted); }

/* responsive */

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.6); }
  .sidebar-overlay.is-visible { display: block; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 18px 48px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .page-head { flex-direction: column; gap: 12px; }
  .page-head h1 { font-size: 23px; }
  .filters { flex-direction: column; align-items: stretch; }
  .field--inline { flex-direction: column; align-items: stretch; }
  .field--inline select, .field--inline input { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 22px; }
  .settings-grid { grid-template-columns: 1fr; }
  .table th, .table td { padding: 9px 10px; }
  .topbar__user { display: none; }
  .auth-card { padding: 22px; }
  .auth-links { flex-direction: column; }
}

/* customer account */

.account-body {
  min-height: 100vh;
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(59, 130, 246, 0.1), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(255, 46, 136, 0.04), transparent 60%),
    var(--bg);
}

.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.account-top__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11.5px;
}
.account-top__nav > a { color: var(--muted); text-decoration: none; }
.account-top__nav > a:hover { color: var(--accent); }
.account-top__user { color: var(--text); font-weight: 700; }
.account-top__nav form { margin: 0; }

.account-main {
  max-width: 1080px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 36px 24px 70px;
}

.account-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
}
.account-foot a { color: var(--muted-2); text-decoration: none; }
.account-foot a:hover { color: var(--accent); }

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.account-head h1 { margin: 0 0 6px; font-size: 29px; line-height: 1.12; letter-spacing: -0.02em; }
.account-lead { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }

.account-card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.account-card h2 { margin: 0 0 14px; font-size: 15px; }
.account-card--auth { width: 100%; max-width: 460px; margin: 0 auto; padding: 28px; }
.account-card--auth h1 { margin: 0 0 8px; font-size: 25px; }
.account-card--auth .eyebrow { margin-bottom: 10px; }

.account-switch { margin: 16px 0 0; color: var(--muted-2); font-size: 11.5px; text-align: center; }
.account-switch a { color: var(--accent); text-decoration: none; }
.account-switch a:hover { text-decoration: underline; }

.account-code {
  text-align: center;
  font-size: 22px !important;
  letter-spacing: 0.3em;
  font-weight: 800;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.account-facts > div {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.account-facts span { display: block; color: var(--muted-2); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.account-facts b { display: block; margin-top: 4px; font-size: 12.5px; overflow-wrap: anywhere; }

.account-orders { display: grid; gap: 12px; }
.account-order-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.account-order-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-order-card__number { color: var(--accent); font-size: 15px; font-weight: 800; text-decoration: none; }
.account-order-card__date { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10.5px; }
.account-order-card__body { display: flex; gap: 30px; margin: 14px 0; }
.account-order-card__body span { display: block; color: var(--muted-2); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.account-order-card__body b { display: block; margin-top: 3px; font-size: 12.5px; }
.account-order-card__actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }

.account-empty {
  padding: 48px 24px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  text-align: center;
}
.account-empty h2 { margin-bottom: 8px; font-size: 19px; }
.account-empty p { max-width: 460px; margin: 0 auto 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.account-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.account-side { position: sticky; top: 20px; }
.account-muted { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.account-status-big { margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 18px; font-weight: 800; text-align: center; }
.account-side .btn { margin-top: 8px; }

.chat { display: grid; gap: 10px; margin: 4px 0 18px; overflow-x: hidden; }
.chat__message { max-width: 82%; min-width: 0; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow-wrap: anywhere; }
.chat__message--mine { margin-left: auto; border-color: rgba(255, 46, 136, 0.25); background: rgba(255, 46, 136, 0.06); }
.chat__message--staff { margin-right: auto; }
.chat__meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted-2); font-size: 9.5px; }
.chat__meta b { color: var(--muted); }
.chat__message p { margin: 5px 0 0; color: var(--text); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 760px) {
  .account-top { padding: 15px 18px; }
  .account-top__nav { gap: 9px; }
  .account-top__user { display: none; }
  .account-main { padding: 26px 18px 56px; }
  .account-head { flex-direction: column; }
  .account-head h1 { font-size: 24px; }
  .account-facts { grid-template-columns: 1fr; }
  .account-order-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .account-card { padding: 17px; }
  .chat__message { max-width: 92%; }
  .account-foot { padding: 15px 18px; flex-direction: column; }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow span { width: 18px; height: 1px; background: var(--accent); }

.chat__hint { margin: 12px 18px 0; color: var(--muted-2); font-size: 10.5px; }

.account-switch--staff { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* custom role menu */
.role-menu { position: relative; display: inline-block; }
.role-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
}
.role-menu summary::-webkit-details-marker { display: none; }
.role-menu__caret { color: var(--muted-2); font-size: 11px; }
.role-menu[open] .role-menu__caret { color: var(--accent); }
.role-menu__list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 172px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #111721;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.role-menu__list form { margin: 0; }
.role-menu__item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}
.role-menu__item:hover { background: rgba(255, 46, 136, 0.08); color: var(--accent); }
.role-menu__item.is-current { background: rgba(255, 46, 136, 0.12); color: var(--accent); font-weight: 700; }

.account-auth-hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 46, 136, 0.3);
  border-radius: 8px;
  background: rgba(255, 46, 136, 0.06);
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.5;
}

/* role chips */
.role-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.role-actions form { margin: 0; }
.role-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.role-chip:hover { border-color: rgba(255, 46, 136, 0.4); color: var(--accent); }
.role-chip.is-current { border-color: rgba(255, 46, 136, 0.45); background: rgba(255, 46, 136, 0.12); color: var(--accent); }

.btn--yandex {
  background: #fc3f1d;
  border-color: #fc3f1d;
  color: #fff;
}
.btn--yandex:hover { background: #e23516; border-color: #e23516; color: #fff; }
.account-oauth { margin-bottom: 8px; }
.account-oauth-note { margin: 0 0 14px; color: var(--muted-2); font-size: 10px; text-align: center; }
.account-mail-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -2px 0 15px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 46, 136, 0.045);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}
.account-mail-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-mail-note b { color: var(--text); font-weight: 700; }
.account-oauth-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted-2);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.account-oauth-sep::before,
.account-oauth-sep::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.status-quick { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.status-quick form { margin: 0; }
.status-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.status-choice:hover { color: var(--text); }
.status-choice.is-current { color: var(--accent); font-weight: 700; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.status-choice.is-current .status-dot { opacity: 1; }

.assign-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.assign-picker summary::-webkit-details-marker { display: none; }
.assign-picker__caret { color: var(--muted-2); font-size: 12px; }
.assign-picker__menu { display: flex; flex-direction: column; gap: 1px; padding: 4px 0 2px; border-top: 1px solid var(--line); }
.assign-picker__menu form { margin: 0; }
.assign-choice {
  display: block;
  width: 100%;
  padding: 5px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.assign-choice:hover { color: var(--text); }
.assign-choice.is-current { color: var(--accent); font-weight: 700; }

.log-action { display: inline-block; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); font-size: 10px; }
.log-action--create { border-color: rgba(74, 222, 128, 0.35); color: #86efac; background: rgba(74, 222, 128, 0.08); }
.log-action--status { border-color: rgba(96, 165, 250, 0.35); color: #93c5fd; background: rgba(96, 165, 250, 0.08); }
.log-action--message { border-color: rgba(192, 132, 252, 0.35); color: #d8b4fe; background: rgba(192, 132, 252, 0.08); }
.log-action--danger { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; background: rgba(248, 113, 113, 0.08); }
.log-action--role { border-color: rgba(255, 46, 136, 0.35); color: var(--accent); background: rgba(255, 46, 136, 0.08); }
.log-action--auth { border-color: var(--line); color: var(--muted); }
.log-id { opacity: 0.45; font-size: 9px; }

.btn--danger { border-color: rgba(255, 90, 90, 0.45); color: #ff7b7b; background: rgba(255, 90, 90, 0.06); }
.btn--danger:hover { border-color: #ff6b6b; color: #fff; background: #b62c2c; }

.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-actions form { margin: 0; }

.plan-box { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #080c12; }
.plan-svg { display: block; width: 100%; height: auto; }

.account-card--status { padding: 14px 16px; }
.account-status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.account-status-head h2 { margin: 0; }
.account-card--status .account-muted { margin: 4px 0 0; font-size: 10px; }

.panel--tight { padding: 14px 16px; }
.panel--tight .panel__head { margin-bottom: 6px; }
.panel--tight .panel__head h2 { font-size: 12px; }

.review-stars-inline { color: var(--accent); font-weight: 700; white-space: nowrap; }
.cell-text { max-width: 480px; color: var(--muted); line-height: 1.5; }

.form-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.form-grid .field { margin: 0; min-width: 100px; }
.form-grid .field--grow { flex: 1 1 220px; }
.badge-new { display: inline-block; margin-top: 7px; padding: 3px 8px; border: 1px solid rgba(255, 46, 136, 0.35); border-radius: 6px; color: var(--accent); font-size: 10px; font-weight: 700; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.5; margin: -2px 0 12px; }

img.brand__mark,
img.auth-logo__mark { background: none; object-fit: contain; display: block; }

.cselect { position: relative; min-width: 160px; }
.cselect__button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #0a0f15; color: var(--text); font-family: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.cselect__button:focus { outline: none; border-color: rgba(255, 46, 136, 0.55); }
.cselect__caret { color: var(--muted-2); font-size: 14px; line-height: 1; }
.cselect__menu { display: none; position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; right: 0; max-height: 320px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #0b1016; box-shadow: 0 18px 35px rgba(0,0,0,.45); }
.cselect.is-open .cselect__menu { display: block; }
.cselect__option { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-family: inherit; font-size: 12px; line-height: 1.3; text-align: left; cursor: pointer; }
.cselect__option:hover { background: rgba(255,255,255,.05); color: var(--text); }
.cselect__option.is-selected { color: var(--accent); background: rgba(255,46,136,.08); }

.cselect__caret { width: 7px; height: 7px; font-size: 0; border-right: 1.5px solid var(--muted-2); border-bottom: 1.5px solid var(--muted-2); transform: rotate(45deg) translateY(-2px); margin-right: 2px; flex: 0 0 auto; }
.cselect.is-open .cselect__caret { transform: rotate(225deg) translateY(-2px); }
.cselect__menu { scrollbar-width: thin; scrollbar-color: #2b3544 #0b1016; }
.cselect__menu::-webkit-scrollbar { width: 6px; }
.cselect__menu::-webkit-scrollbar-track { background: #0b1016; border-radius: 3px; }
.cselect__menu::-webkit-scrollbar-thumb { background: #2b3544; border-radius: 3px; }
.cselect__menu::-webkit-scrollbar-thumb:hover { background: #3a4658; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.metric { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.metric small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.metric b { display: block; font-family: var(--font-head); font-size: 28px; color: var(--text); margin: 5px 0 2px; }
.metric span { color: var(--muted-2); font-size: 10px; }
.visit-chart { display: flex; flex-direction: column; gap: 7px; }
.visit-chart__row { display: flex; align-items: center; gap: 9px; font-size: 10px; color: var(--muted); }
.visit-chart__date { width: 72px; flex: 0 0 auto; }
.visit-chart__bar { flex: 1; height: 7px; border-radius: 99px; background: #151c26; overflow: hidden; }
.visit-chart__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.visit-chart__row b { width: 35px; text-align: right; color: var(--text); }
.visit-chart__row small { width: 52px; text-align: right; color: var(--muted-2); }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.analytics-list { display: flex; flex-direction: column; gap: 2px; }
.analytics-row { display: grid; grid-template-columns: 1fr 45px 45px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11px; color: var(--muted); }
.analytics-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-row b { color: var(--text); text-align: right; }
.analytics-row small { color: var(--muted-2); text-align: right; }
@media (max-width: 760px) { .metric-grid, .analytics-grid { grid-template-columns: 1fr; } }

.panel__hint { margin-left: auto; color: var(--muted-2); font-size: 9px; letter-spacing: .04em; }
.visit-columns { display: flex; align-items: flex-end; gap: 7px; height: 190px; padding: 8px 2px 0; overflow-x: auto; }
.visit-col { flex: 1 0 42px; min-width: 42px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.visit-col__value { color: var(--muted); font-size: 9px; line-height: 1; }
.visit-col__track { width: 100%; height: 132px; display: flex; align-items: flex-end; border-radius: 5px 5px 2px 2px; background: #101720; overflow: hidden; }
.visit-col__track i { display: block; width: 100%; min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #ff5b9d, #ff2e88); }
.visit-col__date { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.analytics-head { display: grid; grid-template-columns: 1fr 45px 45px; gap: 8px; padding: 0 0 7px; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.analytics-head b, .analytics-head small { text-align: right; font-weight: 600; }
.analytics-row { min-height: 30px; }

.analytics-grid > .panel { min-width: 0; overflow: hidden; }
.analytics-row, .analytics-head { grid-template-columns: minmax(0, 1fr) 52px 58px; padding-right: 4px; }
.analytics-row small, .analytics-head small { white-space: nowrap; }
.analytics-head b, .analytics-head small { padding-right: 0; }

.modal-dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #0a0f15; color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.modal-dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.modal-dialog__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.modal-dialog__head h2 { margin: 0; font-family: var(--font-head); font-size: 20px; }
.modal-dialog__head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.estimate-tabs { display: flex; gap: 6px; margin: 14px 0; }
.estimate-tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.estimate-tab.is-active { background: var(--accent); border-color: var(--accent); color: #05070a; }
.estimate-presets { display: flex; flex-direction: column; gap: 3px; max-height: 330px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #2b3544 #0b1016; }
.estimate-preset { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 7px; border-bottom: 1px solid rgba(255,255,255,.06); }
.estimate-preset span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.estimate-preset b { font-size: 11px; font-weight: 600; color: var(--text); }
.estimate-preset small { color: var(--muted); font-size: 10px; }
.estimate-preset button { flex: 0 0 auto; }
.estimate-custom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.estimate-custom .panel__head { margin-bottom: 10px; }

.visit-chart { display: flex; gap: 8px; height: 190px; padding: 4px 0 0; overflow: hidden; }
.visit-y { width: 30px; height: 160px; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted-2); font-size: 9px; text-align: right; padding: 12px 0 26px; flex: 0 0 auto; }
.visit-plot { position: relative; flex: 1; min-width: 0; height: 180px; }
.visit-grid { position: absolute; left: 0; right: 0; top: 12px; bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.visit-grid i { border-top: 1px dashed rgba(255,255,255,.08); }
.visit-chart .visit-columns { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; align-items: end; height: 100%; padding: 0; overflow: visible; }
.visit-chart .visit-col { height: 100%; min-width: 0; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; }
.visit-chart .visit-col__value { color: var(--muted); font-size: 8px; line-height: 1; height: 10px; }
.visit-chart .visit-col__track { width: 100%; height: 130px; background: none; display: flex; align-items: flex-end; justify-content: center; border-radius: 0; overflow: visible; }
.visit-chart .visit-col__track i { width: 9px; max-width: 70%; min-height: 0; border-radius: 3px 3px 0 0; background: var(--accent); }
.visit-chart .visit-col__date { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
@media (max-width: 760px) { .visit-chart .visit-col__value { font-size: 7px; } .visit-chart .visit-col__date { transform: rotate(-45deg); transform-origin: right center; } }

.visit-chart .visit-col__track i { display: block; }

.visit-chart .visit-columns { position: relative; inset: auto; z-index: 2; height: 180px; }
.visit-chart .visit-grid { z-index: 1; }

.visit-chart { align-items: stretch; }
.visit-chart .visit-y { height: auto; align-self: stretch; box-sizing: border-box; padding: 12px 0 24px; }

.visit-chart { flex-direction: row; }

.estimate-preset .estimate-qty { width: 52px; padding: 7px 6px; border: 1px solid var(--line); border-radius: 6px; background: #080d13; color: var(--text); font-family: inherit; font-size: 11px; text-align: center; flex: 0 0 auto; }
.estimate-preset .estimate-unit { width: 48px; padding: 7px 6px; border: 1px solid var(--line); border-radius: 6px; background: #080d13; color: var(--text); font-family: inherit; font-size: 11px; text-align: center; flex: 0 0 auto; }
.estimate-preset .estimate-qty:focus, .estimate-preset .estimate-unit:focus { outline: none; border-color: rgba(255,46,136,.5); }

.estimate-preset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 64px 34px;
  gap: 8px;
  align-items: center;
}
.estimate-preset > span { min-width: 0; overflow: hidden; }
.estimate-preset > span b, .estimate-preset > span small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.estimate-preset .estimate-qty, .estimate-preset .estimate-unit { width: 100%; min-width: 0; }
.estimate-preset > button { width: 34px; padding-left: 0; padding-right: 0; justify-self: end; }

.owner-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 24px 0; padding: 10px 12px; border: 1px solid rgba(255,46,136,.18); border-radius: 9px; background: rgba(255,46,136,.035); }
.owner-bar__sep { width: 1px; height: 24px; background: var(--line); }
.switch-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.switch-field input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui { width: 32px; height: 18px; padding: 2px; border-radius: 99px; background: #202a36; border: 1px solid var(--line); transition: background .2s, border-color .2s; flex: 0 0 auto; }
.switch-ui::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: #7d8997; transition: transform .2s, background .2s; }
.switch-field input:checked + .switch-ui { background: rgba(255,46,136,.22); border-color: rgba(255,46,136,.55); }
.switch-field input:checked + .switch-ui::after { transform: translateX(14px); background: var(--accent); }
.owner-bar__percent { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.owner-bar__percent input { width: 58px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; background: #080d13; color: var(--text); font-family: inherit; font-size: 11px; text-align: center; }
.owner-bar__percent input:focus { outline: none; border-color: rgba(255,46,136,.5); }
.owner-bar .btn { margin-left: auto; }
@media (max-width: 760px) { .owner-bar { margin: 8px 12px 0; gap: 10px; } .owner-bar__sep { display: none; } .owner-bar .btn { margin-left: 0; } }

body.theme-newyear {
  --bg: #040b16;
  --surface: #0a1624;
  --surface-2: #0e1c2c;
  --line: rgba(190, 235, 255, 0.13);
  --line-2: rgba(190, 235, 255, 0.22);
  --text: #f1fbff;
  --muted: #a8c1d4;
  --muted-2: #7893a8;
  --accent: #c4b5fd;
  --accent-2: #e4dcff;
}
body.theme-newyear.account-body {
  position: relative;
  background:
    radial-gradient(820px 560px at 82% -10%, rgba(110, 210, 255, .18), transparent 64%),
    radial-gradient(620px 460px at 0% 100%, rgba(196, 181, 253, .09), transparent 62%),
    #040b16;
}
body.theme-newyear::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 24%, rgba(225, 247, 255, .55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 18%, rgba(225, 247, 255, .4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 44% 68%, rgba(225, 247, 255, .35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 76%, rgba(225, 247, 255, .45) 0 1px, transparent 1.6px);
  background-size: 270px 270px, 340px 340px, 310px 310px, 390px 390px;
  opacity: .55;
}
body.theme-newyear .account-top,
body.theme-newyear .account-main,
body.theme-newyear .account-foot { position: relative; z-index: 1; }
body.theme-newyear .account-top { border-bottom-color: rgba(190,235,255,.14); }
body.theme-newyear .account-card,
body.theme-newyear .account-facts > div { background: rgba(10,22,36,.9); border-color: rgba(190,235,255,.13); }
body.theme-newyear .brand__mark { background: var(--accent); color: #140f24; }
body.theme-newyear .account-ny { padding: 4px 9px; border: 1px solid rgba(196,181,253,.42); border-radius: 99px; color: #e4dcff; background: rgba(196,181,253,.12); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
body.theme-newyear .btn--primary { background: var(--accent); color: #120f1e; }
body.theme-newyear .btn--primary:hover { background: #e4dcff; box-shadow: 0 0 0 1px rgba(196,181,253,.35), 0 14px 30px rgba(196,181,253,.2); transform: translateY(-1px); }
body.theme-newyear .status--new, body.theme-newyear .status--measuring { background: rgba(196,181,253,.13); color: #e4dcff; border-color: rgba(196,181,253,.3); }
body.theme-newyear .account-order:hover { border-color: rgba(196,181,253,.35); }
@media (prefers-reduced-motion: reduce) { body.theme-newyear .btn--primary:hover { transform: none; } }

body.theme-newyear .brand__mark {
  filter: hue-rotate(205deg) saturate(.62) brightness(1.08);
}

.promo-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; color: var(--accent); }

.staff-qr { width: 220px; height: 220px; margin: 16px auto 10px; padding: 10px; background: #fff; border-radius: 12px; }
.staff-qr img, .staff-qr canvas { display: block; width: 100% !important; height: 100% !important; }
.staff-secret { margin: 0 0 18px; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.6; }
.staff-secret b { color: var(--text); letter-spacing: .08em; font-family: ui-monospace, Consolas, monospace; }

.day-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.day-tab { padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; font-weight: 700; text-decoration: none; }
.day-tab:hover { color: var(--text); border-color: var(--line-2); }
.day-tab.is-active { color: #08090b; background: var(--accent); border-color: var(--accent); }
.filters input[type="date"] { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 11px; }

.backup-file { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--accent); }


/* Order documents and private data dialog */
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.doc-actions .btn { text-decoration: none; }
.pii-form {
  max-height: 78vh;
  overflow-y: auto;
  padding: 0 12px 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,46,136,.5) rgba(255,255,255,.04);
  scrollbar-gutter: stable;
}
.pii-form::-webkit-scrollbar { width: 8px; }
.pii-form::-webkit-scrollbar-track { background: rgba(255,255,255,.035); border-radius: 8px; }
.pii-form::-webkit-scrollbar-thumb { background: rgba(255,46,136,.42); border-radius: 8px; }
.pii-form::-webkit-scrollbar-thumb:hover { background: rgba(255,46,136,.65); }
.pii-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pii-grid > * { min-width: 0; }
.pii-dialog { width: min(860px, calc(100vw - 24px)); max-height: 92vh; }
.form-note--hint { margin: 0 0 12px; color: #8f9aaa; }
.field[data-hint] { position: relative; }
.field[data-hint] > span::after {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border: 1px solid rgba(255,46,136,.38);
  border-radius: 50%;
  color: #ff2e88;
  font-size: 9px;
  font-weight: 800;
  vertical-align: 1px;
  cursor: help;
}
.field[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  z-index: 20;
  width: max-content;
  max-width: min(380px, 90vw);
  padding: 8px 10px;
  border: 1px solid rgba(255,46,136,.25);
  border-radius: 7px;
  background: #0d141d;
  color: #e6ebf2;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
}
.field[data-hint]:hover::after,
.field[data-hint]:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 720px) {
  .pii-grid { grid-template-columns: 1fr; }
  .pii-dialog { width: calc(100vw - 12px); max-height: 94vh; }
  .pii-form { max-height: 80vh; padding-right: 8px; }
}
@media (max-width: 720px) {
  .pii-grid { grid-template-columns: 1fr; }
  .pii-dialog { width: calc(100vw - 16px); }
}


.status--closed { background: rgba(148,163,184,.12); color: #94a3b8; border-color: rgba(148,163,184,.25); }


/* Document action buttons */
.doc-actions { gap: 10px; }
.doc-actions .btn {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  animation: docActionIn .35s ease both;
}
.doc-actions .btn:nth-child(2) { animation-delay: .04s; }
.doc-actions .btn:nth-child(3) { animation-delay: .08s; }
.doc-actions .btn:nth-child(4) { animation-delay: .12s; }
.doc-actions .btn:nth-child(5) { animation-delay: .16s; }
.doc-actions .btn:nth-child(6) { animation-delay: .2s; }
.doc-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.28), 0 0 0 1px rgba(255,46,136,.2);
}
.doc-actions .btn:active { transform: translateY(0); }
@keyframes docActionIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Document actions as download cards */
.doc-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
  gap: 10px;
}
.doc-actions .btn {
  width: 100%;
  min-height: 52px;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
}
.doc-actions .btn::before {
  content: "↓";
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  font-size: 13px;
  font-weight: 800;
}
.doc-actions .btn--primary::before { background: rgba(0,0,0,.14); }
.doc-actions .btn::after {
  content: "DOCX";
  margin-left: auto;
  color: rgba(255,255,255,.45);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}
@media (max-width: 640px) {
  .doc-actions { grid-template-columns: 1fr; }
}


.user-cell { align-items: center; }
.role-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.role-group { margin-bottom: 6px; }
.role-group:last-child { margin-bottom: 0; }
.role-group__label { margin-bottom: 4px; color: #8f9aaa; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.role-group .role-actions { gap: 4px; }
.role-group .role-chip { font-size: 10px; padding: 4px 8px; }
