:root {
  --bg: #f2f5f7;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --ink: #17202a;
  --muted: #647284;
  --line: #dce3ea;
  --nav: #102436;
  --nav-soft: #18354e;
  --blue: #1267b1;
  --teal: #168b87;
  --amber: #c47b13;
  --red: #b94040;
  --green: #287a46;
  --shadow: 0 18px 45px rgba(22, 35, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.booting .login-view,
body.booting .app-shell {
  visibility: hidden;
}

body:not(.booting) .boot-screen {
  display: none;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.boot-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.boot-card img {
  width: 170px;
  max-width: 42vw;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

button {
  cursor: pointer;
}

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

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(20px, 6vw, 82px);
  overflow: hidden;
  background: #eef3f6;
}

.login-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(112deg, rgba(8, 30, 46, 0.98) 0%, rgba(14, 54, 72, 0.96) 48%, rgba(239, 244, 247, 0.98) 48.1%, rgba(239, 244, 247, 0.98) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 22px);
}

.login-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 17, 28, 0.16), rgba(4, 17, 28, 0) 44%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 120px);
  pointer-events: none;
}

.login-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 700px;
  color: #fff;
  padding: 24px 0;
}

.login-copy p {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.login-copy h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 0.98;
}

.login-copy::after {
  content: "CRM operativo para equipos comerciales";
  display: inline-flex;
  margin-top: 28px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
}

.login-card {
  position: relative;
  z-index: 2;
  grid-column: 2;
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(16, 36, 54, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 76px rgba(10, 25, 38, 0.24);
  backdrop-filter: blur(18px);
}

.login-card img {
  width: 156px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 36, 54, 0.1);
}

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

.login-card h1,
.topbar h1,
.modal-card h2 {
  margin-bottom: 0;
}

.login-card h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 138px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 103, 177, 0.14);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 850;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(18, 103, 177, 0.22);
}

.primary-button:hover {
  background: #0d5798;
}

.secondary-button {
  background: #fff;
  color: #18354e;
  border-color: var(--line);
}

.pin-button.is-pinned {
  border-color: #f2b84b;
  background: #fff8e8;
  color: #9a5a00;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  background: #d9e2ec;
  color: #64748b;
  border-color: #cbd5e1;
  box-shadow: none;
  opacity: 1;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.whatsapp-button:hover {
  background: #12813d;
}

.vicidial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.vicidial-button:hover {
  background: #115e59;
}

.vicidial-button.is-calling,
.vicidial-button:disabled {
  cursor: wait;
  background: #c47b13;
  color: #fff;
  opacity: 1;
}

.ghost-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--panel-soft);
  color: var(--ink);
  border-color: var(--line);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
  background: var(--nav);
  color: #fff;
}

.brand {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.brand img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.brand strong,
.brand span,
.session-card strong,
.session-card span {
  display: block;
}

.brand span,
.session-card span {
  margin-top: 3px;
  color: #c2d3df;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #d7e5ed;
  text-align: left;
  font-weight: 820;
}

.nav-button:hover,
.nav-button.active {
  color: #fff;
  border-color: rgba(22, 139, 135, 0.78);
  background: var(--nav-soft);
}

.session-card {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #173149;
  position: sticky;
  bottom: 20px;
  z-index: 2;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

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

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
}

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

.panel-logout-button {
  display: none;
}

.notice-button span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 7px;
  border-radius: 999px;
  background: #e8f5f4;
  color: var(--teal);
  font-size: 12px;
}

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

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

.panel-role .panel-monitor-metrics {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

#dashboardView > .dashboard-metrics {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.timing-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.timing-panel.is-active {
  border-color: #acd9d7;
  background: #f2fbfa;
}

.timing-panel h2,
.timing-panel p {
  margin: 0;
}

.timing-panel p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 750;
}

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

.jumbo-button {
  min-height: 58px;
  padding-inline: 28px;
  font-size: 18px;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cfe0ef;
  border-radius: 999px;
  background: #f4f8fc;
  color: #1d3750;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 900;
}

.timer-badge.running {
  border-color: #b8ddd9;
  background: #edf8f6;
  color: var(--teal);
}

.timer-badge.manage.running {
  border-color: #f1d59e;
  background: #fff6df;
  color: #b87005;
}

.dual-timers {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.card-status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.advisor-cell,
.client-cell {
  display: grid;
  gap: 5px;
  align-items: start;
}

.client-cell {
  justify-items: start;
}

.managing-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f8f1;
  color: #12805c;
  font-size: 11px;
  font-weight: 950;
  animation: softPulse 1.2s ease-in-out infinite;
}

.managing-badge.in-call {
  background: #fff3df;
  color: #b45309;
}

.metric-card,
.panel,
.record-card,
.advisor-card,
.schema-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin-top: 9px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

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

.panel {
  padding: 18px;
}

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

.section-title h2 {
  margin-bottom: 0;
}

.toolbar,
.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.building-search-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

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

.edit-grid,
.advisor-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

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

.checkbox-panel {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.checkbox-panel legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 8px;
}

