:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  --radius: 8px;
  --control-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 28px rgba(0, 0, 0, 0.12);
  --hairline-light: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] {
  --bg: #0f1014;
  --surface: rgba(30, 31, 36, 0.78);
  --surface-strong: rgba(43, 44, 50, 0.9);
  --surface-soft: rgba(58, 59, 66, 0.72);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --muted-strong: #d1d1d6;
  --border: rgba(255, 255, 255, 0.13);
  --accent: #0a84ff;
  --accent-strong: #5eb1ff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --success: #32d74b;
  --danger: #ff453a;
  --warning: #ff9f0a;
  --info: #64d2ff;
  --shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
  --glass-blur: blur(30px) saturate(1.24);
}

body[data-theme="light"] {
  --bg: #f3f4f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(242, 244, 248, 0.88);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #3a3a3c;
  --border: rgba(60, 60, 67, 0.15);
  --accent: #007aff;
  --accent-strong: #0057d8;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --success: #28cd41;
  --danger: #ff3b30;
  --warning: #ff9500;
  --info: #32ade6;
  --shadow: 0 20px 54px rgba(60, 60, 67, 0.14);
  --glass-blur: blur(26px) saturate(1.16);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

* {
  scrollbar-color: color-mix(in srgb, var(--muted) 42%, transparent) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 42%, transparent);
  background-clip: padding-box;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #020402;
  color: #f5fff4;
}

.login-bg,
.scan-grid {
  position: absolute;
  inset: 0;
}

.login-bg {
  background:
    linear-gradient(115deg, rgba(184, 255, 0, 0.05), transparent 36%),
    linear-gradient(250deg, rgba(0, 255, 140, 0.08), transparent 42%),
    url("../img/login-bg.png") center / cover no-repeat,
    #020402;
}

.scan-grid {
  opacity: 0.48;
  background-image:
    repeating-linear-gradient(0deg, rgba(184, 255, 0, 0.08) 0, rgba(184, 255, 0, 0.08) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(90deg, rgba(184, 255, 0, 0.06) 0, rgba(184, 255, 0, 0.06) 1px, transparent 1px, transparent 42px);
  animation: gridDrift 18s linear infinite;
}

.signal-line {
  position: absolute;
  top: -20%;
  width: 2px;
  height: 140%;
  background: linear-gradient(180deg, transparent, rgba(184, 255, 0, 0.85), transparent);
  filter: drop-shadow(0 0 18px rgba(184, 255, 0, 0.55));
  opacity: 0.8;
  transform: rotate(17deg);
  animation: signalSweep 8s linear infinite;
}

.signal-line-a {
  left: 12%;
}

.signal-line-b {
  left: 52%;
  animation-delay: -3s;
  opacity: 0.5;
}

.signal-line-c {
  left: 84%;
  animation-delay: -6s;
  opacity: 0.38;
}

.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 440px);
  gap: 56px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0;
}

.brand-mark,
.app-logo {
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 8px;
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    var(--accent-soft);
  font-weight: 800;
}

.login-copy h1 {
  max-width: 720px;
  margin: 28px 0 18px;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 600px;
  margin: 0;
  color: #9da89e;
  font-size: 22px;
  font-weight: 600;
}

.login-card {
  border: 1px solid rgba(184, 255, 0, 0.28);
  border-radius: 8px;
  padding: 26px;
  background: rgba(5, 8, 6, 0.88);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

.login-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #dff8df;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b8ff00;
  box-shadow: 0 0 16px #b8ff00;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #cbd9cc;
  font-size: 14px;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(184, 255, 0, 0.25);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.login-error,
.form-message {
  display: none;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.login-error.is-visible,
.form-message.is-visible {
  display: block;
}

.form-message {
  color: var(--accent-strong);
}

.form-message.is-error {
  color: var(--danger);
}

.role-choice,
.primary-action,
.ghost-action,
.theme-toggle,
.icon-button,
.task-filters button,
.module-tabs button,
.sound-toggle,
.small-action {
  min-height: 40px;
  border-radius: var(--radius);
}

.primary-action {
  min-height: 52px;
  background: #b8ff00;
  color: #081006;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(184, 255, 0, 0.28);
}

.primary-action.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-action.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(8, 16, 6, 0.28);
  border-top-color: #081006;
  border-radius: 50%;
  animation: crmx-spin 0.72s linear infinite;
  flex: 0 0 auto;
}

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

.primary-action:disabled,
.small-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app {
  min-height: 100vh;
  padding: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 330px),
    linear-gradient(120deg, color-mix(in srgb, var(--surface-soft) 58%, transparent), transparent 58%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 22px 10px 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 10%, transparent), transparent),
    color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 12px 34px color-mix(in srgb, #000000 16%, transparent);
}

.topbar::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff5f57;
  box-shadow:
    20px 0 0 #ffbd2e,
    40px 0 0 #28c840;
  transform: translateY(-50%);
}

.topbar__identity,
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__identity strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

.topbar__identity span:not(.app-logo),
.topbar__actions span {
  color: var(--muted);
  font-size: 13px;
}

.topbar__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button,
.theme-toggle,
.ghost-action,
.small-action {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 9%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 88%, transparent);
  color: var(--text);
  box-shadow: var(--control-shadow);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.icon-button:hover,
.theme-toggle:hover,
.ghost-action:hover,
.small-action:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 72%, var(--accent-soft));
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 13%, transparent),
    0 12px 30px color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-1px);
}

.small-action.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  color: var(--accent);
  font-weight: 900;
}

.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800;
}

.theme-toggle,
.ghost-action,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.app-layout {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  min-height: calc(100vh - 90px);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: var(--shadow);
}

.task-rail {
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 6%, transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--surface) 82%, transparent)),
    var(--surface);
  padding: 20px;
  overflow: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset -1px 0 0 color-mix(in srgb, #ffffff 6%, transparent);
}

.task-rail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-rail h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.sound-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.sound-toggle.is-on {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.task-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.task-metrics div,
.stat-card,
.content-card,
.deal-column,
.room-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent 42%),
    var(--surface-strong);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 14px 34px color-mix(in srgb, #000000 14%, transparent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.task-metrics div {
  padding: 12px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.task-metrics div:hover,
.stat-card:hover,
.content-card:hover,
.deal-column:hover,
.room-card:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  transform: translateY(-1px);
}

.task-metrics strong {
  display: block;
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1;
}

.task-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.task-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  background: color-mix(in srgb, var(--surface-soft) 84%, transparent);
  box-shadow: inset 0 1px 0 var(--hairline-light);
}

.task-filters button {
  background: transparent;
  color: var(--muted-strong);
  min-height: 32px;
}

.task-filters button.is-active {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    var(--surface-strong);
  color: var(--text);
  box-shadow: 0 1px 8px color-mix(in srgb, #000000 14%, transparent);
}

.task-create {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 86%, transparent);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 10px 26px color-mix(in srgb, #000000 12%, transparent);
}

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

.task-create label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.task-create input,
.task-create select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 6%, transparent), transparent 50%),
    var(--surface-strong);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 14px 34px color-mix(in srgb, #000000 16%, transparent);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.task-card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 18px 42px color-mix(in srgb, #000000 20%, transparent);
}

.task-card.is-urgent {
  border-left-color: var(--warning);
}

.task-card.is-overdue {
  border-left-color: var(--danger);
}

.task-card.is-done {
  opacity: 0.68;
}

.task-card__meta,
.task-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.task-card h3 {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.3;
}

.task-done {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.chip,
.access-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.chip {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent-strong);
}

.status-badge {
  background: color-mix(in srgb, var(--info) 14%, transparent);
  color: var(--info);
}

.status-badge.is-danger {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.status-badge.is-warning {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.workspace-panel {
  min-width: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 40%, transparent), transparent 280px),
    var(--bg);
  overflow: hidden;
}

.module-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 18px 13px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 6%, transparent), transparent),
    color-mix(in srgb, var(--surface) 74%, transparent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, #000000 10%, transparent);
}

.module-tabs button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.module-tabs button:hover {
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  color: var(--text);
}

.module-tabs button.is-active {
  border-color: var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    var(--surface-strong);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 8px 18px color-mix(in srgb, #000000 13%, transparent);
}

.module-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-strong);
  font-size: 11px;
}

.workspace {
  height: calc(100vh - 154px);
  overflow: auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 2px 2px 0;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.access-badge {
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  color: var(--muted-strong);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 color-mix(in srgb, #ffffff 12%, transparent);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.content-card,
.room-card {
  padding: 17px;
}

.stat-card span,
.content-card p,
.room-card p {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.content-card h2,
.deal-column h2,
.room-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.client-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.client-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.client-form input,
.client-form select,
.client-form textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 8%, transparent);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.client-form input:focus,
.client-form select:focus,
.client-form textarea:focus,
.task-create input:focus,
.task-create select:focus,
.comment-form textarea:focus,
.table-select:focus,
.infra-jump-select:focus,
.infra-link-label input:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.client-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.admin-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

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

.module-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted-strong) !important;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.module-check:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

.module-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 64px 72px 116px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, #000000 10%, transparent);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.user-row:hover {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
  transform: translateY(-1px);
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  color: var(--muted);
  font-size: 13px;
}

.user-editor p {
  margin: 0;
  color: var(--muted);
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 14px 34px color-mix(in srgb, #000000 12%, transparent);
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 94%, transparent);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table tbody tr {
  transition: background 0.16s ease;
}

.data-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

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

.sim-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.sim-box-card,
.sim-detail-card,
.sim-table-card {
  min-width: 0;
}

.sim-box-card {
  overflow: hidden;
}

.sim-box-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 4px 10px;
}

.sim-table-card {
  margin-top: 16px;
}

.sim-box-head,
.sim-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sim-box-head h2,
.sim-detail-head h2 {
  margin: 0;
}

.sim-status-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sim-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sim-led {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 12px color-mix(in srgb, var(--info) 62%, transparent);
}

.sim-led.is-active {
  background: var(--success);
  box-shadow: 0 0 14px color-mix(in srgb, var(--success) 72%, transparent);
}

.sim-led.is-empty {
  background: var(--info);
  box-shadow: 0 0 12px color-mix(in srgb, var(--info) 62%, transparent);
}

.sim-led.is-deferred,
.sim-led.is-checking {
  background: var(--warning);
  box-shadow: 0 0 12px color-mix(in srgb, var(--warning) 62%, transparent);
}

.sim-led.is-broken {
  background: var(--danger);
  box-shadow: 0 0 12px color-mix(in srgb, var(--danger) 62%, transparent);
}

.sim-box-shell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 760px;
  aspect-ratio: 801 / 589;
  border: 1px solid color-mix(in srgb, var(--border) 70%, #aab2bb);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 54px color-mix(in srgb, #000000 22%, transparent);
  isolation: isolate;
  overflow: hidden;
}

.sim-box-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  user-select: none;
  pointer-events: none;
}

.sim-slot-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.sim-bank {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sim-bank__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.sim-bank__head span {
  word-spacing: 15px;
  color: var(--muted);
}

.sim-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  grid-auto-rows: minmax(44px, 1fr);
  gap: 6px;
}

.sim-slot {
  position: absolute;
  left: var(--slot-x);
  top: var(--slot-y);
  z-index: 2;
  width: 5.75%;
  height: 3.65%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  box-shadow: none;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.sim-slot:hover,
.sim-slot:focus-visible,
.sim-slot.is-selected {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 78%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent) 12%, transparent);
}

.sim-slot > .sim-led {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sim-slot__code {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 6px;
  padding: 0 6px;
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-shadow: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sim-slot__number {
  display: none;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 700;
}

.sim-slot:hover .sim-slot__code,
.sim-slot:focus-visible .sim-slot__code,
.sim-slot.is-selected .sim-slot__code {
  color: var(--text);
  opacity: 1;
  transform: translate(-50%, 0);
}

.sim-slot:hover > .sim-led,
.sim-slot:focus-visible > .sim-led,
.sim-slot.is-selected > .sim-led {
  transform: translate(-50%, -50%) scale(1.25);
}

.sim-slot.is-deferred {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
}

.sim-slot.is-broken {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
}

.sim-slot-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 8;
  display: grid;
  width: min(240px, 78vw);
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent),
    var(--surface-strong);
  box-shadow: 0 18px 44px color-mix(in srgb, #000000 28%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: normal;
}

.sim-slot-tooltip strong {
  color: var(--text);
}

.sim-slot-tooltip em {
  color: var(--warning);
  font-style: normal;
  font-weight: 800;
}

.sim-slot:hover .sim-slot-tooltip,
.sim-slot:focus-visible .sim-slot-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sim-box-console {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  border-inline: 1px solid color-mix(in srgb, var(--border) 60%, #c7ced8);
  color: var(--muted);
}

.sim-console-pad {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  grid-template-rows: repeat(3, 34px);
  gap: 8px;
  place-items: center;
}

.sim-console-pad span,
.sim-console-pad strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, #b7bec8);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 80%, #dbe1e8);
  color: var(--muted-strong);
  font-size: 12px;
}

.sim-console-pad span:first-child {
  grid-column: 2;
}

.sim-console-pad span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.sim-console-pad strong {
  grid-column: 2;
  grid-row: 2;
}

.sim-console-pad span:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.sim-console-pad span:last-child {
  grid-column: 2;
  grid-row: 3;
}

.sim-console-ports {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sim-console-ports span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, #b8c0c9);
  border-radius: 50%;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
}

.sim-console-leds {
  display: grid;
  grid-template-columns: repeat(5, 18px);
  gap: 9px;
  align-items: end;
}

.sim-console-leds span {
  writing-mode: vertical-rl;
  min-height: 72px;
  border-bottom: 26px solid color-mix(in srgb, var(--accent) 42%, #9aa7b6);
  color: var(--muted);
  font-size: 10px;
  text-align: end;
}

.sim-console-leds span.is-muted {
  border-bottom-color: color-mix(in srgb, var(--danger) 42%, #9aa7b6);
}

.sim-detail-grid {
  display: grid;
  gap: 8px;
}

.sim-detail-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px;
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
}

.sim-detail-row span {
  color: var(--muted);
  font-size: 12px;
}

.sim-detail-row strong {
  overflow-wrap: anywhere;
}

.sim-table {
  min-width: 980px;
}

.sim-table-row {
  cursor: pointer;
}

.sim-table-row:hover td {
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
}

.sim-table-row.is-empty td {
  background: color-mix(in srgb, var(--info) 5%, transparent);
}

.sim-table-row.is-deferred td {
  background: color-mix(in srgb, var(--warning) 8%, transparent);
}

.sim-table-row.is-broken td {
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}

@media (min-width: 1500px) {
  .sim-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  }

  .sim-detail-card {
    position: sticky;
    top: 18px;
  }
}

.infrastructure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.infrastructure-map-card {
  min-width: 0;
}

.infrastructure-map-head,
.infra-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.infrastructure-map-head h2,
.infra-detail-head h2 {
  margin: 0;
}

.infrastructure-map-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.infra-map-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(100%, 420px);
}

.infra-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.infra-viewport-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.infra-jump-select {
  min-height: 40px;
  max-width: 210px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
}

.infra-zoom-button {
  width: 40px;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
}

.infra-zoom-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.infra-link-label {
  display: grid;
  gap: 4px;
  min-width: 160px;
  color: var(--muted);
  font-size: 12px;
}

.infra-link-label input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text);
}

.small-action.is-danger {
  border-color: color-mix(in srgb, var(--danger) 54%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-soft));
  color: var(--danger);
}

.infrastructure-map-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.infrastructure-map {
  position: relative;
  min-width: 720px;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 42%, transparent), transparent 58%),
    var(--surface);
  background-size: 46px 46px, 46px 46px, auto, auto;
  cursor: grab;
  touch-action: none;
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    inset 0 0 0 1px color-mix(in srgb, #000000 7%, transparent);
}

.infrastructure-map.is-panning {
  cursor: grabbing;
}

.infra-map-canvas {
  position: absolute;
  inset: 0;
  min-width: inherit;
  min-height: inherit;
  width: 100%;
  height: 100%;
  transform: translate(var(--infra-pan-x), var(--infra-pan-y)) scale(var(--infra-zoom));
  transform-origin: 0 0;
  will-change: transform;
}

.infra-wires {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.infra-wire {
  stroke: var(--accent-strong);
  stroke-width: 0.48;
  stroke-linecap: round;
  stroke-dasharray: 1.8 1.1;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 46%, transparent));
}

.infra-wire.is-warning {
  stroke: var(--warning);
}

.infra-wire-label {
  fill: var(--muted-strong);
  font-size: 3px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 1.2px;
}

.infra-node {
  position: absolute;
  z-index: 2;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 142px;
  min-height: 124px;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 9%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 92%, transparent);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 18px 44px color-mix(in srgb, #000000 24%, transparent);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.infra-node:hover,
.infra-node.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface-strong));
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 22px 54px color-mix(in srgb, var(--accent) 18%, transparent);
}

.infra-node.is-connect-source {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

.infra-node.is-dragging {
  z-index: 4;
  cursor: grabbing;
  border-color: var(--accent);
  box-shadow: 0 18px 54px color-mix(in srgb, var(--accent) 24%, transparent);
}

.infrastructure-map.is-locked .infra-node {
  cursor: pointer;
}

.infra-node.is-warning {
  border-color: color-mix(in srgb, var(--warning) 62%, var(--border));
}

.infra-node.is-danger {
  border-color: color-mix(in srgb, var(--danger) 68%, var(--border));
}

.infra-node__title {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.infra-node__expiry {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.infra-icon {
  position: relative;
  width: 52px;
  height: 42px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--border));
  background: var(--surface-soft);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent) 10%, transparent);
}

.infra-icon.is-server {
  border-radius: 6px;
  background:
    linear-gradient(0deg, transparent 30%, color-mix(in srgb, var(--accent) 16%, transparent) 31% 34%, transparent 35% 63%, color-mix(in srgb, var(--accent) 16%, transparent) 64% 67%, transparent 68%),
    var(--surface-soft);
}

.infra-icon.is-server::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 13px 0 color-mix(in srgb, var(--accent) 72%, transparent);
}

.infra-icon.is-vpn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.infra-icon.is-vpn::before,
.infra-icon.is-vpn::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.infra-icon.is-vpn::after {
  inset: 20px;
  background: var(--accent);
}

.infra-icon.is-computer {
  width: 54px;
  height: 38px;
  border-radius: 5px;
}

.infra-icon.is-computer::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -10px;
  height: 10px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.infra-icon.is-access {
  width: 52px;
  height: 22px;
  margin: 10px 0;
  border-radius: 999px;
}

.infra-icon.is-access::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 3px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface-soft);
}

.infra-icon.is-access::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 14px;
  height: 6px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.infra-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.infra-detail-row,
.infra-connection-row,
.infra-next-action {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
}

.infra-detail-row span,
.infra-connection-row span,
.infra-next-action span {
  color: var(--muted);
}

.infra-detail-row strong,
.infra-connection-row strong,
.infra-next-action strong {
  overflow-wrap: anywhere;
}

.infra-detail-section {
  margin-top: 16px;
}

.infra-node-form {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

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

.infra-detail-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted-strong);
  text-transform: uppercase;
}

.infra-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.infra-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.infra-connection-row {
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  margin-bottom: 8px;
}

.infra-link-delete {
  min-height: 32px;
  padding: 0 10px;
}

.infra-next-action {
  margin-top: 16px;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.infra-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.infra-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-strong);
  color: var(--muted);
}

.table-select {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
}

.table-note {
  display: block;
  max-width: 360px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.client-detail {
  margin-top: 16px;
}

.client-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.client-detail__head h2 {
  margin: 0;
  font-size: 22px;
}

.client-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.client-detail__meta div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    var(--surface);
}

.client-detail__meta span,
.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.client-detail__notes {
  border-left: 3px solid var(--accent);
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--accent-soft);
  color: var(--muted-strong) !important;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.comment-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.comment-form textarea {
  min-height: 78px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
  resize: vertical;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline h3 {
  margin: 0;
  font-size: 16px;
}

.timeline-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, #000000 10%, transparent);
}

.timeline-item p {
  margin: 8px 0 0;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.deal-column {
  min-height: 280px;
  padding: 14px;
}

.deal-list {
  display: grid;
  gap: 10px;
}

.deal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, #000000 10%, transparent);
}

.deal-card strong {
  display: block;
}

.deal-card span {
  color: var(--muted);
  font-size: 13px;
}

.role-matrix {
  display: grid;
  gap: 10px;
}

.role-row,
.mapping-row,
.sync-row,
.activity-row {
  display: grid;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, #000000 10%, transparent);
}

.role-row {
  grid-template-columns: 170px minmax(0, 1fr) 120px;
}

.mapping-row {
  grid-template-columns: minmax(150px, 1fr) 36px minmax(150px, 1fr) 90px;
}

.sync-row {
  grid-template-columns: 120px minmax(0, 1fr) 110px;
}

.activity-row {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
}

.activity-row > span:not(.status-badge) {
  min-width: 0;
}

.activity-row > strong {
  padding-top: 2px;
}

.activity-row .status-badge {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.room-card {
  display: grid;
  gap: 8px;
}

.room-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
  overflow: hidden;
}

.bar-track span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--info));
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: 320px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow:
    inset 0 1px 0 var(--hairline-light),
    0 22px 54px color-mix(in srgb, #000000 26%, transparent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  animation: toastIn 0.2s ease-out;
}

