@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/schibsted-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/schibsted-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fafbfa;
  --surface: #ffffff;
  --side: #eff2f0;
  --ink: #17201d;
  --ink-2: #44514c;
  --ink-3: #66726d;
  --line: #dfe4e1;
  --line-2: #ebeeec;
  --hover: #f1f4f2;
  --accent: #0e6e78;
  --accent-hover: #0a5961;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0f1;
  --danger: #b3362a;
  --ok: #2e7a4d;
  --warn: #9a5e0c;
  --bar-todo: #b8c3be;
  --shadow-pop: 0 8px 24px rgb(20 30 26 / .14), 0 1px 3px rgb(20 30 26 / .1);
  --shadow-drawer: -12px 0 32px rgb(20 30 26 / .1);
  --u0: #0e6e78; --u1: #86497a; --u2: #965316; --u3: #44649e; --u4: #a03a3a; --u5: #587a36;
  --font: "Schibsted Grotesk", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #111514; --surface: #171c1a; --side: #0d100f;
    --ink: #e7edea; --ink-2: #b3bdb8; --ink-3: #8c9893;
    --line: #2a322f; --line-2: #212826; --hover: #1e2523;
    --accent: #4db6c0; --accent-hover: #6cc6cf; --accent-ink: #06282b; --accent-soft: #163031;
    --danger: #f0877b; --ok: #6cc48a; --warn: #e0a44f;
    --bar-todo: #3a4642;
    --shadow-pop: 0 8px 24px rgb(0 0 0 / .5), 0 0 0 1px rgb(255 255 255 / .04);
    --shadow-drawer: -12px 0 32px rgb(0 0 0 / .4);
    --u0: #2a8f9a; --u1: #a9639b; --u2: #b8741f; --u3: #5f83c4; --u4: #c25a5a; --u5: #77a04c;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; height: 100%;
  font: 14px/1.5 var(--font);
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: padding-box; border: 2px solid transparent; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.link:hover { color: var(--accent-hover); }