.checkbox-item {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.checkbox-item input {
  width: auto;
  min-height: auto;
}

.checkbox-item.is-disabled {
  color: var(--muted);
  background: #eef3f7;
  opacity: 0.72;
}

.checkbox-item.is-disabled input {
  cursor: not-allowed;
}

.baserec-advisor-filter {
  margin-top: 10px;
}

.checkbox-panel > .muted-text {
  margin: 0 0 10px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.coverage-validator {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.coverage-validator .secondary-button {
  min-height: 36px;
}

.coverage-check-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.coverage-check-form-admin {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.coverage-check-form-admin .button-row {
  grid-column: 1 / -1;
}

.coverage-submit {
  min-height: 56px;
  padding-inline: 24px;
  font-size: 18px;
}

.coverage-address-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.coverage-address-result {
  justify-content: flex-start;
  min-height: 42px;
  text-align: left;
  white-space: normal;
}

.coverage-check-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(460px, 1.28fr);
  gap: 18px;
  align-items: start;
}

.coverage-result-panel,
.coverage-map-panel {
  min-height: 100%;
}

.coverage-result-buttons {
  display: grid;
  gap: 12px;
}

.coverage-big-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: #647284;
  font-weight: 900;
}

.coverage-big-button strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.coverage-big-button small {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  display: grid;
  gap: 4px;
}

.coverage-big-button.active {
  border-color: #9ed8c5;
  background: #eaf7ef;
  color: #287a46;
  box-shadow: 0 14px 28px rgba(40, 122, 70, 0.12);
}

.coverage-big-button.active strong,
.coverage-big-button.active small {
  color: #287a46;
}

.coverage-big-button.no-coverage.active {
  border-color: #f0c8c8;
  background: #fff5f5;
}

.coverage-big-button.no-coverage.active strong,
.coverage-big-button.no-coverage.active small {
  color: var(--red);
}

.coverage-big-button.win-params-blue,
.coverage-big-button.win-params-outside {
  border-color: #9cc7e8;
  background: #eef7fd;
}

.coverage-big-button.win-params-blue strong,
.coverage-big-button.win-params-blue small,
.coverage-big-button.win-params-outside strong,
.coverage-big-button.win-params-outside small {
  color: #1267b1;
}

.coverage-big-button.win-params-red {
  border-color: #f0c8c8;
  background: #fff5f5;
}

.coverage-big-button.win-params-red strong,
.coverage-big-button.win-params-red small {
  color: var(--red);
}

.win-fraud-warning {
  color: #b35c00;
  font-weight: 900;
}

.coverage-big-button.active .win-fraud-warning {
  color: #8a5200;
}

.coverage-summary {
  justify-self: start;
}

.coverage-map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.coverage-leaflet-map {
  width: 100%;
  min-height: 520px;
  background: #edf3f7;
}

.coverage-map-placeholder {
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.coverage-map-panel .leaflet-container {
  font: inherit;
}

.coverage-map-panel .leaflet-tooltip {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(17, 32, 47, 0.16);
}

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

.building-result-card header {
  align-items: flex-start;
  gap: 16px;
}

.building-result-card header p {
  margin: 6px 0 0;
}

.building-operator-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.building-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.building-provider-detail {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.building-provider-detail small {
  color: var(--muted);
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.baserec-results .table-wrap {
  max-height: 58vh;
}

.baserec-pagination {
  align-items: center;
  margin: 8px 0;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7fa;
  color: #425160;
  font-size: 12px;
  text-transform: uppercase;
}

tr:hover td {
  background: #fbfdff;
}

#reportsView .table-wrap th:not(:first-child),
#reportsView .table-wrap td:not(:first-child),
.summary-number-table .table-wrap th:not(:first-child),
.summary-number-table .table-wrap td:not(:first-child) {
  text-align: center;
  vertical-align: middle;
}

#reportsView .table-wrap th:first-child,
#reportsView .table-wrap td:first-child,
.summary-number-table .table-wrap th:first-child,
.summary-number-table .table-wrap td:first-child {
  text-align: left;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4fa;
  color: #19364e;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.ok {
  background: #eaf7ef;
  color: var(--green);
}

.pill.warn {
  background: #fff4df;
  color: var(--amber);
}

.pill.bad {
  background: #faeeee;
  color: var(--red);
}

.pill.info {
  background: #eaf4fd;
  color: var(--blue);
}

.pill.result {
  min-height: 28px;
  border: 1px solid rgba(25, 54, 78, 0.08);
  box-shadow: 0 8px 18px rgba(11, 28, 45, 0.06);
}

.result-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.result-time {
  color: #687789;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.result-time.muted {
  color: #9aa6b3;
}

.inline-select {
  width: min(150px, 100%);
  min-height: 32px;
  padding: 6px 28px 6px 9px;
  border-radius: 999px;
  background-color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.coverage-select {
  width: min(122px, 100%);
}

.table-sort-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.table-sort-button.is-active {
  color: var(--blue);
}

.advisor-history {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 340px;
  overflow-x: auto;
  padding-bottom: 2px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.advisor-chip-with-date {
  display: inline-grid;
  flex: 0 0 auto;
  gap: 2px;
  justify-items: center;
}

.assignment-date {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.mini-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef7f6;
  color: #087a77;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.recent-tipifications {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.recent-tipification-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.recent-tipification-row strong {
  color: var(--ink);
}

.recent-tipification-advisor {
  min-height: 26px;
  max-width: 230px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.recent-tipification-delete {
  width: 22px;
  height: 22px;
  border: 1px solid #f0c8c8;
  border-radius: 999px;
  background: #fff5f5;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.muted-text {
  color: #687789;
  font-size: 13px;
  font-weight: 750;
}

.tip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.icon-button.tiny {
  width: 28px;
  min-height: 28px;
  border-radius: 8px;
  font-size: 12px;
}

.danger-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #f0c8c8;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  font-weight: 850;
}

.record-list,
.advisor-grid,
.timeline {
  display: grid;
  gap: 10px;
}

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

.map-grid {
  margin-top: 12px;
}

.map-card input {
  min-height: 38px;
}

.map-card .button-row {
  align-items: stretch;
}

.record-card,
.advisor-card,
.schema-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  box-shadow: none;
}

.record-card header,
.advisor-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.record-card p,
.advisor-card p,
.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.baserec-distribute-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.baserec-distribute-stat {
  display: grid;
  gap: 4px;
  min-height: 82px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.baserec-distribute-stat.is-primary {
  border-color: #b7dfc5;
  background: #edf9f1;
}

.baserec-distribute-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.baserec-distribute-stat strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.baserec-distribute-stat small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inbox-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.inbox-details strong {
  color: #425160;
}

.inbox-details .pill {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}

.inbox-details .full-line {
  flex-basis: 100%;
}

.new-lead-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #bcdedc;
  border-radius: 999px;
  background: #effaf9;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(22, 139, 135, 0.12);
  animation: softPulse 1.4s ease-in-out infinite;
}

.advisor-flow-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.advisor-announcement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #b9d8dc;
  border-radius: 8px;
  background: #f2fbfb;
  color: #12343f;
  box-shadow: 0 12px 26px rgba(16, 125, 132, 0.1);
  overflow: hidden;
}

.advisor-announcement > strong {
  color: var(--teal);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.advisor-announcement-window {
  min-width: 0;
  overflow: hidden;
}

.advisor-announcement-track {
  display: inline-flex;
  gap: 64px;
  min-width: max-content;
  white-space: nowrap;
  animation: advisorAnnouncementScroll 28s linear infinite;
}

.advisor-announcement-track span {
  font-size: 15px;
  font-weight: 900;
}

@keyframes advisorAnnouncementScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.advisor-flow-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: min(62vh, 560px);
  min-height: 360px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.advisor-flow-column-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.advisor-flow-column-header h2 {
  margin: 6px 0 0;
  font-size: 22px;
}

.advisor-flow-column-header > strong {
  margin-top: 28px;
  color: #526276;
  font-size: 18px;
}

.advisor-flow-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.advisor-flow-card,
.advisor-flow-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.advisor-flow-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.advisor-flow-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.advisor-flow-card header strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
}

.advisor-flow-card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.advisor-flow-card .card-status-stack {
  flex: 0 0 auto;
  max-width: 150px;
}

.advisor-flow-card .timer-badge {
  min-width: 94px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.advisor-flow-card .pill {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

.advisor-flow-card .button-row {
  gap: 8px;
}

.advisor-flow-card .primary-button,
.advisor-flow-card .secondary-button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
}

.advisor-flow-empty {
  padding: 18px;
  color: var(--muted);
  font-weight: 850;
}

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

.mini-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.mini-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

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

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #425160;
  font-size: 13px;
  font-weight: 820;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e7eef5;
  overflow: hidden;
}

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

.report-toolbar {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

tr.report-sale td {
  background: #f0fbf4;
}

td.report-screen {
  background: #dff7e8;
  color: #146c35;
  font-weight: 900;
}

tr.report-pending td {
  background: #fff8ea;
}

tr.report-total-row td {
  background: #f3f7fa;
  color: #17202a;
  font-weight: 900;
  border-top: 2px solid #cfd9e3;
}

.notice-tray {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.notification-toggle:disabled {
  cursor: default;
  opacity: 0.78;
}

.notice-card,
.toast {
  padding: 12px 14px;
  border: 1px solid #bcdedc;
  border-radius: 8px;
  background: #effaf9;
  color: #143d3b;
  box-shadow: 0 12px 26px rgba(22, 139, 135, 0.12);
}

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

.notice-card p,
.toast p {
  margin: 0;
}

.advisor-alerts {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.advisor-alert {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bcdedc;
  border-radius: 8px;
  background: #effaf9;
  color: #143d3b;
  text-align: left;
  box-shadow: 0 12px 26px rgba(22, 139, 135, 0.12);
  animation: softPulse 1.4s ease-in-out infinite;
}

.advisor-alert strong {
  flex: 0 0 auto;
  color: var(--teal);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.advisor-alert span {
  min-width: 0;
  font-size: 14px;
  font-weight: 850;
}

.advisor-alert.reminder {
  border-color: #f0d7a6;
  background: #fff8ea;
  color: #513914;
  box-shadow: 0 12px 26px rgba(196, 123, 19, 0.12);
}

.advisor-alert.reminder strong {
  color: var(--amber);
}

@keyframes softPulse {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px);
    filter: brightness(1.03);
  }
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  animation: rise 0.25s ease-out;
}

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

.modal {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.modal::backdrop {
  background: rgba(6, 19, 30, 0.54);
}

.modal.companion-host {
  max-height: calc(100dvh - 28px);
  overflow: visible;
}

.modal.companion-host .modal-card {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.modal.companion-host .modal-body {
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.modal.companion-host .modal-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.modal-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: #fff;
}

.modal-header,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.modal-danger-actions {
  display: grid;
  gap: 10px;
}

.modal-danger-actions .danger-button {
  width: 100%;
  justify-content: center;
}

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

.lead-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.modal-body.manager-edit {
  grid-template-columns: 1fr;
}

.modal-body.manager-edit .lead-summary {
  grid-column: auto;
}

.modal-body.manager-edit textarea {
  min-height: 96px;
}

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

.panel-role .sidebar {
  display: none;
}

.panel-role .workspace {
  min-height: 100vh;
  padding: 18px 28px 20px;
  font-size: 18px;
}

.panel-role .topbar {
  align-items: center;
  margin-bottom: 10px;
}

.panel-role .topbar h1 {
  display: none;
}

.panel-role .topbar h1 {
  font-size: clamp(42px, 5vw, 72px);
}

.panel-role .top-actions {
  display: none;
}

.panel-role .panel-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  font-size: 18px;
}

.panel-role .metric-card span,
.panel-role .metric-card p {
  font-size: 15px;
}

.panel-role .metric-card strong {
  margin-top: 6px;
  font-size: 44px;
}

.panel-role .metric-card {
  min-height: 86px;
  padding: 14px 16px;
}

.panel-role .metric-card small {
  margin-top: 5px;
  font-size: 13px;
}

.panel-role .view {
  gap: 12px;
}

.panel2-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 74px);
}

.panel2-live-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.panel2-role .panel-monitor-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.panel2-role .metric-card {
  min-width: 0;
  padding: 12px;
}

.panel2-role .metric-card span,
.panel2-role .metric-card p {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.panel2-role .metric-card strong {
  font-size: 36px;
}

.panel2-role .metric-card small {
  font-size: 11px;
}

.panel2-promotion {
  overflow: hidden;
  min-width: 0;
  min-height: calc(100vh - 74px);
  border: 1px solid #b9c8cd;
  border-radius: 6px;
  background: #006b35;
}

.panel2-promotion img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 76px);
  object-fit: contain;
  object-position: center top;
  background: #006b35;
}

.panel2-promotion-empty {
  display: grid;
  place-content: center;
  gap: 8px;
  height: 100%;
  min-height: calc(100vh - 76px);
  padding: 24px;
  color: white;
  text-align: center;
}

.panel2-promotion-empty span {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel2-promotion-empty strong {
  font-size: 32px;
}

.panel2-promotion-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.panel2-promotion-preview {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.panel2-promotion-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-tipification-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #0e7680;
  border-radius: 8px;
  background: #0f2f3a;
  color: white;
}

.ticker-title {
  flex: 0 0 auto;
  color: #67e8df;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ticker-window {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-single-track {
  width: 100%;
  animation: ticker-single-scroll 18s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.ticker-item strong {
  color: #ffffff;
}

.ticker-item span {
  color: #ffcf7a;
}

.ticker-empty {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.panel-sales-ticker {
  border-color: rgba(34, 197, 94, 0.55);
  background: #0d3425;
}

.panel-sales-ticker .ticker-title {
  color: #86efac;
}

.panel-sales-ticker .ticker-item {
  border-color: rgba(134, 239, 172, 0.28);
  background: rgba(34, 197, 94, 0.14);
}

.panel-sales-ticker .ticker-sale-item span {
  color: #22c55e;
}

.ticker-loop-gap {
  flex: 0 0 64vw;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes ticker-single-scroll {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(-100%);
  }
}

.panel-monitor .section-title h2 {
  font-size: 30px;
}

.panel-role .panel-monitor {
  padding: 14px 16px 16px;
}

.panel-role .panel-monitor .section-title {
  margin-bottom: 10px;
}

.panel-role .panel-monitor .eyebrow {
  margin-bottom: 5px;
}

.panel-monitor table {
  font-size: 20px;
}

.panel-monitor th,
.panel-monitor td {
  padding: 18px 16px;
}

.panel-monitor .pill,
.panel-monitor .timer-badge {
  font-size: 18px;
  padding: 10px 14px;
}

.panel-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020817;
}

.panel-video-overlay.is-hidden {
  display: none;
}

.panel-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.panel-audio-unlock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  border: 1px solid #9bd4d4;
  border-radius: 8px;
  padding: 12px 16px;
  background: #ecfeff;
  color: #0f3f46;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

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

.panel-managing-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.panel-managing-card header,
.panel-managing-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.panel-managing-card footer {
  padding-top: 2px;
}

.panel-managing-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-managing-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.panel-card-client strong {
  overflow: hidden;
  display: -webkit-box;
  min-height: 36px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-transform: uppercase;
}

.panel-card-timer {
  flex: 0 0 auto;
}

.panel-managing-card .timer-badge {
  min-width: 100px;
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.crm-companion {
  --companion-energy: 100%;
  --companion-energy-color: #35c879;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1600;
  width: 142px;
  height: 156px;
  pointer-events: none;
  contain: layout style;
}

.crm-companion.is-hidden {
  display: none;
}

.crm-companion.is-in-lead-modal {
  z-index: 2000;
}

.crm-companion-bubble {
  position: absolute;
  right: 92px;
  bottom: 116px;
  width: max-content;
  max-width: min(286px, calc(100vw - 174px));
  padding: 11px 13px;
  border: 1px solid #a9c9dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 39, 57, 0.18);
  color: #10273a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.crm-companion-bubble::after {
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #a9c9dc;
  border-bottom: 1px solid #a9c9dc;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.crm-companion-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.crm-companion-character {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 132px;
  height: 145px;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: 66px 136px;
}

.crm-companion[data-energy="steady"] {
  --companion-energy-color: #20b4bf;
}

.crm-companion[data-energy="hungry"] {
  --companion-energy-color: #e4a62b;
}

.crm-companion[data-energy="hungry"] .crm-companion-character {
  filter: saturate(0.82);
}

.crm-companion[data-energy="hungry"] .crm-companion-eye {
  height: 8px;
}

.crm-companion[data-energy="tired"] {
  --companion-energy-color: #df6454;
}

.crm-companion[data-energy="tired"] .crm-companion-character {
  filter: saturate(0.62) brightness(0.94);
}

.crm-companion[data-energy="tired"] .crm-companion-eye {
  top: 17px;
  height: 4px;
}

.crm-companion[data-energy="tired"] .crm-companion-brow {
  opacity: 0.58;
}

.crm-companion[data-energy="tired"] .crm-companion-brow.left {
  transform: rotate(-10deg);
}

.crm-companion[data-energy="tired"] .crm-companion-brow.right {
  transform: rotate(10deg);
}

.crm-companion[data-energy="tired"][data-state="idle"] .crm-companion-creature,
.crm-companion[data-energy="tired"][data-state="sitting"] .crm-companion-creature,
.crm-companion[data-energy="tired"][data-state="looking"] .crm-companion-creature {
  animation: companion-tired-breathe 1800ms ease-in-out infinite;
}

.crm-companion[data-energy="tired"][data-state="idle"] .crm-companion-mouth,
.crm-companion[data-energy="tired"][data-state="sitting"] .crm-companion-mouth {
  bottom: 4px;
  width: 13px;
  border-top: 3px solid #83ecff;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.crm-companion[data-state="checking-sale"] .crm-companion-device-screen,
.crm-companion[data-state="checking-sale"] .crm-companion-eye {
  animation: companion-check-sale 760ms ease-in-out infinite;
}

.crm-companion[data-state="checking-sale"] .crm-companion-arm.right {
  animation: companion-checklist-arm 720ms ease-in-out 5;
}

.crm-companion[data-state="pointing-zero"] .crm-companion-creature {
  animation: companion-point-bounce 850ms ease-in-out infinite;
}

.crm-companion[data-state="pointing-zero"]:not([data-point-direction="left"]) .crm-companion-arm.right,
.crm-companion[data-state="pointing-zero"][data-point-direction="right"] .crm-companion-arm.right {
  transform: translate(15px, -10px) rotate(-92deg);
}

.crm-companion[data-state="pointing-zero"][data-point-direction="left"] .crm-companion-arm.left {
  transform: translate(-15px, -10px) rotate(92deg);
}

.companion-sales-target {
  outline: 3px solid rgba(229, 166, 44, 0.75);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(229, 166, 44, 0.12), 0 14px 34px rgba(17, 39, 57, 0.16) !important;
  transition: outline-color 180ms ease, box-shadow 180ms ease;
}

.crm-companion.is-dragging .crm-companion-character {
  cursor: grabbing;
}

.crm-companion-shadow {
  position: absolute;
  left: 23px;
  bottom: 3px;
  width: 88px;
  height: 17px;
  border-radius: 50%;
  background: rgba(15, 34, 52, 0.2);
  filter: blur(2px);
  transform-origin: center;
}

.crm-companion-creature {
  position: absolute;
  top: 22px;
  left: 14px;
  z-index: 2;
  width: 104px;
  height: 110px;
  transform-origin: 50% 92%;
}

.crm-companion-creature::before {
  position: absolute;
  top: 0;
  left: 8px;
  z-index: 1;
  width: 88px;
  height: 64px;
  border: 3px solid #17334f;
  border-radius: 23px 23px 20px 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92) 0 13%, transparent 14%),
    linear-gradient(155deg, #eef7fa 0%, #d5e6ec 58%, #a9c7d2 100%);
  box-shadow:
    inset 0 -7px 9px rgba(41, 89, 113, 0.15),
    inset 5px 5px 7px rgba(255, 255, 255, 0.75),
    0 6px 10px rgba(15, 55, 82, 0.24);
  content: "";
}

.crm-companion-creature::after {
  position: absolute;
  top: 59px;
  left: 44px;
  z-index: 0;
  width: 17px;
  height: 13px;
  border: 3px solid #17334f;
  border-radius: 3px;
  background: #1d536f;
  content: "";
}

.crm-companion-ear {
  position: absolute;
  top: 18px;
  z-index: 2;
  width: 18px;
  height: 34px;
  border: 3px solid #153550;
  border-radius: 10px;
  background: linear-gradient(90deg, #138ca1, #37d5d3);
  box-shadow: inset 2px 0 4px rgba(255, 255, 255, 0.3);
}

.crm-companion-ear.left {
  left: 1px;
}

.crm-companion-ear.right {
  right: 1px;
}

.crm-companion-visor {
  position: absolute;
  top: 10px;
  left: 16px;
  z-index: 3;
  width: 72px;
  height: 45px;
  border: 4px solid #13b9bb;
  border-radius: 16px;
  background: linear-gradient(160deg, #183449 0%, #07131f 76%);
  box-shadow: inset 0 3px 5px rgba(112, 238, 255, 0.16), 0 2px 0 rgba(9, 41, 75, 0.28);
  overflow: hidden;
}

.crm-companion-visor::after {
  position: absolute;
  top: -13px;
  left: -4px;
  width: 92px;
  height: 26px;
  border-radius: 50%;
  background: rgba(105, 205, 255, 0.1);
  content: "";
  transform: rotate(-7deg);
}

.crm-companion-eye {
  position: absolute;
  top: 14px;
  z-index: 2;
  width: 8px;
  height: 11px;
  border-radius: 6px;
  background: #78e5ff;
  box-shadow: 0 0 7px rgba(82, 219, 255, 0.72);
  transform-origin: center;
}

.crm-companion-eye.left {
  left: 18px;
}

.crm-companion-eye.right {
  right: 18px;
}

.crm-companion-brow {
  position: absolute;
  top: 8px;
  z-index: 3;
  display: block;
  width: 15px;
  height: 3px;
  border-radius: 3px;
  background: #7cecff;
  opacity: 0;
  transform-origin: center;
}

.crm-companion-brow.left {
  left: 14px;
}

.crm-companion-brow.right {
  right: 14px;
}

.crm-companion-mouth {
  position: absolute;
  left: 50%;
  bottom: 7px;
  z-index: 2;
  width: 19px;
  height: 7px;
  border-bottom: 3px solid #83ecff;
  border-radius: 0 0 12px 12px;
  transform: translateX(-50%);
}

.crm-companion-call-signal {
  position: absolute;
  right: 7px;
  bottom: 6px;
  display: none;
  gap: 2px;
  align-items: end;
  height: 12px;
}

.crm-companion-call-signal i {
  width: 3px;
  border-radius: 2px;
  background: #61e99c;
  box-shadow: 0 0 4px rgba(63, 235, 147, 0.7);
}

.crm-companion-call-signal i:nth-child(1) { height: 4px; }
.crm-companion-call-signal i:nth-child(2) { height: 8px; }
.crm-companion-call-signal i:nth-child(3) { height: 12px; }

.crm-companion-arm {
  position: absolute;
  top: 73px;
  z-index: 2;
  width: 17px;
  height: 31px;
  border: 3px solid #17334f;
  border-radius: 10px 10px 12px 12px;
  background: linear-gradient(120deg, #eef7fa 0 45%, #12a5b2 46% 100%);
  box-shadow: inset 2px 1px 3px rgba(255,255,255,0.55);
  transform-origin: 50% 7px;
}

.crm-companion-arm.left {
  left: 13px;
  transform: rotate(16deg);
}

.crm-companion-arm.right {
  right: 13px;
  transform: rotate(-16deg);
}

.crm-companion-device {
  position: absolute;
  top: 66px;
  left: 30px;
  z-index: 3;
  width: 44px;
  height: 37px;
  border: 3px solid #17334f;
  border-radius: 13px 13px 10px 10px;
  background: linear-gradient(145deg, #f3fafb, #bfd7df);
  box-shadow: inset 3px 3px 5px rgba(255,255,255,0.75), 0 4px 7px rgba(8, 30, 52, 0.24);
  overflow: hidden;
}

.crm-companion-device::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(21, 51, 80, 0.3);
  border-radius: 8px 8px 6px 6px;
  background:
    linear-gradient(
      to top,
      var(--companion-energy-color) 0 var(--companion-energy),
      rgba(16, 45, 72, 0.12) var(--companion-energy) 100%
    );
  box-shadow: inset 0 0 7px color-mix(in srgb, var(--companion-energy-color) 48%, transparent);
  content: "";
  opacity: 0.92;
  transition: background 260ms ease, box-shadow 260ms ease;
}

.crm-companion-device-screen {
  position: absolute;
  top: 9px;
  left: 14px;
  z-index: 2;
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #102d48;
  border-radius: 5px;
  background: #0c2133;
}

.crm-companion[data-energy="steady"] .crm-companion-device-screen i:nth-child(3),
.crm-companion[data-energy="hungry"] .crm-companion-device-screen i:nth-child(2),
.crm-companion[data-energy="hungry"] .crm-companion-device-screen i:nth-child(3) {
  opacity: 0.2;
}

.crm-companion[data-energy="tired"] .crm-companion-device-screen i {
  background: #ff8a67;
  box-shadow: 0 0 6px rgba(255, 106, 76, 0.82);
  animation: companion-low-energy-pulse 920ms ease-in-out infinite;
}

.crm-companion-device-screen i {
  position: absolute;
  top: 5px;
  left: 5px;
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #42e4e3;
  box-shadow: 0 0 5px rgba(66, 228, 227, 0.8);
}

.crm-companion-device-screen i:nth-child(2) { transform: translate(5px, 4px); background: #b8f33e; }
.crm-companion-device-screen i:nth-child(3) { transform: translate(-4px, 7px); }

.crm-companion-foot {
  position: absolute;
  top: 98px;
  z-index: 1;
  width: 28px;
  height: 22px;
  border: 3px solid #17334f;
  border-radius: 8px 8px 11px 11px;
  background: linear-gradient(145deg, #e8f4f6 0 48%, #244f67 49% 100%);
  box-shadow: inset 2px 2px 3px rgba(255,255,255,0.5);
  transform-origin: center 3px;
}

.crm-companion-foot.left {
  left: 23px;
}

.crm-companion-foot.right {
  right: 23px;
}

.crm-companion-dust {
  position: absolute;
  left: 18px;
  bottom: 8px;
  z-index: 1;
  display: none;
  width: 96px;
  height: 26px;
}

.crm-companion-dust i {
  position: absolute;
  bottom: 0;
  width: 13px;
  height: 8px;
  border-radius: 50%;
  background: rgba(128, 164, 183, 0.42);
}

.crm-companion-confetti {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.crm-companion-confetti i {
  position: absolute;
  top: 54px;
  left: 66px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: #ffbd3f;
}

.crm-companion-confetti i:nth-child(2),
.crm-companion-confetti i:nth-child(5) {
  background: #35c174;
}

.crm-companion-confetti i:nth-child(3),
.crm-companion-confetti i:nth-child(6) {
  background: #18a6d4;
}

.crm-companion[data-state="waving"] .crm-companion-arm.right {
  animation: companion-wave 560ms ease-in-out 4;
}

.crm-companion[data-state="waving"] .crm-companion-creature,
.crm-companion[data-state="encouraging"] .crm-companion-creature {
  animation: companion-friendly-bounce 700ms ease-in-out 3;
}

.crm-companion[data-state="looking"] .crm-companion-creature {
  animation: companion-look 2100ms ease-in-out 1;
}

.crm-companion[data-state="looking"] .crm-companion-eye {
  animation: companion-eye-scan 1050ms ease-in-out 2;
}

.crm-companion[data-state="idle"] .crm-companion-eye,
.crm-companion[data-state="waving"] .crm-companion-eye,
.crm-companion[data-state="encouraging"] .crm-companion-eye,
.crm-companion[data-state="sitting"] .crm-companion-eye {
  animation: companion-eye-alive 3600ms ease-in-out infinite;
}

.crm-companion[data-state="idle"] .crm-companion-mouth,
.crm-companion[data-state="waving"] .crm-companion-mouth,
.crm-companion[data-state="encouraging"] .crm-companion-mouth,
.crm-companion[data-state="sitting"] .crm-companion-mouth {
  animation: companion-smile-alive 3600ms ease-in-out infinite;
}

.crm-companion[data-state="thinking"] .crm-companion-device-screen {
  animation: companion-think 700ms ease-in-out 3;
}

.crm-companion[data-state="thinking"] .crm-companion-eye.right {
  transform: scaleY(0.25);
}

.crm-companion[data-state="stretching"] .crm-companion-arm.left {
  animation: companion-stretch-left 1500ms ease-in-out 1;
}

.crm-companion[data-state="stretching"] .crm-companion-arm.right {
  animation: companion-stretch-right 1500ms ease-in-out 1;
}

.crm-companion[data-state="calling"] .crm-companion-character {
  animation: companion-call 720ms ease-in-out infinite;
}

.crm-companion[data-state="calling"] .crm-companion-call-signal {
  display: flex;
}

.crm-companion[data-state="calling"] .crm-companion-arm.left {
  animation: companion-call-arm 850ms ease-in-out infinite;
}

.crm-companion[data-state="calling"] .crm-companion-visor {
  box-shadow: inset 0 3px 5px rgba(112, 238, 255, 0.2), 0 0 10px rgba(50, 221, 213, 0.55);
}

.crm-companion[data-state="calling"] .crm-companion-eye {
  animation: companion-call-eyes 1100ms ease-in-out infinite;
}

.crm-companion[data-state="calling"] .crm-companion-call-signal i,
.crm-companion[data-state="calling"] .crm-companion-device-screen i {
  animation: companion-signal 900ms ease-in-out infinite;
}

.crm-companion[data-state="calling"] .crm-companion-call-signal i:nth-child(2),
.crm-companion[data-state="calling"] .crm-companion-device-screen i:nth-child(2) {
  animation-delay: 150ms;
}

.crm-companion[data-state="calling"] .crm-companion-call-signal i:nth-child(3),
.crm-companion[data-state="calling"] .crm-companion-device-screen i:nth-child(3) {
  animation-delay: 300ms;
}

.crm-companion[data-state="hopping"] .crm-companion-character {
  animation: companion-hop 820ms cubic-bezier(0.35, 0.05, 0.3, 1) 3;
}

.crm-companion[data-state="hopping"] .crm-companion-shadow {
  animation: companion-shadow-hop 820ms ease-in-out 3;
}

.crm-companion[data-state="dancing"] .crm-companion-creature {
  animation: companion-dance 520ms ease-in-out 5;
}

.crm-companion[data-state="dancing"] .crm-companion-foot.left {
  animation: companion-step-left 520ms ease-in-out 5;
}

.crm-companion[data-state="dancing"] .crm-companion-foot.right {
  animation: companion-step-right 520ms ease-in-out 5;
}

.crm-companion[data-state="peeking"] .crm-companion-creature {
  animation: companion-peek 1500ms ease-in-out 1;
}

.crm-companion.is-dragging .crm-companion-character,
.crm-companion.is-wandering .crm-companion-character {
  animation: companion-run-body 330ms ease-in-out infinite;
}

.crm-companion.is-dragging .crm-companion-eye,
.crm-companion.is-wandering .crm-companion-eye {
  animation: companion-running-eyes 620ms ease-in-out infinite;
}

.crm-companion.is-dragging .crm-companion-creature,
.crm-companion.is-wandering .crm-companion-creature {
  transform: rotate(8deg);
}

.crm-companion.is-dragging[data-direction="left"] .crm-companion-creature,
.crm-companion.is-wandering[data-direction="left"] .crm-companion-creature {
  transform: rotate(-8deg);
}

.crm-companion.is-dragging .crm-companion-foot.left,
.crm-companion.is-wandering .crm-companion-foot.left {
  animation: companion-run-left 240ms ease-in-out infinite alternate;
}

.crm-companion.is-dragging .crm-companion-foot.right,
.crm-companion.is-wandering .crm-companion-foot.right {
  animation: companion-run-right 240ms ease-in-out infinite alternate;
}

.crm-companion.is-dragging .crm-companion-arm.left,
.crm-companion.is-wandering .crm-companion-arm.left {
  animation: companion-run-arm-left 240ms ease-in-out infinite alternate;
}

.crm-companion.is-dragging .crm-companion-arm.right,
.crm-companion.is-wandering .crm-companion-arm.right {
  animation: companion-run-arm-right 240ms ease-in-out infinite alternate;
}

.crm-companion.is-dragging .crm-companion-dust,
.crm-companion.is-wandering .crm-companion-dust {
  display: block;
}

.crm-companion.is-dragging .crm-companion-dust i,
.crm-companion.is-wandering .crm-companion-dust i {
  animation: companion-dust 620ms ease-out infinite;
}

.crm-companion.is-dragging .crm-companion-dust i:nth-child(2),
.crm-companion.is-wandering .crm-companion-dust i:nth-child(2) { left: 35px; animation-delay: 170ms; }
.crm-companion.is-dragging .crm-companion-dust i:nth-child(3),
.crm-companion.is-wandering .crm-companion-dust i:nth-child(3) { right: 8px; animation-delay: 340ms; }

.crm-companion[data-state="sitting"] .crm-companion-creature {
  animation: companion-sit 520ms ease-out both;
}

.crm-companion[data-state="sitting"] .crm-companion-foot.left {
  transform: translate(-7px, 6px) rotate(20deg);
}

.crm-companion[data-state="sitting"] .crm-companion-foot.right {
  transform: translate(7px, 6px) rotate(-20deg);
}

.crm-companion[data-state="sitting"] .crm-companion-arm.left {
  transform: translate(-2px, 7px) rotate(28deg);
}

.crm-companion[data-state="sitting"] .crm-companion-arm.right {
  transform: translate(2px, 7px) rotate(-28deg);
}

.crm-companion[data-state="sitting"] .crm-companion-shadow {
  transform: scaleX(1.08);
}

.crm-companion[data-state="spinning"] .crm-companion-character {
  animation: companion-spin 1100ms cubic-bezier(0.45, 0, 0.2, 1) 2;
}

.crm-companion[data-state="landing"] .crm-companion-character {
  animation: companion-land 820ms cubic-bezier(0.2, 0.8, 0.25, 1) 1;
}

.crm-companion[data-state="acknowledging"] .crm-companion-character,
.crm-companion[data-state="waking"] .crm-companion-character {
  animation: companion-nod 520ms ease-in-out 2;
}

.crm-companion[data-state="concerned"] .crm-companion-character {
  animation: companion-concern 800ms ease-in-out 2;
}

.crm-companion[data-state="concerned"] .crm-companion-mouth {
  bottom: 4px;
  border-top: 3px solid #83ecff;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.crm-companion[data-state="frustrated"] .crm-companion-character {
  animation: companion-frustrated 420ms ease-in-out 5;
}

.crm-companion[data-state="frustrated"] .crm-companion-brow {
  opacity: 1;
}

.crm-companion[data-state="frustrated"] .crm-companion-brow.left {
  transform: rotate(18deg);
}

.crm-companion[data-state="frustrated"] .crm-companion-brow.right {
  transform: rotate(-18deg);
}

.crm-companion[data-state="frustrated"] .crm-companion-mouth {
  bottom: 3px;
  width: 15px;
  border-top: 3px solid #83ecff;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.crm-companion[data-state="frustrated"] .crm-companion-arm.left {
  transform: translate(-5px, -6px) rotate(70deg);
}

.crm-companion[data-state="frustrated"] .crm-companion-arm.right {
  transform: translate(5px, -6px) rotate(-70deg);
}

.crm-companion[data-state="celebrating"] .crm-companion-character {
  animation: companion-celebrate 680ms ease-in-out 6;
}

.crm-companion[data-state="celebrating"] .crm-companion-confetti {
  display: block;
}

.crm-companion[data-state="celebrating"] .crm-companion-confetti i {
  animation: companion-confetti 1250ms ease-out infinite;
}

.crm-companion[data-state="celebrating"] .crm-companion-confetti i:nth-child(2) { animation-delay: 150ms; transform: rotate(30deg); }
.crm-companion[data-state="celebrating"] .crm-companion-confetti i:nth-child(3) { animation-delay: 300ms; transform: rotate(60deg); }
.crm-companion[data-state="celebrating"] .crm-companion-confetti i:nth-child(4) { animation-delay: 450ms; transform: rotate(90deg); }
.crm-companion[data-state="celebrating"] .crm-companion-confetti i:nth-child(5) { animation-delay: 600ms; transform: rotate(120deg); }
.crm-companion[data-state="celebrating"] .crm-companion-confetti i:nth-child(6) { animation-delay: 750ms; transform: rotate(150deg); }

.crm-companion[data-state="sleeping"] .crm-companion-eye {
  top: 15px;
  height: 2px;
}

.crm-companion[data-state="sleeping"] .crm-companion-mouth {
  width: 10px;
  height: 4px;
  border: 2px solid #83ecff;
  border-radius: 50%;
}

.crm-companion[data-state="sleeping"] .crm-companion-creature {
  transform: rotate(5deg);
}

@keyframes companion-wave {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: translate(9px, -13px) rotate(-112deg); }
}

@keyframes companion-tired-breathe {
  0%, 100% { transform: translateY(7px) rotate(2deg) scaleY(0.94); }
  50% { transform: translateY(10px) rotate(-1deg) scaleY(0.9); }
}

@keyframes companion-low-energy-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes companion-check-sale {
  0%, 100% { opacity: 0.72; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes companion-checklist-arm {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: translate(5px, -8px) rotate(-72deg); }
}

@keyframes companion-point-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes companion-friendly-bounce {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-6px) scaleY(1.03); }
}

@keyframes companion-look {
  0%, 100% { transform: rotate(0); }
  30% { transform: translateX(-4px) rotate(-5deg); }
  70% { transform: translateX(4px) rotate(5deg); }
}

@keyframes companion-eye-scan {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}

@keyframes companion-eye-alive {
  0%, 7%, 13%, 38%, 100% { transform: translateX(0) scaleY(1); }
  10% { transform: translateX(0) scaleY(0.12); }
  48%, 58% { transform: translateX(3px) scaleY(1); }
  72%, 82% { transform: translateX(-3px) scaleY(1); }
}

@keyframes companion-smile-alive {
  0%, 28%, 100% { transform: translateX(-50%) scaleX(1); }
  42%, 62% { transform: translateX(-50%) translateY(-1px) scaleX(1.28); }
  78% { transform: translateX(-50%) scaleX(0.82); }
}

@keyframes companion-call-eyes {
  0%, 100% { transform: scale(0.9); opacity: 0.72; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes companion-running-eyes {
  0%, 100% { transform: translateX(-2px) scaleY(1); }
  50% { transform: translateX(2px) scaleY(0.72); }
}

@keyframes companion-think {
  0%, 100% { transform: rotate(0) scale(1); }
  50% { transform: rotate(12deg) scale(1.1); }
}

@keyframes companion-stretch-left {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: translate(-7px, -10px) rotate(72deg); }
}

@keyframes companion-stretch-right {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: translate(7px, -10px) rotate(-72deg); }
}

@keyframes companion-call {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1deg); }
}

@keyframes companion-call-arm {
  0%, 100% { transform: translate(-5px, -13px) rotate(138deg); }
  50% { transform: translate(-4px, -14px) rotate(146deg); }
}

@keyframes companion-signal {
  0%, 100% { transform: scale(0.75); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes companion-hop {
  0%, 100% { transform: translateY(0) scaleY(1); }
  18% { transform: translateY(3px) scaleY(0.92); }
  52% { transform: translateY(-25px) scaleY(1.04); }
  78% { transform: translateY(0) scaleY(0.94); }
}

@keyframes companion-shadow-hop {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.58); opacity: 0.45; }
}

@keyframes companion-dance {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

@keyframes companion-step-left {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(15deg); }
}

@keyframes companion-step-right {
  0%, 100% { transform: translateY(-7px) rotate(-15deg); }
  50% { transform: translateY(0) rotate(0); }
}

@keyframes companion-peek {
  0%, 100% { transform: translateX(0) rotate(0); }
  30%, 70% { transform: translateX(-12px) rotate(-8deg); }
}

@keyframes companion-run-body {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes companion-run-left {
  from { transform: translate(-5px, -5px) rotate(24deg); }
  to { transform: translate(7px, 2px) rotate(-18deg); }
}

@keyframes companion-run-right {
  from { transform: translate(7px, 2px) rotate(-18deg); }
  to { transform: translate(-5px, -5px) rotate(24deg); }
}

@keyframes companion-run-arm-left {
  from { transform: rotate(58deg); }
  to { transform: rotate(-12deg); }
}

@keyframes companion-run-arm-right {
  from { transform: rotate(-12deg); }
  to { transform: rotate(-58deg); }
}

@keyframes companion-dust {
  0% { opacity: 0.65; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(-18px, -8px) scale(1.6); }
}

@keyframes companion-sit {
  0% { transform: translateY(0) scaleY(1); }
  65% { transform: translateY(14px) scaleY(0.84); }
  100% { transform: translateY(11px) scaleY(0.88); }
}

@keyframes companion-spin {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-8px) rotate(115deg); }
  65% { transform: translateY(-8px) rotate(255deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

@keyframes companion-land {
  0% { transform: translateY(-10px) scaleY(1.04); }
  45% { transform: translateY(3px) scaleY(0.88); }
  72% { transform: translateY(-5px) scaleY(1.03); }
  100% { transform: translateY(0) scaleY(1); }
}

@keyframes companion-nod {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(4deg) translateY(2px); }
}

@keyframes companion-concern {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-3deg); }
  70% { transform: rotate(3deg); }
}

@keyframes companion-frustrated {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-4px) rotate(-2deg); }
  75% { transform: translateX(4px) rotate(2deg); }
}

@keyframes companion-celebrate {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

@keyframes companion-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--confetti-x, 42px), -58px) rotate(220deg); }
}

.crm-companion-confetti i:nth-child(1) { --confetti-x: -42px; }
.crm-companion-confetti i:nth-child(2) { --confetti-x: 26px; }
.crm-companion-confetti i:nth-child(3) { --confetti-x: -21px; }
.crm-companion-confetti i:nth-child(4) { --confetti-x: 42px; }
.crm-companion-confetti i:nth-child(5) { --confetti-x: -34px; }
.crm-companion-confetti i:nth-child(6) { --confetti-x: 15px; }

.companion-page-hidden .crm-companion * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .crm-companion *,
  .crm-companion *::before,
  .crm-companion *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .session-card {
    position: static;
  }

  .brand {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
  }

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

  .metric-grid,
  .content-grid,
  .coverage-check-layout,
  .advisor-grid,
  .advisor-flow-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .panel2-promotion,
  .panel2-promotion img,
  .panel2-promotion-empty {
    min-height: 420px;
    max-height: 70vh;
  }

  .panel2-role .panel-monitor-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

@media (max-width: 720px) {
  .login-view {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-card {
    grid-column: 1;
  }

  .login-copy {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .panel2-promotion-config {
    grid-template-columns: 1fr;
  }

  .panel2-promotion-preview {
    max-width: 320px;
  }

  .panel-role .workspace {
    padding: 16px;
  }

  .panel-role .topbar {
    margin-bottom: 12px;
  }

  .panel-role .topbar h1 {
    font-size: 36px;
  }

  .panel-role .metric-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel-role .metric-card {
    padding: 18px;
  }

  .panel-role .metric-card span,
  .panel-role .metric-card p {
    font-size: 17px;
  }

  .panel-role .metric-card strong {
    font-size: 48px;
  }

  .panel-monitor {
    padding: 16px;
  }

  .panel-monitor .section-title h2 {
    font-size: 28px;
  }

  .panel-managing-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-title,
  .modal-header,
  .modal-actions,
  .notice-card {
    flex-direction: column;
    align-items: stretch;
  }

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

  .top-actions,
  .button-row {
    display: grid;
  }

  .nav-list,
  .metric-grid,
  .content-grid,
  .baserec-distribute-preview,
  .coverage-check-layout,
  .coverage-check-form,
  .toolbar,
  .upload-grid,
  .edit-grid,
  .advisor-form,
  .advisor-grid,
  .mini-grid,
  .modal-body {
    grid-template-columns: 1fr;
  }
}
