:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf3f7;
  --line: #dbe3eb;
  --line-strong: #b9c7d5;
  --ink: #141a22;
  --muted: #647386;
  --blue: #2857e5;
  --blue-ink: #17378f;
  --teal: #0d8d8b;
  --green: #1c8b5b;
  --amber: #a86d18;
  --red: #c54b43;
  --purple: #6c55b8;
  --gold: #bd7b20;
  --shadow: 0 18px 48px rgba(28, 43, 62, 0.08);
  --soft-shadow: 0 8px 26px rgba(28, 43, 62, 0.06);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 72% -12%, rgba(13, 141, 139, 0.12), transparent 32%),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 48%, #eef3f6 100%);
  color: var(--ink);
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:active {
  transform: translateY(1px);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.05fr) minmax(360px, 0.55fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
}

.auth-hero {
  position: relative;
  min-height: calc(100vh - 44px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(12, 21, 32, 0.92) 0%, rgba(12, 21, 32, 0.7) 42%, rgba(12, 21, 32, 0.12) 100%),
    url("/assets/ai-sales-hero.webp") center right / cover no-repeat;
  box-shadow: var(--shadow);
}

.auth-hero-copy {
  width: min(660px, 78%);
  padding: 48px;
  color: #ffffff;
}

.auth-hero .brand-mark {
  background: #ffffff url("/assets/ai-sales-logo-geometric.svg") center / 78% no-repeat;
}

.auth-hero h1 {
  margin: 18px 0 14px;
  max-width: 680px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-hero p {
  margin: 0;
  max-width: 620px;
  color: #d7e2ec;
  line-height: 1.7;
  font-size: 16px;
}

.auth-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.auth-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: #eef4f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.auth-card {
  align-self: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 235, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(18px);
}

.auth-card form {
  display: grid;
  gap: 10px;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-switch {
  width: 100%;
  margin-top: 12px;
}

.auth-message {
  border: 1px solid #ffd4c7;
  border-radius: 10px;
  background: #fff4ef;
  color: var(--red);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--line);
  color: var(--ink);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding: 2px 4px 8px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(219, 227, 235, 0.82);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #ffffff url("/assets/ai-sales-logo-geometric.svg") center / 78% no-repeat;
  box-shadow: 0 10px 24px rgba(28, 43, 62, 0.08);
}