select option {
  background: #25262c;
  color: #f5f5f7;
}

body[data-theme="light"] select option {
  background: #ffffff;
  color: #1d1d1f;
}

/* macOS workspace redesign layer */
body[data-theme="dark"] {
  --desktop: #090a0f;
  --window: rgba(18, 19, 25, 0.86);
  --window-strong: rgba(35, 36, 44, 0.84);
  --sidebar: rgba(31, 33, 41, 0.72);
  --control: rgba(65, 67, 78, 0.58);
  --control-hover: rgba(82, 85, 100, 0.72);
  --line: rgba(255, 255, 255, 0.11);
  --elevated-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  --desktop-lines: rgba(255, 255, 255, 0.035);
}

body[data-theme="light"] {
  --desktop: #e9edf4;
  --window: rgba(248, 249, 252, 0.88);
  --window-strong: rgba(255, 255, 255, 0.9);
  --sidebar: rgba(236, 239, 246, 0.74);
  --control: rgba(255, 255, 255, 0.66);
  --control-hover: rgba(255, 255, 255, 0.92);
  --line: rgba(60, 60, 67, 0.13);
  --elevated-shadow: 0 28px 80px rgba(65, 72, 88, 0.2);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --desktop-lines: rgba(22, 28, 40, 0.04);
}

.app {
  position: relative;
  isolation: isolate;
  padding: clamp(16px, 2.2vw, 30px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent) 0 18%, transparent 40%),
    linear-gradient(225deg, color-mix(in srgb, var(--success) 10%, transparent) 0 12%, transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 24%, transparent), transparent 48%),
    var(--desktop);
}

.app::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg, var(--desktop-lines) 1px, transparent 1px),
    linear-gradient(0deg, var(--desktop-lines) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.topbar,
.app-layout {
  width: min(100%, 1510px);
  margin-inline: auto;
}

.topbar {
  top: clamp(12px, 2vw, 24px);
  min-height: 72px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 13%, transparent), transparent 68%),
    color-mix(in srgb, var(--window-strong) 96%, transparent);
  box-shadow:
    var(--inner-highlight),
    0 18px 54px color-mix(in srgb, #000000 20%, transparent);
}

.topbar::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 24%, transparent), transparent);
  content: "";
}

.topbar__identity {
  min-width: 0;
}

.topbar__identity strong {
  font-size: 16px;
  font-weight: 800;
}

.topbar__identity span:not(.app-logo) {
  display: block;
  margin-top: 2px;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.app-logo {
  min-width: 78px;
  height: 42px;
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 18%, transparent), transparent),
    color-mix(in srgb, var(--accent) 24%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent) 18%, transparent);
}

.topbar__actions {
  gap: 10px;
}

.icon-button,
.theme-toggle,
.ghost-action,
.small-action,
.sound-toggle,
.task-done {
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    var(--control);
  box-shadow:
    var(--inner-highlight),
    0 8px 22px color-mix(in srgb, #000000 13%, transparent);
}

.icon-button:hover,
.theme-toggle:hover,
.ghost-action:hover,
.small-action:hover,
.sound-toggle:hover,
.task-done:hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 16%, transparent), transparent),
    var(--control-hover);
}

.app-layout {
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: calc(100vh - 124px);
  border-color: var(--line);
  background: color-mix(in srgb, var(--window) 94%, transparent);
  box-shadow: var(--elevated-shadow);
}

.task-rail {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent 34%),
    var(--sidebar);
  border-right-color: var(--line);
  padding: 22px 20px;
}

.task-rail__head {
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  color: color-mix(in srgb, var(--accent-strong) 92%, var(--text));
  letter-spacing: 0.08em;
}

.task-rail h2 {
  font-size: 29px;
}

.task-metrics {
  gap: 8px;
  margin: 0 0 18px;
}

.task-metrics div {
  min-height: 86px;
  padding: 13px 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 9%, transparent), transparent),
    color-mix(in srgb, var(--control) 82%, transparent);
}

.task-metrics strong {
  color: var(--accent-strong);
  font-size: 28px;
}

.task-filters {
  border-color: var(--line);
  background: color-mix(in srgb, var(--control) 68%, transparent);
}

.task-filters button {
  min-height: 36px;
  color: color-mix(in srgb, var(--muted-strong) 86%, var(--text));
}

.task-filters button.is-active {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 15%, transparent), transparent),
    color-mix(in srgb, var(--window-strong) 92%, transparent);
}

.task-create,
.task-card {
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent 70%),
    color-mix(in srgb, var(--control) 76%, transparent);
}

.task-create label {
  font-weight: 650;
}

.task-create input,
.task-create select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.client-form input,
.client-form select,
.client-form textarea,
.comment-form textarea,
.infra-jump-select,
.infra-link-label input,
.table-select {
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent),
    color-mix(in srgb, var(--window) 78%, transparent);
}

.workspace-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--window-strong) 40%, transparent), transparent 340px),
    color-mix(in srgb, var(--window) 92%, transparent);
}

.module-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  padding: 14px 22px;
  border-bottom-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent),
    color-mix(in srgb, var(--window-strong) 92%, transparent);
}

.module-tabs button {
  min-height: 38px;
  border-color: transparent;
  color: color-mix(in srgb, var(--muted-strong) 84%, var(--text));
  font-size: 13px;
  font-weight: 760;
}

.module-tabs button:hover {
  background: color-mix(in srgb, var(--control) 72%, transparent);
}

.module-tabs button.is-active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 16%, transparent), transparent 62%),
    color-mix(in srgb, var(--accent) 22%, var(--window-strong));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 20%, transparent),
    0 12px 30px color-mix(in srgb, var(--accent) 16%, transparent);
}

.workspace {
  height: calc(100vh - 172px);
  padding: 26px;
}

.page-header {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 138px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, #ffffff 9%, transparent), transparent),
    color-mix(in srgb, var(--window-strong) 86%, transparent);
  box-shadow:
    var(--inner-highlight),
    0 22px 58px color-mix(in srgb, #000000 16%, transparent);
}

.page-header::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 32%, transparent), transparent);
  content: "";
}

.page-header h1 {
  max-width: 880px;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 850;
}

.page-header p {
  max-width: 780px;
  color: color-mix(in srgb, var(--muted-strong) 72%, var(--muted));
  font-size: 16px;
}

.access-badge {
  position: relative;
  z-index: 1;
  max-width: 360px;
  justify-content: center;
  min-height: 34px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 10%, transparent), transparent),
    color-mix(in srgb, var(--control) 82%, transparent);
  white-space: normal;
}

.section-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.stat-card,
.content-card,
.room-card,
.deal-column,
.sim-box-card,
.sim-detail-card,
.sim-table-card,
.infrastructure-map-card {
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent 70%),
    color-mix(in srgb, var(--window-strong) 86%, transparent);
  box-shadow:
    var(--inner-highlight),
    0 20px 52px color-mix(in srgb, #000000 15%, transparent);
}

.stat-card {
  position: relative;
  min-height: 104px;
  padding: 18px 18px 16px;
}

.stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--accent), var(--info));
  content: "";
}

.stat-card span {
  font-weight: 650;
}

.stat-card strong {
  margin-top: 12px;
  font-size: 30px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.55fr);
  gap: 16px;
}

.content-card h2,
.deal-column h2,
.room-card h2,
.sim-box-head h2,
.sim-detail-head h2,
.infrastructure-map-head h2,
.infra-detail-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 820;
}

.content-card h2::before,
.deal-column h2::before,
.room-card h2::before,
.sim-box-head h2::before,
.sim-detail-head h2::before,
.infrastructure-map-head h2::before,
.infra-detail-head h2::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 54%, transparent);
  content: "";
}

.data-table-wrap {
  border-color: var(--line);
  background: color-mix(in srgb, var(--window) 76%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 8%, transparent);
}

.data-table th {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent),
    color-mix(in srgb, var(--window-strong) 94%, transparent);
}

.data-table td {
  background: color-mix(in srgb, var(--window) 32%, transparent);
}

.data-table tbody tr:nth-child(odd) td {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.status-badge,
.chip {
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 9%, transparent), transparent),
    color-mix(in srgb, currentColor 12%, transparent);
}

.activity-row,
.user-row,
.role-row,
.mapping-row,
.sync-row,
.timeline-item,
.deal-card,
.client-detail__meta div,
.sim-detail-row,
.infra-detail-row,
.infra-connection-row,
.infra-next-action {
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 7%, transparent), transparent 72%),
    color-mix(in srgb, var(--window) 72%, transparent);
}

.user-list .user-row {
  grid-template-columns: repeat(3, minmax(0, auto));
  align-items: start;
}

.user-list .user-row > div {
  grid-column: 1 / -1;
  min-width: 0;
}

.user-list .user-row .chip,
.user-list .user-row .status-badge {
  justify-self: start;
}

.user-list .user-row .small-action {
  grid-column: 1 / -1;
  width: 100%;
}

.user-list .user-row strong,
.user-list .user-row span {
  overflow-wrap: anywhere;
}

.infrastructure-map-head {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(340px, 1.2fr);
  align-items: start;
}

.infra-map-controls {
  min-width: 0;
}

.infra-map-actions,
.infra-viewport-controls {
  gap: 7px;
}

.infra-map-actions .small-action,
.infra-viewport-controls .small-action,
.infra-zoom-button {
  min-height: 38px;
}

.sim-layout,
.infrastructure-layout {
  gap: 18px;
}

.sim-box-shell,
.infrastructure-map {
  border-color: var(--line);
  box-shadow:
    var(--inner-highlight),
    0 22px 64px color-mix(in srgb, #000000 22%, transparent);
}

.sim-slot:hover,
.sim-slot:focus-visible,
.sim-slot.is-selected {
  border-color: color-mix(in srgb, var(--accent) 72%, white);
  background: color-mix(in srgb, var(--window-strong) 82%, transparent);
}

.infra-node {
  border-color: color-mix(in srgb, var(--line) 88%, var(--accent));
}

.infra-node__title {
  font-size: 14px;
}

.toast {
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 38px);
}

@keyframes gridDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(42px, 42px, 0);
  }
}

@keyframes signalSweep {
  from {
    transform: translateX(-40vw) rotate(17deg);
  }
  to {
    transform: translateX(70vw) rotate(17deg);
  }
}

@keyframes toastIn {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .app-layout {
    grid-template-columns: 308px minmax(0, 1fr);
  }

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

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

  .sim-layout {
    grid-template-columns: 1fr;
  }

  .infrastructure-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app {
    padding: 0;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(100% - 28px, 560px);
    align-content: center;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .login-copy p {
    font-size: 17px;
  }

  .topbar {
    top: 0;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding-left: 22px;
    padding-top: 42px;
  }

  .topbar::before {
    top: 20px;
  }

  .app-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .task-rail {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace {
    height: auto;
    min-height: 60vh;
  }

  .content-grid,
  .sim-layout,
  .infrastructure-layout,
  .client-detail__meta,
  .section-grid,
  .room-grid {
    grid-template-columns: 1fr;
  }

  .sim-box-head,
  .sim-detail-head {
    flex-direction: column;
  }

  .sim-status-legend {
    justify-content: flex-start;
  }

  .sim-box-shell {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .sim-box-console {
    min-height: 210px;
    border-block: 1px solid color-mix(in srgb, var(--border) 60%, #c7ced8);
    border-inline: 0;
  }

  .infrastructure-map-head {
    flex-direction: column;
  }

  .infra-map-controls {
    justify-items: stretch;
    width: 100%;
  }

  .infra-map-actions,
  .infra-viewport-controls {
    justify-content: flex-start;
  }

  .role-row,
  .mapping-row,
  .sync-row,
  .activity-row,
  .user-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .module-checks,
  .task-create__grid,
  .task-metrics,
  .task-filters {
    grid-template-columns: 1fr;
  }

  .login-card,
  .task-rail,
  .workspace {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .sim-box-shell {
    padding: 0;
  }

  .sim-slot-grid {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
    grid-auto-rows: minmax(44px, 1fr);
    gap: 6px;
  }

  .sim-slot {
    padding-right: 5px;
  }

  .sim-slot-tooltip {
    width: 220px;
  }

  .infrastructure-map {
    min-width: 640px;
    min-height: 480px;
  }

  .infra-position-grid {
    grid-template-columns: 1fr;
  }

  .infra-node {
    width: 128px;
    min-height: 118px;
  }
}

/* Video login screen restored from the 2026-06-24 frontend version. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-screen {
  display: grid;
  place-items: center;
  background: #030403;
}

.login-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #030403;
}

.login-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  place-items: center;
  width: min(100% - 40px, 420px);
  min-height: 100vh;
  padding: 32px 0;
}

.login-card {
  width: min(360px, calc(100vw - 40px));
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-form {
  width: min(360px, calc(100vw - 40px));
  gap: 22px;
}

.login-form label {
  position: relative;
  gap: 0;
}

.login-form label::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 255, 0, 0.95), transparent);
  content: "";
  opacity: 0;
  transform: scaleX(0.28);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.login-form label:focus-within::after {
  opacity: 1;
  transform: scaleX(1);
}

.login-form label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-form input {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid rgba(246, 255, 244, 0.46);
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  color: #f8fff6;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  outline-offset: 6px;
  transition: border-color 0.22s ease, text-shadow 0.22s ease;
}

.login-form input::placeholder {
  color: rgba(248, 255, 246, 0.72);
}

.login-form input:focus {
  border-bottom-color: #b8ff00;
  text-shadow: 0 0 18px rgba(184, 255, 0, 0.18);
}

.login-form input:focus-visible {
  outline: 0;
}

.login-error {
  min-height: 18px;
  color: #ff6a78;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.72);
}

@media (max-width: 520px) {
  .login-layout {
    width: min(100% - 32px, 360px);
  }

  .login-card {
    padding: 0;
  }
}

/* Full-screen Liquid Glass account redesign. */
.app {
  padding: 0;
  background:
    linear-gradient(120deg, rgba(7, 35, 61, 0.92), rgba(3, 8, 12, 0.96) 42%, rgba(4, 35, 22, 0.86)),
    var(--desktop);
}

.app::before {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 38%, rgba(112, 198, 255, 0.08) 39% 41%, transparent 42% 100%),
    linear-gradient(245deg, transparent 0 46%, rgba(83, 255, 174, 0.055) 47% 49%, transparent 50% 100%);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.32));
}

.app::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 22%),
    linear-gradient(90deg, rgba(10, 132, 255, 0.12), transparent 28%, transparent 72%, rgba(50, 215, 75, 0.1));
  content: "";
  pointer-events: none;
}

.topbar,
.app-layout {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.topbar {
  top: 0;
  min-height: 78px;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 13px 30px 13px 104px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(24, 27, 35, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 44px rgba(0, 0, 0, 0.18);
}

.topbar::before {
  left: 31px;
}

.topbar::after {
  right: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(94, 177, 255, 0.36), rgba(50, 215, 75, 0.18), transparent);
}

.topbar__identity {
  gap: 16px;
}

.app-logo {
  min-width: 86px;
  height: 44px;
  border-color: rgba(94, 177, 255, 0.58);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 50%),
    linear-gradient(180deg, rgba(10, 132, 255, 0.46), rgba(10, 132, 255, 0.18));
  color: #9ed0ff;
  letter-spacing: 0.02em;
}

.topbar__identity strong {
  font-size: 17px;
}

.topbar__actions {
  gap: 12px;
}

.icon-button,
.theme-toggle,
.ghost-action {
  min-height: 44px;
}

.app-layout {
  grid-template-columns: minmax(310px, 17.5vw) minmax(0, 1fr);
  min-height: calc(100vh - 78px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.task-rail {
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 22%),
    rgba(24, 27, 36, 0.58);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.08),
    16px 0 48px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(36px) saturate(1.34);
  -webkit-backdrop-filter: blur(36px) saturate(1.34);
}

.workspace-panel {
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.module-tabs {
  top: 0;
  min-height: 64px;
  margin: 18px 26px 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(22, 24, 33, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(34px) saturate(1.34);
  -webkit-backdrop-filter: blur(34px) saturate(1.34);
}

.module-tabs button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 18px;
}

.module-tabs button.is-active {
  border-color: rgba(116, 199, 255, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 58%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.52), rgba(10, 132, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 28px rgba(10, 132, 255, 0.24);
}

.workspace {
  height: calc(100vh - 160px);
  padding: 24px 26px 46px;
}

.page-header {
  min-height: 178px;
  margin-bottom: 20px;
  padding: 30px 32px;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(120deg, rgba(126, 203, 255, 0.18), transparent 36%),
    linear-gradient(280deg, rgba(74, 255, 183, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.045)),
    rgba(29, 32, 43, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 26px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(34px) saturate(1.3);
  -webkit-backdrop-filter: blur(34px) saturate(1.3);
}

.page-header h1 {
  font-size: clamp(38px, 4vw, 62px);
  line-height: 0.98;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.page-header p {
  max-width: 980px;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.55;
}

.access-badge {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    rgba(255, 255, 255, 0.08);
}

.section-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
}

.content-grid {
  grid-template-columns: minmax(0, 2.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.stat-card,
.content-card,
.room-card,
.deal-column,
.sim-box-card,
.sim-detail-card,
.sim-table-card,
.infrastructure-map-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.028)),
    rgba(28, 31, 42, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 64px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(32px) saturate(1.28);
  -webkit-backdrop-filter: blur(32px) saturate(1.28);
}

.stat-card::after,
.content-card::after,
.room-card::after,
.deal-column::after,
.sim-box-card::after,
.sim-detail-card::after,
.sim-table-card::after,
.infrastructure-map-card::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 22% 78%, rgba(255, 255, 255, 0.055));
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.stat-card,
.content-card,
.room-card,
.deal-column,
.sim-box-card,
.sim-detail-card,
.sim-table-card,
.infrastructure-map-card {
  isolation: isolate;
}

.stat-card > *,
.content-card > *,
.room-card > *,
.deal-column > *,
.sim-box-card > *,
.sim-detail-card > *,
.sim-table-card > *,
.infrastructure-map-card > * {
  position: relative;
  z-index: 1;
}

.stat-card {
  min-height: 118px;
  padding: 22px 20px;
}

.stat-card strong {
  font-size: 36px;
}

.task-metrics div,
.task-create,
.task-card,
.activity-row,
.user-row,
.role-row,
.mapping-row,
.sync-row,
.timeline-item,
.deal-card,
.client-detail__meta div,
.sim-detail-row,
.infra-detail-row,
.infra-connection-row,
.infra-next-action,
.module-check {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), transparent),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 38px rgba(0, 0, 0, 0.1);
}

.data-table-wrap {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 16, 0.28);
}

.data-table th {
  background: rgba(255, 255, 255, 0.07);
}

.data-table td {
  background: rgba(255, 255, 255, 0.018);
}

.data-table tbody tr:nth-child(odd) td {
  background: rgba(10, 132, 255, 0.055);
}

.sim-layout {
  grid-template-columns: minmax(0, 2.2fr) minmax(330px, 0.8fr);
  align-items: start;
}

.sim-box-shell {
  min-width: min(940px, 100%);
  background: rgba(255, 255, 255, 0.08);
}

.sim-detail-card {
  position: sticky;
  top: 92px;
}

.infrastructure-layout {
  grid-template-columns: minmax(0, 2fr) minmax(360px, 0.8fr);
}

.infrastructure-map-head {
  grid-template-columns: minmax(220px, 0.9fr) minmax(420px, 1.1fr);
}

.infrastructure-map,
.sim-box-shell {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(94, 177, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(94, 177, 255, 0.07) 1px, transparent 1px),
    rgba(11, 14, 21, 0.28);
  background-size: 46px 46px, 46px 46px, auto;
}

.workspace,
.task-rail,
.module-tabs {
  scrollbar-gutter: stable;
}

body[data-theme="light"] .app {
  background:
    linear-gradient(120deg, rgba(181, 218, 255, 0.84), rgba(247, 249, 253, 0.95) 46%, rgba(205, 255, 229, 0.72)),
    var(--desktop);
}

body[data-theme="light"] .topbar,
body[data-theme="light"] .task-rail,
body[data-theme="light"] .module-tabs,
body[data-theme="light"] .page-header,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .content-card,
body[data-theme="light"] .room-card,
body[data-theme="light"] .deal-column,
body[data-theme="light"] .sim-box-card,
body[data-theme="light"] .sim-detail-card,
body[data-theme="light"] .sim-table-card,
body[data-theme="light"] .infrastructure-map-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.7), transparent 36%),
    rgba(255, 255, 255, 0.58);
}

@media (max-width: 1280px) {
  .app-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .content-grid,
  .sim-layout,
  .infrastructure-layout {
    grid-template-columns: 1fr;
  }

  .sim-detail-card {
    position: static;
  }
}

/* CRM polish batch v1: compact tasks, work directories, calmer requisites, table ergonomics. */
.task-rail {
  padding: 12px 12px 14px 18px;
  overflow: auto;
}

.task-rail__head {
  min-height: 62px;
  padding: 11px 12px;
  border-radius: 12px;
}

.task-rail h2 {
  font-size: 30px;
  line-height: 1;
}

.sound-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.task-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.task-metrics div {
  min-height: 56px;
  grid-template-columns: 1fr;
  place-items: center;
  row-gap: 3px;
  padding: 7px 5px;
  text-align: center;
  border-radius: 11px;
}

.task-metrics strong {
  grid-row: auto;
  min-width: 0;
  font-size: 25px;
  line-height: 1;
}

