:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, .86);
  --surface-strong: #ffffff;
  --surface-soft: #f9fbff;
  --ink: #111827;
  --muted: #687386;
  --subtle: #98a2b3;
  --line: #e5eaf2;
  --line-strong: #d8e0ec;
  --blue: #1473e6;
  --blue-soft: #eaf3ff;
  --green: #16a36f;
  --green-soft: #e8f7f1;
  --amber: #b7791f;
  --amber-soft: #fff5de;
  --red: #d92d20;
  --red-soft: #fff0ed;
  --shadow: 0 20px 60px rgba(31, 45, 71, .08);
  --shadow-soft: 0 8px 28px rgba(31, 45, 71, .06);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -10%, rgba(20, 115, 230, .13), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(22, 163, 111, .10), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 42%, #eef3f9 100%);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
  border: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid rgba(216, 224, 236, .72);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #111827, #2d3748);
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(17, 24, 39, .18);
  flex: 0 0 auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 19px;
  line-height: 1.15;
}

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

nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #526071;
  background: transparent;
  border-radius: 12px;
  text-align: left;
  font-weight: 700;
}

.nav-item span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #667085;
  background: #eef3f9;
  font-size: 14px;
}

.nav-item:hover {
  background: rgba(20, 115, 230, .06);
  color: var(--ink);
}

.nav-item.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav-item.active span {
  color: #fff;
  background: var(--blue);
}

.side-status {
  margin-top: auto;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.pulse {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(22, 163, 111, .12);
}

.side-status strong,
.side-status small {
  display: block;
}

.side-status strong {
  font-size: 13px;
}

.side-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 26px 32px 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.topbar small,
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.12;
}

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

.action-stack {
  display: grid;
  gap: 5px;
  justify-items: end;
}

.quiet-console {
  min-height: 22px;
  padding: 0 2px;
  color: var(--subtle);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.quiet-console:hover {
  color: var(--blue);
}

.search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}

.search span {
  color: var(--subtle);
  font-size: 18px;
  line-height: 1;
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.text-btn,
.icon-btn {
  min-height: 40px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-btn {
  padding: 0 17px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(20, 115, 230, .20);
}

.primary-btn:hover {
  background: #0f63cf;
}

.ghost-btn {
  padding: 0 16px;
  color: #344054;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .76);
}

.danger-btn {
  padding: 0 16px;
  color: var(--red);
  border: 1px solid #ffd1cc;
  background: var(--red-soft);
}

.text-btn {
  min-height: 34px;
  padding: 0 10px;
  color: var(--blue);
  background: transparent;
}

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

.icon-btn {
  width: 38px;
  padding: 0;
  color: #526071;
  background: #f2f5fa;
  font-size: 22px;
}

.wide {
  width: 100%;
}

.content {
  display: grid;
  gap: 18px;
}

.hero-panel,
.panel,
.metric,
.list-card,
.detail-card,
.board-col,
.import-hero {
  border: 1px solid rgba(216, 224, 236, .82);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 26px;
  align-items: center;
  min-height: 238px;
  padding: 34px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(244, 249, 255, .82)),
    radial-gradient(circle at 90% 15%, rgba(20, 115, 230, .18), transparent 32%);
}

.hero-panel h2,
.import-hero h2,
.customer-hero h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-panel p,
.import-hero p,
.customer-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-score {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .35), transparent 28%),
    linear-gradient(145deg, #111827, #1473e6);
  box-shadow: 0 22px 48px rgba(20, 115, 230, .24);
  justify-self: end;
}

.hero-score strong,
.hero-score span {
  display: block;
}

.hero-score strong {
  font-size: 36px;
  line-height: 1;
}

.hero-score span {
  margin-top: 6px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

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

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

.target-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(216, 224, 236, .82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow-soft);
}

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

.target-head span,
.target-card p,
.target-meta span {
  color: var(--muted);
}

.target-head span {
  font-size: 13px;
  font-weight: 850;
}

.target-head strong {
  font-size: 22px;
}

.target-card h3 {
  margin: 12px 0 4px;
  font-size: 30px;
  line-height: 1;
}

.target-card p {
  margin: 0 0 14px;
}

.target-card.blue .target-head strong,
.target-card.blue h3 { color: var(--blue); }
.target-card.green .target-head strong,
.target-card.green h3 { color: var(--green); }
.target-card.amber .target-head strong,
.target-card.amber h3 { color: var(--amber); }

.target-meta {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.target-meta span {
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.target-console {
  display: grid;
  gap: 14px;
  padding: 0;
}

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

.target-input {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
}

.target-input span,
.target-input small {
  display: block;
}

.target-input span {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.target-input input {
  width: 100%;
  height: 44px;
  margin: 8px 0 7px;
  font-size: 22px;
  font-weight: 850;
}

.target-input small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.console-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.console-actions small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.metric-grid.compact {
  margin-bottom: 2px;
}

.metric {
  min-height: 126px;
  padding: 20px;
  border-radius: var(--radius);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.metric.blue strong { color: var(--blue); }
.metric.green strong { color: var(--green); }
.metric.amber strong { color: var(--amber); }
.metric.red strong { color: var(--red); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 18px;
}

.two-col.lower {
  grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr);
}

.panel {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head,
.section-head,
.board-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head,
.section-head {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.section-head h2,
.dialog-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.section-head span,
.board-head span {
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 18px;
}

.funnel {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 260px;
}

.funnel > div {
  display: grid;
  grid-template-rows: auto minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.funnel strong {
  font-size: 20px;
}

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

.funnel .bar {
  width: 100%;
  min-height: 32px;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, #1473e6, #5bb7ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .44);
}

.risk-list,
.task-list,
.progress-list,
.customer-list,
.search-results,
.order-maintenance,
.mapping {
  display: grid;
  gap: 10px;
}

.risk,
.task,
.progress-row,
.customer-row,
.file-pill,
.import-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
}

.risk {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px;
}

.risk i {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
}

.risk strong,
.risk small,
.task strong,
.task small,
.progress-row strong,
.progress-row small {
  display: block;
}

.risk small,
.task small,
.progress-row small {
  margin-top: 3px;
  color: var(--muted);
}

.risk.red i { background: var(--red); }
.risk.amber i { background: var(--amber); }

.task {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
}

.task input,
.import-row input {
  accent-color: var(--blue);
}

.task.done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.badge {
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}

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

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

.ai-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.ai-card > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.ai-card strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.ai-card p {
  margin: 9px 0 14px;
  color: var(--muted);
}

.embedded {
  padding: 0 18px 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
}

.single-panel {
  padding-top: 0;
}

.subpage {
  display: grid;
  gap: 18px;
}

.subpage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(216, 224, 236, .82);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(244, 249, 255, .82));
  box-shadow: var(--shadow-soft);
}

.subpage-head h2 {
  margin: 7px 0 8px;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
}

.subpage-head p {
  margin: 0;
  color: var(--muted);
}

.subpage-body {
  max-width: 980px;
}

.compact-form {
  padding: 0;
}

.compact-form label {
  margin-top: 0;
  font-size: 13px;
}

.compact-form .form-grid {
  margin-bottom: 14px;
}

.cert-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.cert-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
}

.cert-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  color: #344054;
  background: #f3f7fc;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.cert-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}

.wide-field {
  margin-bottom: 14px;
}

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

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

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

.connection-item {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
}

.connection-item span,
.connection-item small {
  display: block;
  color: var(--muted);
}

.connection-item strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.profile-note {
  grid-column: 1 / -1;
}

.profile-note strong {
  font-size: 16px;
  line-height: 1.45;
}

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

.contact-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
}

.contact-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-card strong,
.contact-card small,
.contact-card em {
  display: block;
}

.contact-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.contact-card p {
  margin: 7px 0 5px;
  color: #344054;
  font-weight: 800;
}

.contact-card small,
.contact-card em {
  color: var(--muted);
  font-style: normal;
  overflow-wrap: anywhere;
}

.form-section {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbff;
}

.inline-head {
  padding: 0;
  border-bottom: 0;
}

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

.contact-edit-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: center;
}

.contact-edit-row.new-contact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.contact-edit-row input,
.contact-edit-row select {
  min-width: 0;
}

.delete-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 8px;
  color: var(--red);
  font-size: 12px;
  white-space: nowrap;
}

.order-stack,
.schedule-list {
  display: grid;
  gap: 10px;
}

.order-card,
.schedule-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .68);
}

.order-card > div,
.schedule-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-card p,
.schedule-item p {
  margin: 8px 0 11px;
  color: #344054;
}

.order-card small,
.schedule-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.schedule-item div span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.split-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  height: min(780px, calc(100vh - 154px));
  min-height: 560px;
}

