:root {
  --ink: #1b1b1d;
  --muted: #6b6862;
  --paper: #f7f4ee;
  --card: #ffffff;
  --red: #bd5700;
  --red-dark: #813800;
  --blue: #29292c;
  --orange: #f39a22;
  --line: #e2ddd4;
  --green: #16845f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 95% 0%, #ffe1b5 0, transparent 34%), var(--paper); }
button, input, select, textarea { font: inherit; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 42px; display: grid; place-items: center; border-radius: 12px; border-bottom: 4px solid var(--orange); color: #fff; font-size: 15px; letter-spacing: -.04em; font-weight: 900; background: linear-gradient(145deg, #343437, #111113); box-shadow: 0 8px 20px #1b1b1d30; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 19px; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.live { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px; color: #176c4e; background: #e8f7f1; font-size: 13px; font-weight: 700; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #1b9a6820; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.admin-link { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-link:hover { color: var(--red); border-color: #efbd82; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 38px auto 60px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: 12px; letter-spacing: .16em; font-weight: 800; }
h1 { max-width: 680px; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.hero > div > p:last-child { max-width: 660px; margin: 15px 0 0; color: var(--muted); font-size: 17px; }
.channel-strip { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; max-width: 340px; }
.channel-strip span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #ffffffb8; font-size: 11px; font-weight: 700; }
.channel-strip .on { color: #126b4c; border-color: #a7dec9; background: #e8f7f1; }
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.agents article { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #ffffffa8; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 800; }
.javier { background: var(--ink); }.cinthia { background: var(--red); }.maiah { background: #77736d; }
.agents b, .agents small { display: block; }.agents small { margin-top: 3px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: stretch; }
.lead-card, .chat-card, .metrics-card, .inventory-card { border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 16px 45px #1720330a; }
.lead-card { padding: 24px; }
.section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.section-title > span { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 9px; color: var(--red-dark); background: #fff0dc; font-size: 13px; font-weight: 800; }
.section-title h2, .section-title p { margin: 0; }.section-title h2 { font-size: 17px; }.section-title p { margin-top: 3px; color: var(--muted); font-size: 12px; }
label { display: block; margin-bottom: 15px; color: #4c5667; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; margin-top: 7px; border: 1px solid #d8d5cf; border-radius: 10px; color: var(--ink); background: #fbfbfa; outline: none; transition: .18s; }
input, select { height: 44px; padding: 0 12px; } textarea { padding: 11px 12px; resize: none; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px #f39a2226; background: #fff; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.privacy { margin: 3px 0 0; padding: 11px; border-radius: 10px; color: var(--muted); background: #f6f7f8; font-size: 11px; line-height: 1.45; }
.chat-card { display: grid; grid-template-rows: auto minmax(350px, 1fr) auto auto; overflow: hidden; min-height: 590px; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.chat-head b, .chat-head small { display: block; }.chat-head small { margin: 3px 0 0 16px; color: var(--muted); font-size: 11px; }
.online-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.chat-head button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.messages { overflow-y: auto; padding: 24px; background: linear-gradient(180deg, #fbfbfa, #f5f4f1); }
.message { display: flex; align-items: end; gap: 9px; margin-bottom: 16px; }
.message > span { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 800; }
.message > div { max-width: 78%; }.message small { display: block; margin: 0 0 5px 3px; color: var(--muted); font-size: 10px; }
.message p { margin: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px 15px 15px 15px; background: #fff; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.message-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }.message-gallery a { display: block; overflow: hidden; border-radius: 12px; background: #e9e6e0; }.message-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s; }.message-gallery a:hover img { transform: scale(1.025); }
.message.user { flex-direction: row-reverse; }.message.user > span { background: var(--red); }.message.user small { text-align: right; margin-right: 3px; }.message.user p { color: #fff; border: 0; border-radius: 15px 4px 15px 15px; background: var(--red); }
.message.loading p { color: var(--muted); }
.quick-actions { display: flex; gap: 7px; padding: 11px 18px; overflow-x: auto; border-top: 1px solid var(--line); }
.quick-actions button { flex: none; padding: 8px 10px; border: 1px solid #dac6c8; border-radius: 999px; color: var(--red-dark); background: #fff; cursor: pointer; font-size: 11px; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding: 14px 18px 18px; }
.composer textarea { margin: 0; }.composer button { height: 48px; padding: 0 18px; border: 0; border-radius: 11px; color: #fff; background: var(--ink); box-shadow: inset 0 -3px var(--orange); cursor: pointer; font-weight: 800; }
.composer button:disabled { opacity: .55; cursor: wait; }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.metrics-card, .inventory-card { padding: 22px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.metrics div { padding: 13px; border-radius: 12px; background: #f7f6f3; }.metrics strong, .metrics small { display: block; }.metrics strong { font-size: 24px; }.metrics small { color: var(--muted); font-size: 10px; }
.lead-list { margin-top: 14px; }.lead-row { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }.lead-row small { color: var(--muted); }.tag { padding: 5px 8px; border-radius: 999px; color: var(--red-dark); background: #f7e9ea; font-size: 10px; font-weight: 700; }.empty { color: var(--muted); font-size: 12px; }
.inventory-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.vehicle { padding: 13px; border: 1px solid var(--line); border-radius: 12px; }.vehicle b, .vehicle small { display: block; }.vehicle b { font-size: 13px; }.vehicle small { margin-top: 4px; color: var(--muted); font-size: 10px; }.vehicle strong { display: block; margin-top: 9px; color: var(--red); font-size: 15px; }
.error p { color: #8a2430; border-color: #e7b8bd; background: #fff4f5; }
@media (max-width: 850px) { .hero { align-items: start; flex-direction: column; }.channel-strip { justify-content: start; }.workspace, .lower-grid { grid-template-columns: 1fr; }.agents { grid-template-columns: 1fr; }.chat-card { min-height: 600px; } }
@media (max-width: 520px) { .shell { width: min(100% - 20px, 1180px); margin-top: 24px; }.topbar { padding: 0 13px; }.live { font-size: 0; }.live::after { content: "Activo"; font-size: 12px; }.two-cols, .inventory-list { grid-template-columns: 1fr; }.metrics { grid-template-columns: 1fr 1fr; }.composer { grid-template-columns: 1fr; }.composer button { width: 100%; }.message > div { max-width: 88%; } }
