/* ===== Tokens (paleta alineada con la suite: azul, blanco, pizarra) ===== */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --sunken: #eef2f7;
  --hover: #f1f5f9;
  --line: #e5e9f0;
  --line-strong: #d4dae3;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8492a6;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eaf1ff;
  --accent-text: #1d4ed8;
  --ok: #16a34a;
  --ok-soft: #e7f7ed;
  --warn: #c2700a;
  --warn-soft: #fff4e0;
  --danger: #e11d48;
  --danger-soft: #ffe8ee;
  --side: #ffffff;
  --side-text: #475569;
  --side-strong: #0f172a;
  --side-hover: #f1f5f9;
  --side-active: #eaf1ff;
  --side-active-text: #1d4ed8;
  --side-line: #e5e9f0;
  --side-label: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
  --r: 14px;
  --r-sm: 10px;
  --font: "Inter", "Roboto", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111a2e; --surface-2: #0f172a; --sunken: #0a1222; --hover: #18233a; --line: #1e2a42; --line-strong: #2a3854;
  --text: #e8edf6; --text-2: #a3b0c6; --text-3: #6f7f99; --accent: #3b82f6; --accent-2: #60a5fa; --accent-soft: #15264a; --accent-text: #93bbff;
  --ok: #34d399; --ok-soft: #0f2e24; --warn: #f5b04a; --warn-soft: #33260f; --danger: #fb7190; --danger-soft: #3a1622;
  --side: #0f172a; --side-text: #a3b0c6; --side-strong: #e8edf6; --side-hover: #18233a; --side-active: #15264a; --side-active-text: #93bbff; --side-line: #1e2a42; --side-label: #5f6f8a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); --shadow-lg: 0 20px 50px rgba(0,0,0,.55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --surface-2: #0f172a; --sunken: #0a1222; --hover: #18233a; --line: #1e2a42; --line-strong: #2a3854;
    --text: #e8edf6; --text-2: #a3b0c6; --text-3: #6f7f99; --accent: #3b82f6; --accent-2: #60a5fa; --accent-soft: #15264a; --accent-text: #93bbff;
    --ok: #34d399; --ok-soft: #0f2e24; --warn: #f5b04a; --warn-soft: #33260f; --danger: #fb7190; --danger-soft: #3a1622;
    --side: #0f172a; --side-text: #a3b0c6; --side-strong: #e8edf6; --side-hover: #18233a; --side-active: #15264a; --side-active-text: #93bbff; --side-line: #1e2a42; --side-label: #5f6f8a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); --shadow-lg: 0 20px 50px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
::selection { background: var(--accent-soft); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

.boot { height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .4; transform: scale(.92); } }

