* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono, .label { font-family: var(--font-mono); }
.label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.boot { padding: 40px; color: var(--muted); }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-weight: 700; letter-spacing: -.01em; }
.brand small { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.nav .ico { width: 18px; display: inline-flex; opacity: .8; }
.nav .count { margin-left: auto; background: var(--brand-accent); color: var(--brand-accent-ink); font-family: var(--font-mono); font-size: 11px; border-radius: 99px; padding: 0 7px; font-weight: 500; }
.sidebar .spacer { flex: 1; }
.sidebar .me { font-size: 13px; color: var(--muted); padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; }
.main { flex: 1; min-width: 0; padding: 28px 40px 120px; max-width: 980px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; flex: 1; min-width: 0; }
h2 { font-size: 15px; margin: 28px 0 10px; }

/* Timer bar */
.timerbar { position: sticky; top: 0; z-index: 20; background: var(--brand-ink); color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 16px; font-size: 14px; }
.timerbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); animation: pulse 1.4s infinite; }
.timerbar .clock { font-family: var(--font-mono); color: var(--brand-accent); }
.timerbar .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { 50% { opacity: .3; } }

/* Bottom nav (móvil) */
.bottomnav { display: none; }

/* Elementos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }
.btn.primary:hover { background: #2a2a2a; }
.btn.accent { background: var(--brand-accent); color: var(--brand-accent-ink); border-color: var(--brand-accent); }
.btn.danger { color: var(--st-fallida); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-ink); }
textarea { resize: vertical; min-height: 90px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1; min-width: 140px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.item:first-child { border-top: 0; }
a.item:hover { background: var(--bg); }
.item .t { flex: 1; min-width: 0; }
.item .t b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .t small { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-cola { color: var(--st-cola); } .s-en_proceso { color: var(--st-proceso); } .s-hecho { color: var(--st-hecho); }
.s-fallida { color: var(--st-fallida); } .s-esperando_hugo { color: var(--st-esperando); }
.tag { font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.tag.urgente { color: #fff; background: var(--st-fallida); border-color: var(--st-fallida); }
.tag.alta { color: var(--st-fallida); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--line); flex-shrink: 0; }
.avatar.claude { background: #d97757; color: #fff; }
.avatar.muse { background: #0866ff; color: #fff; }
.avatar.admin { background: var(--brand-accent); color: var(--brand-accent-ink); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }

/* Detalle de tarea */
.props { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; align-items: center; margin: 6px 0 18px; }
.props > .k { color: var(--muted); font-size: 13.5px; }
.props select, .props input { padding: 6px 9px; }
.approve { border: 1px solid var(--st-esperando); background: #fff8ec; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.desc { white-space: pre-wrap; word-wrap: break-word; }
.result { background: #f3fbe0; border: 1px solid #d9ecaa; border-radius: var(--radius); padding: 14px 16px; white-space: pre-wrap; word-wrap: break-word; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; }
.msg .bubble { flex: 1; min-width: 0; }
.msg .head { display: flex; align-items: baseline; gap: 8px; }
.msg .head b { font-size: 14px; }
.msg .head .muted { font-size: 12px; }
.msg .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 2px; }
.msg .head .icon-btn { margin-left: auto; width: 26px; height: 26px; font-size: 16px; }
.activity { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* Menú ⋯ */
.menu { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 5px; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--st-fallida); }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; padding: 22px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 16px; font-size: 19px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.secret { font-family: var(--font-mono); font-size: 13px; background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: var(--radius-sm); word-break: break-all; user-select: all; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--brand-ink); }
.auth .box { background: var(--surface); width: 100%; max-width: 380px; border-radius: 16px; padding: 28px; }
.auth .logo { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 12px; }
.auth h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.auth p { margin: 0 0 20px; }
.auth .btn { width: 100%; padding: 11px; }
.auth .alt { text-align: center; margin-top: 16px; font-size: 13.5px; }
.err { color: var(--st-fallida); font-size: 13.5px; margin: -4px 0 12px; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--brand-ink); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }

.stat { font-family: var(--font-mono); font-size: 22px; }
.timer-big { font-family: var(--font-mono); font-size: 34px; letter-spacing: -.02em; }

/* Reporte imprimible */
.report { background: #fff; color: #111; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); }
.report .rh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 14px; margin-bottom: 18px; }
.report .rh img { width: 44px; height: 44px; border-radius: 10px; }
.report table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #555; border-bottom: 1px solid #ccc; padding: 6px 4px; }
.report td { border-bottom: 1px solid #eee; padding: 7px 4px; vertical-align: top; }
.report .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.report .tot td { border-top: 2px solid #111; border-bottom: 0; font-weight: 700; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .sidebar, .bottomnav, .timerbar, .no-print, .overlay, #toast { display: none !important; }
  .main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
}

/* Móvil */
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { padding: 18px 16px 110px; }
  .page-head h1 { font-size: 22px; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { flex: 1; text-align: center; text-decoration: none; font-size: 10.5px; color: var(--muted); padding: 4px 0; position: relative; }
  .bottomnav a .ico { display: flex; justify-content: center; margin-bottom: 2px; color: var(--text); opacity: .65; }
  .bottomnav a .ico svg { width: 21px; height: 21px; }
  .bottomnav a.on { color: var(--text); font-weight: 600; }
  .bottomnav a.on .ico { opacity: 1; }
  .bottomnav .count { position: absolute; top: 0; left: 55%; background: var(--brand-accent); color: #000; border-radius: 99px; font-size: 10px; padding: 0 5px; font-family: var(--font-mono); }
  .props { grid-template-columns: 100px 1fr; }
  .report { padding: 18px; }
  .report table { font-size: 12px; }
  .report td, .report th { padding: 6px 3px; }
  .fab { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 25; border-radius: 99px; padding: 13px 18px; box-shadow: var(--shadow); }
}
@media (min-width: 761px) { .only-mobile { display: none !important; } }

.icon-btn svg { vertical-align: middle; }
.report td:nth-child(2) { white-space: nowrap; }
@media (max-width: 760px) {
  a.item:has(.pill) { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 6px; }
  a.item:has(.pill) .avatar { grid-row: span 2; align-self: start; }
  a.item:has(.pill) .pill, a.item:has(.pill) .tag { grid-column: 2; justify-self: start; }
  a.item:has(.tag) .tag + .pill { margin-top: -2px; }
  .item .t b { white-space: normal; }
}

/* ===== v2 ===== */
/* Dropdowns: flecha propia con su espacio, sin pisar el borde */
select { -webkit-appearance: none; appearance: none; padding-right: 36px !important; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
select:disabled { opacity: .65; cursor: default; }
.tc-right select { width: auto; min-width: 128px; }

/* Logo animado */
.st-logo { display: inline-block; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--brand-accent); }
.st-logo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth .st-logo { margin-bottom: 12px; }
.rlogo { width: 44px; height: 44px; border-radius: 50%; }

/* Anuncio */
.anuncio { background: var(--brand-accent); color: var(--brand-accent-ink); font: 500 12.5px/1.4 var(--font-mono); display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; }
.anuncio .grow { flex: 1; text-align: center; }
.anuncio a { color: inherit; }
.anuncio .icon-btn { color: inherit; width: 26px; height: 26px; }
.timerbar a.grow { color: #fff; text-decoration: none; }

/* Botón atrás */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin: -6px 0 10px -6px; padding: 4px 8px 4px 2px; border-radius: var(--radius-sm); max-width: 100%; }
.back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back:hover { background: var(--hover); color: var(--text); }

/* Quote / facturación */
.qbox { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.qbox > div { min-width: 90px; }
.qbox .btn { margin-left: auto; }
.bill-listo_facturar { color: var(--st-esperando); border-color: currentColor; }
.bill-facturado { color: var(--st-hecho); border-color: currentColor; }
.timer-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.tc-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tc-links { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-bottom: 16px; background: var(--bg); }
.seg input { display: none; }
.seg span { display: block; padding: 6px 16px; border-radius: 99px; cursor: pointer; font-size: 14px; }
.seg input:checked + span { background: var(--brand-ink); color: #fff; }

/* Conversación */
.empty-chat { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.mention { font-weight: 600; border-radius: 4px; padding: 0 3px; }
.m-claude { color: #b4532a; background: #fbeae2; }
.m-muse { color: #0752c9; background: #e4eeff; }
.m-hugo { color: #4a5600; background: #f1fbc4; }
.tref { font-family: var(--font-mono); font-size: .92em; }
.task-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); padding: 4px 6px 4px 10px; border-radius: 8px; max-width: 100%; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.att-img { border: 1px solid var(--line); padding: 0; border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; width: 160px; height: 120px; }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; max-width: 260px; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file small { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.composer { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.composer textarea { border: 0; min-height: 52px; padding: 6px 8px; resize: vertical; }
.composer textarea:focus { border: 0; }
.comp-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.comp-bar label.icon-btn { display: inline-grid; place-items: center; }
.mention-btn { border: 0; border-radius: 99px; padding: 3px 10px; font: 600 12.5px var(--font-sans); cursor: pointer; }
.composer .hint { padding: 6px 4px 0; font-size: 11.5px; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; }
.pending:not(:empty) { padding: 4px 4px 8px; }
.pchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 3px 4px 3px 10px; }
.pchip.err { color: var(--st-fallida); }
.pchip button { border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
#chat.drop .composer { outline: 2px dashed var(--brand-ink); }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 0 1px #9fb800; }
.btn.danger-fill { background: var(--st-fallida); color: #fff; border-color: var(--st-fallida); }
.linkish { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--st-fallida); }
details > summary { list-style-position: inside; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .timer-card { grid-template-columns: 1fr; }
  .tc-right { justify-content: flex-start; }
  .qbox .btn { margin-left: 0; width: 100%; }
  .thread-full { max-height: none; overflow: visible; }
  .chat-page .thread-full { max-height: none; }
  .att-img { width: 130px; height: 100px; }
}

/* ===== v3 — look SanTo (paleta Dynamics + arreglo Scarlet) ===== */
body { background: var(--bg-grad); background-attachment: fixed; }
.shell { gap: 0; }
.sidebar { background: transparent; border-right: 0; padding: 18px 14px; width: 248px; }
.brand { padding: 4px 8px 22px; }
.brand b { font-size: 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { padding: 9px 12px; border-radius: 99px; color: #3a3c37; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.6); }
.nav a.on { background: var(--brand-ink); color: #fff; box-shadow: none; font-weight: 500; }
.nav a.on .ico { opacity: 1; }
.nav .count { background: var(--violet-soft); color: var(--violet-ink); }
.nav a.on .count { background: var(--brand-accent); color: var(--brand-accent-ink); }
.side-foot { display: flex; flex-direction: column; gap: 2px; }
.user-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 10px 10px 10px 12px; box-shadow: var(--shadow); margin-top: 8px; border: 0; cursor: pointer; text-align: left; width: 100%; font: inherit; }
.user-card .who { flex: 1; min-width: 0; line-height: 1.25; }
.user-card .who b { display: block; font-size: 14px; }
.user-card .who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.main { padding: 26px 32px 120px 20px; max-width: 1180px; }
.page-head h1 { font-size: 30px; font-weight: 500; letter-spacing: -.025em; }
.page-sub { color: var(--muted); margin: -14px 0 20px; font-size: 14px; }
h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }

/* Tarjetas y listas sin bordes */
.card, .list, .qbox, .composer, .report, .empty { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); }
.empty { background: rgba(255,255,255,.55); box-shadow: none; }
.item { padding: 13px 18px; border-top: 1px solid #f0f1ed; }
a.item:hover { background: #fafbf7; }
.card { padding: 18px 20px; }

/* Botones */
.btn { border-radius: 99px; border-color: transparent; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 8px 16px; }
.btn:hover { background: #f6f7f3; }
.btn.primary { background: var(--brand-ink); color: #fff; }
.btn.primary:hover { background: #2b2b2b; }
.btn.accent { background: var(--brand-accent); color: var(--brand-accent-ink); }
.btn.accent:hover { background: #cbeb00; }
.btn.sm { padding: 5px 12px; }
.icon-btn { border-radius: 99px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea { border-radius: 12px; border-color: var(--line); background: #fbfbf9; }
.chip { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }

/* Píldoras de estado: fondo suave + punto */
.pill { border: 0; padding: 3px 10px; font-weight: 500; }
.s-cola { color: #55584f; background: #eef0ea; }
.s-en_proceso { color: var(--sky-ink); background: var(--sky-soft); }
.s-hecho { color: #4f6100; background: var(--brand-accent-soft); }
.s-fallida { color: var(--coral-ink); background: var(--coral-soft); }
.s-esperando_hugo { color: var(--violet-ink); background: var(--violet-soft); }
.tag { border: 0; background: #eef0ea; border-radius: 99px; padding: 2px 9px; }
.tag.urgente { background: var(--coral); color: #fff; }
.tag.alta { background: var(--coral-soft); color: var(--coral-ink); }
.bill-listo_facturar { background: var(--violet-soft); color: var(--violet-ink); }
.bill-facturado { background: var(--brand-accent-soft); color: #4f6100; }

/* Avatares */
.avatar { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.claude { background: var(--coral); color: #fff; }
.avatar.muse { background: var(--violet); color: #fff; }
.avatar.admin { background: var(--brand-accent); color: var(--brand-accent-ink); }
.m-claude { color: var(--coral-ink); background: var(--coral-soft); }
.m-muse { color: var(--violet-ink); background: var(--violet-soft); }
.m-hugo { color: #4f6100; background: var(--brand-accent-soft); }
.mention-btn.m-claude, .mention-btn.m-muse, .mention-btn.m-hugo { border: 0; }

/* Aprobación (estilo "Needs your approval") */
.approve { border: 0; background: var(--violet-soft); border-radius: var(--radius); padding: 18px 20px; }
.approve .btn.primary { padding: 9px 22px; }

/* ---------- Dashboard de Inicio ---------- */
.tiles { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tile { border-radius: 22px; padding: 18px 20px; position: relative; min-height: 150px; display: flex; flex-direction: column; box-shadow: var(--shadow); text-decoration: none; color: inherit; overflow: hidden; }
.tile .t-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.tile .t-ico { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: rgba(255,255,255,.55); }
.tile .t-go { margin-left: auto; width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: var(--brand-ink); }
.tile .big { font-size: 54px; font-weight: 300; letter-spacing: -.04em; line-height: 1; margin-top: auto; padding-top: 18px; }
.tile .big small { font-size: 16px; letter-spacing: 0; font-weight: 400; margin-left: 6px; opacity: .7; }
.tile .t-foot { font-size: 12.5px; margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.tile.lime { background: linear-gradient(135deg, #e6ff4d 0%, var(--brand-accent) 55%, #c4e600 100%); color: var(--brand-accent-ink); }
.tile.lime::after { content: ''; position: absolute; right: -40px; top: -40px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%); }
.tile.white { background: var(--surface); }
.tile.dark { background: var(--charcoal); color: #fff; }
.tile.dark .t-ico { background: var(--charcoal-2); }
.tile.violet { background: linear-gradient(140deg, #f2efff 0%, var(--violet) 120%); color: #2b2166; }
.seg-bar { display: flex; gap: 4px; flex: 1; }
.seg-bar i { height: 6px; border-radius: 99px; background: #e4e6df; flex: 1; }
.seg-bar i.on { background: var(--brand-ink); }
.ticks { display: flex; gap: 3px; align-items: center; flex: 1; }
.ticks i { width: 3px; height: 12px; border-radius: 2px; background: rgba(20,22,0,.25); }
.ticks i.on { background: var(--brand-accent-ink); }
.dash { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.panel + .panel { margin-top: 14px; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.panel-h .t-ico { width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; background: #f1f2ee; }
.panel-h b { font-size: 15px; font-weight: 600; }
.panel-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel .list { box-shadow: none; border-radius: 14px; background: #f7f8f4; }
.panel .list .item { border-top-color: #eceee8; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 92px; padding-top: 8px; }
.bars i { flex: 1; background: #e9ece2; border-radius: 6px 6px 3px 3px; min-height: 4px; position: relative; }
.bars i.has { background: linear-gradient(180deg, #e6ff4d, var(--brand-accent)); }
.bars i.today { background: var(--brand-ink); }
.bars-x { display: flex; justify-content: space-between; font: 11px var(--font-mono); color: var(--muted); margin-top: 6px; }
.big-num { font-size: 40px; font-weight: 300; letter-spacing: -.035em; line-height: 1; }
.big-num small { font-size: 14px; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.appr { background: #f7f8f4; border-radius: 16px; padding: 14px 16px; }
.appr .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); border-top: 1px solid #e9ebe5; padding-top: 10px; margin-top: 12px; }
.appr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.appr-actions .btn { padding: 11px; }
.pager { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pager button { width: 28px; height: 28px; border-radius: 99px; border: 0; cursor: pointer; background: #f1f2ee; display: grid; place-items: center; }
.pager button.dark { background: var(--brand-ink); color: #fff; }
.proj-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }

/* Proyecto */
.qbox { background: var(--surface); }
.timer-card .stat { font-size: 40px; font-weight: 300; letter-spacing: -.035em; font-family: var(--font-sans); }

/* Barra inferior móvil: flotante oscura */
@media (max-width: 760px) {
  .main { padding: 18px 14px 120px; }
  .page-head h1 { font-size: 25px; }
  .bottomnav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 26px; background: var(--charcoal); border: 0; padding: 7px 6px; backdrop-filter: none; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .bottomnav a { color: #a8aaa3; border-radius: 18px; padding: 6px 0 5px; }
  .bottomnav a .ico { color: #d9dbd4; opacity: 1; }
  .bottomnav a.on { background: var(--brand-accent); color: var(--brand-accent-ink); }
  .bottomnav a.on .ico { color: var(--brand-accent-ink); }
  .bottomnav .count { background: var(--violet); color: #fff; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:first-child { grid-column: 1 / -1; }
  .tile { min-height: 128px; padding: 16px; }
  .tile .big { font-size: 44px; }
  .dash { grid-template-columns: 1fr; }
  .fab { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
.dash > div, .tiles > *, .panel, .appr, .main { min-width: 0; }
.appr b { max-width: 100%; }
html, body { overflow-x: hidden; }
select { background-color: #fbfbf9; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
/* v3.1 — gris frío y contadores en lima */
.item { border-top-color: #f0f1f4; }
a.item:hover { background: #f9fafb; }
.panel .list { background: #f6f7f9; }
.panel .list .item { border-top-color: #eceef1; }
.panel-h .t-ico, .tile .t-head .t-ico[style] { background: #f1f2f5 !important; }
.appr { background: #f6f7f9; }
.empty { background: rgba(255,255,255,.7); }
.nav a:hover { background: #e9ebef; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea { background-color: #fafbfc; }
.nav .count, .nav a.on .count { background: var(--brand-accent); color: var(--brand-ink); font-weight: 600; }
.bottomnav .count { background: var(--brand-accent); color: var(--brand-ink); font-weight: 600; box-shadow: 0 0 0 2px var(--charcoal); }
.bottomnav a.on .count { background: var(--brand-ink); color: var(--brand-accent); box-shadow: none; }
.dot-new { background: var(--brand-accent); box-shadow: 0 0 0 1px #a8c400; }

.tile .big .big-2 { opacity: .45; margin-left: 18px; }
.tile .big .big-2 small { opacity: 1; }

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
