/* Foco · estilos */
:root {
  --accent: #ec4899;
  --bg: #16171b;
  --text: #f4f4f6;
  --muted: #9a9ba3;
  --faint: #6b6c74;
  --line: rgba(255,255,255,.08);
  --card: rgba(38,39,46,.62);
  --card-solid: #24252b;
  --chip: rgba(255,255,255,.06);
  --chip-strong: rgba(255,255,255,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  --blur: saturate(160%) blur(22px);
  --radius: 22px;
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --blue: #3b82f6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eceef3; --text: #15161a; --muted: #5d6070; --faint: #8a8d99;
  --line: rgba(0,0,0,.08); --card: rgba(255,255,255,.66); --card-solid: #ffffff;
  --chip: rgba(0,0,0,.05); --chip-strong: rgba(0,0,0,.1);
  --shadow: 0 10px 30px rgba(20,20,40,.10), inset 0 1px 0 rgba(255,255,255,.8);
  color-scheme: light;
}
:root[data-glass="clear"] { --card: rgba(38,39,46,.38); }
:root[data-theme="light"][data-glass="clear"] { --card: rgba(255,255,255,.42); }
:root[data-solid="1"] { --card: var(--card-solid); --blur: none; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-size: 15px; line-height: 1.35;
}
.wallpaper { position: fixed; inset: 0; z-index: -1; pointer-events: none; transition: background .6s; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea {
  background: var(--chip); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--card-solid); }
.hidden { display: none !important; }

/* Layout */
.app { display: flex; min-height: 100dvh; }
.sidebar {
  display: none; position: sticky; top: 0; height: 100dvh; width: 76px; flex: none;
  padding: 18px 12px; flex-direction: column; align-items: center; gap: 8px;
}
.sidebar .rail {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-radius: 26px;
  background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line); box-shadow: var(--shadow); height: 100%;
}
.navbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--muted); transition: .2s; }
.navbtn.active { background: var(--chip-strong); color: var(--text); }
.navbtn svg { width: 21px; height: 21px; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); display: grid; place-items: center; margin-bottom: 10px; color: #fff; }

.main { flex: 1; min-width: 0; padding: calc(64px + var(--safe-top)) 16px calc(100px + var(--safe-bottom)); max-width: 1180px; margin: 0 auto; width: 100%; }

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 40;
  display: flex; justify-content: space-around; padding: 8px; border-radius: 26px;
  background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tabbar .navbtn { width: auto; flex: 1; height: 50px; flex-direction: column; gap: 2px; font-size: 10.5px; display: flex; align-items: center; justify-content: center; }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .main { padding: 76px 28px 40px; }
}