.task-metrics span {
  align-self: auto;
  font-size: 11px;
  line-height: 1.05;
}

.task-filters {
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
}

.task-filters button {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 7px;
  font-size: 12px;
}

.task-create {
  padding: 10px;
  border-radius: 12px;
}

.task-create__grid {
  gap: 7px;
}

.task-create label {
  gap: 5px;
}

.task-create label span {
  font-size: 10.5px;
}

.task-create input,
.task-create select {
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.task-create .small-action {
  min-height: 34px;
  border-radius: 9px;
}

.task-list {
  gap: 7px;
  padding-bottom: 10px;
}

.task-card {
  border-radius: 11px;
  padding: 9px 10px;
  gap: 6px;
  border-left: 3px solid rgba(139, 202, 255, 0.35);
}

.task-card.is-urgent {
  border-left-color: rgba(255, 191, 87, 0.8);
}

.task-card.is-overdue {
  border-left-color: rgba(255, 112, 105, 0.86);
}

.task-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(246, 248, 246, 0.9);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-card__meta,
.task-card__footer {
  gap: 8px;
  font-size: 10.5px;
}

.task-done {
  min-height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

.workspace.workspace--work-directory {
  height: calc(100vh - var(--topbar-height) - 12px);
  padding: 2px 3px 4px;
  overflow: hidden;
}

.work-directory-live {
  --work-window: rgba(25, 33, 27, 0.97);
  --work-toolbar: rgba(23, 31, 25, 0.93);
  --work-line: rgba(255, 255, 255, 0.11);
  --work-line-soft: rgba(255, 255, 255, 0.07);
  --work-text: #f3f6f1;
  --work-muted: rgba(243, 246, 241, 0.62);
  --work-faint: rgba(243, 246, 241, 0.42);
  --work-row: rgba(255, 255, 255, 0.038);
  --work-row-alt: rgba(255, 255, 255, 0.026);
  --work-selected: rgba(178, 185, 178, 0.54);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px 42px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--work-line);
  border-radius: 14px;
  background: var(--work-window);
  color: var(--work-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.firms-requisites-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  gap: 5px;
  overflow: hidden;
}

.firms-requisites-tabs {
  width: max-content;
  min-width: 216px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(94px, 1fr));
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--lg-line) 78%, transparent);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), transparent),
    color-mix(in srgb, var(--surface-soft) 48%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 9%, transparent);
}

.firms-requisites-tab {
  min-width: 0;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.firms-requisites-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}

.firms-requisites-tab.is-active {
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 16%, transparent), transparent 68%),
    color-mix(in srgb, var(--accent) 24%, var(--lg-panel-strong));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 18%, transparent),
    0 8px 22px color-mix(in srgb, var(--accent) 14%, transparent);
}

.firms-requisites-panel,
.firms-requisites-host {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.firms-requisites-panel > .work-directory-live,
.firms-requisites-host > .requisites-live {
  height: 100%;
}

.work-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(180px, 1fr) auto minmax(240px, 360px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-bottom: 1px solid var(--work-line);
  background: var(--work-toolbar);
}

.work-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.work-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.work-title {
  min-width: 0;
}

.work-title h1 {
  margin: 0;
  color: var(--work-text);
  font-size: 18px;
  line-height: 1.05;
  font-weight: 730;
  letter-spacing: 0;
}

.work-title div {
  margin-top: 3px;
  overflow: hidden;
  color: var(--work-muted);
  font-size: 12px;
  font-weight: 570;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-stats {
  display: flex;
  gap: 7px;
}

.work-stats div {
  min-width: 58px;
  height: 38px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0 8px;
  border: 1px solid var(--work-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.work-stats strong {
  color: var(--work-text);
  font-size: 14px;
  line-height: 1;
}

.work-stats span {
  margin-top: 3px;
  color: var(--work-muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.work-search {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--work-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 247, 244, 0.88);
}

.work-search span {
  font-size: 19px;
  line-height: 1;
}

.work-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--work-text);
  font: inherit;
  font-size: 13px;
}

.work-search input::placeholder {
  color: var(--work-muted);
}

.work-filterbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--work-line);
  background: rgba(255, 255, 255, 0.022);
}

.work-filterbar button {
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--work-muted);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
}

.work-filterbar button.is-active {
  border-color: var(--work-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--work-text);
}

.work-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.work-directory-live.is-global {
  --global-payer: rgba(83, 213, 139, 0.92);
  --global-receiver: rgba(111, 174, 255, 0.94);
  --global-review: rgba(235, 195, 96, 0.95);
  --work-window: rgba(18, 24, 21, 0.98);
  --work-toolbar: rgba(20, 27, 24, 0.96);
}

.work-directory-live.is-global .work-toolbar {
  grid-template-columns: 62px minmax(170px, 1fr) auto minmax(220px, 340px);
}

.global-filterbar button {
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.global-filterbar button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--work-text);
}

.global-filterbar button:active {
  transform: translateY(1px);
}

.global-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.global-lanes {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 10px;
  padding: 10px;
  overflow: auto;
  border-right: 1px solid var(--work-line);
}

.global-lane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  gap: 8px;
}

.global-lane-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 0 4px;
  color: var(--work-muted);
  font-size: 12px;
  font-weight: 760;
}

.global-lane-head strong {
  min-width: 32px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--work-line-soft);
  border-radius: 8px;
  color: var(--work-text);
  font-variant-numeric: tabular-nums;
}

.global-card-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.global-client-card {
  width: 100%;
  min-width: 0;
  min-height: 104px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--work-line-soft);
  border-left: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.042);
  color: var(--work-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.global-client-card:hover,
.global-client-card.is-selected {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.075);
}

.global-client-card:active {
  transform: translateY(1px);
}

.global-client-card.is-payer,
.global-lane.is-payer .global-lane-head strong,
.global-role.is-payer {
  border-left-color: var(--global-payer);
}

.global-client-card.is-receiver,
.global-lane.is-receiver .global-lane-head strong,
.global-role.is-receiver {
  border-left-color: var(--global-receiver);
}

.global-client-card.is-review,
.global-lane.is-review .global-lane-head strong,
.global-role.is-review {
  border-left-color: var(--global-review);
}

.global-lane.is-payer .global-lane-head strong {
  color: var(--global-payer);
}

.global-lane.is-receiver .global-lane-head strong {
  color: var(--global-receiver);
}

.global-lane.is-review .global-lane-head strong {
  color: var(--global-review);
}

.global-card-top,
.global-card-bottom {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-card-top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 790;
  line-height: 1.14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-card-top i,
.global-role {
  display: inline-grid;
  min-height: 23px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--work-line-soft);
  border-left: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 247, 244, 0.86);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 820;
  white-space: nowrap;
}

.global-client-card > span:not(.global-card-top):not(.global-card-bottom),
.global-card-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-card-bottom em {
  min-width: 62px;
  color: rgba(244, 247, 244, 0.92);
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.global-card-bottom small {
  min-width: 0;
  overflow: hidden;
  color: var(--work-faint);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-preview {
  background: rgba(9, 14, 12, 0.34);
}

.global-preview-head h2 {
  font-size: 24px;
}

.global-empty {
  min-height: 84px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--work-line-soft);
  border-radius: 9px;
  color: var(--work-faint);
  font-size: 12px;
  font-weight: 650;
}

.global-list-wrap {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--work-line);
}

.global-list-head,
.global-client-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) 92px minmax(170px, 1fr) 92px minmax(130px, 0.8fr);
  align-items: center;
}

.global-list-head {
  padding: 0 10px;
  border-bottom: 1px solid var(--work-line);
  color: var(--work-muted);
  font-size: 11px;
  font-weight: 780;
}

.global-list-head span {
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-list {
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 10px;
}

.global-client-row {
  width: 100%;
  min-height: 42px;
  margin-bottom: 3px;
  border: 1px solid var(--work-line-soft);
  border-left: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.038);
  color: var(--work-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.global-client-row:hover,
.global-client-row.is-selected {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.072);
}

.global-client-row:active {
  transform: translateY(1px);
}

.global-client-row.is-payer {
  border-left-color: var(--global-payer);
}

.global-client-row.is-receiver {
  border-left-color: var(--global-receiver);
}

.global-client-row.is-review {
  border-left-color: var(--global-review);
}

.global-client-row > span,
.global-client-row > em {
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-client-main {
  display: grid;
  gap: 2px;
}

.global-client-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 790;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-client-main small {
  min-width: 0;
  overflow: hidden;
  color: var(--work-muted);
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-client-row > span:not(.global-client-main) {
  color: rgba(244, 247, 244, 0.76);
  font-size: 12px;
  font-weight: 650;
}

.global-client-row > em {
  color: rgba(244, 247, 244, 0.92);
  font-style: normal;
  font-size: 12px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.global-client-row .global-role {
  width: fit-content;
  max-width: calc(100% - 12px);
  justify-self: start;
  margin-left: 8px;
}

.resizable-column-cell {
  position: relative;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  width: 14px;
  min-width: 14px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  cursor: col-resize;
  opacity: 0;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 0;
  right: 3px;
  bottom: 0;
  width: 1px;
  border-radius: 999px;
  background: rgba(142, 188, 255, 0.78);
  box-shadow: 0 0 12px rgba(91, 156, 255, 0.42);
}

.resizable-column-cell:hover > .column-resize-handle,
.column-resize-handle:hover,
.column-resize-handle:focus-visible,
.is-column-resizing .column-resize-handle {
  opacity: 1;
}

.is-column-resizing,
.is-column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.work-table-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--work-line);
}

.work-columns,
.work-row {
  display: grid;
}

.work-directory-live.is-companies .work-columns,
.work-directory-live.is-companies .work-row {
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.72fr) minmax(110px, 0.72fr) 108px minmax(150px, 0.95fr);
}

.work-directory-live.is-world .work-columns,
.work-directory-live.is-world .work-row {
  grid-template-columns: minmax(100px, 0.65fr) 118px minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr);
}

.work-columns {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: end;
  padding: 0 5px;
  border-bottom: 1px solid var(--work-line);
  background: var(--work-window);
  color: var(--work-muted);
  font-size: 12px;
  font-weight: 680;
}

.work-columns div {
  min-width: 0;
  padding: 0 8px 8px;
  overflow: hidden;
  border-left: 1px solid var(--work-line-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-columns div:first-child {
  border-left: 0;
  padding-left: 12px;
}

.work-table {
  min-height: 0;
  overflow: auto;
  padding: 5px 5px 8px;
}

.work-row {
  width: 100%;
  min-height: 33px;
  align-items: center;
  margin-bottom: 1px;
  border: 0;
  border-radius: 7px;
  background: var(--work-row);
  color: var(--work-text);
  cursor: default;
  font: inherit;
  font-size: 13.5px;
  font-weight: 560;
  text-align: left;
}

.work-row:nth-child(even) {
  background: var(--work-row-alt);
}

.work-row:hover,
.work-row.is-selected {
  background: var(--work-selected);
}

.work-row span {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-row span:first-child {
  padding-left: 12px;
  font-weight: 730;
}

.work-status {
  display: inline-grid;
  max-width: 100%;
  min-height: 22px;
  place-items: center;
  padding: 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(112, 179, 128, 0.18);
  color: rgba(195, 242, 207, 0.95);
  font-style: normal;
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-status.is-watch {
  background: rgba(226, 198, 91, 0.17);
  color: rgba(249, 225, 129, 0.95);
}

.work-status.is-risk {
  background: rgba(226, 116, 109, 0.17);
  color: rgba(255, 174, 168, 0.95);
}

.work-preview {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  background: rgba(13, 19, 15, 0.28);
}

.work-preview-head {
  display: grid;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--work-line);
}

.work-preview-head span {
  color: var(--work-muted);
  font-size: 10.5px;
  font-weight: 760;
  text-transform: uppercase;
}

.work-preview-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--work-text);
  font-size: 22px;
  line-height: 1.08;
  text-overflow: ellipsis;
}

.work-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.work-fact,
.work-note {
  border: 1px solid var(--work-line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.work-fact {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 9px 10px;
}

.work-fact span,
.work-note span {
  color: var(--work-muted);
  font-size: 10.5px;
  font-weight: 780;
  text-transform: uppercase;
}

.work-fact strong {
  min-width: 0;
  overflow: hidden;
  color: var(--work-text);
  font-size: 15px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-note {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.work-note p {
  margin: 0;
  color: rgba(241, 245, 239, 0.82);
  font-size: 13px;
  line-height: 1.35;
}

.work-note.is-warning {
  border-color: rgba(226, 116, 109, 0.25);
  background: rgba(226, 116, 109, 0.08);
}

.work-note.is-starter {
  border-color: rgba(105, 176, 255, 0.18);
  background: rgba(105, 176, 255, 0.07);
}

.work-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--work-muted);
  font-size: 13px;
  font-weight: 650;
}

.data-table-wrap {
  overflow: auto;
}

.data-table {
  table-layout: fixed;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  resize: horizontal;
  background: color-mix(in srgb, var(--surface-strong) 82%, #111812);
}

.data-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-columns,
.req-columns,
.bf-columns,
.ops-columns {
  position: sticky;
  top: 0;
  z-index: 3;
}

.req-bank {
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.req-bank.is-red { background: linear-gradient(180deg, #b95b5e, #88464a); }
.req-bank.is-green { background: linear-gradient(180deg, #4f9a70, #397458); }
.req-bank.is-blue { background: linear-gradient(180deg, #5e8fc7, #426c9e); }
.req-bank.is-cyan { background: linear-gradient(180deg, #4f9ba3, #3b747a); }
.req-bank.is-violet { background: linear-gradient(180deg, #7c6bb3, #5f528b); }
.req-bank.is-yellow { background: linear-gradient(180deg, #bba65c, #887a45); color: #f8f4df; }
.req-bank.is-teal { background: linear-gradient(180deg, #579b91, #40756f); }
.req-bank.is-gray { background: linear-gradient(180deg, #767f79, #565f59); }

.req-bank.is-active {
  outline: 2px solid rgba(236, 239, 236, 0.35);
  filter: brightness(1.08) saturate(1.05);
}

.ops-preview-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: rgba(243, 246, 241, 0.66);
  text-align: center;
}

.ops-preview-empty strong {
  color: rgba(243, 246, 241, 0.92);
  font-size: 18px;
  line-height: 1.15;
}

.ops-preview-empty span,
.ops-preview-empty em {
  max-width: 330px;
  color: rgba(243, 246, 241, 0.62);
  font-size: 13px;
  font-style: normal;
  line-height: 1.38;
}

.ops-preview-empty em {
  color: rgba(160, 207, 255, 0.78);
}

/* Full embedded project surfaces. */
.workspace.workspace--embedded-app {
  height: calc(100vh - var(--topbar-height) - 50px);
  min-height: 620px;
  padding: 0;
  overflow: hidden;
  background: #020807;
}

.embedded-app {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #020807;
}

.embedded-app__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #020807;
}

.app-layout.is-embedded-app-mode {
  grid-template-columns: 48px minmax(0, 1fr);
}

.app-layout.is-embedded-app-mode .task-rail {
  padding: 16px 6px;
  overflow-y: visible;
}

.app-layout.is-embedded-app-mode .task-rail__head {
  display: none;
}

.app-layout.is-embedded-app-mode .task-rail__title,
.app-layout.is-embedded-app-mode .sound-toggle,
.app-layout.is-embedded-app-mode .task-rail__content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-10px);
}

.app-layout.is-embedded-app-mode .task-rail__actions {
  justify-content: center;
}

.app-layout.is-embedded-app-mode .task-rail-toggle {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
}

.app-layout.is-embedded-app-mode .task-rail-mini {
  display: flex;
  margin-top: 0;
}

.app-layout.is-embedded-app-mode .workspace-panel {
  padding-left: 8px;
}

body[data-theme="light"] .work-directory-live {
  --work-window: rgba(246, 248, 245, 0.97);
  --work-toolbar: rgba(241, 244, 240, 0.94);
  --work-line: rgba(34, 45, 38, 0.13);
  --work-line-soft: rgba(34, 45, 38, 0.08);
  --work-text: #172017;
  --work-muted: rgba(23, 32, 23, 0.58);
  --work-faint: rgba(23, 32, 23, 0.42);
  --work-row: rgba(23, 32, 23, 0.045);
  --work-row-alt: rgba(23, 32, 23, 0.028);
  --work-selected: rgba(127, 137, 128, 0.36);
}

@media (max-width: 1280px) {
  .work-toolbar {
    grid-template-columns: 62px minmax(160px, 1fr) auto minmax(190px, 250px);
  }

  .work-content {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .task-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app {
    padding: 0;
  }

  .topbar {
    min-height: 138px;
    padding: 42px 16px 12px;
  }

  .topbar::before {
    left: 16px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .task-rail {
    position: relative;
    top: auto;
    height: auto;
    border-right: 0;
  }

  .module-tabs {
    margin: 14px 12px 0;
  }

  .workspace {
    height: auto;
    min-height: 70vh;
    padding: 14px 12px 28px;
  }

  .page-header {
    min-height: 0;
    padding: 22px 18px;
  }

  .page-header h1 {
    font-size: 30px;
  }

  .section-grid,
  .content-grid,
  .sim-layout,
  .infrastructure-layout {
    grid-template-columns: 1fr;
  }

  .infrastructure-map-head {
    grid-template-columns: 1fr;
  }
}

/* Liquid Glass V2: change the screen silhouette, not only the paint. */
body[data-theme="dark"] {
  --lg-bg-a: #04101c;
  --lg-bg-b: #06140e;
  --lg-panel: rgba(255, 255, 255, 0.065);
  --lg-panel-strong: rgba(255, 255, 255, 0.105);
  --lg-line: rgba(255, 255, 255, 0.16);
  --lg-glow-blue: rgba(37, 150, 255, 0.28);
  --lg-glow-green: rgba(75, 255, 172, 0.16);
}

body[data-theme="light"] {
  --lg-bg-a: #e7f2ff;
  --lg-bg-b: #e9fff2;
  --lg-panel: rgba(255, 255, 255, 0.62);
  --lg-panel-strong: rgba(255, 255, 255, 0.78);
  --lg-line: rgba(80, 92, 120, 0.18);
  --lg-glow-blue: rgba(0, 122, 255, 0.18);
  --lg-glow-green: rgba(40, 205, 65, 0.12);
}

.app {
  background:
    radial-gradient(circle at 22% 0%, rgba(72, 169, 255, 0.26), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(67, 255, 170, 0.18), transparent 34%),
    radial-gradient(circle at 52% 100%, rgba(10, 132, 255, 0.16), transparent 46%),
    linear-gradient(135deg, var(--lg-bg-a), #02060a 46%, var(--lg-bg-b));
}

.app::before {
  opacity: 0.88;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 34%, rgba(118, 213, 255, 0.12) 34.3% 34.8%, transparent 35.1%),
    linear-gradient(250deg, transparent 0 58%, rgba(95, 255, 180, 0.075) 58.2% 58.7%, transparent 59%);
  background-size: 42px 42px, 42px 42px, 100% 100%, 100% 100%;
}

.topbar {
  min-height: 76px;
  padding-right: 28px;
  border-bottom-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(11, 16, 24, 0.44);
  backdrop-filter: blur(42px) saturate(1.45);
  -webkit-backdrop-filter: blur(42px) saturate(1.45);
}

.topbar::after {
  opacity: 0.72;
}

.app-layout {
  grid-template-columns: minmax(320px, 17vw) minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  align-items: start;
  background: transparent;
}

.task-rail {
  top: 76px;
  height: calc(100vh - 76px);
  padding: 26px 18px 26px 22px;
  border-right: 0;
  background: transparent;
  box-shadow: none;
}

.task-rail__head {
  min-height: 76px;
  border: 1px solid var(--lg-line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.16), transparent 46%),
    var(--lg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 22px 54px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
}

.task-metrics {
  grid-template-columns: 1fr;
  gap: 10px;
}

.task-metrics div {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 12px;
  border-color: var(--lg-line);
  background:
    linear-gradient(120deg, rgba(116, 199, 255, 0.16), transparent 46%),
    var(--lg-panel);
}

.task-metrics strong {
  grid-row: 1 / span 2;
  min-width: 54px;
  font-size: 32px;
}

.task-metrics span {
  align-self: end;
  font-size: 13px;
}

.task-filters,
.task-create,
.task-card {
  border-color: var(--lg-line);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), transparent 42%),
    var(--lg-panel);
  backdrop-filter: blur(30px) saturate(1.28);
  -webkit-backdrop-filter: blur(30px) saturate(1.28);
}

.workspace-panel {
  padding: 22px 24px 32px 10px;
}

.module-tabs {
  margin: 0 0 22px;
  min-height: 62px;
  border-color: var(--lg-line);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.055);
}

.module-tabs button {
  color: color-mix(in srgb, var(--text) 84%, transparent);
  opacity: 0.82;
}

.module-tabs button.is-active {
  opacity: 1;
}

.workspace {
  height: calc(100vh - 182px);
  padding: 0;
}

.page-header {
  min-height: 206px;
  margin-bottom: 22px;
  padding: 34px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  align-items: center;
  border-color: rgba(255, 255, 255, 0.19);
  background:
    radial-gradient(circle at 18% 10%, rgba(120, 211, 255, 0.26), transparent 34%),
    radial-gradient(circle at 96% 18%, rgba(106, 255, 188, 0.2), transparent 32%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 58%),
    rgba(255, 255, 255, 0.055);
}

.page-header h1 {
  font-size: clamp(46px, 5.2vw, 86px);
  letter-spacing: 0;
}

.page-header p {
  max-width: 1080px;
  font-size: 19px;
}

.section-grid {
  gap: 18px;
}

.stat-card {
  min-height: 138px;
  border-color: var(--lg-line);
  background:
    radial-gradient(circle at 18% 0%, rgba(116, 199, 255, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 46%),
    var(--lg-panel);
}

.stat-card strong {
  font-size: 42px;
}

.content-grid {
  grid-template-columns: minmax(0, 2.6fr) minmax(300px, 0.7fr);
}

.content-card,
.sim-box-card,
.sim-detail-card,
.sim-table-card,
.infrastructure-map-card {
  border-color: var(--lg-line);
  background:
    radial-gradient(circle at 8% 0%, rgba(116, 199, 255, 0.14), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(83, 255, 174, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.052);
}

.data-table-wrap {
  background: rgba(3, 7, 12, 0.34);
}

.data-table th,
.data-table td {
  padding-block: 16px;
}

.sim-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.32fr);
}

.sim-box-card {
  min-height: 620px;
}

.sim-box-shell {
  min-width: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.24),
    0 34px 84px rgba(0, 0, 0, 0.32);
}

.sim-detail-card {
  top: 98px;
}

.sim-detail-row {
  min-height: 76px;
}

.infrastructure-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.34fr);
}

@media (min-width: 1500px) {
  .sim-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.34fr);
  }
}

@media (max-width: 1280px) {
  .app-layout {
    grid-template-columns: minmax(290px, 0.28fr) minmax(0, 1fr);
  }

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

  .content-grid,
  .sim-layout,
  .infrastructure-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    min-height: 138px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .task-rail {
    height: auto;
    padding: 18px 12px;
  }

  .task-metrics {
    grid-template-columns: 1fr;
  }

  .workspace-panel {
    padding: 0 10px 24px;
  }

  .module-tabs {
    margin: 0 0 14px;
  }

  .workspace {
    height: auto;
  }

  .page-header {
    min-height: 0;
    padding: 24px 18px;
  }

  .page-header h1 {
    font-size: 34px;
  }
}

/* Dual-theme Liquid Glass V3: deep graphite dark, clean macOS light. */
body[data-theme="dark"] {
  --bg: #06070b;
  --surface: rgba(15, 16, 21, 0.76);
  --surface-strong: rgba(25, 26, 33, 0.86);
  --surface-soft: rgba(34, 36, 45, 0.66);
  --text: #f7f7fa;
  --muted: #9598a3;
  --muted-strong: #d4d6de;
  --border: rgba(255, 255, 255, 0.11);
  --accent: #4da2ff;
  --accent-strong: #9ccdff;
  --accent-soft: rgba(77, 162, 255, 0.15);
  --success: #32d74b;
  --danger: #ff453a;
  --warning: #ff9f0a;
  --info: #64d2ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --glass-blur: blur(34px) saturate(1.28);
  --lg-bg-a: #05060a;
  --lg-bg-b: #101118;
  --lg-panel: rgba(18, 19, 25, 0.62);
  --lg-panel-strong: rgba(29, 31, 39, 0.74);
  --lg-line: rgba(255, 255, 255, 0.12);
  --lg-highlight: rgba(255, 255, 255, 0.12);
  --lg-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #f4f6fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(236, 240, 248, 0.82);
  --text: #17191f;
  --muted: #667080;
  --muted-strong: #2d3440;
  --border: rgba(38, 51, 72, 0.14);
  --accent: #006dda;
  --accent-strong: #004ea8;
  --accent-soft: rgba(0, 109, 218, 0.11);
  --success: #28cd41;
  --danger: #ff3b30;
  --warning: #ff9500;
  --info: #157ac5;
  --shadow: 0 22px 58px rgba(52, 64, 87, 0.16);
  --glass-blur: blur(28px) saturate(1.18);
  --lg-bg-a: #f7f9fd;
  --lg-bg-b: #edf2fa;
  --lg-panel: rgba(255, 255, 255, 0.7);
  --lg-panel-strong: rgba(255, 255, 255, 0.9);
  --lg-line: rgba(42, 56, 82, 0.15);
  --lg-highlight: rgba(255, 255, 255, 0.82);
  --lg-shadow: 0 22px 58px rgba(52, 64, 87, 0.14);
  color-scheme: light;
}

.eyebrow,
.app-logo {
  letter-spacing: 0;
}

.app {
  color: var(--text);
  background:
    linear-gradient(120deg, #05060a 0%, #090a0f 43%, #111219 100%),
    var(--bg);
}

body[data-theme="light"] .app {
  background:
    linear-gradient(120deg, #f9fbff 0%, #eef3fb 48%, #f6f8fc 100%),
    var(--bg);
}

.app::before {
  opacity: 0.74;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(116deg, transparent 0 40%, rgba(255, 255, 255, 0.05) 40.2% 40.6%, transparent 41%),
    linear-gradient(250deg, transparent 0 62%, rgba(77, 162, 255, 0.055) 62.2% 62.55%, transparent 63%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.22));
}

body[data-theme="light"] .app::before {
  opacity: 0.7;
  background-image:
    linear-gradient(90deg, rgba(42, 56, 82, 0.046) 1px, transparent 1px),
    linear-gradient(0deg, rgba(42, 56, 82, 0.038) 1px, transparent 1px),
    linear-gradient(116deg, transparent 0 40%, rgba(0, 109, 218, 0.04) 40.2% 40.6%, transparent 41%),
    linear-gradient(250deg, transparent 0 62%, rgba(255, 255, 255, 0.64) 62.2% 62.55%, transparent 63%);
}

.app::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 19%),
    linear-gradient(90deg, rgba(77, 162, 255, 0.08), transparent 26%, transparent 76%, rgba(255, 255, 255, 0.032));
}

body[data-theme="light"] .app::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(90deg, rgba(0, 109, 218, 0.065), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.52));
}

.topbar {
  border-color: var(--lg-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 82%, transparent), transparent 68%),
    color-mix(in srgb, var(--lg-panel-strong) 94%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 96%, transparent),
    0 18px 54px color-mix(in srgb, #000000 22%, transparent);
}

body[data-theme="light"] .topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58)),
    var(--lg-panel-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 42px rgba(51, 63, 86, 0.12);
}

.topbar::after {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 32%, transparent), transparent);
}

.app-logo {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--lg-line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 20%, transparent), transparent),
    color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 20%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent) 15%, transparent);
}

