/* Estilos de toda la app: tokens (colores, tipografía) en :root y componentes compartidos. Un cambio aquí se aplica a todas las pantallas. */
  /* REGLA: este bloque es el ÚNICO sitio con estilos. Un cambio aquí se aplica a todas
     las áreas cliente por igual (todas salen de la misma plantilla areaCliente()). */
  :root {
    --brand: #1b1bcb;
    --brand-ink: #ffffff;
    --bg: #f5f7ff;
    --panel: #ffffff;
    --side: #eaeefd;
    --ink: #0b0d1f;
    --muted: #666c8c;
    --line: #dce1f5;
    --accent: #cfd8ff;
    --accent-ink: #1b1bcb;
    /* Colores por rol del equipo (única excepción de color, pedida por el dueño: sirven para distinguir a cada persona por su rol) */
    --rol-direccion-bg: #0b0d1f; --rol-direccion-ink: #ffffff;
    --rol-jefa-bg: #e7ddff;      --rol-jefa-ink: #4a2bb0;
    --rol-guionista-bg: #ffe98a; --rol-guionista-ink: #5c4600;
    --rol-filmmaker-bg: #d3f2dc; --rol-filmmaker-ink: #14612f;
    --rol-editor-bg: #cfd8ff;    --rol-editor-ink: #1b1bcb;
    --rol-diseno-bg: #ffd9e8;    --rol-diseno-ink: #a3195b;
    --rol-otro-bg: #e6e8f2;      --rol-otro-ink: #4a4f6e;
    /* Urgencia de tareas (excepción de color pedida por el dueño): rojo = vencida, amarillo = vence en 3 días o menos */
    --urg-rojo: #c62828;     --urg-rojo-bg: #fdeaea;
    --urg-amarillo: #8a6100; --urg-amarillo-bg: #fff4bf;
    /* Colores por tipo de tarea (excepción de color pedida por el dueño): se muestran como punto o bloque, la urgencia sigue en el fondo de la fila */
    --t-reu-int: #f08a24;  --t-reu-int-ink: #1d1200;   /* reunión interna: naranja */
    --t-reu-cli: #d93636;  --t-reu-cli-ink: #ffffff;   /* reunión con cliente: rojo */
    --t-grab: #8ec5ff;     --t-grab-ink: #0b1b33;      /* grabación: azul flojo */
    --t-ent-int: #f2c200;  --t-ent-int-ink: #1d1700;   /* entrega interna: amarillo */
    --t-ent-cli: #2fa86a;  --t-ent-cli-ink: #ffffff;   /* entrega al cliente: verde */
    --t-pub: #1b1bcb;      --t-pub-ink: #ffffff;       /* publicación: azul fuerte */
    --t-int: #8c93a8;      --t-int-ink: #ffffff;       /* tarea interna: gris */
    /* Colores de pack (lista de clientes) */
    --pk-starter: #cfd8ff; --pk-starter-ink: #1b1bcb;
    --pk-basico: #6b7bff;  --pk-basico-ink: #ffffff;
    --pk-pro: #1b1bcb;     --pk-pro-ink: #ffffff;
    --pk-personalizado: #e1e4ee; --pk-personalizado-ink: #4a4f6e;
  }
  @media (prefers-color-scheme: dark) {
    :root { --bg:#0b0d1f; --panel:#12152e; --side:#0f1226; --ink:#f2f4ff; --muted:#9aa0c4; --line:#232849; --accent:#252a6b; --accent-ink:#cfd8ff;
      --rol-direccion-bg:#f2f4ff; --rol-direccion-ink:#0b0d1f; --rol-jefa-bg:#3b2a7a; --rol-jefa-ink:#e7ddff; --rol-guionista-bg:#5c4600; --rol-guionista-ink:#ffe98a;
      --rol-filmmaker-bg:#1c4a2c; --rol-filmmaker-ink:#d3f2dc; --rol-editor-bg:#252a6b; --rol-editor-ink:#cfd8ff; --rol-diseno-bg:#6b1d44; --rol-diseno-ink:#ffd9e8; --rol-otro-bg:#2c3050; --rol-otro-ink:#c9cde8;
      --urg-rojo:#ff8a8a; --urg-rojo-bg:#4a1a22; --urg-amarillo:#ffe27a; --urg-amarillo-bg:#4a3d0a; }
  }
  * { box-sizing: border-box; margin: 0; }
  body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; height: 100vh; display: flex; flex-direction: column; }
  .topbar { height: 64px; background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; position: relative; }
  .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand) 14%, var(--brand) 86%, transparent); }
  .logo { display: flex; align-items: center; }
  .logo img { height: 26px; width: auto; display: block; }
  .user { display: flex; align-items: center; gap: 12px; background: var(--brand); color: var(--brand-ink); border-radius: 12px; padding: 5px 6px 5px 18px; }
  .user small { display: block; opacity: .8; font-size: 11px; }
  .user b { font-weight: 600; }
  .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
  .user .avatar { background: #fff; color: var(--brand); border-radius: 8px; }
  .layout { flex: 1; display: flex; min-height: 0; }
  aside { width: 260px; background: var(--side); border-right: 1px solid var(--line); padding: 14px 12px; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; }
  .role { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; margin-bottom: 18px; width: 100%; font: inherit; color: inherit; text-align: left; }
  .role small { color: var(--muted); font-size: 11px; display: block; margin-left: 16px; }
  .role b { font-size: 13px; }
  .role .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; margin-right: 8px; }
  .label { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; padding: 0 12px 8px; }
  .nav a, .nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
  .nav a:hover, .nav button:hover { background: rgba(27,27,203,.07); }
  .nav .active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  .nav svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .chev { margin-left: auto; transition: transform .15s; }
  .open > .chev { transform: rotate(90deg); }
  .sub { padding-left: 14px; display: none; }
  .sub.show { display: block; }
  .pack { font-size: 11px; color: var(--muted); padding: 10px 12px 4px; display: flex; justify-content: space-between; }
  .sub a { padding: 7px 12px; font-size: 13px; }
  .sub a .d { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
  .spacer { flex: 1; }
  main { flex: 1; overflow-y: auto; padding: 36px 44px 60px; }
  .crumb { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
  h1 { font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -.01em; margin-bottom: 22px; }
  h1 i { font-style: normal; color: var(--muted); }
  h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
  .grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
  .card:has(> .k + .v) { text-align: center; }
  .grid > *, .two > *, .acc > * { min-width: 0; } .card select { max-width: 100%; } .card .field select { width: 100%; }
  .card .k { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
  .card .v { font-size: 32px; margin-top: 10px; font-weight: 600; letter-spacing: -.01em; }
  .card .delta { font-size: 12px; color: var(--brand); margin-top: 4px; font-weight: 500; }
  .card.dark { background: #0b0d1f; color: #fff; border-color: #0b0d1f; }
  .card.dark .k { color: #aab0d6; }
  .card.hl { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .card.hl .k { color: var(--accent-ink); opacity: .7; }
  .card.hl .delta { color: var(--accent-ink); }
  .two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
  .bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
  .bulk select, .bulk input { background: var(--panel); color: var(--ink); } .bulk-del { display: inline-flex; align-items: center; gap: 8px; }
  tr.sel > td { box-shadow: inset 0 0 0 999px rgba(27,27,203,.07); }
  td input[type=date] { width: 120px; padding-left: 8px; padding-right: 6px; } td input[type=time] { width: 98px; padding-left: 8px; padding-right: 6px; } td select { max-width: 128px; }
  .dur { display: inline-flex; align-items: center; gap: 6px; } .dur input { width: 46px; padding-left: 8px; padding-right: 2px; }
  .stack > * + * { margin-top: 14px; }
  table { width: 100%; border-collapse: collapse; }
  th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 8px 10px; }
  td { padding: 11px 8px; border-top: 1px solid var(--line); }
  .c-reu-int { --c: var(--t-reu-int); --ci: var(--t-reu-int-ink); } .c-reu-cli { --c: var(--t-reu-cli); --ci: var(--t-reu-cli-ink); } .c-grab { --c: var(--t-grab); --ci: var(--t-grab-ink); } .c-ent-int { --c: var(--t-ent-int); --ci: var(--t-ent-int-ink); } .c-ent-cli { --c: var(--t-ent-cli); --ci: var(--t-ent-cli-ink); } .c-pub { --c: var(--t-pub); --ci: var(--t-pub-ink); } .c-int { --c: var(--t-int); --ci: var(--t-int-ink); }
  .pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; flex-shrink: 0; }
  .cal .ev[class*="c-"], .wev[class*="c-"] { background: var(--c); color: var(--ci); border: 0; border-left: 3px solid rgba(0,0,0,.25); }
  .swatch[class*="c-"] { background: var(--c); border: 0; }
  .pkdot-starter { background: var(--pk-starter); box-shadow: inset 0 0 0 1px var(--pk-starter-ink); } .pkdot-basico { background: var(--pk-basico); } .pkdot-pro { background: var(--pk-pro); } .pkdot-personalizado { background: var(--pk-personalizado-ink); opacity: .55; }
  tr.inactivo td { opacity: .75; } .card.inactivo { background: var(--bg); border-style: dashed; }
  .fila-carpeta { cursor: default; } .carpeta .tipo svg { display: block; }
  .pill.pk-starter { background: var(--pk-starter); color: var(--pk-starter-ink); border-color: transparent; } .pill.pk-basico { background: var(--pk-basico); color: var(--pk-basico-ink); border-color: transparent; } .pill.pk-pro { background: var(--pk-pro); color: var(--pk-pro-ink); border-color: transparent; } .pill.pk-personalizado { background: var(--pk-personalizado); color: var(--pk-personalizado-ink); border-color: transparent; }
  .pill { display: inline-flex; align-items: center; line-height: 1.3; font-size: 11px; padding: 3px 10px; border-radius: 99px; background: var(--side); border: 1px solid var(--line); white-space: nowrap; }
  .pill.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .pill.warn { background: #0b0d1f; color: #fff; border-color: #0b0d1f; }
  .bars { display: flex; align-items: flex-end; gap: 14px; height: 160px; padding-top: 10px; }
  .bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 11px; color: var(--muted); }
  .bars span { width: 100%; background: var(--brand); border-radius: 6px 6px 0 0; }
  .bars div:last-child span { background: #0b0d1f; }
  .person { display: flex; align-items: center; gap: 10px; }
  .person .avatar { background: var(--side); color: var(--ink); border: 1px solid var(--line); width: 30px; height: 30px; font-size: 12px; }
  .viewing .btn { margin-left: 10px; } .viewing { display: block; line-height: 1.5; background: var(--accent); border: 1px solid var(--line); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 13px; }
  .modes { display: inline-flex; background: var(--side); border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-bottom: 18px; }
  .modes button { font: inherit; border: 0; background: none; color: var(--ink); padding: 7px 16px; border-radius: 99px; cursor: pointer; }
  .modes button.on { background: var(--brand); color: #fff; }
  .tabs { display: flex; gap: 26px; margin-bottom: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .tabs button { font: inherit; font-weight: 500; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); padding: 10px 2px; cursor: pointer; white-space: nowrap; }
  .tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
  .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
  .field label { display: flex; align-items: center; gap: 8px; min-height: 22px; line-height: 1.25; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  input:not([type=checkbox]):not([type=radio]), select { height: 38px; }
  input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); }
  select { appearance: none; -webkit-appearance: none; padding-right: 36px !important; text-overflow: ellipsis; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
  .btn { font: inherit; font-weight: 500; border: 0; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
  .btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
  .btn.sm { padding: 6px 11px; font-size: 12.5px; }
  .row { display: flex; gap: 12px; align-items: center; }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
  .form-grid .full { grid-column: 1 / -1; }
  .form-grid.onb { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid .field { margin: 0; min-width: 0; }
  .form-grid label { white-space: nowrap; }
  .form-grid input { width: 100%; min-width: 0; box-sizing: border-box; }
  .checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 14px; }
  .checks label { display: flex; gap: 8px; align-items: center; }
  .stack > * + * { margin-top: 14px; }
  .etiquetas { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .pill.sep { margin-right: 6px; }
  .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
  .t-vencida > td, .list > div.t-vencida { background: var(--urg-rojo-bg); } .t-urgente > td, .list > div.t-urgente { background: var(--urg-amarillo-bg); }
  .t-vencida .t-fecha, .t-vencida .t-fecha small { color: var(--urg-rojo); font-weight: 600; } .t-urgente .t-fecha, .t-urgente .t-fecha small { color: var(--urg-amarillo); font-weight: 600; }
  .t-vencida > td:first-child, .list > div.t-vencida { box-shadow: inset 3px 0 0 var(--urg-rojo); } .t-urgente > td:first-child, .list > div.t-urgente { box-shadow: inset 3px 0 0 var(--urg-amarillo); }
  .list > div.t-vencida, .list > div.t-urgente { padding: 12px; border-radius: 8px; border-top: 0; margin-top: 6px; }
  .list > div.t-vencida:first-child, .list > div.t-urgente:first-child { margin-top: 0; }
  .list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
  .list > div:first-child { border-top: 0; padding-top: 0; }
  .list small { color: var(--muted); }
  .etiquetas select { max-width: 210px; }
  .donut { position: relative; width: 190px; height: 190px; margin: 6px auto 0; } .donut-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; font-weight: 700; }
  input.imp { width: 96px; }
  table.pub th.num, table.pub td.num { text-align: center; white-space: nowrap; border-left: 1px solid var(--line); }
  .ver-mas { display: flex; justify-content: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); } .ver-mas button { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px; padding: 8px 18px; border-radius: 999px; cursor: pointer; } .ver-mas button:hover { filter: brightness(.96); } .ver-mas button span { font-size: 11px; margin-left: 4px; }
  .pub-filtro { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .pub-filtro select, .pub-filtro input { width: auto; min-width: 150px; } table.pub th { user-select: none; }
  .subtabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; } .subtabs a { padding: 6px 2px 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; } .subtabs a.on { color: var(--brand); border-bottom-color: var(--brand); } table.pub td a { color: var(--brand); text-decoration: none; font-weight: 500; } table.pub td a:hover { text-decoration: underline; }
  pre.acceso-txt { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; word-break: break-all; font: inherit; margin: 0; }
  .card .mail { margin-top: 4px; }
  .tareas-dia { display: grid; gap: 6px; } ul.tl { margin: 0 0 4px 18px; padding: 0; } ul.tl li { margin: 2px 0; }
  details.multi { position: relative; } details.multi summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); height: 38px; box-sizing: border-box; list-style: none; } .multi-lista { position: absolute; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-height: 240px; overflow: auto; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.12); } .multi-lista label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
  .pack-nombre { font-size: 46px; font-weight: 700; letter-spacing: -.02em; text-align: left; margin: -14px 0 18px; line-height: 1.1; }
  .pack-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .pack-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 10px; text-align: center; min-width: 0; }
  .pack-stat .k { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
  .pack-stat .v { font-size: 30px; font-weight: 600; margin-top: 8px; letter-spacing: -.01em; }
  .pack-stat input { width: 100%; box-sizing: border-box; margin-top: 8px; text-align: center; font-size: 20px; font-weight: 600; }
  .dias-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
  .dias-card h3 { margin: 0; } .chips.dias { justify-content: center; gap: 10px; margin: 0; }
  .chips.dias button { padding: 13px 26px; font-size: 16px; }
  .dias-card .pill { font-size: 12.5px; padding: 5px 14px; }
  h2.sec-t { font-size: 18px; margin: 26px 0 12px; }
  .barra { height: 8px; border-radius: 99px; background: var(--accent); overflow: hidden; } .barra i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
  .onb-caja { max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 6px; } .onb-caja select, .onb-caja input { max-width: none; } .onb-caja select { width: 100%; }
  .form-grid input[type=date], .form-grid input[type=time] { width: 100%; } table.tt td { padding: 12px 10px; vertical-align: middle; } table.tt tr.t-vencida > td:first-child, table.tt tr.t-urgente > td:first-child { padding-left: 12px; }
  table.centra th:not(:first-child):not(:last-child), table.centra td:not(:first-child):not(:last-child) { text-align: center; }
  table.clic tr:not(:first-child) { cursor: pointer; } table.clic tr:not(:first-child):hover td { background: var(--accent); }
  .muted { color: var(--muted); }
  .tipo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
  .item { display: flex; align-items: center; gap: 12px; }
  .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .cal .h { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
  .cal .d { min-height: 78px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 12px; background: var(--panel); }
  .cal .d.off { background: transparent; border-color: transparent; }
  .cal .d.today { border-color: var(--brand); }
  .cal .d .n { color: var(--muted); font-size: 11px; }
  .cal .ev { display: block; margin-top: 4px; font-size: 10.5px; line-height: 1.25; padding: 3px 5px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
  .cal .ev.pub { background: #0b0d1f; color: #fff; }
  .res { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .res .card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .cal .ev.k1 { background: var(--accent); color: var(--accent-ink); }
  .cal .ev.k2 { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
  .cal .ev.k3 { background: #6b7bff; color: #fff; }
  .cal .ev.k4 { background: var(--brand); color: #fff; }
  .cal .ev.k5 { background: #0b0d1f; color: #fff; }
  .swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
  .swatch.k1 { background: var(--accent); border: 1px solid var(--brand); } .swatch.k2 { border: 2px solid var(--brand); } .swatch.k3 { background: #6b7bff; } .swatch.k4 { background: var(--brand); } .swatch.k5 { background: #0b0d1f; }
  .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); } .leg { display: inline-flex; gap: 6px; align-items: center; }
  .hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .bigav svg { width: 54px; height: 54px; display: block; }
  .bigav { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; flex-shrink: 0; }
  .chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
  .chips button { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 14px; border-radius: 99px; cursor: pointer; }
  .chips button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
  .sync { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; } .sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; }
  .logo-co { width: 42px; height: 42px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
  .grid.g4 { grid-template-columns: repeat(4, 1fr); }
  .fases { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px 4px; margin: -6px -8px 0; }
  .fase { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); text-align: center; position: relative; }
  .fase i { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 12px; background: var(--panel); }
  .fase.done i { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .fase.now i { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--accent); }
  .fase.now { color: var(--ink); font-weight: 600; }
  .acc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tile-logo { width: 52px; height: 52px; border-radius: 13px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
  .bars em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink); }
  .tile { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
  .tile h3 { margin: 0; font-size: 13px; }
  .tile p { line-height: 1.55; margin-bottom: 8px; }
  .tile-ico.logo { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 0; } .tile-ico.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .tile-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; }
  .banner { display: flex; align-items: center; gap: 16px; background: var(--brand); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 14px; }
  .banner .logo-co { width: 54px; height: 54px; font-size: 18px; background: #fff; border: 0; }
  .bloque { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
  .bloque.dim, .grupo.dim { opacity: .5; }
  .fases-unica { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,6fr); gap: 0; } .fases-unica > * { min-width: 0; } @media (max-width: 1180px) { .fases-unica { grid-template-columns: 1fr; } .fases-unica .grupo + .grupo { border-left: 0; padding-left: 0; margin: 14px 0 0; } } .fases-unica .grupo + .grupo { border-left: 1px solid var(--line); padding-left: 16px; margin-left: 10px; }
  .bloque-t { font-weight: 600; font-size: 13px; margin-bottom: 24px; } .bloque-t small { font-weight: 400; color: var(--muted); }
  .cal .ev.k6 { background: transparent; border: 1px dashed var(--brand); color: var(--brand); }
  .swatch.k6 { border: 2px dashed var(--brand); }
  .login { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 80% -10%, #3a3ae8 0%, transparent 60%), linear-gradient(160deg, #1b1bcb 0%, #13139f 55%, #0b0b6e 100%); display: block; z-index: 50; overflow: hidden; }
  .login-escena { position: relative; min-height: 100%; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; overflow-y: auto; height: 100%; }
  .login-centro { position: relative; z-index: 2; width: min(440px, 100%); text-align: center; animation: login-sube .7s ease-out both; }
  .box-logo { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; } .box-logo img { height: 28px; width: auto; display: block; flex-shrink: 0; }
  @media (max-width: 430px) { .box-logo { gap: 8px; } .box-logo img { height: 23px; } .login .box { padding: 28px 26px 21px; } }
  .box-linea { height: 2px; margin: 18px -12px 22px; background: linear-gradient(90deg, transparent, var(--brand) 14%, var(--brand) 86%, transparent); }
  .login-deco { position: fixed; z-index: 0; pointer-events: none; height: auto; animation: deriva 14s ease-in-out infinite; }
  @keyframes pbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
  @keyframes deriva { 0%, 100% { transform: translate(0, 0) rotate(calc(var(--r) - 4deg)); } 50% { transform: translate(28px, -20px) rotate(calc(var(--r) + 4deg)); } }
  @keyframes login-sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .login-deco, .login-centro { animation: none; } }
  @media (max-width: 600px) { .login-deco { transform-origin: center; } .login-deco.solo-esc { display: none; } .login-deco[style*="width:300px"] { width: 200px !important; } .login-deco[style*="width:260px"] { width: 170px !important; } }
  .login[hidden], .aviso[hidden], [hidden] { display: none !important; }
  .login .box { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 34px 34px 23px; width: 100%; box-sizing: border-box; margin-top: 16px; text-align: left; box-shadow: 0 24px 60px rgba(5, 5, 60, .35); }
  .login h1 { margin: 0 0 6px; font-size: 24px; }
  .login pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; margin: 10px 0; }
  .aviso { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 60; max-width: 90vw; }
  .wk-slot { position: absolute; left: 0; right: 0; height: 52px; cursor: pointer; } .wk-slot:hover { background: rgba(27,27,203,.06); }
  .cal .d.click { cursor: pointer; } .cal .d.click:hover { border-color: var(--brand); }
  .rol { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .rol.r-direccion, .person .avatar.r-direccion { background: var(--rol-direccion-bg); color: var(--rol-direccion-ink); }
  .rol.r-jefa, .person .avatar.r-jefa { background: var(--rol-jefa-bg); color: var(--rol-jefa-ink); }
  .rol.r-guionista, .person .avatar.r-guionista { background: var(--rol-guionista-bg); color: var(--rol-guionista-ink); }
  .rol.r-filmmaker, .person .avatar.r-filmmaker { background: var(--rol-filmmaker-bg); color: var(--rol-filmmaker-ink); }
  .rol.r-editor, .person .avatar.r-editor { background: var(--rol-editor-bg); color: var(--rol-editor-ink); }
  .rol.r-diseno, .person .avatar.r-diseno { background: var(--rol-diseno-bg); color: var(--rol-diseno-ink); }
  .rol.r-otro, .person .avatar.r-otro { background: var(--rol-otro-bg); color: var(--rol-otro-ink); }
  .person .avatar[class*="r-"] { border-color: transparent; }
  .count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
  .badge { margin-left: auto; background: var(--brand); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; font-weight: 600; }
  .rolemenu { margin: -8px 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .rolemenu button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 12px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
  .rolemenu button:hover { background: var(--side); } .rolemenu button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  .rolemenu small { color: var(--muted); font-size: 11px; } .rolemenu { max-height: 70vh; overflow-y: auto; }
  .rolemenu button.abierto { background: var(--side); font-weight: 600; }
  .vm-seccion { padding: 4px 8px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); } .vm-seccion input { width: 100%; box-sizing: border-box; margin: 6px 0; }
  .vm-rol { padding: 8px 4px 2px; } .vm-rol > .rol { display: inline-block; margin: 0 4px 4px; }
  .vm-persona { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .vm-persona.on { background: var(--accent); border-radius: 8px; }
  .rolemenu .vm-persona button { padding: 6px 8px; border-radius: 8px; } .rolemenu .vm-persona .vm-cal { width: auto; flex-shrink: 0; color: var(--muted); } .rolemenu .vm-cal svg { width: 16px; height: 16px; display: block; }
  .caltool { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
  .caltool select { padding-top: 8px; padding-bottom: 8px; padding-left: 12px; } .rango { font-size: 15px; min-width: 150px; text-align: center; }
  .arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--ink); font-size: 16px; }
  .chips .cchip { background: var(--panel); color: var(--muted); border: 1px solid var(--line); padding: 6px 13px; }
  .cchip { font: inherit; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 6px 13px; border-radius: 99px; cursor: pointer; }
  .chips .cchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
  .wk { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .wk-grid { display: grid; grid-template-columns: 62px repeat(7, 1fr); }
  .wk-head { border-bottom: 1px solid var(--line); }
  .wk-h { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 12px 4px; font-size: 11px; letter-spacing: .1em; color: var(--muted); border-left: 1px solid var(--line); }
  .wk-h b { font-size: 17px; color: var(--ink); letter-spacing: 0; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
  .wk-h b.hoy { background: var(--brand); color: #fff; }
  .wk-allday { border-bottom: 1px solid var(--line); background: var(--side); }
  .wk-ad { border-left: 1px solid var(--line); padding: 4px; min-height: 30px; }
  .wk-ad .ev { display: block; margin-bottom: 3px; font-size: 10.5px; padding: 3px 5px; border-radius: 5px; }
  .wk-t { height: 52px; font-size: 11px; color: var(--muted); padding: 0 8px; text-align: right; transform: translateY(-7px); }
  .wk-allday .wk-t { transform: none; padding-top: 8px; }
  .wk-scroll { max-height: 560px; overflow-y: auto; padding-top: 8px; }
  .wk-col { position: relative; height: 676px; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 51px, var(--line) 51px, var(--line) 52px); }
  .wk-col.hoy { background-color: rgba(27,27,203,.04); }
  .wev { position: absolute; border-radius: 7px; padding: 4px 7px; font-size: 11px; line-height: 1.3; overflow: hidden; border-left: 3px solid var(--brand); background: var(--accent); color: var(--accent-ink); }
  .wev.k1, .wev.k2, .wev.k3 { background: var(--accent); color: var(--accent-ink); }
  .wev.k4 { background: var(--brand); color: #fff; border-left-color: #0b0d1f; }
  .wev.k5 { background: #0b0d1f; color: #fff; border-left-color: #0b0d1f; }
  .wev.k6 { background: repeating-linear-gradient(135deg, var(--accent), var(--accent) 7px, transparent 7px, transparent 14px); border: 1px dashed var(--brand); border-left: 3px solid var(--brand); color: var(--brand); }
  .mail { background: #f1f3f4; border-radius: 12px; padding: 24px; }
  .mail-card { max-width: 560px; margin: 0 auto; background: #fff; border-radius: 12px; overflow: hidden; color: #0b0d1f; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
  .mail-head { background: #1b1bcb; color: #fff; padding: 26px 30px; } .mail-head b { display: block; font-size: 22px; } .mail-head span { font-size: 13px; opacity: .85; }
  .mail-body { padding: 28px 30px 32px; font-size: 15px; line-height: 1.55; } .mail-body p { margin-bottom: 12px; color: #0b0d1f; }
  .mail-body a { color: #1b1bcb; }
  .mail-btn { display: inline-block; background: #1b1bcb; color: #fff; font-weight: 600; padding: 13px 22px; border-radius: 9px; margin-top: 8px; }
  .mail-nota { background: #eaeefd; border-radius: 8px; padding: 10px 14px; } .mail-nota:empty { display: none; }
  .slots { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--side); margin-top: 6px; }
  .sl.s1 { background: var(--accent); } .sl.s2 { background: var(--brand); } .sl { display: block; height: 100%; }
  .tramo { display: flex; flex-direction: column; gap: 2px; min-width: 170px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
  .tramo-t { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
  .tramo .field { margin-bottom: 8px; } .tramo input { width: 100%; }
  .acc.dos { grid-template-columns: repeat(2, 1fr); }
  .checks { display: grid; gap: 4px; } .chk { display: flex; align-items: center; gap: 12px; padding: 9px 4px; cursor: pointer; border-top: 1px solid var(--line); } .chk:first-child { border-top: 0; }
  .chk input { width: 18px; height: 18px; accent-color: var(--brand); }
  tr.fila { cursor: pointer; } tr.fila:hover td { background: var(--side); }
  tr.det > td { background: var(--bg); padding: 4px 12px 14px; border-top: 0; }
  tr.det .list > div { padding: 9px 0; }
  tr.det .list > div.t-vencida, tr.det .list > div.t-urgente { padding: 9px 12px; }
  .franja { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
  .franja-t { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
  .cnt { background: var(--side); border-radius: 99px; padding: 1px 9px; font-size: 11px; letter-spacing: 0; }
  .pago { font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 7px; white-space: nowrap; }
  .pago.pend { background: #ffe600; color: #1a1700; }
  .pago.ok { background: #22c55e; color: #04210f; }
  /* ===== Versión móvil y tableta ===== */
  .burger, .tabbar, .nav-fondo { display: none; }
  @media (max-width: 900px) {
    .burger { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--ink); margin: 0 4px 0 -8px; cursor: pointer; flex-shrink: 0; }
    .burger svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .topbar { padding: 0 14px; gap: 6px; } .topbar .logo { margin-right: auto; } .topbar .logo img { height: 24px; }
    .user { padding: 4px 5px 4px 12px; gap: 8px; } .user small { display: none; } .user b { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    aside { position: fixed; top: 64px; bottom: 0; left: 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-105%); transition: transform .25s ease; box-shadow: none; }
    body.menu-abierto aside { transform: none; box-shadow: 0 0 40px rgba(8, 8, 60, .3); }
    .nav-fondo { position: fixed; inset: 64px 0 0 0; background: rgba(8, 8, 60, .35); z-index: 55; } body.menu-abierto .nav-fondo { display: block; }
    .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); } body.con-tabbar .tabbar { display: flex; }
    .tabbar button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; font: inherit; font-size: 10px; color: var(--muted); padding: 4px 0; cursor: pointer; }
    .tabbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .tabbar button.active { color: var(--brand); font-weight: 600; }
    body.con-tabbar main { padding-bottom: 96px; }
    .grid { grid-template-columns: 1fr 1fr } .two, .res, .acc, .acc.dos { grid-template-columns: 1fr } .fases-unica { grid-template-columns: 1fr } .fases-unica .grupo + .grupo { border-left: 0; padding-left: 0; margin: 14px 0 0; } .grid.g4 { grid-template-columns: 1fr 1fr } main { padding: 24px 18px }
  }
  @media (max-width: 600px) {
    main { padding: 18px 14px 40px; } h1 { font-size: 24px; }
    .grid, .grid.g4 { grid-template-columns: 1fr; }
    .grid:has(> .card > .k + .v), .grid.g4:has(> .card > .k + .v) { grid-template-columns: 1fr 1fr; } .grid:has(> .card > .k + .v) > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .card { padding: 16px 14px; overflow-x: auto; } .card .v { font-size: 26px; }
    .card table, .card .tt { min-width: 520px; } .card table.clic { min-width: 480px; }
    .form-grid, .form-grid.onb { grid-template-columns: 1fr !important; }
    .row { flex-wrap: wrap; } .tabs { gap: 18px; white-space: nowrap; } .tabs button { white-space: nowrap; }
    .pack-nombre { font-size: 34px; margin-top: -10px; } .pack-stat { padding: 12px 4px; } .pack-stat .v { font-size: 19px; } .pack-stat .k { font-size: 9px; letter-spacing: .06em; } .chips.dias button { padding: 11px 18px; font-size: 15px; }
    .cal { gap: 3px; } .cal .d { min-height: 50px; padding: 4px; } .cal .ev { font-size: 0; height: 7px; width: 7px; padding: 0; border-radius: 50%; display: inline-block; margin: 2px 1px 0 0; border: 0 !important; }
    .banner { padding: 16px; } .hero { gap: 12px; } .bloque-t { margin-bottom: 10px; }
    .bulk { flex-wrap: wrap; }
  }
/* Tareas: nota en una sola línea (se despliega al pulsar) y celda de responsables compacta */
.t-nota { display: block; margin: 6px 0 0 18px; max-width: 400px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; } .t-nota.abierta { white-space: normal; max-width: none; }
.resp-cel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 190px; max-width: 240px; } .resp-cel > select:first-child { flex: 1 1 130px; min-width: 0; } .resp-cel .etiquetas { flex-basis: 100%; } .resp-cel .etiquetas { gap: 6px; } .resp-cel .etiquetas .pill { padding: 3px 9px; font-size: 12px; } .resp-cel select.mas { width: 48px; min-width: 0; padding-left: 14px; }
/* Tareas: más aire entre el punto, el título, la etiqueta de tanda y la segunda línea */
table.tt .pt { margin-right: 10px; } table.tt b + .pill { margin-left: 12px; } table.tt td { padding-top: 14px; padding-bottom: 14px; }