/* ───── Layout ───── */
.app { display: grid; grid-template-columns: 224px minmax(0, 1fr); height: 100%; }
.side {
  background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 10px 14px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r);
  color: var(--ink-2); font-weight: 500; transition: background .12s, color .12s;
}
.nav a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); font-weight: 600; }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.nav .count.alert { color: var(--danger); font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.me {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--r);
  background: none; cursor: pointer; text-align: left;
}
.me:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.me b { display: block; font-weight: 600; line-height: 1.2; }
.me small { color: var(--ink-3); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top {
  display: flex; align-items: center; gap: 10px; padding: 10px 28px; height: 56px; flex: none;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.top .burger { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; padding-left: 34px; background: var(--surface); }
.search > svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search kbd { position: absolute; right: 8px; top: 50%; translate: 0 -50%; font: 12px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.top .spacer { flex: 1; }
.scroll { flex: 1; overflow: auto; min-height: 0; }
.page { padding: 28px 28px 80px; max-width: 1220px; margin: 0 auto; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; text-wrap: balance; }
.page-head p { color: var(--ink-3); margin-top: 4px; }
.crumbs { display: flex; gap: 6px; color: var(--ink-3); font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span { opacity: .6; }

/* ───── Controles ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  height: 34px; padding: 0 13px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 550; cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: var(--hover); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.busy { pointer-events: none; opacity: .7; }

.input, .select, textarea.input {
  height: 34px; width: 100%; padding: 0 10px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; line-height: 1.5; }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input::placeholder { color: var(--ink-3); opacity: .85; }
.input.bare { border-color: transparent; background: transparent; }
.input.bare:hover { background: var(--hover); }
.input.bare:focus { background: var(--surface); border-color: var(--accent); }
input[type="date"] { font-variant-numeric: tabular-nums; }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%2366726d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-err { color: var(--danger); font-size: 13px; min-height: 20px; margin: -4px 0 8px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); padding: 2px; background: var(--surface); gap: 2px; }
.seg button { white-space: nowrap; border: 0; background: none; padding: 3px 11px; border-radius: 4px; cursor: pointer; color: var(--ink-2); font-weight: 500; height: 28px; }
.seg button:hover { background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }

/* ───── Avatares ───── */
.avatar {
  --s: 24px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; color: #fff; font-size: calc(var(--s) * .42); font-weight: 650;
  background: var(--u0); letter-spacing: 0; user-select: none;
}
.avatar.c1 { background: var(--u1); } .avatar.c2 { background: var(--u2); } .avatar.c3 { background: var(--u3); }
.avatar.c4 { background: var(--u4); } .avatar.c5 { background: var(--u5); }
.avatar.lg { --s: 34px; } .avatar.sm { --s: 20px; }
.avatars { display: inline-flex; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar + .avatar { margin-left: -6px; }
.avatars .more { background: var(--bar-todo); color: var(--ink); }

/* ───── Estado de tarea ───── */
.st { flex: none; width: 20px; height: 20px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); }
.st:hover { color: var(--accent); }
.st.doing { color: var(--accent); }
.st.done { color: var(--ok); }
.st svg { display: block; }
.tag { font-size: 12.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bar-todo); display: inline-block; }
.dot.active, .dot.doing { background: var(--accent); }
.dot.done { background: var(--ok); }
.dot.paused { background: var(--warn); }
.dot.over { background: var(--danger); }

.due { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.due.over { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.due.done { text-decoration: line-through; opacity: .7; }

/* ───── Listas ───── */
.list { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; padding: 9px 8px; min-height: 44px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .1s;
}
.row:hover { background: var(--hover); }
.row .title { flex: 1; min-width: 0; }
.row .title b { font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .title small { color: var(--ink-3); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done .title b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.row .due { min-width: 84px; text-align: right; }
.row .meta { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 13px; flex: none; }
.row .msgs { display: inline-flex; align-items: center; gap: 4px; }
.group-title { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.group-title:first-child { margin-top: 0; }
.group-title.over { color: var(--danger); }
.group-title span { font-weight: 400; color: var(--ink-3); }
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.005em; }
.section-head .grow { flex: 1; }

.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; width: 100%; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s var(--ease); }
.progress.over i { background: var(--danger); }

.empty { padding: 36px 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 10px; }
.empty b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.empty.flat { border: 0; padding: 20px 8px; text-align: left; }

/* ───── Inicio ───── */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.figures a { padding: 12px 12px 12px 18px; display: block; border-left: 1px solid var(--line-2); }
.figures a:first-child { border-left: 0; padding-left: 0; }
.figures a:hover b { color: var(--accent); }
.figures b { font-size: 24px; font-weight: 650; line-height: 1.2; display: block; letter-spacing: -.01em; }
.figures span { color: var(--ink-3); font-size: 13px; }
.figures .over b { color: var(--danger); }
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.proj-row { display: block; padding: 10px 8px; border-bottom: 1px solid var(--line-2); }
.proj-row:hover { background: var(--hover); }
.proj-row .top2 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 7px; }
.proj-row b { font-weight: 550; }
.proj-row small { color: var(--ink-3); display: block; font-size: 12.5px; }
.proj-row .nums { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; }
.team-row .bar { flex: 1; }
.team-row .n { width: 54px; text-align: right; font-size: 13px; color: var(--ink-2); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 8px; align-items: flex-start; cursor: pointer; border-radius: var(--r); }
.feed li:hover { background: var(--hover); }
.feed p { line-height: 1.4; }
.feed small { color: var(--ink-3); font-size: 12.5px; }

/* ───── Cliente ───── */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 8px 0 10px; color: var(--ink-3); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; color: var(--ink-2); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { flex: 0 1 300px; }

.files-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.folders { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; }
.folders button {
  display: flex; align-items: center; gap: 9px; border: 0; background: none; text-align: left; cursor: pointer;
  padding: 7px 10px; border-radius: var(--r); color: var(--ink-2);
}
.folders button:hover { background: var(--hover); }
.folders button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.folders .n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-3); margin-bottom: 16px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop .btn { margin: 0 3px; }
.file-ico { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: var(--hover); color: var(--ink-2); flex: none; overflow: hidden; }
.file-ico img { width: 100%; height: 100%; object-fit: cover; }
.upl { position: relative; overflow: hidden; }
.upl i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .2s; }

/* ───── Popover, diálogo, toasts ───── */
#layer { position: relative; z-index: 50; }
.pop {
  position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-pop); padding: 4px; min-width: 200px; max-height: min(420px, 70vh); overflow: auto;
  animation: pop-in .14s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop .item {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left;
  padding: 7px 10px; border-radius: 5px; cursor: pointer; color: var(--ink);
}
.pop .item:hover, .pop .item.hl { background: var(--hover); }
.pop .item.danger { color: var(--danger); }
.pop .item .chk { margin-left: auto; color: var(--accent); }
.pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.pop .head { padding: 6px 10px 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

dialog {
  border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--ink); background: var(--surface);
  width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); max-height: calc(100vh - 48px);
}
dialog::backdrop { background: rgb(10 16 14 / .45); }
dialog[open] { animation: dlg-in .18s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } }
.dlg-head { padding: 18px 22px 0; }
.dlg-head h2 { font-size: 18px; font-weight: 650; }
.dlg-body { padding: 16px 22px 4px; }
.dlg-foot { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }

.toasts { position: fixed; bottom: 18px; left: 50%; translate: -50% 0; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 8px; box-shadow: var(--shadow-pop);
  animation: toast-in .2s var(--ease); pointer-events: auto; display: flex; gap: 12px; align-items: center; max-width: 90vw;
}
.toast.err { background: var(--danger); color: #fff; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font-weight: 600; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ───── Notificaciones ───── */
.bell { position: relative; }
.bell .badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.notif { width: 380px; max-width: calc(100vw - 24px); padding: 0; }
.notif header { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 650; }
.notif header .btn { margin-left: auto; }
.notif ul { list-style: none; margin: 0; padding: 4px; max-height: 420px; overflow: auto; }
.notif li { display: flex; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; align-items: flex-start; }
.notif li:hover { background: var(--hover); }
.notif li.unread p { font-weight: 600; }
.notif li .u { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex: none; }
.notif li.unread .u { visibility: visible; } .notif li:not(.unread) .u { visibility: hidden; }
.notif small { color: var(--ink-3); font-size: 12.5px; display: block; }

.results { width: min(520px, calc(100vw - 24px)); }
.results .group { padding: 6px 10px 2px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.results .item small { color: var(--ink-3); margin-left: auto; font-size: 12.5px; }

/* ───── Panel de tarea ───── */
.scrim { position: fixed; inset: 0; background: rgb(10 16 14 / .28); z-index: 60; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); z-index: 61;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-drawer);
  display: flex; flex-direction: column; animation: drawer-in .26s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } }
