﻿:root {
  --navy: #0b1826;
  --navy-2: #12263a;
  --ink: #132032;
  --muted: #6f7f91;
  --line: #dfe8f0;
  --soft: #f5f8fb;
  --panel: #ffffff;
  --teal: #28c7b7;
  --teal-dark: #0f8b7d;
  --blue: #2563eb;
  --amber: #f6c85f;
  --amber-dark: #d97706;
  --red: #e23e57;
  --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(40, 199, 183, .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, #102338 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(--teal);
}
.brand-mark span {
  width: 24px;
  height: 34px;
  border-radius: 18px 18px 18px 4px;
  position: relative;
  transform: rotate(22deg);
  background: var(--navy);
}
.brand-mark span::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  left: 8px;
  top: 9px;
  background: #e6fffb;
}
.brand strong { display: block; font-size: 30px; line-height: 1; }
.brand small { display: block; margin-top: 8px; color: #92a8bd; }

.company-card,
.side-metric {
  border: 1px solid #243a50;
  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: #92a8bd; 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: #c7d6e3;
  background: transparent;
  font-weight: 760;
  text-align: left;
}
.nav-item i {
  width: 24px;
  color: #7290a8;
  font-style: normal;
  font-size: 13px;
}
.nav-item.active,
.nav-item:hover {
  color: #07151f;
  background: var(--teal);
}
.nav-item.active i,
.nav-item:hover i { color: #07151f; }
.sub-nav { margin-left: 44px; min-height: 30px; color: #92a8bd; }
.sub-nav.active,
.sub-nav:hover { color: #87f4ea; }

.side-metric {
  margin-top: auto;
  padding: 18px 20px;
}
.side-metric p { margin: 0 0 8px; color: #92a8bd; font-size: 13px; }
.side-metric strong { display: block; font-size: 34px; }
.side-metric span { display: block; margin: 8px 0 16px; color: var(--teal); font-size: 13px; font-weight: 800; }
.progress { height: 10px; border-radius: 99px; overflow: hidden; background: #243a50; }
.progress em { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.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(40, 199, 183, .26); border-radius: 999px; padding: 5px 10px; color: var(--teal-dark); background: #e6fffb; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.demo-strip { margin: 14px 40px 0; border: 1px solid rgba(40, 199, 183, .22); border-radius: 8px; padding: 12px 14px; color: #0f6f66; background: linear-gradient(135deg, #e6fffb, #f7fffd); font-weight: 760; }
.select-btn,
.notice-btn {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  font-weight: 760;
}
.select-btn { padding: 0 22px; }
.notice-btn {
  width: 42px;
  color: var(--teal-dark);
  background: #e6fffb;
  border-color: #a6f4ea;
  font-weight: 900;
}

.view { display: none; padding: 32px 40px 48px; }
.view.active { display: block; }

.panel,
.kpi-card,
.list-panel,
.booking-main,
.side-panel,
.automation-panel,
.whatsapp-panel,
.automation-metrics article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(19, 32, 50, 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;
}
.teal-icon { color: var(--teal-dark); background: #e6fffb; }
.blue-icon { color: var(--blue); background: #eff6ff; }
.amber-icon { color: var(--amber-dark); background: #fff7e6; }
.red-icon { color: var(--red); background: #ffecef; }
.purple-icon { color: var(--purple); background: #f4f1ff; }
.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.15fr .95fr;
  gap: 28px 24px;
}
.schedule-panel { min-height: 330px; }
.calendar-grid {
  display: grid;
  grid-template-columns: 72px repeat(5, 1fr);
  grid-auto-rows: 54px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.calendar-grid b,
.calendar-grid strong { color: var(--muted); }
.calendar-grid i {
  height: 34px;
  border: 1px solid #e7eef5;
  border-radius: 7px;
  background: #fbfcfe;
}
.slot {
  min-height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-weight: 800;
}
.teal-slot { color: var(--teal-dark); background: #e6fffb; }
.blue-slot { color: var(--blue); background: #eff6ff; }
.amber-slot { color: var(--amber-dark); background: #fff7e6; }
.red-slot { color: var(--red); background: #ffecef; }
.purple-slot { color: var(--purple); background: #f4f1ff; }

.donut-wrap { display: flex; align-items: center; gap: 34px; min-height: 248px; }
.donut {
  width: 184px;
  height: 184px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: radial-gradient(circle, #fff 0 54%, transparent 55%), conic-gradient(var(--teal) 0 76%, var(--blue) 76% 88%, #e7eef5 88% 100%);
}
.donut strong { font-size: 36px; }
.donut span { color: var(--muted); font-size: 13px; font-weight: 760; }
.donut-wrap ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; font-size: 13px; font-weight: 760; }
.donut-wrap li { display: flex; align-items: center; gap: 12px; }
.donut-wrap i { width: 14px; height: 14px; border-radius: 50%; }
.teal-dot { background: var(--teal); }
.blue-dot { background: var(--blue); }
.red-dot { background: var(--red); }
.gold-dot { background: var(--amber); }

.task-panel button,
.queue-panel button {
  width: 100%;
  min-height: 50px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--ink);
  background: #f8fbfd;
  text-align: left;
}
.task-panel b,
.queue-panel b { display: block; }
.task-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: #e7eef5; stroke-width: 1; }
.main-line { fill: none; stroke: var(--teal); 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(--teal-dark); font-size: 22px; }

.booking-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: #f8fbfd;
}
.booking-list { display: grid; gap: 20px; }
.booking-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;
}
.booking-card.active {
  border-color: var(--teal);
  background: #e6fffb;
}
.booking-card b,
.booking-card span,
.booking-card small { grid-column: 1 / -1; }
.booking-card b { font-size: 17px; }
.booking-card em {
  padding: 6px 12px;
  border-radius: 7px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.teal-status { color: var(--teal-dark); background: #d6fdf7; }
.blue-status { color: var(--blue); background: #eff6ff; }
.amber-status { color: var(--amber-dark); background: #fff7e6; }
.booking-card small,
.booking-card span { color: var(--muted); }

.dark-action,
.teal-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); }
.teal-action { color: #07151f; background: var(--teal); }
.whatsapp-action { color: #fff; background: #25d366; }

.booking-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); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.teal-tag { color: var(--teal-dark); background: #e6fffb; }
.blue-tag { color: var(--blue); background: #eff6ff; }
.amber-tag { color: var(--amber-dark); background: #fff7e6; }

.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: #f8fbfd;
}
.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; }

.team-plan {
  min-height: 180px;
  border-radius: 10px;
  padding: 30px;
  color: #fff;
  background: var(--navy);
}
.team-plan h2 { margin: 0 0 10px; font-size: 22px; }
.team-plan p { margin: 0 0 34px; color: #92a8bd; }
.team-plan div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.team-plan span {
  min-height: 52px;
  border: 1px solid #243a50;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: var(--navy-2);
  font-weight: 900;
}

.details-panel { margin-top: 30px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { padding: 13px 0; border-bottom: 1px solid #e7eef5; text-align: left; }
td:first-child { color: var(--muted); }
td:last-child { font-weight: 850; }
.total-box {
  min-height: 86px;
  margin-top: 28px;
  border: 1px solid #a6f4ea;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 24px;
  padding: 18px 28px;
  background: #e6fffb;
}
.total-box small { grid-column: 1 / -1; color: var(--muted); font-weight: 760; }
.total-box strong { color: var(--teal-dark); font-size: 34px; }
.total-box span { color: var(--muted); font-size: 13px; }

.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(--teal-dark);
  background: #e6fffb;
  font-size: 13px;
  font-weight: 850;
}
.check-list .pending { color: var(--amber-dark); background: #fff7e6; }
.check-list .info { color: var(--blue); background: #eff6ff; }
.side-panel button + button { margin-top: 14px; }

.automation-layout {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 334px;
  gap: 24px;
}
.automation-panel { min-height: 628px; 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(--teal-dark);
  background: #d6fdf7;
  font-size: 12px;
  font-weight: 900;
}
.flow-canvas {
  height: 532px;
  margin-top: 24px;
  border: 1px solid #e7eef5;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(#dfe8f0 1px, transparent 1px);
  background-size: 18px 18px;
}
.flow-canvas::before {
  content: "";
  position: absolute;
  left: 122px;
  right: 104px;
  top: 89px;
  height: 2px;
  background: var(--ink);
}
.flow-canvas::after {
  content: "";
  position: absolute;
  left: 122px;
  right: 142px;
  top: 290px;
  height: 2px;
  background: var(--ink);
}
.node {
  position: absolute;
  min-width: 92px;
  min-height: 92px;
  border: 1px solid #a6f4ea;
  border-radius: 10px;
  color: var(--teal-dark);
  background: #e6fffb;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.n1 { left: 30px; top: 44px; }
.n2 { left: 236px; top: 44px; color: var(--blue); background: #eff6ff; border-color: #bbd5ff; }
.n3 { left: 484px; top: 44px; color: var(--amber-dark); background: #fff7e6; border-color: #ffe0a8; }
.n4 { right: 30px; top: 44px; }
.n5 { right: 220px; top: 244px; color: #128c4a; background: #dcf8c6; border-color: #bce9a7; }
.n6 { left: 226px; top: 244px; color: var(--amber-dark); background: #fff7e6; border-color: #ffe0a8; }
.n7 { left: 30px; top: 244px; color: var(--purple); background: #f4f1ff; border-color: #ddd6fe; }
.n8 { right: 30px; top: 244px; }
.n9 { right: 104px; bottom: 36px; color: var(--red); background: #ffecef; border-color: #ffc3ca; }

.message {
  min-height: 194px;
  border: 1px solid #bce9a7;
  border-radius: 10px;
  padding: 26px 22px;
  color: var(--ink);
  background: #dcf8c6;
  line-height: 1.9;
}
.whatsapp-panel p {
  min-height: 42px;
  margin: 10px 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--blue);
  background: #f8fbfd;
  font-size: 13px;
  font-weight: 850;
}
.whatsapp-panel p span { color: var(--muted); font-weight: 700; }
.whatsapp-panel .teal-action { margin-top: 22px; }

.automation-metrics {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.automation-metrics article { min-height: 128px; padding: 24px 28px; }
.automation-metrics small,
.automation-metrics span { color: var(--muted); font-size: 13px; font-weight: 800; }
.automation-metrics strong { display: block; margin: 12px 0 8px; font-size: 40px; }

.selected,
tbody tr:hover,
.kpi-card:hover,
.node:hover,
.task-panel button:hover,
.queue-panel button:hover {
  outline: 2px solid rgba(40, 199, 183, 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(11, 24, 38, 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,
  .booking-layout,
  .automation-layout,
  .automation-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; }
  .automation-metrics { grid-template-columns: 1fr 1fr; }
}
