/* ═══════════════════════════════════════════════════════════════════
   ORO OBSIDIANA · Sistema de diseño
   Todos los colores son tokens. Nada de hex sueltos en las vistas.
   Modo oscuro (por defecto) y claro marfil. Contraste AA.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #F7F3EA;
  --bg-2: #EFE8DA;
  --surface: #FFFDF8;
  --surface-2: #F8F2E6;
  --line: #E4D9C3;
  --line-strong: #CDBB95;
  --ink: #1C1812;
  --ink-2: #4A4133;
  --muted: #7A6D57;
  --gold: #9C7A2E;
  --gold-2: #B8923F;
  --gold-3: #D9B866;
  --gold-soft: rgba(184, 146, 63, 0.12);
  --gold-glow: rgba(201, 164, 92, 0.25);
  --on-gold: #1A1408;
  --ok: #1E7A4E; --ok-bg: rgba(30, 122, 78, 0.12);
  --warn: #9A6207; --warn-bg: rgba(214, 150, 30, 0.16);
  --info: #245DA8; --info-bg: rgba(36, 93, 168, 0.12);
  --neutral: #5F5A52; --neutral-bg: rgba(95, 90, 82, 0.12);
  --danger: #A8322A; --danger-bg: rgba(168, 50, 42, 0.12);
  --teal: #0D9488;
  --chart-1: #245DA8; --chart-2: #C98A1C; --chart-3: #0D9488;
  --shadow-float: 0 24px 60px -20px rgba(28, 24, 18, 0.35), 0 0 0 1px var(--line);
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --stripe: repeating-linear-gradient(45deg, transparent 0 7px, rgba(156, 122, 46, 0.08) 7px 8px);
}
.dark {
  --bg: #0B0A08;
  --bg-2: #100E0B;
  --surface: #15130F;
  --surface-2: #1B1813;
  --line: #2A251C;
  --line-strong: #4A3F2A;
  --ink: #F3ECDC;
  --ink-2: #CFC4AC;
  --muted: #9A8E75;
  --gold: #E6C77A;
  --gold-2: #C9A45C;
  --gold-3: #F3DFA6;
  --gold-soft: rgba(201, 164, 92, 0.10);
  --gold-glow: rgba(230, 199, 122, 0.22);
  --on-gold: #140F05;
  --ok: #5FD39A; --ok-bg: rgba(95, 211, 154, 0.12);
  --warn: #F0C05A; --warn-bg: rgba(240, 192, 90, 0.13);
  --info: #7FB2F0; --info-bg: rgba(127, 178, 240, 0.12);
  --neutral: #B3AB9C; --neutral-bg: rgba(179, 171, 156, 0.12);
  --danger: #F08A80; --danger-bg: rgba(240, 138, 128, 0.12);
  --teal: #2FA8A8;
  --chart-1: #7FB2F0; --chart-2: #E6C77A; --chart-3: #2FA8A8;
  --shadow-float: 0 30px 80px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line-strong);
  --stripe: repeating-linear-gradient(45deg, transparent 0 7px, rgba(230, 199, 122, 0.05) 7px 8px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 85% -10%, var(--gold-soft), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--gold-soft), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-glow); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: .6rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: .75rem; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) { .g6 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; } }

/* Boot */
.boot { height: 100vh; display: grid; place-items: center; align-content: center; gap: 1.5rem; }
.boot-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 700 34px var(--serif); color: var(--on-gold); background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 55%, var(--gold)); box-shadow: 0 10px 40px var(--gold-glow); }
.boot-bar { width: 140px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; position: relative; }
.boot-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: slide 1.1s infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ─── Layout ─── */
.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; transition: grid-template-columns .2s; }
.layout.collapsed { grid-template-columns: 76px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); padding: 1.1rem .8rem; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .75rem; padding: .25rem .5rem 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; }
.brand-mark { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font: 700 22px var(--serif); color: var(--on-gold); background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 55%, var(--gold)); box-shadow: 0 6px 22px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.4); }
.brand-name { font: 600 22px/1 var(--serif); letter-spacing: .02em; color: var(--ink); }
.brand-sub { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.biz-select { width: 100%; margin-bottom: .9rem; }
.nav-group { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: .9rem .75rem .35rem; }
.nav a { position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin: 1px 0; border-radius: 10px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a i { font-size: 19px; color: var(--muted); transition: color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--gold-soft); color: var(--gold); }
.nav a.active i { color: var(--gold); }
.nav a.active::before { content: ''; position: absolute; left: -.8rem; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 12px var(--gold-glow); }
.nav .badge-count { margin-left: auto; font-size: 11px; background: var(--gold-soft); color: var(--gold); padding: 0 .45rem; border-radius: 99px; }
.collapsed .brand-text, .collapsed .nav-group, .collapsed .nav span, .collapsed .biz-select, .collapsed .side-foot-text, .collapsed .badge-count { display: none; }
.collapsed .nav a { justify-content: center; }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .5rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: var(--on-gold); background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); flex: none; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .85rem 2rem; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.search-trigger { flex: 1; max-width: 520px; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.search-trigger:hover { border-color: var(--line-strong); }
kbd { font: 500 11px var(--sans); border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: 0 .4rem; border-radius: 6px; color: var(--muted); background: var(--surface-2); }
.content { padding: 1.75rem 2rem 4rem; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
h1.title { font: 600 38px/1.05 var(--serif); margin: .25rem 0 0; letter-spacing: .005em; }
h2.section { font: 600 22px var(--serif); margin: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 0; }
.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); opacity: .5; margin: 1.25rem 0; border: 0; }