.drawer.closing { animation: drawer-out .16s ease-in forwards; }
@keyframes drawer-out { to { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 22px; border-bottom: 1px solid var(--line-2); flex: none; }
.drawer-head .crumbs { margin: 0; flex: 1; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.drawer-head .crumbs a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 8px; min-height: 0; }
.t-title { font-size: 20px; font-weight: 650; letter-spacing: -.01em; padding: 4px 8px; margin: 0 -9px 14px; height: auto; width: calc(100% + 18px); line-height: 1.3; }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; align-items: center; margin-bottom: 18px; }
.props > dt { color: var(--ink-3); font-size: 13px; }
.props > dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.props .input { width: auto; height: 30px; }
.assignee-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; border-radius: var(--r); padding: 3px 8px 3px 4px; cursor: pointer; min-height: 30px; }
.assignee-btn:hover { background: var(--hover); border-color: var(--line); }
.desc { margin: 0 -9px 22px; width: calc(100% + 18px); min-height: 64px; }
.thread-title { font-size: 14px; font-weight: 650; padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: 12px; display: flex; gap: 8px; align-items: baseline; }
.thread-title span { color: var(--ink-3); font-weight: 400; }
.msgs-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 14px; }
.msg { display: flex; gap: 10px; }
.msg-main { min-width: 0; flex: 1; }
.msg-who { display: flex; gap: 8px; align-items: baseline; }
.msg-who b { font-weight: 600; }
.msg-who small { color: var(--ink-3); font-size: 12.5px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 1px; line-height: 1.5; }
.msg-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.event { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: 12.5px; padding-left: 4px; }
.event::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: none; margin: 0 7px 0 3px; }
.attach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 10px 5px 8px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); font-size: 13px; cursor: pointer;
}
.chip:hover { background: var(--hover); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.chip small { color: var(--ink-3); }
.chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink-3); display: grid; }
.chip button:hover { color: var(--danger); }
.thumb { display: block; max-width: 260px; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; }
.composer { flex: none; border-top: 1px solid var(--line); padding: 12px 22px 16px; background: var(--surface); }
.composer .box { border: 1px solid var(--line); border-radius: 8px; transition: border-color .12s, box-shadow .12s; }
.composer .box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.composer textarea { width: 100%; border: 0; background: none; resize: none; padding: 10px 12px 4px; font: inherit; color: inherit; outline: none; min-height: 44px; max-height: 160px; display: block; }
.composer .bar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; flex-wrap: wrap; }
.composer .bar .attach { margin: 0; flex: 1; }
.composer .hint { color: var(--ink-3); font-size: 12px; margin-left: auto; padding-right: 4px; }

