﻿:root {
  --dark: #122015;
  --dark-2: #1b3322;
  --dark-line: #2d5037;
  --ink: #142018;
  --muted: #6f7b70;
  --line: #dde8dd;
  --soft: #f5f8f4;
  --green: #22c55e;
  --green-soft: #e9fff0;
  --lime: #a3e635;
  --lime-soft: #f3fbdd;
  --amber: #f59e0b;
  --amber-soft: #fff5db;
  --red: #e05245;
  --red-soft: #fff0ee;
  --blue: #2f80ed;
  --blue-soft: #eaf3ff;
  --violet: #7c3aed;
  --violet-soft: #f3eeff;
  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: var(--dark);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: var(--green);
}
.brand-mark span {
  width: 30px;
  height: 24px;
  border: 5px solid var(--dark);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  display: block;
  transform: rotate(180deg);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 18px;
  background: var(--dark);
}
.brand-mark::before { left: 17px; }
.brand-mark::after { right: 17px; }
.brand strong { display: block; font-size: 30px; line-height: 1; }
.brand small { display: block; margin-top: 8px; color: #a3b9a7; }

.company-card,
.side-metric {
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background: var(--dark-2);
}
.company-card {
  min-height: 62px;
  padding: 12px 18px;
  color: #fff;
  text-align: left;
}
.company-card span { display: block; margin-top: 7px; color: #a3b9a7; font-size: 12px; }

.nav { display: grid; gap: 8px; }
.nav-item {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d8e9dc;
  background: transparent;
  font-weight: 760;
  text-align: left;
}
.nav-item i { color: #809a86; font-style: normal; }
.nav-item.active {
  min-height: 46px;
  color: #06140a;
  background: var(--green);
}
.nav-item.active i { color: #06140a; }

.side-metric {
  margin-top: auto;
  min-height: 158px;
  padding: 24px 20px 14px;
}
.side-metric p { margin: 0 0 12px; color: #a3b9a7; font-size: 13px; }
.side-metric strong { display: block; font-size: 34px; line-height: 1; }
.side-metric span { display: block; margin-top: 16px; color: var(--lime); font-size: 13px; font-weight: 800; }
.progress {
  height: 10px;
  margin-top: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--dark-line);
}
.progress em { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.side-metric svg { width: 100%; height: 42px; margin-top: 8px; }
.side-metric path { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; }

.workspace { max-height: 100vh; overflow: auto; }
.topbar {
  min-height: 84px;
  padding: 18px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 26px; line-height: 1.1; }
.topbar p { margin: 8px 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, .28); border-radius: 999px; padding: 5px 10px; color: #15803d; background: var(--green-soft); 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, .24); border-radius: 8px; padding: 12px 14px; color: #166534; background: linear-gradient(135deg, var(--green-soft), #fbfffb); font-weight: 760; }
.select-btn,
.notice-btn,
.panel-heading button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 20px;
  color: var(--ink);
  background: #fafcf9;
  font-weight: 760;
}
.notice-btn {
  width: 40px;
  padding: 0;
  border-radius: 50%;
  color: #15803d;
  background: var(--green-soft);
  border-color: #a7f3d0;
  font-weight: 900;
}

.view { display: none; padding: 32px 40px 48px; }
.view.active { display: block; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 20px;
}
.kpi-card {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  gap: 20px;
  background: #fff;
}
.kpi-card span {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 900;
}
.kpi-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 760; }
.kpi-card strong { display: block; margin-top: 10px; color: var(--ink); font-size: 34px; line-height: 1; }
.kpi-card small { display: block; margin-top: 10px; font-size: 12px; }
.green-icon { color: var(--green); background: var(--green-soft); }
.blue-icon { color: var(--blue); background: var(--blue-soft); }
.lime-icon { color: #3f6212; background: var(--lime-soft); }
.amber-icon { color: var(--amber); background: var(--amber-soft); }
.red-icon { color: var(--red); background: var(--red-soft); }

.dashboard-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .65fr);
  gap: 28px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  background: #fff;
}
.panel h2 { margin: 0; font-size: 20px; }
.panel p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

.zone-panel,
.flow-panel { min-height: 322px; }
.zone-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.zone-tile {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  text-align: left;
  background: #fafcf9;
}
.zone-tile b { color: var(--ink); font-size: 14px; }
.zone-tile small { color: var(--muted); font-size: 12px; font-weight: 700; }
.zone-tile span,
.tag {
  width: max-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 8px 14px;
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 12px;
  font-weight: 800;
  background: color-mix(in srgb, currentColor 14%, #fff);
}
.zone-tile em,
.progress-row div,
.funnel-row div {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  grid-column: 1 / -1;
  background: #e7efe6;
}
.zone-tile em i,
.progress-row i,
.funnel-row i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: currentColor;
}
.green { color: var(--green); }
.blue { color: var(--blue); }
.lime { color: #65a30d; }
.amber { color: var(--amber); }
.red { color: var(--red); }
.violet { color: var(--violet); }

.flow-panel { display: grid; align-content: start; gap: 12px; }
.flow-panel h2 { margin-bottom: 16px; }
.flow-panel button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: #fafcf9;
}
.flow-panel b { color: var(--blue); }
.flow-panel span { font-size: 13px; font-weight: 760; }
.flow-panel em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.flow-panel button:first-of-type em { color: var(--red); }

.service-type-panel,
.revenue-panel { min-height: 292px; }
.progress-row,
.funnel-row {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 166px minmax(120px, 1fr) 84px;
  align-items: center;
  gap: 16px;
}
.progress-row span,
.funnel-row span { font-size: 14px; font-weight: 780; }
.progress-row b,
.funnel-row b { color: var(--muted); font-size: 13px; }
.progress-row i,
.funnel-row i { background: var(--green); }
.progress-row.lime i { background: var(--lime); }
.progress-row.amber i,
.funnel-row.amber i { background: var(--amber); }
.progress-row.blue i,
.funnel-row.blue i { background: var(--blue); }
.funnel-row.red i { background: var(--red); }
.funnel-row.violet i { background: var(--violet); }
.green-tag { color: #15803d; background: var(--green-soft); }
.revenue-panel svg { width: 100%; height: 160px; margin-top: 18px; overflow: visible; }
.revenue-panel polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.revenue-panel path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.revenue-footer { display: flex; align-items: baseline; gap: 32px; }
.revenue-footer strong { font-size: 30px; }
.revenue-footer span { color: var(--muted); font-weight: 760; }

.service-layout,
.automation-layout {
  display: grid;
  grid-template-columns: 382px minmax(420px, 1fr) 284px;
  gap: 28px;
}
.appointment-list,
.application-panel,
.team-panel,
.rule-panel,
.funnel-panel,
.whatsapp-panel { min-height: 792px; }
.appointment-list input {
  width: 100%;
  height: 42px;
  margin: 24px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  outline: none;
  background: #fafcf9;
}
.appointment-card,
.rule-card {
  width: 100%;
  min-height: 92px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 14px 74px;
  display: grid;
  position: relative;
  text-align: left;
  background: #fff;
}
.appointment-card.active,
.rule-card.active { background: var(--green-soft); border-color: #a7f3d0; }
.appointment-card i,
.rule-card i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  left: 20px;
  top: 20px;
  color: #fff;
  background: currentColor;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.rule-card i { font-size: 18px; }
.appointment-card b,
.rule-card b { color: var(--ink); font-size: 15px; }
.appointment-card span,
.rule-card span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.appointment-card em,
.rule-card em { margin-top: 12px; font-style: normal; font-size: 13px; font-weight: 850; }

.route-badge {
  min-width: 66px;
  height: 44px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #06140a;
  background: var(--lime);
  font-weight: 900;
}
.proof-card {
  min-height: 118px;
  margin-top: 30px;
  border-radius: 12px;
  padding: 28px 30px;
  position: relative;
  color: #fff;
  overflow: hidden;
  background: var(--dark);
}
.proof-card::before {
  content: "";
  width: 84%;
  height: 54px;
  position: absolute;
  left: 30px;
  bottom: 20px;
  background:
    linear-gradient(135deg, transparent 0 18%, var(--green) 18% 22%, transparent 22% 38%, var(--green) 38% 42%, transparent 42% 62%, var(--green) 62% 66%, transparent 66%);
}
.proof-card span,
.proof-card small { display: block; position: relative; z-index: 1; }
.proof-card span { font-size: 16px; font-weight: 850; }
.proof-card small { margin-top: 12px; color: #d8e9dc; font-size: 13px; }
.proof-card b {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  right: 34px;
  top: 32px;
  color: #3f6212;
  background: var(--lime-soft);
  font-size: 24px;
}
.checklist { margin-top: 28px; display: grid; gap: 18px; }
.check-row {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: #fff;
}
.check-row i { width: 20px; height: 20px; border-radius: 5px; background: currentColor; }
.check-row span b,
.check-row span small { display: block; color: var(--ink); }
.check-row span small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.check-row em {
  min-height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  background: color-mix(in srgb, currentColor 14%, #fff);
}

.team-card {
  min-height: 72px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  background: #fafcf9;
}
.team-card.active { border-color: #a7f3d0; background: var(--green-soft); }
.team-card b,
.team-card span { display: block; }
.team-card span { margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.team-card em { grid-row: 1 / 3; grid-column: 2; align-self: end; color: var(--green); font-style: normal; font-weight: 900; }
.stock-card {
  min-height: 150px;
  margin-top: 28px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 24px 20px;
  background: var(--green-soft);
}
.stock-card b,
.stock-card span,
.stock-card strong { display: block; }
.stock-card b { color: #15803d; font-size: 17px; }
.stock-card span { margin-top: 12px; color: var(--muted); font-size: 13px; }
.stock-card strong { margin-top: 20px; color: #15803d; }
.route-card {
  min-height: 92px;
  margin-top: 38px;
  border-radius: 12px;
  padding: 22px 20px;
  color: #fff;
  background: var(--dark);
}
.route-card span,
.route-card strong { display: block; }
.route-card span { color: #d8e9dc; }
.route-card strong { margin-top: 12px; font-size: 34px; }

.rule-card { min-height: 96px; margin-top: 24px; border-radius: 12px; }
.funnel-row { margin-top: 34px; grid-template-columns: minmax(150px, 1fr) minmax(120px, 1fr) 48px; }
.report-card {
  min-height: 134px;
  margin-top: 70px;
  border-radius: 12px;
  padding: 28px 24px;
  color: #fff;
  background: var(--dark);
}
.report-card b,
.report-card span,
.report-card strong { display: block; }
.report-card b { font-size: 17px; }
.report-card span { margin-top: 12px; color: #d8e9dc; font-size: 13px; }
.report-card strong { margin-top: 22px; color: var(--green); font-size: 13px; }

.phone {
  width: 228px;
  height: 500px;
  margin: 34px auto 0;
  border-radius: 28px;
  padding: 28px 16px;
  background: var(--dark);
}
.phone-screen {
  height: 100%;
  border-radius: 20px;
  padding: 28px 18px;
  background: #eaf7ef;
}
.phone-screen h3 { margin: 0 0 24px; color: #075e54; font-size: 14px; }
.bubble {
  width: 150px;
  min-height: 92px;
  margin-top: 26px;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.bubble.outgoing {
  width: 120px;
  min-height: 70px;
  margin-left: auto;
  color: #075e54;
  background: #dcf8c6;
  font-weight: 800;
}
.bubble.wide { width: 158px; min-height: 78px; }
.queue-card {
  min-height: 86px;
  margin-top: 34px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 24px;
  background: var(--green-soft);
}
.queue-card b,
.queue-card span { display: block; }
.queue-card b { color: #15803d; font-size: 15px; }
.queue-card span { margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }

.selected {
  outline: 3px solid rgba(34, 197, 94, .24);
  outline-offset: 2px;
}

#toast {
  min-width: 260px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 10px;
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 10;
  color: #fff;
  background: var(--dark);
  box-shadow: 0 20px 50px rgba(18, 32, 21, .24);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: .2s ease;
}
#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar { padding: 24px 18px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .dashboard-grid,
  .service-layout,
  .automation-layout { grid-template-columns: 1fr; }
  .appointment-list,
  .application-panel,
  .team-panel,
  .rule-panel,
  .funnel-panel,
  .whatsapp-panel { min-height: auto; }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; }
  .topbar { grid-template-columns: 1fr; position: static; }
  .view { padding: 22px; }
  .kpi-grid,
  .zone-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .progress-row,
  .funnel-row { grid-template-columns: 1fr; }
}