/* ─── Tarjetas (sin sombra; sombras solo en capas flotantes) ─── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.card.gilded { position: relative; border-color: var(--line-strong); background: linear-gradient(160deg, color-mix(in srgb, var(--gold-2) 7%, var(--surface)), var(--surface) 45%); }
.card.gilded::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, var(--gold-3), transparent 35%, transparent 65%, var(--gold-2)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .55; }
.metric { display: flex; flex-direction: column; gap: .35rem; }
.metric-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-size: 19px; }
.metric-value { font: 600 30px/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--gold) 55%, var(--ink))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric-label { font-size: 12px; color: var(--muted); }

/* ─── Botones (primario tinta; nunca acento sólido excepto el «dorado» premium) ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--gold-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn i { font-size: 16px; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { box-shadow: 0 0 0 3px var(--gold-soft); border-color: var(--ink); }
.btn-gold { color: var(--on-gold); border: 0; background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 55%, var(--gold)); box-shadow: 0 6px 20px -6px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.35); font-weight: 600; }
.btn-gold:hover { box-shadow: 0 10px 30px -8px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { padding: .3rem .65rem; font-size: 12px; }
.icon-btn { width: 36px; height: 36px; padding: 0; }

/* ─── Formularios ─── */
label.field { display: flex; flex-direction: column; gap: .35rem; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; padding: .6rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 14px var(--sans); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
textarea.mono { font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 380px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 2.5rem; }
.input-wrap button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--gold-2); width: 16px; height: 16px; }
.help { font-size: 11px; color: var(--muted); }

/* Control segmentado */
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: .38rem .8rem; border-radius: 9px; font: 500 12px var(--sans); cursor: pointer; transition: all .15s; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }

/* ─── Badges pastel: el estado siempre en texto ─── */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.b-ok { color: var(--ok); background: var(--ok-bg); }
.b-warn { color: var(--warn); background: var(--warn-bg); }
.b-info { color: var(--info); background: var(--info-bg); }
.b-neutral { color: var(--neutral); background: var(--neutral-bg); }
.b-danger { color: var(--danger); background: var(--danger-bg); }
.b-gold { color: var(--gold); background: var(--gold-soft); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 7px; font-size: 11px; background: var(--warn-bg); color: var(--warn); margin: 2px 3px 2px 0; }
.tag { display: inline-block; padding: .08rem .45rem; border-radius: 6px; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); margin-right: 3px; }

/* ─── Tabla ─── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; }
table.data td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--gold-soft); }
table.data tr.clickable { cursor: pointer; }
.pager { display: flex; justify-content: center; padding: .9rem; }

/* ─── Estados: vacío, carga, error ─── */
.empty { text-align: center; padding: 3rem 1.5rem; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: var(--stripe), var(--surface); }
.empty i { font-size: 34px; color: var(--gold); }
.empty h3 { font: 600 20px var(--serif); margin: .6rem 0 .3rem; }
.skeleton { border-radius: 10px; background: var(--stripe), var(--surface-2); position: relative; overflow: hidden; min-height: 18px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); animation: slide 1.4s infinite; }
.error-box { padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-bg); color: var(--danger); display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.notice { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--gold-soft); color: var(--ink-2); font-size: 13px; display: flex; gap: .6rem; align-items: flex-start; }
.notice i { color: var(--gold); font-size: 18px; margin-top: 1px; }
.notice.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice.warn i { color: var(--warn); }

