/* =============================================================================
 *  Luxury Agent Strategy — AI Chief of Staff
 *  Palette: black #0A0A0A · gold #C9A227 · cream #F5F1E8
 *  Layout: left sidebar navigation · single focused panel in the center.
 * ========================================================================== */

:root {
  --black: #0a0a0a;
  --panel: #121212;
  --panel-2: #171717;
  --line: rgba(201, 162, 39, 0.16);
  --line-soft: rgba(245, 241, 232, 0.08);
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.12);
  --gold-dim: rgba(201, 162, 39, 0.55);
  --cream: #f5f1e8;
  --cream-dim: rgba(245, 241, 232, 0.62);
  --cream-faint: rgba(245, 241, 232, 0.38);
  --radius: 16px;
  --sidebar-w: 288px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  /* subtle warm vignette so the black isn't flat */
  background-image:
    radial-gradient(1200px 600px at 82% -8%, rgba(201, 162, 39, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(201, 162, 39, 0.035), transparent 55%);
  background-attachment: fixed;
}

/* =============================================================================
 *  Shell — sidebar + main
 * ========================================================================== */
.shell {
  display: flex;
  min-height: 100vh;
}

/* ---- Brand ---------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 24px rgba(201, 162, 39, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-line-1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.3px;
  color: var(--cream);
}

.brand-line-2 {
  font-size: 10.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-top: 2px;
}

/* =============================================================================
 *  Sidebar
 * ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 24px;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.7), rgba(10, 10, 10, 0.7));
  backdrop-filter: blur(4px);
}

.sidebar > .brand {
  padding: 0 12px 30px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

/* ---- Nav ------------------------------------------------------------------ */
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--cream-dim);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover {
  background: rgba(245, 241, 232, 0.04);
  color: var(--cream);
}

.nav-item .nav-icon {
  color: var(--gold-dim);
  font-size: 9px;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}

.nav-item .nav-label {
  flex: 1;
}

.nav-item .nav-count {
  font-size: 10.5px;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--gold-dim);
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active {
  background: var(--gold-soft);
  border-color: var(--line);
  color: var(--cream);
}

.nav-item.active .nav-icon {
  color: var(--gold);
  transform: scale(1.05);
}

.nav-item.active .nav-count {
  color: var(--gold);
}

/* ---- Sidebar footer / agent chip ----------------------------------------- */
.sidebar-foot {
  padding-top: 18px;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.agent-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.agent-chip .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.agent-chip .who {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}

.agent-chip .who .n {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--cream);
}

.agent-chip .who .m {
  font-size: 11.5px;
  color: var(--cream-faint);
}

/* =============================================================================
 *  Main content area
 * ========================================================================== */
.main {
  flex: 1;
  min-width: 0;
  max-width: 940px;
  margin: 0 auto;
  padding: 52px 48px 64px;
  width: 100%;
}

.panel {
  animation: panelIn 0.32s ease both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Panel header (shared) ------------------------------------------------ */
.panel-head {
  margin-bottom: 34px;
}

.panel-head .eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

.panel-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: 0.2px;
  color: var(--cream);
  line-height: 1.1;
}

.panel-head .panel-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--cream-faint);
}

/* Legacy card-title (kept for internal render blocks) */
.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-title h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.2px;
  color: var(--cream);
}

.card-title .eyebrow {
  font-size: 10.5px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.count-pill {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  background: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* =============================================================================
 *  Daily Brief
 * ========================================================================== */
.brief-greeting {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 14px;
}

.brief-summary {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--cream-dim);
  max-width: 68ch;
  margin-bottom: 40px;
}

.brief-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
}

.brief-block h3 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 16px;
  font-weight: 600;
}

.agenda-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-item .t {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 76px;
  font-weight: 500;
}

.agenda-item .l {
  color: var(--cream-dim);
}

.priority-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 12px 0;
  font-size: 14.5px;
  color: var(--cream-dim);
  border-bottom: 1px solid var(--line-soft);
}

.priority-item:last-child {
  border-bottom: none;
}

.priority-item .num {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

/* =============================================================================
 *  Hot Leads
 * ========================================================================== */
.lead {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.lead:first-of-type {
  padding-top: 4px;
}

.lead:last-child {
  border-bottom: none;
}

.lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.lead-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--cream);
}

.lead-meta {
  font-size: 13px;
  color: var(--cream-faint);
  margin-bottom: 10px;
}

.lead-meta .dot {
  margin: 0 7px;
  color: var(--gold-dim);
}

.lead-action {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--cream-dim);
  background: rgba(201, 162, 39, 0.05);
  border-left: 2px solid var(--gold);
  padding: 11px 14px;
  border-radius: 0 8px 8px 0;
}

.lead-action .tag {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 1px;
}

