:root {
  --bg: #0c1110;
  --bg-2: #121918;
  --card: #171f1d;
  --line: #2a3532;
  --text: #e7eee9;
  --muted: #93a39b;
  --gold: #d4a574;
  --gold-2: #f0d2a8;
  --green: #3dcc8a;
  --red: #e36b6b;
  --blue: #7eb6c9;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --sans: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(212, 165, 116, 0.08), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(61, 204, 138, 0.06), transparent 45%),
    var(--bg);
  color: var(--text);
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--gold); }
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.nav {
  background: #0a0f0e;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #8c5b32);
  display: grid; place-items: center; font-weight: 800; color: #1a120c;
  font-size: 15px; letter-spacing: 0;
}
.brand h1 { font-size: 16px; margin: 0; letter-spacing: 0.04em; }
.brand p { margin: 0; color: var(--muted); font-size: 11px; }
.nav button {
  background: transparent; color: var(--muted); border: 0; text-align: left;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px;
}
.nav button.active, .nav button:hover { background: var(--card); color: var(--text); }
.nav .grow { flex: 1; }
.key-pill {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px;
}
.key-pill.ok { color: var(--green); border-color: #245c43; }
main { padding: 28px 32px 60px; overflow: auto; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.stat, .card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat { padding: 18px 20px; min-width: 160px; flex: 1; }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .v { font-size: 28px; margin-top: 6px; font-weight: 700; }
.card { padding: 22px; margin-top: 18px; }
h2 { margin: 0 0 6px; font-size: 22px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.client, .did-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--bg-2);
}
.did-row { cursor: default; }
.did-row h3 { margin: 0; font-size: 15px; }
.did-row span { color: var(--muted); font-size: 12px; }
.client:hover { border-color: var(--gold); }
.client h3 { margin: 0; font-size: 15px; }
.client span { color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #245c43; color: var(--green); }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  background: var(--gold); color: #1a120c; border: 0; border-radius: 10px;
  padding: 10px 14px; font-weight: 700; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #5a2424; color: #ffd5d5; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.phone {
  background: #0b0f0e; border: 1px solid var(--line); border-radius: 28px;
  padding: 18px; max-width: 420px;
}
.phone-top { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.wave { height: 54px; display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px 0 16px; }
.bar { width: 4px; height: 10px; background: var(--gold); border-radius: 4px; animation: pulse 1s infinite ease-in-out; }
.bar:nth-child(2n) { animation-delay: 0.15s; background: var(--green); }
.bar:nth-child(3n) { animation-delay: 0.3s; }
@keyframes pulse { 0%,100% { height: 8px; opacity: 0.4; } 50% { height: 36px; opacity: 1; } }
.transcript { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.bubble { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.bubble.user { background: #24332e; align-self: flex-end; }
.bubble.assistant { background: #2a241c; border: 1px solid #4a3a28; }
.chatbox { display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.chat-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; max-height: 420px; }
.composer { display: flex; gap: 8px; }
.composer input { flex: 1; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.play { display: grid; gap: 12px; }
.play article { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.play h3 { margin: 0 0 8px; font-size: 15px; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.warn { color: #e2b455; }
.ok { color: var(--green); }
.hidden { display: none !important; }
.week-cal-scroll {
  overflow-x: auto;
  margin: 16px 0 8px;
}
.week-cal {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0;
  min-width: 822px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.week-hours {
  position: relative;
  border-right: 1px solid var(--line);
  padding-top: 44px;
}
.hour-label {
  position: absolute;
  left: 0; right: 4px;
  transform: translateY(-7px);
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  padding-right: 6px;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  min-width: 770px;
}
.day-col {
  border-left: 1px solid var(--line);
  min-width: 110px;
  display: flex;
  flex-direction: column;
  background: var(--card);
}
.day-col:first-child { border-left: 0; }
.day-col h3 {
  font-size: 13px;
  margin: 0;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  background: var(--bg-2);
}
.day-body {
  position: relative;
  flex: 1;
  overflow: visible;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--hour) - 1px),
      var(--line) calc(var(--hour) - 1px),
      var(--line) var(--hour)
    );
}
.day-col.closed .day-body {
  background: repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.03) 8px, rgba(255,255,255,0.03) 16px);
}
.day-closed {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--muted); font-size: 12px;
}
.slot {
  position: absolute;
  left: 4px; right: 4px;
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 2px;
  text-align: left; margin: 0; padding: 6px 7px;
  border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: inherit; cursor: pointer; font-size: 12px;
  line-height: 1.25; overflow: visible;
}
.slot span { color: var(--muted); font-size: 11px; white-space: normal; overflow: visible; }
.day-body[data-day] { cursor: pointer; }
.slot.booked { background: #2a241c; border-color: var(--gold); z-index: 2; cursor: pointer; min-height: 48px; }
.slot.bot { box-shadow: inset 3px 0 0 var(--green); }
.slot.past { opacity: 0.35; cursor: default; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; }
  main { padding: 18px; }
}
