:root {
  --bg: #070b0d;
  --surface: #10181b;
  --surface-2: #162226;
  --ink: #eff7f4;
  --muted: #93a7a6;
  --line: rgba(255, 255, 255, 0.11);
  --brand: #00a88f;
  --brand-dark: #031f22;
  --accent: #7cebd8;
  --blue: #47b5ff;
  --teal: #00c0a4;
  --green: #4fd27a;
  --yellow: #d98d00;
  --red: #ff5c63;
  --rose: #ee6a8f;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1280px;
  min-height: 100%;
  background: #050708;
}

body {
  margin: 0;
  min-width: 1280px;
  min-height: 100vh;
  background: linear-gradient(135deg, #060a0c 0%, #091214 48%, #050708 100%);
  color: var(--ink);
  font-family: Montserrat, Raleway, Roboto, "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background:
    linear-gradient(180deg, rgba(2, 18, 20, 0.64), rgba(3, 8, 10, 0.96) 62%, rgba(3, 8, 10, 0.99)),
    url("./assets/service-exterior.jpg") center / cover;
  color: #ffffff;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  padding: 18px 0 34px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 205px;
  max-width: 205px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-kicker {
  color: rgba(255, 255, 255, 0.62);
}

.brand h1 {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.1;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(124, 235, 216, 0.42);
  background: rgba(0, 168, 143, 0.17);
  color: #ffffff;
}

.nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(124, 235, 216, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 168, 143, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #40d87a;
  box-shadow: 0 0 0 5px rgba(64, 216, 122, 0.16);
}

.main-panel {
  min-width: 0;
  padding: 30px 34px;
  background: rgba(5, 10, 12, 0.76);
  backdrop-filter: blur(8px);
}

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

.hide-topbar .topbar {
  display: none;
}

.hide-topbar .main-panel {
  padding-top: 38px;
}

.topbar h2,
.section-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 2vw, 2.35rem);
  line-height: 1.08;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

select,
input {
  min-width: 158px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 36px 10px 12px;
  background: rgba(16, 24, 27, 0.92);
  color: var(--ink);
}

input[readonly] {
  min-width: 250px;
  color: #dcebea;
}

.section-view {
  display: none;
}

.section-view.active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.refresh-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

#semaforo .refresh-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 12px;
  width: min(760px, 100%);
  align-items: end;
}

#semaforo .section-heading {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(620px, 760px);
  align-items: center;
  gap: 24px;
}

#semaforo .section-heading > div:first-child {
  min-width: 0;
}

.sales-filter-bar {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 8px;
  width: 100%;
}

.sales-filter-bar label {
  min-width: 0;
}

.filter-label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sales-filter-bar label:first-child {
  grid-column: 1 / -1;
}

.sales-filter-bar .filter-hidden {
  display: none;
}

.sales-filter-bar select,
.sales-filter-bar input {
  width: 100%;
  min-width: 0;
}

.date-picker-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: stretch;
  width: 100%;
}

.date-picker-field input {
  border-radius: 8px 0 0 8px;
  border-right: 0;
}

.date-picker-button {
  position: relative;
  min-width: 36px;
  border: 1px solid rgba(124, 235, 216, 0.22);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(0, 168, 143, 0.16);
  cursor: pointer;
}

.date-picker-button::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 14px;
  height: 13px;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

.date-picker-button::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 13px;
  width: 10px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 4px 0 rgba(124, 235, 216, 0.55);
}

.date-picker-button:hover:not(:disabled) {
  background: rgba(0, 168, 143, 0.28);
}

