@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Manrope:wght@500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #151915;
  --ink-soft: #59615a;
  --canvas: #f3f4ef;
  --surface: #ffffff;
  --surface-2: #e9ece5;
  --line: #dfe3dc;
  --dark: #121613;
  --dark-2: #1a201b;
  --acid: #c5f46a;
  --acid-strong: #a9dc4e;
  --blue: #4668ec;
  --orange: #ed7b4a;
  --red: #d94f4f;
  --shadow: 0 18px 54px rgba(22, 28, 22, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 2%, rgba(197, 244, 106, 0.15), transparent 24rem), var(--canvas);
  color: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: var(--dark);
  color: #f5f8f2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 28px;
  font:
    700 19px/1 'Manrope',
    sans-serif;
  letter-spacing: -0.04em;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(197, 244, 106, 0.75);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 7px 2px;
  border: 1px solid var(--acid);
  border-radius: 50%;
  content: '';
  transform: rotate(55deg);
}

.brand-mark::after {
  transform: rotate(-55deg);
}

.brand-mark span {
  position: absolute;
  inset: 13px;
  z-index: 1;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 18px rgba(197, 244, 106, 0.7);
}

.workspace-picker {
  width: 100%;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: var(--dark-2);
  color: inherit;
  text-align: left;
}

.workspace-picker small {
  display: block;
  margin-bottom: 4px;
  color: #89928b;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-picker strong {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

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

.nav-label {
  padding: 8px 11px 5px;
  color: #707a72;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #9fa8a1;
  text-align: left;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

.nav-button.active::before {
  width: 5px;
  height: 5px;
  margin-left: -1px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid);
  content: '';
}

.nav-button:not(.active)::before {
  width: 5px;
  content: '';
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--acid);
  color: #1c2714;
  font-weight: 700;
}

.user-chip strong,
.user-chip small {
  display: block;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 13px;
}

.user-chip small {
  margin-top: 2px;
  color: #7f8981;
  font-size: 11px;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(25, 31, 25, 0.08);
  background: rgba(243, 244, 239, 0.8);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  color: var(--ink-soft);
  font-size: 13px;
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65ad50;
  box-shadow: 0 0 0 4px rgba(101, 173, 80, 0.11);
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #748075;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: 'Manrope', sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 760px;
  margin-bottom: 7px;
  font-size: clamp(29px, 4vw, 43px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.subtitle {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(24, 31, 24, 0.09);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.button.primary {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

.button.acid {
  border-color: var(--acid);
  background: var(--acid);
  color: #1c2516;
}

.button.ghost {
  background: transparent;
}

.button.danger {
  color: var(--red);
}

.button.danger-filled {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.company-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.button.small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card,
.panel {
  border: 1px solid rgba(24, 31, 24, 0.07);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 150px;
  padding: 20px;
}

.metric-card.highlight {
  background: var(--dark);
  color: #fff;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.highlight .metric-label {
  color: #8e988f;
}

.metric-value {
  margin: 19px 0 7px;
  font:
    700 34px/1 'Manrope',
    sans-serif;
  letter-spacing: -0.05em;
}

.metric-foot {
  color: #788078;
  font-size: 11px;
}

.highlight .metric-foot {
  color: var(--acid);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 16px;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.pulse-visual {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  align-items: end;
  height: 200px;
  gap: 7px;
  padding-top: 18px;
}

.pulse-bar {
  position: relative;
  min-height: 7px;
  border-radius: 7px 7px 2px 2px;
  background: var(--surface-2);
}

.pulse-bar.fill {
  background: var(--acid-strong);
}

.pulse-bar span {
  position: absolute;
  right: 0;
  bottom: -22px;
  left: 0;
  color: #899188;
  font-size: 9px;
  text-align: center;
}

.activity-list,
.stack-list {
  display: grid;
  gap: 0;
}

.activity-item,
.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child,
.stack-item:last-child {
  border-bottom: 0;
}

.activity-copy {
  min-width: 0;
}

.activity-copy strong,
.activity-copy span {
  display: block;
}

.activity-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy span,
.activity-time {
  margin-top: 3px;
  color: #858e86;
  font-size: 11px;
}

.item-icon {
  display: grid;
  flex: 0 0 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 15px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.entity-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(24, 31, 24, 0.08);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 38px rgba(22, 28, 22, 0.06);
}

.entity-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
}

.entity-card-body {
  padding: 0 20px 20px;
}

.entity-card-body p {
  min-height: 42px;
  color: var(--ink-soft);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.state {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #606860;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.state.active {
  background: rgba(144, 203, 74, 0.18);
  color: #4f7d20;
}

.state.pending {
  background: rgba(237, 123, 74, 0.14);
  color: #a44c27;
}

.entity-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafbf8;
}

.agent-card-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 100%;
  border-radius: 999px;
  background: #d6dad4;
  transition: background 160ms ease;
}

.switch span::after {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(22, 27, 23, 0.25);
  content: '';
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--dark);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  background: #f8f9f5;
  color: #7d867e;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table td {
  font-size: 13px;
}

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

.empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 30px;
  color: var(--ink-soft);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 16, 13, 0.52);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
}

.form-grid {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 12px;
  font-weight: 600;
}

.field small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7dcd5;
  border-radius: 11px;
  outline: none;
  background: #fbfcfa;
  color: var(--ink);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #758a51;
  box-shadow: 0 0 0 3px rgba(197, 244, 106, 0.24);
}

.policy-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.policy-notice {
  border-left: 4px solid var(--acid);
}