.customer-rating-summary {
  display: grid;
  grid-template-columns: minmax(168px, .72fr) minmax(0, 2.28fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(248, 252, 255, .98), rgba(238, 247, 255, .78));
  box-shadow: 0 12px 28px rgba(34, 78, 126, .08);
}

.rating-summary-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 10px;
}

.rating-summary-copy strong { color: #14213a; font-size: 17px; }
.rating-summary-copy small { color: #6d7f95; font-size: 12px; }

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

.rating-summary-card {
  display: grid;
  min-height: 78px;
  padding: 10px 12px;
  border: 1px solid #dce7f2;
  border-radius: 9px;
  color: #5d6f84;
  background: rgba(255, 255, 255, .78);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.rating-summary-card:hover,
.rating-summary-card.active {
  border-color: #8dc5ff;
  background: #f4f9ff;
  box-shadow: 0 8px 18px rgba(42, 118, 210, .12);
  transform: translateY(-1px);
}

.rating-summary-card span { font-size: 12px; font-weight: 800; }
.rating-summary-card strong { margin: 4px 0 2px; color: #17243d; font-size: 24px; line-height: 1; }
.rating-summary-card small { color: #77889d; font-size: 11px; white-space: nowrap; }
.rating-summary-card.rating-s span, .rating-summary-card.rating-s strong { color: #0d75d8; }
.rating-summary-card.rating-a span, .rating-summary-card.rating-a strong { color: #0f9e73; }
.rating-summary-card.rating-b span, .rating-summary-card.rating-b strong { color: #8b68d7; }
.rating-summary-card.rating-c span, .rating-summary-card.rating-c strong { color: #bd7a18; }

.list-card,
.detail-card {
  min-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.split-workspace > .list-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.split-workspace > .list-card .customer-list,
.split-workspace > .detail-card {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.split-workspace > .list-card .customer-list {
  align-content: start;
}

.split-workspace > .list-card .customer-list::-webkit-scrollbar,
.split-workspace > .detail-card::-webkit-scrollbar {
  width: 8px;
}

.split-workspace > .list-card .customer-list::-webkit-scrollbar-thumb,
.split-workspace > .detail-card::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #cbd7e6;
  background-clip: padding-box;
}

.customer-list {
  padding: 12px;
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #dfe8f2;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
}

.list-card > .module-toolbar {
  margin: 10px 12px 0;
  border-radius: 10px;
}

.module-segments {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.module-segments::-webkit-scrollbar { display: none; }

.module-segments button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #728197;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.module-segments button:hover { color: #206fe0; background: #f2f7ff; }
.module-segments button.active { border-color: #bcd9ff; color: #176cd9; background: #eaf4ff; }
.module-toolbar-action { flex: 0 0 auto; }

.command-trigger { font-size: 14px; font-weight: 900; }

.command-dialog,
.confirmation-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #d7e4f1;
  border-radius: 16px;
  color: #182640;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 47, 85, .28);
}

.command-dialog::backdrop,
.confirmation-dialog::backdrop { background: rgba(8, 25, 49, .38); backdrop-filter: blur(3px); }
.command-dialog .dialog-head,
.confirmation-dialog .dialog-head { padding: 22px 22px 10px; }
.dialog-copy { margin: 0; padding: 0 22px 18px; color: #6e7f94; line-height: 1.6; }
.command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 22px 22px; }
.command-grid button { padding: 15px; border: 1px solid #dce7f2; border-radius: 11px; text-align: left; background: #fbfdff; }
.command-grid button:hover { border-color: #9ecbff; background: #f1f7ff; }
.command-grid span,
.command-grid strong,
.command-grid small { display: block; }
.command-grid span { color: #2379e8; font-size: 11px; font-weight: 900; }
.command-grid strong { margin: 6px 0 4px; color: #1c2b43; font-size: 14px; }
.command-grid small { color: #74849a; font-size: 11px; line-height: 1.45; }
.confirmation-dialog .dialog-actions { padding: 4px 22px 22px; }

.order-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f5f9fe;
}

.batch-actions { display: flex; align-items: center; gap: 9px; }
.batch-actions strong,
.table-hint { color: #65778f; font-size: 12px; }
.batch-actions select { min-height: 32px; padding: 0 8px; border: 1px solid #cad9e9; border-radius: 7px; color: #43556d; background: #fff; font-size: 12px; }
.batch-actions .primary-btn { min-height: 32px; padding: 0 12px; font-size: 12px; }
.data-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--blue); }

.customer-row {
  width: 100%;
  padding: 14px;
  text-align: left;
}

.customer-row.active {
  border-color: rgba(20, 115, 230, .34);
  background: var(--blue-soft);
}

.customer-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-row div span {
  color: var(--blue);
  font-weight: 900;
}

.customer-row p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #58c7ff);
}

.customer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f4f9ff);
}

.hero-side {
  display: grid;
  justify-items: end;
  gap: 16px;
}

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

.customer-hero h2 {
  font-size: clamp(28px, 3.4vw, 46px);
}

.ring {
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle closest-side, #fff 71%, transparent 72%),
    conic-gradient(var(--blue) var(--value), #e8eef6 0);
}

.ring strong,
.ring span {
  display: block;
}

.ring strong {
  font-size: 27px;
  line-height: 1;
}

.ring span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.customer-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
}

.customer-stat {
  min-width: 0;
  padding: 21px 22px;
  border-right: 1px solid #e5edf6;
}

.customer-stat:last-child { border-right: 0; }

.customer-stat span,
.customer-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.customer-stat strong {
  display: block;
  margin: 8px 0 6px;
  overflow-wrap: anywhere;
  color: #101c34;
  font-size: 24px;
  line-height: 1.12;
}

.customer-workspace { background: rgba(247, 250, 254, .72); }

.customer-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  scrollbar-width: none;
}

.customer-tabs::-webkit-scrollbar { display: none; }

.customer-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 15px;
  border: 0;
  border-radius: 0;
  color: #6c7c91;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.customer-tab:hover { color: var(--blue); background: #f5f9ff; }

.customer-tab.active { color: var(--blue); }

.customer-tab.active::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  content: "";
  background: var(--blue);
}

.customer-workspace-body { padding: 18px; }

.customer-workspace-stack,
.customer-tab-layout { display: grid; gap: 16px; }

.customer-profile-completion {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(300px, 1.2fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #cfe0f4;
  border-radius: 14px;
  background: linear-gradient(115deg, #f3f8ff 0%, #fff 58%, #f7fbff 100%);
}

.customer-profile-completion.complete {
  grid-template-columns: 1fr auto;
  border-color: #c7eadc;
  background: linear-gradient(115deg, #eefaf5, #fff);
}

.customer-profile-completion h3,
.profile-queue-head h3 { margin: 4px 0; color: #1d2d45; font-size: 18px; }
.customer-profile-completion p,
.profile-queue-head p { margin: 0; color: #74859b; font-size: 12px; }
.completion-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.completion-score { color: #176fd9; font-size: 22px; font-weight: 950; }

.profile-missing-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-missing-tags span {
  padding: 4px 8px;
  border: 1px solid #f0d6a9;
  border-radius: 999px;
  color: #a56617;
  background: #fff8e9;
  font-size: 11px;
  font-weight: 800;
}

.customer-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.05fr) minmax(0, 1.06fr);
  gap: 16px;
}

.customer-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.25fr) minmax(0, 1.05fr);
  gap: 16px;
}

.customer-data-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dbe6f1;
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 9px 22px rgba(38, 75, 115, .045);
}

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

.customer-data-head h3 { margin: 0; font-size: 16px; }

.icon-text-btn,
.inline-link,
.card-footer-link {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.customer-intro {
  min-height: 96px;
  margin: 0 0 15px;
  color: #607188;
  font-size: 13px;
  line-height: 1.75;
}

.customer-facts { display: grid; gap: 10px; margin: 0; }

.customer-facts div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }

.customer-facts dt,
.customer-facts dd { margin: 0; font-size: 12px; }
.customer-facts dt { color: #93a1b3; }
.customer-facts dd { min-width: 0; color: #42536a; font-weight: 750; overflow-wrap: anywhere; }

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

.customer-product-mini {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1eaf4;
  border-radius: 11px;
  text-align: left;
  background: #fbfdff;
}

.customer-product-mini:hover { border-color: #9fcbff; background: #f5faff; }

.product-mark {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d5e6f7;
  border-radius: 8px;
  color: #2279e9;
  background: linear-gradient(145deg, #eff8ff, #d9edff);
  font-size: 15px;
  font-weight: 950;
}

.customer-product-mini strong,
.customer-product-mini small { display: block; }
.customer-product-mini strong { color: #15223a; font-size: 13px; }
.customer-product-mini small { margin-top: 4px; color: #75859a; font-size: 11px; }
.customer-product-mini em { align-self: start; padding: 4px 6px; border-radius: 5px; color: #07986f; background: #e8faf3; font-size: 11px; font-style: normal; font-weight: 850; }

.card-footer-link { width: 100%; margin-top: 14px; text-align: center; }

.customer-order-mini {
  width: 100%;
  padding: 12px;
  border: 1px solid #e1eaf4;
  border-radius: 11px;
  text-align: left;
  color: #607188;
  background: #fbfdff;
}

.customer-order-mini:hover { border-color: #9fcbff; background: #f5faff; }
.customer-order-mini > div { display: flex; align-items: center; gap: 8px; }
.customer-order-mini strong { color: #15223a; font-size: 14px; }
.customer-order-mini p { margin: 9px 0 0; font-size: 12px; }
.status-chip { padding: 4px 6px; border-radius: 5px; color: #277fec; background: #e8f2ff; font-size: 11px; font-weight: 850; }

.order-milestones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 17px; }
.order-milestones span { position: relative; min-width: 0; padding-top: 17px; color: #9ba9bb; font-size: 10px; text-align: center; white-space: nowrap; }
.order-milestones span::before { position: absolute; top: 5px; left: 0; width: 100%; height: 2px; content: ""; background: #dce5ef; }
.order-milestones span:first-child::before { left: 50%; width: 50%; }
.order-milestones span:last-child::before { width: 50%; }
.order-milestones i { position: absolute; top: 0; left: 50%; width: 12px; height: 12px; border: 3px solid #dce5ef; border-radius: 50%; transform: translateX(-50%); background: #fff; }
.order-milestones .done { color: #319a7b; }
.order-milestones .done::before { background: #74d6bd; }
.order-milestones .done i { border-color: #36bc91; background: #36bc91; }
.order-milestones .current { color: #2279e9; font-weight: 850; }
.order-milestones .current i { border-color: #2279e9; box-shadow: 0 0 0 3px #dceeff; }

.activity-list,
.followup-list,
.customer-todo-list,
.deal-link-list,
.cert-list,
.file-list { display: grid; gap: 11px; }

.activity-list article,
.followup-list article { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 9px; }

.activity-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #3892f6; box-shadow: 0 0 0 4px #e7f2ff; }
.activity-dot.green { background: #2db58b; box-shadow: 0 0 0 4px #e6faf2; }
.activity-dot.amber { background: #ed9f38; box-shadow: 0 0 0 4px #fff3dd; }
.activity-list strong,
.followup-list strong { color: #263852; font-size: 12px; }
.activity-list p,
.followup-list p { margin: 4px 0 0; color: #77889e; font-size: 12px; line-height: 1.5; }

.followup-list article > i { position: relative; width: 9px; height: 9px; margin-top: 4px; border: 2px solid #46a3f6; border-radius: 50%; background: #fff; }
.followup-list article:not(:last-child) > i::after { position: absolute; top: 8px; left: 2px; width: 1px; height: 47px; content: ""; background: #d9e7f5; }
.followup-list small { display: block; margin-top: 5px; color: #99a7b7; font-size: 11px; }

.task-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #ee5c63; font-size: 11px; }
.customer-todo-list label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 9px 0; border-bottom: 1px solid #edf1f6; }
.customer-todo-list label:last-child { border-bottom: 0; }
.customer-todo-list input { margin: 3px 0 0; accent-color: var(--blue); }
.customer-todo-list strong,
.customer-todo-list small { display: block; }
.customer-todo-list strong { color: #30425b; font-size: 12px; line-height: 1.4; }
.customer-todo-list small { margin-top: 3px; color: #95a3b4; font-size: 11px; }
.customer-todo-list em { padding: 3px 5px; border-radius: 5px; color: #dc7b18; background: #fff3df; font-size: 10px; font-style: normal; font-weight: 850; }

.customer-tab-layout.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deal-link-list button { padding: 13px; border: 1px solid #e1eaf4; border-radius: 10px; text-align: left; background: #fbfdff; }
.deal-link-list button:hover { border-color: #9fcbff; background: #f5faff; }
.deal-link-list strong,
.deal-link-list span { display: block; }
.deal-link-list strong { color: #263852; }
.deal-link-list span { margin-top: 5px; color: #77889e; font-size: 12px; }
.customer-note-block { padding: 16px; border-left: 3px solid #4a9cf1; border-radius: 8px; background: #f4f9ff; }
.customer-note-block strong { color: #253a58; }
.customer-note-block p { margin: 8px 0 0; color: #6d7e94; line-height: 1.65; }
.risk-note { border-left-color: #e6a145; background: #fff9ee; }
.cert-list article { display: flex; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #e1eaf4; border-radius: 10px; color: #65758b; }
.cert-list strong { color: #263852; }
.cert-list span { font-size: 12px; text-align: right; }
.file-list article { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e1eaf4; border-radius: 10px; background: #fbfdff; }
.file-list i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: #267ce7; background: #e8f3ff; font-size: 12px; font-style: normal; font-weight: 900; }
.file-list strong,
.file-list small { display: block; }
.file-list strong { color: #273b57; font-size: 13px; }
.file-list small { margin-top: 4px; color: #8190a3; font-size: 11px; }
.file-list button { border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 850; }

@media (max-width: 1440px) {
  .customer-stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-stat:nth-child(3) { border-right: 0; }
  .customer-stat:nth-child(-n + 3) { border-bottom: 1px solid #e5edf6; }
}

@media (max-width: 1240px) {
  .customer-profile-completion { grid-template-columns: 1fr; }
  .customer-profile-completion .completion-actions { justify-content: space-between; }
  .customer-overview-grid,
  .customer-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-overview-grid > :first-child,
  .customer-lower-grid > :first-child { grid-column: span 2; }
}

@media (max-width: 820px) {
  .customer-stat-strip,
  .customer-overview-grid,
  .customer-lower-grid,
  .customer-tab-layout.two-up,
  .customer-product-grid { grid-template-columns: 1fr; }
  .customer-stat { border-right: 0; border-bottom: 1px solid #e5edf6; }
  .customer-stat:nth-child(3) { border-right: 0; }
  .customer-stat:last-child { border-bottom: 0; }
  .customer-overview-grid > :first-child,
  .customer-lower-grid > :first-child { grid-column: auto; }
  .customer-workspace-body { padding: 12px; }
  .customer-tabs { padding: 0 8px; }
  .customer-tab { min-height: 50px; padding: 0 12px; }
  .customer-data-card { padding: 14px; }
  .module-toolbar { align-items: stretch; flex-direction: column; }
  .module-toolbar-action { display: flex; justify-content: flex-end; }
  .command-grid { grid-template-columns: 1fr; }
  .batch-actions { align-items: stretch; flex-direction: column; }
  .order-table-toolbar { align-items: stretch; min-height: 0; }
}

.info-tile {
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .66);
}

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

.info-tile strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.info-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

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

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

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

td {
  color: #344054;
}

td strong {
  color: var(--ink);
}

.table-link {
  display: inline;
  padding: 0;
  color: inherit;
  background: transparent;
  font-weight: 850;
  text-align: left;
  border-radius: 0;
  white-space: normal;
}

.table-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.interactive-card {
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.interactive-card:hover {
  border-color: rgba(20, 115, 230, .34);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.link-card {
  width: 100%;
  color: inherit;
  text-align: left;
}

button.link-card {
  cursor: pointer;
}

button.link-card:hover {
  border-color: rgba(20, 115, 230, .34);
  background: var(--blue-soft);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.board-col {
  min-height: 560px;
  padding: 14px;
  border-radius: var(--radius);
}

.board-head {
  margin-bottom: 12px;
}

.board-head span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef3f9;
  font-weight: 850;
}

.deal-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 45, 71, .05);
}

.deal-card.active {
  border-color: rgba(20, 115, 230, .42);
  background: var(--blue-soft);
}

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

.deal-card + .deal-card {
  margin-top: 10px;
}

.deal-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.32;
}

.deal-card p {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 13px;
}

.deal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}

.deal-foot span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.deal-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.business-board {
  margin-bottom: 18px;
}

.table-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.maintenance-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 92px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
}

.maintenance-row strong,
.maintenance-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.maintenance-row small {
  color: var(--muted);
}

.maintenance-row select,
.maintenance-row input {
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
}

.search-result {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  text-align: left;
}

.search-result:hover {
  border-color: rgba(20, 115, 230, .34);
  background: var(--blue-soft);
}

.search-result > span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef6ff;
  font-size: 12px;
  font-weight: 900;
}

.search-result strong,
.search-result small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-result small {
  margin-top: 2px;
  color: var(--muted);
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 160px) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
}

.progress-row > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.import-main {
  display: grid;
  gap: 18px;
}

.import-hero {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eef7ff);
}

.import-hero h2 {
  font-size: clamp(30px, 3.2vw, 44px);
}

.import-side {
  display: grid;
  gap: 14px;
}

.drop-zone {
  min-height: 344px;
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  border: 1.5px dashed #b9c6d8;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.drop-zone.dragging {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-2px);
}

.upload-symbol {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1473e6, #58c7ff);
  font-size: 36px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(20, 115, 230, .22);
}

.drop-zone h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.drop-zone p {
  max-width: 500px;
  margin: 0 auto 18px;
  color: var(--muted);
}

.preview-note,
.notice {
  padding: 12px 14px;
  border-radius: 14px;
  color: #344054;
  background: #f1f6fd;
  border: 1px solid #dbe8f7;
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.import-summary-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.import-summary-card span,
.import-summary-card strong,
.import-summary-card small {
  display: block;
}

.import-summary-card span,
.import-summary-card small {
  color: var(--muted);
  font-size: 12px;
}

.import-summary-card strong {
  margin: 4px 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.import-summary-card.customer strong { color: var(--blue); }
.import-summary-card.product strong { color: var(--green); }
.import-summary-card.order strong { color: var(--amber); }
.import-summary-card.work strong { color: #8b5cf6; }

.import-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 2px;
  color: var(--muted);
  font-size: 12px;
}

.import-table-head label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.import-table-head input,
.import-row input { accent-color: var(--blue); }

.import-row {
  display: grid;
  grid-template-columns: 20px minmax(120px, 180px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  margin-top: 10px;
}

.import-row.enhanced {
  grid-template-columns: 20px minmax(150px, .9fr) minmax(100px, .55fr) minmax(0, 1.45fr);
  align-items: start;
}

.import-row.enhanced small {
  display: block;
  margin-top: 3px;
  white-space: normal;
}

.import-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.import-target {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #344054;
  background: #edf2f7;
  font-size: 11px;
  font-weight: 850;
}

.import-target.customer { color: #075ab7; background: #e8f3ff; }
.import-target.product { color: #08764f; background: #e8f8f0; }
.import-target.order { color: #9a5a07; background: #fff3dd; }
.import-target.opportunity { color: #6d36c8; background: #f2ebff; }
.import-target.task { color: #b42318; background: #fff0ed; }

.import-row strong,
.import-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-row span {
  color: #344054;
}

.import-row small {
  color: var(--muted);
  white-space: nowrap;
}

.file-pill {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px;
}

.file-pill > span {
  width: 48px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.file-pill strong,
.file-pill small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-pill small {
  color: var(--muted);
}

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

.mapping span,
.mapping b {
  padding: 9px 10px;
  border-radius: 10px;
  background: #f7f9fc;
  font-size: 13px;
}

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

.mapping b {
  color: var(--blue);
  background: var(--blue-soft);
}

.empty-mini {
  min-height: 86px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f9fbff;
  text-align: center;
}

dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .22);
}

dialog::backdrop {
  background: rgba(17, 24, 39, .28);
  backdrop-filter: blur(8px);
}

form {
  padding: 18px;
}

form label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #344054;
  font-weight: 800;
}

form input,
form select,
form textarea {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
}

form textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.5;
}

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

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, .94);
  box-shadow: 0 12px 30px rgba(17, 24, 39, .18);
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Dashboard only: dark data-screen treatment while the rest of the system stays light. */
body.cockpit-mode { color: #e8f7ff; background: #050c16; }
body.cockpit-mode #app { background: #050c16; }
body.cockpit-mode .sidebar { border-color: #17344c; background: #071525; box-shadow: inset -1px 0 0 rgba(99, 217, 255, .08); }
body.cockpit-mode .brand strong, body.cockpit-mode .side-status strong { color: #f2fbff; }
body.cockpit-mode .brand span, body.cockpit-mode .side-status small { color: #7ca0b8; }
body.cockpit-mode .brand-mark { color: #071525; background: #6de4ff; box-shadow: 0 0 24px rgba(77, 220, 255, .26); }
body.cockpit-mode .nav-item { color: #83a5ba; }
body.cockpit-mode .nav-item span { color: #9fc2d8; background: #0b2033; }
body.cockpit-mode .nav-item:hover { color: #ecfbff; background: #0a273d; }
body.cockpit-mode .nav-item.active { color: #e7fbff; background: #0c3854; }
body.cockpit-mode .nav-item.active span { color: #042035; background: #6de4ff; }
body.cockpit-mode .side-status { border-color: #17344c; background: #0a1b2d; box-shadow: none; }
body.cockpit-mode .main { background: #050c16; }
body.cockpit-mode .topbar { justify-content: flex-end; margin-bottom: 14px; }
body.cockpit-mode .topbar > div:first-child { display: none; }
body.cockpit-mode .search { border-color: #1d4058; color: #d7effa; background: #081827; }
body.cockpit-mode .search input::placeholder { color: #6f96ad; }
body.cockpit-mode .ghost-btn { color: #b9d9eb; border-color: #244962; background: #091a29; }
body.cockpit-mode .ghost-btn:hover { color: #fff; border-color: #55ccec; }
body.cockpit-mode .quiet-console { color: #6f96ad; }
body.cockpit-mode .quiet-console:hover { color: #73e6ff; }
body.cockpit-mode .primary-btn { color: #041522; background: #65dffa; box-shadow: 0 8px 24px rgba(51, 210, 246, .16); }
body.cockpit-mode .primary-btn:hover { background: #9deeff; }

.cockpit-page { position: relative; display: grid; gap: 12px; min-height: calc(100vh - 96px); padding: 16px; overflow: hidden; border: 1px solid #174461; border-radius: 10px; background-color: #061220; box-shadow: inset 0 0 0 1px rgba(105, 232, 255, .04), 0 22px 70px rgba(0, 0, 0, .3); }
.cockpit-page::before { position: absolute; inset: 0; z-index: 0; pointer-events: none; content: ""; opacity: .42; background-image: linear-gradient(rgba(73, 182, 221, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(73, 182, 221, .06) 1px, transparent 1px); background-size: 34px 34px; }
.cockpit-page > * { position: relative; z-index: 1; }
.cockpit-titlebar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 8px 8px; border-bottom: 1px solid #1d4a64; }
.cockpit-titlebar > div:first-child { display: flex; align-items: baseline; gap: 16px; }
.cockpit-titlebar span { color: #63dfff; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.cockpit-titlebar h2 { margin: 0; color: #f0fcff; font-size: 26px; line-height: 1; letter-spacing: .06em; }
.cockpit-date { display: grid; justify-items: end; gap: 2px; }
.cockpit-date strong { color: #d3eff9; font-size: 13px; letter-spacing: .08em; }
.cockpit-date small { color: #6f9ab2; font-size: 11px; }

.cockpit-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cockpit-kpi { min-width: 0; min-height: 116px; padding: 15px 16px; border: 1px solid #1b4e6d; border-radius: 7px; color: #d8f4ff; text-align: left; background: #082037; box-shadow: inset 0 1px 0 rgba(144, 235, 255, .08); transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.cockpit-kpi:hover, .cockpit-kpi:focus-visible { border-color: #63e0ff; outline: 0; transform: translateY(-2px); background: #0a2942; }
.cockpit-kpi span, .cockpit-kpi small, .cockpit-kpi b { display: block; }
.cockpit-kpi span { color: #89b9d2; font-size: 12px; font-weight: 800; }
.cockpit-kpi strong { display: block; margin: 9px 0; color: #70e6ff; font-size: clamp(21px, 2vw, 28px); line-height: 1; }
.cockpit-kpi small { color: #9cc4d8; font-size: 11px; }
.cockpit-progress { height: 5px; margin: 0 0 8px; overflow: hidden; border-radius: 99px; background: #12364c; }
.cockpit-progress i { display: block; height: 100%; border-radius: inherit; background: #63dcf4; }
.cockpit-outlook strong { color: #f1c66e; }
.cockpit-outlook b { margin-top: 6px; color: #5fe1ff; font-size: 11px; }

.cockpit-workspace { display: grid; grid-template-columns: minmax(225px, .78fr) minmax(430px, 1.48fr) minmax(225px, .78fr); gap: 10px; min-height: 560px; }
.cockpit-column, .cockpit-center { display: grid; min-width: 0; gap: 10px; }
.cockpit-column { grid-template-rows: minmax(250px, 1fr) minmax(220px, .9fr); }
.cockpit-center { grid-template-rows: minmax(334px, 1.15fr) minmax(210px, .75fr); }
.cockpit-panel { min-width: 0; overflow: hidden; border: 1px solid #1b4e6d; border-radius: 7px; background: #071b2e; box-shadow: inset 0 1px 0 rgba(144, 235, 255, .05); }
.cockpit-panel header { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 0 12px; border-bottom: 1px solid #163b55; background: #09243a; }
.cockpit-panel h3 { margin: 0; color: #dff8ff; font-size: 14px; line-height: 1; letter-spacing: .04em; }
.cockpit-panel header button { padding: 0; color: #68d8f4; background: transparent; font-size: 11px; font-weight: 800; }
.cockpit-panel header button:hover { color: #fff; }
.cockpit-panel-body { height: calc(100% - 39px); min-height: 0; padding: 12px; }

.cockpit-funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 8px; height: 100%; min-height: 185px; }
.cockpit-funnel button { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; align-items: end; min-width: 0; height: 100%; color: #dff5ff; background: transparent; }
.cockpit-funnel button:hover strong, .cockpit-funnel button:hover span { color: #70e6ff; }
.cockpit-funnel strong { font-size: 20px; line-height: 1; }
.cockpit-funnel i { display: block; width: 100%; min-height: 20px; align-self: end; border: 1px solid #3bc7e9; border-bottom: 0; background: #126c9e; box-shadow: inset 0 1px 0 rgba(211, 252, 255, .32); }
.cockpit-funnel span { overflow: hidden; color: #8cb7ce; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-delivery-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.cockpit-delivery-summary div { padding: 8px 5px; border: 1px solid #1b4a64; text-align: center; background: #09243a; }
.cockpit-delivery-summary strong, .cockpit-delivery-summary span { display: block; }
.cockpit-delivery-summary strong { color: #74e7ff; font-size: 20px; line-height: 1.1; }
.cockpit-delivery-summary span { margin-top: 4px; color: #8cb6cb; font-size: 10px; }
.cockpit-delivery-list { display: grid; gap: 8px; }
.cockpit-delivery-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; color: #b6dbe9; text-align: left; background: transparent; }
.cockpit-delivery-list button:hover span { color: #71e8ff; }
.cockpit-delivery-list b { color: #f1cd77; font-size: 11px; }
.cockpit-delivery-list i { grid-column: 1 / -1; height: 4px; overflow: hidden; background: #17384d; }
.cockpit-delivery-list em { display: block; height: 100%; background: #63dff7; }

.cockpit-map { position: relative; height: 100%; min-height: 270px; overflow: hidden; }
.cockpit-map-image { position: absolute; inset: 2px 86px 2px 0; background: url("assets/cockpit-china-map.png") center / contain no-repeat; filter: saturate(1.08) contrast(1.08); }
.cockpit-region-list { position: absolute; top: 8px; right: 0; bottom: 8px; display: grid; align-content: center; gap: 7px; width: 92px; }
.cockpit-region-list button { display: grid; grid-template-columns: 1fr auto; gap: 0 6px; padding: 7px; border: 1px solid #1d4e6b; border-radius: 4px; color: #d9f4ff; text-align: left; background: #09243a; }
.cockpit-region-list button:hover { border-color: #68dfff; background: #0b2e49; }
.cockpit-region-list span { color: #9fc7d9; font-size: 10px; }
.cockpit-region-list strong { color: #f3cc70; font-size: 16px; line-height: 1; }
.cockpit-region-list small { grid-column: 1 / -1; margin-top: 3px; color: #6f9ab3; font-size: 9px; }

.cockpit-chart { display: grid; grid-template-rows: auto minmax(130px, 1fr) auto; height: 100%; min-height: 205px; gap: 8px; }
.cockpit-chart-legend { display: flex; justify-content: space-between; color: #91bdd2; font-size: 11px; }
.cockpit-chart-legend b { color: #75e8ff; }
.cockpit-bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 5px; min-height: 0; padding-top: 8px; border-bottom: 1px solid #244b62; }
.cockpit-bars button { position: relative; display: grid; grid-template-rows: 1fr auto; align-items: end; height: 100%; padding: 0; color: #89b4c9; background: transparent; }
.cockpit-bars i { display: block; width: 70%; min-height: 16px; margin: 0 auto; border: 1px solid #45cce9; border-bottom: 0; background: #166b9a; }
.cockpit-bars em { position: absolute; right: 0; left: 0; height: 2px; background: #f1c66e; }
.cockpit-bars span { padding-top: 6px; font-size: 9px; white-space: nowrap; }
.cockpit-chart > small { color: #709bb1; font-size: 10px; }

.cockpit-risks { display: grid; gap: 7px; }
.cockpit-risks button { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #153b54; color: #b4d8e5; text-align: left; background: transparent; }
.cockpit-risks button:last-child { border-bottom: 0; }
.cockpit-risks button:hover span { color: #fff; }
.cockpit-risks i { width: 6px; height: 6px; border-radius: 50%; background: #f2c46c; box-shadow: 0 0 10px rgba(242, 196, 108, .5); }
.cockpit-risks span { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-risks b { margin-right: 5px; color: #75e4fb; }
.cockpit-risks em { color: #68dff8; font-size: 10px; font-style: normal; }
.cockpit-empty { padding: 24px 0; color: #7da4b8; text-align: center; font-size: 12px; }

.cockpit-closure { display: grid; grid-template-columns: 1.08fr .92fr; gap: 14px; height: 100%; }
.cockpit-closure > div { min-width: 0; }
.cockpit-closure h4 { margin: 0 0 7px; color: #8ab8ce; font-size: 11px; font-weight: 800; }
.cockpit-closure button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; padding: 6px 0; border-bottom: 1px solid #163c54; color: #b9dce9; text-align: left; background: transparent; }
.cockpit-closure button:hover { color: #75e7ff; }
.cockpit-closure button span { overflow: hidden; color: #c5e4ef; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-closure button strong { color: #fff; font-size: 11px; font-weight: 700; }
.cockpit-closure button small { grid-column: 1 / -1; color: #749cb1; font-size: 10px; }
.cockpit-closure p { color: #789fb2; font-size: 11px; }

@media (max-width: 1180px) {
  .cockpit-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cockpit-center { grid-column: 1 / -1; grid-row: 1; }
  .cockpit-left, .cockpit-right { grid-template-rows: minmax(220px, 1fr) minmax(190px, .8fr); }

  #app {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 12px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand div:last-child,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item span {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .side-status {
    grid-template-columns: 1fr;
    place-items: center;
  }

  .side-status div {
    display: none;
  }

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

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

  .target-control-grid {
    grid-template-columns: 1fr;
  }

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

  .split-workspace,
  .import-layout {
    grid-template-columns: 1fr;
  }

  .split-workspace {
    height: auto;
    min-height: 0;
  }

  .customer-rating-summary { grid-template-columns: 1fr; }
  .rating-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .split-workspace > .list-card {
    display: block;
  }

  .split-workspace > .list-card .customer-list,
  .split-workspace > .detail-card {
    overflow: visible;
    scrollbar-gutter: auto;
  }
}

@media (max-width: 820px) {
  .customer-rating-summary { padding: 11px; }
  .rating-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rating-summary-card { min-height: 72px; padding: 9px 10px; }
  .rating-summary-card small { white-space: normal; }
  .rating-summary-card.all { grid-column: 1 / -1; }
  body.cockpit-mode .main { padding: 12px; }
  body.cockpit-mode .topbar { margin-bottom: 10px; }
  .cockpit-page { min-height: auto; padding: 10px; border-radius: 7px; }
  .cockpit-titlebar { align-items: flex-start; gap: 8px; }
  .cockpit-titlebar > div:first-child { display: grid; gap: 5px; }
  .cockpit-titlebar h2 { font-size: 21px; }
  .cockpit-date { padding-top: 2px; }
  .cockpit-date strong { font-size: 11px; white-space: nowrap; }
  .cockpit-date small { display: none; }
  .cockpit-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-kpi { min-height: 104px; padding: 12px; }
  .cockpit-kpi strong { font-size: 20px; }
  .cockpit-workspace { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .cockpit-center { grid-column: auto; grid-row: auto; }
  .cockpit-column, .cockpit-center { grid-template-rows: none; }
  .cockpit-panel { min-height: 220px; }
  .cockpit-center .map-panel { min-height: 320px; }
  .cockpit-map-image { inset-right: 76px; }
  .cockpit-region-list { width: 78px; }
  .cockpit-region-list button { padding: 6px; }
  .cockpit-closure { grid-template-columns: 1fr; gap: 10px; }

  #app {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand div:last-child {
    display: block;
  }

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

  .nav-item {
    min-height: 46px;
    font-size: 13px;
  }

  .side-status {
    display: none;
  }

  .main {
    padding: 20px 16px 34px;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-stack {
    justify-items: stretch;
  }

  .quiet-console {
    text-align: right;
  }

  .search {
    width: 100%;
  }

  .hero-panel,
  .customer-hero {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-items: start;
  }

  .subpage-head {
    display: grid;
  }

  .hero-score {
    justify-self: start;
    width: 150px;
  }

  .two-col,
  .two-col.lower,
  .embedded {
    grid-template-columns: 1fr;
  }

  .matrix-grid,
  .metric-grid,
  .target-grid,
  .connection-grid,
  .profile-grid,
  .contact-grid,
  .contact-edit-row,
  .contact-edit-row.new-contact,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .import-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .import-row.enhanced > div,
  .import-row.enhanced > span {
    grid-column: 2;
  }

  .import-row small {
    grid-column: 2;
  }

  .progress-row {
    grid-template-columns: 1fr;
  }

  .maintenance-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

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

  .form-actions .primary-btn,
  .form-actions .danger-btn,
  .console-actions .primary-btn {
    width: 100%;
  }
}

/* Aurora executive console: selected visual direction for the working sales system. */
:root {
  --bg: #eef4fb;
  --surface: rgba(255, 255, 255, .9);
  --surface-strong: #ffffff;
  --surface-soft: #f7faff;
  --ink: #10213d;
  --muted: #657692;
  --subtle: #93a4bc;
  --line: #dbe5f1;
  --line-strong: #c9d8e9;
  --blue: #146ce5;
  --blue-soft: #e9f2ff;
  --green: #10986d;
  --green-soft: #e8f8f1;
  --amber: #b87915;
  --amber-soft: #fff5dd;
  --red: #d64a47;
  --red-soft: #fff0ef;
  --shadow: 0 22px 55px rgba(25, 57, 91, .11);
  --shadow-soft: 0 10px 30px rgba(35, 67, 102, .08);
  --radius: 14px;
}

body {
  background: #eef4fb;
}

.sidebar {
  border-right-color: #d9e4f0;
  background: rgba(248, 251, 255, .92);
  box-shadow: 12px 0 34px rgba(42, 71, 105, .04);
}

.brand-mark {
  border-radius: 14px;
  background: #10213d;
  box-shadow: 0 14px 25px rgba(16, 33, 61, .2);
}

.nav-item {
  min-height: 42px;
  border-radius: 10px;
}

.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(20, 108, 229, .08);
}

.main {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 45%, #e9f1fa 100%);
}

.topbar small,
.eyebrow {
  letter-spacing: .04em;
}

.search,
.ghost-btn,
.primary-btn,
.panel,
.metric,
.list-card,
.detail-card,
.target-card {
  border-color: #dbe5f1;
}

.primary-btn {
  box-shadow: 0 10px 22px rgba(20, 108, 229, .2);
}

.panel,
.metric,
.list-card,
.detail-card,
.target-card {
  background: rgba(255, 255, 255, .92);
}

.customer-hero {
  position: relative;
  min-height: 260px;
  color: #f7fbff;
  border-bottom-color: rgba(139, 205, 255, .26);
  background: #08244e url("assets/aurora-energy-hero.png") center / cover no-repeat;
}

.customer-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(5, 24, 54, .36);
  pointer-events: none;
}

.customer-hero > * {
  position: relative;
  z-index: 1;
}

.customer-hero h2,
.customer-hero p {
  color: #f7fbff;
}

.customer-hero p {
  color: rgba(232, 246, 255, .86);
}

.customer-hero .eyebrow {
  color: #86dcff;
}

.customer-hero .ghost-btn {
  color: #f5fbff;
  border-color: rgba(218, 243, 255, .54);
  background: rgba(4, 25, 55, .42);
}

.customer-hero .danger-btn {
  color: #fff2f1;
  border-color: rgba(255, 176, 169, .54);
  background: rgba(118, 30, 31, .36);
}

.ring {
  box-shadow: 0 0 0 1px rgba(150, 223, 255, .26), 0 16px 35px rgba(0, 10, 30, .24);
  background: radial-gradient(circle closest-side, #0a2c55 71%, transparent 72%), conic-gradient(#56d7ff var(--value), rgba(196, 230, 255, .18) 0);
}

.ring strong,
.ring span {
  color: #fff;
}

.ring span { color: #a7d8ed; }

.customer-row {
  padding: 13px;
  border-radius: 11px;
  transition: .18s ease;
}

.customer-row:hover {
  border-color: #9bc7ff;
  background: #f4f9ff;
}

.customer-row.active {
  border-color: #2b80ee;
  background: #edf5ff;
  box-shadow: 0 8px 20px rgba(20, 108, 229, .12);
}

.customer-row-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.customer-row-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.customer-row-main > span:last-child {
  color: var(--blue);
  font-weight: 900;
}

.customer-logo {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d7e3f1;
  border-radius: 10px;
  color: #1a6ede;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.customer-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  background: #fff;
}

.customer-row-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.customer-row-foot b {
  color: #45617d;
  font-size: 12px;
}

.intelligence-page {
  display: grid;
  gap: 18px;
}

.intelligence-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 172px;
  padding: 28px 30px;
  border: 1px solid #b9d8fb;
  border-radius: 18px;
  color: #f3faff;
  background: #082750 url("assets/aurora-energy-hero.png") center right / cover no-repeat;
  box-shadow: 0 18px 38px rgba(17, 72, 132, .18);
}

.intelligence-hero h2 {
  margin: 6px 0 8px;
  color: #fff;
  font-size: 38px;
  line-height: 1;
}

.intelligence-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(231, 246, 255, .87);
}

.intelligence-hero .eyebrow { color: #7de3ff; }
.intelligence-hero .ghost-btn { color: #fff; border-color: rgba(225, 244, 255, .52); background: rgba(4, 30, 61, .35); }
.intelligence-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.intelligence-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }

.important-event-list { display: grid; gap: 12px; }
.important-event-card {
  padding: 16px;
  border: 1px solid #dbe7f4;
  border-left: 4px solid #1d7eea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(29, 71, 118, .05);
}
.important-event-card.closed { border-left-color: #57a987; opacity: .78; }
.event-card-top { display: flex; align-items: center; gap: 8px; }
.event-card-top small { margin-left: auto; color: #74869b; font-size: 12px; font-weight: 750; }
.event-level { padding: 4px 7px; border-radius: 6px; font-size: 11px; font-weight: 900; }
.event-level.high { color: #c13d3d; background: #fff0ef; }
.event-level.medium { color: #b76d15; background: #fff8e9; }
.event-level.low { color: #168464; background: #eaf8f2; }
.event-card-main { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; }
.event-card-main h3 { margin: 0; color: #172641; font-size: 17px; }
.event-card-main p { max-width: 680px; margin: 7px 0 0; color: #60738b; line-height: 1.6; }
.event-card-meta { display: grid; align-content: start; gap: 5px; min-width: 148px; color: #60738b; font-size: 12px; text-align: right; }
.event-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 12px; border-top: 1px solid #e6eef6; }
.event-card-foot > div:first-child { display: flex; align-items: center; gap: 8px; color: #71839a; font-size: 12px; }
.event-customer-link { padding: 0; border: 0; color: #176fd9; background: transparent; font-weight: 850; }
.event-actions { display: flex; gap: 8px; }
.event-empty { min-height: 150px; display: grid; place-items: center; text-align: center; }

.profile-queue-shell {
  padding: 20px;
  border: 1px solid #d8e5f3;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
}

.profile-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-queue-head .primary-btn:disabled {
  cursor: default;
  opacity: .46;
}

.profile-queue-filters {
  display: flex;
  gap: 7px;
  margin: 17px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-queue-filters::-webkit-scrollbar { display: none; }
.profile-queue-filters button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #6f7f94;
  background: #f6f8fb;
  font-size: 12px;
  font-weight: 850;
}
.profile-queue-filters button span { margin-left: 5px; color: #9aa7b8; }
.profile-queue-filters button.active { border-color: #b9d8fb; color: #176fd9; background: #eaf4ff; }

.profile-queue-list { display: grid; gap: 8px; }
.profile-queue-row {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(280px, 1.2fr) 72px 90px;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #e2eaf3;
  border-radius: 11px;
  background: #fbfdff;
}
.profile-queue-row:hover { border-color: #b9d8fb; background: #f8fbff; }
.profile-queue-customer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0;
  text-align: left;
  background: transparent;
}
.profile-queue-customer > span:last-child { min-width: 0; }
.profile-queue-customer strong,
.profile-queue-customer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-queue-customer strong { color: #223650; font-size: 13px; }
.profile-queue-customer small { margin-top: 3px; color: #8190a4; font-size: 11px; }

.rating-pill {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 5px 6px;
  border-radius: 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 950;
}
.rating-pill.rating-s { color: #0d70d4; background: #e5f2ff; }
.rating-pill.rating-a { color: #0b936b; background: #e6f7f0; }

.queue-status { font-size: 11px; font-weight: 850; text-align: center; }
.queue-status.status-new { color: #a56a19; }
.queue-status.status-active { color: #176fd9; }
.queue-status.status-done { color: #17906d; }
.queue-action {
  min-height: 30px;
  border: 1px solid #b9d8fb;
  border-radius: 8px;
  color: #176fd9;
  background: #edf6ff;
  font-size: 11px;
  font-weight: 850;
}
.queue-action.complete { color: #fff; border-color: #1f91dc; background: #1f83da; }
.queue-action.done { color: #178664; border-color: #c9e8dc; background: #edf9f4; }

.insight-list { display: grid; gap: 8px; }
.insight-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; background: transparent; }
.insight-list button:last-child { border-bottom: 0; }
.insight-list button:hover strong, .insight-list button:hover span { color: var(--blue); }
.insight-list span { color: var(--muted); font-size: 13px; font-weight: 800; }
.insight-list strong { font-size: 17px; }
.insight-list small { grid-column: 1 / -1; color: var(--muted); }
.alert-list button strong { color: var(--amber); font-size: 14px; }

.product-center-shell { display: grid; gap: 18px; min-width: 0; }
.product-center-nav {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 22px 24px; border: 1px solid rgba(78, 133, 196, .18);
  background: rgba(255, 255, 255, .82); box-shadow: 0 14px 36px rgba(58, 105, 158, .08);
}
.product-center-nav h2, .product-center-nav p { margin: 0; }
.product-center-nav h2 { margin-top: 5px; color: #12213a; font-size: 26px; }
.product-center-nav p { margin-top: 7px; color: #6f8098; font-size: 13px; }
.product-center-tabs { display: flex; gap: 6px; padding: 5px; border: 1px solid #d8e3f0; border-radius: 8px; background: #f4f8fc; }
.product-center-tabs button {
  min-height: 38px; padding: 0 15px; border: 0; border-radius: 6px;
  color: #61728a; background: transparent; font-weight: 800; cursor: pointer;
}
.product-center-tabs button span { margin-left: 5px; color: #8d9caf; font-size: 11px; }
.product-center-tabs button.active { color: #fff; background: #1674e8; box-shadow: 0 5px 14px rgba(22, 116, 232, .22); }
.product-center-tabs button.active span { color: rgba(255, 255, 255, .76); }
.product-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #dbe6f2; background: rgba(255, 255, 255, .78); }
.product-kpi-strip article { min-width: 0; padding: 18px 20px; border-right: 1px solid #e3ebf4; }
.product-kpi-strip article:last-child { border-right: 0; }
.product-kpi-strip span, .product-kpi-strip strong, .product-kpi-strip small { display: block; }
.product-kpi-strip span { color: #6f8098; font-size: 12px; font-weight: 750; }
.product-kpi-strip strong { margin-top: 5px; color: #132039; font-size: 25px; }
.product-kpi-strip small { margin-top: 4px; overflow: hidden; color: #8997a9; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-center-shell .product-workspace { min-height: calc(100vh - 325px); }

.competitor-filter-bar {
  display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(130px, .72fr)) auto;
  gap: 10px; align-items: end; padding: 14px; border: 1px solid #dbe6f2; background: rgba(255, 255, 255, .86);
}
.competitor-filter-bar form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.competitor-filter-bar label, .competitor-filter-bar form label { display: grid; gap: 6px; min-width: 0; }
.competitor-filter-bar label > span { color: #76869c; font-size: 11px; font-weight: 800; }
.competitor-filter-bar input, .competitor-filter-bar select {
  width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid #d7e1ed;
  border-radius: 6px; color: #263650; background: #fbfdff; outline: none;
}
.competitor-filter-bar input:focus, .competitor-filter-bar select:focus { border-color: #6aabf7; box-shadow: 0 0 0 3px rgba(22, 116, 232, .1); }
.competitor-workspace {
  display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.25fr);
  min-height: 680px; border: 1px solid #dbe6f2; background: rgba(255, 255, 255, .84);
}
.competitor-results, .competitor-detail { min-width: 0; padding: 20px; }
.competitor-results { border-right: 1px solid #dfe8f2; }
.competitor-results .section-head { min-height: 50px; }
.competitor-list { display: grid; gap: 8px; max-height: 620px; padding-right: 6px; overflow: auto; }
.competitor-row {
  display: grid; grid-template-columns: 24px 42px minmax(0, 1fr) auto; gap: 11px; align-items: center;
  padding: 13px 14px; border: 1px solid #e0e8f2; border-radius: 7px; background: #fff; cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.competitor-row:hover, .competitor-row.active { border-color: #87bdf8; background: #f3f8ff; }
.competitor-row:hover { transform: translateY(-1px); }
.competitor-check { display: grid; place-items: center; }
.competitor-check input { width: 16px; height: 16px; accent-color: #1674e8; }
.competitor-brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d5e4f5;
  border-radius: 7px; color: #176ed8; background: #edf6ff; font-size: 12px; font-weight: 900;
}
.competitor-row-main { min-width: 0; }
.competitor-row-main > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.competitor-row-main strong { overflow: hidden; color: #18253c; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-row-main span { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; color: #1570d9; background: #eaf4ff; font-size: 10px; font-weight: 850; }
.competitor-row-main p { margin: 5px 0 0; overflow: hidden; color: #75849a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-row-state { text-align: right; }
.competitor-row-state strong, .competitor-row-state small { display: block; }
.competitor-row-state strong { color: #0a9b73; font-size: 12px; }
.competitor-row-state small { margin-top: 4px; color: #94a0b1; font-size: 10px; }
.competitor-detail { align-self: start; position: sticky; top: 0; }
.competitor-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 0 22px; border-bottom: 1px solid #e1e9f2; }
.competitor-detail-head h2, .competitor-detail-head p { margin: 0; }
.competitor-detail-head h2 { margin-top: 6px; color: #122039; font-size: 29px; }
.competitor-detail-head p { max-width: 680px; margin-top: 9px; color: #6f8096; font-size: 13px; line-height: 1.7; }
.competitor-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 20px 0; }
.competitor-spec-grid article { min-width: 0; padding: 14px; border: 1px solid #e0e8f2; border-radius: 6px; background: #fbfdff; }
.competitor-spec-grid span, .competitor-spec-grid strong { display: block; }
.competitor-spec-grid span { color: #7a899e; font-size: 11px; }
.competitor-spec-grid strong { margin-top: 7px; overflow-wrap: anywhere; color: #192941; font-size: 15px; }
.competitor-source { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-left: 3px solid #1674e8; background: #f2f8ff; }
.competitor-source span, .competitor-source strong, .competitor-source small { display: block; }
.competitor-source span { color: #74869d; font-size: 11px; }
.competitor-source strong { margin-top: 4px; color: #1a2b45; }
.competitor-source small { margin-top: 3px; color: #8a98aa; font-size: 10px; }
.competitor-source a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; text-decoration: none; }
.competitor-compare-dock {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 16px 20px; border: 1px solid #d6e3f1; background: #fff; box-shadow: 0 12px 30px rgba(42, 90, 144, .09);
}
.competitor-compare-dock > div:first-child { min-width: 0; }
.competitor-compare-dock strong, .competitor-compare-dock span { display: block; }
.competitor-compare-dock > div:first-child > strong { color: #182740; }
.competitor-compare-dock > div:first-child > span { margin-top: 4px; overflow: hidden; color: #78889d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-compare-table { grid-column: 1 / -1; overflow-x: auto; border-top: 1px solid #e1e9f3; }
.competitor-compare-table > div { display: grid; grid-template-columns: 120px repeat(var(--compare-count, 4), minmax(160px, 1fr)); min-width: 620px; }
.competitor-compare-table > div > * { padding: 11px 12px; border-right: 1px solid #e4ebf3; border-bottom: 1px solid #e4ebf3; }
.competitor-compare-table > div > *:last-child { border-right: 0; }
.competitor-compare-table span { color: #78889e; font-size: 11px; font-weight: 750; }
.competitor-compare-table strong { color: #1b2b43; font-size: 12px; }
.competitor-compare-table strong small { display: block; margin-top: 4px; color: #7b8a9e; font-size: 10px; font-weight: 600; }
.competitor-compare-table .compare-head { background: #f5f9fd; }
.competitor-subpage .subpage-body { max-width: 1180px; }

@media (max-width: 1180px) {
  .intelligence-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-grid { grid-template-columns: 1fr; }
  .profile-queue-row { grid-template-columns: minmax(220px, .8fr) minmax(240px, 1.2fr) 72px 90px; }
  .competitor-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competitor-filter-bar form { grid-column: 1 / -1; }
  .competitor-workspace { grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr); }
}

@media (max-width: 820px) {
  .intelligence-hero { display: grid; align-items: start; min-height: 220px; padding: 22px; }
  .intelligence-hero h2 { font-size: 30px; }
  .intelligence-metrics { grid-template-columns: 1fr; }
  .event-card-main,
  .event-card-foot { align-items: flex-start; flex-direction: column; }
  .event-card-meta { min-width: 0; text-align: left; }
  .event-actions { width: 100%; }
  .event-actions button { flex: 1; }
  .profile-queue-head { align-items: stretch; flex-direction: column; }
  .profile-queue-row { grid-template-columns: 1fr auto; }
  .profile-queue-row .profile-missing-tags { grid-column: 1 / -1; }
  .profile-queue-row .queue-status { text-align: left; }
  .product-center-nav { align-items: stretch; flex-direction: column; }
  .product-center-tabs { width: 100%; }
  .product-center-tabs button { flex: 1; }
  .product-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-kpi-strip article:nth-child(2) { border-right: 0; }
  .product-kpi-strip article:nth-child(-n+2) { border-bottom: 1px solid #e3ebf4; }
  .competitor-filter-bar { grid-template-columns: 1fr; }
  .competitor-filter-bar form { grid-column: auto; }
  .competitor-workspace { grid-template-columns: 1fr; }
  .competitor-results { border-right: 0; border-bottom: 1px solid #dfe8f2; }
  .competitor-detail { position: static; }
  .competitor-detail-head, .competitor-source { align-items: stretch; flex-direction: column; }
  .competitor-spec-grid { grid-template-columns: 1fr; }
  .competitor-compare-dock { grid-template-columns: 1fr; }
}

.side-account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(151, 178, 209, .24);
  border-radius: 6px;
  color: #dcecff;
  background: rgba(255, 255, 255, .04);
  text-align: left;
}
.side-account > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #06182d;
  background: #71d8ff;
  font-weight: 900;
}
.side-account strong,
.side-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account strong { font-size: 12px; }
.side-account small { margin-top: 3px; color: #88a1bb; font-size: 10px; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(360px, .8fr);
  min-height: 100vh;
  color: #eaf6ff;
  background:
    linear-gradient(120deg, rgba(7, 29, 55, .96), rgba(4, 17, 34, .98)),
    url("assets/aurora-energy-hero.png") center / cover;
}
body.auth-mode #app { display: block; }
.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 120px);
  border-right: 1px solid rgba(120, 202, 255, .16);
}
.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  border: 1px solid rgba(119, 218, 255, .5);
  border-radius: 6px;
  color: #03192f;
  background: #69d6ff;
  box-shadow: 0 0 30px rgba(57, 184, 255, .25);
  font-size: 28px;
  font-weight: 950;
}
.auth-brand > span { color: #69d6ff; font-size: 12px; font-weight: 850; letter-spacing: 2px; }
.auth-brand h1 { max-width: 760px; margin: 22px 0 18px; font-size: clamp(38px, 5vw, 72px); line-height: 1.08; letter-spacing: 0; }
.auth-brand p { max-width: 620px; margin: 0; color: #9db4ca; font-size: 16px; line-height: 1.8; }
.auth-capabilities { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.auth-capabilities span { padding: 8px 11px; border: 1px solid rgba(109, 209, 255, .22); border-radius: 4px; color: #b8d8ed; background: rgba(25, 83, 128, .18); font-size: 11px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: rgba(2, 12, 25, .62); }
.auth-form { width: min(420px, 100%); padding: 34px; border: 1px solid rgba(122, 190, 234, .22); border-radius: 8px; background: rgba(9, 28, 49, .88); box-shadow: 0 24px 80px rgba(0, 0, 0, .32); }
.auth-form h2 { margin: 8px 0 6px; font-size: 30px; }
.auth-form > div > p { margin: 0 0 26px; color: #8fa7bd; line-height: 1.6; }
.auth-form label { display: grid; gap: 8px; margin-top: 16px; color: #b8cce0; font-size: 12px; font-weight: 750; }
.auth-form input { width: 100%; padding: 13px 14px; border: 1px solid #294866; border-radius: 5px; outline: none; color: #eaf7ff; background: #071a2d; }
.auth-form input:focus { border-color: #55c9ff; box-shadow: 0 0 0 3px rgba(72, 190, 255, .12); }
.auth-form button { margin-top: 22px; }
.auth-form > small { display: block; margin-top: 14px; color: #71899f; line-height: 1.6; text-align: center; }
.auth-error { margin-top: 16px; padding: 10px 12px; border-left: 3px solid #ff6b73; color: #ffc8cc; background: rgba(178, 42, 57, .16); font-size: 12px; }
.auth-notice { margin-top: 16px; padding: 10px 12px; border-left: 3px solid #42d6a4; color: #bdf7df; background: rgba(31, 148, 111, .16); font-size: 12px; }
.auth-form .auth-switch {
  width: 100%;
  margin-top: 10px;
  border: 0;
  color: #78d7ff;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}
.invite-recognized {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(79, 207, 162, .3);
  border-radius: 5px;
  background: rgba(23, 119, 88, .14);
}
.invite-recognized strong { color: #a8f0d5; font-size: 12px; }
.invite-recognized span { color: #7fae9e; font-size: 11px; line-height: 1.5; }

.team-page { display: grid; gap: 18px; }
.team-hero { min-height: 210px; }
.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.team-main { display: grid; gap: 18px; min-width: 0; }
.unit-panel {
  overflow: hidden;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 78, 122, .06);
}
.unit-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 20px 22px;
  border-bottom: 1px solid #e3ebf3;
}
.unit-panel-head h3 { margin: 5px 0 4px; font-size: 20px; }
.unit-panel-head p { margin: 0; color: #708197; font-size: 11px; line-height: 1.6; }
.unit-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 116px auto;
  gap: 8px;
  width: min(520px, 56%);
}
.unit-create-form input,
.unit-card input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d3deeb;
  border-radius: 5px;
  color: #13233b;
  background: #fff;
}
.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}
.unit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 11px;
  padding: 15px;
  border: 1px solid #dee8f2;
  border-radius: 6px;
  background: #f9fbfd;
}
.unit-card-title {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
}
.unit-card-title > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #bfe4f7;
  border-radius: 5px;
  color: #075a8d;
  background: #e5f6ff;
  font-weight: 900;
}
.unit-card-title strong,
.unit-card-title small { display: block; }
.unit-card-title small { margin-top: 3px; color: #7a8a9e; font-size: 10px; }
.unit-card label { display: grid; gap: 5px; color: #62748a; font-size: 10px; font-weight: 750; }
.unit-card-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}
.unit-card-actions .ghost-btn { min-height: 34px; padding: 7px 13px; }
.unit-empty { padding: 28px; color: #77889b; text-align: center; font-size: 12px; }
.team-invite-panel {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 78, 122, .08);
}
.team-invite-form { display: grid; gap: 14px; }
.team-invite-form h3 { margin: 6px 0; font-size: 20px; }
.team-invite-form p { margin: 0 0 8px; color: #6e7f94; font-size: 12px; line-height: 1.6; }
.team-invite-form label { display: grid; gap: 7px; color: #465a72; font-size: 12px; font-weight: 750; }
.team-invite-form input,
.team-invite-form select,
.team-table select,
.invite-result input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d3deeb;
  border-radius: 5px;
  color: #13233b;
  background: #fff;
}
.team-table select { min-width: 126px; min-height: 34px; padding: 6px 9px; }
.team-table select:disabled { color: #7a899b; background: #f3f6f9; }
.team-error {
  padding: 12px 14px;
  border-left: 3px solid #e94e5a;
  color: #8c2830;
  background: #fff1f2;
  font-size: 12px;
}
.team-loading { padding: 28px; color: #6e7f94; text-align: center; }
.member-identity { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.member-identity > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #0b4574;
  background: #dff3ff;
  font-weight: 900;
}
.member-identity strong,
.member-identity small { display: block; }
.member-identity small { margin-top: 3px; color: #7b8a9d; font-size: 11px; }
.table-muted { color: #8a99aa; font-size: 11px; }
.danger-text { border: 0; color: #c83d48; background: transparent; font-size: 12px; font-weight: 750; }
.invite-result {
  display: grid;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid #e2eaf2;
}
.invite-result > span { color: #16885f; font-size: 11px; font-weight: 850; }
.invite-result > strong { color: #13233b; }
.invite-result p { margin: 0; color: #6e7f94; font-size: 11px; }
.invite-result input { color: #4e627a; background: #f7fafc; font-size: 11px; }
.permission-guide { padding-top: 14px; border-top: 1px solid #e2eaf2; }
.permission-guide h4 { margin: 0 0 10px; }
.permission-guide p { margin: 7px 0; color: #6d7e91; font-size: 11px; line-height: 1.5; }
.permission-guide strong { color: #263d58; }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 42vh; padding: 36px 24px; border-right: 0; border-bottom: 1px solid rgba(120, 202, 255, .16); }
  .auth-brand h1 { font-size: 38px; }
  .auth-panel { padding: 24px; }
  .auth-form { padding: 26px 22px; }
  .team-layout { grid-template-columns: 1fr; }
  .team-invite-panel { position: static; }
  .unit-panel-head { align-items: stretch; flex-direction: column; }
  .unit-create-form { grid-template-columns: 1fr; width: 100%; }
  .unit-grid { grid-template-columns: 1fr; }
}