.date-picker-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.primary-action {
  min-height: 42px;
  border: 1px solid rgba(124, 235, 216, 0.55);
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(90deg, rgba(0, 168, 143, 0.95), rgba(124, 235, 216, 0.72));
  color: #041011;
  cursor: pointer;
  font-weight: 900;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.kpi-status {
  margin-bottom: 16px;
  border: 1px solid rgba(124, 235, 216, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(0, 168, 143, 0.09);
  color: #d6e7e5;
  font-weight: 700;
}

.kpi-status[data-type="success"] {
  border-color: rgba(79, 210, 122, 0.34);
  background: rgba(79, 210, 122, 0.11);
}

.kpi-status[data-type="warning"] {
  border-color: rgba(217, 141, 0, 0.36);
  background: rgba(217, 141, 0, 0.1);
}

.kpi-status[data-type="error"] {
  border-color: rgba(255, 92, 99, 0.4);
  background: rgba(255, 92, 99, 0.1);
  color: #ffd5d8;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(0, 168, 143, 0.18);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-action {
  min-height: 38px;
  border: 1px solid rgba(124, 235, 216, 0.34);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(124, 235, 216, 0.1);
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.section-pill.warning {
  background: rgba(217, 141, 0, 0.12);
  color: #8a5a00;
}

.kpi-grid,
.traffic-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.dashboard-grid.two-columns {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.compact-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.dashboard-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metric-card,
.panel,
.traffic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 31, 35, 0.94), rgba(9, 15, 17, 0.94));
  box-shadow: var(--shadow);
}

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

.metric-card.compact {
  min-height: 126px;
}

.metric-label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  color: #ffffff;
}

.metric-card small {
  font-weight: 800;
}

.positive {
  color: var(--green);
}

.neutral {
  color: var(--blue);
}

.negative {
  color: var(--red);
}

.panel {
  padding: 20px;
}

.summary-panel {
  min-height: 96px;
}

.summary-panel span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.summary-panel strong {
  color: #ffffff;
  font-size: 2rem;
}

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

.panel-header h4 {
  margin: 0;
  font-size: 1.03rem;
  color: #ffffff;
}

.panel-header span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.bar-list,
.insight-list,
.segment-list,
.timeline {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 0 18px rgba(124, 235, 216, 0.28);
}

.insight-list div,
.segment-list div,
.timeline div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.insight-list b,
.segment-list b,
.timeline b {
  display: block;
  margin-bottom: 5px;
}

.insight-list p,
.traffic-card p,
.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.traffic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.traffic-card {
  min-height: 150px;
  padding: 20px;
  border-top-width: 5px;
}

.traffic-card.green {
  border-top-color: var(--green);
}

.traffic-card.yellow {
  border-top-color: var(--yellow);
}

.traffic-card.red {
  border-top-color: var(--red);
}

.traffic-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.traffic-card strong {
  display: block;
  margin: 10px 0;
  font-size: 3rem;
  line-height: 1;
}

.sales-scoreboard {
  display: grid;
  gap: 16px;
}

.sales-summary {
  margin-bottom: 0;
}

.sales-status-label {
  margin: 4px 0 -4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sales-targets-panel {
  border: 1px solid rgba(124, 235, 216, 0.18);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.035);
}

.sales-targets-panel summary {
  color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  list-style: none;
}

.sales-targets-panel summary::-webkit-details-marker {
  display: none;
}

.sales-targets-panel summary::before {
  content: "+";
  display: inline-flex;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 235, 216, 0.28);
  border-radius: 6px;
  color: var(--accent);
}

.sales-targets-panel[open] summary::before {
  content: "-";
}

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

.sales-targets-grid input {
  width: 100%;
  min-width: 0;
  padding-right: 12px;
}