.policy-fields {
  margin-top: 18px;
}

.policy-stack .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.check-card {
  position: relative;
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: #667067;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.check-card input {
  position: absolute;
  opacity: 0;
}

.check-card:has(input:checked) {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.full-field {
  grid-column: 1 / -1;
}

.policy-actions,
.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.policy-actions {
  position: sticky;
  z-index: 4;
  bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(250, 251, 248, 0.94);
  box-shadow: 0 14px 34px rgba(20, 27, 22, 0.12);
  backdrop-filter: blur(12px);
}

.retention-policy-panel {
  border-color: rgba(178, 102, 77, 0.16);
  background: linear-gradient(135deg, rgba(255, 248, 239, 0.82), rgba(255, 255, 255, 0.94));
}

.retention-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) auto);
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.retention-flow span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(28, 36, 29, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink-soft);
  font-size: 12px;
}

.retention-flow strong {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--dark);
  color: var(--acid);
}

.retention-flow i {
  color: #a4aa9f;
  font-style: normal;
}

.retention-apply-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.activity-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}

.activity-table td:first-child {
  min-width: 250px;
}

.activity-table td:last-child {
  min-width: 150px;
}

.queue-filters {
  grid-template-columns: minmax(180px, 0.6fr) 1fr auto;
}

.queue-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  color: var(--ink-soft);
  font-size: 12px;
}

.queue-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.queue-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa39b;
}

.queue-dot.active {
  background: #48a067;
}

.queue-dot.pending {
  background: #d7a72b;
}

.queue-dot.failed {
  background: var(--red);
}

.queue-table td:first-child,
.queue-table td:nth-child(6) {
  min-width: 150px;
}

.queue-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.code-id {
  color: #778078;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.state.processing {
  background: rgba(68, 124, 205, 0.14);
  color: #315e9e;
}

.state.failed {
  background: rgba(211, 68, 68, 0.14);
  color: #a12f2f;
}

.pagination-actions {
  padding-top: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 9px;
}

.toast {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

.toast.error {
  background: #8f302c;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  background: var(--dark);
  color: #fff;
}

.login-brand::after {
  position: absolute;
  right: -16vw;
  bottom: -25vw;
  width: 55vw;
  height: 55vw;
  border: 1px solid rgba(197, 244, 106, 0.23);
  border-radius: 50%;
  box-shadow:
    0 0 0 8vw rgba(197, 244, 106, 0.025),
    0 0 0 16vw rgba(197, 244, 106, 0.025);
  content: '';
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.login-brand h1 {
  margin-bottom: 20px;
  font-size: clamp(44px, 6vw, 76px);
}

.login-brand p {
  max-width: 540px;
  color: #9fa9a0;
  font-size: 17px;
}

.login-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: max-content;
  gap: 8px;
  align-items: center;
  color: var(--acid);
  font-size: 12px;
}

.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-form {
  width: min(410px, 100%);
}

.login-form h2 {
  margin-bottom: 10px;
  font-size: 30px;
}

.login-form > p {
  margin-bottom: 28px;
  color: var(--ink-soft);
}

.login-form .button {
  width: 100%;
  margin-top: 8px;
}

.error-copy {
  margin-top: 12px;
  color: var(--red);
  font-size: 12px;
}

.skeleton {
  overflow: hidden;
  border-radius: 10px;
  background: #e4e7e1;
}

.skeleton::after {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  content: '';
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(240%);
  }
}

.conversation-page .metric-grid {
  margin-bottom: 16px;
}

.conversation-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

.conversation-security {
  align-self: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.conversation-security::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--acid-strong);
  box-shadow: 0 0 0 4px rgba(169, 220, 78, 0.13);
  content: '';
}

.conversation-shell {
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.conversation-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f8f9f5;
}

.conversation-card {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.conversation-card:hover {
  background: #fff;
}

.conversation-card.selected {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: inset 4px 0 var(--acid-strong);
}

.conversation-card-top,
.conversation-card-bottom,
.conversation-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-card-top strong {
  overflow: hidden;
  font:
    600 14px/1.3 'Manrope',
    sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card-top time,
.conversation-card-bottom,
.takeover-note {
  color: var(--ink-soft);
  font-size: 11px;
}

.conversation-card-bottom span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: var(--dark);
  color: var(--acid);
  font-size: 11px;
  font-weight: 700;
}

.takeover-note {
  color: #61733e;
  font-weight: 600;
}

.conversation-older {
  align-self: center;
  margin: 15px;
}

.conversation-detail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 94% 4%, rgba(197, 244, 106, 0.16), transparent 15rem), var(--surface);
}

.conversation-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
}

.conversation-detail-head h2 {
  margin: 3px 0 10px;
  font:
    600 23px/1.2 'Manrope',
    sans-serif;
}

.conversation-actions {
  display: flex;
  gap: 8px;
}

.takeover-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 26px 0;
  padding: 11px 14px;
  border: 1px solid rgba(169, 220, 78, 0.52);
  border-radius: 12px;
  background: rgba(197, 244, 106, 0.18);
  color: #435126;
  font-size: 12px;
}

.message-timeline {
  display: flex;
  min-height: 420px;
  max-height: 560px;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 24px 26px;
}

.message-row {
  display: flex;
}

.message-row.outgoing {
  justify-content: flex-end;
}

.message-row.unknown {
  justify-content: center;
}

.message-bubble {
  width: min(560px, 78%);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 5px 17px 17px;
  background: #f1f3ee;
}

