﻿:root {
  --navy: #0f1724;
  --navy-2: #182337;
  --ink: #152033;
  --muted: #6b778b;
  --line: #dfe6ef;
  --soft: #f3f6f8;
  --panel: #ffffff;
  --green: #22c55e;
  --green-dark: #15803d;
  --blue: #2563eb;
  --amber: #f59e0b;
  --red: #dc2626;
  --purple: #7c3aed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(34, 197, 94, .28); outline-offset: 2px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: #fff;
  background: linear-gradient(180deg, #121d2d 0%, var(--navy) 100%);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
}
.brand-mark span {
  width: 36px;
  height: 22px;
  position: relative;
  border-radius: 7px 7px 4px 4px;
  background: var(--navy);
}
.brand-mark span::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -8px;
  width: 26px;
  height: 14px;
  border-radius: 14px 14px 3px 3px;
  background: var(--navy);
}
.brand-mark span::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -5px;
  width: 22px;
  height: 8px;
  border-radius: 99px;
  background: radial-gradient(circle at 2px 4px, var(--green) 0 3px, transparent 4px), radial-gradient(circle at 20px 4px, var(--green) 0 3px, transparent 4px);
}
.brand strong { display: block; font-size: 30px; line-height: 1; }
.brand small { display: block; margin-top: 8px; color: #90a0b7; }

.company-card,
.side-metric {
  border: 1px solid #293a54;
  border-radius: 8px;
  background: var(--navy-2);
}
.company-card {
  min-height: 62px;
  padding: 12px 18px;
  color: #fff;
  text-align: left;
}
.company-card span { display: block; margin-top: 7px; color: #90a0b7; font-size: 12px; }

.nav { display: grid; gap: 8px; }
.nav-item,
.sub-nav {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #c8d3e1;
  background: transparent;
  font-weight: 760;
  text-align: left;
}
.nav-item i {
  width: 24px;
  color: #72839b;
  font-style: normal;
  font-size: 13px;
}
.nav-item.active,
.nav-item:hover {
  color: #07111f;
  background: var(--green);
}
.nav-item.active i,
.nav-item:hover i { color: #07111f; }
.sub-nav { margin-left: 44px; min-height: 30px; color: #90a0b7; }
.sub-nav.active,
.sub-nav:hover { color: #7ee1a4; }

.side-metric {
  margin-top: auto;
  padding: 18px 20px;
}
.side-metric p { margin: 0 0 8px; color: #90a0b7; font-size: 13px; }
.side-metric strong { display: block; font-size: 34px; }
.side-metric span { display: block; margin: 8px 0 16px; color: var(--green); font-size: 13px; font-weight: 800; }
.progress { height: 10px; border-radius: 99px; overflow: hidden; background: #293a54; }
.progress em { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.side-metric svg { width: 100%; height: 54px; margin-top: 12px; }
.side-metric path { fill: none; stroke: var(--amber); stroke-width: 3; }

.workspace { min-width: 0; overflow-x: auto; }
.topbar {
  min-height: 84px;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar div { margin-right: auto; }
.topbar h1 { margin: 0; font-size: 26px; line-height: 1.15; }
.topbar p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-badge { border: 1px solid rgba(34, 197, 94, .26); border-radius: 999px; padding: 5px 10px; color: var(--green-dark); background: #ecfdf5; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.demo-strip { margin: 14px 40px 0; border: 1px solid rgba(34, 197, 94, .2); border-radius: 8px; padding: 12px 14px; color: #116132; background: linear-gradient(135deg, #ecfdf5, #f8fffb); font-weight: 760; }
.select-btn,
.notice-btn {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--ink);
  font-weight: 760;
}
.select-btn { padding: 0 22px; }
.notice-btn {
  width: 42px;
  color: var(--green-dark);
  background: #ecfdf5;
  border-color: #a7f3d0;
  font-weight: 900;
}

.view { display: none; padding: 32px 40px 48px; }
.view.active { display: block; }

.panel,
.kpi-card,
.list-panel,
.inspection-main,
.side-panel,
.automation-panel,
.whatsapp-panel,
.sales-metrics article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(21, 32, 51, 0.05);
}
.panel { padding: 24px 28px; min-width: 0; }
.panel h2,
.list-panel h2,
.side-panel h2,
.whatsapp-panel h2 { margin: 0 0 20px; font-size: 18px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 20px;
}
.kpi-card {
  min-height: 112px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.kpi-card span {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}
.green-icon { color: #16a34a; background: #ecfdf5; }
.blue-icon { color: var(--blue); background: #eff6ff; }
.amber-icon { color: #d97706; background: #fef3c7; }
.red-icon { color: var(--red); background: #fee2e2; }
.purple-icon { color: var(--purple); background: #f5f3ff; }
.kpi-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 760; }
.kpi-card strong { display: block; margin: 8px 0 5px; color: var(--ink); font-size: 34px; line-height: 1; }
.kpi-card small { color: currentColor; font-weight: 760; }

.dashboard-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 28px 24px;
}
.flow-panel { min-height: 330px; }
.flow-list { display: grid; gap: 14px; }
.flow-list button,
.appointment-panel button,
.queue-panel button {
  border: 0;
  border-radius: 8px;
  background: #f7fafc;
  color: var(--ink);
  text-align: left;
}
.flow-list button { min-height: 54px; padding: 10px 16px 10px 60px; position: relative; }
.flow-list i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  left: 20px;
  top: 15px;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.step-green { background: var(--green); color: #07111f !important; }
.step-blue { background: var(--blue); }
.step-amber { background: var(--amber); color: #07111f !important; }
.flow-list b { display: block; font-size: 14px; }
.flow-list small { color: var(--muted); }
.flow-list .ready-line {
  min-height: 34px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  color: var(--green-dark);
  background: #ecfdf5;
  font-weight: 850;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 0; border-bottom: 1px solid #e7ecf3; text-align: left; }
th { color: var(--muted); font-weight: 800; }
td { font-weight: 720; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.green-tag { color: var(--green-dark); background: #ecfdf5; }
.blue-tag { color: var(--blue); background: #eff6ff; }
.amber-tag { color: #b45309; background: #fef3c7; }
.red-tag { color: var(--red); background: #fee2e2; }

.appointment-panel button,
.queue-panel button {
  width: 100%;
  min-height: 50px;
  margin-bottom: 14px;
  padding: 10px 20px;
}
.appointment-panel b,
.queue-panel b { display: block; }
.appointment-panel span,
.queue-panel span { display: block; margin-top: 5px; color: var(--muted); }
.revenue-panel { grid-column: 1 / -1; }
.revenue-panel svg { width: 100%; height: 178px; }
.grid { fill: none; stroke: #e7ecf3; stroke-width: 1; }
.main-line { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; }
.sub-line { fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 7 8; }
.revenue-panel strong { display: block; color: var(--green-dark); font-size: 22px; }

.inspection-layout,
.sales-layout {
  display: grid;
  grid-template-columns: 322px minmax(520px, 1fr) 292px;
  gap: 24px;
}
.list-panel,
.side-panel,
.whatsapp-panel { padding: 28px; }
.search-box { display: block; margin-bottom: 28px; }
.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  outline: 0;
  background: #f7fafc;
}
.inspection-list,
.deal-list { display: grid; gap: 20px; }
.inspection-card,
.deal-card {
  width: 100%;
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.inspection-card.active,
.deal-card.active {
  border-color: var(--green);
  background: #ecfdf5;
}
.inspection-card b,
.inspection-card span,
.inspection-card small,
.deal-card b,
.deal-card span,
.deal-card small { grid-column: 1 / -1; }
.inspection-card b,
.deal-card b { font-size: 17px; }
.inspection-card em,
.deal-card em {
  padding: 6px 12px;
  border-radius: 7px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.green-status { color: var(--green-dark); background: #d1fae5; }
.blue-status { color: var(--blue); background: #eff6ff; }
.amber-status { color: #b45309; background: #fef3c7; }
.inspection-card small,
.deal-card small,
.deal-card span { color: var(--muted); }

.dark-action,
.green-action,
.whatsapp-action {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}
.dark-action { margin-top: 28px; color: #fff; background: var(--navy); }
.green-action { color: #07111f; background: var(--green); }
.whatsapp-action { color: #fff; background: #25d366; }

.inspection-main { padding: 30px; }
.record-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.record-head h2 { margin: 0 0 10px; font-size: 25px; }
.record-head p { margin: 0; color: var(--muted); }
.info-grid { margin: 28px 0 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.info-grid article,
.stat-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: #f7fafc;
}
.info-grid small,
.stat-box small { color: var(--muted); font-weight: 760; }
.info-grid strong,
.stat-box strong { display: block; margin: 12px 0 8px; font-size: 20px; }
.info-grid span { color: var(--muted); font-size: 13px; }

.car-visual {
  height: 198px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  padding: 30px;
  color: #fff;
  background: var(--navy);
}
.car-visual h2 { margin: 0 0 10px; font-size: 22px; }
.car-visual p { margin: 0; color: #90a0b7; }
.car-shape {
  width: 370px;
  height: 90px;
  position: absolute;
  left: 54px;
  bottom: -6px;
  border-radius: 90px 90px 24px 24px;
  background: linear-gradient(180deg, transparent 0 30%, var(--green) 31%);
}
.car-shape::before {
  content: "";
  width: 190px;
  height: 50px;
  position: absolute;
  left: 94px;
  top: 10px;
  border-radius: 28px 28px 6px 6px;
  background: #293a54;
}
.car-shape::after {
  content: "";
  width: 280px;
  height: 46px;
  position: absolute;
  left: 48px;
  bottom: -10px;
  background: radial-gradient(circle at 22px 23px, #07111f 0 18px, #fff 19px 23px, transparent 24px), radial-gradient(circle at 258px 23px, #07111f 0 18px, #fff 19px 23px, transparent 24px);
}
.mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: absolute;
  z-index: 3;
}
.mark-a { left: 86px; top: 58px; background: var(--blue); }
.mark-b { left: 198px; top: 28px; background: var(--amber); }
.mark-c { right: 58px; top: 54px; background: var(--red); }

.controls-panel { margin-top: 30px; }
.ai-price {
  margin-top: 24px;
  min-height: 58px;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  color: var(--green-dark);
  background: #ecfdf5;
  font-size: 18px;
  font-weight: 900;
}
.ai-price strong { margin-left: 6px; }

.side-panel { align-content: start; }
.stat-box { margin-bottom: 22px; }
.stat-box strong { font-size: 31px; }
.side-panel h3,
.whatsapp-panel h3 { margin: 28px 0 14px; font-size: 18px; }
.check-list { list-style: none; display: grid; gap: 14px; padding: 0; margin: 0 0 28px; }
.check-list li {
  min-height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: var(--green-dark);
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 850;
}
.check-list .pending { color: #b45309; background: #fef3c7; }
.side-panel button + button { margin-top: 14px; }

.sales-layout { grid-template-columns: 330px minmax(560px, 1fr) 284px; }
.automation-panel { min-height: 508px; padding: 28px; }
.automation-panel header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.automation-panel h2 { margin: 0; font-size: 20px; }
.automation-panel header span {
  padding: 7px 20px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #d1fae5;
  font-size: 12px;
  font-weight: 900;
}
.flow-canvas {
  height: 410px;
  margin-top: 24px;
  border: 1px solid #e7ecf3;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(#e0e7ef 1px, transparent 1px);
  background-size: 18px 18px;
}
.flow-canvas::before {
  content: "";
  position: absolute;
  left: 114px;
  right: 116px;
  top: 78px;
  height: 2px;
  background: var(--ink);
}
.flow-canvas::after {
  content: "";
  position: absolute;
  left: 114px;
  right: 214px;
  top: 248px;
  height: 2px;
  background: var(--ink);
}
.node {
  position: absolute;
  min-width: 92px;
  min-height: 80px;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  color: var(--green-dark);
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.n1 { left: 28px; top: 38px; }
.n2 { left: 194px; top: 38px; color: var(--blue); background: #eff6ff; border-color: #bfdbfe; }
.n3 { right: 28px; top: 38px; color: #b45309; background: #fef3c7; border-color: #fde68a; }
.n4 { left: 194px; top: 208px; color: var(--purple); background: #f5f3ff; border-color: #ddd6fe; }
.n5 { left: 28px; top: 208px; color: #128c4a; background: #dcf8c6; border-color: #bce9a7; }
.n6 { left: 194px; bottom: 30px; color: var(--red); background: #fee2e2; border-color: #fca5a5; min-height: 54px; }

.sales-metrics {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sales-metrics article { min-height: 122px; padding: 24px 28px; }
.sales-metrics small,
.sales-metrics span { color: var(--muted); font-size: 13px; font-weight: 800; }
.sales-metrics strong { display: block; margin: 12px 0 8px; font-size: 38px; }
.sales-table { margin-top: 28px; min-height: 122px; }

.message {
  min-height: 188px;
  border: 1px solid #bce9a7;
  border-radius: 10px;
  padding: 26px 20px;
  color: var(--ink);
  background: #dcf8c6;
  line-height: 1.9;
}
.whatsapp-panel p {
  min-height: 36px;
  margin: 10px 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--blue);
  background: #f7fafc;
  font-size: 12px;
  font-weight: 850;
}
.whatsapp-panel p span { color: var(--muted); font-weight: 700; }
.whatsapp-panel .green-action { margin-top: 22px; }

.selected,
tbody tr:hover,
.kpi-card:hover,
.node:hover,
.flow-list button:hover,
.appointment-panel button:hover,
.queue-panel button:hover {
  outline: 2px solid rgba(34, 197, 94, 0.32);
  outline-offset: -2px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 20px 44px rgba(15, 23, 36, 0.24);
  opacity: 0;
  transform: translateY(18px);
  transition: .2s;
  pointer-events: none;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1380px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar { padding: 22px 16px; }
  .kpi-grid,
  .dashboard-grid,
  .inspection-layout,
  .sales-layout,
  .sales-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .topbar { flex-wrap: wrap; padding: 18px 22px; }
  .view { padding: 22px; }
  .info-grid { grid-template-columns: 1fr; }
  .sales-metrics { grid-template-columns: 1fr 1fr; }
}