.sales-targets-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.sales-targets-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.sales-targets-summary article {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(71, 181, 255, 0.48);
  border-radius: 8px;
  padding: 9px;
  background:
    linear-gradient(145deg, rgba(0, 174, 239, 0.92) 0%, rgba(0, 125, 191, 0.72) 48%, rgba(5, 46, 76, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 174, 239, 0.12);
}

.sales-targets-summary span {
  display: block;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sales-targets-summary strong {
  display: block;
  margin-top: 0;
  color: #ffffff;
  font-size: 1rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.sales-targets-table-wrap {
  max-width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid rgba(124, 235, 216, 0.12);
  border-radius: 8px;
}

.sales-targets-table {
  min-width: 1500px;
}

.sales-targets-table th,
.sales-targets-table td {
  padding: 8px;
  white-space: nowrap;
}

.sales-targets-table thead th,
.sales-targets-table tfoot th,
.sales-targets-table tfoot td {
  background: #f6c431;
  color: #080b0d;
  font-weight: 900;
}

.sales-targets-table input {
  min-width: 86px;
  width: 100%;
  padding: 7px 8px;
}

.sales-targets-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.sales-targets-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.sales-context p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.sales-context ul {
  margin: 0;
  padding-left: 20px;
  color: #d6e7e5;
  line-height: 1.45;
}

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

.sales-agent-row {
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 31, 35, 0.94), rgba(9, 15, 17, 0.94));
  box-shadow: var(--shadow);
  overflow: visible;
}

.sales-agent-row.green {
  border-left-color: var(--green);
}

.sales-agent-row.yellow {
  border-left-color: var(--yellow);
}

.sales-agent-row.red {
  border-left-color: var(--red);
}

.sales-agent-summary {
  display: grid;
  grid-template-columns: 24px minmax(150px, 0.75fr) minmax(640px, 3.25fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.sales-agent-summary::-webkit-details-marker {
  display: none;
}

.sales-agent-summary::before {
  content: "+";
  display: inline-flex;
  grid-column: 1;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 235, 216, 0.28);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 900;
}

.sales-agent-row[open] .sales-agent-summary::before {
  content: "-";
}

.sales-agent-id {
  grid-column: 2;
  min-width: 0;
}

.sales-agent-id h4 {
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-agent-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}

.sales-agent-tool {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(124, 235, 216, 0.32);
  border-radius: 7px;
  background: rgba(124, 235, 216, 0.08);
  color: #7cebd8;
  cursor: pointer;
}

.sales-agent-tool:hover {
  border-color: rgba(124, 235, 216, 0.72);
  background: rgba(124, 235, 216, 0.16);
}

.sales-agent-tool.pending {
  color: #7cebd8;
}

.sales-agent-tool svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-agent-tool b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  padding: 0 4px;
  background: #ff2f3d;
  color: #ffffff;
  font-size: 0.62rem;
  line-height: 16px;
}

.sales-tool-info {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(124, 235, 216, 0.32);
  border-radius: 999px;
  color: #7cebd8;
  font-size: 0.66rem;
  font-weight: 900;
}

.sales-tool-info:hover::after,
.sales-tool-info:focus-visible::after {
  content: none;
}

.floating-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(340px, calc(100vw - 20px));
  border: 1px solid rgba(124, 235, 216, 0.46);
  border-radius: 8px;
  padding: 9px 11px;
  background: #ecfdfb;
  color: #0e1a1d;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.sales-agent-id span,
.sales-row-metrics span,
.sales-agent-metrics span,
.sales-block-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sales-agent-id span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-row-metrics {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(88px, 1fr));
  gap: 6px;
}