body[data-theme="light"] .app-logo {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.3)),
    rgba(0, 109, 218, 0.1);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(0, 109, 218, 0.1);
}

.app-layout {
  background: transparent;
}

.task-rail {
  border-right-color: var(--lg-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 70%, transparent), transparent 24%),
    color-mix(in srgb, var(--lg-panel) 94%, transparent);
  box-shadow:
    inset -1px 0 0 color-mix(in srgb, var(--lg-highlight) 34%, transparent),
    18px 0 48px color-mix(in srgb, #000000 14%, transparent);
}

body[data-theme="light"] .task-rail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.36) 28%, rgba(246, 248, 252, 0.72)),
    var(--lg-panel);
  box-shadow:
    inset -1px 0 0 rgba(38, 51, 72, 0.08),
    16px 0 40px rgba(51, 63, 86, 0.08);
}

.task-rail__head,
.task-metrics div,
.task-filters,
.task-create,
.task-card,
.module-tabs,
.page-header,
.stat-card,
.content-card,
.room-card,
.deal-column,
.sim-box-card,
.sim-detail-card,
.sim-table-card,
.infrastructure-map-card {
  border-color: var(--lg-line);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--lg-highlight) 72%, transparent), transparent 44%),
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    var(--lg-panel);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 78%, transparent),
    var(--lg-shadow);
}

body[data-theme="light"] .task-rail__head,
body[data-theme="light"] .task-metrics div,
body[data-theme="light"] .task-filters,
body[data-theme="light"] .task-create,
body[data-theme="light"] .task-card,
body[data-theme="light"] .module-tabs,
body[data-theme="light"] .page-header,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .content-card,
body[data-theme="light"] .room-card,
body[data-theme="light"] .deal-column,
body[data-theme="light"] .sim-box-card,
body[data-theme="light"] .sim-detail-card,
body[data-theme="light"] .sim-table-card,
body[data-theme="light"] .infrastructure-map-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.36) 48%),
    var(--lg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 48px rgba(51, 63, 86, 0.12);
}

.module-tabs {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 72%, transparent), transparent 70%),
    color-mix(in srgb, var(--lg-panel-strong) 84%, transparent);
}

body[data-theme="light"] .module-tabs {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.72);
}

.module-tabs button {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  opacity: 0.92;
}

.module-tabs button:hover {
  background: color-mix(in srgb, var(--surface-soft) 68%, transparent);
  color: var(--text);
}

.module-tabs button.is-active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--lg-line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 18%, transparent), transparent 62%),
    color-mix(in srgb, var(--accent) 30%, var(--lg-panel-strong));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent) 16%, transparent);
}

body[data-theme="light"] .module-tabs button.is-active {
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.54)),
    rgba(0, 109, 218, 0.13);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 26px rgba(0, 109, 218, 0.12);
}

.page-header {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 78%, transparent), transparent 76%),
    var(--lg-panel-strong);
}

body[data-theme="light"] .page-header {
  background:
    linear-gradient(135deg, rgba(0, 109, 218, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.54)),
    var(--lg-panel-strong);
}

.page-header h1 {
  color: var(--text);
  text-shadow: 0 12px 34px color-mix(in srgb, #000000 26%, transparent);
}

body[data-theme="light"] .page-header h1 {
  text-shadow: none;
}

.page-header p,
.stat-card span,
.content-card p,
.room-card p,
.task-metrics span,
.task-card__meta,
.task-card__footer,
.sim-status-legend,
.sim-detail-row span,
.infra-detail-row span,
.infra-connection-row span,
.infra-next-action span,
.table-note,
.timeline-item span,
.deal-card span {
  color: var(--muted);
}

.icon-button,
.theme-toggle,
.ghost-action,
.small-action,
.sound-toggle,
.task-filters button.is-active {
  border-color: var(--lg-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 64%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 86%, transparent);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 58%, transparent),
    0 10px 28px color-mix(in srgb, #000000 15%, transparent);
}

body[data-theme="light"] .icon-button,
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .ghost-action,
body[data-theme="light"] .small-action,
body[data-theme="light"] .sound-toggle,
body[data-theme="light"] .task-filters button.is-active {
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.62)),
    var(--surface-strong);
  color: var(--muted-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(51, 63, 86, 0.1);
}

.icon-button:hover,
.theme-toggle:hover,
.ghost-action:hover,
.small-action:hover,
.task-filters button:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--lg-line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 16%, transparent), transparent),
    color-mix(in srgb, var(--accent-soft) 70%, var(--surface-strong));
}

.task-create input,
.task-create select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.client-form input,
.client-form select,
.client-form textarea,
.comment-form textarea,
.table-select,
.infra-jump-select,
.infra-link-label input {
  border-color: var(--lg-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent),
    color-mix(in srgb, var(--bg) 45%, var(--surface-strong));
  color: var(--text);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 40%, transparent);
}

body[data-theme="light"] .task-create input,
body[data-theme="light"] .task-create select,
body[data-theme="light"] .admin-form input,
body[data-theme="light"] .admin-form select,
body[data-theme="light"] .admin-form textarea,
body[data-theme="light"] .client-form input,
body[data-theme="light"] .client-form select,
body[data-theme="light"] .client-form textarea,
body[data-theme="light"] .comment-form textarea,
body[data-theme="light"] .table-select,
body[data-theme="light"] .infra-jump-select,
body[data-theme="light"] .infra-link-label input {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(38, 51, 72, 0.04);
}

.data-table-wrap {
  border-color: var(--lg-line);
  background: color-mix(in srgb, var(--bg) 48%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 34%, transparent),
    0 18px 48px color-mix(in srgb, #000000 16%, transparent);
}

body[data-theme="light"] .data-table-wrap {
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 38px rgba(51, 63, 86, 0.1);
}

.data-table th {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 52%, transparent), transparent),
    color-mix(in srgb, var(--surface-strong) 86%, transparent);
  color: var(--muted);
}

.data-table td {
  background: transparent;
  border-bottom-color: var(--lg-line);
}

.data-table tbody tr:nth-child(odd) td {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

body[data-theme="light"] .data-table th {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.52)),
    rgba(245, 247, 252, 0.9);
}

body[data-theme="light"] .data-table tbody tr:nth-child(odd) td {
  background: rgba(0, 109, 218, 0.035);
}

.sim-box-shell,
.infrastructure-map {
  border-color: var(--lg-line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--surface) 72%, transparent);
  background-size: 46px 46px, 46px 46px, auto;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 44%, transparent),
    0 24px 64px color-mix(in srgb, #000000 24%, transparent);
}

body[data-theme="light"] .sim-box-shell,
body[data-theme="light"] .infrastructure-map {
  background:
    linear-gradient(90deg, rgba(0, 109, 218, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 109, 218, 0.036) 1px, transparent 1px),
    rgba(255, 255, 255, 0.62);
  background-size: 46px 46px, 46px 46px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 20px 52px rgba(51, 63, 86, 0.13);
}

.sim-detail-row,
.infra-detail-row,
.infra-connection-row,
.infra-next-action,
.activity-row,
.user-row,
.role-row,
.mapping-row,
.sync-row,
.timeline-item,
.deal-card,
.client-detail__meta div,
.module-check,
.infra-pill {
  border-color: var(--lg-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lg-highlight) 48%, transparent), transparent),
    color-mix(in srgb, var(--surface-soft) 72%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--lg-highlight) 34%, transparent),
    0 12px 30px color-mix(in srgb, #000000 10%, transparent);
}

body[data-theme="light"] .sim-detail-row,
body[data-theme="light"] .infra-detail-row,
body[data-theme="light"] .infra-connection-row,
body[data-theme="light"] .infra-next-action,
body[data-theme="light"] .activity-row,
body[data-theme="light"] .user-row,
body[data-theme="light"] .role-row,
body[data-theme="light"] .mapping-row,
body[data-theme="light"] .sync-row,
body[data-theme="light"] .timeline-item,
body[data-theme="light"] .deal-card,
body[data-theme="light"] .client-detail__meta div,
body[data-theme="light"] .module-check,
body[data-theme="light"] .infra-pill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46)),
    rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 26px rgba(51, 63, 86, 0.08);
}

.status-badge {
  background: color-mix(in srgb, var(--info) 13%, transparent);
  color: var(--info);
  border: 1px solid color-mix(in srgb, var(--info) 24%, transparent);
}

.access-badge,
.chip {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--lg-line));
}

select option {
  background: #1a1b22;
  color: #f7f7fa;
}

body[data-theme="light"] select option {
  background: #ffffff;
  color: #17191f;
}

/* Topbar navigation V5: compact operator tabs without theme/logout controls. */
:root {
  --topbar-height: 38px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: var(--topbar-height);
  padding: 4px 10px;
}

.topbar::before,
.topbar::after {
  display: none;
}

.topbar__identity,
#notifyButton {
  display: none !important;
}

.topbar__actions {
  display: none !important;
}

.topbar-tabs.module-tabs {
  display: grid;
  grid-template-columns: 86px 92px 118px 106px 78px 72px 64px 78px 72px 74px 64px 92px 76px 82px 84px;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: start;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: none;
}

.project-draft-list {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 2px 0 12px;
}

.project-live-shell {
  min-width: 0;
  min-height: 96px;
  margin: 0 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 74%),
    color-mix(in srgb, var(--surface) 92%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 14px;
  padding: 16px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 9%, transparent),
    0 16px 38px color-mix(in srgb, #000 22%, transparent);
}

.project-live-main {
  min-width: 0;
}

.project-live-main h2 {
  margin: 8px 0 3px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.project-live-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 620;
}

.project-live-route {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 9px;
}

.project-live-route > span {
  max-width: 100%;
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
  font-size: 13px;
  line-height: 1.2;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-live-action {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 10px;
  padding: 0 18px;
  display: inline-grid;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-soft));
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
}

.project-live-action:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-soft));
}

.project-draft-row {
  min-width: 0;
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent 68%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 8%, transparent);
}

.project-draft-row > strong {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  font-size: 13px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.project-draft-row h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

.project-draft-row p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.32;
  font-weight: 560;
}

body[data-theme="light"] .project-draft-row {
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.62)),
    color-mix(in srgb, var(--surface) 90%, transparent);
}

.status-badge.is-live,
.status-badge.is-linked {
  color: color-mix(in srgb, #9cffbd 80%, var(--text));
  border-color: color-mix(in srgb, #39d98a 34%, var(--border));
  background: color-mix(in srgb, #39d98a 14%, transparent);
}

.status-badge.is-plan {
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
  border-color: color-mix(in srgb, var(--border) 86%, transparent);
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

body[data-theme="light"] .project-live-shell {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, #ffffff), rgba(255, 255, 255, 0.78)),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

.hub-native-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.hub-native-head {
  min-width: 0;
  min-height: 70px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 5%, transparent), transparent 70%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.hub-native-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.hub-refresh {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: 10px;
  padding: 0 16px;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.hub-refresh:disabled {
  opacity: .55;
}

.hub-summary-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hub-summary-grid article {
  min-width: 0;
  min-height: 76px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
}

.hub-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.hub-summary-grid strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 820;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.hub-status-grid {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.hub-status-card {
  min-width: 0;
  min-height: 70px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}

.hub-status-card.is-online {
  border-color: color-mix(in srgb, #39d98a 28%, var(--border));
}

.hub-status-card.is-protected {
  border-color: color-mix(in srgb, #ffd166 34%, var(--border));
}

.hub-status-card.is-attention {
  border-color: color-mix(in srgb, #ff6b6b 40%, var(--border));
}

.hub-status-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.hub-status-card h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: 0;
}

.hub-status-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.hub-status-meta code {
  min-width: 0;
  max-width: 280px;
  color: color-mix(in srgb, var(--text) 64%, var(--muted));
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="light"] .hub-native-head,
body[data-theme="light"] .hub-summary-grid article,
body[data-theme="light"] .hub-status-card {
  background: color-mix(in srgb, #ffffff 86%, var(--surface));
}

.topbar-tabs.module-tabs::-webkit-scrollbar {
  display: none;
}

.topbar-tabs.module-tabs button {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 5px;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 11.5px;
  line-height: 1.04;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.topbar-tabs.module-tabs button:hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 12%, transparent), transparent),
    color-mix(in srgb, var(--surface-soft) 54%, transparent);
}

.topbar-tabs.module-tabs button.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--lg-line));
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 18%, transparent), transparent 62%),
    color-mix(in srgb, var(--accent) 30%, var(--lg-panel-strong));
  color: var(--text);
}

body[data-theme="light"] .topbar-tabs.module-tabs button.is-active {
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.58)),
    rgba(0, 109, 218, 0.12);
  color: var(--accent-strong);
}

.app-layout {
  min-height: calc(100vh - var(--topbar-height));
}

.task-rail {
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
}

.workspace {
  height: calc(100vh - var(--topbar-height));
  padding-top: 24px;
}

@media (max-width: 1420px) {
  .topbar-tabs.module-tabs button {
    padding-inline: 4px;
    font-size: 11px;
  }
}

@media (max-width: 1180px) {
  :root {
    --topbar-height: 76px;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

@media (max-width: 860px) {
  :root {
    --topbar-height: auto;
  }

  .topbar {
    position: relative;
    top: 0;
    min-height: 0;
    padding: 8px;
  }

  .topbar-tabs.module-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .topbar-tabs.module-tabs button {
    min-height: 30px;
    font-size: 11px;
  }

  .app-layout {
    min-height: 0;
  }

  .task-rail {
    top: auto;
    height: auto;
  }

  .workspace {
    height: auto;
    padding-top: 0;
  }
}

/* Compact workspace V5: keep primary tab content on-screen. */
:root {
  --workspace-gap: 12px;
}

.workspace {
  padding: 14px 22px 18px;
}

.page-header {
  min-height: 88px;
  margin-bottom: var(--workspace-gap);
  padding: 14px 20px;
}

.page-header h1 {
  font-size: clamp(30px, 2.55vw, 42px);
  line-height: 1;
}

.page-header p {
  max-width: 820px;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
}

.access-badge {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 11px;
}

.section-grid {
  gap: 10px;
  margin-bottom: var(--workspace-gap);
}

.stat-card {
  min-height: 64px;
  padding: 10px 14px;
}

.stat-card span {
  font-size: 12px;
}

.stat-card strong {
  margin-top: 4px;
  font-size: 25px;
}

.sim-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.3fr);
  gap: var(--workspace-gap);
}

.sim-box-card,
.sim-detail-card {
  min-height: 0;
  padding: 12px;
}

.sim-box-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
}

.sim-box-head,
.sim-detail-head {
  align-items: center;
  margin-bottom: 8px;
}

.sim-box-head h2,
.sim-detail-head h2 {
  font-size: 17px;
  line-height: 1.1;
}

.sim-status-legend {
  gap: 6px 10px;
  font-size: 11px;
}

.sim-box-scroll {
  display: flex;
  justify-content: center;
  padding: 0;
  overflow: visible;
}

.sim-box-shell {
  width: min(100%, 860px);
  min-width: 0;
  margin-inline: auto;
  background: #eef1f6;
  background-image: none;
}