/* ─── Capas flotantes (con sombra): drawer, diálogo, menú, ⌘K, toast ─── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8, 7, 5, .55); backdrop-filter: blur(3px); animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(620px, 100vw); background: var(--surface); box-shadow: var(--shadow-float); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; }
.dialog { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-float); padding: 1.5rem; animation: pop .18s; }
.dialog.wide { width: min(880px, 96vw); }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } }
.cmdk { position: fixed; z-index: 51; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, 94vw); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-float); overflow: hidden; animation: fade .15s; }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 1.1rem 1.25rem; font: 16px var(--sans); outline: none; }
.cmdk-list { max-height: 60vh; overflow-y: auto; padding: .4rem; }
.cmdk-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 10px; cursor: pointer; color: var(--ink); }
.cmdk-item:hover, .cmdk-item.sel { background: var(--gold-soft); text-decoration: none; }
.cmdk-type { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); width: 96px; flex: none; }
#toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; }
.toast { min-width: 280px; max-width: 420px; padding: .8rem 1rem; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-float); display: flex; gap: .6rem; align-items: flex-start; animation: slidein .2s; border-left: 3px solid var(--gold-2); }
.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }

/* Live dot */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Checklist */
.check-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .25rem; border-bottom: 1px dashed var(--line); }
.check-row:last-child { border-bottom: 0; }
.step-ok { color: var(--ok); } .step-no { color: var(--muted); }

/* Timeline */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(var(--gold-2), var(--line)); }
.tl-item { position: relative; padding: .4rem 0 .9rem; }
.tl-item::before { content: ''; position: absolute; left: -1.4rem; top: .75rem; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold-2); }

/* Transcripción */
.bubble { max-width: 78%; padding: .6rem .85rem; border-radius: 14px; margin: .35rem 0; font-size: 13px; }
.bubble.agent { background: var(--gold-soft); border: 1px solid var(--line-strong); }
.bubble.user { background: var(--surface-2); border: 1px solid var(--line); margin-left: auto; }
.bubble.tool { background: transparent; border: 1px dashed var(--line-strong); font-size: 11px; color: var(--muted); max-width: 100%; }
.bubble .who { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }

/* Agenda */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-h { background: var(--surface-2); padding: .5rem; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal-d { background: var(--surface); min-height: 112px; padding: .45rem; cursor: pointer; transition: background .15s; }
.cal-d:hover { background: var(--gold-soft); }
.cal-d.other { background: var(--stripe), var(--surface-2); color: var(--muted); }
.cal-d.closed { background: var(--stripe), var(--surface-2); }
.cal-d.today .cal-n { background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); color: var(--on-gold); }
.cal-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.ev { display: block; font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-top: 3px; background: var(--info-bg); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.busy { background: var(--stripe), var(--neutral-bg); color: var(--neutral); }
.ev.voz { background: var(--gold-soft); color: var(--gold); }
.week { display: grid; grid-template-columns: 60px repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.week-cell { border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-height: 44px; padding: 2px 4px; position: relative; }
.week-cell.closed { background: var(--stripe), var(--surface-2); }
.week-cell.slot:hover { background: var(--gold-soft); cursor: copy; }
.week-time { font-size: 11px; color: var(--muted); padding: 4px 6px; border-top: 1px solid var(--line); }

/* Auth */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } }
.auth-brand { position: relative; overflow: hidden; padding: 3.5rem; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(900px 500px at 20% 10%, rgba(230,199,122,.18), transparent 60%), linear-gradient(160deg, #15120C, #0A0907 70%); color: #F3ECDC; border-right: 1px solid #2A251C; }
.auth-brand::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, transparent 0 22px, rgba(230,199,122,.035) 22px 23px); pointer-events: none; }
.auth-brand h1 { font: 600 62px/1 var(--serif); margin: 0; background: linear-gradient(135deg, #F3DFA6, #C9A45C 60%, #9C7A2E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p { color: #CFC4AC; max-width: 460px; font-size: 16px; }
.auth-feat { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1rem; color: #CFC4AC; }
.auth-feat i { color: #E6C77A; font-size: 20px; }
.auth-form { display: grid; place-items: center; padding: 2rem; }
.auth-card { width: min(420px, 100%); }

/* Prompt preview */
.prompt-pre { white-space: pre-wrap; font: 12px/1.6 ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; max-height: 460px; overflow-y: auto; color: var(--ink-2); }
.diff-add { color: var(--ok); } .diff-del { color: var(--danger); text-decoration: line-through; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); padding: .7rem 1rem; font: 500 13px var(--sans); cursor: pointer; position: relative; white-space: nowrap; }
.tabs button.on { color: var(--gold); }
.tabs button.on::after { content: ''; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); border-radius: 2px; }

/* Integraciones */
.int-card { display: flex; flex-direction: column; gap: .75rem; }
.int-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--line-strong); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .35rem 1rem; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
code, .code { font: 12px ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: .1rem .35rem; border-radius: 6px; }

.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); transition: width .3s; }
.chart-box { position: relative; height: 260px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .layout.mobile-open .sidebar { transform: none; box-shadow: var(--shadow-float); }
  .content { padding: 1.25rem 1rem 3rem; }
  .topbar { padding: .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