.sales-row-metrics div {
  min-width: 0;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(124, 235, 216, 0.12);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.sales-row-metrics span {
  min-height: 32px;
}

.sales-row-metrics strong {
  display: block;
  margin-top: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-stage-amount {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #f6c431;
  font-size: 0.94rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-stage-totals {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(124, 235, 216, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(10, 31, 34, 0.95), rgba(8, 14, 16, 0.98));
}

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

.sales-stage-totals-head strong {
  color: #ffffff;
  font-size: 0.98rem;
}

.sales-stage-totals-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.sales-stage-totals .sales-row-metrics {
  grid-column: auto;
}

.sales-stage-totals .sales-row-metrics div {
  border-color: rgba(0, 174, 239, 0.44);
  background: linear-gradient(160deg, rgba(0, 174, 239, 0.22), rgba(10, 18, 20, 0.96));
}

.sales-stage-totals .sales-stage-amount {
  color: #7cebd8;
}

.sales-score {
  grid-column: 4;
  min-width: 104px;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: right;
  background: rgba(255, 92, 99, 0.14);
  color: #ffd5d8;
}

.sales-score.green {
  background: rgba(79, 210, 122, 0.14);
  color: #baf8ce;
}

.sales-score.yellow {
  background: rgba(217, 141, 0, 0.16);
  color: #ffd891;
}

.sales-score strong,
.sales-score span {
  display: block;
  color: inherit;
}

.sales-score span {
  margin-top: 2px;
  font-size: 1.4rem;
  font-weight: 900;
}

.sales-agent-details {
  border-top: 1px solid var(--line);
  padding: 14px;
}

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

.sales-agent-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.sales-agent-metrics strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 1.36rem;
}

.sales-value-detail,
.sales-result-detail {
  margin-top: 5px;
}

.sales-value-detail summary,
.sales-result-detail summary {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px dotted rgba(124, 235, 216, 0.72);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.sales-result-detail summary {
  justify-content: flex-end;
  font-size: 0.82rem;
}

.sales-value-detail summary::-webkit-details-marker,
.sales-result-detail summary::-webkit-details-marker {
  display: none;
}

.sales-record-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.sales-record-list li {
  border: 1px solid rgba(124, 235, 216, 0.12);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.035);
}

.sales-record-list a,
.sales-record-list strong {
  display: block;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.sales-record-list a:hover {
  color: var(--accent);
}

.sales-record-list span,
.sales-record-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.sales-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.62);
}

.sales-popup {
  position: relative;
  width: min(1120px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: hidden;
  border: 1px solid rgba(124, 235, 216, 0.26);
  border-radius: 10px;
  background: #0b1215;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.sales-popup header {
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(124, 235, 216, 0.16);
  background: linear-gradient(135deg, rgba(8, 28, 31, 0.98), rgba(6, 11, 13, 0.98));
}

.sales-popup h3 {
  margin: 3px 0 4px;
  color: #ffffff;
  font-size: 1.35rem;
}

.sales-popup header span {
  color: var(--muted);
  font-weight: 800;
}

.sales-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(124, 235, 216, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.sales-popup-body {
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 18px 22px 22px;
}

.nano-calendar-note {
  margin-bottom: 12px;
  border: 1px solid rgba(246, 196, 49, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(246, 196, 49, 0.09);
  color: #f8e6a4;
  font-size: 0.85rem;
  font-weight: 800;
}

.nano-calendar {
  display: grid;
  grid-template-columns: 62px repeat(7, minmax(110px, 1fr));
  min-width: 900px;
  overflow: hidden;
  border: 1px solid rgba(124, 235, 216, 0.16);
  border-radius: 8px;
}

.nano-calendar-head,
.nano-calendar-day,
.nano-calendar-hour,
.nano-calendar-cell {
  min-height: 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nano-calendar-day {
  display: grid;
  place-items: center;
  background: #122024;
  color: #7cebd8;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.nano-calendar-hour {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.nano-calendar-cell {
  padding: 5px;
  background: rgba(255, 255, 255, 0.018);
}

.nano-calendar-cell span {
  display: block;
  border-radius: 7px;
  padding: 7px;
  color: #061013;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.2;
}

.nano-calendar-cell .blue {
  background: #80d8ff;
}

.nano-calendar-cell .green {
  background: #62e58b;
}

.nano-calendar-cell .amber {
  background: #f6c431;
}

.nano-calendar-cell .purple {
  background: #c7a2ff;
}

.nano-calendar-cell .teal {
  background: #7cebd8;
}

.sales-task-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-task-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(124, 235, 216, 0.15);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.sales-task-list a,
.sales-task-list strong {
  color: #ffffff;
  font-weight: 950;
}

.sales-task-list span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.sales-task-list small {
  flex: 0 0 auto;
  color: #f6c431;
  font-weight: 900;
}

.sales-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.sales-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.sales-block-head strong {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: #ffffff;
}

.sales-block-title {
  position: relative;
}

.sales-info-dot {
  position: relative;
  display: inline-flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 235, 216, 0.42);
  border-radius: 999px;
  color: var(--accent);
  cursor: help;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.filter-info-dot {
  vertical-align: middle;
}

.sales-info-dot::after {
  content: none;
}

.sales-info-dot:hover::after,
.sales-info-dot:focus-visible::after {
  content: none;
}

.sales-block-head b {
  color: var(--accent);
  white-space: nowrap;
}

.sales-block-score.green,
.sales-line-score.green {
  color: #22c55e;
}

.sales-block-score.yellow,
.sales-line-score.yellow {
  color: #facc15;
}

.sales-block-score.red,
.sales-line-score.red {
  color: #ef232a;
}

.sales-line-score.neutral {
  color: var(--muted);
}

.sales-line-score {
  font-weight: 900;
}

.sales-block-score small {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.74rem;
  opacity: 0.82;
}

.sales-kpi-table th,
.sales-kpi-table td {
  padding: 8px 8px;
  font-size: 0.82rem;
}

.sales-kpi-table th:nth-child(2),
.sales-kpi-table td:nth-child(2),
.sales-kpi-table th:nth-child(3),
.sales-kpi-table td:nth-child(3),
.sales-kpi-table th:nth-child(4),
.sales-kpi-table td:nth-child(4),
.sales-kpi-table th:nth-child(5),
.sales-kpi-table td:nth-child(5),
.sales-kpi-table th:nth-child(6),
.sales-kpi-table td:nth-child(6) {
  text-align: center;
}

.sales-result-cell {
  text-align: center;
}

.sales-result-cell > span,
.sales-result-detail summary {
  justify-content: center;
}

.sales-real,
.sales-separator,
.sales-target {
  display: inline-block;
  color: #ffffff;
  font-weight: 900;
}

.sales-separator {
  padding: 0 3px;
  color: var(--muted);
}

.sales-result-cell small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #d9e6e4;
  line-height: 1.35;
}

.master-report-panel {
  overflow: hidden;
}

.master-report-shell {
  color: #0f172a;
}

.empty-report {
  border: 1px solid rgba(124, 235, 216, 0.22);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.04);
  color: #d6e7e5;
  font-weight: 800;
}

.report-document {
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: var(--shadow);
}

.report-hero {
  padding: 28px 30px;
  background: #0f172a;
  color: #ffffff;
}

.report-tag {
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
}

.report-hero h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.1;
}

.report-hero p {
  margin: 0;
  color: #cbd5e1;
}

.report-content {
  padding: 22px 30px;
}

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

.report-kpi,
.report-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.report-kpi {
  min-width: 0;
  padding: 14px;
}

.report-kpi span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin: 8px 0 4px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.05;
}

.report-kpi small {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.chart-card {
  margin: 16px 0;
  padding: 18px;
}

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

.chart-head h4 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 18px;
}

.chart-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.legend {
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.legend.stacked {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 0;
  max-width: 360px;
  white-space: normal;
}

.legend span {
  margin-left: 12px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
}

.report-table-title {
  margin: 18px 0 10px;
  color: #0f172a;
  font-size: 18px;
}

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 11px;
  color: #0f172a;
  font-size: 13px;
}

.report-table th {
  background: #eaf0f7;
  color: #334155;
  font-size: 11px;
  text-transform: uppercase;
}

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

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

.report-foot {
  padding: 16px 30px 24px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.master-kpi-table th,
.master-kpi-table td {
  white-space: nowrap;
}

.master-kpi-table th:first-child,
.master-kpi-table td:first-child {
  width: 32%;
  white-space: normal;
}

.score-pill {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(147, 167, 166, 0.18);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.score-a {
  background: rgba(79, 210, 122, 0.28);
  color: #baf8ce;
}

.score-b {
  background: rgba(71, 181, 255, 0.24);
  color: #b9e6ff;
}

.score-c {
  background: rgba(217, 141, 0, 0.24);
  color: #ffd891;
}

.score-d {
  background: rgba(255, 92, 99, 0.24);
  color: #ffccd0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.badge.yellow {
  background: var(--yellow);
}

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

.segment-list div {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 10px;
}

.segment-list small {
  grid-column: 2;
  color: var(--muted);
}

.segment-dot {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 999px;
}

.segment-dot.blue {
  background: var(--blue);
}

.segment-dot.teal {
  background: var(--teal);
}

.segment-dot.amber {
  background: var(--accent);
}

.segment-dot.rose {
  background: var(--rose);
}

.funnel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.funnel div {
  display: flex;
  justify-content: space-between;
  width: var(--w);
  min-width: 42%;
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(0, 168, 143, 0.95), rgba(124, 235, 216, 0.7));
  color: #ffffff;
  font-weight: 700;
}

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

.timeline span {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 168, 143, 0.16);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  min-height: 260px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid rgba(124, 235, 216, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 24%, rgba(0, 168, 143, 0.22), transparent 24rem),
    linear-gradient(90deg, rgba(3, 14, 16, 0.96), rgba(8, 21, 24, 0.9));
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: end;
  padding: 34px;
}

.hero-copy h3 {
  max-width: 780px;
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
}

.hero-copy p:last-child {
  max-width: 620px;
  margin: 0;
  color: #d6e7e5;
  line-height: 1.5;
}

.hero-metrics {
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 28px;
}

.hero-metrics div {
  border: 1px solid rgba(124, 235, 216, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.hero-metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-metrics strong {
  color: #ffffff;
  font-size: 1.8rem;
}

@media (max-width: 1120px) {
  .sales-agent-summary {
    grid-template-columns: 24px minmax(180px, 1fr) auto;
  }

  .sales-row-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .sales-score {
    grid-column: 3;
  }
}

@media (max-width: 760px) {
  .sales-agent-summary {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .sales-score {
    grid-column: 1 / -1;
    width: 100%;
    text-align: left;
  }

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

.collections-report-stack {
  display: grid;
  gap: 22px;
}

#cobranza {
  padding-bottom: 42px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.collections-report-panel {
  border: 1px solid rgba(124, 235, 216, 0.18);
  border-left: 5px solid #f6c431;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 31, 35, 0.96), rgba(8, 14, 16, 0.96));
  box-shadow: var(--shadow);
  overflow: visible;
}

.collections-report-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(124, 235, 216, 0.12);
  background:
    linear-gradient(90deg, rgba(4, 31, 34, 0.78), rgba(12, 26, 29, 0.64)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
}

.collections-report-header h4 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 1.15rem;
}

.report-title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(124, 235, 216, 0.32);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(0, 168, 143, 0.12);
  color: #7cebd8;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-toggle::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(124, 235, 216, 0.28);
  border-radius: 6px;
  color: #f6c431;
}

.report-toggle[aria-expanded="true"]::before {
  content: "-";
}

.collections-report-header .eyebrow {
  color: #f6c431;
  letter-spacing: 0;
}

.collections-report-header .refresh-actions label {
  color: #f6c431;
}

.collections-report-header .refresh-actions input {
  border-color: rgba(124, 235, 216, 0.2);
  background: rgba(5, 12, 14, 0.86);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dynamic-credit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.info-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.info-action:hover,
.info-action:focus-within {
  z-index: 80;
}

.button-info {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 950;
  opacity: 0.88;
  cursor: help;
}

.button-info:hover::after,
.button-info:focus::after {
  content: attr(aria-label);
  position: absolute;
  z-index: 100;
  top: auto;
  bottom: calc(100% + 10px);
  right: 0;
  width: 260px;
  border: 1px solid rgba(124, 235, 216, 0.28);
  border-radius: 8px;
  padding: 9px 10px;
  background: #0f1719;
  color: #f8fafc;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.warning-action {
  position: relative;
  border: 1px solid rgba(250, 204, 21, 0.72);
  border-radius: 8px;
  padding: 0 18px;
  min-height: 42px;
  background: linear-gradient(135deg, #ffe36b 0%, #facc15 44%, #d99b05 100%);
  color: #111827;
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(250, 204, 21, 0.18);
}

.warning-action:hover:not(:disabled) {
  filter: brightness(1.04);
}

.warning-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.copy-limits-action {
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.74);
  border-radius: 8px;
  padding: 0 18px;
  min-height: 42px;
  background: linear-gradient(135deg, #ffbf7a 0%, #f97316 48%, #c2410c 100%);
  color: #111827;
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.18);
}

.copy-limits-action:hover:not(:disabled) {
  filter: brightness(1.04);
}

.copy-limits-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.recalculate-action {
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.74);
  border-radius: 8px;
  padding: 0 18px;
  min-height: 42px;
  background: linear-gradient(135deg, #ffb86b 0%, #f97316 46%, #c2410c 100%);
  color: #111827;
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.18);
}

.recalculate-action:hover:not(:disabled) {
  filter: brightness(1.04);
}

.recalculate-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.primary-action.info-action {
  position: relative;
}

.odoo-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(4px);
}

.odoo-confirm-dialog {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  width: min(520px, 100%);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 12px;
  padding: 22px;
  background: #101719;
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.odoo-confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #111827;
  font-size: 1.55rem;
  font-weight: 950;
}

.odoo-confirm-content h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.05rem;
}

.odoo-confirm-content p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}

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