.message-row.outgoing .message-bubble {
  border-color: #202620;
  border-radius: 17px 5px 17px 17px;
  background: var(--dark-2);
  color: #f6f8f4;
}

.message-row.unknown .message-bubble {
  width: min(480px, 74%);
  border-style: dashed;
  border-radius: 14px;
  background: #fff;
}

.message-meta,
.message-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #7a837b;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-content {
  padding: 8px 0 10px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-row.outgoing .message-meta,
.message-row.outgoing .message-foot {
  color: #aab4ac;
}

.conversation-context {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  padding: 15px 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.outbound-panel {
  display: grid;
  gap: 12px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: rgba(248, 249, 245, 0.82);
}

.outbound-panel-head,
.outbound-composer > div,
.delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.outbound-panel-head div,
.delivery-row > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.outbound-panel-head span,
.outbound-composer small,
.delivery-row small,
.outbound-disabled,
.delivery-attempt {
  color: var(--ink-soft);
  font-size: 11px;
}

.outbound-composer {
  display: grid;
  gap: 9px;
}

.outbound-composer textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.outbound-composer textarea:focus {
  border-color: #8db838;
  outline: 3px solid rgba(169, 220, 78, 0.16);
}

.outbound-disabled {
  padding: 13px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.65);
}

.delivery-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.delivery-row {
  justify-content: initial;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.delivery-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.delivery-state {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a4aaa5;
}

.delivery-state.queued,
.delivery-state.sending {
  background: #d7a800;
  box-shadow: 0 0 0 4px rgba(215, 168, 0, 0.12);
}

.delivery-state.sent {
  background: #75a624;
  box-shadow: 0 0 0 4px rgba(117, 166, 36, 0.12);
}

.delivery-state.failed {
  background: #d05a47;
  box-shadow: 0 0 0 4px rgba(208, 90, 71, 0.12);
}

.delivery-error {
  color: #a63d2e !important;
}

.conversation-detail-empty,
.conversation-empty {
  min-height: 320px;
}

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

.compact-metrics {
  margin-bottom: 8px;
}

.compact-metrics .metric-card {
  min-height: 116px;
  padding: 16px;
}

.compact-metrics .metric-value {
  margin: 13px 0 5px;
  font-size: 28px;
}

.reconciliation-panel {
  margin-top: 16px;
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(38, 78, 55, 0.12);
  border-radius: 12px;
  background: rgba(222, 241, 225, 0.56);
  color: #365443;
  font-size: 12px;
  line-height: 1.5;
}

.notice.warning {
  border-color: rgba(184, 123, 26, 0.2);
  background: rgba(255, 236, 190, 0.58);
  color: #765317;
}

.approval-inbox,
.tool-permissions {
  margin-top: 16px;
}

.runtime-banner {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
  padding: 26px 30px;
  border: 1px solid rgba(114, 150, 54, 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 82% 18%, rgba(197, 244, 106, 0.2), transparent 18rem),
    linear-gradient(135deg, #162018, #263328);
  color: #f7faf4;
}

.runtime-banner.locked {
  border-color: rgba(231, 153, 95, 0.18);
  background:
    radial-gradient(circle at 82% 18%, rgba(231, 153, 95, 0.18), transparent 18rem),
    linear-gradient(135deg, #201816, #332822);
}

.runtime-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.runtime-banner h2 {
  margin: 5px 0 8px;
  font-size: 26px;
}

.runtime-banner p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(247, 250, 244, 0.7);
  font-size: 13px;
}

.evaluation-panel {
  margin-top: 16px;
}

.compact-empty {
  min-height: 130px;
}

.toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 14px;
  border: 1px solid #d7dcd5;
  border-radius: 11px;
  background: #fbfcfa;
}

.toggle-field > span {
  display: grid;
  gap: 3px;
}

.toggle-field small {
  color: var(--ink-soft);
  font-size: 11px;
}

.version-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version-history span {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11px;
}

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

.approval-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcf9;
}

.approval-copy {
  min-width: 0;
  flex: 1;
}

.approval-copy h3 {
  margin: 12px 0 4px;
}