/* ===== Botones y campos ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); border-color: var(--line-strong); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .22); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 30px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, .select, textarea.input { width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.seg { display: inline-flex; background: var(--sunken); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== Acceso ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(circle at 20% 10%, #60a5fa 0, transparent 45%), radial-gradient(circle at 90% 90%, #1e3a8a 0, transparent 50%), #2563eb; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { font-size: 34px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.02em; max-width: 420px; }
.auth-art p { opacity: .85; max-width: 380px; margin: 0; }
.auth-cards { display: grid; gap: 10px; max-width: 360px; }
.auth-card { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(6px); font-weight: 500; }
.auth-card i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.auth-card.done i { background: #fff; }
.auth-card.done span { text-decoration: line-through; opacity: .75; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 360px; }
.auth-box h1 { font-size: 24px; margin: 18px 0 6px; letter-spacing: -.01em; }
.auth-box p { color: var(--text-2); margin: 0 0 24px; }
.auth-box .btn { width: 100%; height: 40px; justify-content: center; margin-top: 6px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.logo img { width: 32px; height: 32px; }
.form-error { color: var(--danger); background: var(--danger-soft); padding: 8px 11px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 12px; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ===== Estructura ===== */
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; overflow: hidden; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--side-line); }
.side-top { padding: 14px 12px 6px; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 12px; color: var(--side-strong); font-weight: 700; font-size: 15px; }
.side-brand img { width: 26px; height: 26px; }
.side-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-new { width: 100%; justify-content: center; background: var(--accent); border: 0; color: #fff; height: 38px; border-radius: 10px; margin-bottom: 10px; font-weight: 600; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.side-new:hover { background: var(--accent-2); }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: var(--side-hover); color: var(--side-strong); }
.nav-item.on { background: var(--side-active); color: var(--side-active-text); font-weight: 600; }
.nav-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.side-label { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 4px; padding: 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--side-label); }
.side-label button { border: 0; background: none; color: inherit; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.side-label button:hover { background: var(--side-hover); color: var(--side-strong); }
.pdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.side-foot { border-top: 1px solid var(--side-line); padding: 10px 12px; display: flex; align-items: center; gap: 6px; }
.side-foot .me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 8px; border: 0; background: none; color: var(--side-text); text-align: left; }
.side-foot .me:hover { background: var(--side-hover); }
.side-foot .me b { display: block; color: var(--side-strong); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .me small { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .icon-btn { border: 0; background: none; color: var(--side-text); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.side-foot .icon-btn:hover { background: var(--side-hover); color: var(--side-strong); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 24px 0; flex-wrap: wrap; }
.topbar h1 { font-size: 20px; margin: 0; letter-spacing: -.015em; font-weight: 700; }
.burger { display: none; }
.page-head { padding: 16px 24px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-title { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.page-title h1 { font-size: 21px; margin: 0; font-weight: 700; letter-spacing: -.015em; }
.title-input { field-sizing: content; font-size: 21px; font-weight: 700; letter-spacing: -.015em; border: 1px solid transparent; background: none; border-radius: 7px; padding: 2px 6px; margin-left: -7px; min-width: 60px; max-width: 520px; outline: none; }
.title-input:hover { border-color: var(--line); }
.title-input:focus { border-color: var(--accent); background: var(--surface); }
.picon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; border: 0; }
.tabs { display: flex; gap: 2px; margin-top: 12px; overflow-x: auto; }
.tab { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 0; background: none; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 24px; flex-wrap: wrap; }
.toolbar .search { position: relative; }
.toolbar .search svg { position: absolute; left: 9px; top: 8px; color: var(--text-3); }
.toolbar .search input { height: 32px; padding-left: 30px; width: 200px; }
.filter-select { height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); padding: 0 8px; color: var(--text-2); font-weight: 500; }
.content { flex: 1; overflow: auto; min-height: 0; }
.pad { padding: 4px 24px 40px; }

.avs { display: flex; }
.avs .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avs .av:first-child { margin-left: 0; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; letter-spacing: .02em; user-select: none; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.av.lg { width: 40px; height: 40px; font-size: 15px; }
.av.empty { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag { color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.pri-high { color: var(--danger); background: var(--danger-soft); }
.pri-med { color: var(--warn); background: var(--warn-soft); }
.pri-low { color: var(--ok); background: var(--ok-soft); }
.due { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.due.over { color: var(--danger); font-weight: 600; }
.due.today { color: var(--ok); font-weight: 600; }
.badge-private { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }

/* ===== Check ===== */
.check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: none; display: grid; place-items: center; padding: 0; flex: none; color: transparent; transition: all .15s; }
.check svg { width: 11px; height: 11px; stroke-width: 3; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.pop { animation: pop .35s; }
@keyframes pop { 40% { transform: scale(1.3); } }

/* ===== Lista ===== */
.ltable { min-width: 820px; }
.lhead, .lrow { display: grid; grid-template-columns: minmax(280px, 1fr) 150px 130px 110px 170px; align-items: center; }
.lhead { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-3); font-weight: 600; height: 34px; }
.lhead > div { padding: 0 10px; }
.lsection { margin-top: 18px; }
.lsec-head { display: flex; align-items: center; gap: 6px; height: 36px; padding-left: 2px; }
.lsec-head .caret { border: 0; background: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); transition: transform .15s; }
.lsec-head .caret:hover { background: var(--hover); }
.lsec-head.closed .caret { transform: rotate(-90deg); }
.sec-input { field-sizing: content; font-weight: 650; font-size: 15px; border: 1px solid transparent; background: none; border-radius: 6px; padding: 2px 6px; outline: none; min-width: 40px; }
.sec-input:hover { border-color: var(--line); }
.sec-input:focus { border-color: var(--accent); background: var(--surface); }
.lsec-head .count { color: var(--text-3); font-size: 12.5px; }
.lsec-head .more { opacity: 0; }
.lsec-head:hover .more { opacity: 1; }
.lrow { min-height: 40px; border-bottom: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.lrows { border-top: 1px solid var(--line); border-radius: 0; }
.lrow:hover { background: var(--surface-2); }
.lrow.sel { background: var(--accent-soft); }
.lrow > div { padding: 0 10px; min-width: 0; height: 100%; display: flex; align-items: center; border-left: 1px solid transparent; }
.lrow > div + div { border-left-color: var(--line); }
.lcell-name { gap: 8px; }
.lcell-name .grip { color: var(--text-3); opacity: 0; cursor: grab; margin-left: -6px; width: 14px; }
.lrow:hover .grip { opacity: 1; }
.tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow.done .tname { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.meta-icons { display: inline-flex; gap: 8px; color: var(--text-3); font-size: 12px; flex: none; }
.meta-icons span { display: inline-flex; align-items: center; gap: 3px; }
.meta-icons svg { width: 13px; height: 13px; }
.cell-ctl { appearance: none; border: 1px solid transparent; background: none; height: 28px; border-radius: 6px; padding: 0 6px; width: 100%; color: var(--text-2); cursor: pointer; font-size: 13px; }
.cell-ctl:hover { border-color: var(--line-strong); background: var(--surface); }
.cell-ctl:focus { border-color: var(--accent); outline: none; }
.cell-ctl.empty { color: transparent; }
.lrow:hover .cell-ctl.empty { color: var(--text-3); }
input.cell-ctl[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; }
.cell-assignee { gap: 7px; position: relative; }
.cell-assignee select { position: absolute; inset: 6px 8px; opacity: 0; cursor: pointer; }
.cell-assignee .nm { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags-cell { gap: 4px; overflow: hidden; }
.add-row { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 32px; color: var(--text-3); cursor: text; background: var(--surface); border-bottom: 1px solid var(--line); }
.add-row:hover { color: var(--text-2); }
.add-row input { border: 0; outline: none; background: none; flex: 1; height: 100%; }
.add-section { margin: 18px 0 0; }
.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.dragging { opacity: .4; }
.subrow > div:first-child { padding-left: 44px; }

/* ===== Tablero ===== */
.board { display: flex; gap: 14px; padding: 4px 24px 24px; align-items: flex-start; min-height: 100%; }
.col { width: 300px; flex: none; display: flex; flex-direction: column; max-height: calc(100vh - 210px); background: var(--sunken); border-radius: 16px; }
.col-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 12px; }
.col-head .count { color: var(--text-3); font-size: 12.5px; font-weight: 600; background: var(--surface); border-radius: 10px; padding: 0 7px; }
.col-head .more { margin-left: auto; }
.col-body { overflow-y: auto; padding: 4px 8px 4px; display: flex; flex-direction: column; gap: 8px; min-height: 30px; }
.col.over .col-body { background: var(--accent-soft); border-radius: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.card-top { display: flex; gap: 8px; align-items: flex-start; }
.card-top .check { margin-top: 1px; }
.card-title { font-weight: 500; line-height: 1.4; word-break: break-word; }
.card.done .card-title { color: var(--text-3); text-decoration: line-through; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 22px; }
.card-foot .av { margin-left: auto; }
.progress { height: 4px; background: var(--sunken); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.col-add { margin: 4px 8px 8px; }
.col-add button { width: 100%; justify-content: flex-start; color: var(--text-3); }
.col-add textarea { width: 100%; border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; resize: none; outline: none; background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.col-new { width: 296px; flex: none; }
.col-new .btn { width: 100%; height: 42px; justify-content: center; border-style: dashed; background: transparent; color: var(--text-2); }
.card.drop-before { box-shadow: 0 -3px 0 var(--accent); }

/* ===== Calendario ===== */
.cal { padding: 0 24px 24px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { font-size: 17px; margin: 0 8px 0 4px; text-transform: capitalize; min-width: 150px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: capitalize; }
.cal-day { background: var(--surface); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 3px; position: relative; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-num { color: var(--text-3); opacity: .6; }
.cal-day.wknd { background: var(--surface-2); }
.cal-num { font-size: 12.5px; font-weight: 600; color: var(--text-2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cal-num { background: var(--accent); color: #fff; }
.cal-day.over { background: var(--accent-soft); }
.cal-add { position: absolute; top: 6px; right: 6px; opacity: 0; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); border-left: 3px solid var(--pc); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.cal-item:hover { background: color-mix(in srgb, var(--pc) 24%, var(--surface)); }
.cal-item.done { opacity: .55; text-decoration: line-through; }
.cal-item span { overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 12px; color: var(--text-3); padding: 0 6px; cursor: pointer; }

/* ===== Cronograma ===== */
.tl { display: grid; grid-template-columns: 280px 1fr; border-top: 1px solid var(--line); min-height: 100%; }
.tl-left { border-right: 1px solid var(--line); background: var(--surface); position: sticky; left: 0; z-index: 3; }
.tl-wrap { overflow: auto; height: 100%; }
.tl-row, .tl-sec { height: 38px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.tl-left .tl-row { padding: 0 12px 0 14px; gap: 8px; cursor: pointer; }
.tl-left .tl-row:hover { background: var(--surface-2); }
.tl-left .tl-sec { padding: 0 14px; font-weight: 650; background: var(--surface-2); }
.tl-right { position: relative; }
.tl-sec.r { background: color-mix(in srgb, var(--surface-2) 70%, transparent); position: relative; z-index: 1; }
.tl-row.r { z-index: 1; }
.tl-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); height: 52px; }
.tl-left .tl-head { display: flex; align-items: flex-end; padding: 0 14px 8px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.tl-months { display: flex; height: 24px; border-bottom: 1px solid var(--line); }
.tl-months div { font-size: 12px; font-weight: 650; padding: 4px 8px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-transform: capitalize; }
.tl-days { display: flex; height: 27px; }
.tl-days div { flex: none; font-size: 11px; color: var(--text-3); display: grid; place-items: center; }
.tl-days div.today { color: var(--accent-text); font-weight: 700; }
.tl-grid { position: absolute; inset: 52px 0 0 0; display: flex; pointer-events: none; z-index: 0; }
.tl-grid div { flex: none; border-left: 1px solid transparent; }
.tl-grid div.wknd { background: var(--surface-2); }
.tl-grid div.mon { border-left-color: var(--line); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .55; z-index: 1; pointer-events: none; }
.tl-row.r { position: relative; }
.bar { z-index: 2; position: absolute; top: 7px; height: 24px; border-radius: 7px; background: var(--pc); color: #fff; font-size: 12px; font-weight: 600; padding: 0 10px; display: flex; align-items: center; white-space: nowrap; cursor: grab; box-shadow: var(--shadow-sm); z-index: 1; user-select: none; }
.bar span { overflow: hidden; text-overflow: ellipsis; }
.bar.done { opacity: .5; }
.bar .h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bar .h.l { left: 0; } .bar .h.r { right: 0; }
.bar .h::after { content: ""; position: absolute; top: 7px; bottom: 7px; left: 3px; width: 2px; border-radius: 1px; background: rgba(255,255,255,.6); opacity: 0; }
.bar:hover .h::after { opacity: 1; }
.bar-label { position: absolute; top: 9px; font-size: 12px; color: var(--text-2); white-space: nowrap; pointer-events: none; }
.tl-sched { position: absolute; top: 8px; font-size: 12px; color: var(--text-3); border: 1px dashed var(--line-strong); border-radius: 6px; padding: 2px 8px; background: var(--surface); cursor: pointer; z-index: 1; }

/* ===== Inicio ===== */
.home { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; }
.home-hello { margin-bottom: 24px; }
.home-hello small { color: var(--text-3); font-weight: 500; }
.home-hello h1 { font-size: 28px; margin: 4px 0 0; letter-spacing: -.02em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--text-2); }
.stat.red b { color: var(--danger); }
.stat.green b { color: var(--ok); }
.home-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--surface-2); }
.mini-row .tname { flex: 1; }
.pchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); background: var(--sunken); border-radius: 6px; padding: 2px 7px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.pchip i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.proj-cards { display: grid; gap: 0; }
.proj-card { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.proj-card:last-child { border-bottom: 0; }
.proj-card:hover { background: var(--surface-2); }
.proj-card .bar2 { height: 5px; background: var(--sunken); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.proj-card .bar2 i { display: block; height: 100%; border-radius: 3px; }
.feed-item { display: flex; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item a { color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; }
.feed-item a:hover { text-decoration: underline; }
.empty-state { padding: 34px 18px; text-align: center; color: var(--text-3); }
.empty-state .big { font-size: 28px; margin-bottom: 6px; }

/* ===== Mis tareas ===== */
.group-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; margin: 22px 0 8px; }
.group-title .count { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.group-title.red { color: var(--danger); }
.simple-list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.srow { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.srow:last-child { border-bottom: 0; }
.srow:hover { background: var(--surface-2); }
.srow.sel { background: var(--accent-soft); }
.srow.done .tname { color: var(--text-3); text-decoration: line-through; }
.srow .tname { flex: 1; min-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Bandeja ===== */
.inbox { max-width: 860px; margin: 0 auto; padding: 8px 24px 48px; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; background: var(--surface); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.notif.unread::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.notif .body { flex: 1; min-width: 0; }
.notif .body b { font-weight: 650; }
.notif .when { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.notif .snippet { color: var(--text-2); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); flex: none; }
.attention { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; background: var(--surface); }
.list-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

/* ===== Equipo ===== */
.team { max-width: 980px; margin: 0 auto; padding: 8px 24px 48px; }
.team-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.team-table th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.team-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.team-table tr:last-child td { border-bottom: 0; }
.team-table tr.off { opacity: .55; }
.role { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--sunken); color: var(--text-2); }
.role.admin { background: var(--accent-soft); color: var(--accent-text); }

/* ===== Panel de tarea ===== */
.drawer-back { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 40; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.drawer.open { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.drawer:not(.open) { visibility: hidden; box-shadow: none; transition: transform .2s, visibility 0s .2s; }
.drawer.dropping::after { content: "Suelta los archivos para adjuntarlos"; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 85%, transparent); display: grid; place-items: center; font-weight: 650; color: var(--accent-text); z-index: 5; }
.d-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.d-done { height: 30px; }
.d-done.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.d-scroll { flex: 1; overflow-y: auto; }
.d-body { padding: 14px 22px 20px; }
.d-crumb { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d-crumb a { cursor: pointer; color: var(--text-2); text-decoration: none; }
.d-crumb a:hover { text-decoration: underline; }
.d-title { width: 100%; font-size: 21px; font-weight: 700; letter-spacing: -.015em; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin: 0 -9px 10px; resize: none; outline: none; background: none; line-height: 1.3; overflow: hidden; }
.d-title:hover { border-color: var(--line); }
.d-title:focus { border-color: var(--accent); }
.props { display: grid; grid-template-columns: 120px 1fr; row-gap: 4px; align-items: center; margin-bottom: 18px; }
.props > label { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 7px; height: 34px; }
.props > label svg { width: 15px; height: 15px; }
.prop { display: flex; align-items: center; gap: 6px; min-height: 34px; flex-wrap: wrap; position: relative; }
.prop-ctl { border: 1px solid transparent; background: none; height: 32px; border-radius: 7px; padding: 0 8px; color: var(--text); cursor: pointer; max-width: 100%; }
.prop-ctl:hover { background: var(--hover); }
.prop-ctl:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.prop-user { display: inline-flex; align-items: center; gap: 8px; position: relative; padding: 3px 10px 3px 4px; border-radius: 18px; }
.prop-user:hover { background: var(--hover); }
.prop-user select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tag-picker { position: relative; }
.x-chip { display: inline-flex; align-items: center; gap: 3px; }
.x-chip button { border: 0; background: none; color: inherit; padding: 0; width: 14px; height: 14px; display: grid; place-items: center; opacity: .6; }
.x-chip button:hover { opacity: 1; }
.d-sec { margin-top: 22px; }
.d-sec h4 { margin: 0 0 8px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.d-sec h4 .muted { font-weight: 500; }
.d-notes { width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: none; outline: none; background: var(--surface); line-height: 1.55; overflow: hidden; }
.d-notes:hover { border-color: var(--line-strong); }
.d-notes:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.subs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sub { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.sub:last-child { border-bottom: 0; }
.sub:hover { background: var(--surface-2); }
.sub input.nm { flex: 1; border: 0; background: none; outline: none; height: 100%; min-width: 0; }
.sub.done input.nm { color: var(--text-3); text-decoration: line-through; }
.sub .act { opacity: 0; display: flex; gap: 2px; align-items: center; }
.sub:hover .act, .sub:focus-within .act { opacity: 1; }
.sub .due { font-size: 12px; }
.sub-add input { flex: 1; border: 0; background: none; outline: none; height: 100%; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.file { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); position: relative; text-decoration: none; color: var(--text); display: block; }
.file .thumb { height: 86px; display: grid; place-items: center; background: var(--sunken); color: var(--text-3); font-weight: 700; font-size: 13px; overflow: hidden; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file .meta { padding: 6px 9px; font-size: 12px; }
.file .meta b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .del { position: absolute; top: 5px; right: 5px; opacity: 0; background: var(--surface); }
.file:hover .del { opacity: 1; }
.file-add { border: 1.5px dashed var(--line-strong); border-radius: 10px; display: grid; place-items: center; min-height: 118px; color: var(--text-3); cursor: pointer; font-size: 13px; text-align: center; padding: 10px; }
.file-add:hover { border-color: var(--accent); color: var(--accent-text); }
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed .act-line { font-size: 12.5px; color: var(--text-3); padding: 4px 0 4px 34px; }
.feed .act-line b { color: var(--text-2); font-weight: 600; }
.cmt { display: flex; gap: 10px; padding: 10px 0; }
.cmt .bubble { flex: 1; min-width: 0; }
.cmt .who { font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.cmt .who b { font-weight: 650; }
.cmt .who small { color: var(--text-3); font-size: 12px; }
.cmt .txt { margin-top: 3px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.cmt .tools { margin-left: auto; opacity: 0; }
.cmt:hover .tools { opacity: 1; }
.mention { color: var(--accent-text); background: var(--accent-soft); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.d-foot { border-top: 1px solid var(--line); padding: 12px 18px; background: var(--surface-2); }
.composer { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.composer textarea { flex: 1; min-height: 40px; max-height: 180px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; outline: none; resize: none; background: var(--surface); }
.composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.followers { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.mention-pop { position: absolute; bottom: 100%; left: 36px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 220px; z-index: 10; }

/* ===== Menús, modales, avisos ===== */
.menu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 200px; max-height: 360px; overflow-y: auto; animation: fade .1s; }
.menu button, .mention-pop button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13.5px; }
.menu button:hover, .menu button.active, .mention-pop button:hover, .mention-pop button.active { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .sw { width: 12px; height: 12px; border-radius: 4px; }
.menu .menu-input { padding: 4px 4px 6px; }
.menu .menu-input input { height: 32px; }
.colors { display: grid; grid-template-columns: repeat(5, 28px); gap: 8px; padding: 8px; }
.colors button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; padding: 0; }
.colors button.on { border-color: var(--text); }
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } }
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: grid; place-items: start center; padding: 10vh 16px 16px; overflow-y: auto; animation: fadeb .15s; }
@keyframes fadeb { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; animation: rise .18s cubic-bezier(.2,.8,.2,1); }
.modal.wide { max-width: 620px; }
@keyframes rise { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 4px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 14px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 22px 20px; }
.search-modal { max-width: 600px; overflow: hidden; }
.search-modal input { border: 0; border-bottom: 1px solid var(--line); height: 54px; font-size: 16px; padding: 0 20px; width: 100%; outline: none; background: none; }
.search-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
.search-results button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: left; }
.search-results button.active, .search-results button:hover { background: var(--hover); }
.search-results .lbl { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px 4px; }
.member-list { border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow-y: auto; }
.member-list label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.member-list label:last-child { border-bottom: 0; }
.radio-card { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin-bottom: 8px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card small { display: block; color: var(--text-2); }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; display: flex; align-items: center; gap: 12px; animation: rise .2s; }
.toast button { background: none; border: 0; color: #93bbff; font-weight: 700; }
.toast.err { background: var(--danger); }
.banner { margin: 12px 24px 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.banner .btn { margin-left: auto; }

/* ===== Móvil ===== */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .shell.side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .burger { display: inline-flex; }
  .topbar, .page-head, .toolbar { padding-left: 16px; padding-right: 16px; }
  .pad, .board, .cal { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .home { padding: 20px 16px 40px; }
  .toolbar .search input { width: 150px; }
  .cal-day { min-height: 84px; padding: 4px; }
  .cal-item { font-size: 11px; padding: 2px 4px; }
  .cal-dow { padding: 6px 4px; font-size: 11px; }
  .tl { grid-template-columns: 170px 1fr; }
  .drawer-back.show { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.3); }
  .props { grid-template-columns: 100px 1fr; }
  .d-body { padding: 12px 16px 20px; }
  .team-table .hide-sm { display: none; }
  .srow .chip.tag, .srow .pchip, .srow .meta-icons, .mini-row .pchip { display: none; }
  .toolbar .search input { width: 100%; }
  .toolbar .search { flex: 1; min-width: 140px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Íconos en recuadro (estilo suite) ===== */
.ibox { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.ibox svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ibox.sm { width: 34px; height: 34px; border-radius: 10px; }
.ibox.sm svg { width: 18px; height: 18px; }
.stat .ibox { margin-bottom: 12px; }
.stat.red .ibox { background: var(--danger-soft); color: var(--danger); }
.stat.green .ibox { background: var(--ok-soft); color: var(--ok); }
.stat.warn .ibox { background: var(--warn-soft); color: var(--warn); }
.link-arrow { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 14px; }
.link-arrow:hover { color: var(--accent-2); }

/* ===== Roles y permisos ===== */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.role-card h3 { margin: 10px 0 0; font-size: 17px; }
.role-card p { margin: 0; color: var(--text-2); font-size: 13.5px; flex: 1; }
.role-card .meta { font-size: 12.5px; color: var(--text-3); margin: 6px 0 10px; }
.perm-group { margin-bottom: 16px; }
.perm-group h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.perm { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.perm:hover { background: var(--hover); }
.perm input { width: 16px; height: 16px; accent-color: var(--accent); }
.perm.locked { opacity: .6; cursor: default; }
.sub-tabs { display: flex; gap: 6px; margin: 4px 0 18px; }
.sub-tabs button { border: 1px solid var(--line); background: var(--surface); height: 34px; padding: 0 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.sub-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Panel del proveedor ===== */
.prov { max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; }
.prov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.prov-head h1 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.02em; }
.prov-head p { margin: 4px 0 0; color: var(--text-2); }
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.tenant-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.tenant-card:hover { box-shadow: var(--shadow); }
.tenant-card.off { opacity: .7; }
.tenant-card h3 { margin: 14px 0 2px; font-size: 19px; letter-spacing: -.01em; }
.tenant-card .sub { color: var(--text-3); font-size: 13px; }
.tenant-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.tenant-stats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.tenant-stats b { display: block; font-size: 17px; }
.tenant-stats span { font-size: 12px; color: var(--text-3); }
.seat-bar { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; margin: 4px 0 14px; }
.seat-bar i { display: block; height: 100%; background: var(--accent); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.off { background: var(--danger-soft); color: var(--danger); }
.integ { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin-top: 30px; }
.code { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin-top: 10px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.ro-banner { margin: 12px 24px 0; padding: 9px 14px; border-radius: 12px; background: var(--sunken); color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; }

.cell-date { position: relative; cursor: pointer; border-radius: 6px; }
.cell-date:hover { background: var(--hover); }
.cell-date .due.empty { color: transparent; }
.lrow:hover .cell-date .due.empty { color: var(--text-3); }
.cell-date input { position: absolute; left: 10px; bottom: 6px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cell-pri { position: relative; }
.cell-pri select { position: absolute; inset: 6px 8px; opacity: 0; cursor: pointer; width: calc(100% - 16px); }
.cell-pri .muted { opacity: 0; }
.lrow:hover .cell-pri .muted { opacity: 1; }
.perm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .perm-cols { grid-template-columns: 1fr; } }
.tl-months div { overflow: visible; }
.tl-months span { position: sticky; left: 290px; }

/* UBORIA Work shell */
:root{--accent:#0e7490;--accent-hover:#0c637a;--bg:#f3f6fc;--radius:12px}
.work-brand{padding:18px 14px 22px;display:grid;justify-items:center;gap:12px}.work-brand img{width:180px;height:120px;object-fit:contain;background:white;border-radius:14px}.work-brand small{color:#bfd6ea;letter-spacing:3px;font-weight:700}.side{--side-text:#c5d8e9;--side-strong:#fff;--side-hover:#ffffff12;--side-active:#0e7490;--side-active-text:#fff;--side-line:#ffffff18;--side-label:#a4bed5;background:linear-gradient(160deg,#123348,#164f67);color:#dce8f6}.work-account{padding:14px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:flex-end;align-items:center;gap:14px;background:var(--surface)}.work-account span{display:grid;gap:4px;margin-right:auto}.work-account small{color:var(--text-3);font-size:11px}.work-account b{font-size:12px}.work-account .btn{font-size:12px}.side-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain}.work-brand+small{letter-spacing:2px}@media(max-width:700px){.work-account{flex-wrap:wrap;padding:12px 16px;gap:9px}.work-account span{width:100%}.work-brand img{width:148px;height:98px}.work-account .btn{min-height:38px}}

.work-company-logo{width:48px;height:48px;object-fit:contain;border:1px solid var(--line);border-radius:10px;padding:4px;background:white}

.work-account{flex:none}

.work-brand img{box-sizing:border-box;padding:8px}.shell{height:100dvh}
.boot-logo{width:88px;height:88px;border-radius:50%;background:#fff url('/uboria.png') center/64px auto no-repeat;border:3px solid #dbeafe;border-top-color:#0e7490}
@media(max-width:700px){.work-account{display:grid;grid-template-columns:40px minmax(0,1fr) minmax(0,1fr)}.work-account span{width:auto;grid-column:2/-1}.work-company-logo{width:40px;height:40px}.work-account a.btn{grid-column:1/3;grid-row:2}.work-account button.btn{grid-column:3;grid-row:2}}