.odoo-confirm-actions button {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}

.odoo-confirm-cancel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.odoo-confirm-accept {
  border: 1px solid rgba(250, 204, 21, 0.7);
  background: linear-gradient(135deg, #ffe36b, #facc15);
  color: #111827;
}

.embedded-report-shell {
  min-height: 520px;
  padding: 0;
  background: #070b0d;
}

.embedded-report-frame {
  display: block;
  width: 100%;
  min-height: 780px;
  border: 0;
  background: #f8fafc;
}

.collections-report-panel .kpi-status {
  display: none;
}

.collections-report-details {
  border-top: 0;
  background: rgba(3, 10, 12, 0.52);
}

.collections-report-details[open] {
  border-top: 1px solid rgba(124, 235, 216, 0.12);
}

.collections-report-details summary {
  display: none;
}

.collections-report-details summary::-webkit-details-marker {
  display: none;
}

.collections-report-details summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border: 1px solid rgba(124, 235, 216, 0.32);
  border-radius: 6px;
  background: rgba(0, 168, 143, 0.14);
  color: #f6c431;
}

.collections-report-details[open] summary::before {
  content: "-";
}

.client-analysis-dashboard {
  display: grid;
  gap: 18px;
}

.client-analysis-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(124, 235, 216, 0.18);
  border-left: 4px solid #f6c431;
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(4, 23, 25, 0.98), rgba(10, 34, 37, 0.92)),
    radial-gradient(circle at 88% 20%, rgba(246, 196, 49, 0.16), transparent 26%);
  box-shadow: var(--shadow);
}