/* ───── Cronograma ───── */
.gantt-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.gantt { overflow: auto; position: relative; max-height: calc(100vh - 230px); min-height: 260px; }
.g-inner { position: relative; }
.g-head { position: sticky; top: 0; z-index: 5; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); height: 52px; }
.g-corner, .g-label { position: sticky; left: 0; z-index: 4; flex: none; width: var(--lw); background: var(--surface); border-right: 1px solid var(--line); }
.g-corner { display: flex; align-items: flex-end; padding: 0 14px 8px; color: var(--ink-3); font-size: 12.5px; z-index: 6; }
.g-scale { position: relative; flex: none; }
.g-month { position: absolute; top: 0; height: 26px; padding: 5px 8px; font-size: 12.5px; font-weight: 650; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-day { position: absolute; top: 26px; height: 26px; text-align: center; font-size: 11.5px; color: var(--ink-3); line-height: 26px; }
.g-day.wk { text-align: left; padding-left: 6px; }
.g-day.we { color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.g-day.today { color: var(--accent-ink); }
.g-day.today span { background: var(--accent); border-radius: 10px; padding: 1px 5px; font-weight: 650; }
.g-row { display: flex; height: 36px; border-bottom: 1px solid var(--line-2); }
.g-row.group { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.g-row.group .g-label { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); font-weight: 650; }
.g-label { display: flex; align-items: center; gap: 8px; padding: 0 14px; overflow: hidden; }
.g-label.indent { padding-left: 28px; cursor: pointer; }
.g-label.indent2 { padding-left: 14px; }
.g-label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.g-label.indent:hover .nm { color: var(--accent); }
.g-track { position: relative; flex: none; }
.g-grid { position: absolute; top: 52px; bottom: 0; pointer-events: none; z-index: 1; }
.g-we { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.g-today { position: absolute; top: -52px; bottom: 0; width: 2px; background: var(--accent); z-index: 3; opacity: .85; margin-left: -1px; }
.g-bar {
  position: absolute; top: 7px; height: 22px; border-radius: 5px; background: var(--bar-todo); cursor: pointer; z-index: 2;
  display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 550; color: var(--ink); overflow: hidden; white-space: nowrap;
  border: 0; text-align: left; transition: filter .12s;
}
.g-bar:hover { filter: brightness(.94); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.g-bar.doing { background: var(--accent); color: var(--accent-ink); }
.g-bar.done { background: color-mix(in srgb, var(--ok) 38%, var(--surface)); color: var(--ink); }
.g-bar.over { box-shadow: inset 0 0 0 2px var(--danger); }
.g-bar.span { top: 14px; height: 8px; background: var(--ink-3); opacity: .55; cursor: default; padding: 0; border-radius: 3px; }
.g-bar.span:hover { filter: none; box-shadow: none; }
.g-ms { position: absolute; top: 9px; width: 18px; height: 18px; rotate: 45deg; scale: .72; border-radius: 3px; background: var(--bar-todo); cursor: pointer; z-index: 2; border: 0; padding: 0; margin-left: -9px; }
.g-ms.doing { background: var(--accent); } .g-ms.done { background: var(--ok); } .g-ms.over { background: var(--danger); }
.g-after { position: absolute; top: 0; height: 36px; display: flex; align-items: center; padding-left: 8px; z-index: 2; font-size: 12px; color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.legend { display: flex; gap: 16px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--bar-todo); }
.legend i.doing { background: var(--accent); } .legend i.done { background: color-mix(in srgb, var(--ok) 38%, var(--surface)); }
.legend i.today { width: 2px; height: 12px; background: var(--accent); vertical-align: -2px; }

/* ───── Equipo / acceso ───── */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-box { width: min(380px, 100%); }
.auth h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 18px 0 6px; }
.auth p.sub { color: var(--ink-3); margin-bottom: 26px; }
.auth .brand { padding: 0; }
.auth .btn.primary { width: 100%; height: 40px; margin-top: 6px; }

.skel { background: var(--line-2); border-radius: 6px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.sk-row { height: 44px; margin-bottom: 8px; }

/* ───── Responsive ───── */
@media (max-width: 1000px) {
  .dash, .cols { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 70; translate: -100%; transition: translate .22s var(--ease); box-shadow: var(--shadow-pop); }
  .side.open { translate: 0; }
  .top { padding: 8px 14px; }
  .top .burger { display: inline-flex; }
  .search kbd { display: none; }
  .page { padding: 20px 16px 72px; }
  .files-layout { grid-template-columns: 1fr; gap: 16px; }
  .folders { flex-direction: row; overflow-x: auto; position: static; }
  .folders button { white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .props { grid-template-columns: 92px 1fr; }
  .row .meta .hide-sm { display: none; }
  .composer .hint { display: none; }
  .seg button { padding: 3px 8px; }
  .drawer-body, .composer { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Cifras tabulares solo donde se alinean datos */
.due, .figures b, .nums, .n, .count, .g-day, .g-month, .badge, .msgs, .row .meta, .progress, input[type="date"], .tag, .legend { font-variant-numeric: tabular-nums; }
/* ───── Tarjetas de clientes y proyectos ───── */
.mono { --fc: var(--u0); width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--fc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .01em; user-select: none; }
.page-head .mono { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ccard { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.ccard:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 2px 10px rgb(20 30 26 / .07); }
.ccard.archived { opacity: .6; }
.cc-main { min-width: 0; }
.cc-main b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-main small { display: block; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-stats { grid-column: 1 / -1; display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 13px; }
.cc-stats b { color: var(--ink); font-weight: 650; }
.cc-stats .over, .cc-stats .over b { color: var(--danger); }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pcard { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 2px 10px rgb(20 30 26 / .07); }
.pc-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.pc-client { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name { display: block; margin: 4px 0 12px; font-size: 15px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.pc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 12.5px; color: var(--ink-3); }
.pc-foot .due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }

/* ───── Semana ───── */
.week { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(100px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wk-col { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; min-height: 116px; background: var(--surface); min-width: 0; }
.wk-col.we { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.wk-col.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wk-col.over { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.wk-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; padding: 0 2px 4px; }
.wk-h b { font-weight: 650; }
.wk-h span { color: var(--ink-3); }
.wk-col.today .wk-h span { color: var(--accent); font-weight: 600; }
.wk-col.over .wk-h b, .wk-col.over .wk-h span { color: var(--danger); }
.wk-task { display: flex; gap: 7px; align-items: flex-start; width: 100%; border: 0; background: var(--hover); border-radius: 6px; padding: 6px 8px; margin-top: 5px; text-align: left; cursor: pointer; font-size: 12.5px; line-height: 1.3; }
.wk-task:hover { background: var(--accent-soft); }
.wk-t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wk-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid var(--ink-3); flex: none; margin-top: 3px; }
.wk-task.doing .wk-dot { background: var(--accent); border-color: var(--accent); }
.wk-task.done .wk-dot { background: var(--ok); border-color: var(--ok); }

/* ───── Tablero ───── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: color-mix(in srgb, var(--ink) 3.5%, var(--bg)); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; min-height: 220px; transition: background .12s, border-color .12s; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col > header { display: flex; align-items: center; gap: 8px; padding: 6px 6px 10px; }
.col > header .n { color: var(--ink-3); font-size: 13px; }
.col > header .grow { flex: 1; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: grab; transition: border-color .12s, box-shadow .12s; }
.card:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); box-shadow: 0 1px 6px rgb(20 30 26 / .08); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: .4; }
.card.done .c-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.c-title { font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.c-ctx { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--ink-3); font-size: 12.5px; }
.c-foot .grow { flex: 1; }
.c-foot .due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.c-foot .msgs { display: inline-flex; align-items: center; gap: 4px; }
.col-empty { border: 1.5px dashed var(--line); border-radius: 8px; padding: 22px 12px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.col-empty span { font-size: 12.5px; opacity: .8; }
.qa .input { margin-bottom: 2px; }

/* ───── Explorador de documentos ───── */
.xp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.xp-crumbs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 180px; font-size: 16px; }
.xp-crumbs b { font-weight: 650; padding: 4px 6px; }
.xp-crumbs button:not(.btn) { border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); font-size: 16px; }
.xp-crumbs button:not(.btn):hover { background: var(--hover); color: var(--accent); }
.xp-crumbs .sep { color: var(--ink-3); display: inline-grid; }
.xp-hint { color: var(--ink-3); font-size: 12.5px; margin-top: 26px; }
.explorer { border-radius: 12px; border: 2px dashed transparent; padding: 2px; transition: border-color .12s, background .12s; }
.explorer.dropping { border-color: var(--accent); background: var(--accent-soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 6px; }
.tile { position: relative; padding: 12px 8px 10px; border-radius: 10px; text-align: center; cursor: pointer; border: 1px solid transparent; transition: background .1s, border-color .1s; min-width: 0; }
.tile:hover { background: var(--hover); }
.tile:focus-visible { outline-offset: -2px; }
.tile.dropping { background: var(--accent-soft); border-color: var(--accent); }
.tile .ico { height: 92px; display: grid; place-items: center; }
.tile .ico svg { width: 108px; height: auto; }
.tile .ico img { width: 100%; height: 92px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.tile .nm { margin-top: 8px; font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile .sb { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tile .sb.path { color: var(--accent); }
.tile .more { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: none; place-items: center; color: var(--ink-2); padding: 0; }
.tile:hover .more, .tile:focus-within .more { display: grid; }
.tile .more:hover { background: var(--hover); }
.folder .fb { fill: color-mix(in srgb, var(--fc) 70%, #000); }
.folder .ff { fill: color-mix(in srgb, var(--fc) 88%, #fff); }
.doc { --fc: var(--ink-3); position: relative; width: 66px; height: 86px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); display: grid; place-items: center; color: var(--fc); overflow: hidden; }
.doc::before { content: ""; position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: var(--line); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.doc b { position: absolute; left: 0; right: 0; bottom: 14px; background: var(--fc); color: #fff; font-size: 12px; letter-spacing: .04em; padding: 3px 0; font-weight: 700; }
.uploads { position: fixed; right: 18px; bottom: 18px; width: 300px; max-width: calc(100vw - 36px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 12px 14px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.uploads .u span { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .tile .more { display: grid; }
}
.xp-crumbs { flex: 1 1 auto; white-space: nowrap; min-width: 0; }
.xp-bar .search { flex: 0 1 220px !important; }
.xp-bar { row-gap: 12px; }
.card .due.done { text-decoration: none; }