.status {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-hot {
  color: #e8bd3a;
  background: rgba(201, 162, 39, 0.16);
  border: 1px solid var(--line);
}

.status-warm {
  color: var(--cream-dim);
  background: rgba(245, 241, 232, 0.06);
  border: 1px solid var(--line-soft);
}

.status-under-contract {
  color: #7fd1a8;
  background: rgba(127, 209, 168, 0.1);
  border: 1px solid rgba(127, 209, 168, 0.24);
}

/* =============================================================================
 *  Drafts
 * ========================================================================== */
.draft {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.draft:last-child {
  margin-bottom: 0;
}

.draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.draft-to {
  font-weight: 600;
  font-size: 15px;
  color: var(--cream);
}

.draft-channel {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.draft-subject {
  font-size: 13px;
  color: var(--cream-faint);
  font-style: italic;
  margin-bottom: 12px;
}

.draft-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream-dim);
  margin-bottom: 18px;
}

.draft-actions {
  display: flex;
  gap: 10px;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  background: var(--gold);
  color: #1a1400;
  border-color: var(--gold);
}

.btn-gold:hover {
  background: #d9b23a;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-approved {
  background: rgba(127, 209, 168, 0.12);
  color: #7fd1a8;
  border-color: rgba(127, 209, 168, 0.3);
  cursor: default;
}

/* =============================================================================
 *  Tasks
 * ========================================================================== */
.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  user-select: none;
}

.task:last-child {
  border-bottom: none;
}

.task .box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--gold-dim);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task .box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.task.done .box {
  background: var(--gold);
  border-color: var(--gold);
}

.task.done .box svg {
  opacity: 1;
}

.task .label {
  font-size: 14.5px;
  color: var(--cream);
  transition: color 0.15s ease;
}

.task.done .label {
  color: var(--cream-faint);
  text-decoration: line-through;
  text-decoration-color: var(--gold-dim);
}

.tasks-progress {
  margin-top: 22px;
  font-size: 12px;
  color: var(--cream-faint);
  letter-spacing: 0.4px;
}

/* =============================================================================
 *  Transaction Timelines
 * ========================================================================== */
.txn {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.txn:first-of-type {
  padding-top: 4px;
}

.txn:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.txn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.txn-addr {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--cream);
}

.txn-price {
  color: var(--gold);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.txn-sub {
  font-size: 12.5px;
  color: var(--cream-faint);
  margin: 4px 0 14px;
}

.txn-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.08);
  overflow: hidden;
  margin-bottom: 16px;
}

.txn-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
}

.txn-miles {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mile {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mile .ml {
  color: var(--cream-dim);
  font-weight: 500;
}

.mile .md {
  color: var(--cream-faint);
  font-size: 11px;
}

.mile.due {
  border-color: var(--line);
  background: rgba(201, 162, 39, 0.08);
}

.mile.due .ml {
  color: var(--gold);
}

.mile.due .md {
  color: var(--gold-dim);
}

.mile.done .ml {
  color: var(--cream-faint);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}

/* =============================================================================
 *  Chat
 * ========================================================================== */
.chat-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cream-dim);
  margin-bottom: 24px;
  max-width: 70ch;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.chat-thread:empty {
  margin-bottom: 0;
}

.bubble {
  max-width: 80%;
  padding: 13px 17px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.bubble.me {
  align-self: flex-end;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}

.bubble.ai {
  align-self: flex-start;
  background: rgba(245, 241, 232, 0.04);
  border: 1px solid var(--line-soft);
  color: var(--cream-dim);
  border-bottom-left-radius: 4px;
}

.bubble.ai .ai-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 5px;
}

.chat-composer {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.chat-composer:focus-within {
  border-color: var(--line);
}

.chat-composer textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  padding: 12px 0;
  max-height: 320px;
  min-height: 26px;
}

.chat-composer textarea::placeholder {
  color: var(--cream-faint);
}

.chat-send {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  margin-bottom: 2px;
}

.chat-send svg {
  width: 15px;
  height: 15px;
}

.chat-hint {
  margin-top: 11px;
  font-size: 11.5px;
  color: var(--cream-faint);
  letter-spacing: 0.3px;
}

/* =============================================================================
 *  Footer
 * ========================================================================== */
.footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cream-faint);
}

/* =============================================================================
 *  Mobile top bar + hamburger (hidden on desktop)
 * ========================================================================== */
.mobilebar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand--mobile {
  gap: 10px;
}

.brand--mobile .brand-line-1 {
  font-size: 15px;
}

.mobilebar-spacer {
  width: 24px;
  flex-shrink: 0;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 22px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* =============================================================================
 *  Responsive
 * ========================================================================== */
@media (max-width: 900px) {
  .shell {
    flex-direction: column;
  }

  .mobilebar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    height: 100vh;
    width: min(300px, 84vw);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #141414, #0c0c0c);
    backdrop-filter: none;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .backdrop {
    opacity: 1;
  }

  .main {
    padding: 30px 22px 56px;
    max-width: 100%;
  }

  .brief-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 24px 16px 48px;
  }

  .panel-head h1 {
    font-size: 26px;
  }

  .chat-send span {
    display: none;
  }

  .lead-top {
    flex-wrap: wrap;
  }

  .draft {
    padding: 16px 16px;
  }
}