.client-analysis-head h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.08;
}

.client-analysis-head span {
  color: #f6c431;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

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

.client-metric-card {
  min-height: 132px;
  border: 1px solid rgba(124, 235, 216, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(17, 29, 32, 0.98), rgba(7, 12, 14, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.client-metric-card span,
.client-card-title span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-metric-card strong {
  display: block;
  margin: 14px 0 8px;
  color: #ffffff;
  font-size: 1.72rem;
  line-height: 1;
}

.client-metric-card small {
  color: #cbd5e1;
  font-weight: 700;
}

.client-metric-card.teal {
  border-top-color: rgba(124, 235, 216, 0.7);
}

.client-metric-card.amber {
  border-top-color: rgba(246, 196, 49, 0.78);
}

.client-metric-card.blue {
  border-top-color: rgba(71, 181, 255, 0.74);
}

.client-metric-card.green {
  border-top-color: rgba(79, 210, 122, 0.72);
}

.client-analysis-grid {
  display: grid;
  gap: 18px;
}

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

.client-analysis-card {
  min-width: 0;
  border: 1px solid rgba(124, 235, 216, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(15, 25, 28, 0.98), rgba(7, 12, 14, 0.98));
  box-shadow: var(--shadow);
}

.client-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.client-card-title h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
}

.client-card-title span {
  color: #f6c431;
  text-align: right;
  white-space: nowrap;
}

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

.client-bar-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.95fr) minmax(120px, 1.2fr) minmax(76px, auto);
  align-items: center;
  gap: 12px;
}

.client-bar-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #e8f4f2;
  font-size: 0.78rem;
  font-weight: 800;
}

