:root {
  --bg-l: #f4f6f9; --tag-l: #eef1f6; --line-l: #e1e5ec; --info-l: #eaf1ff;
  --bg-d: #12151c; --card-d: #1b2029; --tag-d: #262d39; --line-d: #2c3340; --info-d: #1a2640;
  --primary-l: #1f5eff; --primary-d: #5b8cff;
}
/* Paletas de color (cada usuario elige la suya abajo de todo): cambian el acento y también el tono del fondo, bordes y etiquetas. */
[data-palette="azul"] { --primary-l: #1f5eff; --primary-d: #5b8cff; --bg-l: #edf2fc; --tag-l: #e3eaf9; --line-l: #d6dff1; --info-l: #e1eaff;
  --bg-d: #0f1420; --card-d: #172034; --tag-d: #222c44; --line-d: #2a3551; --info-d: #1a2744; }
[data-palette="verde"] { --primary-l: #15803d; --primary-d: #4ade80; --bg-l: #edf6f0; --tag-l: #e1efe6; --line-l: #d0e4d7; --info-l: #def2e4;
  --bg-d: #0e1611; --card-d: #15231a; --tag-d: #1f3327; --line-d: #28402f; --info-d: #17301f; }
[data-palette="violeta"] { --primary-l: #7c3aed; --primary-d: #a78bfa; --bg-l: #f3effc; --tag-l: #e9e2fa; --line-l: #dcd2f2; --info-l: #ebe2ff;
  --bg-d: #14101f; --card-d: #1e1830; --tag-d: #2a2240; --line-d: #342a4e; --info-d: #261c40; }
[data-palette="naranja"] { --primary-l: #c2410c; --primary-d: #fb923c; --bg-l: #fbf2eb; --tag-l: #f6e6da; --line-l: #edd6c6; --info-l: #fde8d8;
  --bg-d: #19120d; --card-d: #261b13; --tag-d: #35261b; --line-d: #433022; --info-d: #3a2414; }
[data-palette="bordo"] { --primary-l: #9f1239; --primary-d: #fb7185; --bg-l: #fbeff2; --tag-l: #f5e1e7; --line-l: #ebcfd7; --info-l: #fde2e9;
  --bg-d: #190e12; --card-d: #26161c; --tag-d: #352029; --line-d: #432833; --info-d: #3a1724; }
[data-palette="turquesa"] { --primary-l: #0f766e; --primary-d: #2dd4bf; --bg-l: #ebf6f5; --tag-l: #dfeeec; --line-l: #cde3e0; --info-l: #dcf3f0;
  --bg-d: #0d1615; --card-d: #132321; --tag-d: #1d312e; --line-d: #263f3b; --info-d: #153230; }
[data-palette="grafito"] { --primary-l: #374151; --primary-d: #cbd5e1; --bg-l: #f1f2f4; --tag-l: #e6e8ec; --line-l: #d7dae0; --info-l: #e6e9ee;
  --bg-d: #121417; --card-d: #1b1e23; --tag-d: #262a31; --line-d: #30353d; --info-d: #23272e; }
:root {
  --bg: var(--bg-l); --card: #fff; --text: #1d2433; --muted: #6b7486; --line: var(--line-l);
  --primary: var(--primary-l); --primary-text: #fff; --ok: #e6f6ec; --ok-text: #1d6b3a;
  --err: #fdecec; --err-text: #a12626; --info: var(--info-l); --late: #c62828; --tag: var(--tag-l);
  --warn: #fff4d6; --warn-text: #7a5200; --warn2: #ffe0c2; --warn2-text: #8a3b00;
  /* Cabecera: por defecto como las tarjetas; el admin le puede poner un color (tema.css). */
  --head-bg: var(--card); --head-text: var(--text); --head-muted: var(--muted); --head-line: var(--line);
  --nav-text: var(--text); --nav-hover: var(--tag); --nav-active-bg: color-mix(in srgb, var(--primary) 13%, var(--card)); --nav-active-text: var(--primary);
  color-scheme: light;
}
/* Modo oscuro: elegido a mano o automático según el equipo. */
[data-theme="dark"] {
  --bg: var(--bg-d); --card: var(--card-d); --text: #e6e9ef; --muted: #9aa3b5; --line: var(--line-d);
  --primary: var(--primary-d); --primary-text: #0b0f17; --ok: #173324; --ok-text: #8fdcaa; --err: #3a1a1a; --err-text: #ff9a9a;
  --info: var(--info-d); --late: #ff6b6b; --tag: var(--tag-d);
  --warn: #3a2f12; --warn-text: #ffd27a; --warn2: #3d2412; --warn2-text: #ffb27a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: var(--bg-d); --card: var(--card-d); --text: #e6e9ef; --muted: #9aa3b5; --line: var(--line-d);
    --primary: var(--primary-d); --primary-text: #0b0f17; --ok: #173324; --ok-text: #8fdcaa; --err: #3a1a1a; --err-text: #ff9a9a;
    --info: var(--info-d); --late: #ff6b6b; --tag: var(--tag-d);
    --warn: #3a2f12; --warn-text: #ffd27a; --warn2: #3d2412; --warn2-text: #ffb27a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 .8rem; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.req { color: var(--late); }

/* Diseño con menú lateral (v1.47): barra a la izquierda con el logo y las secciones; arriba a la derecha el usuario. */
:root { --side-w: 256px; --side-w-mini: 72px; }
body.with-side { padding-left: var(--side-w); }
html.side-mini body.with-side { padding-left: var(--side-w-mini); }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 40; display: flex; flex-direction: column;
  background: var(--head-bg); color: var(--head-text); border-right: 1px solid var(--head-line); transition: width .15s, transform .2s; }
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 14px; border-bottom: 1px solid var(--head-line); min-height: 68px; }
.side-brand .brand { font-weight: 700; font-size: 1.2rem; color: var(--head-text); }
.side-brand .brand img { height: 36px; max-width: 180px; object-fit: contain; display: block; }
.side-close { display: none; cursor: pointer; font-size: 18px; color: var(--head-text); padding: 4px 8px; }
.menu-main { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.menu-main .nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--nav-text);
  font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none; }
.menu-main .nav-link::-webkit-details-marker { display: none; }
.menu-main .nav-link:hover { background: var(--nav-hover); text-decoration: none; }
.menu-main .nav-link .ico { display: inline-flex; flex: 0 0 22px; justify-content: center; opacity: .85; }
.menu-main .nav-link .lbl { flex: 1; white-space: normal; line-height: 1.25; }
.menu-main .nav-link.active, .menu-main .dropdown.active > summary.nav-link { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }
.menu-main .nav-link.active .ico, .menu-main .dropdown.active > summary .ico { opacity: 1; }
.menu-main .nav-link.active, .menu-main .dropdown.active > summary.nav-link { box-shadow: inset 3px 0 0 var(--nav-active-text); }
.menu-main .nav-badges { display: flex; align-items: center; gap: 4px; }
.menu-main .nav-badges .nav-link { flex: 1; }
.menu-main .nav-badges > .badge { margin-right: 4px; }
.menu-main .dropdown summary.nav-link::after { content: "▾"; margin-left: auto; opacity: .7; }
.menu-main .dropdown[open] summary.nav-link::after { content: "▴"; }
.menu-main .dropdown-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 2px 0 6px 46px; min-width: 0; max-height: none; }
.menu-main .dropdown-menu a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--nav-text); opacity: .9; font-size: 14px; }
.menu-main .dropdown-menu a:hover { background: var(--nav-hover); text-decoration: none; opacity: 1; }
.menu-main .dropdown-menu a.current { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; opacity: 1; }
.menu-main .dropdown-menu .dd-group { color: var(--nav-text); opacity: .6; }
.side-collapse { display: flex; align-items: center; gap: 12px; margin: 8px 10px 14px; padding: 9px 12px; border: 0; border-top: 1px solid var(--head-line); border-radius: 0;
  background: transparent; color: var(--nav-text); opacity: .75; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.side-collapse:hover { opacity: 1; }
.side-collapse .ico { display: inline-flex; flex: 0 0 22px; justify-content: center; transition: transform .15s; }
/* Menú achicado: solo íconos */
html.side-mini .sidebar { width: var(--side-w-mini); }
html.side-mini .sidebar .lbl, html.side-mini .menu-main .dropdown summary.nav-link::after, html.side-mini .menu-main .nav-badges > .badge,
html.side-mini .menu-main .nav-link .badge { display: none; }
html.side-mini .side-brand { padding: 14px 8px; justify-content: center; }
html.side-mini .side-brand .brand img { max-width: 54px; height: 30px; }
html.side-mini .menu-main .nav-link { justify-content: center; padding: 10px 0; }
html.side-mini .side-collapse { justify-content: center; }
html.side-mini .side-collapse .ico { transform: rotate(180deg); }
html.side-mini .menu-main { overflow: visible; }
html.side-mini .menu-main .dropdown { position: relative; }
html.side-mini .menu-main .dropdown[open] .dropdown-menu { position: absolute; left: calc(100% + 10px); top: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 6px; min-width: 220px; max-height: 75vh; overflow-y: auto; z-index: 50; }
html.side-mini .menu-main .dropdown[open] .dropdown-menu a { color: var(--primary); }
html.side-mini .menu-main .dropdown[open] .dropdown-menu .dd-group { color: var(--muted); }
/* Barra de arriba: usuario fijo a la derecha */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 68px;
  padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.menu-user { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; font-size: 14px; }
.menu .who, .menu-user .who { color: var(--text); font-weight: 600; font-size: 14px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover, .icon-btn.active { background: var(--tag); color: var(--text); text-decoration: none; }
.icon-btn .badge { position: absolute; top: 0; right: -2px; }
.user-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.user-btn:hover { background: var(--tag); text-decoration: none; }
.user-btn.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.user-btn.logout:hover { color: var(--late); border-color: var(--late); }
.menu-user .view-as select { max-width: 210px; padding: 5px 8px; font-size: 13px; }
.menu-toggle, .menu-btn, .side-overlay { display: none; }
@media (max-width: 900px) {
  body.with-side, html.side-mini body.with-side { padding-left: 0; }
  .sidebar, html.side-mini .sidebar { width: min(85vw, 300px); transform: translateX(-105%); box-shadow: 0 0 30px rgba(0,0,0,.25); }
  html.side-mini .sidebar .lbl { display: inline; }
  html.side-mini .menu-main .nav-link { justify-content: flex-start; padding: 9px 12px; }
  .menu-toggle:checked ~ .sidebar { transform: none; }
  .menu-toggle:checked ~ .side-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .side-close { display: block; }
  .side-collapse { display: none; }
  .topbar { justify-content: space-between; padding: 8px 12px; min-height: 58px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text); padding: 6px; }
  .menu-user { gap: 6px; }
  .menu-user .lbl, .menu-user .who-text, .menu-user .role-pill, .menu-user .view-as { display: none; }
  .user-btn { padding: 7px 9px; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.card { padding: 16px; }
legend { font-weight: 600; padding: 0; margin-bottom: 10px; font-size: 1.05rem; }
label { display: block; margin-bottom: 12px; font-weight: 500; font-size: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); color: var(--text); }
input:disabled { opacity: .7; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; }
.grid .wide { grid-column: 1 / -1; }

.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-decoration: none !important; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .6; }
button.link { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { margin: 0; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--info); }
.flash.ok { background: var(--ok); color: var(--ok-text); }
.flash.error { background: var(--err); color: var(--err-text); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { margin: 0; width: auto; flex: 1 1 180px; }
.filters label.check { margin: 0; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table tr.archived { opacity: .55; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table td { border: 0; padding: 3px 12px; }
  .table td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13px; }
}

.tag { display: inline-block; background: var(--tag); border-radius: 999px; padding: 1px 10px; font-size: 13px; }
.tag.late { background: var(--late); color: #fff; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--muted); }
.code.big { font-size: 15px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }

.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stage { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--text); text-decoration: none !important; }
.stage .n { display: block; font-size: 1.6rem; font-weight: 700; }
.stage .l { font-size: 13px; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.note { white-space: pre-wrap; word-wrap: break-word; }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 3px solid var(--primary); padding: 4px 0 12px 12px; margin-bottom: 4px; }
.timeline .meta { font-size: 13px; color: var(--muted); }
.data { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 0; }
.data dt { color: var(--muted); font-size: 13px; }
.data dd { margin: 0; word-wrap: break-word; }
.data dd.pre { white-space: pre-wrap; }
.temp-pass { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; background: var(--tag); padding: 12px; border-radius: 8px; text-align: center; user-select: all; }
.hidden { display: none; }
.btn.danger { color: var(--late); }
.field-list { list-style: none; padding: 0; margin: 0; }
.field-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.field-list li:last-child { border-bottom: 0; }
.field-list .tag { margin-left: 4px; }
.sys-status { position: fixed; right: 12px; bottom: 12px; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sys-status strong { color: var(--text); font-weight: 600; }
@media (max-width: 700px) { .sys-status { position: static; margin: 0 16px 16px; } }
.flash.warn { background: var(--warn); color: var(--warn-text); }
.task { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.task.ok { background: var(--ok); color: var(--ok-text); }
.task.aviso1 { background: var(--warn); color: var(--warn-text); }
.task.aviso2 { background: var(--warn2); color: var(--warn2-text); }
.task.vencido { background: var(--late); color: #fff; }
.task-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: -4px; }
.alert-badge { background: var(--warn); color: var(--warn-text) !important; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.alert-badge.has-overdue { background: var(--late); color: #fff !important; }
.summary { margin-bottom: 12px; }
.stage-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 0 12px; align-items: end; }
@media (max-width: 800px) { .stage-grid { grid-template-columns: 1fr 1fr; } .stage-grid .stage-name { grid-column: 1 / -1; } }
.stage-card.stage-closed { opacity: .85; border-style: dashed; }
.stage-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
form.delete-stage { display: inline-flex; gap: 6px; align-items: center; }
.delete-stage select { width: auto; margin: 0; padding: 5px; font-size: 13px; }
.filters-box summary { cursor: pointer; }
.filters-box .filters { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; align-items: end; }
.filters-box .filters label { margin-bottom: 10px; }
.filters-box .filters input, .filters-box .filters select { width: 100%; margin-top: 4px; }
.filters-box .f-wide { grid-column: 1 / -1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .n { display: block; font-size: 1.4rem; font-weight: 700; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi.bad .n { color: var(--late); }
.table .num { text-align: right; white-space: nowrap; }
.total-row td { font-weight: 700; border-top: 2px solid var(--line); }
.bar-col { width: 30%; }
.bar { width: 100%; height: 12px; }
@media (max-width: 700px) { .bar-col { display: none !important; } }
.dropdown { position: relative; }
.dropdown summary { cursor: pointer; color: var(--primary); list-style: none; }
.dropdown summary::after { content: " ▾"; }
.dropdown-menu { position: absolute; top: 28px; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; min-width: 160px; z-index: 30; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.dropdown-menu a { display: block; padding: 6px 14px; }
@media (max-width: 800px) { .dropdown-menu { position: static; box-shadow: none; border: 0; padding-left: 12px; } }
.login-logo { display: block; max-height: 80px; max-width: 240px; margin: 0 auto 16px; object-fit: contain; }
.prefs { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 0 16px 8px; font-size: 13px; color: var(--muted); }
.prefs select { width: auto; display: inline-block; margin: 0 0 0 4px; padding: 4px 8px; font-size: 13px; }
.swatches { display: inline-flex; gap: 6px; vertical-align: middle; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); padding: 0; cursor: pointer; background: var(--primary-l); }
[data-theme="dark"] .swatch { background: var(--primary-d); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .swatch { background: var(--primary-d); } }
.swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
.logo-preview { max-height: 90px; max-width: 280px; background: var(--tag); padding: 8px; border-radius: 8px; display: block; margin-bottom: 10px; }
.msel-wrap { margin-bottom: 10px; }
.msel-label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.msel { position: relative; }
.msel summary { list-style: none; cursor: pointer; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); white-space: nowrap; display: flex; justify-content: space-between; gap: 6px; overflow: hidden; }
.msel summary::-webkit-details-marker { display: none; }
.msel summary::after { content: "▾"; color: var(--muted); }
.msel[open] summary { outline: 2px solid var(--primary); outline-offset: -1px; }
.msel-menu { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; right: 0; min-width: 200px; max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.msel-menu label.check { margin: 4px 0; font-size: 14px; }
.secondary-brands { margin-top: 6px; font-weight: 400; }
meter.bar.mini { width: 60px; height: 10px; vertical-align: middle; }
.filters-box .filters label.check input, .msel-menu input { width: auto !important; margin: 0 !important; flex: none; }
.msel-menu label.check { justify-content: flex-start; text-align: left; }
.filters-box .filters { align-items: start; }
.nowrap { white-space: nowrap; }
.msel-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inline-form.grow { flex: 1; min-width: 200px; }
.danger-link { color: var(--late) !important; margin-left: 6px; }
.upload-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.timeline.comments li { border-left-color: var(--muted); }
.timeline.comments { margin-top: 12px; }
/* Historial del proyecto: un color por tipo de movimiento */
.h-creado { --h: #0f9d8a; }
.h-fase { --h: #7c3aed; }
.h-seguimiento { --h: #16a34a; }
.h-comentario { --h: #2563eb; }
.h-cambio { --h: #ea580c; }
.h-archivo { --h: #64748b; }
.h-archivado { --h: #dc2626; }
.hist-tag { display: inline-block; background: var(--h); color: #fff !important; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hist-tag .n { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: 12px; }
.hist-tag.on { outline: 2px solid var(--text); outline-offset: 2px; }
.hist-tag.dim { opacity: .45; }
.hist-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { border-left: 4px solid var(--h); padding: 6px 0 12px 12px; margin-bottom: 6px; }
.hist-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-detail { white-space: pre-wrap; margin: 6px 0 2px; overflow-wrap: anywhere; }
.hist .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.btn-hist { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; white-space: nowrap; margin-left: 4px; }
.check-list { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.check-list label.check input, .pm-edit label.check input { width: auto; margin: 0; }
.pm-edit summary { cursor: pointer; color: var(--primary); }
.pm-edit form { margin-top: 6px; display: grid; gap: 4px; justify-items: start; }
[hidden] { display: none !important; }
/* Capacitaciones */
.lvl { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; background: var(--tag); white-space: nowrap; }
.lvl-inicial { background: #fde68a; color: #713f12; }
.lvl-intermedio { background: #bfdbfe; color: #1e3a8a; }
.lvl-avanzado { background: #bbf7d0; color: #14532d; }
.st { font-size: 12px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); white-space: nowrap; }
.st-aprobada { border-color: #16a34a; color: #16a34a; }
.st-rechazada { border-color: #dc2626; color: #dc2626; }
.st-pendiente { color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.selected-row td { background: var(--tag); }
.mail-preview { white-space: pre-wrap; font-size: 13px; background: var(--tag); padding: 10px; border-radius: 8px; overflow-wrap: anywhere; max-height: 400px; overflow: auto; }
.tag.cat { background: #e0e7ff; color: #3730a3; }
[data-theme="dark"] .tag.cat { background: #312e81; color: #e0e7ff; }
.cat-tags { margin: -4px 0 8px; }
.cat-pick { margin-bottom: 10px; }
.period-pick { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.period-pick label { display: flex; gap: 6px; align-items: center; margin: 0; }
.period-pick input, .period-pick select { width: auto; margin: 0; }
.goal-input { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 8px; margin-bottom: 6px; }
.goal-input input { margin: 0; text-align: right; }
.mt { margin-top: 10px; }
.idle-tag { font-size: 12px; border-radius: 999px; padding: 1px 8px; background: var(--late); color: #fff; }
tr.idle td { background: color-mix(in srgb, var(--late) 8%, transparent); }
@media print {
  .topbar, .sidebar, .side-overlay, .prefs, .sys-status, .no-print, .filters-box, footer, .flash, details.card:not([open]) { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  body.with-side { padding-left: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  a { color: #000 !important; text-decoration: none !important; }
  .table-wrap { overflow: visible !important; }
}
.tag.goal-done { background: var(--ok); color: var(--ok-text); font-weight: 600; }
.podium { display: flex; gap: 12px; align-items: flex-end; justify-content: center; margin: 8px 0 16px; flex-wrap: wrap; }
.podium-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; text-align: center; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.podium-step.p1 { padding-top: 28px; border-color: #d4a017; }
.podium-step.me, .rank-top li.me { font-weight: 700; }
.podium-step .medal { font-size: 28px; }
.podium-step .pts { color: var(--muted); }
.me-row td { background: var(--info); }
.rank-me { font-size: 17px; margin: 4px 0 8px; }
.rank-top { margin: 0 0 8px; padding-left: 0; list-style: none; }
.podium-step.p2 { order: 1; } .podium-step.p1 { order: 2; } .podium-step.p3 { order: 3; }
.agenda-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.agenda-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 140px; }
.agenda-day h3 { font-size: 14px; margin: 0 0 8px; }
.agenda-day.today { border: 2px solid var(--primary); }
.agenda-day.weekend { opacity: .85; }
.agenda-item { display: flex; flex-direction: column; gap: 2px; border-left: 4px solid var(--line); padding: 4px 0 4px 8px; margin-bottom: 8px; font-size: 14px; overflow-wrap: anywhere; }
.ag { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; width: fit-content; }
.ag-accion { background: var(--info); color: var(--primary); } .ag-b-accion { border-left-color: var(--primary); }
.ag-fase { background: var(--warn2); color: var(--warn2-text); } .ag-b-fase { border-left-color: var(--warn2-text); }
.ag-cierre { background: var(--ok); color: var(--ok-text); } .ag-b-cierre { border-left-color: var(--ok-text); }
.ag-cert { background: var(--warn); color: var(--warn-text); } .ag-b-cert { border-left-color: var(--warn-text); }
.ag-contacto { background: var(--info); color: var(--text); border: 1px solid var(--primary); } .ag-b-contacto { border-left-color: var(--text); border-left-style: dashed; }
.agenda-legend .ag { margin-right: 4px; }
@media (max-width: 900px) {
  .agenda-week { grid-template-columns: 1fr; }
  .agenda-day { min-height: 0; }
  .agenda-day.empty { padding: 6px 8px; }
  .agenda-day.empty p { display: none; }
  .agenda-day.empty h3 { margin: 0; }
}
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.view-switch button { border: 0; background: transparent; color: var(--muted); padding: 2px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.view-switch button.on { background: var(--primary); color: var(--primary-text); cursor: default; }
.view-banner .link { margin-left: 6px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.three-col .card { margin-bottom: 0; }
@media (max-width: 900px) { .three-col { grid-template-columns: 1fr; } }
.table.compact td { padding: 4px 6px; }
.stage .n.small-n { font-size: 18px; }
.tag.st-won { background: var(--ok); color: var(--ok-text); }
.tag.st-lost { background: var(--err); color: var(--err-text); }
.tag.pending { background: var(--warn); color: var(--warn-text); }
.review-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.review-actions select { max-width: 220px; }
.new-client { margin-top: 4px; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--late); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 18px; }
.code-input { font-size: 24px; letter-spacing: 6px; text-align: center; }
.order-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.order-row label { flex: 1 1 160px; }
.orders-list { margin: 0; padding-left: 18px; }
.agenda-views a { color: var(--muted); padding: 4px 14px; font-size: 14px; text-decoration: none; }
.agenda-views a.on { background: var(--primary); color: var(--primary-text); }
.agenda-week-title { font-size: 16px; margin: 16px 0 8px; }
.agenda-day.past { opacity: .7; }
.agenda-single { max-width: 720px; }
.cat-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cat-list { list-style: none; padding: 0; margin: 0 0 12px; }
.cat-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cat-list li.archived { opacity: .6; }
.cat-rename { display: flex; gap: 6px; flex: 1 1 180px; }
.cat-rename input { flex: 1; min-width: 0; }
.cat-count { font-weight: 600; white-space: nowrap; }
.cat-value { display: block; padding: 6px 0; font-weight: 600; }
.cat-brands { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.cat-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.cat-rename input { width: auto; }
.cat-rename button, .cat-list .btn { white-space: nowrap; }
.cat-list .cat-rename { display: flex; flex-wrap: nowrap; }
.view-as { display: inline-flex; gap: 4px; align-items: center; }
.view-as select { max-width: 200px; padding: 2px 6px; font-size: 13px; }
.badge.warn { background: #f2b300; color: #2e2000; }
a.badge { text-decoration: none; }
a.badge:hover { filter: brightness(1.1); }
.nav-badges { display: inline-flex; align-items: center; gap: 4px; }
.menu-btn .badge { margin-left: 4px; font-size: 11px; vertical-align: top; }
.pending-box { border-left: 4px solid #f2b300; }
.preventa-field { display: flex; flex-direction: column; gap: 6px; }
.preventa-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.preventa-row select { flex: 1 1 180px; width: auto; }
.pv-add { align-self: flex-start; }
.role-pill { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 13px; background: var(--primary); color: var(--primary-text); }
.who-box { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.overdue-list { margin: 0; padding-left: 24px; } .overdue-list li { padding: 4px 0; }
.goal-table input { width: 100%; min-width: 90px; }
.goal-table .g-total { font-weight: 700; }
.goal-table input.bad { border-color: var(--late); background: var(--err); }
.month-table td.mm { white-space: nowrap; }
.mm-ok { background: var(--ok); color: var(--ok-text); }
.mm-mid { background: var(--warn); color: var(--warn-text); }
.mm-low { background: var(--err); color: var(--err-text); }
.mm-future { color: var(--muted); }
.carry { color: var(--ok-text); font-weight: 600; }
.audit-detail { white-space: pre-line; min-width: 220px; font-size: 13px; }
.material-list { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
.material-list li { margin: 2px 0; overflow-wrap: anywhere; }
details.add-material { display: inline-block; }
details.add-material > summary { list-style: none; cursor: pointer; }
details.add-material > summary::-webkit-details-marker { display: none; }
details.add-material[open] form { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.news-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.news-head h2 { margin: 0; }
.news-body { margin: 10px 0; }
.news-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 10px 0; }
.news-images img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: var(--tag); display: block; }
.news-video { width: 100%; max-height: 420px; border-radius: 8px; margin: 8px 0; background: #000; }
.news-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.news-filters .f-wide { flex: 1 1 240px; }
.news-body.pre { white-space: pre-wrap; }
.material-list > div { margin: 2px 0; overflow-wrap: anywhere; }
.row-actions details.add-material[open] { flex-basis: 100%; order: 10; }
.menu-order { list-style: none; padding: 0; margin: 0; }
.menu-order li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu-order li:last-child { border-bottom: 0; }
code.big { font-size: 20px; padding: 4px 10px; background: var(--tag); border-radius: 6px; user-select: all; }
.demo-password { border: 2px solid var(--primary); }
.danger-zone { border: 2px solid var(--late); }
.cols-box .checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* v1.39.0: agenda en lista y días con resumen */
.agenda-list { max-width: 820px; }
.agenda-list-day { margin-bottom: 12px; }
.agenda-list-day h2 { font-size: 16px; margin: 0 0 10px; }
.agenda-list-day h2 a, .agenda-day h3 a { color: inherit; text-decoration: none; }
.agenda-list-day h2 a:hover, .agenda-day h3 a:hover { text-decoration: underline; }
.agenda-list-day.today { border: 2px solid var(--primary); }
.agenda-more { display: flex; flex-direction: column; gap: 2px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--line); text-decoration: none; color: var(--text); }
.agenda-more:hover { border-color: var(--primary); }
.agenda-more-all { color: var(--primary); font-weight: 600; }
.agenda-list .agenda-item { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin-bottom: 6px; }
.agenda-day .agenda-item .muted { display: none; }
/* v1.40.0: novedades como titulares, logos de marca */
.news-list { padding: 0; overflow: hidden; }
.news-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.news-row:last-child { border-bottom: 0; }
.news-row:hover { background: var(--bg); }
.news-row.unread .news-title { color: var(--primary); }
.news-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.news-go { color: var(--muted); font-size: 22px; }
.news-logo { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.news-logo-empty { display: flex; align-items: center; justify-content: center; background: var(--tag); color: var(--muted); font-weight: 700; }
.news-detail-head { display: flex; gap: 14px; align-items: flex-start; }
.news-detail-head h1 { margin: 0 0 4px; }
.news-detail-head .news-logo { width: 64px; height: 64px; flex-basis: 64px; }
.brand-cell { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
/* v1.42.0: avisos — globito sobre el logo */
.brand-wrap { position: relative; display: inline-flex; align-items: center; margin-right: 8px; }
.brand-alert { position: absolute; top: -8px; right: -12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--late); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  text-decoration: none; box-shadow: 0 0 0 2px var(--card); }
.brand-alert:hover { filter: brightness(1.1); }
.notif-list { padding: 0; overflow: hidden; }
.notif { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--bg); }
.notif.unread { background: var(--info); font-weight: 600; }
.notif-text { flex: 1 1 300px; min-width: 0; overflow-wrap: anywhere; }
.notif-when { white-space: nowrap; }
.notif-home .notif { padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; border-bottom: 0; }
/* v1.42.1: celular — formularios en línea y categorías por marca sin desbordar */
.inline-form { flex-wrap: wrap; }
@media (max-width: 600px) {
  .cat-list li { grid-template-columns: 1fr auto; }
  .cat-list li .cat-rename { grid-column: 1 / -1; }
}
/* v1.43.0: faltantes de stock */
.stock-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.stock-row > label { flex: 1 1 200px; margin: 0; }
.stock-row > label.grow { flex: 2 1 240px; }
.stock-row > label.narrow { flex: 0 1 110px; }
.stock-more { margin-top: 12px; }
.stock-kinds { border: 0; padding: 0; margin: 0; }
.stock-kinds legend { font-size: 13px; margin-bottom: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-opt { margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-right: 1px solid var(--line); white-space: nowrap; }
.seg-opt:last-child span { border-right: 0; }
.seg-opt input:checked + span { background: var(--primary); color: var(--primary-text); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-sin_stock { background: #dc2626; } .dot-poco_stock { background: #ea8a0c; } .dot-proyecto { background: #2563eb; }
.stock-send { height: 42px; }
.stock-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.stock-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; border-bottom: 4px solid var(--line); }
.stock-kpi .l { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.stock-kpi .n { font-size: 30px; font-weight: 700; }
.stock-kpi.on { border-width: 2px 2px 4px; border-color: var(--primary); }
.k-total { border-bottom-color: #1f4e79; } .k-sin_stock { border-bottom-color: #dc2626; } .k-poco_stock { border-bottom-color: #ea8a0c; } .k-proyecto { border-bottom-color: #2563eb; }
.stock-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.stock-filters input, .stock-filters select { width: auto; margin: 0; }
.stock-filters .f-wide { flex: 1 1 240px; }
.stock-filters .f-date { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.stock-kind { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.stock-kind.k-sin_stock { background: #fde2e2; color: #a11d1d; } .stock-kind.k-poco_stock { background: #fdebd3; color: #8a4b05; } .stock-kind.k-proyecto { background: #dfe9fd; color: #1d4ab0; }
.stock-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.c-rojo { background: #fde2e2; color: #a11d1d; } .c-naranja { background: #fdebd3; color: #8a4b05; } .c-amarillo { background: #fdf3c4; color: #6b5200; }
.c-verde { background: #dcf5e3; color: #17663a; } .c-azul { background: #dfe9fd; color: #1d4ab0; } .c-violeta { background: #ece3fd; color: #5b2bb0; }
.c-gris { background: var(--tag); color: var(--muted); }
.stock-table tr.closed td { opacity: .75; }
.stock-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 280px; }
.stock-edit select, .stock-edit input { width: auto; margin: 0; }
.stock-edit input { flex: 1 1 160px; }
.stock-status-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stock-status-form label { margin: 0; }
.stock-status-form input[name=name] { width: auto; flex: 1 1 160px; }
@media (max-width: 800px) {
  .stock-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg { display: flex; width: 100%; } .seg-opt { flex: 1; } .seg-opt span { justify-content: center; padding: 9px 6px; }
  .stock-send { width: 100%; }
  .stock-filters input, .stock-filters select, .stock-filters .f-date { flex: 1 1 100%; }
  .stock-edit { min-width: 0; }
}
/* v1.43.0: configuración agrupada */
.dd-group { display: block; padding: 8px 14px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.config-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.config-group h2 { margin: 0 0 2px; font-size: 17px; }
.config-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.config-item:hover { background: var(--bg); }
.dropdown-menu { max-height: 75vh; overflow-y: auto; }
.container-wide { max-width: 1600px; }
.stock-edit { flex-direction: column; align-items: stretch; min-width: 240px; }
.stock-edit-top { display: flex; gap: 6px; }
.stock-edit-top select { flex: 1; }
.stock-edit input[name=comment] { flex: none; width: 100%; }
.stock-table td { vertical-align: top; }
.stock-status-form select, .stock-status-form input { width: auto; margin: 0; }
.stock-status-form input[name=name] { flex: 1 1 160px; }
.stock-filters .check { margin: 0; white-space: nowrap; }
@media (max-width: 800px) { .stock-filters .check { flex: 1 1 auto; } }

/* v1.44 Etiquetas de novedades: color fuerte en la etiqueta y franja al costado */
.news-tag { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .2px; white-space: nowrap; }
.tc-azul { background: #1f5fd6; } .tc-verde { background: #198a46; } .tc-rojo { background: #d0312d; }
.tc-naranja { background: #e8710a; } .tc-amarillo { background: #f2c200; color: #3a2f00; } .tc-violeta { background: #7c3aed; }
.tc-rosa { background: #db2777; } .tc-celeste { background: #0ea5e9; } .tc-turquesa { background: #0d9488; }
.tc-marron { background: #8b5a2b; } .tc-gris { background: #6b7280; }
/* v1.61.0: el color de la etiqueta va como franja arriba (antes al costado) */
.ts-azul { --ts: #1f5fd6; } .ts-verde { --ts: #198a46; } .ts-rojo { --ts: #d0312d; }
.ts-naranja { --ts: #e8710a; } .ts-amarillo { --ts: #f2c200; } .ts-violeta { --ts: #7c3aed; }
.ts-rosa { --ts: #db2777; } .ts-celeste { --ts: #0ea5e9; } .ts-turquesa { --ts: #0d9488; }
.ts-marron { --ts: #8b5a2b; } .ts-gris { --ts: #6b7280; }
.news-row-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.news-row-top:empty { display: none; }
.news-detail-head .news-row-top { margin-bottom: 4px; }
.news-pin { font-size: 12px; font-weight: 600; color: var(--muted); }
.news-row.pinned { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.news-event { color: var(--text); }
.news-event.past, .news-event-box.past { opacity: .7; }
.news-event-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.news-registered { color: var(--ok-text); font-weight: 700; }
.news-event-field[hidden] { display: none; }
.tag-palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 14px; }
.reminder-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.reminder-add input[type=number] { width: 90px; }

/* v1.45 Stock Hikvision */
.hik-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.hik-filters .f-wide { flex: 1 1 260px; }
.hik-card { padding: 0; overflow: hidden; }
.hik-wrap { overflow-x: auto; }
.hik-table { min-width: 100%; white-space: nowrap; }
.hik-table th, .hik-table td { padding: 8px 10px; }
.hik-table th a { color: inherit; text-decoration: none; }
.hik-group { text-align: center; text-transform: uppercase; font-size: 12px; letter-spacing: .4px; color: var(--muted); border-left: 1px solid var(--line); }
.hik-partner { border-left: 1px solid var(--line); font-size: 12px; text-transform: uppercase; vertical-align: top; }
.hik-partner span { display: block; text-transform: none; font-weight: 400; }
.hik-live { color: #b45309; }
.hik-ok { color: var(--ok-text); }
.hik-sku { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.hik-sticky { position: sticky; left: 0; background: var(--card, #fff); z-index: 1; }
.hik-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .hik-table { display: table; width: auto; }
  .hik-table thead { display: table-header-group; }
  .hik-table tbody { display: table-row-group; width: auto; }
  .hik-table tr { display: table-row; width: auto; padding: 0; }
  .hik-table td, .hik-table th { display: table-cell; width: auto; padding: 7px 8px; border-bottom: 1px solid var(--line); }
  .hik-sku { max-width: 140px; }
}
.hik-filters .check { white-space: nowrap; align-self: center; margin: 0; }
@media (max-width: 700px) { .hik-filters label:not(.check) { flex: 1 1 45%; } .hik-filters select { width: 100%; } }
.menu-rename { display: inline-flex; gap: 4px; align-items: center; }
.menu-rename input { width: 190px; padding: 4px 8px; font-size: 14px; }
@media (max-width: 600px) { .menu-rename input { width: 150px; } }
.menu-order form.menu-rename { display: inline-flex; flex-wrap: nowrap; }

/* v1.47 Tarjeta del usuario arriba a la derecha */
.user-chip { gap: 10px; }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: .5px; background: color-mix(in srgb, var(--primary) 14%, var(--card)); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.who-text { display: inline-flex; flex-direction: column; line-height: 1.2; }
.who-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.menu-user .role-pill { font-size: 12px; font-weight: 600; padding: 2px 10px; }
.header-color-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.header-color-row input[type=color] { width: 64px; height: 40px; padding: 2px; display: block; }
.color-chip { font-family: ui-monospace, Consolas, monospace; }

/* v1.48 Planilla externa */
.sheet-source .sheet-opt { margin: 4px 0 14px 28px; }
.sheet-source .sheet-opt input[name=path], .sheet-source .sheet-opt input[name=url] { width: 100%; }
.num-input { width: 80px; display: inline-block; }
.sheet-cols td input[type=text], .sheet-cols td input:not([type]) { min-width: 180px; padding: 4px 8px; }
.sheet-table td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sheet-table th.num, .sheet-table td.num { text-align: right; }
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.sheet-tabs a { padding: 9px 16px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sheet-tabs a:hover { color: var(--text); background: var(--nav-hover); }
.sheet-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--nav-active-bg); }
.sheet-views tr.current td { background: var(--nav-active-bg); }
/* Capacitaciones: matriz personas × marcas */
.cap-matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.cap-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.cap-matrix th, .cap-matrix td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.cap-matrix tbody tr:last-child th, .cap-matrix tbody tr:last-child td { border-bottom: 0; }
.cap-matrix thead th { background: var(--card); position: sticky; top: 0; z-index: 1; }
.cap-matrix .cm-person { position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; min-width: 170px; max-width: 240px;
  padding-left: 14px; font-weight: 600; border-right: 1px solid var(--line); }
.cap-matrix thead .cm-person { z-index: 3; color: var(--muted); font-size: 13px; }
.cap-matrix .cm-person a { color: var(--text); }
.cap-matrix .cm-person .small { display: block; font-weight: 400; }
.cap-matrix tbody tr:hover th, .cap-matrix tbody tr:hover td { background: var(--nav-hover); }
.cap-matrix tr.is-sel th, .cap-matrix tr.is-sel td, .cap-matrix td.is-sel { background: var(--nav-active-bg); }
.cm-brand { min-width: 92px; }
.cm-brand img { display: block; margin: 0 auto 4px; height: 30px; max-width: 86px; object-fit: contain; background: #fff; border-radius: 6px;
  padding: 3px 5px; border: 1px solid var(--line); }
.cm-brand.is-sel img { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.cm-initial { display: inline-flex; width: 30px; height: 30px; margin-bottom: 4px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-text); font-weight: 700; }
.cm-bname { display: block; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cm-cell { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px;
  padding: 4px 8px; border-radius: 10px; text-decoration: none; line-height: 1.15; background: var(--tag); color: var(--text); }
.cm-cell:hover { text-decoration: none; filter: brightness(.95); box-shadow: 0 0 0 2px var(--primary); }
.cm-cell strong { font-size: 18px; }
.cm-split { font-size: 11px; opacity: .8; white-space: nowrap; }
.cm-cell.lvl-inicial { background: #fde68a; color: #713f12; }
.cm-cell.lvl-intermedio { background: #bfdbfe; color: #1e3a8a; }
.cm-cell.lvl-avanzado { background: #bbf7d0; color: #14532d; }
.cm-empty { background: transparent; color: var(--muted); opacity: .6; }
.cm-pend { position: absolute; top: -6px; right: -4px; color: var(--late); font-size: 20px; line-height: 1; }
.cap-matrix .cm-total { font-size: 16px; min-width: 56px; }
.cm-legend { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cm-legend .cm-cell { min-width: 0; padding: 1px 8px; }
.cm-legend .cm-cell strong { font-size: 12px; }
.cap-logo { height: 22px; max-width: 70px; object-fit: contain; vertical-align: middle; background: #fff; border-radius: 4px; padding: 1px 3px; border: 1px solid var(--line); }
h2 .cap-logo { height: 28px; max-width: 110px; }
@media (max-width: 600px) {
  .bb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bb-tile { padding: 14px 8px 12px; }
  .bb-count { font-size: 32px; }
  .bb-logo { height: 52px; }
  .bb-logo img { max-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .bb-tile { transition: none; } .bb-tile:hover { transform: none; } }
@media (max-width: 600px) {
  .cap-matrix .cm-person { min-width: 118px; max-width: 140px; padding-left: 10px; font-size: 13px; }
  .cm-brand { min-width: 74px; }
  .cm-brand img { height: 24px; max-width: 70px; }
}
/* Portal Hik: catálogo */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cat-table td { vertical-align: top; }
.cat-photo { width: 64px; padding: 6px !important; }
.cat-photo img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); display: block; }
.cat-model { min-width: 230px; white-space: normal; }
.cat-model strong { display: block; }
.cat-model .small { display: block; }
.cat-sub { display: block; }
.cat-more { margin-top: 4px; font-size: 13px; }
.cat-more summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.cat-desc { white-space: pre-line; max-width: 420px; margin: 6px 0; }
.cat-price { font-weight: 600; }
.tag.cat-strat { background: var(--ok); color: var(--ok-text); }
.tag.cat-eol { background: var(--err); color: var(--err-text); }
.tag.cat-rel { background: var(--info); }
.cat-table td .tag { margin: 0 2px 2px 0; }
.cat-scale { vertical-align: bottom !important; }
.tag.cat-policy { background: var(--warn); color: var(--warn-text); }
/* Ojitos para mostrar u ocultar columnas */
.col-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.col-toggles-label { font-size: 13px; font-weight: 600; margin-right: 4px; }
.col-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--nav-active-bg); color: var(--primary); }
.col-toggle .i { width: 15px; height: 15px; }
.col-toggle[aria-pressed="false"] { background: transparent; color: var(--muted); border-color: var(--line); }
.col-toggle .eye-off, .col-toggle[aria-pressed="false"] .eye-on { display: none; }
.col-toggle[aria-pressed="false"] .eye-off { display: inline-flex; }
.col-toggle .eye-on { display: inline-flex; }
.col-toggle:focus-visible, .col-toggle-all:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.col-toggle-all { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 4px 6px; }
.col-off { display: none !important; }
.h1-sub { font-weight: 500; color: var(--muted); }

/* Gestión comercial */
.contact-kpis .kpi-goal { grid-column: span 2; }
.contact-kpis .kpi-goal .bar { margin: 6px 0 2px; }
.chips-field { border: 0; padding: 0; margin: 0 0 12px; }
.chips-field legend { font-weight: 500; font-size: 14px; margin-bottom: 6px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { margin: 0; font-weight: 400; position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14px; }
.chip:hover span { border-color: var(--primary); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.res-chip.res-venta input:checked + span { background: var(--ok-text); border-color: var(--ok-text); }
.res-chip.res-sin_respuesta input:checked + span, .res-chip.res-no_interesado input:checked + span { background: var(--muted); border-color: var(--muted); }
.res { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: 13px; background: var(--tag); white-space: nowrap; }
.res-interesado, .res-cotizacion { background: var(--info); color: var(--primary); font-weight: 600; }
.res-seguimiento { background: var(--warn); color: var(--warn-text); }
.res-venta { background: var(--ok); color: var(--ok-text); font-weight: 600; }
.res-sin_respuesta, .res-no_interesado { color: var(--muted); }
.next-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.next-box.needed { border-color: var(--primary); border-style: solid; }
.next-box .grid { margin-top: 8px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.next-list li.late { border-left: 3px solid var(--late); padding-left: 8px; }
.next-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.next-actions .btn .i { width: 16px; height: 16px; vertical-align: -3px; }
.tag.today-tag { background: var(--primary); color: var(--primary-text); }
.tag.ok-tag { background: var(--ok); color: var(--ok-text); }
.contact-table td.note { max-width: 360px; }
.contact-list .note { display: inline-block; margin-top: 2px; }
.team-chart { display: grid; gap: 6px; }
.team-chart .row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 8px; align-items: center; font-size: 14px; }
.team-chart meter { width: 100%; height: 12px; }
@media (max-width: 700px) { .contact-kpis .kpi-goal { grid-column: 1 / -1; } .team-chart .row { grid-template-columns: 110px 1fr 32px; } }
.team-table td:first-child { min-width: 210px; } .team-table th { white-space: nowrap; }
.states-table input { margin: 0; }
.states-table td:nth-child(3) input[type=number] { width: 90px; }
.states-table td:first-child { min-width: 170px; }
.states-table.st-table td:nth-child(4) { min-width: 240px; }
.states-table label.check { margin: 0; }
.quick-dates .next-clear { margin-left: auto; color: var(--muted); }
.states-table td:last-child { white-space: nowrap; }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Sugerencias del buscador de clientes */
.suggest-wrap { position: relative; display: block; }
.suggest-box { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 2px); margin: 0; padding: 4px 0; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  max-height: 320px; overflow-y: auto; font-weight: 400; }
.suggest-box li { padding: 7px 12px; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.suggest-box li.on, .suggest-box li.opt:hover { background: var(--nav-active-bg); }
.suggest-box li.empty { cursor: default; }
.suggest-box mark { background: color-mix(in srgb, var(--primary) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.suggest-box.hidden { display: none; }
label.check.prospect-check.hidden { display: none; }
.chips label.res-chip { background: none; font-weight: 400; }
.user-btn.act-btn { border-color: var(--late); color: var(--late); } .user-btn.act-btn.on { background: var(--late); color: #fff; }
.goals-table input { margin: 0; width: 100px; } .goals-table td:first-child { min-width: 180px; }
.btn.project-btn.hidden { display: none; }
/* «+ Proyecto» desplegado dentro del formulario de contacto. */
.project-panel { border: 2px solid var(--primary); border-radius: 10px; padding: 10px 12px; margin: 12px 0; min-width: 0; }
.project-panel[hidden] { display: none; }
.project-panel > legend { font-weight: 600; color: var(--primary); padding: 0 6px; }
.project-panel fieldset.card { box-shadow: none; margin: 8px 0; }
.next-box.next-off .grid { opacity: .45; }
.next-box.next-off input:disabled { background: var(--line); cursor: not-allowed; }
/* Faltantes: estado como etiqueta de color; el PM la despliega para cambiarlo. */
.stock-state-cell { min-width: 150px; }
.stock-last { display: block; margin-top: 4px; }
.stock-pick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; }
.stock-pick > summary::-webkit-details-marker { display: none; }
.stock-pick > summary:hover .stock-status, .stock-pick > summary:focus-visible .stock-status { box-shadow: 0 0 0 2px var(--primary); }
.stock-pick .pick-caret { font-size: 11px; color: var(--muted); }
.stock-pick[open] .pick-caret { transform: rotate(180deg); }
.stock-pick .stock-edit { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, transparent); min-width: 240px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { margin: 0; cursor: pointer; border-radius: 999px; font-size: 12px; font-weight: 600; position: relative; }
.st-chip input { position: absolute; opacity: 0; pointer-events: none; }
.st-chip span { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 2px solid transparent; opacity: .7; }
.st-chip:hover span { opacity: .85; }
.st-chip input:checked + span { opacity: 1; border-color: currentColor; }
.st-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.st-chip.c-rojo, .st-chip.c-naranja, .st-chip.c-amarillo, .st-chip.c-verde, .st-chip.c-azul, .st-chip.c-violeta, .st-chip.c-gris { background: none; }
.st-chip.c-rojo span { background: #fde2e2; } .st-chip.c-naranja span { background: #fdebd3; } .st-chip.c-amarillo span { background: #fdf3c4; }
.st-chip.c-verde span { background: #dcf5e3; } .st-chip.c-azul span { background: #dfe9fd; } .st-chip.c-violeta span { background: #ece3fd; }
.st-chip.c-gris span { background: var(--tag); }
.stock-table tr.my-task td:first-child { box-shadow: inset 4px 0 0 #e8890c; }
.stock-todo a { margin-left: 8px; font-weight: 600; }
/* Novedades con vencimiento */
.news-expiry-box { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; margin: 10px 0; border-radius: 10px; border: 1px dashed var(--line); }
.news-expiry-box.expired { border: 1px solid #e0a3a3; background: #fde2e2; color: #8a1c1c; }
.expiry-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.expiry-form label { margin: 0; }
.expiry-form input { width: auto; margin: 0; }
.news-inactive { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #fde2e2; color: #a11d1d; }
.news-expires { margin-left: 6px; }
/* Avisos push */
.push-card h2 { margin-bottom: 2px; }
.push-mode { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.push-nudge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.push-nudge[hidden] { display: none; }
.push-nudge a { font-weight: 600; }
/* Silenciar pop-ups (arriba a la derecha) */
.mute-menu { position: relative; }
.mute-menu > summary { list-style: none; cursor: pointer; }
.mute-menu > summary::-webkit-details-marker { display: none; }
.mute-menu.on > summary { background: #fde2e2; color: #a11d1d; width: auto; min-width: 38px; padding: 0 10px; gap: 4px; border-radius: 999px; }
.mute-menu > summary .mute-left { font-weight: 600; white-space: nowrap; }
.mute-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 260px; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.mute-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* v1.61.0: Novedades como tarjetas centradas, con la franja de color de la etiqueta arriba */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.news-grid .news-row { flex-direction: column; justify-content: flex-start; text-align: center; gap: 10px; padding: 18px 16px 16px;
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--ts, var(--line)); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .12s ease, box-shadow .12s ease; }
.news-grid .news-row:last-child { border-bottom: 1px solid var(--line); }
.news-grid .news-row:hover { background: var(--card); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.news-grid .news-row.pinned { background: color-mix(in srgb, var(--primary) 5%, var(--card)); }
.news-grid .news-logo { width: 56px; height: 56px; flex: 0 0 auto; }
.news-grid .news-row-main { align-items: center; gap: 6px; width: 100%; }
.news-grid .news-row-top { justify-content: center; }
.news-grid .news-title { font-size: 16px; line-height: 1.3; }
.news-grid .news-go { display: none; }
.news-grid .news-meta { margin-top: auto; }
.news-grid .news-expires { margin-left: 0; }
.news-item { border-top: 6px solid var(--ts, var(--line)); }
.news-item .news-detail-head { flex-direction: column; align-items: center; text-align: center; }
.news-item .news-detail-head .news-row-top { justify-content: center; }
.news-item .news-detail-head .meta { justify-content: center; }
.news-item .news-body, .news-item .material-list { max-width: 720px; margin-left: auto; margin-right: auto; }
.news-item .news-images { justify-content: center; }
.news-item > .actions { justify-content: center; }
.news-empty { text-align: center; padding: 24px; }
.news-grid .news-empty { grid-column: 1 / -1; }
.news-item .news-body, .news-item .material-list { text-align: center; }
.news-item .news-event-box, .news-item .news-expiry-box { flex-direction: column; justify-content: center; text-align: center; }
.news-item .expiry-form { justify-content: center; }
/* v1.62.0: «Mi día» (inicio) */
.day-hero { text-align: center; margin: 4px 0 18px; }
.day-hero h1 { margin-bottom: 2px; }
.day-date { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.day-date::first-letter { text-transform: uppercase; }
.day-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.day-chip { display: flex; flex-direction: column; align-items: center; min-width: 120px; padding: 10px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--dc, var(--line)); color: var(--text); text-decoration: none; }
.day-chip:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.day-chip .n { font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--dc, var(--text)); }
.day-chip .l { font-size: 12px; color: var(--muted); text-align: center; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.day-grid > .card { margin: 0; }
.day-card { border-top: 5px solid var(--dc, var(--line)); }
.day-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.dc-ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: 16px;
  background: color-mix(in srgb, var(--dc, var(--line)) 15%, transparent); }
.day-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.day-list li:last-child { border-bottom: 0; }
.day-empty { text-align: center; padding: 10px 0; }
.day-section-title { text-align: center; margin: 22px 0 10px; font-size: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.dc-azul { --dc: #1f5fd6; } .dc-violeta { --dc: #7c3aed; } .dc-naranja { --dc: #e8710a; } .dc-rojo { --dc: #d0312d; }
.dc-verde { --dc: #198a46; } .dc-amarillo { --dc: #d4a300; } .dc-celeste { --dc: #0ea5e9; } .dc-gris { --dc: #6b7280; }
@media (max-width: 700px) { .day-grid { grid-template-columns: 1fr; } .day-chip { min-width: 0; flex: 1 1 40%; } }
.day-section-title ~ .stages .stage { align-items: center; text-align: center; }
.day-section-title ~ p.muted { text-align: center; }
.day-card .row-between { align-items: center; }
/* v1.62.1: «Mi día» una tarjeta debajo de la otra, a todo el ancho y centrada (pedido de Seba) */
.day-grid { grid-template-columns: 1fr; }
.day-card { text-align: center; }
.day-card h2, .day-card .row-between { justify-content: center; }
.day-card .row-between { flex-direction: column; gap: 4px; }
.day-card .list, .day-card .rank-top { padding-left: 0; list-style: none; }
.day-card .list li { text-align: center; }
.day-card .table th, .day-card .table td { text-align: center; }
.day-card .notif { justify-content: center; text-align: center; }
.day-card .rank-me { text-align: center; }
/* v1.63.0: actividad de cada usuario */
.activity-cell { min-width: 200px; }
.act-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-right: 4px; vertical-align: middle; }
.act-dot.on { background: #198a46; box-shadow: 0 0 0 3px color-mix(in srgb, #198a46 25%, transparent); }
.act-dot.recent { background: #f2c200; }
.act-line { display: block; }

/* v1.63.1: candado arriba de la tarjeta para las novedades fijadas */
.news-lock { align-self: center; display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.news-grid .news-row.pinned { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); border-top-color: var(--ts, var(--primary)); }

/* v1.63.4: «❔ Ayuda» chiquito a la derecha del título de Avisos; se despliega como panel */
.avisos-head { align-items: center; }
.push-help { position: relative; }
.push-help > summary { list-style: none; cursor: pointer; }
.push-help > summary::-webkit-details-marker { display: none; }
.push-help-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(560px, calc(100vw - 32px));
  padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); text-align: center; }
.push-help-state { font-weight: 600; margin: 0 0 6px; }
.push-help .push-card { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.push-help .push-card > .row-between { flex-direction: column; align-items: center; gap: 8px; }
.push-help .push-card .actions { justify-content: center; }

/* v1.64.0: Semana por ejecutivo (centrado, tarjetas a todo el ancho con franja arriba según cuánto hay para charlar) */
.sw-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; }
.sw-head h1 { margin-bottom: 0; }
.sw-head p { margin: 0; max-width: 760px; }
.sw-nav, .sw-filter { justify-content: center; display: flex; flex-wrap: wrap; gap: 8px; }
.sw-filter select { width: auto; }
.sw-list { display: flex; flex-direction: column; gap: 16px; }
.sw-card h2 { margin-bottom: 2px; }
.sw-days { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.sw-day { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.sw-day.on { background: #198a46; border-color: #198a46; color: #fff; }
.sw-kpis { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 14px; }
.sw-kpi { flex: 0 1 calc(25% - 10px); min-width: 130px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; }
.sw-kpi strong { font-size: 22px; line-height: 1.1; }
.sw-kpi strong small { font-size: 13px; color: var(--muted); font-weight: 600; }
.sw-kpi span { font-size: 12px; color: var(--muted); }
.sw-kpi em { font-style: normal; font-size: 12px; font-weight: 600; }
.sw-kpi.ok { border-color: #198a46; background: color-mix(in srgb, #198a46 7%, transparent); }
.sw-kpi.bad { border-color: #d0312d; background: color-mix(in srgb, #d0312d 7%, transparent); }
.sw-up { color: #198a46; font-weight: 700; } .sw-down { color: #d0312d; font-weight: 700; } .sw-eq { color: var(--muted); }
.sw-talk { max-width: 760px; margin: 0 auto; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
.sw-talk h3 { text-align: center; font-size: 15px; margin: 0 0 6px; }
.sw-talk ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-talk li { padding-left: 22px; position: relative; }
.sw-talk li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.sw-talk li.sw-mal::before { background: #d0312d; } .sw-talk li.sw-ojo::before { background: #d4a300; }
.sw-talk li.sw-bien::before { background: #198a46; } .sw-talk li.sw-info::before { background: #1f5fd6; }
.sw-more { margin-top: 12px; }
.sw-more > summary { list-style: none; cursor: pointer; display: inline-flex; }
.sw-more > summary::-webkit-details-marker { display: none; }
.sw-more h3 { font-size: 14px; margin: 12px 0 4px; }
.sw-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sw-mail { text-align: center; margin-top: 16px; }
.sw-mail .actions { justify-content: center; }
@media print { .sw-more { display: block; } .sw-more > summary { display: none; } .sw-card { break-inside: avoid; } }

/* v1.65.0: Marketing — tablero por estados (columnas con franja arriba), tarjetas arrastrables, ficha centrada */
.mk-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px; }
.mk-head h1 { margin: 0; }
.mk-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.mk-tabs a { padding: 6px 18px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.mk-tabs a.on { background: var(--primary); color: var(--primary-text); }
.mk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.mk-filters { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px; padding: 12px; }
.mk-filters input[name=q] { flex: 1 1 240px; max-width: 360px; }
.mk-filters select { width: auto; }
.mk-filters .mk-date { display: flex; flex-direction: column; font-size: 12px; margin: 0; }
.mk-hint { text-align: center; }
.mk-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.mk-col, .mk-item, .mk-st-btn { --dc: var(--ts, #6b7280); }
.mk-col { background: color-mix(in srgb, var(--dc, var(--line)) 6%, var(--card)); border: 1px solid var(--line);
  border-top: 6px solid var(--dc, var(--line)); border-radius: 12px; padding: 10px; min-height: 220px; }
.mk-col-head { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 8px; }
.mk-count { display: inline-flex; min-width: 24px; height: 24px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--dc, var(--line)); color: #fff; font-size: 12px; font-weight: 700; }
.mk-drop { display: flex; flex-direction: column; gap: 8px; min-height: 160px; border-radius: 10px; transition: background .12s; }
.mk-drop.over { background: color-mix(in srgb, var(--dc, var(--primary)) 16%, transparent); outline: 2px dashed var(--dc, var(--primary)); }
.mk-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.mk-card[draggable=true] { cursor: grab; }
.mk-card-main { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text); width: 100%; }
.mk-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mk-card.dragging { opacity: .45; }
.mk-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.mk-card-title { font-size: 15px; line-height: 1.25; color: var(--primary); }
.mk-brand { font-weight: 700; }
.mk-mod-presencial { background: #e8f5ee; color: #14683a; } .mk-mod-virtual { background: #e7effd; color: #1f4fb0; }
.mk-mod-hibrida { background: #f1e9fe; color: #6427c9; }
.mk-empty { text-align: center; margin: 6px 0; }
.mk-empty:empty { display: none; }
.dc-gris { --dc: #6b7280; }
.mk-soon { text-align: center; }
.mk-back { text-align: center; }
.mk-item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mk-item-title { font-size: 22px; margin: 4px 0; }
.mk-when, .mk-place { margin: 0; }
.mk-blocks { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 760px; margin: 8px 0; }
.mk-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.mk-block h3 { font-size: 14px; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mk-block p { margin: 2px 0; }
.mk-pre { white-space: pre-wrap; }
.mk-move-form { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 6px; }
.mk-st-btn { border-top: 3px solid var(--dc); }
.mk-st-btn.on { background: var(--dc); border-color: var(--dc); color: #fff; opacity: 1; }
.mk-status { color: #fff; background: #6b7280; }
.mk-st-planificacion { background: #1f5fd6; } .mk-st-confirmada { background: #198a46; } .mk-st-realizada { background: #7c3aed; } .mk-st-cancelada { background: #6b7280; }
.mk-pieces { text-align: center; }
.mk-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.mk-file { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.mk-file img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }
.mk-file-ico { display: flex; align-items: center; justify-content: center; width: 100%; height: 120px; border-radius: 6px; text-decoration: none;
  background: color-mix(in srgb, var(--primary) 10%, var(--card)); color: var(--primary); font-weight: 800; font-size: 20px; }
.mk-file-name { word-break: break-all; }
.mk-upload { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }
.mk-edit > summary { cursor: pointer; text-align: center; }
.mk-edit .mk-delete { text-align: center; margin-top: 10px; }
.mk-form h2, .mk-form > p { text-align: center; }
.mk-form-actions { justify-content: center; }
.mk-more { display: flex; flex-direction: column; gap: 6px; }
.mk-more-lbl { font-weight: 500; font-size: 14px; }
.mk-more-add { align-self: flex-start; }
@media (max-width: 640px) { .mk-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; } }
.mk-filters input[name=q] { flex: 1 1 100%; max-width: 640px; }
.mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-grid .wide { grid-column: 1 / -1; }
.mk-grid .chips-field { grid-column: span 2; margin: 0; }
@media (max-width: 640px) { .mk-grid { grid-template-columns: 1fr; } .mk-grid .chips-field { grid-column: auto; } }

/* v1.66.0: vistas, prioridad, etiquetas y calendario de Marketing */
.mk-views { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.mk-views a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text);
  background: var(--card); font-size: 14px; font-weight: 600; }
.mk-views a.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.mk-prio { font-weight: 700; }
.mk-prio-alta { background: #fde2e2; color: #a11d1d; } .mk-prio-media { background: #fff4cc; color: #6b5200; } .mk-prio-baja { background: #eef0f3; color: #4b5563; }
.mk-tag { color: #fff; font-size: 11px; }
.mk-prio-chip.mk-prio-alta input:checked + span { background: #d0312d; border-color: #d0312d; }
.mk-prio-chip.mk-prio-media input:checked + span { background: #d4a300; border-color: #d4a300; color: #2b2100; }
.mk-prio-chip.mk-prio-baja input:checked + span { background: #6b7280; border-color: #6b7280; }
.mk-prio-chip span, .mk-tag-chip span { background: var(--card); }
.mk-tag-chip input:checked + span { background: var(--ts); border-color: var(--ts); color: #fff; }
.mk-list td { vertical-align: middle; }
.mk-cal-head { display: flex; justify-content: center; align-items: center; gap: 14px; }
.mk-cal-head h2 { margin: 0; min-width: 180px; text-align: center; }
.mk-cal-today { text-align: center; margin: 6px 0 0; }
.mk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.mk-cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.mk-cal-day { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 3px; background: var(--card); min-width: 0; }
.mk-cal-day.out { opacity: .45; }
.mk-cal-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.mk-cal-num { font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; }
.mk-cal-day.today .mk-cal-num { color: var(--primary); }
.mk-cal-item { display: block; font-size: 11px; line-height: 1.3; color: #fff; text-decoration: none; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cal-legend { text-align: center; margin-top: 10px; }
.mk-admin h2 { text-align: center; }
.mk-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mk-admin-row input[name=name] { width: 200px; }
.mk-admin-row select { width: auto; }
.mk-admin-new { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.mk-admin-new input { width: 240px; } .mk-admin-new select { width: auto; }
.mk-admin-tag { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .mk-cal-day { min-height: 60px; } .mk-cal-item { font-size: 10px; padding: 1px 3px; } }

/* v1.66.0: historial de cada tarjeta de Marketing */
.mk-history h2 { text-align: center; }
.mk-timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: 8px; }
.mk-ev { border: 1px solid var(--line); border-top: 4px solid var(--ev, #6b7280); border-radius: 10px; padding: 8px 12px; text-align: center; }
.mk-ev-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.mk-ev-tag { color: #fff; background: var(--ev, #6b7280); }
.mk-ev-detail { display: block; margin-top: 4px; font-size: 14px; }
.mk-ev-creado { --ev: #1f5fd6; } .mk-ev-estado { --ev: #198a46; } .mk-ev-cambio { --ev: #e8710a; } .mk-ev-pieza { --ev: #7c3aed; }

/* v1.67.0: Tareas (centrado, franja de color arriba) */
.tk-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }
.tk-head h1 { margin: 0; }
.tk-head p { margin: 0; }
.tk-kpis { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 14px; max-width: 760px; }
.tk-kpis .sw-kpi.bad strong { color: #c62828; } .tk-kpis .sw-kpi.ok strong { color: #198a46; }
.tk-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tk-list > .card { flex: 0 1 380px; }
.tk-card { --tk: #1f5fd6; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--text);
  border-top: 6px solid var(--tk); margin: 0; }
.tk-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }
.tk-card-top { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; font-size: 13px; }
.tk-title { font-size: 16px; color: var(--primary); }
.tk-people-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; font-size: 13px; }
.tk-person { white-space: nowrap; }
.tk-c-pendiente { --tk: #1f5fd6; } .tk-c-rehacer { --tk: #e8710a; } .tk-c-entregada { --tk: #7c3aed; } .tk-c-aprobada { --tk: #198a46; } .tk-c-vencida { --tk: #c62828; }
.tk-st { font-weight: 700; color: #fff; }
.tk-pendiente { background: #1f5fd6; } .tk-rehacer { background: #e8710a; } .tk-entregada { background: #7c3aed; } .tk-aprobada { background: #198a46; } .tk-vencida { background: #c62828; }
.tk-late { background: #fde2e2; color: #a11d1d; } .tk-soon { background: #fff4cc; color: #6b5200; }
.tk-detail, .tk-mine, .tk-people-card { text-align: center; }
.tk-detail { border-top: 6px solid var(--primary); }
.tk-due-big { font-size: 16px; margin: 4px 0; }
.tk-sub { font-size: 15px; margin: 14px 0 6px; }
.tk-mine { border-top: 6px solid #7c3aed; }
.tk-deliver, .tk-mine .flash { max-width: 760px; margin: 10px auto; text-align: left; }
.tk-response { max-width: 760px; margin: 8px auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: left; background: var(--bg); }
.tk-person-card { --tk: #1f5fd6; border: 1px solid var(--line); border-top: 5px solid var(--tk); border-radius: 12px; padding: 10px 14px; margin: 0 auto 12px; max-width: 860px; }
.tk-person-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0 0 6px; }
.tk-review { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.tk-review input { flex: 1 1 260px; max-width: 420px; }
.tk-people { text-align: left; }
.tk-people .chip small { font-weight: 400; }
.tk-people .chip input:checked + span small { color: inherit; }
.tk-all { margin-bottom: 8px; }
.tk-me span { border-color: #d97706; color: #b45309; font-weight: 600; }
.chip.tk-me:hover span { border-color: #b45309; }
.chip.tk-me input:checked + span { background: #d97706; border-color: #d97706; color: #fff; }
.tk-add { margin-top: 10px; } .tk-add form { text-align: left; max-width: 860px; margin: 10px auto 0; }
.tk-ev-creada { --ev: #1f5fd6; } .tk-ev-entrega { --ev: #7c3aed; } .tk-ev-aprobada { --ev: #198a46; } .tk-ev-rehacer { --ev: #e8710a; }
.tk-ev-cambio, .tk-ev-asignada, .tk-ev-quitada { --ev: #6b7280; } .tk-ev-archivo { --ev: #0f8a8a; }
.tk-detail .mk-blocks { margin: 8px auto; }
.tk-detail .mk-files, .tk-mine .mk-files, .tk-people-card .mk-files { display: flex; flex-wrap: wrap; justify-content: center; }
.tk-detail .mk-file, .tk-mine .mk-file, .tk-people-card .mk-file { width: 160px; }
.tk-detail .mk-upload, .tk-mine .mk-upload { justify-content: center; }
.chip input:checked + span small { color: inherit; opacity: .85; }
/* v1.67.2: comentarios de cada tarea */
.tk-thread { max-width: 760px; margin: 12px auto 0; text-align: left; }
.tk-thread .tk-sub { text-align: center; }
.tk-comment { border: 1px solid var(--line); border-top: 3px solid #0f8a8a; border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; }
.tk-comment.mine { border-top-color: var(--primary); }
.tk-comment p { margin: 4px 0 0; }
.tk-comment-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.tk-comment-form textarea { flex: 1 1 300px; }
/* v1.67.3: contador y alertas de cada tarea */
.tk-soon.tk-urgent { background: #fde2e2; color: #a11d1d; }
.tk-countdown { display: inline-block; margin: 6px 0; padding: 8px 18px; border-radius: 999px; font-size: 20px; font-weight: 800; background: #e8f0ff; color: #1f5fd6; }
.tk-countdown.urgent { background: #fff4cc; color: #8a6200; } .tk-countdown.over { background: #fde2e2; color: #a11d1d; }
.tk-alerts { text-align: center; border-top: 6px solid #d4a300; }
.tk-alert-list { list-style: none; padding: 0; margin: 8px auto; max-width: 560px; display: flex; flex-direction: column; gap: 6px; }
.tk-alert-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.tk-alert-list li.sent { opacity: .6; }
.tk-alert-new { margin-top: 6px; }
.tk-alert-form { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px auto 0; max-width: 460px; }
.tk-alert-row { display: flex; gap: 8px; justify-content: center; }
.tk-alert-row[hidden] { display: none; }
.tk-alert-row input[type=number] { width: 90px; }
.tk-alert-form > input[name=note] { width: 100%; }
/* v1.68.0: tareas que se repiten */
.tk-series { margin: 6px auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.tk-until { display: block; max-width: 260px; margin-top: 8px; }

/* v1.68.0: Agenda — qué mostrar, tipos nuevos y línea de tiempo de promociones */
.agenda-types { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 0 0 12px; }
.agenda-types a { text-decoration: none; border: 1px solid transparent; }
.agenda-types a.on { outline: 2px solid var(--primary); outline-offset: 1px; font-weight: 700; }
.agenda-types a.off { opacity: .4; }
.agenda-types .ag-all { padding: 2px 10px; border-radius: 999px; border-color: var(--line); color: var(--text); }
.agenda-types .ag-all.on { background: var(--primary); color: var(--primary-text); outline: 0; }
.ag-tk { background: #f1e8ff; color: #6b21a8; } .ag-b-tk { border-left-color: #7c3aed; }
.ag-evento { background: #e0f2fe; color: #075985; } .ag-b-evento { border-left-color: #0284c7; }
.ag-mkt { background: #fce7f3; color: #9d174d; } .ag-b-mkt { border-left-color: #db2777; }
.ag-promo { background: #fff4cc; color: #6b5200; }
.agenda-promos { border-top: 6px solid #d4a300; }
.agenda-promos h2 { text-align: center; font-size: 16px; margin: 0 0 8px; }
.tl-head, .tl-row { display: grid; gap: 0; }
.tl-head { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.tl-head span { border-left: 1px solid var(--line); padding-left: 2px; white-space: nowrap; overflow: hidden; }
.tl-head span.wk { border-left-color: var(--muted); }
.tl-head span.today { color: var(--primary); font-weight: 700; border-left: 2px solid var(--primary); }
.tl-row { margin-bottom: 4px; }
.tl-bar { display: block; padding: 4px 8px; border-radius: 8px; font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.tl-bar span { font-weight: 400; opacity: .9; }
.tl-bar.cut-s { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-e { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-n1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.tl-n7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tl-n35 { grid-template-columns: repeat(35, minmax(0, 1fr)); }
.tl-s1 { grid-column-start: 1; } .tl-s2 { grid-column-start: 2; } .tl-s3 { grid-column-start: 3; } .tl-s4 { grid-column-start: 4; } .tl-s5 { grid-column-start: 5; } .tl-s6 { grid-column-start: 6; } .tl-s7 { grid-column-start: 7; } .tl-s8 { grid-column-start: 8; } .tl-s9 { grid-column-start: 9; } .tl-s10 { grid-column-start: 10; } .tl-s11 { grid-column-start: 11; } .tl-s12 { grid-column-start: 12; } .tl-s13 { grid-column-start: 13; } .tl-s14 { grid-column-start: 14; } .tl-s15 { grid-column-start: 15; } .tl-s16 { grid-column-start: 16; } .tl-s17 { grid-column-start: 17; } .tl-s18 { grid-column-start: 18; } .tl-s19 { grid-column-start: 19; } .tl-s20 { grid-column-start: 20; } .tl-s21 { grid-column-start: 21; } .tl-s22 { grid-column-start: 22; } .tl-s23 { grid-column-start: 23; } .tl-s24 { grid-column-start: 24; } .tl-s25 { grid-column-start: 25; } .tl-s26 { grid-column-start: 26; } .tl-s27 { grid-column-start: 27; } .tl-s28 { grid-column-start: 28; } .tl-s29 { grid-column-start: 29; } .tl-s30 { grid-column-start: 30; } .tl-s31 { grid-column-start: 31; } .tl-s32 { grid-column-start: 32; } .tl-s33 { grid-column-start: 33; } .tl-s34 { grid-column-start: 34; } .tl-s35 { grid-column-start: 35; } .tl-s36 { grid-column-start: 36; }
.tl-e1 { grid-column-end: 1; } .tl-e2 { grid-column-end: 2; } .tl-e3 { grid-column-end: 3; } .tl-e4 { grid-column-end: 4; } .tl-e5 { grid-column-end: 5; } .tl-e6 { grid-column-end: 6; } .tl-e7 { grid-column-end: 7; } .tl-e8 { grid-column-end: 8; } .tl-e9 { grid-column-end: 9; } .tl-e10 { grid-column-end: 10; } .tl-e11 { grid-column-end: 11; } .tl-e12 { grid-column-end: 12; } .tl-e13 { grid-column-end: 13; } .tl-e14 { grid-column-end: 14; } .tl-e15 { grid-column-end: 15; } .tl-e16 { grid-column-end: 16; } .tl-e17 { grid-column-end: 17; } .tl-e18 { grid-column-end: 18; } .tl-e19 { grid-column-end: 19; } .tl-e20 { grid-column-end: 20; } .tl-e21 { grid-column-end: 21; } .tl-e22 { grid-column-end: 22; } .tl-e23 { grid-column-end: 23; } .tl-e24 { grid-column-end: 24; } .tl-e25 { grid-column-end: 25; } .tl-e26 { grid-column-end: 26; } .tl-e27 { grid-column-end: 27; } .tl-e28 { grid-column-end: 28; } .tl-e29 { grid-column-end: 29; } .tl-e30 { grid-column-end: 30; } .tl-e31 { grid-column-end: 31; } .tl-e32 { grid-column-end: 32; } .tl-e33 { grid-column-end: 33; } .tl-e34 { grid-column-end: 34; } .tl-e35 { grid-column-end: 35; } .tl-e36 { grid-column-end: 36; } .tl-e37 { grid-column-end: 37; }

/* v1.69.0: buscador de la Agenda */
.agenda-search { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; max-width: 760px; margin: 0 auto 10px; padding: 10px 12px; }
.agenda-search input[type=search] { flex: 1 1 280px; min-width: 0; font-size: 1rem; }
.agenda-search-note { text-align: center; margin: 0 0 10px; }
.agenda-results { border-top: 4px solid var(--primary); max-width: 1100px; margin-left: auto; margin-right: auto; }
.agenda-results.ar-done { border-top-color: var(--ok-text); }
.agenda-results h2 { text-align: center; }
.agenda-results li > .tag:first-child { text-decoration: none; margin-right: 4px; }
.agenda-results .done-tag { margin-left: 6px; }

/* v1.70.0: subtareas de Marketing */
.mk-subs { width: 100%; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.mk-subs > summary { cursor: pointer; color: var(--primary); font-weight: 600; text-align: center; list-style-position: inside; }
.mk-subs-body { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; text-align: left; }
.mk-sub-progress { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.mk-sub-progress progress { width: 140px; max-width: 40%; height: 8px; accent-color: var(--primary); }
.mk-sub-progress span { white-space: nowrap; }
.mk-subs .mk-sub-progress span { font-size: 12px; }
.mk-sub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mk-sub-list li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mk-sub-list li.done .mk-sub-title { text-decoration: line-through; color: var(--muted); }
.mk-sub-title { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.mk-sub-check { background: none; border: 0; padding: 0 2px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--primary); }
.mk-sub-check.off { cursor: default; color: var(--muted); }
.mk-sub-check.mk-sub-del { font-size: 13px; color: var(--muted); }
.mk-sub-check.mk-sub-del:hover { color: #dc2626; }
.mk-sub-done > summary { cursor: pointer; color: var(--muted); text-align: center; }
.mk-sub-alldone { text-align: center; color: var(--ok-text); margin: 0; }
.mk-sub-add { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mk-sub-add input { width: auto; margin: 0; }
.mk-sub-add input[name=sub_title] { flex: 1 1 140px; min-width: 0; }
.mk-sub-add .btn { margin: 0; }
.mk-subtasks { max-width: 760px; margin-left: auto; margin-right: auto; border-top: 4px solid var(--primary); }
.mk-subtasks > details > summary { cursor: pointer; text-align: center; list-style: none; }
.mk-subtasks > details > summary h2 { display: inline; }
.mk-subtasks .mk-sub-list li { padding: 6px 4px; border-bottom: 1px solid var(--line); }

/* v1.70.1: comentarios y fecha de actualización de cada subtarea */
.mk-sub-list li { align-items: flex-start; flex-wrap: nowrap; }
.mk-sub-item { flex: 1 1 0; min-width: 0; }
.mk-sub-item > summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.mk-sub-item > summary::-webkit-details-marker { display: none; }
.mk-sub-item > summary .mk-sub-title::before { content: "▸ "; color: var(--muted); }
.mk-sub-item[open] > summary .mk-sub-title::before { content: "▾ "; }
.mk-sub-upd { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.mk-sub-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mk-sub-detail { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; padding: 8px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 6%, transparent); }
.mk-sub-cm { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); text-align: left; }
.mk-sub-cm:last-of-type { border-bottom: 0; }
.mk-sub-cform textarea { flex: 1 1 100%; min-width: 0; margin: 0; resize: vertical; }
.mk-sub-delrow { text-align: center; }
.mk-sub-delrow .mk-sub-check { font-size: 12px; }
.mk-sub-list li.done .mk-sub-detail .mk-sub-title { text-decoration: none; }
.mk-subs .mk-sub-item > summary .mk-sub-title { flex: 1 1 100%; }
.mk-subs .mk-sub-upd { margin-left: 0; }

/* v1.70.2: repetir «Personalizado» */
.tk-custom { display: none; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: center; margin-top: 10px; padding: 10px;
  border: 1px dashed var(--line); border-radius: 10px; }
.tk-repeat:has(input[value=personalizado]:checked) .tk-custom, .tk-custom.on { display: flex; }
.tk-custom label { display: flex; flex-direction: column; gap: 4px; }
.tk-custom input[type=number] { width: 90px; }
.tk-custom-help { flex-basis: 100%; text-align: center; margin: 0; }
.tk-custom input, .tk-custom select { margin: 0; height: 40px; }

/* v1.71.0: Portal Hik · Categoría clientes */
.center-text { text-align: center; }
.hc-upload, .hc-summary, .hc-client, .hc-history { max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; border-top: 4px solid var(--primary); }
.hc-upload h2, .hc-summary h2 { margin-top: 0; }
.hc-upload-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.hc-upload-row input[type=file] { width: auto; max-width: 100%; margin: 0; }
.hc-imp-pick { display: flex; justify-content: center; }
.hc-imp-pick label { display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
.hc-views { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.hc-view { display: flex; flex-direction: column; align-items: center; min-width: 120px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--text); background: var(--card); }
.hc-view strong { font-size: 22px; line-height: 1.1; }
.hc-view span { font-size: 12px; color: var(--muted); }
.hc-view.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.hc-v-categoria strong { color: var(--primary); }
.hc-v-baja strong { color: #dc2626; }
.hc-v-alta strong { color: var(--ok-text); }
.hc-dist { margin: 6px 0 0; }
.hc-tools { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hc-search { flex: 1 1 320px; max-width: 640px; font-size: 1rem; margin: 0; }
.hc-count { text-align: center; margin: 8px 0; }
.hc-row { cursor: pointer; }
.hc-row:hover td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.hc-move { font-weight: 800; text-align: center; }
.hc-sube { color: var(--ok-text); } .hc-baja { color: #dc2626; } .hc-igual { color: var(--muted); }
.hc-foco { font-weight: 700; letter-spacing: .02em; }
.hc-diamond { background: #dbeafe; color: #1e3a8a; }
.hc-black { background: #111827; color: #fff; }
.hc-ruby { background: #fee2e2; color: #9f1239; }
.hc-platinum { background: #e5e7eb; color: #374151; }
.hc-gold { background: #fef3c7; color: #92400e; }
.hc-silver { background: #f1f5f9; color: #475569; }
.hc-client-now { font-size: 1.1rem; }
.hc-history .mk-timeline { text-align: left; }
.hc-none { text-align: center; }

/* v1.72.0: Sala de reuniones (grilla: clases de posición porque la CSP no deja style inline) */
.gr1{grid-row-start:1} .ge1{grid-row-end:1}
.gr2{grid-row-start:2} .ge2{grid-row-end:2}
.gr3{grid-row-start:3} .ge3{grid-row-end:3}
.gr4{grid-row-start:4} .ge4{grid-row-end:4}
.gr5{grid-row-start:5} .ge5{grid-row-end:5}
.gr6{grid-row-start:6} .ge6{grid-row-end:6}
.gr7{grid-row-start:7} .ge7{grid-row-end:7}
.gr8{grid-row-start:8} .ge8{grid-row-end:8}
.gr9{grid-row-start:9} .ge9{grid-row-end:9}
.gr10{grid-row-start:10} .ge10{grid-row-end:10}
.gr11{grid-row-start:11} .ge11{grid-row-end:11}
.gr12{grid-row-start:12} .ge12{grid-row-end:12}
.gr13{grid-row-start:13} .ge13{grid-row-end:13}
.gr14{grid-row-start:14} .ge14{grid-row-end:14}
.gr15{grid-row-start:15} .ge15{grid-row-end:15}
.gr16{grid-row-start:16} .ge16{grid-row-end:16}
.gr17{grid-row-start:17} .ge17{grid-row-end:17}
.gr18{grid-row-start:18} .ge18{grid-row-end:18}
.gr19{grid-row-start:19} .ge19{grid-row-end:19}
.gr20{grid-row-start:20} .ge20{grid-row-end:20}
.gr21{grid-row-start:21} .ge21{grid-row-end:21}
.gr22{grid-row-start:22} .ge22{grid-row-end:22}
.gr23{grid-row-start:23} .ge23{grid-row-end:23}
.gr24{grid-row-start:24} .ge24{grid-row-end:24}
.gr25{grid-row-start:25} .ge25{grid-row-end:25}
.gr26{grid-row-start:26} .ge26{grid-row-end:26}
.gr27{grid-row-start:27} .ge27{grid-row-end:27}
.gr28{grid-row-start:28} .ge28{grid-row-end:28}
.gr29{grid-row-start:29} .ge29{grid-row-end:29}
.gr30{grid-row-start:30} .ge30{grid-row-end:30}
.gr31{grid-row-start:31} .ge31{grid-row-end:31}
.gr32{grid-row-start:32} .ge32{grid-row-end:32}
.gr33{grid-row-start:33} .ge33{grid-row-end:33}
.gr34{grid-row-start:34} .ge34{grid-row-end:34}
.gr35{grid-row-start:35} .ge35{grid-row-end:35}
.gr36{grid-row-start:36} .ge36{grid-row-end:36}
.gr37{grid-row-start:37} .ge37{grid-row-end:37}
.gr38{grid-row-start:38} .ge38{grid-row-end:38}
.gr39{grid-row-start:39} .ge39{grid-row-end:39}
.gc1{grid-column:1}
.gc2{grid-column:2}
.gc3{grid-column:3}
.gc4{grid-column:4}
.gc5{grid-column:5}
.gc6{grid-column:6}
.gc7{grid-column:7}
.gc8{grid-column:8}
.gc9{grid-column:9}
.rm-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-bottom: 12px; }
.rm-title { text-align: center; margin: 0 0 6px; }
.rm-rooms { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.rm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .rm-layout { grid-template-columns: minmax(0, 1fr); } }
.rm-grid-wrap { overflow-x: auto; padding: 8px; }
.rm-grid { display: grid; grid-template-columns: 56px repeat(var(--rm-cols, 1), minmax(110px, 1fr)); grid-auto-rows: 26px; position: relative; min-width: 100%; }
.rm-grid.rm-c7 { --rm-cols: 7; min-width: 860px; }
.rm-grid.rm-c1 { --rm-cols: 1; }
.rm-dayhead { grid-row: 1; text-align: center; font-weight: 700; font-size: 13px; padding: 2px; border-bottom: 2px solid var(--line); align-self: end; }
.rm-dayhead a { color: var(--text); text-decoration: none; }
.rm-dayhead.today { color: var(--primary); }
.rm-dayhead.today a { color: var(--primary); }
.rm-time { grid-column: 1; font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.rm-cell { border-top: 1px dotted var(--line); border-left: 1px solid var(--line); display: block; text-decoration: none; }
.rm-cell.hour { border-top: 1px solid var(--line); }
.rm-cell.past { background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--muted) 10%, transparent) 6px 7px); }
a.rm-cell.free:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }
a.rm-cell.free:hover::after { content: "+ Reservar"; font-size: 11px; color: var(--primary); padding-left: 6px; line-height: 26px; }
a.rm-cell.sel { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.rm-book { z-index: 1; margin: 1px 3px; padding: 3px 6px; border-radius: 6px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--primary) 18%, var(--card)); border-left: 4px solid var(--primary); color: var(--text); font-size: 12px; line-height: 1.25; }
.rm-book.mine { background: color-mix(in srgb, #16a34a 18%, var(--card)); border-left-color: #16a34a; }
.rm-book.past { opacity: .55; }
.rm-book.on { outline: 2px solid var(--primary); }
.rm-book strong { font-size: 12.5px; }
.rm-side .card { border-top: 4px solid var(--primary); }
.rm-form { display: flex; flex-direction: column; gap: 8px; }
.rm-form .rm-row { display: flex; gap: 8px; }
.rm-form .rm-row label { flex: 1 1 0; }
.rm-legend { display: flex; gap: 12px; justify-content: center; font-size: 12px; color: var(--muted); margin: 6px 0 0; flex-wrap: wrap; }
.rm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; background: color-mix(in srgb, var(--primary) 30%, var(--card)); }
.rm-dot.mine { background: color-mix(in srgb, #16a34a 35%, var(--card)); }
.rm-mine li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.rm-admin { max-width: 760px; margin: 16px auto 0; }
.rm-admin form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 6px; }
.rm-admin input[name=name] { flex: 1 1 200px; width: auto; margin: 0; }
.rm-layout.rm-wide { grid-template-columns: minmax(0, 1fr); }
.rm-layout.rm-wide .rm-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rm-layout.rm-wide .rm-side .card { margin: 0; }
.rm-goto { display: inline-flex; gap: 6px; align-items: center; }
.rm-goto input[type=date] { width: auto; margin: 0; }
.rm-goto .btn { margin: 0; }
.rm-layout.rm-wide .rm-side { align-items: start; }
.ag-sala { background: #dcfce7; color: #166534; } .ag-b-sala { border-left-color: #16a34a; }
.tk-rooms { max-width: 760px; margin-left: auto; margin-right: auto; border-top: 4px solid #16a34a; text-align: center; }
.tk-rooms .list { text-align: left; }
/* v1.72.3: novedades vencidas, al final de la lista y atenuadas */
.news-grid .news-row.expired { opacity: .72; }
.news-grid .news-row.expired:hover { opacity: 1; }
/* v1.72.3: texto enriquecido de novedades */
.rich-field { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.rich-label { font-weight: 600; font-size: 14px; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.rich-bar .rich-bold { font-weight: 700; } .rich-bar .rich-italic { font-style: italic; } .rich-bar .rich-underline { text-decoration: underline; }
.rich-editor { min-height: 160px; max-height: 70vh; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text, inherit); line-height: 1.45; }
.rich-editor:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 1px; }
.rich-editor img, .rich-body img { max-width: 100%; height: auto; }
.rich-editor table, .rich-body table { border-collapse: collapse; max-width: 100%; margin: 6px 0; }
.rich-editor td, .rich-editor th, .rich-body td, .rich-body th { border: 1px solid var(--line); padding: 4px 8px; vertical-align: top; }
.rich-body { overflow-x: auto; line-height: 1.5; word-wrap: break-word; }
.rich-body p { margin: 0 0 8px; } .rich-body ul, .rich-body ol { margin: 4px 0 8px 22px; }
.rich-body blockquote { margin: 6px 0; padding: 6px 10px; background: color-mix(in srgb, var(--line) 30%, transparent); border-radius: 8px; }
.news-body.rich-body { text-align: left; max-width: 860px; margin: 10px auto; width: 100%; }
/* v1.73.0: solapas con permiso «Solo ver»: se esconden los botones que guardan cambios (el servidor igual los bloquea) */
.ro-note { text-align: center; margin: 0 auto 12px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); font-size: 14px; }
.perm-ro main form[method="post" i]:not(.ro-ok), .perm-ro main a[href$="/nuevo"], .perm-ro main a[href*="/nuevo?"], .perm-ro main a[href$="/nueva"], .perm-ro main a[href*="/nueva?"], .perm-ro main a[href$="/editar"] { display: none !important; }
.perm-head { text-align: center; max-width: 900px; margin: 0 auto 12px; }
.perm-table th, .perm-table td { text-align: center; vertical-align: middle; }
.perm-table tbody th { text-align: left; white-space: nowrap; }
.perm-sel { min-width: 0; width: 100%; max-width: 118px; font-size: 12px; padding: 4px 4px; }
.perm-table th, .perm-table td { padding: 6px 4px; }
.perm-table tbody th { position: sticky; left: 0; background: var(--card); z-index: 1; }
.perm-sel.perm-no { background: color-mix(in srgb, #9ca3af 18%, var(--card)); color: var(--muted, #6b7280); }
.perm-sel.perm-ver { background: color-mix(in srgb, #f59e0b 16%, var(--card)); }
.perm-sel.perm-editar { background: color-mix(in srgb, #16a34a 14%, var(--card)); }
.perm-actions, .perm-reset { display: flex; justify-content: center; margin-top: 12px; }
.perm-foot { text-align: center; max-width: 900px; margin: 10px auto 0; }
/* v1.74.0: Consulta CUIT */
.cu-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cu-wrap > .card { margin: 0; }
.cu-search h1 { font-size: 20px; margin: 0 0 2px; }
.cu-form { display: flex; gap: 8px; margin-top: 10px; }
.cu-input { flex: 1; font-size: 18px; letter-spacing: .04em; padding: 10px 12px; }
.cu-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cu-head h2 { margin: 0 0 4px; font-size: 20px; }
.cu-cuit { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--muted, #6b7280); }
.cu-badge { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px; white-space: nowrap; border: 1px solid; }
.cu-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.cu-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--line) 25%, var(--card)); }
.cu-kpi strong { font-size: 24px; color: #166534; }
.cu-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b7280); }
.cu-alert { padding: 9px 12px; border-radius: 8px; font-size: 14px; margin: 8px 0; }
.cu-alert.ok { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.cu-alert.bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cu-alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.cu-card > .cu-alert { margin: 0 0 12px; text-align: center; }
.cu-sub { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin: 16px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cu-tiers { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; }
.cu-tier { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 14px 16px; }
.cu-tier-l { font-size: 14px; }
.cu-tier-r { font-size: 15px; }
.cu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.cu-chip { font-size: 11px; padding: 2px 7px; border-radius: 4px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.cu-apto { background: #ecfdf3; color: #166534; border-color: #86efac; }
.cu-consultar { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.cu-no_apto { background: #fff1f2; color: #b91c1c; border-color: #fca5a5; }
.cu-rechazado { background: #fee2e2; color: #7f1d1d; border-color: #f87171; }
.cu-foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 14px; }
.cu-nf { text-align: center; }
.cu-nf-ico { font-size: 40px; }
.cu-pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.cu-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cu-box { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.cu-box.bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cu-box.warn { background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }
.cu-ctable td, .cu-ctable th { font-size: 13px; }
.cu-tier-cfg { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; padding: 8px 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 600px) { .cu-kpis { grid-template-columns: 1fr; } .cu-tier { grid-template-columns: 1fr; gap: 4px; } .cu-head { flex-direction: column; } }
.cu-box .pre { white-space: pre-line; }
.cu-tier + .cu-tier { border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.cu-send { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* v1.74.5: listado importado */
.cu-imp-head { text-align: center; }
.cu-imp-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 10px 0; }
.cu-imp-search { width: 100%; max-width: 420px; display: block; margin: 0 auto 6px; }
.cu-wrap td.mono { white-space: nowrap; }
/* v1.74.6: resumen grande de la importación */
.cu-big { border-radius: 14px; padding: 22px 18px; margin: 0 0 16px; text-align: center; border: 2px solid; }
.cu-big.ok { background: #ecfdf3; color: #166534; border-color: #22c55e; }
.cu-big.bad { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.cu-big.warn { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.cu-big-title { font-size: 30px; font-weight: 800; line-height: 1.2; }
.cu-big-sub { font-size: 19px; font-weight: 600; margin-top: 6px; }
.cu-big-nums { font-size: 14px; margin-top: 8px; opacity: .85; }
.cu-center { text-align: center; }
@media (max-width: 600px) { .cu-big-title { font-size: 24px; } .cu-big-sub { font-size: 16px; } }
.error-text { color: var(--err-text); font-weight: 600; }
.card[id] { scroll-margin-top: 96px; }  /* v1.74.8: al saltar a un recuadro se ve su título */
/* v1.75.0: reservas de mercadería */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; }
.res-grid .res-wide { grid-column: 1 / -1; }
.res-grid label { margin: 0; }
.res-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.res-pill.res-activa { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.res-pill.res-cargada { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.res-pill.res-cancelada { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
tr.res-cancelada td { opacity: .6; }
.res-actions { white-space: nowrap; }
.res-actions .inline-form { display: inline-flex; gap: 4px; margin: 2px 0; }
.res-actions input { max-width: 150px; }
.res-notify { margin-top: 12px; }
.res-excel-title { margin: 22px 0 8px; font-size: 18px; }
.res-search { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.res-search input { flex: 1 1 260px; }
.res-found .inline-form { display: flex; gap: 6px; }
.res-qty { width: 80px; }
.res-cart-title { margin: 16px 0 8px; }
.res-empty { margin-top: 8px; text-align: right; }
.res-found td:first-child { min-width: 230px; }
.res-found .inline-form { flex-wrap: nowrap; align-items: center; }
.res-found td { vertical-align: middle; }
/* v1.76.2: proyectos */
.res-proj-check { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px; font-weight: 600; }
.res-group { border: 1px solid var(--line); border-top: 4px solid #f59e0b; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.res-group-done { border-top-color: #22c55e; opacity: .75; }
.res-group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
/* v1.76.7: reservas del CRM dentro de la pestaña Reservas */
.sheet-table tr.res-row-crm td { background: linear-gradient(rgba(37, 99, 235, .08), rgba(37, 99, 235, .08)), var(--card, #fff); }
.sheet-table tr.res-row-new td { background: linear-gradient(rgba(34, 197, 94, .25), rgba(34, 197, 94, .25)), var(--card, #fff); font-weight: 600; }
.sheet-table tr.res-row-crm td:first-child, .sheet-table tr.res-row-new td:first-child { color: #2563eb; font-weight: 700; }
.res-new-banner { padding: 14px 18px; font-size: 16px; }
/* v1.76.8: link del número de reservas a la pestaña Reservas filtrada */
.res-link { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.res-filter-note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 12px 16px; }
.res-prio { display: grid; gap: 6px; margin: 6px 0 14px; }
.res-prio-row { display: flex; align-items: center; gap: 10px; }
.res-prio-row .num-input { width: 64px; text-align: center; }
.res-found td, .res-found th { white-space: nowrap; }
.res-found td:first-child { position: sticky; left: 0; background: var(--card, #fff); z-index: 1; }