.approval-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.approval-payload {
  max-height: 220px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 13px;
  border: 1px solid rgba(24, 31, 24, 0.08);
  border-radius: 11px;
  background: #f1f4ee;
  color: #384139;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.approval-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

@media (max-width: 800px) {
  .approval-item {
    flex-direction: column;
  }

  .runtime-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

.tag.danger {
  background: rgba(208, 90, 71, 0.12);
  color: #a63d2e;
}

.panel + .mirror-grid {
  margin-top: 16px;
}

.heading-actions,
.catalog-hero-actions,
.catalog-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.catalog-page {
  max-width: 1540px;
}

.catalog-hero {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid rgba(197, 244, 106, 0.12);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 15%, rgba(197, 244, 106, 0.18), transparent 18rem),
    linear-gradient(135deg, #151b16, #222c23);
  color: #f7faf4;
  box-shadow: var(--shadow);
}

.catalog-hero.enabled {
  border-color: rgba(197, 244, 106, 0.38);
}

.catalog-hero .eyebrow {
  color: var(--acid);
}

.catalog-hero h2 {
  max-width: 720px;
  margin-bottom: 9px;
  font-size: clamp(24px, 3vw, 34px);
}

.catalog-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: #adb9af;
}

.catalog-hero-actions {
  justify-content: flex-end;
}

.catalog-metrics {
  margin-bottom: 16px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

.catalog-toolbar-actions {
  justify-content: flex-end;
  padding-bottom: 1px;
}

.catalog-search-row {
  display: flex;
  gap: 8px;
}

.catalog-search-row input {
  min-width: 0;
  flex: 1;
}

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

.catalog-products-panel {
  min-width: 0;
}

.catalog-table-wrap {
  border: 0;
  border-radius: 0;
}

.catalog-table th:first-child,
.catalog-table td:first-child {
  padding-left: 0;
}

.catalog-table th:last-child,
.catalog-table td:last-child {
  padding-right: 0;
  text-align: right;
}

.catalog-description-cell {
  min-width: 220px;
  max-width: 310px;
}

.catalog-description-cell small {
  display: block;
  margin-top: 7px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.catalog-pagination > div,
.catalog-description-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.catalog-source-list,
.catalog-enrichment-runs,
.catalog-enrichment-items {
  display: grid;
  gap: 9px;
}

.catalog-source-list article,
.catalog-enrichment-runs article,
.catalog-enrichment-items article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.catalog-source-list small,
.catalog-enrichment-runs small,
.catalog-enrichment-items small {
  display: block;
  color: var(--ink-soft);
}

.catalog-source-list a {
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.catalog-enrichment-runs article {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.catalog-enrichment-runs article > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.catalog-enrichment-items article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.catalog-sku,
.price-list-head span,
.price-version small,
.import-run small,
.catalog-mini-empty,
.import-file-field small,
.import-preview-summary small {
  color: var(--ink-soft);
  font-size: 11px;
}

.catalog-sku {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.catalog-empty {
  min-height: 260px;
}

.catalog-side,
.price-list-stack,
.price-version-list,
.import-run-list,
.import-errors {
  display: grid;
  gap: 12px;
}

.price-list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbf8;
}

.price-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.price-list-head strong,
.price-list-head span,
.price-version strong,
.price-version small,
.import-run strong,
.import-run small {
  display: block;
}

.price-list-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-currency {
  color: var(--ink) !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px !important;
  font-weight: 700;
}

.price-version-list {
  gap: 0;
  padding: 0 15px;
}

.price-version {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.price-version:last-child {
  border-bottom: 0;
}

.catalog-mini-empty {
  padding: 18px 4px;
  line-height: 1.5;
  text-align: center;
}

.catalog-imports {
  margin-top: 0;
}

.import-run {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.import-run:first-child {
  border-top: 0;
}

.import-run > span:nth-child(2) {
  text-align: right;
}

.import-file-field small {
  margin-top: -2px;
}

.import-preview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-errors {
  max-height: 230px;
  overflow-y: auto;
  padding-right: 3px;
}

.import-error {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 79, 79, 0.16);
  border-radius: 10px;
  background: rgba(217, 79, 79, 0.06);
  color: #8d3838;
  font-size: 12px;
}

.mirror-list {
  display: grid;
}

.mirror-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(120px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.mirror-row.compact {
  grid-template-columns: minmax(150px, 1fr) minmax(120px, auto);
}

.mirror-entity strong,
.mirror-entity small {
  display: block;
}

.mirror-entity small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

@media (max-width: 1050px) {
  .metric-grid,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

  .conversation-shell {
    grid-template-columns: 290px minmax(0, 1fr);
  }

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

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

  .catalog-toolbar {
    grid-template-columns: minmax(220px, 1fr) 180px;
  }

  .catalog-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 13px 15px;
  }

  .brand {
    padding: 0 0 13px;
  }

  .workspace-picker {
    margin-bottom: 10px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-label,
  .sidebar-footer {
    display: none;
  }

  .nav-button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .topbar {
    height: 60px;
    padding: 0 18px;
  }

  .status-pill {
    display: none;
  }

  .page {
    padding: 24px 18px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .weekday-grid,
  .activity-filters,
  .conversation-toolbar,
  .inline-fields,
  .policy-stack .form-grid {
    grid-template-columns: 1fr;
  }

  .policy-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .retention-flow {
    grid-template-columns: 1fr;
  }

  .retention-flow i {
    display: none;
  }

  .retention-apply-row {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions,
  .catalog-hero,
  .catalog-hero-actions,
  .catalog-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar-actions {
    grid-column: auto;
  }

  .catalog-search-row,
  .catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-enrichment-runs article {
    grid-template-columns: 1fr;
  }

  .catalog-enrichment-runs article > div:last-child {
    justify-content: flex-start;
  }

  .price-version {
    grid-template-columns: minmax(100px, 1fr) auto;
  }

  .price-version .button {
    grid-column: 1 / -1;
  }

  .login-shell {
    display: block;
  }

  .login-brand {
    min-height: 320px;
    padding: 28px;
  }

  .login-brand h1 {
    font-size: 42px;
  }

  .login-form-wrap {
    padding: 35px 22px;
  }

  .conversation-shell {
    display: block;
  }

  .conversation-list {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .conversation-detail-head {
    flex-direction: column;
    padding: 20px;
  }

  .conversation-actions {
    width: 100%;
  }

  .conversation-actions .button {
    flex: 1;
  }

  .message-timeline {
    padding: 20px;
  }

  .outbound-panel {
    padding: 16px 20px;
  }

  .outbound-composer > div,
  .delivery-row {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-state {
    display: none;
  }

  .message-bubble {
    width: 90%;
  }

  .mirror-row,
  .mirror-row.compact {
    grid-template-columns: 1fr;
  }
}

/* 2026 UX refresh: navigare, ajutor contextual și orientare pe acțiuni */
:root {
  --canvas: #f6f7f3;
  --ink-soft: #566057;
  --line: #d9ded7;
  --shadow: 0 14px 42px rgba(22, 28, 22, 0.065);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 78% 0, rgba(197, 244, 106, 0.12), transparent 28rem),
    linear-gradient(180deg, #f8f9f5 0, var(--canvas) 42rem);
}

body.overlay-open {
  overflow: hidden;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(70, 104, 236, 0.3);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  overflow-y: auto;
  padding: 20px 14px 16px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.sidebar-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sidebar-brand-row .brand {
  padding-bottom: 20px;
}

.mobile-only,
.menu-toggle,
.sidebar-backdrop {
  display: none;
}

.workspace-picker {
  margin-bottom: 12px;
  transition: border-color 160ms ease, background 160ms ease;
}

.workspace-picker:hover {
  border-color: rgba(197, 244, 106, 0.28);
  background: #1e251f;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #7f8981;
}

.sidebar-search:focus-within {
  border-color: rgba(197, 244, 106, 0.5);
}

.sidebar-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.sidebar-search input::placeholder {
  color: #717b73;
}

.nav {
  gap: 14px;
}

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

.nav-label {
  padding: 5px 10px 4px;
}

.nav-button {
  position: relative;
  min-height: 39px;
  padding: 8px 10px;
  color: #aeb6af;
}

.nav-button::before {
  display: none !important;
}

.nav-button.active {
  background: linear-gradient(90deg, rgba(197, 244, 106, 0.15), rgba(255, 255, 255, 0.055));
  box-shadow: inset 2px 0 0 var(--acid);
}

.nav-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #889289;
  font-size: 13px;
}

.nav-button:hover .nav-icon,
.nav-button.active .nav-icon {
  background: rgba(197, 244, 106, 0.14);
  color: var(--acid);
}

.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-no-results {
  padding: 18px 10px;
  color: #7f8981;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.sidebar-footer {
  margin-top: 18px;
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  height: 68px;
  background: rgba(248, 249, 245, 0.88);
  box-shadow: 0 1px 0 rgba(25, 31, 25, 0.04);
}

.topbar-leading,
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-search {
  display: inline-flex;
  min-width: 162px;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 12px;
}

.quick-search kbd,
.command-search-row kbd {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid #d8ddd5;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #f5f6f2;
  color: #788078;
  font: 600 10px/1.2 'DM Sans', sans-serif;
}

.help-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.page {
  padding-top: 32px;
}

.page-heading {
  align-items: center;
}

.heading-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.contextual-help {
  color: var(--ink-soft);
  font-size: 12px;
}

.contextual-help span {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
}

.metric-card.interactive {
  width: 100%;
  border-color: rgba(24, 31, 24, 0.08);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.metric-card.interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(117, 138, 81, 0.28);
  box-shadow: 0 18px 48px rgba(22, 28, 22, 0.1);
}

.metric-card.highlight.interactive {
  color: #fff;
}

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

.attention-banner,
.success-banner {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  text-align: left;
}

.attention-banner {
  border: 1px solid rgba(237, 123, 74, 0.28);
  background: #fff7f2;
  color: #6f3a23;
}

.attention-banner > span:last-child {
  margin-left: auto;
  font-size: 18px;
}

.attention-banner strong,
.attention-banner small,
.success-banner strong {
  display: block;
}

.attention-banner small {
  margin-top: 2px;
  color: #8b6656;
}

.attention-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(237, 123, 74, 0.14);
  font-weight: 700;
}

.success-banner {
  border: 1px solid rgba(101, 173, 80, 0.2);
  background: rgba(101, 173, 80, 0.07);
  color: #46633d;
  font-size: 13px;
}

.dashboard-side {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.dashboard-grid > *,
.dashboard-side > * {
  min-width: 0;
}

.readiness-panel .panel-head {
  margin-bottom: 12px;
}

.readiness-panel .panel-head > strong {
  font: 700 22px/1 'Manrope', sans-serif;
}

.readiness-track {
  height: 7px;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 99px;
  background: var(--surface-2);
}

.readiness-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--acid-strong);
}

.readiness-list {
  display: grid;
}

.readiness-list button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.readiness-list button:last-child {
  border-bottom: 0;
}

.readiness-list small {
  color: #7d867e;
  font-size: 10px;
}

.readiness-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(237, 123, 74, 0.12);
  color: #a44c27;
  font-size: 11px;
  font-weight: 700;
}

.readiness-check.ready {
  background: rgba(101, 173, 80, 0.12);
  color: #4f7d20;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f6935;
  font-size: 11px;
  font-weight: 700;
}

.recent-panel .panel-head {
  margin-bottom: 6px;
}

.recent-panel .activity-item {
  padding: 10px 0;
}

.recent-panel .item-icon {
  flex-basis: 30px;
  height: 30px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-field {
  display: flex;
  width: min(480px, 100%);
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: #7d867e;
}

.search-field:focus-within {
  border-color: #91a36c;
  box-shadow: 0 0 0 3px rgba(197, 244, 106, 0.18);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.toolbar-count {
  color: var(--ink-soft);
  font-size: 12px;
}

.technical-code {
  color: #899188;
  font: 500 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.table tbody tr {
  transition: background 120ms ease;
}

.table tbody tr:hover {
  background: #fafbf8;
}

.command-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 11vh 20px 20px;
  background: rgba(10, 14, 11, 0.5);
  backdrop-filter: blur(8px);
}

.command-palette {
  width: min(680px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}

.command-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.command-search-row input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.command-results {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding: 8px;
}

.command-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.command-result:hover,
.command-result:focus-visible {
  background: #f1f4ed;
}

.command-result strong,
.command-result small {
  display: block;
}

.command-result small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-empty {
  padding: 42px 20px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.command-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.command-footer {
  display: flex;
  justify-content: space-between;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  background: #fafbf8;
  color: #899188;
  font-size: 10px;
}

.help-overlay {
  position: fixed;
  z-index: 75;
  inset: 0;
}

.help-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(10, 14, 11, 0.36);
  backdrop-filter: blur(4px);
}

.help-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 26px;
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.18);
  animation: drawer-in 180ms ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.help-head h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.help-summary {
  margin: 22px 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.help-section {
  margin-top: 24px;
}

.help-section h3 {
  margin-bottom: 12px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.help-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
}

.help-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  counter-increment: help-step;
}

.help-steps li::before {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  content: counter(help-step);
  font-size: 11px;
  font-weight: 700;
}

.glossary details {
  border-top: 1px solid var(--line);
}

.glossary details:last-child {
  border-bottom: 1px solid var(--line);
}

.glossary summary {
  padding: 12px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.glossary details p {
  margin: -3px 0 13px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.help-note {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(197, 244, 106, 0.42);
  border-radius: 12px;
  background: rgba(197, 244, 106, 0.1);
  font-size: 12px;
}

.help-note span {
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 258px minmax(0, 1fr);
  }

  .topbar,
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .quick-search {
    min-width: 42px;
  }

  .quick-search > span:nth-child(2),
  .quick-search kbd {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100dvh;
    padding: 18px 14px;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(10, 14, 11, 0.45);
    backdrop-filter: blur(4px);
  }

  body.nav-open .sidebar-backdrop {
    display: block;
  }

  .mobile-only,
  .menu-toggle {
    display: grid;
  }

  .mobile-only {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .nav {
    display: grid;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-label,
  .sidebar-footer {
    display: block;
  }

  .nav-button {
    width: 100%;
  }

  .topbar {
    height: 60px;
    padding: 0 16px;
  }

  .breadcrumb {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions #logout {
    display: none;
  }

  .page {
    padding: 24px 16px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions .button {
    width: 100%;
  }

  .attention-banner,
  .success-banner {
    align-items: flex-start;
  }

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

  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-count {
    padding-left: 2px;
  }

  .command-backdrop {
    padding: 12px;
    place-items: start center;
  }

  .command-palette {
    margin-top: 6vh;
  }

  .command-result small,
  .command-footer {
    display: none;
  }

  .help-drawer {
    padding: 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Manager Analytics — comparație și fișe per manager.
   Cifrele se citesc pe verticală, deci sunt aliniate la dreapta și tabulare;
   „—" înseamnă că metrica nu se poate calcula, „0" că nu s-a întâmplat nimic.
   --------------------------------------------------------------------------- */

.analytics-note {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 11px;
}

.analytics-note b {
  color: var(--ink);
  font-weight: 600;
}

.scoreboard {
  width: 100%;
  border-collapse: collapse;
}

.scoreboard th,
.scoreboard td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.scoreboard th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9f5;
  color: #7d867e;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scoreboard tbody tr:last-child td {
  border-bottom: 0;
}

.scoreboard tbody tr:hover td {
  background: rgba(197, 244, 106, 0.07);
}

.scoreboard .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.scoreboard .who {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 190px;
  background: var(--surface);
}

.scoreboard thead .who {
  z-index: 3;
  background: #f8f9f5;
}

.scoreboard tbody tr:hover .who {
  background: #fbfdf6;
}

.cell-main {
  font:
    600 14px/1.15 'Manrope',
    sans-serif;
  font-variant-numeric: tabular-nums;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.cell-main.empty-value {
  color: #a6ada7;
  font-weight: 500;
}

.bar {
  display: flex;
  overflow: hidden;
  width: 100%;
  min-width: 68px;
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar > i {
  display: block;
  height: 100%;
}

.bar .fill {
  background: var(--acid-strong);
}

.bar .fill-alt {
  background: rgba(70, 104, 236, 0.5);
}

.bar .fill-warn {
  background: var(--orange);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #5c655d;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.chip b {
  font-variant-numeric: tabular-nums;
}

.chip.warn {
  background: rgba(237, 123, 74, 0.14);
  color: #a44c27;
}

.chip.bad {
  background: rgba(217, 79, 79, 0.13);
  color: #ab3a3a;
}

.chip.good {
  background: rgba(144, 203, 74, 0.2);
  color: #4f7d20;
}

.chip.quiet {
  color: #8b938c;
}

/* Listă pe o coloană: fișa se deschide pe toată lățimea, iar rândurile închise
   rămân o listă scurtă de scanat, nu un mozaic de carduri inegale. */
.mgr-grid {
  display: grid;
  gap: 10px;
}

.mgr-card {
  padding: 14px 20px;
  border: 1px solid rgba(24, 31, 24, 0.07);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.mgr-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mgr-card > header h3 {
  margin: 0;
  font:
    600 16px/1.2 'Manrope',
    sans-serif;
}

.mgr-card > header small {
  color: var(--ink-soft);
  font-size: 11px;
}

/* Fișa are peste 40 de cifre. Fiecare grup primește o margine proprie și stă
   într-o grilă de două coloane, ca să se vadă unde se termină „telefonie" și
   unde începe „rezultat comercial" — altfel totul curge într-o singură masă.
   Grila stă pe un container propriu, nu pe <details>: browserul pune tot ce
   urmează după <summary> într-un singur slot anonim, deci grila aplicată direct
   pe <details> ar avea un singur element, nu câte unul per secțiune. */
.mgr-sections {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.mgr-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfa;
}

.mgr-section.is-wide {
  grid-column: 1 / -1;
}

.mgr-section.is-summary {
  border-color: rgba(24, 31, 24, 0.14);
  background: var(--surface);
}

.mgr-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* Numărul de ordine dă grupului o identitate la care te poți întoarce. */
.mgr-section-index {
  display: flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dark);
  color: var(--acid);
  font:
    700 10px/1 'Manrope',
    sans-serif;
}

.mgr-section-copy {
  min-width: 0;
  flex: 1;
}

.mgr-section-copy h4 {
  margin: 0;
  color: var(--ink);
  font:
    600 13px/1.2 'Manrope',
    sans-serif;
  letter-spacing: -0.01em;
}

.mgr-section-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.mgr-section-head .ma-scope {
  flex-shrink: 0;
}

.mgr-footer-label {
  width: 100%;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Rândul de etichete de sub indicatori are nevoie de aer ca să nu pară al
   șaptelea indicator din grilă. */
.mgr-section > .chip-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mgr-section-head + .chip-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Coloane mai late și aliniate sus: pe ecran mare, 96px producea 11 coloane
   care se rupeau neuniform, iar o valoare mai lungă dezalinia tot rândul. */
.mgr-stats {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px 12px;
}

.mgr-stat b {
  display: block;
  font:
    700 20px/1.1 'Manrope',
    sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.mgr-stat span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.mgr-stat.is-empty b {
  color: #a6ada7;
  font-weight: 600;
}

.mgr-stat.is-warn b {
  color: #a44c27;
}

.spark {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 26px;
}

.spark > i {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--acid-strong);
}

.spark > i.zero {
  height: 2px !important;
  background: var(--surface-2);
}

/* Clase folosite de mai multe pagini, definite aici pentru că lipseau. */

.muted {
  color: var(--ink-soft);
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  gap: 16px;
}

.state.inactive {
  background: rgba(217, 79, 79, 0.13);
  color: #ab3a3a;
}

/* ---------------------------------------------------------------------------
   Paleta de date. Validată pentru daltonism pe suprafață albă (adjacent ΔE 23.8
   protan, normal 31.6). Albastrul este singura culoare de magnitudine: barele
   compară mărimi, nu identități, deci nu primesc culori diferite pe rând.
   Roșul înseamnă exclusiv „rezultat ratat" și apare mereu lângă o etichetă.
   --------------------------------------------------------------------------- */

.page {
  --viz-series: #2a78d6;
  --viz-series-soft: #cde2fb;
  --viz-bad: #d03b3b;
  --viz-good: #0ca30c;
  --viz-grid: #e1e0d9;
  --viz-axis: #898781;
}

/* Bara de filtre: un singur rând deasupra a tot ce filtrează. */

.ma-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.ma-filters-form {
  display: contents;
}

.ma-filters .field {
  min-width: 132px;
}

.ma-filters .field input,
.ma-filters .field select {
  padding: 8px 10px;
}

.ma-presets {
  display: flex;
  gap: 6px;
  margin-right: auto;
}

.ma-presets .button.small.is-on {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

/* Fișa de indicator: valoare, variație față de perioada anterioară, sparkline. */

.ma-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.ma-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(24, 31, 24, 0.07);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.ma-kpi-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.ma-kpi-value {
  font:
    700 30px/1 'Manrope',
    sans-serif;
  letter-spacing: -0.03em;
}

.ma-kpi-value small {
  font:
    600 14px/1 'Manrope',
    sans-serif;
  color: var(--ink-soft);
}

.ma-kpi-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--ink-soft);
  font-size: 11px;
}

.delta {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #5c655d;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delta.up {
  background: rgba(12, 163, 12, 0.13);
  color: #0a6b0a;
}

.delta.down {
  background: rgba(208, 59, 59, 0.12);
  color: #a83232;
}

/* Marcaj de interpretare: metricile de stare nu se adună pe perioadă. */

.ma-scope {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: #6d766e;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Grafice: coloane subțiri, capăt rotunjit, grilă discretă. */

.ma-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.ma-chart {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.ma-chart h4 {
  margin: 0;
  color: #7d867e;
  font:
    600 10px/1 'Manrope',
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-chart-value {
  margin: 8px 0 2px;
  font:
    700 24px/1 'Manrope',
    sans-serif;
  letter-spacing: -0.03em;
}

.ma-chart-sub {
  color: var(--ink-soft);
  font-size: 11px;
}

.ma-chart svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
}

.ma-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.ma-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.ma-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

/* Comutator între statistici: vânzări și telefonie nu se citesc în același tabel. */

.ma-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.ma-tabs .button.is-on {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

/* Clasament: antet sortabil, bară de comparație sub fiecare cifră. */

.scoreboard th button {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.scoreboard th button:hover {
  color: var(--ink);
}

.scoreboard th button i {
  font-style: normal;
  opacity: 0.35;
}

.scoreboard th button.is-sorted i {
  opacity: 1;
}

.scoreboard tbody tr.is-unassigned td {
  background: #fafbf8;
  color: var(--ink-soft);
}

.score-chip {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  font:
    700 15px/1 'Manrope',
    sans-serif;
  font-variant-numeric: tabular-nums;
}

.score-chip.is-top {
  background: rgba(12, 163, 12, 0.14);
  color: #0a6b0a;
}

.score-chip.is-low {
  background: rgba(208, 59, 59, 0.12);
  color: #a83232;
}

.score-chip.is-empty {
  color: #a6ada7;
  font-size: 13px;
}

/* Fișa managerului: închisă implicit, ca pagina să nu mai fie un zid de cifre. */

.mgr-card.is-attention {
  border-color: rgba(208, 59, 59, 0.32);
}

.mgr-card > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
  list-style: none;
}

.mgr-card > summary::-webkit-details-marker {
  display: none;
}

.mgr-card > summary::before {
  color: var(--ink-soft);
  font-size: 11px;
  content: '▸';
}

.mgr-card[open] > summary::before {
  content: '▾';
}

.mgr-card > summary h3 {
  margin: 0;
  font:
    600 16px/1.2 'Manrope',
    sans-serif;
}

.mgr-card > summary small {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
}

.mgr-summary-copy {
  min-width: 0;
  flex: 1;
}

/* Eticheta de stare nu se comprimă: pe nume lungi ieșea tăiată. */
.mgr-card > summary > .chip {
  flex-shrink: 0;
}

.mgr-card[open] > summary {
  margin-bottom: 2px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mgr-loss-reasons {
  margin-top: 12px;
}

.mgr-score-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 9px 28px;
}

.mgr-score-part {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: 150px minmax(70px, 1fr) 56px;
  font-size: 11px;
}

.mgr-score-part .bar {
  position: relative;
  margin-top: 0;
  overflow: visible;
}

/* Semnul de la jumătate marchează mediana echipei — reperul scorului. */
.mgr-score-part .bar::after {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 1px;
  background: var(--viz-axis);
  content: '';
}

.mgr-score-part b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.bar .fill-series {
  background: var(--viz-series);
}

.bar .fill-bad {
  background: var(--viz-bad);
}

/* Blocul de configurare, scos din fluxul de analiză. */

.ma-config > summary {
  padding: 4px 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.ma-config[open] > summary {
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .scoreboard .who {
    position: static;
    min-width: 150px;
  }

  .mgr-score-part {
    grid-template-columns: 110px minmax(50px, 1fr) 46px;
  }
}


/* ---------------------------------------------------------------------------
   Repartizarea leadurilor — rândul de manager din dialogul de configurare.
   Listă, nu tabel: într-un dialog îngust, cota și data de întoarcere din
   concediu ar fi ajuns în derularea orizontală, adică ascunse.
   --------------------------------------------------------------------------- */

.assign-list {
  display: grid;
  gap: 8px;
}

/* Numele sus, controalele dedesubt: într-un dialog îngust orice aranjare pe
   coloane înghesuie numele și suprapune etichetele. */
.assign-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfa;
}

.assign-row > .assign-field {
  display: inline-grid;
}

.assign-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.assign-who {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

/* `.field input` din foaia de bază dă `width: 100%`, ceea ce transforma bifa
   într-un bloc cât rândul și împingea numele în afara cardului. */
.assign-who input[type='checkbox'],
.assign-check input[type='checkbox'] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  flex: 0 0 auto;
  padding: 0;
}

.assign-who input {
  margin-top: 2px;
}

.assign-who strong {
  display: block;
  font-size: 13px;
}

.assign-who small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.assign-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 0 1 auto;
}

.assign-field.is-date {
  min-width: 160px;
}

.assign-field.is-weight {
  width: 84px;
}

.assign-field span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.assign-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d7dcd5;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

/* Bifa stă pe rând cu textul, nu deasupra lui. */
.assign-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 620px) {
  .assign-row {
    grid-template-columns: minmax(0, 1fr) 78px;
  }
}

/* ---------------------------------------------------------------------------
   Previzualizarea agentului AI. Firul de discuție reia stilul din Conversații,
   ca răspunsul testat să arate exact ca unul real; în plus, sub fiecare replică
   a agentului stau diagnosticele care explică de ce a răspuns așa.
   --------------------------------------------------------------------------- */

.preview-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

.preview-blockers {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-left: 3px solid var(--orange);
}

.preview-blockers strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.preview-blockers ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.preview-sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.preview-session {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.preview-session.selected {
  border-color: #202620;
  background: var(--dark-2);
  color: #f6f8f4;
}

.preview-session strong {
  font-size: 13px;
}

.preview-session span {
  color: var(--ink-soft);
  font-size: 11px;
}

.preview-session.selected span {
  color: #aab4ac;
}

.preview-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}

.preview-chat-head h2 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.preview-empty {
  margin: auto;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.preview-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(246, 248, 244, 0.16);
}

.preview-diagnostics .tag {
  background: rgba(246, 248, 244, 0.12);
  color: #d8ded6;
  text-transform: none;
}

.preview-diagnostics .tag.warning {
  background: rgba(237, 123, 74, 0.24);
  color: #ffd0b6;
}

.preview-diagnostics .tag.muted {
  background: transparent;
  color: #9aa39b;
}

.preview-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 26px 20px;
  border-top: 1px solid var(--line);
}

.preview-composer textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7dcd5;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.preview-composer textarea:focus {
  border-color: #202620;
  outline: none;
}

@media (max-width: 860px) {
  .preview-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-composer {
    grid-template-columns: minmax(0, 1fr);
  }
}