.client-bar-label b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(246, 196, 49, 0.16);
  color: #f6c431;
  font-size: 0.72rem;
}

.client-bar-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.client-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6c431 0%, #7cebd8 100%);
}

.client-bar-row strong {
  color: #ffffff;
  font-size: 0.8rem;
  text-align: right;
  white-space: nowrap;
}

.client-table-wrap {
  max-height: 520px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid rgba(124, 235, 216, 0.15);
  border-radius: 8px;
}

.client-analysis-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #e8f4f2;
  font-size: 0.78rem;
}

.client-analysis-table th,
.client-analysis-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.client-analysis-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #10181b;
  color: #f6c431;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

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

.client-analysis-table .num {
  text-align: right;
  white-space: nowrap;
}

.empty-report.compact {
  min-height: 80px;
  margin: 0;
  padding: 18px;
  font-size: 0.82rem;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(2, 8, 10, 0.94), rgba(4, 20, 22, 0.94)),
    url("./assets/service-exterior.jpg") center / cover;
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(430px, 100%);
  border: 1px solid rgba(124, 235, 216, 0.24);
  border-radius: 10px;
  padding: 30px;
  background: linear-gradient(180deg, rgba(16, 24, 27, 0.98), rgba(7, 12, 14, 0.98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.login-card img {
  width: 190px;
  height: auto;
}

.login-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.8rem;
}

.login-card input {
  width: 100%;
}

.login-status {
  min-height: 20px;
  margin: 0;
  color: #f6c431;
  font-size: 0.86rem;
  font-weight: 800;
}

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

.config-card {
  border: 1px solid rgba(124, 235, 216, 0.16);
  border-left: 4px solid #f6c431;
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(15, 25, 28, 0.98), rgba(7, 12, 14, 0.98));
  box-shadow: var(--shadow);
}

.config-card h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1.12rem;
}

.config-form-row,
.config-form-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.config-form-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

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

.config-form-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.password-form-grid label {
  grid-column: 1 / -1;
}

.config-form-grid button {
  grid-column: 1 / -1;
  justify-self: start;
}

.config-card select,
.config-card input {
  width: 100%;
}

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

.config-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.config-list-row strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
}

.config-list-row span {
  display: block;
  margin-top: 3px;
  color: #9fb4b2;
  font-size: 0.78rem;
  font-weight: 700;
}

.danger-action {
  min-height: 34px;
  border: 1px solid rgba(255, 92, 99, 0.38);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 92, 99, 0.12);
  color: #ffb8bd;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 900;
}

.danger-action:hover {
  background: rgba(255, 92, 99, 0.2);
}

@media (max-width: 900px) {
  .collections-report-header {
    display: grid;
  }

  .collections-report-header .refresh-actions {
    width: 100%;
  }

  .embedded-report-frame {
    min-height: 680px;
  }
}