.brand-title {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.brand-subtitle {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 2px;
}

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

.nav button {
  position: relative;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 9px;
  text-align: left;
  background: transparent;
  color: #4a5869;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav button:hover,
.nav button.active {
  background: #f4f8fc;
  border-color: rgba(207, 216, 227, 0.78);
  color: var(--ink);
}

.nav button.active::before {
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.nav button:hover {
  transform: translateX(1px);
}

.module-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-color: currentColor;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.icon-0 {
  mask-image: url("/assets/icon-cockpit.svg");
  -webkit-mask-image: url("/assets/icon-cockpit.svg");
}

.icon-1 {
  mask-image: url("/assets/icon-customers.svg");
  -webkit-mask-image: url("/assets/icon-customers.svg");
}

.icon-2 {
  mask-image: url("/assets/icon-tasks.svg");
  -webkit-mask-image: url("/assets/icon-tasks.svg");
}

.icon-3 {
  mask-image: url("/assets/icon-agents.svg");
  -webkit-mask-image: url("/assets/icon-agents.svg");
}

.icon-4 {
  mask-image: url("/assets/icon-academy.svg");
  -webkit-mask-image: url("/assets/icon-academy.svg");
}

.icon-5 {
  mask-image: url("/assets/icon-evidence.svg");
  -webkit-mask-image: url("/assets/icon-evidence.svg");
}

.icon-6 {
  mask-image: url("/assets/icon-governance.svg");
  -webkit-mask-image: url("/assets/icon-governance.svg");
}

.icon-7 {
  mask-image: url("/assets/icon-opc.svg");
  -webkit-mask-image: url("/assets/icon-opc.svg");
}

.side-panel {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  box-shadow: var(--soft-shadow);
}

.side-panel strong {
  color: var(--ink);
}

.side-panel span {
  color: var(--muted);
}

.side-panel-focus {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.side-panel-image {
  height: 74px;
  border-radius: 10px;
  margin-bottom: 10px;
  background:
    linear-gradient(90deg, rgba(20, 26, 34, 0.75), rgba(20, 26, 34, 0.08)),
    url("/assets/ai-sales-hero.webp") center / cover no-repeat;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 900px;
  line-height: 1.65;
}

.role-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(185, 199, 213, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px 16px;
  box-shadow: var(--soft-shadow);
}

.role-context h2 {
  margin: 4px 0 6px;
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: 0;
}

.role-context p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.role-context-meta,
.head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.sidebar-account {
  margin-top: auto;
  border: 1px solid rgba(185, 199, 213, 0.74);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 7px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.account-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(219, 227, 235, 0.82);
  border-radius: 9px;
  background: #ffffff url("/assets/gjctech-user-avatar-clean.webp") center / 150% no-repeat;
  box-shadow: 0 10px 20px rgba(40, 87, 229, 0.16);
}

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

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

.account-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.logout-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f2f5f8;
  color: #465467;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.logout-btn:hover {
  border-color: #d5dde6;
  background: #ffffff;
  color: var(--ink);
}

.label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  outline: 0;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(40, 87, 229, 0.12);
}

.dashboard-hero {
  min-height: 252px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.dashboard-hero-copy,
.dashboard-hero-art {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.dashboard-hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  margin: 10px 0 10px;
  max-width: 720px;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.dashboard-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-hero-art {
  min-height: 252px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.5)),
    url("/assets/ai-sales-hero.webp") center / cover no-repeat;
}

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

.module-strip button {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  box-shadow: var(--soft-shadow);
}

.module-strip button.active,
.module-strip button:hover {
  border-color: rgba(13, 141, 139, 0.45);
  background: #ffffff;
}

.module-strip span:last-child {
  font-size: 12px;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  padding: 16px;
}

.card.tight {
  padding: 12px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.3;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head > * {
  min-width: 0;
}

.kpi {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kpi-value {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.kpi-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.delta {
  color: var(--green);
  font-weight: 900;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.chart {
  width: 100%;
  min-height: 260px;
  overflow: hidden;
}

.chart svg {
  width: 100%;
  height: 260px;
  display: block;
}

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

.funnel-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.funnel-track {
  height: 16px;
  border-radius: 7px;
  background: #eef3f6;
  overflow: hidden;
}

.funnel-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #4aa6b8);
}

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

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

.score {
  width: 48px;
  height: 48px;
  border: 6px solid #e7edf3;
  border-top-color: var(--teal);
  border-right-color: var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--blue-ink);
}

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

.small {
  font-size: 12px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.blue {
  background: #eaf0ff;
  color: var(--blue-ink);
}

.badge.teal {
  background: #e5f5f3;
  color: #006f70;
}

.badge.green {
  background: #e8f5ed;
  color: var(--green);
}

.badge.amber {
  background: #fff3dc;
  color: var(--amber);
}

.badge.red {
  background: #ffebe9;
  color: var(--red);
}

.badge.purple {
  background: #f0eaff;
  color: var(--purple);
}

.diagnostic-list,
.evidence-list,
.task-list,
.opc-list {
  display: grid;
  gap: 10px;
}

.diagnostic-item,
.evidence-item,
.task-item,
.opc-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-2);
}

.item-title {
  margin: 0 0 8px;
  font-weight: 900;
  line-height: 1.35;
}

.item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 168px 168px;
  gap: 10px;
  margin-bottom: 12px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented button,
.btn,
.link-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 11px;
  padding: 9px 12px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
}

.segmented button.active,
.btn.primary {
  background: #17212b;
  border-color: #17212b;
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  color: var(--red);
  border-color: #f2c0bb;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
}

th {
  color: var(--muted);
  font-size: 12px;
  background: #f4f7fa;
  font-weight: 900;
}

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

.customer-name {
  font-weight: 900;
  margin-bottom: 2px;
}

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

.prob .bar {
  height: 7px;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  padding: 6px 9px;
  font-size: 12px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  white-space: nowrap;
}

.mini-btn:hover,
.link-btn:hover,
.btn:hover,
.segmented button:hover {
  border-color: var(--line-strong);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.script-box {
  display: grid;
  gap: 10px;
}

.script-line {
  border-left: 3px solid var(--teal);
  background: #f4fbfa;
  padding: 10px 12px;
  border-radius: 0 12px 12px 0;
  line-height: 1.6;
}

.agent-workspace {
  padding: 0;
  overflow: hidden;
}

.agent-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 460px;
}

.agent-rail {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f9fc 100%);
  padding: 14px;
}

.agent-rail-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.agent-rail-head strong {
  font-size: 16px;
  line-height: 1.25;
}

.agent-tabs {
  display: grid;
  gap: 4px;
}

.agent-tabs button {
  position: relative;
  width: 100%;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px 9px 13px;
  text-align: left;
  display: grid;
  gap: 3px;
  align-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.agent-tabs button:hover {
  border-color: rgba(207, 216, 227, 0.8);
  background: rgba(255, 255, 255, 0.72);
}

.agent-tabs button.active {
  border-color: rgba(40, 87, 229, 0.2);
  background: #ffffff;
  color: var(--blue-ink);
  box-shadow: 0 10px 24px rgba(40, 87, 229, 0.07);
}

.agent-tabs button.active::before {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.agent-tab-name {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.agent-tab-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.agent-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 20px;
}

.agent-panel-head {
  display: grid;
  gap: 6px;
  padding-bottom: 2px;
}

.agent-panel-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.agent-panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.agent-command-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(219, 227, 235, 0.86);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px 10px;
}

.agent-command-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.agent-actions button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #344256;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(28, 43, 62, 0.04);
}

.agent-actions button:hover {
  border-color: rgba(40, 87, 229, 0.28);
  background: #f4f8ff;
  color: var(--blue-ink);
}

.chat {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.78), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.message {
  max-width: min(700px, 88%);
  border-radius: 13px;
  padding: 10px 12px;
  line-height: 1.55;
  font-size: 13px;
}

.message.user {
  justify-self: end;
  background: #eaf0ff;
}

.message.agent {
  justify-self: start;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(28, 43, 62, 0.04);
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  padding-top: 0;
}

.academy-radar {
  display: grid;
  gap: 10px;
}

.radar-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: var(--surface-2);
}

.footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .module-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

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

@media (max-width: 860px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .auth-hero {
    min-height: 360px;
  }

  .auth-hero-copy {
    width: 100%;
    padding: 28px;
  }

  .auth-hero h1 {
    font-size: 30px;
  }

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

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    gap: 12px;
  }

  .brand {
    padding: 0 4px 4px;
  }

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

  .nav button {
    min-height: 44px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .side-panel {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .role-context {
    grid-template-columns: 1fr;
  }

  .role-context-meta,
  .head-actions {
    justify-content: flex-start;
  }

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

  .dashboard-hero h2 {
    font-size: 24px;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .agent-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .agent-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

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

  .agent-tab-desc {
    display: none;
  }

  .agent-panel {
    padding: 14px;
  }

  .agent-command-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .agent-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .chat {
    min-height: 260px;
  }

  .chat-input {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-hero-copy,
  .dashboard-hero-copy {
    padding: 22px;
  }

  .auth-hero h1 {
    font-size: 26px;
  }

  .funnel-row,
  .radar-row {
    grid-template-columns: 1fr;
  }

  .actions .mini-btn,
  .agent-actions button,
  .segmented button,
  .btn,
  .link-btn {
    width: 100%;
  }
}