body[data-theme="dark"] .sim-box-shell {
  background: #eef1f6;
  background-image: none;
}

body[data-theme="light"] .sim-box-shell {
  background: #f8fafc;
  background-image: none;
}

.sim-detail-card {
  top: calc(var(--topbar-height) + 14px);
  max-height: calc(100vh - var(--topbar-height) - 34px);
  overflow: auto;
}

.sim-detail-grid {
  gap: 6px;
}

.sim-detail-row {
  min-height: 58px;
  padding: 9px 10px;
}

.sim-detail-row span {
  font-size: 11px;
}

.sim-detail-row strong {
  font-size: 14px;
}

@media (min-width: 1500px) {
  .sim-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.28fr);
  }
}

@media (max-width: 1280px) {
  .workspace {
    padding: 16px 14px 24px;
  }

  .page-header {
    min-height: 0;
  }

  .sim-layout {
    grid-template-columns: 1fr;
  }

  .sim-detail-card {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .workspace {
    padding: 12px;
  }

  .page-header {
    padding: 16px;
  }

  .page-header h1 {
    font-size: 30px;
  }

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

  .stat-card {
    min-height: 66px;
  }
}

/* SIM tooltip V6: hover details must sit above every slot and panel layer. */
.sim-box-card,
.sim-box-scroll,
.sim-box-shell,
.sim-slot-overlay {
  overflow: visible;
}

.sim-slot:hover,
.sim-slot:focus-visible,
.sim-slot.is-selected {
  z-index: 80;
}

.sim-slot-tooltip {
  z-index: 120;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(20, 22, 28, 0.96);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 44px rgba(0, 0, 0, 0.36);
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

body[data-theme="light"] .sim-slot-tooltip {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.86),
    0 16px 38px rgba(51, 63, 86, 0.2);
}

/* Documents and calls Finder layer v10. */
.docs-finder-live {
  --docs-bg: #121812;
  --docs-window: rgba(25, 33, 27, 0.97);
  --docs-sidebar: rgba(18, 27, 21, 0.94);
  --docs-toolbar: rgba(23, 31, 25, 0.92);
  --docs-line: rgba(255, 255, 255, 0.11);
  --docs-line-soft: rgba(255, 255, 255, 0.065);
  --docs-text: #f3f6f1;
  --docs-muted: rgba(243, 246, 241, 0.62);
  --docs-faint: rgba(243, 246, 241, 0.42);
  --docs-row: rgba(255, 255, 255, 0.038);
  --docs-row-alt: rgba(255, 255, 255, 0.026);
  --docs-selected: rgba(178, 185, 178, 0.56);
  --docs-blue: #73a8ff;
  --docs-green: #69d489;
  --docs-amber: #f1c95e;
  --docs-red: #ef6f6c;
  min-height: 690px;
  height: min(760px, calc(100vh - 156px));
  border-radius: 26px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--docs-window);
  border: 1px solid var(--docs-line);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  color: var(--docs-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.docs-sidebar {
  background: var(--docs-sidebar);
  border-right: 1px solid var(--docs-line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs-traffic {
  display: flex;
  gap: 14px;
  padding: 0 0 10px 3px;
}

.docs-traffic span {
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.docs-nav-title {
  padding: 4px 12px 3px;
  color: var(--docs-muted);
  font-size: 20px;
  line-height: 1;
  font-weight: 650;
}

.docs-nav-list {
  display: grid;
  gap: 4px;
}

.docs-nav-item {
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(243, 246, 241, 0.92);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  text-align: left;
  font: inherit;
  font-size: 22px;
  font-weight: 570;
  cursor: pointer;
}

.docs-nav-item:hover,
.docs-nav-item.is-active {
  background: rgba(255, 255, 255, 0.09);
}

.docs-nav-item span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-count {
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(243, 246, 241, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.docs-outline-icon {
  width: 29px;
  height: 29px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 84px minmax(0, 1fr);
}

.docs-toolbar {
  min-width: 0;
  border-bottom: 1px solid var(--docs-line);
  background: var(--docs-toolbar);
  display: grid;
  grid-template-columns: 112px minmax(220px, 1fr) auto auto minmax(150px, 190px);
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}

.docs-arrows {
  width: 112px;
  height: 54px;
  border: 1px solid var(--docs-line);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.035);
}

.docs-arrow {
  width: 56px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(244, 247, 244, 0.9);
}

.docs-arrow + .docs-arrow {
  border-left: 1px solid var(--docs-line-soft);
  color: rgba(244, 247, 244, 0.36);
}

.docs-arrow .docs-outline-icon {
  width: 35px;
  height: 35px;
  stroke-width: 1.8;
}

.docs-title-wrap {
  min-width: 0;
}

.docs-title {
  margin: 0;
  color: var(--docs-text);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 730;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-path {
  margin-top: 7px;
  color: var(--docs-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 15px;
  font-weight: 520;
}

.docs-path span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-path strong {
  color: #fff;
  font-weight: 700;
}

.docs-view-switch,
.docs-action,
.docs-search {
  height: 54px;
  border-radius: 28px;
  border: 1px solid var(--docs-line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 248, 245, 0.9);
}

.docs-view-switch {
  display: flex;
  overflow: hidden;
}

.docs-view-switch button {
  width: 46px;
  height: 54px;
  border: 0;
  border-left: 1px solid var(--docs-line-soft);
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
}

.docs-view-switch button:first-child {
  border-left: 0;
}

.docs-view-switch button.is-active {
  background: rgba(255, 255, 255, 0.14);
}

.docs-view-switch .docs-outline-icon {
  width: 24px;
  height: 24px;
}

.docs-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  font-size: 19px;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
}

.docs-action .docs-outline-icon,
.docs-search .docs-outline-icon {
  width: 25px;
  height: 25px;
}

.docs-search {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  padding: 0 15px;
  color: rgba(244, 247, 244, 0.88);
  font-size: 18px;
  font-weight: 540;
}

.docs-search span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.docs-list-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--docs-line);
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
}

.docs-columns,
.docs-row {
  display: grid;
  grid-template-columns: minmax(168px, 1.2fr) 108px 80px 58px 116px 88px 34px;
}

.docs-finder-live[data-mode="calls"] .docs-columns,
.docs-finder-live[data-mode="calls"] .docs-row {
  grid-template-columns: minmax(168px, 1.2fr) 108px 100px 48px 106px 82px 34px;
}

.docs-columns {
  padding: 0 10px;
  align-items: end;
  color: rgba(245, 248, 245, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 17px;
  font-weight: 680;
}

.docs-columns div {
  min-width: 0;
  padding: 0 8px 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-columns div:first-child {
  border-left: 0;
  padding-left: 64px;
}

.docs-table {
  min-height: 0;
  overflow: hidden;
  padding: 10px 8px 0 10px;
}

.docs-row {
  height: 39px;
  align-items: center;
  border-radius: 17px;
  margin-bottom: 1px;
  color: rgba(247, 249, 247, 0.9);
  font-size: 18px;
  font-weight: 520;
}

.docs-row:nth-child(odd) {
  background: var(--docs-row);
}

.docs-row:nth-child(even) {
  background: var(--docs-row-alt);
}

.docs-row.is-selected {
  background: var(--docs-selected);
  color: #fff;
}

.docs-row.is-drop {
  outline: 1px solid rgba(115, 168, 255, 0.82);
  background: rgba(115, 168, 255, 0.12);
}

.docs-cell {
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-muted {
  color: rgba(247, 249, 247, 0.62);
  font-weight: 470;
}

.docs-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
}

.docs-twisty {
  width: 16px;
  flex: 0 0 16px;
  color: rgba(241, 245, 239, 0.62);
  font-size: 24px;
  text-align: center;
}

.docs-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-eds-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.14);
}

.docs-eds-dot.is-active { background: var(--docs-green); }
.docs-eds-dot.is-expire { background: var(--docs-amber); }
.docs-eds-dot.is-expired { background: var(--docs-red); }
.docs-eds-dot.is-error { background: #ff5f7e; }
.docs-eds-dot.is-need { background: var(--docs-blue); }

.docs-file-icon {
  width: 25px;
  height: 31px;
  border-radius: 4px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcfb, #dfe5e0);
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 1px rgba(0, 0, 0, 0.18);
}

.docs-file-icon:not(.is-folder)::before {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #eef2ef 0 48%, #c6cdc7 50% 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.13);
  border-bottom: 1px solid rgba(0, 0, 0, 0.13);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.docs-file-icon.is-folder {
  width: 30px;
  height: 24px;
  border-radius: 5px;
  overflow: visible;
  background: linear-gradient(180deg, #d9ded8, #aeb5af);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 1px 1px rgba(0, 0, 0, 0.18);
}

.docs-file-icon.is-folder::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -6px;
  width: 14px;
  height: 8px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #e1e5df, #c1c8c1);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom: 0;
}

.docs-file-icon.is-pdf::after,
.docs-file-icon.is-xls::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  text-align: center;
  font-size: 6px;
  line-height: 1;
  font-weight: 800;
}

.docs-file-icon.is-pdf::after {
  content: "PDF";
  color: #d94e4e;
}

.docs-file-icon.is-xls::after {
  content: "XLS";
  color: #2d9d5a;
}

.docs-file-icon.is-jpg::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 12px;
  border-radius: 2px;
  background:
    radial-gradient(circle at 75% 25%, #fff6a4 0 2px, transparent 2.4px),
    linear-gradient(180deg, #8db7ff 0 48%, #7ecb8e 50% 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.docs-file-icon.is-note::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 7px;
  height: 2px;
  border-radius: 99px;
  background: rgba(86, 97, 90, 0.42);
  box-shadow:
    0 -5px 0 rgba(86, 97, 90, 0.32),
    0 -10px 0 rgba(86, 97, 90, 0.24);
}

.docs-kebab {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 245, 239, 0.78);
  opacity: 0;
}

.docs-row:hover .docs-kebab,
.docs-row.is-selected .docs-kebab {
  opacity: 1;
}

.docs-kebab .docs-outline-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.docs-preview {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  background: rgba(13, 19, 15, 0.28);
}

.docs-preview-card {
  height: 100%;
  min-height: 0;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  padding: 15px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  overflow: hidden;
}

.docs-preview-title {
  color: rgba(241, 245, 239, 0.95);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.docs-preview-subtitle {
  margin-top: 3px;
  color: var(--docs-muted);
  font-size: 16px;
  font-weight: 540;
}

.docs-doc-preview {
  height: 188px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(244, 248, 244, 0.96), rgba(210, 218, 211, 0.94));
  color: #1d251f;
  padding: 22px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 16px 30px rgba(0, 0, 0, 0.22);
}

.docs-pdf-mark {
  width: 74px;
  height: 88px;
  border-radius: 10px;
  background: linear-gradient(#fff, #f4eded);
  border: 1px solid rgba(20, 28, 22, 0.18);
  display: grid;
  place-items: end center;
  padding-bottom: 12px;
  color: #d75755;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
}

.docs-preview-lines {
  display: grid;
  gap: 10px;
}

.docs-preview-lines span {
  height: 9px;
  border-radius: 99px;
  background: rgba(30, 38, 31, 0.18);
}

.docs-preview-lines span:nth-child(1) { width: 86%; }
.docs-preview-lines span:nth-child(2) { width: 64%; }
.docs-preview-lines span:nth-child(3) { width: 74%; }

.docs-facts,
.docs-source-list {
  display: grid;
  gap: 9px;
  align-content: start;
  font-size: 14px;
  font-weight: 520;
}

.docs-fact,
.docs-source-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
}

.docs-label {
  color: var(--docs-faint);
}

.docs-value,
.docs-source-row span:last-child {
  color: rgba(241, 245, 239, 0.83);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-source-row {
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 7px;
}

.docs-found {
  color: #75e095 !important;
  font-weight: 720;
}

.docs-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  gap: 10px;
}

.docs-button {
  height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(241, 245, 239, 0.9);
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.docs-button.is-danger {
  color: #ffaaa8;
}

.docs-button.is-danger .docs-outline-icon {
  width: 18px;
  height: 18px;
  margin: auto;
}

.docs-eds-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
  color: rgba(241, 245, 239, 0.64);
  font-size: 13px;
  font-weight: 540;
}

.docs-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.docs-context-menu {
  position: absolute;
  right: 314px;
  top: 335px;
  width: 210px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(35, 43, 37, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  padding: 6px;
  display: none;
  gap: 2px;
  z-index: 5;
}

.docs-context-menu.is-open {
  display: grid;
}

.docs-menu-item {
  height: 31px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: rgba(241, 245, 239, 0.88);
  font-size: 14px;
  font-weight: 540;
}

.docs-menu-item:first-child {
  background: rgba(255, 255, 255, 0.1);
}

.docs-drag-ghost {
  position: absolute;
  left: 45%;
  top: 50%;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(242, 245, 242, 0.9);
  color: #182018;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  transform: rotate(-2deg);
  z-index: 4;
}

.docs-finder-live[data-mode="documents"] .docs-drag-ghost {
  display: flex;
}

.docs-inn-box {
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.docs-inn-label {
  color: var(--docs-faint);
  font-size: 13px;
  font-weight: 650;
}

.docs-inn-input {
  height: 39px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #1b241d;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.docs-inn-status {
  min-height: 33px;
  border-radius: 10px;
  border: 1px solid rgba(105, 212, 137, 0.18);
  background: rgba(105, 212, 137, 0.11);
  color: rgba(220, 250, 229, 0.86);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.docs-finder-live[data-mode="calls"] .docs-doc-preview {
  height: 158px;
}

.docs-finder-live[data-mode="calls"] .docs-source-list {
  gap: 6px;
  font-size: 13px;
}

body[data-theme="light"] .docs-finder-live {
  --docs-bg: #edf0ec;
  --docs-window: rgba(246, 248, 245, 0.97);
  --docs-sidebar: rgba(232, 236, 231, 0.94);
  --docs-toolbar: rgba(241, 244, 240, 0.94);
  --docs-line: rgba(34, 45, 38, 0.13);
  --docs-line-soft: rgba(34, 45, 38, 0.08);
  --docs-text: #172017;
  --docs-muted: rgba(23, 32, 23, 0.58);
  --docs-faint: rgba(23, 32, 23, 0.42);
  --docs-row: rgba(23, 32, 23, 0.045);
  --docs-row-alt: rgba(23, 32, 23, 0.028);
  --docs-selected: rgba(127, 137, 128, 0.36);
}

body[data-theme="light"] .docs-nav-item,
body[data-theme="light"] .docs-title,
body[data-theme="light"] .docs-columns,
body[data-theme="light"] .docs-row,
body[data-theme="light"] .docs-preview-title,
body[data-theme="light"] .docs-button {
  color: var(--docs-text);
}

body[data-theme="light"] .docs-path strong {
  color: #101610;
}

body[data-theme="light"] .docs-preview-card,
body[data-theme="light"] .docs-view-switch,
body[data-theme="light"] .docs-action,
body[data-theme="light"] .docs-search {
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 1280px) {
  .docs-finder-live {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .docs-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .docs-toolbar {
    grid-template-columns: 120px minmax(0, 1fr) auto auto minmax(170px, 210px);
    gap: 10px;
  }

  .docs-action {
    font-size: 18px;
    padding: 0 14px;
  }

  .docs-columns,
  .docs-row {
    grid-template-columns: minmax(200px, 1.25fr) 120px 84px 68px 132px 102px 34px;
  }
}

@media (max-width: 980px) {
  .docs-finder-live {
    height: auto;
    min-height: 760px;
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-toolbar {
    grid-template-columns: 1fr auto;
    min-height: 160px;
  }

  .docs-arrows,
  .docs-view-switch,
  .docs-search {
    display: none;
  }

  .docs-content {
    grid-template-columns: 1fr;
  }

  .docs-preview {
    border-top: 1px solid var(--docs-line);
  }
}

/* Task rail collapse V1 */
.app-layout,
.task-rail,
.task-rail__head,
.task-rail__content,
.task-rail__title,
.task-rail-mini,
.workspace-panel {
  transition:
    grid-template-columns 0.28s ease,
    width 0.28s ease,
    max-width 0.28s ease,
    padding 0.28s ease,
    opacity 0.2s ease,
    transform 0.24s ease;
}

.task-rail {
  overflow-x: hidden;
}

.task-rail__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.task-rail-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--lg-line));
  border-radius: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, #ffffff 14%, transparent), transparent 48%),
    color-mix(in srgb, var(--lg-panel) 92%, transparent);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 18%, transparent),
    0 14px 30px color-mix(in srgb, #000000 18%, transparent);
}

.task-rail-toggle:hover,
.task-rail-mini:hover {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--lg-line));
  transform: translateY(-1px);
}

.task-rail-toggle:active,
.task-rail-mini:active {
  transform: translateY(0) scale(0.98);
}

.task-rail-toggle:focus-visible,
.task-rail-mini:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, #ffffff);
  outline-offset: 3px;
}

.task-rail-toggle__icon {
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.task-rail-toggle__badge,
.task-rail-mini__count {
  min-width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, #ffffff 35%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 18%, transparent), transparent),
    var(--accent);
  color: #06111d;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 34%, transparent);
}

.task-rail-toggle__badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: none;
}

.task-rail-mini {
  display: none;
  width: 36px;
  min-height: 92px;
  margin-top: 12px;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  padding: 10px 6px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 46%),
    var(--lg-panel);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 18px 38px rgba(0, 0, 0, 0.16);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-rail-mini__arrow {
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1;
}

.task-rail-mini__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-rail-mini__count {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.app-layout.is-task-rail-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}

.app-layout.is-task-rail-collapsed .task-rail {
  padding: 16px 6px;
  overflow-y: visible;
}

.app-layout.is-task-rail-collapsed .task-rail__head {
  display: none;
}

.app-layout.is-task-rail-collapsed .task-rail__title,
.app-layout.is-task-rail-collapsed .sound-toggle,
.app-layout.is-task-rail-collapsed .task-rail__content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-10px);
}

.app-layout.is-task-rail-collapsed .task-rail__actions {
  justify-content: center;
}

.app-layout.is-task-rail-collapsed .task-rail-toggle {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
}

.app-layout.is-task-rail-collapsed .task-rail-mini {
  display: flex;
  margin-top: 0;
}

.app-layout.is-task-rail-collapsed .workspace-panel {
  padding-left: 8px;
}

body[data-theme="light"] .task-rail-toggle,
body[data-theme="light"] .task-rail-mini {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.42)),
    var(--lg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 32px rgba(51, 63, 86, 0.13);
}

@media (max-width: 860px) {
  .app-layout.is-task-rail-collapsed {
    grid-template-columns: 1fr;
  }

  .app-layout.is-task-rail-collapsed .task-rail {
    min-height: 86px;
    padding: 14px 12px;
  }

  .app-layout.is-task-rail-collapsed .task-rail-mini {
    min-height: 0;
    width: 100%;
    flex-direction: row;
  }

  .app-layout.is-task-rail-collapsed .task-rail-mini__label {
    writing-mode: initial;
    transform: none;
  }
}

/* Working Finder layer v11: compact, clickable, backend-backed. */
.workspace.workspace--docs-finder {
  height: calc(100vh - var(--topbar-height));
  padding: 7px 8px 8px;
  overflow: hidden;
}

.docs-finder-app {
  position: relative;
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  grid-template-columns: 184px minmax(0, 1fr);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
}

.docs-finder-app .docs-sidebar {
  padding: 12px 8px;
  gap: 10px;
}

.docs-finder-app .docs-traffic {
  gap: 9px;
  padding: 2px 0 6px 8px;
}

.docs-finder-app .docs-traffic span {
  width: 13px;
  height: 13px;
}

.docs-finder-app .docs-nav-list {
  gap: 2px;
}

.docs-finder-app .docs-nav-item {
  height: 34px;
  border-radius: 8px;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 8px;
  font-size: 14.5px;
  font-weight: 590;
}

.docs-finder-app .docs-count {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
}

.docs-finder-app .docs-outline-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.docs-finder-app .docs-main {
  grid-template-rows: 58px minmax(0, 1fr);
}

.docs-finder-app .docs-main.is-bailiffs-mode {
  grid-template-rows: minmax(0, 1fr);
}

.docs-bailiffs-host {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.docs-bailiffs-host > .bailiffs-live {
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.docs-finder-app .docs-toolbar {
  grid-template-columns: 84px minmax(170px, 1fr) auto minmax(122px, auto) minmax(168px, 230px);
  gap: 7px;
  padding: 0 10px;
}

.docs-finder-app .docs-arrows {
  width: 84px;
  height: 38px;
  border-radius: 20px;
}

.docs-finder-app .docs-arrow {
  width: 42px;
  height: 38px;
  cursor: pointer;
}

.docs-finder-app .docs-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.docs-finder-app .docs-arrow .docs-outline-icon {
  width: 24px;
  height: 24px;
}

.docs-finder-app .docs-title {
  font-size: 18px;
  line-height: 1.05;
  font-weight: 720;
}

.docs-finder-app .docs-path {
  margin-top: 3px;
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.docs-finder-app .docs-path button {
  min-width: 0;
  max-width: 145px;
  border: 0;
  background: transparent;
  color: var(--docs-muted);
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  cursor: pointer;
}

.docs-finder-app .docs-path button.is-current {
  color: var(--docs-text);
  font-weight: 700;
}

.docs-finder-app .docs-path-separator {
  color: var(--docs-faint);
}

.docs-finder-app .docs-view-switch,
.docs-finder-app .docs-action,
.docs-finder-app .docs-search {
  height: 38px;
  border-radius: 20px;
}

.docs-finder-app .docs-view-switch button {
  width: 35px;
  height: 38px;
}

.docs-finder-app .docs-view-switch .docs-outline-icon,
.docs-finder-app .docs-action .docs-outline-icon,
.docs-finder-app .docs-search .docs-outline-icon {
  width: 19px;
  height: 19px;
}

.docs-finder-app .docs-action {
  gap: 7px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 680;
}

.docs-finder-app .docs-action:disabled {
  opacity: 0.45;
  cursor: default;
}

.docs-finder-app .docs-search {
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 0 10px;
}

.docs-search-input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--docs-text);
  font: inherit;
  font-size: 13px;
}

.docs-search-input::placeholder {
  color: var(--docs-muted);
}

.docs-finder-app .docs-content {
  grid-template-columns: minmax(0, 1fr) 272px;
}

.docs-finder-app .docs-list-pane {
  grid-template-rows: 38px minmax(0, 1fr);
}

.docs-finder-app .docs-columns,
.docs-finder-app .docs-row {
  grid-template-columns: minmax(156px, 1fr) 88px 58px 54px 88px 72px 28px;
}

.docs-finder-app[data-mode="calls"] .docs-columns,
.docs-finder-app[data-mode="calls"] .docs-row {
  grid-template-columns: minmax(158px, 1fr) 92px 82px 42px 84px 72px 28px;
}

.docs-finder-app .docs-columns {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 650;
}

.docs-finder-app .docs-columns div {
  padding: 0 6px 8px;
}

.docs-finder-app .docs-columns div:first-child {
  padding-left: 38px;
}

.docs-finder-app .docs-table {
  overflow: auto;
  padding: 5px 5px 8px;
}

.docs-finder-app .docs-row {
  height: 29px;
  border-radius: 7px;
  margin-bottom: 1px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: default;
}

.docs-finder-app .docs-row[draggable="true"] {
  cursor: grab;
}

.docs-finder-app .docs-row[draggable="true"]:active {
  cursor: grabbing;
}

.docs-finder-app .docs-cell {
  padding: 0 6px;
}

.docs-finder-app .docs-name-cell {
  gap: 5px;
  padding-left: calc(5px + (var(--depth, 0) * 17px));
}

.docs-finder-app .docs-twisty {
  width: 13px;
  flex-basis: 13px;
  font-size: 17px;
  line-height: 1;
}

.docs-twisty-button {
  height: 22px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  transform: rotate(0deg);
  transition: transform 0.12s ease;
  cursor: pointer;
}

.docs-twisty-button.is-open {
  transform: rotate(90deg);
}

.docs-finder-app .docs-file-icon {
  width: 18px;
  height: 22px;
  border-radius: 3px;
}

.docs-finder-app .docs-file-icon.is-folder {
  width: 22px;
  height: 17px;
  border-radius: 4px;
  background: linear-gradient(180deg, #dfe3df, #aeb5ae);
}

.docs-finder-app .docs-file-icon.is-folder::before {
  top: -4px;
  width: 11px;
  height: 6px;
}

.docs-finder-app .docs-file-icon.is-pdf::after,
.docs-finder-app .docs-file-icon.is-xls::after {
  bottom: 3px;
  font-size: 5px;
}

.docs-finder-app .docs-eds-dot {
  width: 7px;
  height: 7px;
}

.docs-finder-app .docs-kebab {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.docs-finder-app .docs-kebab .docs-outline-icon {
  width: 15px;
  height: 15px;
}

.docs-finder-app .docs-preview {
  padding: 8px;
}

.docs-finder-app .docs-preview-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px;
  grid-template-rows: auto auto 1fr auto;
  gap: 9px;
}

.docs-finder-app .docs-preview-title {
  font-size: 15px;
  line-height: 1.18;
  max-height: 38px;
  overflow: hidden;
}

.docs-finder-app .docs-preview-subtitle {
  font-size: 12px;
}

.docs-finder-app .docs-doc-preview,
.docs-folder-preview {
  height: 118px;
  border-radius: 10px;
  padding: 15px;
}

.docs-finder-app .docs-doc-preview .docs-file-icon {
  width: 50px;
  height: 62px;
  margin-bottom: 12px;
}

.docs-finder-app .docs-doc-preview .docs-file-icon.is-folder {
  width: 58px;
  height: 42px;
}

.docs-folder-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--docs-text);
}

.docs-folder-preview .docs-file-icon {
  width: 60px;
  height: 44px;
}

.docs-folder-preview strong {
  font-size: 24px;
  line-height: 1;
}

.docs-folder-preview span {
  color: var(--docs-muted);
  font-size: 12px;
}

.docs-finder-app .docs-preview-lines {
  gap: 6px;
}

.docs-finder-app .docs-preview-lines span {
  height: 6px;
}

.docs-finder-app .docs-facts,
.docs-finder-app .docs-source-list {
  gap: 6px;
  font-size: 12px;
}

.docs-finder-app .docs-fact {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 7px;
}

.docs-finder-app .docs-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.docs-finder-app .docs-button {
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 680;
}

.docs-finder-app .docs-button .docs-outline-icon {
  width: 15px;
  height: 15px;
}

.docs-hidden-file {
  display: none;
}

.docs-empty,
.docs-preview-empty {
  display: grid;
  place-items: center;
  min-height: 88px;
  color: var(--docs-muted);
  font-size: 13px;
  font-weight: 600;
}

.docs-empty.is-error {
  color: #ffaaa8;
}

.docs-finder-app .docs-context-menu {
  right: auto;
  top: auto;
  width: 206px;
  border-radius: 10px;
  padding: 5px;
}

.docs-finder-app .docs-menu-item {
  width: 100%;
  height: 28px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.docs-finder-app .docs-menu-item:hover,
.docs-finder-app .docs-menu-item:first-child:hover {
  background: rgba(255, 255, 255, 0.12);
}

.docs-finder-app .docs-menu-item.is-danger {
  color: #ffaaa8;
}

@media (max-width: 1280px) {
  .docs-finder-app {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .docs-finder-app .docs-content {
    grid-template-columns: minmax(0, 1fr) 252px;
  }

  .docs-finder-app .docs-toolbar {
    grid-template-columns: 78px minmax(150px, 1fr) auto minmax(108px, auto) minmax(145px, 190px);
  }

  .docs-finder-app .docs-columns,
  .docs-finder-app .docs-row {
    grid-template-columns: minmax(142px, 1fr) 78px 54px 50px 78px 64px 26px;
  }
}

/* Daily operations request workspace v1. */
.workspace.workspace--daily-ops {
  height: calc(100vh - var(--topbar-height));
  padding: 7px 8px 8px;
  overflow: hidden;
}

.daily-ops-live {
  --ops-window: rgba(25, 33, 27, 0.97);
  --ops-toolbar: rgba(23, 31, 25, 0.92);
  --ops-line: rgba(255, 255, 255, 0.11);
  --ops-text: #f3f6f1;
  --ops-muted: rgba(243, 246, 241, 0.62);
  --ops-faint: rgba(243, 246, 241, 0.42);
  --ops-row: rgba(255, 255, 255, 0.038);
  --ops-row-alt: rgba(255, 255, 255, 0.026);
  --ops-selected: rgba(178, 185, 178, 0.56);
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background: var(--ops-window);
  border: 1px solid var(--ops-line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  color: var(--ops-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ops-toolbar {
  min-width: 0;
  border-bottom: 1px solid var(--ops-line);
  background: var(--ops-toolbar);
  display: grid;
  grid-template-columns: 76px minmax(210px, 1fr) auto minmax(250px, 360px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.ops-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.ops-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.ops-title-wrap {
  min-width: 0;
}

.ops-title-wrap h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: 0;
}

.ops-path {
  margin-top: 3px;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-stats {
  display: flex;
  gap: 7px;
}

.ops-stats div {
  min-width: 55px;
  height: 38px;
  border: 1px solid var(--ops-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0 8px;
}

.ops-stats strong {
  color: var(--ops-text);
  font-size: 14px;
  line-height: 1;
}

.ops-stats span {
  color: var(--ops-muted);
  font-size: 10px;
  line-height: 1;
  margin-top: 3px;
}

.ops-search {
  min-width: 0;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--ops-line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: rgba(244, 247, 244, 0.88);
}

.ops-search span {
  font-size: 19px;
  line-height: 1;
}

.ops-search input,
.ops-form input,
.ops-form select,
.ops-form textarea,
.ops-review-panel textarea,
.ops-issue-grid input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ops-text);
  font: inherit;
  font-size: 12.5px;
}

.ops-search input {
  border: 0;
  background: transparent;
  font-size: 13px;
}

.ops-search input::placeholder,
.ops-form input::placeholder,
.ops-form textarea::placeholder,
.ops-review-panel textarea::placeholder,
.ops-issue-grid input::placeholder {
  color: var(--ops-muted);
}

.ops-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr) 350px;
}

.ops-create-pane,
.ops-preview {
  min-width: 0;
  min-height: 0;
  background: rgba(13, 19, 15, 0.28);
  overflow: auto;
}

.ops-create-pane {
  border-right: 1px solid var(--ops-line);
  padding: 12px;
}

.ops-form-title {
  margin: 0 0 10px;
  color: rgba(241, 245, 239, 0.95);
  font-size: 15px;
  font-weight: 740;
}

.ops-form {
  display: grid;
  gap: 8px;
}

.ops-form label {
  display: grid;
  gap: 4px;
}

.ops-form label span {
  color: var(--ops-faint);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.ops-form input,
.ops-form select {
  height: 31px;
  border-radius: 8px;
  padding: 0 9px;
}

.ops-form textarea,
.ops-review-panel textarea {
  min-height: 82px;
  resize: vertical;
  border-radius: 8px;
  padding: 8px 9px;
  line-height: 1.34;
}

.ops-create-button,
.ops-review-actions button,
.ops-issue-grid button,
.ops-copy-button {
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(105, 212, 137, 0.22);
  background: rgba(105, 212, 137, 0.14);
  color: rgba(220, 250, 229, 0.96);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.ops-create-button:hover,
.ops-review-actions button:hover,
.ops-issue-grid button:hover,
.ops-copy-button:hover {
  background: rgba(105, 212, 137, 0.2);
}

.ops-message,
.ops-copy-state {
  min-height: 28px;
  border-radius: 9px;
  display: grid;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 720;
}

.ops-message.is-error {
  border: 1px solid rgba(255, 170, 168, 0.24);
  background: rgba(255, 170, 168, 0.1);
  color: #ffaaa8;
}

.ops-message.is-ok,
.ops-copy-state {
  border: 1px solid rgba(105, 212, 137, 0.22);
  background: rgba(105, 212, 137, 0.13);
  color: rgba(220, 250, 229, 0.96);
}

.ops-list-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 38px 38px minmax(0, 1fr);
  border-right: 1px solid var(--ops-line);
}

.ops-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-filter-row button {
  height: 27px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ops-muted);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ops-filter-row button.is-active {
  background: rgba(127, 137, 128, 0.34);
  color: var(--ops-text);
}

.ops-columns,
.ops-row {
  display: grid;
  grid-template-columns: 74px minmax(120px, 1fr) 78px 98px 88px 78px 88px;
}

.ops-columns {
  padding: 0 5px;
  align-items: end;
  color: rgba(245, 248, 245, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 650;
}

.ops-columns div {
  min-width: 0;
  padding: 0 7px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-columns div:first-child {
  border-left: 0;
}

.ops-table {
  min-height: 0;
  overflow: auto;
  padding: 5px 5px 8px;
}

.ops-row {
  min-height: 31px;
  border-radius: 7px;
  margin-bottom: 1px;
  align-items: center;
  color: rgba(247, 249, 247, 0.9);
  font-size: 12.6px;
  font-weight: 500;
  cursor: default;
}

.ops-row:nth-child(odd) {
  background: var(--ops-row);
}

.ops-row:nth-child(even) {
  background: var(--ops-row-alt);
}

.ops-row:hover,
.ops-row.is-selected {
  background: var(--ops-selected);
  color: #fff;
}

.ops-cell {
  min-width: 0;
  padding: 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-client {
  font-weight: 650;
}

.ops-time,
.ops-amount {
  color: rgba(247, 249, 247, 0.7);
  font-size: 12px;
}

.ops-status,
.ops-urgency {
  height: 22px;
  max-width: 82px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-status.is-new,
.ops-urgency.is-normal {
  background: rgba(126, 138, 132, 0.26);
  color: rgba(241, 245, 239, 0.88);
}

.ops-status.is-clarification,
.ops-urgency.is-today {
  background: rgba(216, 183, 72, 0.2);
  color: rgba(255, 235, 150, 0.95);
}

.ops-status.is-declined,
.ops-urgency.is-urgent {
  background: rgba(217, 85, 85, 0.24);
  color: rgba(255, 190, 188, 0.96);
}

.ops-status.is-requisites_issued {
  background: rgba(64, 167, 107, 0.24);
  color: rgba(212, 255, 226, 0.96);
}

.ops-preview {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ops-preview-head {
  display: grid;
  gap: 3px;
}

.ops-preview-title {
  color: rgba(241, 245, 239, 0.95);
  font-size: 16px;
  font-weight: 730;
  line-height: 1.15;
  max-height: 42px;
  overflow: hidden;
}

.ops-preview-subtitle {
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 560;
}

.ops-facts {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.ops-facts div {
  min-height: 28px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.ops-facts span {
  color: var(--ops-faint);
}

.ops-facts strong {
  min-width: 0;
  color: rgba(241, 245, 239, 0.88);
  font-weight: 690;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-comment-box,
.ops-response-box,
.ops-review-panel {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.ops-comment-box div,
.ops-response-head,
.ops-review-title {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--ops-faint);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.ops-comment-box p,
.ops-response-box p {
  margin: 0;
  padding: 10px 11px 12px;
  color: rgba(241, 245, 239, 0.9);
  font-size: 12.5px;
  line-height: 1.36;
  white-space: pre-wrap;
  word-break: break-word;
}

.ops-response-box.is-empty p {
  color: var(--ops-muted);
}

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

.ops-response-head strong {
  color: rgba(241, 245, 239, 0.9);
  font-size: 12px;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-response-meta {
  padding: 8px 10px 0;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 620;
}

.ops-requisites-text {
  max-height: 188px;
  margin: 8px 10px 10px;
  padding: 9px 10px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(241, 245, 239, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 12px;
  line-height: 1.34;
}

.ops-copy-button {
  margin: 0 10px 10px;
}

.ops-review-panel {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
}

.ops-review-panel textarea {
  width: auto;
  margin: 0 10px;
}

.ops-review-actions,
.ops-issue-grid {
  display: grid;
  gap: 7px;
  margin: 0 10px;
}

.ops-review-actions {
  grid-template-columns: 1fr 1fr;
}

.ops-issue-grid {
  grid-template-columns: 1fr 1fr;
}

.ops-issue-grid input {
  height: 30px;
  border-radius: 8px;
  padding: 0 9px;
}

.ops-issue-grid button {
  grid-column: 1 / -1;
}

.ops-empty,
.ops-preview-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--ops-muted);
  font-size: 13px;
  font-weight: 620;
}

body[data-theme="light"] .daily-ops-live {
  --ops-window: rgba(246, 248, 245, 0.97);
  --ops-toolbar: rgba(241, 244, 240, 0.94);
  --ops-line: rgba(34, 45, 38, 0.13);
  --ops-text: #172017;
  --ops-muted: rgba(23, 32, 23, 0.58);
  --ops-faint: rgba(23, 32, 23, 0.42);
  --ops-row: rgba(23, 32, 23, 0.045);
  --ops-row-alt: rgba(23, 32, 23, 0.028);
  --ops-selected: rgba(127, 137, 128, 0.36);
}

@media (max-width: 1280px) {
  .ops-toolbar {
    grid-template-columns: 62px minmax(170px, 1fr) auto minmax(190px, 250px);
  }

  .ops-content {
    grid-template-columns: 260px minmax(0, 1fr) 315px;
  }

  .ops-columns,
  .ops-row {
    grid-template-columns: 66px minmax(105px, 1fr) 68px 78px 70px 68px 76px;
  }
}

/* Bailiffs workspace v1. */
.workspace.workspace--bailiffs {
  height: calc(100vh - var(--topbar-height));
  padding: 7px 8px 8px;
  overflow: hidden;
}

.bailiffs-live {
  --bf-window: rgba(25, 33, 27, 0.97);
  --bf-toolbar: rgba(23, 31, 25, 0.92);
  --bf-line: rgba(255, 255, 255, 0.11);
  --bf-text: #f3f6f1;
  --bf-muted: rgba(243, 246, 241, 0.62);
  --bf-faint: rgba(243, 246, 241, 0.42);
  --bf-row: rgba(255, 255, 255, 0.038);
  --bf-row-alt: rgba(255, 255, 255, 0.026);
  --bf-selected: rgba(178, 185, 178, 0.56);
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background: var(--bf-window);
  border: 1px solid var(--bf-line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  color: var(--bf-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.bf-toolbar {
  min-width: 0;
  border-bottom: 1px solid var(--bf-line);
  background: var(--bf-toolbar);
  display: grid;
  grid-template-columns: 76px minmax(170px, 1fr) auto minmax(245px, 360px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.bf-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.bf-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.bf-title-wrap {
  min-width: 0;
}

.bf-title-wrap h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: 0;
}

.bf-path {
  margin-top: 3px;
  color: var(--bf-muted);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-stats {
  display: flex;
  gap: 7px;
}

.bf-stats div {
  min-width: 56px;
  height: 38px;
  border: 1px solid var(--bf-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0 8px;
}

.bf-stats strong {
  color: var(--bf-text);
  font-size: 14px;
  line-height: 1;
}

.bf-stats span {
  color: var(--bf-muted);
  font-size: 10px;
  line-height: 1;
  margin-top: 3px;
}

.bf-search {
  min-width: 0;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--bf-line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: rgba(244, 247, 244, 0.88);
}

.bf-search span {
  font-size: 19px;
  line-height: 1;
}

.bf-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bf-text);
  font: inherit;
  font-size: 13px;
}

.bf-search input::placeholder {
  color: var(--bf-muted);
}

.bf-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.bf-list-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  border-right: 1px solid var(--bf-line);
}

.bf-columns,
.bf-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 68px 82px 94px 80px minmax(130px, 0.86fr);
}

.bf-columns {
  padding: 0 5px;
  align-items: end;
  color: rgba(245, 248, 245, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 650;
}

.bf-columns div {
  min-width: 0;
  padding: 0 7px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-columns div:first-child {
  border-left: 0;
  padding-left: 12px;
}

.bf-table {
  min-height: 0;
  overflow: auto;
  padding: 5px 5px 8px;
}

.bf-row {
  min-height: 31px;
  border-radius: 7px;
  margin-bottom: 1px;
  align-items: center;
  color: rgba(247, 249, 247, 0.9);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
}

.bf-row:nth-child(odd) {
  background: var(--bf-row);
}

.bf-row:nth-child(even) {
  background: var(--bf-row-alt);
}

.bf-row:hover,
.bf-row.is-selected {
  background: var(--bf-selected);
  color: #fff;
}

.bf-cell {
  min-width: 0;
  padding: 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-company {
  padding-left: 12px;
  font-weight: 640;
}

.bf-amount,
.bf-date {
  color: rgba(247, 249, 247, 0.7);
  font-size: 12.5px;
}

.bf-bank-pill {
  max-width: 76px;
  height: 23px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, #7c847d, #525a54);
  color: #fff;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 740;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.bf-preview {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(13, 19, 15, 0.28);
  overflow: auto;
}

.bf-preview-head {
  display: grid;
  gap: 3px;
}

.bf-preview-title {
  color: rgba(241, 245, 239, 0.95);
  font-size: 16px;
  font-weight: 730;
  line-height: 1.15;
  max-height: 42px;
  overflow: hidden;
}

.bf-preview-subtitle {
  color: var(--bf-muted);
  font-size: 12px;
  font-weight: 560;
}

.bf-facts {
  display: grid;
  gap: 7px;
  font-size: 12px;
}

.bf-facts div {
  min-height: 30px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.bf-facts span {
  color: var(--bf-faint);
}

.bf-facts strong {
  min-width: 0;
  color: rgba(241, 245, 239, 0.88);
  font-weight: 690;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bf-comment-box {
  min-height: 112px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.bf-comment-head {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--bf-faint);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.bf-comment-box p {
  margin: 0;
  padding: 10px 11px 12px;
  color: rgba(241, 245, 239, 0.9);
  font-size: 12.5px;
  line-height: 1.36;
  white-space: pre-wrap;
  word-break: break-word;
}

.bf-copy-button {
  align-self: start;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(105, 212, 137, 0.22);
  background: rgba(105, 212, 137, 0.14);
  color: rgba(220, 250, 229, 0.96);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.bf-copy-button:hover {
  background: rgba(105, 212, 137, 0.2);
}

.bf-copy-state {
  min-height: 28px;
  align-self: start;
  border-radius: 9px;
  border: 1px solid rgba(105, 212, 137, 0.25);
  background: rgba(105, 212, 137, 0.16);
  color: rgba(220, 250, 229, 0.96);
  display: grid;
  place-items: center;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 720;
}

.bf-empty,
.bf-preview-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--bf-muted);
  font-size: 13px;
  font-weight: 620;
}

.bf-empty.is-error {
  color: #ffaaa8;
}

body[data-theme="light"] .bailiffs-live {
  --bf-window: rgba(246, 248, 245, 0.97);
  --bf-toolbar: rgba(241, 244, 240, 0.94);
  --bf-line: rgba(34, 45, 38, 0.13);
  --bf-text: #172017;
  --bf-muted: rgba(23, 32, 23, 0.58);
  --bf-faint: rgba(23, 32, 23, 0.42);
  --bf-row: rgba(23, 32, 23, 0.045);
  --bf-row-alt: rgba(23, 32, 23, 0.028);
  --bf-selected: rgba(127, 137, 128, 0.36);
}

@media (max-width: 1280px) {
  .bf-toolbar {
    grid-template-columns: 62px minmax(150px, 1fr) auto minmax(190px, 250px);
  }

  .bf-content {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .bf-columns,
  .bf-row {
    grid-template-columns: minmax(150px, 1fr) 58px 72px 80px 66px minmax(110px, 0.82fr);
  }
}

/* Requisites workspace v1. */
.workspace.workspace--requisites {
  height: calc(100vh - var(--topbar-height));
  padding: 7px 8px 8px;
  overflow: hidden;
}

.requisites-live {
  --req-window: rgba(25, 33, 27, 0.97);
  --req-sidebar: rgba(18, 27, 21, 0.94);
  --req-toolbar: rgba(23, 31, 25, 0.92);
  --req-line: rgba(255, 255, 255, 0.11);
  --req-line-soft: rgba(255, 255, 255, 0.065);
  --req-text: #f3f6f1;
  --req-muted: rgba(243, 246, 241, 0.62);
  --req-faint: rgba(243, 246, 241, 0.42);
  --req-row: rgba(255, 255, 255, 0.038);
  --req-row-alt: rgba(255, 255, 255, 0.026);
  --req-selected: rgba(178, 185, 178, 0.56);
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background: var(--req-window);
  border: 1px solid var(--req-line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  color: var(--req-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.req-toolbar {
  min-width: 0;
  border-bottom: 1px solid var(--req-line);
  background: var(--req-toolbar);
  display: grid;
  grid-template-columns: 76px minmax(190px, 1fr) auto minmax(230px, 330px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.req-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.req-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.req-title-wrap {
  min-width: 0;
}

.req-title-wrap h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: 0;
}

.req-path {
  margin-top: 3px;
  color: var(--req-muted);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-stats {
  display: flex;
  gap: 7px;
}

.req-stats div {
  min-width: 58px;
  height: 38px;
  border: 1px solid var(--req-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0 8px;
}

.req-stats strong {
  color: var(--req-text);
  font-size: 14px;
  line-height: 1;
}

.req-stats span {
  color: var(--req-muted);
  font-size: 10px;
  line-height: 1;
  margin-top: 3px;
}

.req-search {
  min-width: 0;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--req-line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: rgba(244, 247, 244, 0.88);
}

.req-search span {
  font-size: 19px;
  line-height: 1;
}

.req-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--req-text);
  font: inherit;
  font-size: 13px;
}

.req-search input::placeholder {
  color: var(--req-muted);
}

.req-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.req-list-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  border-right: 1px solid var(--req-line);
}

.req-columns,
.req-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 118px minmax(360px, 1.35fr);
}

.req-columns {
  padding: 0 5px;
  align-items: end;
  color: rgba(245, 248, 245, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 650;
}

.req-columns div {
  min-width: 0;
  padding: 0 7px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-columns div:first-child {
  border-left: 0;
  padding-left: 12px;
}

.req-table {
  min-height: 0;
  overflow: auto;
  padding: 5px 5px 8px;
}

.req-row {
  min-height: 31px;
  border-radius: 7px;
  margin-bottom: 1px;
  align-items: center;
  color: rgba(247, 249, 247, 0.9);
  font-size: 13.5px;
  font-weight: 500;
  cursor: default;
}

.req-row:nth-child(odd) {
  background: var(--req-row);
}

.req-row:nth-child(even) {
  background: var(--req-row-alt);
}

.req-row:hover,
.req-row.is-selected {
  background: var(--req-selected);
  color: #fff;
}

.req-cell {
  min-width: 0;
  padding: 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-name {
  padding-left: 12px;
  font-weight: 640;
}

.req-inn {
  color: rgba(247, 249, 247, 0.66);
  font-size: 12.5px;
}

.req-banks {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.req-bank {
  flex: 0 0 auto;
  height: 23px;
  max-width: 82px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  padding: 0 8px;
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 740;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.req-bank:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.req-bank.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.38);
  outline-offset: 1px;
  filter: brightness(1.12);
}

.req-bank.is-red { background: linear-gradient(180deg, #d95555, #a93639); }
.req-bank.is-green { background: linear-gradient(180deg, #40a76b, #257a4a); }
.req-bank.is-blue { background: linear-gradient(180deg, #4d8fe7, #2564b6); }
.req-bank.is-cyan { background: linear-gradient(180deg, #35a6b3, #207480); }
.req-bank.is-violet { background: linear-gradient(180deg, #8268d7, #5d43a9); }
.req-bank.is-yellow { background: linear-gradient(180deg, #d8b748, #9a7d25); color: #211b09; }
.req-bank.is-teal { background: linear-gradient(180deg, #42aaa0, #247970); }
.req-bank.is-gray { background: linear-gradient(180deg, #7c847d, #525a54); }

.req-preview {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(13, 19, 15, 0.28);
  overflow: auto;
}

.req-preview-head {
  display: grid;
  gap: 3px;
}

.req-preview-title {
  color: rgba(241, 245, 239, 0.95);
  font-size: 16px;
  font-weight: 730;
  line-height: 1.15;
  max-height: 40px;
  overflow: hidden;
}

.req-preview-subtitle {
  color: var(--req-muted);
  font-size: 12px;
  font-weight: 560;
}

.req-bank-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
}

.req-bank-stack .req-bank {
  max-width: 110px;
}

.req-details-box,
.req-details-panel {
  min-height: 96px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.req-details-box {
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--req-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 650;
}

.req-details-box.is-loading {
  color: rgba(220, 250, 229, 0.86);
}

.req-details-panel {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr);
  overflow: hidden;
}

.req-details-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.req-details-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.req-details-head span {
  color: var(--req-faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.req-details-head strong {
  min-width: 0;
  color: rgba(241, 245, 239, 0.92);
  font-size: 13px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.req-copy-button {
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(105, 212, 137, 0.22);
  background: rgba(105, 212, 137, 0.14);
  color: rgba(220, 250, 229, 0.96);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.req-copy-button:hover {
  background: rgba(105, 212, 137, 0.2);
}

.req-details-text {
  min-height: 0;
  max-height: 292px;
  margin: 0;
  padding: 10px 11px 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(241, 245, 239, 0.9);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 12px;
  line-height: 1.36;
}

.req-copy-state {
  min-height: 28px;
  align-self: start;
  border-radius: 9px;
  border: 1px solid rgba(105, 212, 137, 0.12);
  background: rgba(105, 212, 137, 0.08);
  color: rgba(220, 250, 229, 0.58);
  display: grid;
  place-items: center;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 720;
}

.req-copy-state.is-visible {
  border-color: rgba(105, 212, 137, 0.25);
  background: rgba(105, 212, 137, 0.16);
  color: rgba(220, 250, 229, 0.96);
}

.req-empty,
.req-preview-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--req-muted);
  font-size: 13px;
  font-weight: 620;
}

.req-empty.is-error {
  color: #ffaaa8;
}

body[data-theme="light"] .requisites-live {
  --req-window: rgba(246, 248, 245, 0.97);
  --req-sidebar: rgba(232, 236, 231, 0.94);
  --req-toolbar: rgba(241, 244, 240, 0.94);
  --req-line: rgba(34, 45, 38, 0.13);
  --req-line-soft: rgba(34, 45, 38, 0.08);
  --req-text: #172017;
  --req-muted: rgba(23, 32, 23, 0.58);
  --req-faint: rgba(23, 32, 23, 0.42);
  --req-row: rgba(23, 32, 23, 0.045);
  --req-row-alt: rgba(23, 32, 23, 0.028);
  --req-selected: rgba(127, 137, 128, 0.36);
}

@media (max-width: 1280px) {
  .req-toolbar {
    grid-template-columns: 62px minmax(160px, 1fr) auto minmax(190px, 250px);
  }

  .req-content {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .req-columns,
  .req-row {
    grid-template-columns: minmax(170px, 1fr) 98px minmax(250px, 1.15fr);
  }
}

/* Clients and suppliers draft database workspace v2. */
.workspace.workspace--clients,
.workspace.workspace--suppliers {
  height: calc(100vh - var(--topbar-height));
  padding: 7px 8px 8px;
  overflow: hidden;
}

.client-base-live {
  --client-window: rgba(25, 33, 27, 0.97);
  --client-toolbar: rgba(23, 31, 25, 0.93);
  --client-line: rgba(255, 255, 255, 0.11);
  --client-line-soft: rgba(255, 255, 255, 0.07);
  --client-text: #f3f6f1;
  --client-muted: rgba(243, 246, 241, 0.62);
  --client-faint: rgba(243, 246, 241, 0.42);
  --client-row: rgba(255, 255, 255, 0.038);
  --client-row-alt: rgba(255, 255, 255, 0.026);
  --client-selected: rgba(178, 185, 178, 0.54);
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px 42px minmax(0, 1fr);
  background: var(--client-window);
  border: 1px solid var(--client-line);
  color: var(--client-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.client-toolbar {
  min-width: 0;
  border-bottom: 1px solid var(--client-line);
  background: var(--client-toolbar);
  display: grid;
  grid-template-columns: 76px minmax(220px, 1fr) auto minmax(250px, 360px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.client-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.client-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.client-title {
  min-width: 0;
}

.client-title h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: 0;
}

.client-title div {
  margin-top: 3px;
  color: var(--client-muted);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-stats {
  display: flex;
  gap: 7px;
}

.client-stats div {
  min-width: 58px;
  height: 38px;
  border: 1px solid var(--client-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0 8px;
}

.client-stats strong {
  color: var(--client-text);
  font-size: 14px;
  line-height: 1;
}

.client-stats span {
  color: var(--client-muted);
  font-size: 10px;
  line-height: 1;
  margin-top: 3px;
}

.client-search {
  min-width: 0;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--client-line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: rgba(244, 247, 244, 0.88);
}

.client-search span {
  font-size: 19px;
  line-height: 1;
}

.client-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--client-text);
  font: inherit;
  font-size: 13px;
}

.client-search input::placeholder {
  color: var(--client-muted);
}

.client-filterbar {
  min-width: 0;
  border-bottom: 1px solid var(--client-line);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  overflow-x: auto;
}

.client-filterbar button {
  height: 27px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--client-muted);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 690;
  cursor: pointer;
  white-space: nowrap;
}

.client-filterbar button:hover,
.client-filterbar button.is-active {
  color: var(--client-text);
  border-color: var(--client-line);
  background: rgba(255, 255, 255, 0.07);
}

.client-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.client-table-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 35px minmax(0, 1fr);
  border-right: 1px solid var(--client-line);
}

.client-columns,
.client-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1.38fr) 104px minmax(170px, 1fr) 112px 96px;
  align-items: center;
}

.client-columns {
  color: var(--client-muted);
  border-bottom: 1px solid var(--client-line);
  font-size: 12px;
  font-weight: 720;
}

.client-columns div {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-table {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 7px 8px 10px;
}

.client-row {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--client-text);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.client-row:nth-child(even) {
  background: var(--client-row-alt);
}

.client-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.client-row.is-selected {
  background: var(--client-selected);
  color: #ffffff;
}

.client-row > span {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-name-cell {
  display: grid;
  gap: 2px;
}

.client-name-cell strong,
.client-name-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-name-cell strong {
  font-size: 13.5px;
  font-weight: 720;
}

.client-name-cell small {
  color: var(--client-muted);
  font-size: 11px;
  font-weight: 580;
}

.client-row.is-selected .client-name-cell small {
  color: rgba(255, 255, 255, 0.72);
}

.client-status {
  display: inline-grid;
  max-width: 100%;
  height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(242, 246, 242, 0.78);
  font-style: normal;
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-status.is-active {
  background: rgba(89, 205, 125, 0.18);
  color: #baf0c9;
}

.client-status.is-watch {
  background: rgba(232, 198, 92, 0.17);
  color: #f0d98f;
}

.client-status.is-risk {
  background: rgba(255, 117, 117, 0.17);
  color: #ffb8b8;
}

.client-status.is-draft {
  background: rgba(155, 171, 164, 0.17);
  color: rgba(229, 237, 232, 0.72);
}

.client-preview {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.018);
}

.client-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--client-line);
}

.client-kicker {
  color: var(--client-muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.client-preview-head h2 {
  margin: 4px 0 5px;
  color: var(--client-text);
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.client-preview-head p {
  margin: 0;
  color: var(--client-muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.client-turnover-card {
  min-height: 68px;
  border: 1px solid var(--client-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 14px;
  margin: 13px 0;
}

.client-turnover-card span {
  color: var(--client-muted);
  font-size: 11px;
  font-weight: 740;
  text-transform: uppercase;
}

.client-turnover-card strong {
  color: var(--client-text);
  font-size: 18px;
  font-weight: 760;
}

.client-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

.client-fact {
  min-width: 0;
  min-height: 56px;
  border: 1px solid var(--client-line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.032);
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
}

.client-fact span {
  color: var(--client-muted);
  font-size: 10.5px;
  font-weight: 740;
}

.client-fact strong {
  min-width: 0;
  color: var(--client-text);
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-notes {
  display: grid;
  gap: 8px;
}

.client-note {
  border: 1px solid var(--client-line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
  padding: 10px 11px;
}

.client-note span {
  display: block;
  color: var(--client-muted);
  font-size: 10.5px;
  font-weight: 780;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.client-note p {
  margin: 0;
  color: rgba(245, 249, 245, 0.88);
  font-size: 12.3px;
  line-height: 1.42;
}

.client-note.is-warning {
  border-color: rgba(255, 117, 117, 0.22);
  background: rgba(255, 117, 117, 0.07);
}

.client-note.is-starter {
  border-color: rgba(89, 205, 125, 0.22);
  background: rgba(89, 205, 125, 0.07);
}

.client-linking {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--client-line);
}

.client-linking div {
  display: grid;
  gap: 2px;
}

.client-linking span {
  color: var(--client-muted);
  font-size: 10.5px;
  font-weight: 740;
  text-transform: uppercase;
}

.client-linking strong {
  color: rgba(245, 249, 245, 0.86);
  font-size: 12px;
  font-weight: 680;
}

.client-empty {
  min-height: 94px;
  display: grid;
  place-items: center;
  color: var(--client-muted);
  font-size: 13px;
  font-weight: 620;
}

body[data-theme="light"] .client-base-live {
  --client-window: rgba(246, 248, 245, 0.97);
  --client-toolbar: rgba(241, 244, 240, 0.94);
  --client-line: rgba(34, 45, 38, 0.13);
  --client-line-soft: rgba(34, 45, 38, 0.08);
  --client-text: #172017;
  --client-muted: rgba(23, 32, 23, 0.58);
  --client-faint: rgba(23, 32, 23, 0.42);
  --client-row: rgba(23, 32, 23, 0.045);
  --client-row-alt: rgba(23, 32, 23, 0.028);
  --client-selected: rgba(127, 137, 128, 0.36);
}

body[data-theme="light"] .client-note p,
body[data-theme="light"] .client-linking strong {
  color: rgba(23, 32, 23, 0.82);
}

/* Finance workspace v1: weekly/monthly expense control with wallets. */
.workspace.workspace--finance {
  height: calc(100vh - var(--topbar-height) - 12px);
  padding: 2px 3px 4px;
  overflow: hidden;
}

.finance-live {
  --finance-window: rgba(24, 31, 27, 0.97);
  --finance-toolbar: rgba(22, 29, 25, 0.94);
  --finance-line: rgba(255, 255, 255, 0.105);
  --finance-line-soft: rgba(255, 255, 255, 0.07);
  --finance-text: #f3f6f1;
  --finance-muted: rgba(243, 246, 241, 0.62);
  --finance-faint: rgba(243, 246, 241, 0.4);
  --finance-row: rgba(255, 255, 255, 0.035);
  --finance-row-alt: rgba(255, 255, 255, 0.024);
  --finance-selected: rgba(132, 145, 132, 0.42);
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--finance-line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px 54px minmax(0, 1fr);
  background: var(--finance-window);
  color: var(--finance-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

.finance-head {
  min-width: 0;
  border-bottom: 1px solid var(--finance-line);
  background: var(--finance-toolbar);
  display: grid;
  grid-template-columns: 76px minmax(260px, 1fr) auto minmax(260px, 360px);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.finance-traffic {
  display: flex;
  gap: 9px;
  padding-left: 5px;
}

.finance-traffic span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.finance-title {
  min-width: 0;
}

.finance-title h1 {
  margin: 0;
  color: var(--finance-text);
  font-size: 18px;
  line-height: 1.05;
  font-weight: 730;
  letter-spacing: 0;
}

.finance-title div {
  margin-top: 3px;
  color: var(--finance-muted);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-periods {
  min-width: 0;
  display: flex;
  gap: 6px;
}

.finance-periods button,
.finance-filters button {
  height: 30px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--finance-muted);
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}

.finance-periods button:hover,
.finance-periods button.is-active,
.finance-filters button:hover,
.finance-filters button.is-active {
  color: var(--finance-text);
  border-color: var(--finance-line);
  background: rgba(255, 255, 255, 0.075);
}

.finance-search {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--finance-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: rgba(244, 247, 244, 0.88);
}

.finance-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--finance-text);
  font: inherit;
  font-size: 13px;
}

.finance-search input::placeholder {
  color: var(--finance-muted);
}

.finance-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--finance-line);
  background: rgba(255, 255, 255, 0.025);
}

.finance-metric {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--finance-line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.038);
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 4px 10px;
}

.finance-metric span {
  color: var(--finance-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 720;
}

.finance-metric strong {
  color: var(--finance-text);
  font-size: 15px;
  line-height: 1;
  font-weight: 780;
}

.finance-metric.is-risk strong {
  color: #f1d084;
}

.finance-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
}

.finance-table-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 42px 36px minmax(0, 1fr);
  border-right: 1px solid var(--finance-line);
}

.finance-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--finance-line);
}

.finance-columns,
.finance-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 1.32fr) 92px minmax(140px, 0.78fr) 100px 112px 100px 132px;
  align-items: center;
}

.finance-columns {
  color: var(--finance-muted);
  border-bottom: 1px solid var(--finance-line);
  font-size: 11.5px;
  font-weight: 740;
}

.finance-columns div {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-table {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 7px 8px 10px;
}

.finance-row {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--finance-text);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.finance-row:nth-child(even) {
  background: var(--finance-row-alt);
}

.finance-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.finance-row.is-selected {
  background: var(--finance-selected);
  color: #ffffff;
}

.finance-row > span {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-name-cell {
  display: grid;
  gap: 2px;
}

.finance-name-cell strong,
.finance-name-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-name-cell strong {
  font-size: 13.5px;
  font-weight: 740;
}

.finance-name-cell small {
  color: var(--finance-muted);
  font-size: 11px;
  font-weight: 580;
}

.finance-row.is-selected .finance-name-cell small {
  color: rgba(255, 255, 255, 0.72);
}

.finance-category,
.finance-status {
  display: inline-grid;
  max-width: 100%;
  height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(242, 246, 242, 0.78);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-category.is-payroll,
.finance-status.is-paid {
  background: rgba(89, 205, 125, 0.18);
  color: #baf0c9;
}

.finance-category.is-supplies,
.finance-status.is-today,
.finance-status.is-confirm {
  background: rgba(232, 198, 92, 0.17);
  color: #f0d98f;
}

.finance-category.is-infra,
.finance-category.is-subscriptions {
  background: rgba(116, 163, 236, 0.16);
  color: #b9d3ff;
}

.finance-category.is-operations,
.finance-category.is-manual,
.finance-status.is-planned {
  background: rgba(155, 171, 164, 0.17);
  color: rgba(229, 237, 232, 0.76);
}

.finance-status.is-risk,
.finance-status.is-overdue {
  background: rgba(255, 117, 117, 0.17);
  color: #ffb8b8;
}

.finance-side {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.finance-panel {
  min-width: 0;
  border: 1px solid var(--finance-line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.finance-panel h2 {
  margin: 0 0 8px;
  color: var(--finance-text);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 760;
}

.finance-wallets {
  display: grid;
  gap: 8px;
}

.finance-wallet {
  min-width: 0;
  border: 1px solid var(--finance-line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px;
}

.finance-wallet strong,
.finance-wallet span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-wallet strong {
  color: var(--finance-text);
  font-size: 12.5px;
  font-weight: 760;
}

.finance-wallet span {
  margin-top: 2px;
  color: var(--finance-muted);
  font-size: 11px;
  font-weight: 590;
}

.finance-wallet dl {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.finance-wallet dl div,
.finance-facts div,
.finance-detail-money div {
  min-width: 0;
  border: 1px solid var(--finance-line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  padding: 7px 8px;
}

.finance-wallet dt,
.finance-facts span,
.finance-detail-money span {
  margin: 0;
  display: block;
  color: var(--finance-muted);
  font-size: 9.5px;
  line-height: 1;
  font-weight: 740;
}

.finance-wallet dd,
.finance-facts strong,
.finance-detail-money strong {
  margin: 4px 0 0;
  display: block;
  color: var(--finance-text);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-detail-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.finance-detail-head span {
  color: var(--finance-muted);
  font-size: 10px;
  font-weight: 760;
}

.finance-detail-head h2 {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--finance-text);
  font-size: 18px;
  line-height: 1.08;
  font-weight: 790;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-detail-money,
.finance-facts {
  display: grid;
  gap: 7px;
}

.finance-detail-money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 8px;
}

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

.finance-note {
  margin-top: 8px;
  border: 1px solid rgba(232, 198, 92, 0.22);
  border-radius: 10px;
  background: rgba(232, 198, 92, 0.07);
  color: rgba(244, 247, 244, 0.8);
  padding: 9px;
  font-size: 12px;
  line-height: 1.35;
}

.finance-manual form {
  display: grid;
  gap: 7px;
}

.finance-manual input,
.finance-manual select {
  min-width: 0;
  width: 100%;
  height: 34px;
  border: 1px solid var(--finance-line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--finance-text);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.finance-manual input::placeholder {
  color: var(--finance-muted);
}

.finance-empty {
  color: var(--finance-muted);
  padding: 18px;
  font-size: 13px;
}

body[data-theme="light"] .finance-live {
  --finance-window: rgba(246, 248, 245, 0.97);
  --finance-toolbar: rgba(241, 244, 240, 0.94);
  --finance-line: rgba(34, 45, 38, 0.13);
  --finance-line-soft: rgba(34, 45, 38, 0.08);
  --finance-text: #172017;
  --finance-muted: rgba(23, 32, 23, 0.58);
  --finance-faint: rgba(23, 32, 23, 0.42);
  --finance-row: rgba(23, 32, 23, 0.045);
  --finance-row-alt: rgba(23, 32, 23, 0.028);
  --finance-selected: rgba(127, 137, 128, 0.36);
}

body[data-theme="light"] .finance-note {
  color: rgba(23, 32, 23, 0.82);
}

@media (max-width: 1280px) {
  .client-toolbar {
    grid-template-columns: 62px minmax(170px, 1fr) auto minmax(190px, 270px);
  }

  .client-content {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .client-columns,
  .client-row {
    grid-template-columns: minmax(180px, 1.32fr) 94px minmax(145px, 1fr) 104px 88px;
  }

  .finance-head {
    grid-template-columns: 62px minmax(180px, 1fr) auto minmax(200px, 280px);
  }

  .finance-body {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .finance-columns,
  .finance-row {
    grid-template-columns: minmax(190px, 1.24fr) 82px minmax(118px, 0.78fr) 88px 98px 88px 112px;
  }
}

/* Finance workspace v2: wallet-first section list for owner/operator use. */
.finance-body.finance-body-simple {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.finance-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-right: 1px solid var(--finance-line);
}

.finance-wallet-board {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.finance-wallet-board .finance-wallet {
  min-height: 0;
}

.finance-wallet-board .finance-wallet dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-list {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.finance-expense-section {
  min-width: 0;
  border: 1px solid var(--finance-line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  overflow: hidden;
}

.finance-section-head {
  min-width: 0;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--finance-line-soft);
  background: rgba(255, 255, 255, 0.028);
}

.finance-section-head h2 {
  margin: 0;
  color: var(--finance-text);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 780;
}

.finance-section-head span {
  display: block;
  margin-top: 3px;
  color: var(--finance-muted);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 580;
}

.finance-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-section-actions strong {
  color: var(--finance-text);
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.finance-section-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--finance-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--finance-text);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  font-weight: 760;
  cursor: pointer;
}

.finance-section-actions button:hover {
  border-color: rgba(147, 190, 255, 0.5);
  background: rgba(147, 190, 255, 0.13);
}

.finance-section-items {
  min-width: 0;
  display: grid;
  padding: 6px;
}

.finance-section-items .finance-row {
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 0.92fr) 150px;
  min-height: 48px;
  border-radius: 9px;
}

.finance-row-money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.finance-row-money em {
  min-width: 0;
  color: rgba(243, 246, 241, 0.72);
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-row-tags {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.finance-inline-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px minmax(180px, 0.75fr) 94px;
  gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--finance-line-soft);
  background: rgba(147, 190, 255, 0.055);
}

.finance-inline-form input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--finance-line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--finance-text);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.finance-inline-form input::placeholder {
  color: var(--finance-muted);
}

.finance-inline-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.finance-body-simple .finance-side {
  border-left: 0;
}

@media (max-width: 1280px) {
  .finance-body.finance-body-simple {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .finance-wallet-board {
    grid-template-columns: 1fr;
  }

  .finance-wallet-board .finance-wallet dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-section-items .finance-row {
    grid-template-columns: minmax(190px, 1fr) minmax(210px, 0.9fr) 140px;
  }

  .finance-inline-form {
    grid-template-columns: minmax(190px, 1fr) 100px minmax(150px, 0.75fr) 86px;
  }
}

/* Finance workspace v3: one-wallet ledger with a large balance and direct expense entry. */
.finance-live.finance-live-ledger {
  grid-template-rows: 58px 104px minmax(0, 1fr);
}

.finance-live-ledger .finance-head {
  grid-template-columns: 62px minmax(220px, 1fr) auto minmax(260px, 390px);
}

.finance-balance-strip {
  min-width: 0;
  border-bottom: 1px solid var(--finance-line);
  background: rgba(255, 255, 255, 0.023);
  padding: 10px 12px;
  display: grid;
  align-items: stretch;
}

.finance-balance-card {
  min-width: 0;
  border: 1px solid var(--finance-line-soft);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.finance-balance-card span,
.finance-balance-card small {
  color: var(--finance-muted);
  font-size: 12px;
  font-weight: 760;
}

.finance-balance-card strong {
  min-width: 0;
  color: var(--finance-text);
  font-size: 44px;
  line-height: 0.95;
  font-weight: 820;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-balance-card small {
  text-align: right;
}

.finance-body.finance-body-ledger {
  grid-template-columns: minmax(0, 1fr);
}

.finance-main.finance-main-ledger {
  border-right: 0;
  padding: 10px 12px 14px;
}

.finance-list-ledger {
  gap: 8px;
}

.finance-list-ledger .finance-expense-section {
  border-radius: 11px;
}

.finance-list-ledger .finance-section-head {
  min-height: 44px;
  padding: 7px 10px;
}

.finance-list-ledger .finance-section-head h2 {
  font-size: 14px;
}

.finance-list-ledger .finance-section-actions strong {
  min-width: 30px;
  height: 24px;
  border: 1px solid var(--finance-line-soft);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--finance-muted);
  font-size: 12px;
}

.finance-list-ledger .finance-section-items .finance-row {
  grid-template-columns:
    minmax(150px, 0.86fr)
    minmax(250px, 1.38fr)
    minmax(150px, 0.86fr)
    minmax(140px, 0.78fr)
    128px;
  min-height: 52px;
}

.finance-list-ledger .finance-row > span {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 10px;
}

.finance-list-ledger .finance-row strong,
.finance-list-ledger .finance-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-list-ledger .finance-row strong {
  color: var(--finance-text);
  font-size: 13px;
  font-weight: 760;
}

.finance-list-ledger .finance-row small {
  color: var(--finance-muted);
  font-size: 10.5px;
  font-weight: 620;
}

.finance-list-ledger .finance-amount-cell {
  justify-items: end;
}

.finance-list-ledger .finance-amount-cell strong {
  font-size: 14px;
  font-weight: 820;
}

.finance-list-ledger .finance-amount-cell small {
  text-align: right;
}

.finance-list-ledger .finance-inline-form {
  grid-template-columns:
    minmax(150px, 0.86fr)
    minmax(220px, 1.2fr)
    minmax(150px, 0.86fr)
    minmax(150px, 0.86fr)
    120px
    94px;
}

@media (max-width: 1280px) {
  .finance-live-ledger .finance-head {
    grid-template-columns: 52px minmax(170px, 1fr) auto minmax(210px, 280px);
  }

  .finance-balance-card {
    grid-template-columns: 110px minmax(0, 1fr) 132px;
    gap: 10px;
    padding: 10px 14px;
  }

  .finance-balance-card strong {
    font-size: 38px;
  }

  .finance-list-ledger .finance-section-items .finance-row {
    grid-template-columns: minmax(125px, 0.8fr) minmax(210px, 1.25fr) minmax(130px, 0.8fr) minmax(120px, 0.74fr) 116px;
  }

  .finance-list-ledger .finance-inline-form {
    grid-template-columns: minmax(140px, 0.86fr) minmax(190px, 1.1fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) 104px 86px;
  }
}

/* Workspace density and legacy-section visual refit v1. */
.workspace-panel {
  padding: 4px 8px 8px 4px;
}

.workspace {
  height: calc(100vh - var(--topbar-height) - 12px);
  padding: 0;
}

.workspace.workspace--docs-finder,
.workspace.workspace--daily-ops,
.workspace.workspace--bailiffs,
.workspace.workspace--requisites,
.workspace.workspace--clients,
.workspace.workspace--suppliers {
  height: calc(100vh - var(--topbar-height) - 12px);
  padding: 2px 3px 4px;
}

.docs-finder-app,
.daily-ops-live,
.bailiffs-live,
.requisites-live,
.client-base-live {
  border-radius: 14px;
}

.workspace.workspace--sim-refit,
.workspace.workspace--infra-refit,
.workspace.workspace--system-refit {
  --legacy-window: rgba(25, 33, 27, 0.97);
  --legacy-toolbar: rgba(23, 31, 25, 0.93);
  --legacy-line: rgba(255, 255, 255, 0.11);
  --legacy-line-soft: rgba(255, 255, 255, 0.07);
  --legacy-text: #f3f6f1;
  --legacy-muted: rgba(243, 246, 241, 0.62);
  --legacy-row: rgba(255, 255, 255, 0.038);
  height: calc(100vh - var(--topbar-height) - 12px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--legacy-line);
  border-radius: 14px;
  background: var(--legacy-window);
  color: var(--legacy-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.075);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.workspace.workspace--sim-refit,
.workspace.workspace--infra-refit {
  display: grid;
  grid-template-rows: 52px 46px minmax(0, 1fr);
}

.workspace.workspace--system-refit {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
}

.workspace--sim-refit > .page-header,
.workspace--infra-refit > .page-header,
.workspace--system-refit > .page-header {
  position: relative;
  min-height: 0;
  height: 52px;
  margin: 0;
  padding: 0 12px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--legacy-line);
  background: var(--legacy-toolbar);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.workspace--sim-refit > .page-header::before,
.workspace--infra-refit > .page-header::before,
.workspace--system-refit > .page-header::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(236, 239, 236, 0.66);
  box-shadow:
    21px 0 0 rgba(236, 239, 236, 0.66),
    42px 0 0 rgba(236, 239, 236, 0.66),
    inset 0 -2px 4px rgba(0, 0, 0, 0.22);
}

.workspace--sim-refit > .page-header::after,
.workspace--infra-refit > .page-header::after,
.workspace--system-refit > .page-header::after {
  display: none;
}

.workspace--sim-refit .page-header h1,
.workspace--infra-refit .page-header h1,
.workspace--system-refit .page-header h1 {
  margin: 0;
  color: var(--legacy-text);
  font-size: 18px;
  line-height: 1.05;
  font-weight: 730;
  letter-spacing: 0;
}

.workspace--sim-refit .page-header p,
.workspace--infra-refit .page-header p,
.workspace--system-refit .page-header p {
  max-width: none;
  margin: 3px 0 0;
  color: var(--legacy-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace--sim-refit .access-badge,
.workspace--infra-refit .access-badge,
.workspace--system-refit .access-badge {
  min-height: 28px;
  border-radius: 10px;
  border-color: var(--legacy-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--legacy-muted);
  box-shadow: none;
  font-size: 11px;
  font-weight: 720;
}

.workspace--sim-refit > .section-grid,
.workspace--infra-refit > .section-grid {
  min-height: 0;
  margin: 0;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  overflow: hidden;
  border-bottom: 1px solid var(--legacy-line);
  background: rgba(255, 255, 255, 0.025);
}

.workspace--sim-refit .stat-card,
.workspace--infra-refit .stat-card {
  min-height: 34px;
  border-radius: 11px;
  padding: 4px 10px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-color: var(--legacy-line-soft);
  background: rgba(255, 255, 255, 0.038);
  box-shadow: none;
}

.workspace--sim-refit .stat-card strong,
.workspace--infra-refit .stat-card strong {
  font-size: 14px;
  line-height: 1;
}

.workspace--sim-refit .stat-card span,
.workspace--infra-refit .stat-card span {
  color: var(--legacy-muted);
  font-size: 10px;
  line-height: 1;
}

.workspace--sim-refit .sim-layout,
.workspace--infra-refit .infrastructure-layout,
.workspace--system-refit .content-grid {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px;
  overflow: hidden;
  gap: 8px;
}

.workspace--sim-refit .sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
}

.workspace--infra-refit .infrastructure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  height: 100%;
  align-items: stretch;
}

.workspace--infra-refit .infrastructure-map-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  padding: 0;
}

.workspace--infra-refit .infrastructure-detail {
  height: 100%;
}

.workspace--system-refit .content-grid {
  display: grid;
  grid-template-columns: 310px minmax(300px, 0.86fr) minmax(360px, 1.14fr);
  align-items: stretch;
}

.workspace--sim-refit .content-card,
.workspace--infra-refit .content-card,
.workspace--system-refit .content-card {
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  border-color: var(--legacy-line-soft);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.workspace--sim-refit .content-card h2,
.workspace--infra-refit .content-card h2,
.workspace--system-refit .content-card h2 {
  margin: 0;
  color: var(--legacy-text);
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0;
}

.workspace--sim-refit .content-card h2::before,
.workspace--infra-refit .content-card h2::before,
.workspace--system-refit .content-card h2::before {
  display: none;
}

.workspace--sim-refit .sim-box-card,
.workspace--infra-refit .infrastructure-map-card,
.workspace--system-refit .content-card {
  overflow: hidden;
}

.workspace--sim-refit .sim-detail-card,
.workspace--infra-refit .infrastructure-detail,
.workspace--system-refit .content-card {
  overflow: auto;
}

.workspace--sim-refit .sim-box-head,
.workspace--infra-refit .infrastructure-map-head,
.workspace--infra-refit .infra-detail-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--legacy-line);
  gap: 8px;
}

.workspace--infra-refit .infrastructure-map-head {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(165px, 0.5fr) minmax(0, 1.25fr);
  align-items: start;
}

.workspace--infra-refit .infrastructure-map-head p {
  max-height: 30px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.35;
}

.workspace--sim-refit .sim-box-head h2,
.workspace--sim-refit .sim-detail-head h2,
.workspace--infra-refit .infrastructure-map-head h2,
.workspace--infra-refit .infra-detail-head h2 {
  font-size: 14px;
}

.workspace--sim-refit .sim-box-scroll,
.workspace--infra-refit .infrastructure-map-scroll {
  min-height: 0;
  padding: 8px;
}

.workspace--infra-refit .infrastructure-map-scroll {
  height: auto;
  min-height: 0;
  overflow: auto;
}

.workspace--sim-refit .sim-box-shell {
  min-height: 0;
  height: 100%;
  max-height: none;
  border-radius: 12px;
}

.workspace--infra-refit .infrastructure-map {
  min-height: 360px;
  height: 100%;
  min-width: 100%;
  border-radius: 12px;
}

.workspace--infra-refit .infra-map-canvas {
  min-width: 100%;
  min-height: 100%;
}

.workspace--sim-refit .sim-detail-card {
  padding: 12px;
}

.workspace--sim-refit .sim-detail-head,
.workspace--infra-refit .infra-detail-head {
  margin-bottom: 10px;
}

.workspace--sim-refit .sim-detail-grid,
.workspace--infra-refit .infra-detail-grid {
  gap: 7px;
}

.workspace--sim-refit .sim-detail-row,
.workspace--infra-refit .infra-detail-row,
.workspace--infra-refit .infra-connection-row,
.workspace--infra-refit .infra-next-action,
.workspace--system-refit .user-row,
.workspace--system-refit .activity-row,
.workspace--system-refit .module-check {
  border-color: var(--legacy-line-soft);
  border-radius: 10px;
  background: var(--legacy-row);
  box-shadow: none;
}

.workspace--system-refit .admin-form {
  gap: 9px;
}

.workspace--system-refit .admin-form input,
.workspace--system-refit .admin-form select,
.workspace--system-refit .admin-form textarea,
.workspace--infra-refit .admin-form input,
.workspace--infra-refit .admin-form select,
.workspace--infra-refit .admin-form textarea,
.workspace--infra-refit .infra-jump-select,
.workspace--infra-refit .infra-link-label input {
  min-height: 34px;
  border-radius: 10px;
  border-color: var(--legacy-line-soft);
  background: rgba(255, 255, 255, 0.045);
  color: var(--legacy-text);
  font-size: 12px;
}

.workspace--system-refit .module-checks {
  gap: 6px;
}

.workspace--system-refit .module-check {
  min-height: 32px;
  padding: 7px 9px;
}

.workspace--infra-refit .infra-map-actions,
.workspace--infra-refit .infra-viewport-controls {
  min-width: 0;
  gap: 6px;
  flex-wrap: nowrap;
}

.workspace--infra-refit .infra-map-controls {
  min-width: 0;
  gap: 6px;
}

.workspace--infra-refit .infra-link-label {
  min-width: 118px;
}

.workspace--infra-refit .infra-link-label span {
  font-size: 10.5px;
}

.workspace--infra-refit .infra-zoom-label {
  min-width: 44px;
  min-height: 30px;
}

.workspace--infra-refit .small-action,
.workspace--system-refit .small-action {
  min-height: 30px;
  border-radius: 10px;
  padding-inline: 8px;
  font-size: 11.5px;
}

body[data-theme="light"] .workspace.workspace--sim-refit,
body[data-theme="light"] .workspace.workspace--infra-refit,
body[data-theme="light"] .workspace.workspace--system-refit {
  --legacy-window: rgba(246, 248, 245, 0.97);
  --legacy-toolbar: rgba(241, 244, 240, 0.94);
  --legacy-line: rgba(34, 45, 38, 0.13);
  --legacy-line-soft: rgba(34, 45, 38, 0.08);
  --legacy-text: #172017;
  --legacy-muted: rgba(23, 32, 23, 0.58);
  --legacy-row: rgba(23, 32, 23, 0.045);
}

@media (max-width: 1280px) {
  .workspace--sim-refit .sim-layout,
  .workspace--infra-refit .infrastructure-layout,
  .workspace--system-refit .content-grid {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .workspace.workspace--sim-refit,
  .workspace.workspace--infra-refit,
  .workspace.workspace--system-refit {
    overflow: auto;
  }
}

/* Final CRM polish overrides v1. */
.task-rail {
  padding: 12px 12px 14px 18px;
  overflow: auto;
}

.task-rail__head {
  min-height: 62px;
  padding: 11px 12px;
  border-radius: 12px;
}

.task-rail h2 {
  font-size: 30px;
  line-height: 1;
}

.task-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.task-metrics div {
  min-height: 56px;
  grid-template-columns: 1fr;
  place-items: center;
  row-gap: 3px;
  padding: 7px 5px;
  text-align: center;
  border-radius: 11px;
}

.task-metrics strong {
  grid-row: auto;
  min-width: 0;
  font-size: 25px;
  line-height: 1;
}

.task-metrics span {
  align-self: auto;
  font-size: 11px;
  line-height: 1.05;
}

.task-filters {
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
}

.task-filters button {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 7px;
  font-size: 12px;
}

.task-create {
  padding: 10px;
  border-radius: 12px;
}

.task-create input,
.task-create select {
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.task-create .small-action {
  min-height: 34px;
  border-radius: 9px;
}

.task-list {
  gap: 7px;
  padding-bottom: 10px;
}

.task-card {
  border-radius: 11px;
  padding: 9px 10px;
  gap: 6px;
  border-left: 3px solid rgba(139, 202, 255, 0.35);
}

.task-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(246, 248, 246, 0.9);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.req-bank.is-red { background: linear-gradient(180deg, #b95b5e, #88464a); }
.req-bank.is-green { background: linear-gradient(180deg, #4f9a70, #397458); }
.req-bank.is-blue { background: linear-gradient(180deg, #5e8fc7, #426c9e); }
.req-bank.is-cyan { background: linear-gradient(180deg, #4f9ba3, #3b747a); }
.req-bank.is-violet { background: linear-gradient(180deg, #7c6bb3, #5f528b); }
.req-bank.is-yellow { background: linear-gradient(180deg, #bba65c, #887a45); color: #f8f4df; }
.req-bank.is-teal { background: linear-gradient(180deg, #579b91, #40756f); }
.req-bank.is-gray { background: linear-gradient(180deg, #767f79, #565f59); }

.ops-preview-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: rgba(243, 246, 241, 0.66);
  text-align: center;
}

.ops-preview-empty strong {
  color: rgba(243, 246, 241, 0.92);
  font-size: 18px;
  line-height: 1.15;
}

.ops-preview-empty span,
.ops-preview-empty em {
  max-width: 330px;
  color: rgba(243, 246, 241, 0.62);
  font-size: 13px;
  font-style: normal;
  line-height: 1.38;
}

.ops-preview-empty em {
  color: rgba(160, 207, 255, 0.78);
}