/* Topbar */
.topbar { position: fixed; top: calc(10px + var(--safe-top)); right: 12px; z-index: 45; display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.topbar button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.topbar button:active { background: var(--chip); }
.topbar svg { width: 18px; height: 18px; }

/* Isla Focus */
.island {
  position: fixed; top: calc(10px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 50;
  background: #000; color: #fff; border-radius: 999px; padding: 8px 16px 8px 10px;
  display: flex; align-items: center; gap: 10px; min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: all .45s cubic-bezier(.2,.9,.25,1.15); overflow: hidden; font-weight: 600; font-size: 14px;
}
.island .ring { width: 22px; height: 22px; flex: none; }
.island .time { margin-left: auto; color: #f5a524; font-variant-numeric: tabular-nums; }
.island.toast { min-width: 260px; padding-right: 8px; }
.island.toast .time { display: none; }
.island .undo { margin-left: auto; background: #2a2a2e; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.island.expanded { border-radius: 38px; width: min(420px, calc(100vw - 24px)); padding: 18px 20px; flex-wrap: wrap; align-items: flex-start; }
.island.expanded .ring { width: 44px; height: 44px; }
.island.expanded .label { display: flex; flex-direction: column; }
.island .label small { color: #8e8e93; font-weight: 500; font-size: 12px; display: none; }
.island.expanded .label small { display: block; }
.island.expanded .time { font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.island .ctrls { display: none; width: 100%; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.island.expanded .ctrls { display: flex; }
.island .ctrls button { height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; background: #2a2a2e; color: #fff; font-weight: 600; display: grid; place-items: center; }
.island .ctrls .pause { background: #5a3d06; color: #f5a524; }
.island .ctrls .stop { background: #4a1515; color: #ff5b5b; }
.island .ctrls svg { width: 18px; height: 18px; }

/* Encabezados */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-size: 30px; letter-spacing: -.6px; margin: 0; font-weight: 700; }
.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(59,130,246,.45); }
.btn.accent { background: var(--accent); border-color: transparent; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.seg { display: inline-flex; padding: 3px; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--chip-strong); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* Stats */
.stats { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat { flex: none; min-width: 104px; padding: 10px 14px; border-radius: 16px; background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.stat b small { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat.blue b { color: #7fb2ff; }

/* Cards */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
.card { background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.link { color: #6aa5ff; font-weight: 600; font-size: 13px; }

/* Anillos */
.rings-wrap { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 0; }
.rings { width: 130px; height: 130px; flex: none; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend div { border-left: 3px solid; padding-left: 10px; }
.legend span { font-size: 12px; color: var(--muted); display: block; }
.legend b { font-size: 20px; }
.legend b small { color: var(--muted); font-size: 13px; font-weight: 500; }

/* Próximo */
.next-hero { border-radius: 18px; padding: 14px; background: linear-gradient(160deg, rgba(59,130,246,.35), rgba(30,58,138,.35)); border: 1px solid rgba(96,165,250,.25); margin-bottom: 10px; }
.next-hero small { color: #b8cdf5; font-size: 12px; }
.next-hero h4 { margin: 4px 0 2px; font-size: 18px; }
.next-hero p { margin: 0; font-size: 13px; color: #c7d4ee; }
.evrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.evrow i { width: 3px; height: 20px; border-radius: 3px; flex: none; }
.evrow span { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evrow time { color: var(--muted); font-size: 13px; }
.empty { color: var(--faint); font-size: 14px; padding: 14px 0; text-align: center; }

/* Lista de tareas */
.trow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--faint); flex: none; display: grid; place-items: center; transition: .2s; }
.check.on { background: var(--blue); border-color: var(--blue); }
.check svg { width: 14px; height: 14px; color: #fff; display: none; }
.check.on svg { display: block; }
.trow .tbody { flex: 1; min-width: 0; }
.trow .ttl { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.done .ttl { text-decoration: line-through; color: var(--faint); }
.meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.prio { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; flex: none; }
.prio.high { color: #fb923c; background: rgba(251,146,60,.14); }
.prio.urgent { color: #f87171; background: rgba(248,113,113,.14); }
.due-today { color: #6aa5ff; }
.due-late { color: #f87171; }

/* Focus card */
.focus-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; padding: 10px 0; }
.dial { width: 130px; height: 130px; position: relative; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; }
.dial b { font-size: 28px; font-variant-numeric: tabular-nums; }
.dial small { display: block; text-align: center; color: var(--muted); font-size: 12px; }
.focus-ctl { display: flex; flex-direction: column; gap: 10px; min-width: 200px; flex: 1; max-width: 280px; }

/* Barras semana */
.bars { display: flex; gap: 8px; align-items: flex-end; height: 130px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bars .track { flex: 1; width: 100%; border-radius: 12px; background: var(--chip); display: flex; align-items: flex-end; overflow: hidden; }
.bars .fill { width: 100%; background: linear-gradient(180deg, #6aa5ff, #3b6fd1); border-radius: 12px; transition: height .6s; min-height: 3px; }
.bars span { font-size: 11px; color: var(--muted); }
.bignum { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }
.bignum small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; letter-spacing: 0; }
.delta-up { color: var(--ok); font-size: 12px; font-weight: 700; }
.delta-down { color: #f87171; font-size: 12px; font-weight: 700; }

/* Filtros */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.filters::-webkit-scrollbar { display: none; }
.filters select, .filters input { width: auto; border-radius: 999px; height: 38px; padding: 0 14px; flex: none; }
.filters input { min-width: 200px; flex: 1; }

/* Tablero */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.board::-webkit-scrollbar { display: none; }
.col { flex: none; width: min(84vw, 300px); scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 10px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); align-self: flex-start; min-height: 120px; }
.col.drop { outline: 2px dashed var(--accent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; font-weight: 700; }
.col-head i { width: 9px; height: 9px; border-radius: 50%; }
.col-head .n { font-size: 12px; background: var(--chip-strong); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.col-head button { margin-left: auto; color: var(--muted); font-size: 20px; width: 28px; height: 28px; }
.tcard { background: rgba(20,21,25,.55); border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; transition: transform .15s; }
:root[data-theme="light"] .tcard { background: rgba(255,255,255,.8); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.tcard:active { transform: scale(.98); }
.tcard.dragging { opacity: .4; }
.tcard .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tcard h4 { margin: 0 0 8px; font-size: 14.5px; font-weight: 600; }
.tcard.done h4 { color: var(--muted); }
.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.progress .pb { flex: 1; height: 4px; border-radius: 4px; background: var(--chip-strong); overflow: hidden; }
.progress .pb i { display: block; height: 100%; border-radius: 4px; }
.tfoot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-left: auto; flex: none; }

/* Agenda */
.day-group { margin-bottom: 18px; }
.day-group h5 { margin: 0 0 8px; color: var(--muted); font-size: 13px; text-transform: capitalize; font-weight: 600; }
.ev { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.ev i { width: 4px; align-self: stretch; border-radius: 4px; }
.ev .t { flex: 1; min-width: 0; }
.ev .t b { display: block; font-size: 14.5px; }
.ev .t span { font-size: 12.5px; color: var(--muted); }

/* Insights */
.chart { width: 100%; height: 200px; display: block; }
.chart text { fill: var(--faint); font-size: 10px; }
.donut-wrap { display: flex; justify-content: center; padding: 6px 0 12px; }
.plist .r { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13.5px; }
.plist .r i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.plist .r span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .r em { font-style: normal; color: var(--muted); width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.ontime-bar { height: 8px; border-radius: 8px; background: rgba(239,68,68,.6); overflow: hidden; margin: 10px 0; }
.ontime-bar i { display: block; height: 100%; background: var(--ok); border-radius: 8px; }

/* Ajustes */
.settings { display: grid; gap: 14px; }
@media (min-width: 900px) { .settings { grid-template-columns: 260px 1fr; align-items: start; } .set-nav { position: sticky; top: 76px; } }
.set-nav .me { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.set-nav .me b { display: block; }
.set-nav .me span { font-size: 12.5px; color: var(--muted); }
.set-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; font-weight: 600; color: var(--text); text-decoration: none; }
.set-nav a:active { background: var(--chip); }
.ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; }
.ico svg { width: 16px; height: 16px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.srow:last-child { border-bottom: 0; }
.srow .stxt { flex: 1; min-width: 150px; }
.srow .stxt b { display: block; font-size: 14.5px; }
.srow .stxt span { font-size: 12.5px; color: var(--muted); }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--chip-strong); position: relative; flex: none; transition: .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .25s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.wps { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; width: 100%; padding-left: 42px; }
.wp { text-align: center; font-size: 12.5px; color: var(--muted); }
.wp .sw { height: 62px; border-radius: 14px; border: 2px solid transparent; margin-bottom: 6px; position: relative; overflow: hidden; }
.wp.on .sw { border-color: var(--accent); }
.wp.on { color: var(--text); font-weight: 600; }
.dots { display: flex; gap: 12px; padding-left: 42px; width: 100%; flex-wrap: wrap; }
.dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.dot.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px currentColor; }
.dot svg { width: 16px; height: 16px; color: #fff; display: none; }
.dot.on svg { display: block; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 18px; background: var(--chip); flex: 1; min-width: 150px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; background: var(--chip-strong); font-size: 20px; color: var(--accent); }
.stepper b { font-size: 26px; }
.stepper b small { font-size: 12px; color: var(--muted); }
.stepper .lbl { font-size: 12px; color: var(--muted); position: absolute; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.member .avatar { margin: 0; }
.member span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.member em { font-style: normal; color: var(--muted); font-size: 12px; }
.space-card { padding: 12px; border-radius: 16px; background: var(--chip); margin-bottom: 10px; width: 100%; }

/* Hoja (modal) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--card-solid); border-radius: 26px 26px 0 0; padding: 18px 18px calc(22px + var(--safe-bottom)); border: 1px solid var(--line); animation: up .3s cubic-bezier(.2,.9,.25,1); }
@media (min-width: 700px) { .sheet { border-radius: 26px; } }
.sheet h2 { margin: 0 0 14px; font-size: 20px; }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--chip-strong); margin: -6px auto 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sub-item input[type=text] { flex: 1; }
.sub-item button { color: var(--faint); font-size: 18px; }
.sheet-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; text-align: center; padding: 28px 22px; }
.login h1 { margin: 14px 0 6px; }
.login .logo { margin: 0 auto; width: 56px; height: 56px; border-radius: 18px; }
.login input { margin: 14px 0 10px; text-align: center; }
.login .btn { width: 100%; justify-content: center; }
.msg { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 18px; }
.msg.err { color: var(--bad); }

.banner { font-size: 12.5px; padding: 8px 12px; border-radius: 12px; background: rgba(245,158,11,.14); color: #f5b84a; margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

:root[data-theme="light"] .next-hero { background: linear-gradient(160deg, #3b82f6, #1e40af); color: #fff; }
:root[data-theme="light"] .banner { color: #92400e; background: rgba(245,158,11,.18); }
:root[data-theme="light"] .island .ring circle:first-child { stroke-opacity: .25; }
.island { color: #fff; }
.space-card .srow { flex-wrap: nowrap; }
.space-card .stxt { min-width: 0; }

/* Agente */
.navbtn { position: relative; }
.navbtn .badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.navbtn .badge[hidden] { display: none; }
.sidebar .navbtn .badge { left: auto; right: 2px; top: 2px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 300px; min-height: 80px; overflow-y: auto; padding: 4px 2px 10px; scroll-behavior: smooth; }
.bubble { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.bubble.assistant { align-self: flex-start; background: var(--chip-strong); border-bottom-left-radius: 6px; }
.bubble.typing { color: var(--muted); font-style: italic; }
.bubble small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.chat-input { display: flex; gap: 8px; margin-top: 6px; }
.chat-input input { flex: 1; border-radius: 999px; height: 44px; padding: 0 16px; font-size: 16px; }
.chat-input .btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
.alist { display: grid; gap: 12px; }
@media (min-width: 1000px) { .alist { grid-template-columns: 1fr 1fr; align-items: start; } }
.acard { background: rgba(20,21,25,.45); border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-width: 0; }
:root[data-theme="light"] .acard { background: rgba(255,255,255,.7); }
.ahead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ahead .afrom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kchip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--chip-strong); color: var(--text); flex: none; }
.kchip.k-reply { background: rgba(59,130,246,.2); color: #7fb2ff; }
.kchip.k-event { background: rgba(139,92,246,.2); color: #b79bff; }
.kchip.k-task { background: rgba(34,197,94,.18); color: #4ade80; }
:root[data-theme="light"] .kchip.k-reply { color: #1d4ed8; }
:root[data-theme="light"] .kchip.k-event { color: #6d28d9; }
:root[data-theme="light"] .kchip.k-task { color: #15803d; }
.acard h4 { margin: 0 0 4px; font-size: 15px; overflow-wrap: anywhere; }
.asum { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.acard textarea { font-size: 14px; resize: vertical; min-height: 110px; }
.arow { margin: 4px 0 2px; }
.aact { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ahint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ahint.warn { color: #f5b84a; }
.afail { font-size: 12.5px; color: var(--bad); margin-bottom: 8px; }
.aerr { color: var(--bad); }
.asummary { white-space: pre-wrap; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.usage { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 10px; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.usage b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.agent-today { cursor: pointer; padding: 14px 18px; }
.agent-today .card-head p { max-width: 62ch; }
.conn { margin-bottom: 6px; }
.conn-acc { padding-left: 42px; }
.conn-acc .btn { flex: none; }
