:root {
    --bg: #f5f6f4;
    --sidebar: #111111;
    --sidebar-soft: #1f1f1f;
    --panel: #ffffff;
    --panel-soft: #f8f8f6;
    --ink: #171717;
    --muted: #6d716b;
    --line: #ddddda;
    --line-dark: #c7c9c2;
    --brand: #181818;
    --accent: #b9472f;
    --warn: #9b6a1c;
    --ok: #2f6d46;
    --review: #365f91;
    --stage-blk-bg: #f4e3a1;
    --stage-blk-border: #a97700;
    --stage-ib-bg: #ddd2f2;
    --stage-ib-border: #8870b8;
    --stage-td-bg: #cbb9ea;
    --stage-td-border: #7057a8;
    --stage-fx-bg: #f2c9dc;
    --stage-fx-border: #be3e7a;
    --stage-clu-bg: #d5eaf8;
    --stage-clu-border: #4d93c3;
    --stage-col-bg: #cdecea;
    --stage-col-border: #2f9890;
    --stage-comp-bg: #dce2f5;
    --stage-comp-border: #5d6fb5;
    --stage-export-bg: #d8eed5;
    --stage-export-border: #3f8d4a;
}

@font-face {
    font-family: "Avenir LT Std";
    src: url("/static/fonts/AvenirLTStd-Book.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir LT Std";
    src: url("/static/fonts/AvenirLTStd-Heavy.otf") format("opentype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Avenir LT Std", Avenir, ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

a { color: inherit; }

.app-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    border-right: 1px solid #000;
    color: #f4f4f4;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.brand-block {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-mark {
    align-items: center;
    background: #f2f0e9;
    border-radius: 8px;
    color: #111;
    display: flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand-logo {
    background: #f4f4f4;
    border-radius: 8px;
    display: block;
    height: 44px;
    object-fit: contain;
    padding: 7px;
    width: 44px;
}

.eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.sidebar .eyebrow { color: #bdbdbd; }
h1, h2 { margin: 0; }
h1 { color: #fff; font-size: 17px; line-height: 1.15; }
h2 { font-size: 18px; line-height: 1.2; }

.side-nav { display: grid; gap: 6px; }

.side-nav a {
    border-radius: 7px;
    color: #cfcfcf;
    display: block;
    font-weight: 800;
    padding: 10px 11px;
    text-decoration: none;
}

.side-nav a.active {
    background: #f2f0e9;
    color: #111;
}

.side-nav a:hover {
    background: var(--sidebar-soft);
    color: #fff;
}

.sidebar-footer {
    background: var(--sidebar-soft);
    border: 1px solid #303030;
    border-radius: 8px;
    display: grid;
    gap: 5px;
    margin-top: auto;
    padding: 12px;
}

.sidebar-footer span { color: #bdbdbd; font-size: 12px; }
.sidebar-footer strong { color: #fff; }
.workspace { min-width: 0; }

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 72px;
    padding: 14px 22px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.logout-form { margin: 0; }
.logout-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}
.logout-button:hover { background: #f2f0e9; }
.logout-button:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.logout-button svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 19px; }
.session-user {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-actions a,
.ghost-button,
.section-heading a {
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    color: var(--ink);
    font-weight: 800;
    padding: 8px 10px;
    text-decoration: none;
}

main { padding: 16px 22px 34px; }

.surface {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    margin-bottom: 12px;
    overflow: auto;
    padding: 12px;
}

.flash-stack { display: grid; gap: 8px; margin-bottom: 12px; }
.flash { border-radius: 7px; font-weight: 800; padding: 9px 11px; }
.flash.success { background: #e7f2eb; color: var(--ok); }
.flash.error { background: #f7e7e2; color: var(--accent); }

.project-pill {
    background: #f2f0e9;
    border: 1px solid #d8d5ca;
    border-radius: 7px;
    color: #111;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
    white-space: nowrap;
}

.login-page {
    background: #f3efe5;
    min-height: 100vh;
}

.login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(20, 18, 14, 0.12);
    max-width: 420px;
    padding: 28px;
    width: 100%;
}

.login-brand { align-items: center; display: flex; gap: 14px; }
.login-brand img { background: #fff; border: 1px solid var(--line); border-radius: 8px; height: 58px; object-fit: contain; padding: 8px; width: 58px; }
.login-brand h1 { font-size: 24px; margin: 2px 0 0; }
.login-intro { color: var(--muted); margin: 22px 0 18px; }
.login-error { background: #f7e7e2; border-radius: 7px; color: var(--accent); font-weight: 800; margin-bottom: 12px; padding: 10px 12px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; }
.login-form label span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.login-form input { min-width: 0; width: 100%; }
.login-form button { min-height: 46px; }
.login-help-link { color: var(--ink); font-size: 13px; font-weight: 800; justify-self: center; }
.login-primary-link { background: #111; border-radius: 7px; color: #fff; display: block; font-weight: 800; padding: 13px 16px; text-align: center; text-decoration: none; }

.ffmpeg-ok {
    background: #e3f0e0;
    border-color: #b9d5b6;
    color: #25502a;
}

.ffmpeg-error {
    background: #f8dfd8;
    border-color: #e5b5a8;
    color: #74301e;
}

.ffmpeg-warning {
    background: #fff2c8;
    border-color: #e2c56f;
    color: #5f4710;
}

.filters {
    align-items: end;
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(8, minmax(112px, 1fr)) auto auto;
}

.mode-switch {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 4px 0 12px;
}

.mode-switch span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.mode-switch a {
    background: #f3f2ee;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    font-weight: 900;
    padding: 8px 12px;
    text-decoration: none;
}

.mode-switch a.active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.mode-tools-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 12px;
}

.mode-tools-row .mode-switch {
    margin: 0;
}

.sequence-toggle-tools {
    display: flex;
    gap: 6px;
}

.icon-button {
    align-items: center;
    background: #f3f2ee;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 36px;
}

.icon-button:hover {
    border-color: #151515;
}

.icon-button span {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    display: block;
    height: 7px;
    position: absolute;
    transform-origin: center;
    width: 7px;
}

.icon-button .chevron-up {
    top: 8px;
    transform: rotate(-135deg);
}

.icon-button .chevron-down {
    bottom: 8px;
    transform: rotate(45deg);
}

[data-close-all-sequences] .chevron-up {
    bottom: 6px;
    top: auto;
}

[data-close-all-sequences] .chevron-down {
    bottom: auto;
    top: 6px;
}

[data-close-all-tracking-sequences] .chevron-up {
    bottom: 6px;
    top: auto;
}

[data-close-all-tracking-sequences] .chevron-down {
    bottom: auto;
    top: 6px;
}

.sequence-mode-switch {
    justify-content: flex-end;
    margin: 0;
}

.sequence-mode-switch span {
    display: none;
}

.sequence-mode-switch a {
    font-size: 11px;
    padding: 6px 9px;
}

.form-row {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(6, minmax(110px, 1fr)) auto;
    margin-bottom: 12px;
}

.form-row.compact { grid-template-columns: repeat(4, minmax(120px, 180px)) auto; }
.sequence-entry { grid-template-columns: 90px 1fr 120px 110px 90px 160px 140px auto; }
.talent-entry { grid-template-columns: 140px 180px 180px 110px 100px minmax(360px, 1fr) auto; }

.sequence-overview {
    display: grid;
    gap: 10px;
    margin: 14px 0 18px;
}

.sequence-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.sequence-card summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    padding: 14px;
}

.sequence-card summary::-webkit-details-marker {
    display: none;
}

.sequence-card summary strong {
    display: block;
    font-size: 16px;
}

.sequence-card summary span,
.sequence-shot-card span,
.sequence-shot-card small {
    color: var(--muted);
}

.sequence-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.sequence-stats span,
.deleted-strip span {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 8px;
}

.sequence-state-no-iniciado summary,
.tracking-sequence-head.sequence-state-no-iniciado {
    background: #f3f2ee;
}

.sequence-state-en-proceso summary,
.tracking-sequence-head.sequence-state-en-proceso {
    background: #fff6d8;
}

.sequence-state-en-revision summary,
.tracking-sequence-head.sequence-state-en-revision {
    background: #ffe8d8;
}

.sequence-state-aprobado summary,
.tracking-sequence-head.sequence-state-aprobado {
    background: #e7f4e2;
}

.sequence-state-entregado summary,
.tracking-sequence-head.sequence-state-entregado {
    background: #ece6f5;
}

.progress-line {
    background: #e7e3d7;
    height: 7px;
}

.progress-line span {
    background: #356f9f;
    display: block;
    height: 100%;
}

.sequence-actions {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
}

.sequence-actions a,
.sequence-actions button {
    width: auto;
}

.sequence-shot-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 0 14px 14px;
}

.lazy-sequence-body,
.lazy-technical-body {
    min-height: 54px;
}

.sequence-fragment-placeholder {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    color: #6b6963;
    font-size: 13px;
    font-weight: 700;
    background: #f7f6f2;
    border-top: 1px solid #dedbd2;
}

[aria-busy="true"] .sequence-fragment-placeholder {
    color: #171717;
}

.sequence-shot-card {
    align-content: start;
    background: #fbfaf6;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    gap: 6px;
    min-height: 150px;
    padding: 8px;
    position: relative;
    text-align: left;
}

.sequence-shot-card.is-selected,
.tracking-shot-card.is-selected {
    outline: 2px solid #151515;
    outline-offset: 2px;
}

.sequence-shot-card.is-retake {
    background: #f3a6a0;
    border-color: #a92f28;
    border-left: 8px solid #7f1f1a;
    box-shadow: 0 0 0 2px rgba(169, 47, 40, 0.32), 0 8px 20px rgba(169, 47, 40, 0.18);
}

.sequence-shot-card.is-retake .thumb-drop {
    background: #d8635a;
    border-color: rgba(127, 31, 26, 0.28);
}

.sequence-shot-card.is-retake select {
    background: #fff0ee;
    border-color: #7f1f1a;
    color: #7f1f1a;
}

.shot-select {
    align-items: center;
    cursor: pointer;
    display: flex;
    height: 24px;
    justify-content: center;
    left: 16px;
    position: absolute;
    top: 16px;
    width: 24px;
    z-index: 8;
}

.shot-select input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.shot-select span {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(20, 20, 20, 0.2);
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    display: flex;
    height: 20px;
    justify-content: center;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
    width: 20px;
}

.shot-select span::before {
    border-bottom: 2px solid transparent;
    border-left: 2px solid transparent;
    content: "";
    display: block;
    height: 5px;
    transform: rotate(-45deg) translate(1px, -1px);
    width: 9px;
}

.shot-select input:checked + span::before {
    border-color: #ffffff;
}

.shot-select input:checked + span {
    background: #151515;
    border-color: #151515;
}

.shot-select:hover span {
    transform: scale(1.04);
}

.shot-select input:focus-visible + span {
    outline: 2px solid #1f6feb;
    outline-offset: 2px;
}

.tracking-select {
    left: 8px;
    top: 8px;
}

.sequence-shot-card img,
.sequence-shot-card .empty-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 5px;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.sequence-shot-card strong,
.sequence-shot-card span,
.sequence-shot-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deleted-strip {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 14px;
}
.shot-entry { grid-template-columns: 120px 90px 1fr 90px 90px 110px 140px auto; }
.task-entry { grid-template-columns: 150px 90px 150px 130px 130px 130px 76px 76px 140px 1fr auto; }
.assignment-entry { grid-template-columns: 130px 150px 220px 1fr 80px auto; }

label {
    color: var(--muted);
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
    text-transform: uppercase;
}

input,
select,
button {
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    color: var(--ink);
    font: inherit;
    min-height: 34px;
    padding: 7px 8px;
    width: 100%;
}

input,
select { background: #fff; }

button {
    background: #171717;
    border-color: #171717;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

button:hover { filter: brightness(0.96); }

.dashboard {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(118px, 1fr));
    margin-bottom: 12px;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    min-height: 78px;
    padding: 12px;
    text-decoration: none;
    transition: border-color 120ms ease, transform 120ms ease;
}

.metric:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.metric span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.metric strong { font-size: 27px; }

.report-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-wide {
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
    margin-top: 12px;
}

.click-row {
    cursor: pointer;
}

.click-row:hover td {
    background: var(--panel-soft);
}

.stage-list,
.sequence-progress-list {
    display: grid;
    gap: 8px;
}

.stage-row,
.sequence-progress-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 7px;
    padding: 9px;
    text-decoration: none;
}

.sequence-progress-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.sequence-progress-row .mini-progress {
    grid-column: 1 / -1;
}

.stage-row strong,
.sequence-progress-row strong {
    display: block;
    font-size: 13px;
}

.stage-row span,
.sequence-progress-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.sequence-progress-value {
    font-size: 18px;
    font-weight: 900;
}

.mini-progress {
    background: #e5e2da;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.mini-progress span {
    background: #2f8f54;
    display: block;
    height: 100%;
}

.film-strip {
    align-items: stretch;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.film-block {
    border: 2px solid var(--line);
    border-radius: 6px;
    color: inherit;
    display: grid;
    flex: var(--duration-weight, 60) 0 52px;
    gap: 3px;
    min-height: 54px;
    min-width: 52px;
    padding: 7px;
    text-decoration: none;
}

.film-block strong,
.film-block span {
    font-size: 11px;
}

.film-block.state-no-iniciado { background: #eeeeea; }
.film-block.state-en-proceso { background: #fff2c8; }
.film-block.state-entregado { background: #dfefd9; }
.film-block.style-vida { border-style: solid; }
.film-block.style-obra { border-style: dashed; }
.film-block.style-disparate { border-style: dotted; }

.today-groups,
.team-groups {
    display: grid;
    gap: 12px;
}

.today-group h3,
.team-group h3 {
    margin: 0 0 6px;
}

.team-subgroup {
    border-top: 1px solid var(--line);
    padding-top: 7px;
}

.team-subgroup > strong {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.today-row,
.team-row {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 6px 0;
}

.today-row span,
.team-row span {
    color: var(--muted);
    font-weight: 800;
}

.muted-row {
    opacity: 0.62;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.inline-controls {
    align-items: center;
    display: flex;
    gap: 8px;
}

.inline-controls select {
    min-width: 140px;
}

table {
    border-collapse: collapse;
    min-width: 960px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 7px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--panel-soft);
    color: #4c514b;
    font-size: 11px;
    font-weight: 800;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

td input,
td select {
    min-width: 88px;
    min-height: 31px;
    padding: 5px 6px;
}

.num { font-size: 18px; font-weight: 800; text-align: right; }
.code { font-weight: 800; white-space: nowrap; }

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 8px;
    white-space: nowrap;
}

.status-pendiente { background: #eeeeea; color: #53564f; }
.status-en-proceso { background: #e3eee9; color: var(--brand); }
.status-en-revision { background: #e4ebf5; color: var(--review); }
.status-retake { background: #f7e7e2; color: var(--accent); }
.status-aprobado,
.status-entregado { background: #e3f0e0; color: var(--ok); }

.check-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.check-row label {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    gap: 4px;
    text-transform: none;
}

.check-row input {
    min-height: auto;
    padding: 0;
    width: auto;
}

.talent-groups {
    display: grid;
    gap: 18px;
}

.talent-group h3 {
    margin: 12px 0 8px;
}

.talent-operations-settings { margin-bottom: 14px; }
.talent-performance { display: grid; gap: 14px; margin-bottom: 14px; }
.performance-heading { align-items: end; }
.performance-heading h2 { margin-bottom: 2px; }
.performance-heading > div > span { color: var(--muted); font-size: 13px; }
.performance-heading .segmented { display: inline-flex; gap: 4px; }
.performance-heading .segmented a { border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 700; padding: 9px 14px; text-decoration: none; }
.performance-heading .segmented a.active { background: var(--ink); color: #fff; }
.performance-heading-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.performance-filter-bar,
.performance-editor,
.performance-calculator { align-items: end; display: grid; gap: 10px; }
.performance-filter-bar { grid-template-columns: minmax(140px, .7fr) repeat(2, minmax(150px, 1fr)) auto; }
.performance-filter-bar label,
.performance-editor label,
.performance-calculator label { display: grid; font-size: 11px; font-weight: 700; gap: 4px; }
.performance-summary { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.performance-summary span { color: var(--muted); display: grid; font-size: 12px; gap: 2px; padding: 12px 14px; }
.performance-summary span + span { border-left: 1px solid var(--line); }
.performance-summary strong { color: var(--ink); font-size: 20px; }
.performance-ranking-wrap { max-width: 100%; overflow-x: auto; }
.performance-ranking { border-collapse: collapse; min-width: 980px; width: 100%; }
.performance-ranking th,
.performance-ranking td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: middle; }
.performance-ranking th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.performance-ranking td small { color: var(--muted); display: block; font-size: 10px; margin-top: 2px; }
.performance-compact-list .performance-ranking { min-width: 860px; }
.performance-compact-list .performance-ranking td { height: 58px; }
.performance-compact-list select { min-height: 34px; min-width: 88px; }
.performance-value {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: inherit;
    cursor: default;
    font: inherit;
    font-weight: 900;
    min-height: 34px;
    min-width: 72px;
    padding: 4px 6px;
    text-align: left;
}
.performance-compact-list[data-performance-period="week"] .performance-value { cursor: text; }
.performance-value:hover { background: #f1f0ec; }
.performance-value input { max-width: 92px; min-height: 32px; }
.performance-value.is-saving { opacity: .55; }
.performance-panel-button {
    align-items: center;
    background: #171717;
    border: 1px solid #171717;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.performance-drawer {
    background: #fff;
    border-left: 1px solid var(--line);
    bottom: 0;
    box-shadow: -16px 0 36px rgba(0, 0, 0, .14);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform .2s ease;
    width: min(620px, 100vw);
    z-index: 1200;
    color: var(--ink);
}
.performance-drawer.is-open { transform: translateX(0); }
.performance-drawer-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
}
.performance-drawer-head div { display: grid; gap: 2px; }
.performance-drawer-head span { color: var(--ink); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.performance-drawer-head strong { font-size: 20px; }
.performance-drawer-head button { background: #171717; border: 0; border-radius: 50%; color: #fff; cursor: pointer; font-size: 20px; height: 38px; width: 38px; }
.performance-drawer-body { min-height: 0; overflow-y: auto; padding: 16px; }
.talent-panel-identity { align-items: center; display: flex; justify-content: space-between; margin-bottom: 12px; }
.talent-panel-identity div { display: grid; }
.talent-panel-identity strong { font-size: 22px; }
.talent-panel-identity span { color: var(--ink); font-weight: 800; }
.talent-panel-section { border: 1px solid var(--line); border-radius: 7px; margin-bottom: 10px; overflow: hidden; }
.talent-panel-section > summary { cursor: pointer; font-weight: 900; list-style: none; padding: 13px 14px; }
.talent-panel-section > summary::-webkit-details-marker { display: none; }
.talent-panel-section[open] > summary { border-bottom: 1px solid var(--line); }
.talent-panel-content { display: grid; gap: 12px; padding: 14px; }
.performance-history-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px 0; }
.performance-history-legend span { align-items: center; color: var(--ink); display: inline-flex; font-size: 10px; font-weight: 800; gap: 5px; }
.performance-history-legend span::before { background: #767676; border-radius: 2px; content: ""; height: 9px; width: 9px; }
.performance-history-legend .is-above::before { background: #7451a8; }
.performance-history-legend .is-goal::before { background: #318453; }
.performance-history-legend .is-near::before { background: #d2a829; }
.performance-history-legend .is-far::before { background: #c94b43; }
.performance-history-chart { align-items: end; display: grid; gap: 3px; grid-template-columns: repeat(26, minmax(4px, 1fr)); height: 120px; padding: 10px 12px 8px; }
.performance-history-bar { background: #efeee9; height: 100%; position: relative; }
.performance-history-bar i { background: #767676; bottom: 0; left: 1px; position: absolute; right: 1px; }
.performance-history-bar.is-above i { background: #7451a8; }
.performance-history-bar.is-goal i { background: #318453; }
.performance-history-bar.is-near i { background: #d2a829; }
.performance-history-bar.is-far i { background: #c94b43; }
.performance-history-bar b { border-top: 2px solid #171717; left: 0; position: absolute; right: 0; }
.performance-history-list { max-height: 380px; overflow-y: auto; }
.performance-history-row { align-items: center; border-top: 1px solid var(--line); color: var(--ink); display: grid; font-size: 12px; gap: 8px; grid-template-columns: 1.4fr repeat(4, 1fr); min-height: 38px; padding: 5px 10px; }
.performance-history-row.is-heading { border-top: 0; color: var(--ink); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.performance-history-row button { background: transparent; border: 0; border-radius: 3px; color: var(--ink); cursor: text; font: inherit; font-weight: 800; padding: 6px; text-align: left; }
.performance-history-row button:hover { background: #efeee9; }
.performance-history-row input { max-width: 78px; min-height: 30px; }
.drawer-loading { color: var(--muted); font-weight: 800; padding: 32px; text-align: center; }
.performance-state { border: 1px solid currentColor; border-radius: 999px; display: inline-block; font-size: 10px; font-weight: 700; margin-left: 6px; padding: 2px 6px; }
.performance-bajo-meta .performance-state,
.trend-down { color: #a42727; }
.performance-en-meta .performance-state { color: #83620e; }
.performance-sobre-meta .performance-state,
.trend-up { color: #21633a; }
.performance-tools { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.performance-tools > details { border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.performance-tools summary { cursor: pointer; font-weight: 700; }
.performance-tools > .capacity-planner-panel { grid-column: 1 / -1; }
.performance-editor,
.performance-calculator { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.performance-editor button,
.performance-calculator button,
.performance-calculator fieldset { grid-column: 1 / -1; }
.performance-calculator fieldset { border: 1px solid var(--line); display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; max-height: 150px; overflow: auto; padding: 8px; }
.performance-calculator fieldset label { align-items: center; display: flex; font-size: 12px; }
.capacity-planner-mode { align-content: center; border: 1px solid var(--line); border-radius: 6px; display: grid; min-height: 42px; padding: 6px 10px; }
.capacity-planner-mode span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.performance-record-list { display: grid; gap: 6px; margin-top: 10px; max-height: 190px; overflow: auto; }
.performance-record-list span { border-top: 1px solid var(--line); color: var(--muted); display: grid; font-size: 11px; padding-top: 6px; }
.performance-record-list strong { color: var(--ink); }

/* Talentos 2026: una sola superficie, filas compactas y controles coherentes. */
.talent-weekly [hidden], .talent-directory [hidden], .talent-projection [hidden] { display: none !important; }
.talent-section-tabs { align-items: center; display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; padding: 5px; }
.talent-section-tabs a { border-radius: 6px; color: var(--muted); flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 8px 13px; text-decoration: none; }
.talent-section-tabs a.active { background: var(--ink); color: #fff; }
.talent-weekly, .talent-directory, .talent-projection { display: grid; gap: 12px; margin-bottom: 14px; }
.talent-week-toolbar { align-items: end; border-block: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.talent-week-toolbar label, .talent-inline-profile label, .projection-input-grid > label, .projection-shot-size { display: grid; font-size: 11px; font-weight: 800; gap: 4px; }
.talent-week-toolbar button, .talent-week-actions button, .talent-inline-profile button { width: auto; }
.performance-date-control { display: inline-block; position: relative; }
.performance-date-control [data-date-display] { min-width: 148px; padding-right: 38px; width: 148px; }
.performance-date-control [data-date-picker] { background: transparent; border: 0; bottom: 0; color: transparent; cursor: pointer; height: 100%; min-height: 0; padding: 0 9px; position: absolute; right: 0; top: 0; width: 38px; }
.performance-date-control [data-date-picker]::-webkit-datetime-edit { display: none; }
.performance-date-control [data-date-picker]::-webkit-calendar-picker-indicator { cursor: pointer; height: 18px; margin: 0; opacity: 1; padding: 0; width: 18px; }
.talent-week-status { border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 900; padding: 6px 10px; }
.talent-week-status.is-current { background: #eeeae0; }
.talent-week-table-wrap { overflow-x: auto; }
.talent-week-table { border-collapse: collapse; min-width: 1140px; width: 100%; }
.talent-week-table th, .talent-week-table td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: middle; }
.talent-week-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.talent-week-table th:last-child, .talent-week-table tr:not(.weekly-shot-detail) > td:last-child { background: #fff; box-shadow: -6px 0 8px rgba(255,255,255,.92); position: sticky; right: 0; z-index: 2; }
.talent-week-table .weekly-art-person > td:last-child { background: #efeee9; }
.talent-week-table td small { color: var(--muted); display: block; font-size: 10px; }
.talent-week-table input, .talent-week-table select { min-height: 32px; }
.talent-week-actions { align-items: center; display: flex; gap: 8px; justify-content: flex-end; }
.talent-week-actions p { color: var(--muted); margin: 0 auto 0 0; }
.talent-week-actions .primary { background: var(--ink); color: #fff; }
.weekly-row-action { min-width: 76px; }
.weekly-row-action button { min-height: 29px; padding: 4px 9px; width: auto; }
.weekly-row-action small { margin-top: 3px; }
.talent-weekly.is-completed .weekly-row-action small { color: #426a43; font-weight: 800; }
.weekly-art-person td { background: #efeee9; border-top: 2px solid #171717; }
.weekly-art-person td:first-child { display: table-cell; }
.weekly-art-person td:first-child > small { display: inline; margin-left: 8px; }
.weekly-add-stage { align-items: center; display: inline-flex; gap: 4px; margin-left: 18px; vertical-align: middle; }
.weekly-add-stage select { min-height: 29px; width: 125px; }
.weekly-add-stage button { min-height: 29px; padding: 4px 8px; width: auto; }
.weekly-art-entry td:first-child { width: 18px; }
.weekly-art-detail td { border-bottom-color: #cfcfc9; }
.weekly-art-adjustment { display: grid; font-size: 9px; gap: 2px; }
.weekly-art-adjustment input { min-height: 29px; width: 95px; }
.weekly-unassigned { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; }
.weekly-unassigned span { background: #fff0c2; border-radius: 999px; font-size: 9px; padding: 3px 6px; }
.weekly-unassigned small { color: var(--muted); }
.talent-directory-summary { border-block: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0; }
.talent-directory-summary span { color: var(--muted); font-size: 11px; padding: 9px 14px; }
.talent-directory-summary strong { color: var(--ink); font-size: 16px; margin-right: 3px; }
.talent-team-group { display: grid; }
.talent-team-group + .talent-team-group { margin-top: 18px; }
.talent-team-group > header { align-items: center; background: #171717; color: #fff; display: flex; justify-content: space-between; min-height: 42px; padding: 8px 12px; }
.talent-team-group > header h3 { color: inherit; font-size: 16px; margin: 0; }
.talent-team-group > header span { background: rgba(255,255,255,.16); border-radius: 999px; font-size: 10px; font-weight: 900; padding: 4px 8px; }
.talent-directory-row { border-top: 1px solid var(--line); }
.talent-directory-row > summary, .talent-directory-row.is-static { align-items: center; display: grid; gap: 10px; grid-template-columns: 1.1fr .45fr 1.4fr 1fr 20px; min-height: 48px; padding: 5px 7px; }
.talent-directory-row > summary { cursor: pointer; list-style: none; }
.talent-directory-row > summary::-webkit-details-marker { display: none; }
.talent-directory-row span { min-width: 0; }
.talent-directory-row small, .talent-directory-row em { color: var(--muted); display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.talent-tags i { background: #efeee9; border-radius: 999px; font-size: 10px; font-style: normal; padding: 3px 6px; }
.talent-inline-profile { background: #f7f6f2; border-top: 1px solid var(--line); display: grid; gap: 10px; padding: 10px; }
.talent-profile-fields { align-items: end; display: grid; gap: 8px; grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) minmax(130px, .55fr); }
.talent-schedule-editor { align-items: end; border: 0; border-top: 1px solid var(--line); display: grid; gap: 7px; grid-template-columns: minmax(110px, 1.2fr) repeat(7, minmax(58px, .7fr)); margin: 0; padding: 9px 0 0; }
.talent-schedule-editor legend { color: var(--muted); font-size: 10px; font-weight: 900; padding: 0 7px 0 0; text-transform: uppercase; }
.talent-schedule-editor label { min-width: 0; }
.talent-schedule-editor input { min-width: 0; width: 100%; }
.talent-inline-profile > button { justify-self: start; }
.weekly-goal-control { align-items: center; display: flex; flex-wrap: wrap; gap: 4px; min-width: 145px; }
.weekly-goal-control input { min-width: 62px; width: 70px; }
.weekly-goal-control button { min-height: 32px; padding: 5px 8px; width: auto; }
.weekly-total { display: block; min-width: 96px; }
.weekly-shot-detail td { background: #f8f8f6; padding: 8px 10px 11px; }
.weekly-shot-picker { display: grid; gap: 8px; }
.weekly-shot-picker-head { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.weekly-shot-picker-head span, .weekly-shot-empty { color: var(--muted); font-size: 10px; }
.weekly-shot-group { display: grid; gap: 4px; }
.weekly-shot-group-title { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px; }
.weekly-shot-group-title strong { font-size: 10px; }
.weekly-shot-group-title span { color: var(--muted); font-size: 9px; }
.weekly-shot-chips { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; }
.weekly-shot-chip { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; display: inline-flex; flex: 0 0 auto; gap: 5px; min-height: 25px; padding: 3px 8px 3px 5px; text-transform: none; width: auto; }
.weekly-shot-chip:has(input:checked) { background: #eceae4; border-color: #171717; }
.weekly-shot-chip.is-next { border-style: dashed; }
.weekly-shot-chip span { align-items: baseline; display: inline-flex; gap: 5px; white-space: nowrap; }
.weekly-shot-chip strong { font-size: 10px; }
.weekly-shot-chip small { color: var(--muted); font-size: 8px; }
.weekly-shot-totals { align-items: end; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.weekly-shot-totals > span { color: var(--muted); display: grid; font-size: 9px; text-transform: uppercase; }
.weekly-shot-totals > span strong { color: var(--ink); font-size: 12px; text-transform: none; }
.weekly-adjustment { align-items: end; display: flex; gap: 5px; }
.weekly-adjustment label { font-size: 9px; }
.weekly-adjustment input { min-height: 29px; width: 82px; }
.talent-history-name { background: transparent; border: 0; color: var(--ink); cursor: pointer; font: inherit; font-weight: 900; padding: 0; text-align: left; text-decoration: underline; text-decoration-color: #aaa; text-underline-offset: 3px; width: auto; }
.talent-history-name:hover { text-decoration-color: var(--ink); }
.weekly-stage-history { border-top: 1px solid var(--line); display: grid; gap: 8px; min-width: 0; padding-top: 12px; }
.weekly-stage-history > header { align-items: end; display: flex; gap: 16px; justify-content: space-between; }
.weekly-stage-history h3 { margin: 0; }
.weekly-stage-history header span, .weekly-stage-history header small { color: var(--muted); font-size: 10px; }
.weekly-stage-history header > div:last-child { display: flex; gap: 18px; text-align: right; }
.weekly-stage-history-wrap, .performance-full-history-wrap { max-width: 100%; overflow-x: auto; }
.weekly-stage-history table, .performance-full-history table { border-collapse: collapse; width: 100%; }
.weekly-stage-history table { min-width: 0; }
.weekly-stage-history th, .weekly-stage-history td, .performance-full-history th, .performance-full-history td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.weekly-stage-history th, .performance-full-history th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.performance-full-history { border-top: 1px solid var(--line); max-width: 100%; min-width: 0; padding-top: 12px; }
.performance-full-history > summary { align-items: center; background: #171717; border-radius: 6px; color: #fff; cursor: pointer; display: inline-flex; font-weight: 900; gap: 10px; list-style: none; padding: 9px 13px; }
.performance-full-history > summary::-webkit-details-marker { display: none; }
.performance-full-history > summary span { color: #c9c9c9; font-size: 10px; font-weight: 700; }
.performance-history-manual-form { align-items: end; background: #f7f6f2; border: 1px solid var(--line); border-radius: 7px; box-sizing: border-box; display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(105px, 1fr)); margin-top: 10px; max-width: 100%; min-width: 0; padding: 10px; }
.performance-history-manual-head { align-self: center; display: grid; }
.performance-history-manual-head span { color: var(--muted); font-size: 9px; }
.history-manual-measure { align-items: end; display: grid; gap: 5px; grid-template-columns: repeat(2, minmax(70px, 1fr)); }
.performance-history-manual-action { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.performance-history-manual-action button { width: auto; }
.performance-history-manual-action p { color: var(--muted); font-size: 10px; margin: 0; }
.performance-history-manual-action p.is-warning { color: #8b5e13; font-weight: 800; }
.performance-history-manual-action [role="status"] { margin-left: auto; }
.performance-fraction-warning { background: #fff0c2; border-radius: 999px; color: #72510e; display: inline-block; font-size: 8px; font-weight: 900; margin-left: 5px; padding: 2px 5px; text-transform: uppercase; }
.performance-full-history-wrap { margin-top: 10px; max-height: 460px; }
.performance-full-history table { min-width: 840px; }
.performance-full-history td { font-size: 11px; }
@media (max-width: 760px) {
    .performance-history-manual-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .performance-history-manual-head, .performance-history-manual-action { grid-column: 1 / -1; }
    .weekly-shot-picker { min-width: 720px; }
    .performance-date-control [data-date-display] { min-width: 138px; width: 138px; }
}
.talent-compact-action { position: relative; }
.talent-compact-action summary { cursor: pointer; font-weight: 800; }
.talent-compact-action a { display: block; padding-top: 8px; }
.projection-input-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
.projection-shot-size { margin-top: 8px; max-width: 260px; }
.projection-secondary { border-top: 1px solid var(--line); padding-top: 10px; }
.projection-secondary > summary { cursor: pointer; font-weight: 800; }
.projection-admin-grid { display: grid; gap: 16px; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr); padding-top: 12px; }
.projection-admin-grid form { display: grid; gap: 8px; }
.projection-admin-grid h3, .projection-admin-grid p { margin: 0; }
.projection-admin-grid textarea { box-sizing: border-box; resize: vertical; width: 100%; }
[data-history-preview] { display: grid; font-size: 11px; gap: 3px; }
.talent-weekly input[type="checkbox"], .talent-directory input[type="checkbox"], .talent-projection input[type="checkbox"] { appearance: none; background: #fff; border: 1.5px solid #111; border-radius: 50%; box-sizing: border-box; flex: 0 0 15px; height: 15px; margin: 0; max-width: 15px; min-height: 15px; min-width: 15px; padding: 0; position: relative; width: 15px; }
.talent-weekly input[type="checkbox"]:checked, .talent-directory input[type="checkbox"]:checked, .talent-projection input[type="checkbox"]:checked { background: #111; }
.talent-weekly input[type="checkbox"]:checked::after, .talent-directory input[type="checkbox"]:checked::after, .talent-projection input[type="checkbox"]:checked::after { color: #fff; content: "✓"; font-size: 10px; font-weight: 900; left: 2px; line-height: 1; position: absolute; top: 1px; }
.talent-weekly input[type="checkbox"]:focus-visible, .talent-directory input[type="checkbox"]:focus-visible, .talent-projection input[type="checkbox"]:focus-visible { outline: 2px solid #777; outline-offset: 2px; }
.calculator-result { border-top: 1px solid var(--line); display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; padding-top: 12px; }
.calculator-result span { color: var(--muted); display: grid; font-size: 11px; }
.calculator-result strong { color: var(--ink); font-size: 18px; }

.capacity-planner { display: grid; gap: 10px; margin-top: 12px; }
.capacity-planner-inputs {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(116px, .7fr) minmax(92px, .5fr) minmax(140px, .8fr) minmax(150px, .85fr) minmax(116px, .6fr) auto;
}
.capacity-planner-inputs label { display: grid; font-size: 10px; font-weight: 900; gap: 4px; text-transform: uppercase; }
.capacity-planner-inputs label small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: none; }
.capacity-planner-inputs input,
.capacity-planner-inputs select,
.capacity-planner-inputs button { min-height: 38px; }
.capacity-planner-inputs button { padding-left: 18px; padding-right: 18px; }
.capacity-team-picker {
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 9px 0;
}
.capacity-team-picker > div:first-child { display: grid; font-size: 11px; gap: 1px; min-width: 98px; }
.capacity-team-picker > div:first-child span { color: var(--muted); font-size: 9px; }
.capacity-person-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.capacity-person-chip { cursor: pointer; display: inline-flex; }
.capacity-person-chip input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.capacity-person-chip span {
    background: #f1f0eb;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    padding: 5px 9px;
}
.capacity-person-chip input:checked + span { background: #171717; border-color: #171717; color: #fff; }
.capacity-person-chip input:focus-visible + span { outline: 3px solid #79a9df; outline-offset: 2px; }
.capacity-planner-feedback { color: var(--muted); font-size: 10px; margin: 0; min-height: 14px; }
.capacity-planner-feedback.is-error { color: #a42727; }
.capacity-planner-result { border-top: 1px solid var(--line); }
.capacity-result-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.capacity-result-summary > span { display: grid; gap: 3px; min-height: 82px; padding: 12px; }
.capacity-result-summary > span + span { border-left: 1px solid var(--line); }
.capacity-result-summary small,
.capacity-deadline-band small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.capacity-result-summary strong { font-size: 16px; }
.capacity-result-summary em { color: var(--muted); font-size: 10px; font-style: normal; }
.capacity-result-summary .is-enough strong,
.capacity-deadline-band.is-enough b { color: #21633a; }
.capacity-result-summary .is-short strong,
.capacity-deadline-band.is-short b,
.capacity-increase { color: #a42727; }
.capacity-deadline-band {
    align-items: center;
    background: #f5f4f0;
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    padding: 8px 12px;
}
.capacity-deadline-band span { display: grid; gap: 1px; }
.capacity-deadline-band strong { font-size: 12px; }
.capacity-deadline-band b { font-size: 11px; white-space: nowrap; }
.capacity-result-table-wrap { max-height: 240px; overflow: auto; }
.capacity-result-table { border-collapse: collapse; font-size: 11px; width: 100%; }
.capacity-result-table th,
.capacity-result-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.capacity-result-table th { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.capacity-result-table td:nth-child(n+2) { text-align: right; }
.capacity-source { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); display: inline-block; font-size: 8px; margin-left: 5px; padding: 2px 5px; }
.capacity-source.source-target { color: #83620e; }
.capacity-source.source-none { color: #a42727; }

.scenario-planner-panel { padding: 0 !important; }
.scenario-planner-panel > summary {
    padding: 12px 14px;
}
.scenario-planner {
    border-top: 1px solid var(--line);
    gap: 0;
    margin-top: 0;
}
.scenario-planner form { display: grid; gap: 12px; padding: 14px; }
.scenario-primary-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.scenario-segment {
    align-items: center;
    border: 0;
    display: inline-flex;
    gap: 3px;
    margin: 0;
    padding: 0;
}
.scenario-segment legend {
    color: var(--muted);
    float: left;
    font-size: 9px;
    font-weight: 900;
    margin-right: 5px;
    text-transform: uppercase;
}
.scenario-segment label { cursor: pointer; display: inline-flex; }
.scenario-segment input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.scenario-segment label > span {
    background: #f3f2ee;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: #56544f;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 10px;
    white-space: nowrap;
}
.scenario-segment input:checked + span {
    background: #171717;
    border-color: #171717;
    color: #fff;
}
.scenario-segment input:focus-visible + span {
    outline: 3px solid #79a9df;
    outline-offset: 2px;
}
.scenario-input-grid {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(130px, .65fr) minmax(145px, .7fr) minmax(145px, .7fr) minmax(310px, 1.4fr);
}
.scenario-input-grid > label {
    display: grid;
    font-size: 10px;
    font-weight: 900;
    gap: 4px;
    text-transform: uppercase;
}
.scenario-input-grid input,
.scenario-input-grid select { min-height: 38px; }
.scenario-source-segment {
    background: #f7f6f2;
    border: 1px solid var(--line);
    border-radius: 6px;
    min-height: 38px;
    padding: 4px 6px;
}
.scenario-source-segment legend { margin-left: 4px; }
.scenario-section-title {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 36px;
}
.scenario-section-title > div { align-items: baseline; display: flex; gap: 8px; }
.scenario-section-title strong { font-size: 13px; }
.scenario-section-title span { color: var(--muted); font-size: 10px; }
.scenario-assumption {
    background: #fff3c4;
    border: 1px solid #ddc774;
    border-radius: 999px;
    color: #715612 !important;
    font-weight: 800;
    padding: 4px 8px;
}
.scenario-workload,
.scenario-team {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    padding: 8px 10px;
}
.scenario-tracker-scope {
    align-items: center;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 0 2px;
}
.scenario-tracker-scope > span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.scenario-chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.scenario-chip-list label { cursor: pointer; display: inline-flex; }
.scenario-chip-list input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.scenario-chip-list span {
    background: #f3f2ee;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    padding: 4px 8px;
}
.scenario-chip-list input:checked + span { background: #171717; border-color: #171717; color: #fff; }
.scenario-chip-list input:focus-visible + span { outline: 3px solid #79a9df; outline-offset: 2px; }
.scenario-manual-workload {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    padding-top: 8px;
}
.scenario-manual-workload label {
    align-items: center;
    display: grid;
    gap: 5px;
    grid-template-columns: auto minmax(0, 1fr);
}
.scenario-manual-workload label > span { font-size: 10px; font-weight: 900; }
.scenario-manual-workload input { min-height: 34px; min-width: 0; }
.scenario-manual-workload small { color: var(--muted); font-size: 8px; grid-column: 2; margin-top: -4px; }
.scenario-stage-switch { display: flex; flex-wrap: wrap; gap: 3px; }
.scenario-stage-switch button {
    background: #f3f2ee;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #54524d;
    min-height: 28px;
    padding: 4px 8px;
}
.scenario-stage-switch button.is-active { background: #171717; border-color: #171717; color: #fff; }
.scenario-team-table { border-top: 1px solid var(--line); }
.scenario-person-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(130px, 1.2fr) minmax(120px, .8fr) minmax(115px, .65fr) minmax(100px, .55fr) minmax(110px, .7fr);
    min-height: 48px;
    opacity: .52;
    padding: 5px 2px;
}
.scenario-person-row:last-child { border-bottom: 0; }
.scenario-person-row.is-selected { opacity: 1; }
.scenario-person-row > span,
.scenario-person-row > label { display: grid; gap: 2px; }
.scenario-person-row small { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.scenario-person-row strong { font-size: 10px; }
.scenario-person-row input[type="number"] { min-height: 32px; min-width: 0; padding: 5px 7px; }
.scenario-person-toggle {
    align-items: center;
    cursor: pointer;
    display: flex !important;
    font-size: 11px;
    font-weight: 900;
}
.scenario-person-toggle input { height: 18px; min-height: 18px; width: 18px; }
.scenario-percent-input { align-items: center; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.scenario-percent-input b { color: var(--muted); font-size: 10px; margin-left: -22px; pointer-events: none; }
.scenario-submit-row { align-items: center; display: flex; gap: 10px; }
.scenario-submit-row > button { min-height: 38px; padding: 7px 22px; }
.scenario-result-hero {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.scenario-result-hero > span { display: grid; gap: 3px; min-height: 84px; padding: 12px 14px; }
.scenario-result-hero > span + span { border-left: 1px solid var(--line); }
.scenario-result-hero small,
.scenario-remediation small { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.scenario-result-hero strong { font-size: 17px; }
.scenario-result-hero em { color: var(--muted); font-size: 10px; font-style: normal; }
.scenario-result-hero.is-enough > span:first-child strong { color: #21633a; }
.scenario-result-hero.is-short > span:first-child strong { color: #a42727; }
.scenario-remediation {
    background: #f8e2df;
    border-bottom: 1px solid #dfaaa3;
    border-top: 1px solid #dfaaa3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.scenario-remediation span { display: grid; gap: 2px; padding: 9px 14px; }
.scenario-remediation span + span { border-left: 1px solid #dfaaa3; }
.scenario-remediation strong { color: #852d27; font-size: 11px; }
.scenario-confidence { border: 1px solid currentColor; border-radius: 999px; display: inline-block; font-size: 8px; padding: 2px 5px; }
.confidence-high { color: #21633a; }
.confidence-medium { color: #83620e; }
.confidence-low,
.confidence-none { color: #a42727; }
.scenario-result-assumption { color: var(--muted); font-size: 9px; margin: 8px 12px; }
.scenario-save-bar {
    align-items: end;
    background: #f7f6f2;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(180px, 1fr) auto;
    padding: 10px 14px;
}
.scenario-save-bar label { display: grid; font-size: 9px; font-weight: 900; gap: 3px; text-transform: uppercase; }
.scenario-save-bar input,
.scenario-save-bar button { min-height: 36px; }
.scenario-library { border-top: 1px solid var(--line); padding: 9px 14px 12px; }
.scenario-saved-list { display: grid; gap: 4px; margin-top: 5px; }
.scenario-saved-item {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    gap: 5px;
    grid-template-columns: 28px minmax(0, 1fr) 32px 32px;
    min-height: 42px;
    padding: 4px;
}
.scenario-saved-item > label { display: grid; place-items: center; }
.scenario-saved-item > label input { height: 17px; min-height: 17px; width: 17px; }
.scenario-saved-item button { min-height: 30px; padding: 4px 7px; }
.scenario-saved-item button:nth-child(2) { background: transparent; border: 0; color: var(--ink); display: grid; text-align: left; }
.scenario-saved-item button:nth-child(2) small { color: var(--muted); font-size: 9px; }
.scenario-empty { color: var(--muted); font-size: 10px; padding: 8px 0; }
.scenario-comparison { margin-top: 9px; overflow-x: auto; }
.scenario-comparison table { border-collapse: collapse; font-size: 10px; min-width: 640px; width: 100%; }
.scenario-comparison th,
.scenario-comparison td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.scenario-comparison th { background: #f4f3ef; }

.talent-settings-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
}

.talent-settings-form label,
.attendance-form label,
.talent-start-work-form label {
    display: grid;
    gap: 4px;
}

.talent-settings-form small { color: var(--muted); }
.create-talent-panel { margin-top: 14px; }
.talent-card-list { display: grid; gap: 12px; }

.talent-operation-card {
    border-left: 4px solid transparent;
    padding: 0;
}

.talent-operation-card.has-alert { border-left-color: #d65b43; }

.talent-card-summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(140px, .7fr) minmax(180px, 1fr) minmax(220px, 1.35fr) minmax(120px, .65fr) minmax(110px, .55fr);
    list-style: none;
    padding: 16px 18px;
}

.talent-card-summary::-webkit-details-marker { display: none; }
.talent-card-summary > span { display: grid; gap: 2px; }
.talent-card-summary strong { font-size: 16px; }
.talent-card-summary small,
.talent-card-summary em { color: var(--muted); font-size: 11px; font-style: normal; }
.talent-alert { color: #a83b2b; grid-column: 1 / -1; font-size: 12px; font-weight: 850; }

.talent-card-body {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
}

.talent-card-pane {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px;
}

.talent-card-pane h3,
.talent-card-pane h4 { margin: 0 0 10px; }
.talent-history-pane,
.talent-profile-editor { grid-column: 1 / -1; }

.current-work-metrics,
.talent-debt-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.current-work-metrics span,
.talent-debt-summary span {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    font-size: 11px;
    padding: 7px 9px;
}

.talent-start-work-form,
.attendance-form,
.recovery-form {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0;
}

.attendance-form .wide-field,
.attendance-form button,
.recovery-form h4 { grid-column: 1 / -1; }
.check-field { align-items: center; display: flex !important; flex-direction: row; }

.talent-upcoming-list,
.attendance-history,
.talent-history-list,
.recovery-history { display: grid; gap: 6px; }

.talent-upcoming-list button,
.attendance-history article,
.talent-history-list article,
.recovery-history article {
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 8px;
    text-align: left;
}

.talent-upcoming-list button { grid-template-columns: 1fr; }
.talent-upcoming-list span,
.attendance-history span,
.talent-history-list span,
.recovery-history span { color: var(--muted); font-size: 11px; }

.talent-profile-editor { border-top: 1px solid var(--line); padding-top: 10px; }
.talent-profile-editor form { display: grid; gap: 10px; margin-top: 10px; }

.operation-preview-dialog {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    max-height: 80vh;
    max-width: 680px;
    overflow: auto;
    padding: 22px;
    width: min(90vw, 680px);
}

.operation-preview-dialog::backdrop { background: rgba(16, 18, 20, .55); }
.dialog-close { float: right; font-size: 22px; padding: 3px 9px; }
.preview-warning { background: #fff0dc; border-radius: 8px; padding: 8px; }

@media (max-width: 980px) {
    .talent-settings-form { grid-template-columns: repeat(2, 1fr); }
    .talent-card-summary { grid-template-columns: 1fr 1fr; }
    .talent-card-body { grid-template-columns: 1fr; }
    .talent-history-pane,
    .talent-profile-editor { grid-column: 1; }
}

.work-hours-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
}

.work-hours-grid label {
    color: var(--muted);
    display: grid;
    font-size: 10px;
    font-weight: 900;
    gap: 3px;
    text-transform: uppercase;
}

.work-hours-grid input {
    min-width: 0;
    padding: 5px;
}

.work-hours-grid.compact {
    min-width: 300px;
}

.calendar-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
}

.calendar-head .inline-controls {
    flex: 1 1 560px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.calendar-head .inline-controls > * { flex: 0 0 auto; width: auto; }
.calendar-head .inline-controls select[name="gantt_mode"] { min-width: 132px; }
.calendar-head [data-calendar-export-person] { min-width: 178px; }
.calendar-export-button { min-width: 54px; }
.calendar-table-wrap { overflow: auto; }
.calendar-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1100px;
    table-layout: fixed;
}
.calendar-table th,
.calendar-table td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar-table thead th {
    background: #f5f4ef;
    color: #55524b;
    font-size: 11px;
    height: 42px;
    position: sticky;
    text-align: left;
    top: 0;
    z-index: 4;
}
.calendar-table thead th strong,
.calendar-table thead th span { display: block; }
.calendar-table thead th span {
    color: #74746f;
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
}
.calendar-table th:first-child { left: 0; position: sticky; width: 142px; z-index: 5; }
.calendar-table td { height: 104px; padding: 8px; vertical-align: top; }
.calendar-table tbody th {
    background: #fbfaf7;
    color: var(--ink);
    font-size: 13px;
    padding: 10px;
    text-transform: none;
    vertical-align: top;
}
.calendar-table td.off-day { background: #f1f0eb; color: var(--muted); }

.calendar-assignment {
    align-items: flex-start;
    background: #efefed;
    border: 1px solid #cfcdc6;
    border-left: 4px solid #77736a;
    border-radius: 6px;
    color: #34332f;
    display: grid;
    gap: 2px;
    margin: 0 0 6px;
    min-height: 42px;
    padding: 7px 8px;
    text-align: left;
    width: 100%;
}
.calendar-assignment strong { font-size: 11px; overflow-wrap: anywhere; }
.calendar-assignment span { color: #6b6861; font-size: 10px; font-weight: 800; }
.calendar-assignment:hover,
.calendar-assignment:focus-visible { border-color: #111; box-shadow: 0 2px 7px rgba(0, 0, 0, .13); }
.calendar-assignment.parallel-assignment { border-style: dashed; }

.assignment {
    background: #eef3ef;
    border: 1px solid #cddbd1;
    border-radius: 7px;
    color: #1d4037;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 5px;
    padding: 7px;
}

.assignment.parallel-assignment {
    background: #f4f1f8;
    border-color: #bda8d5;
    border-style: dashed;
    color: #4e2b6e;
}

.soft-warning {
    background: #fff4d8;
    border: 1px solid #dfc06b;
    border-radius: 7px;
    color: #6b4b12;
    font-size: 11px;
    font-weight: 800;
    margin-top: 5px;
    padding: 5px 7px;
}

.off-day {
    background: #f2f0e9;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.gantt-table .weekend-col {
    background: #f6f6f3;
}

.gantt-table .today-col {
    position: relative;
}

.gantt-table thead th.today-col {
    box-shadow: inset 2px 0 0 #d9362b;
}

.gantt-table tbody td.today-col {
    box-shadow: none;
}

.gantt-table th.today-col::before {
    content: none;
}

.day-label {
    display: block;
    min-height: 14px;
}

.today-badge {
    background: #d9362b;
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-size: 9px;
    line-height: 1;
    margin-top: 3px;
    padding: 3px 6px;
    text-align: center;
    text-transform: uppercase;
}

.empty {
    color: var(--muted);
    font-weight: 800;
    padding: 18px;
}

.muted {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-top: 3px;
}

.thumb {
    align-items: center;
    background: #eeeeea;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-flex;
    height: 54px;
    justify-content: center;
    object-fit: cover;
    width: 86px;
}

.empty-thumb {
    color: var(--muted);
    font-weight: 800;
}

.mini-video {
    background: #111;
    border-radius: 6px;
    display: block;
    height: 70px;
    max-width: 160px;
    width: 160px;
}

.video-cell {
    color: var(--muted);
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 4px;
}

.stack-actions {
    display: grid;
    gap: 6px;
    min-width: 148px;
}

.gantt-shell {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: 300px minmax(0, 1fr);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.gantt-shell input,
.gantt-shell select,
.gantt-shell textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.task-pool {
    max-height: calc(100vh - 140px);
    position: sticky;
    top: 88px;
}

.task-pool.is-empty { display: none; }

.pool-list {
    display: grid;
    gap: 8px;
}

.pool-card,
.gantt-block {
    border-radius: 7px;
    cursor: grab;
    font-weight: 800;
    line-height: 1.25;
}

.pool-card {
    background: #f5f1e6;
    border: 1px solid #dcd3bb;
    display: grid;
    gap: 4px;
    padding: 9px;
}

.pool-thumb {
    border-radius: 6px;
    height: 64px;
    object-fit: cover;
    width: 100%;
}

.pool-card span {
    color: var(--muted);
    font-size: 11px;
}

.timeline {
    overflow: hidden;
}

.gantt-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 150px);
    position: relative;
}

.gantt-table {
    min-width: 1500px;
    table-layout: fixed;
}

.gantt-zoom-dia th:not(:first-child),
.gantt-zoom-dia td {
    width: 132px;
    min-width: 132px;
}

.gantt-zoom-fecha th:not(:first-child),
.gantt-zoom-fecha td {
    width: 92px;
    min-width: 92px;
}

.gantt-zoom-semana th:not(:first-child),
.gantt-zoom-semana td {
    width: 64px;
    min-width: 64px;
}

.gantt-zoom-mes th:not(:first-child),
.gantt-zoom-mes td,
.gantt-zoom-año th:not(:first-child),
.gantt-zoom-año td {
    width: 34px;
    min-width: 34px;
}

.gantt-table th:first-child {
    left: 0;
    position: sticky;
    width: 140px;
    z-index: 3;
}

.gantt-table thead th {
    text-align: center;
}

.gantt-table thead th:not(:first-child) {
    border-left: 1px solid rgba(24, 24, 24, 0.1);
}

.gantt-table thead th:first-child {
    text-align: left;
}

.gantt-person-heading {
    cursor: pointer;
    user-select: none;
}

.gantt-person-heading.selected-person {
    background: #eceff3;
    box-shadow: inset 3px 0 0 #1f2937;
    color: #111827;
    cursor: grab;
}

.gantt-person-heading.is-pointer-dragging { cursor: grabbing; }

.gantt-table td {
    background: #fff;
    --lane-height: 152px;
    height: calc(12px + var(--lane-count, 1) * var(--lane-height));
    min-width: 112px;
    overflow: visible;
    padding: 0;
    position: relative;
    vertical-align: top;
}

.gantt-drop.drag-over {
    background: #fafafa;
    outline: 1px dashed rgba(24, 24, 24, 0.18);
    outline-offset: -2px;
}

.gantt-drop-preview {
    align-items: center;
    background: rgba(38, 107, 90, 0.16);
    border: 1px dashed rgba(38, 107, 90, 0.62);
    border-radius: 6px;
    color: #245c4f;
    display: flex;
    font-size: 10px;
    font-weight: 900;
    inset: 6px auto auto calc((var(--start-slot, 0) / var(--slots-per-day, 32)) * 100%);
    justify-content: center;
    min-height: 28px;
    pointer-events: none;
    position: absolute;
    text-transform: uppercase;
    width: calc((var(--span-slots, 32) / var(--slots-per-day, 32)) * 100%);
    z-index: 12;
}

.gantt-drop-preview.preview-swap {
    background: rgba(38, 38, 38, 0.12);
    border-color: rgba(24, 24, 24, 0.55);
    color: #181818;
}

.gantt-drop-preview.preview-append {
    background: rgba(109, 74, 145, 0.14);
    border-color: rgba(109, 74, 145, 0.6);
    color: #4f2f76;
    top: auto;
    bottom: 6px;
}

.gantt-block {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    display: block;
    height: calc(var(--lane-height) - 14px);
    left: calc((var(--start-slot, 0) / var(--slots-per-day, 32)) * 100%);
    margin: 0;
    margin-bottom: 0;
    max-width: none;
    min-height: 0;
    margin-left: 0;
    outline: 0;
    overflow: visible;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: calc(6px + var(--lane, 0) * var(--lane-height));
    width: calc((var(--calendar-span-slots, var(--span-slots, 32)) / var(--slots-per-day, 32)) * 100%);
    z-index: 1;
}

.gantt-block:focus,
.gantt-block:focus-visible,
.gantt-block:active {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.gantt-card {
    align-content: start;
    background: #eeeeea;
    border: 1px solid #d2d0ca;
    border-left: 3px solid #8b8f86;
    border-radius: 6px;
    color: #343832;
    display: grid;
    font-size: 10px;
    gap: 2px;
    height: calc(var(--lane-height) - 14px);
    min-height: 29px;
    overflow: hidden;
    padding: 4px;
    pointer-events: auto;
    position: relative;
    width: 100%;
}

.gantt-card.gantt-card-segment {
    box-sizing: border-box;
    left: calc((var(--segment-offset-slots, 0) / var(--calendar-span-slots, var(--span-slots, 4))) * 100%);
    position: absolute;
    top: 0;
    width: calc((var(--segment-span-slots, var(--span-slots, 4)) / var(--calendar-span-slots, var(--span-slots, 4))) * 100%);
}

.gantt-card-continuation {
    pointer-events: auto;
}

.gantt-block.parallel-task .gantt-card {
    background: #f3eef8;
    border-color: #bda8d5;
    border-left-color: #7c4fad;
    border-style: dashed;
    color: #40255d;
}

.gantt-seq-label {
    color: #565a52;
    display: none !important;
    font-size: 10px;
    font-weight: 900;
}

.gantt-main-labels {
    display: grid;
    gap: 0;
    min-width: 0;
}

.gantt-visible-code {
    color: inherit;
    font-size: 12px;
    line-height: 1.05;
}

.parallel-badge {
    background: #7c4fad;
    border-radius: 999px;
    color: #fff;
    display: inline-block !important;
    font-size: 9px;
    font-weight: 900;
    justify-self: start;
    line-height: 1;
    padding: 3px 6px;
    text-transform: uppercase;
}

.retake-badge {
    background: #c33b35;
    border-radius: 999px;
    color: #fff;
    display: inline-block !important;
    font-size: 9px;
    font-weight: 900;
    justify-self: start;
    line-height: 1;
    padding: 3px 6px;
    text-transform: uppercase;
}

.gantt-block select {
    font-size: 10px;
    min-height: 25px;
    min-width: 0;
    padding: 3px 6px;
}

.gantt-block strong {
    display: block;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-block span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-seq,
.compact-shot,
.compact-code {
    display: none !important;
}

.compact-task,
.compact-hours {
    display: none !important;
}

.assignment-person {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.gantt-block.duration-tiny {
    min-height: 54px;
}

.gantt-block.duration-tiny .gantt-card {
    align-content: center;
    gap: 2px;
    height: 72px;
    min-height: 66px;
    padding: 5px 3px;
}

.gantt-block.duration-tiny .gantt-thumb,
.gantt-block.duration-tiny select,
.gantt-block.duration-tiny span:not(.compact-seq):not(.compact-task):not(.compact-hours):not(.resize-handle):not(.end-move-handle):not(.parallel-badge):not(.assignment-person),
.gantt-block.duration-tiny strong:not(.compact-shot),
.gantt-block.duration-compact .gantt-thumb,
.gantt-block.duration-compact select,
.gantt-block.duration-compact .assignment-status,
.gantt-block.duration-tiny .assignment-person,
.gantt-block.duration-compact .assignment-person,
.gantt-block.duration-compact span:not(.compact-seq):not(.compact-task):not(.compact-hours):not(.resize-handle):not(.end-move-handle):not(.parallel-badge):not(.assignment-person),
.gantt-block.duration-compact strong:not(.compact-shot) {
    display: none;
}

.gantt-block.duration-tiny .compact-seq,
.gantt-block.duration-tiny .compact-shot,
.gantt-block.duration-tiny .compact-task,
.gantt-block.duration-tiny .compact-hours,
.gantt-block.duration-compact .compact-seq,
.gantt-block.duration-compact .compact-shot,
.gantt-block.duration-compact .compact-task,
.gantt-block.duration-compact .compact-hours {
    display: block !important;
}

.gantt-block.duration-tiny .compact-seq,
.gantt-block.duration-tiny .compact-shot,
.gantt-block.duration-tiny .compact-task,
.gantt-block.duration-tiny .compact-hours,
.gantt-block.duration-compact .compact-seq,
.gantt-block.duration-compact .compact-shot,
.gantt-block.duration-compact .compact-task,
.gantt-block.duration-compact .compact-hours {
    font-size: 10px;
    line-height: 1.05;
    text-align: center;
}

.gantt-block.duration-tiny .compact-seq,
.gantt-block.duration-compact .compact-seq {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
}

.gantt-block.duration-tiny .compact-shot,
.gantt-block.duration-compact .compact-shot {
    font-size: 14px;
    font-weight: 900;
}

.gantt-block.duration-tiny .gantt-card,
.gantt-block.duration-compact .gantt-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    overflow: hidden;
}

.gantt-block.duration-tiny .compact-shot,
.gantt-block.duration-tiny .compact-task,
.gantt-block.duration-tiny .compact-hours,
.gantt-block.duration-compact .compact-shot,
.gantt-block.duration-compact .compact-task,
.gantt-block.duration-compact .compact-hours {
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    word-break: keep-all;
}

.gantt-block.duration-compact {
    min-height: 54px;
}

.gantt-block.duration-compact .gantt-card {
    align-content: center;
    gap: 2px;
    height: 72px;
    min-height: 66px;
    padding: 5px 4px;
}

.gantt-block.duration-compact select {
    min-height: 22px;
    padding: 2px 4px;
}

.gantt-block.duration-day .gantt-thumb {
    height: 42px;
    object-fit: cover;
    width: 100%;
}

.gantt-block.duration-wide .gantt-thumb {
    height: 42px;
    object-fit: cover;
    width: 100%;
}

.assignment-task-type {
    max-width: 100%;
    min-height: 23px;
    padding: 2px 5px;
}

.resize-handle {
    bottom: 0;
    cursor: ew-resize;
    display: block !important;
    position: absolute;
    pointer-events: auto;
    right: -6px;
    top: 0;
    width: 13px;
    z-index: 5;
}

.resize-handle::after {
    background: rgba(24, 24, 24, 0.55);
    border-radius: 999px;
    content: "";
    display: block;
    height: 70%;
    margin: 15% auto;
    width: 3px;
}

.gantt-block.duration-tiny .resize-handle,
.gantt-block.duration-compact .resize-handle {
    display: block !important;
    opacity: 0;
}

.gantt-block.duration-tiny:hover .resize-handle,
.gantt-block.duration-compact:hover .resize-handle {
    opacity: 0.45;
}

.thumb-drop {
    position: relative;
}

.thumb-drop.drag-over {
    outline: 2px solid #1d6fb8;
    outline-offset: 2px;
}

.thumb-drop input[type="file"] {
    inset: 0;
    opacity: 0;
    position: absolute;
}

.quick-plan {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-plan .save-feedback {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    grid-column: 1 / -1;
    min-height: 13px;
}

.save-feedback[data-state="ok"] { color: var(--ok); }
.save-feedback[data-state="saving"] { color: var(--muted); }
.save-feedback[data-state="error"] { color: var(--accent); }

.drawer-feedback {
    display: block;
    font-size: 12px;
    font-weight: 900;
    min-height: 16px;
    text-align: center;
}

.quick-plan input,
.quick-plan select {
    min-height: 29px;
    min-width: 0;
    padding: 4px 5px;
}

.quick-plan select[name="status"],
.quick-status-select {
    min-width: 118px;
    overflow: hidden;
    padding-right: 28px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-plan .quick-status-select {
    grid-column: 1 / -1;
}

.send-pending-button {
    background: #151515;
    border-color: #151515;
    color: #fff;
    grid-column: 1 / -1;
    min-height: 30px;
}

.pool-card {
    position: relative;
}

.remove-pending {
    align-items: center;
    background: rgba(21, 21, 21, 0.92);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    min-height: 0;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 22px;
    z-index: 3;
}

.mini-pipeline {
    align-items: center;
    display: flex;
    gap: 3px;
    min-height: 10px;
}

.pipe-dot {
    background: #c8c6bd;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    cursor: pointer;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.pipe-dot:hover {
    outline: 2px solid rgba(21, 21, 21, 0.35);
    outline-offset: 2px;
}

.pipe-no-iniciado { background: #d7d5cc; border-color: #c5c2b7; }
.pipe-en-proceso { background: #e2bd48; border-color: #a97912; }
.pipe-en-revision { background: #d66355; border-color: #9f2c24; }
.pipe-aprobado,
.pipe-entregado,
.pipe-listo { background: #151515; border-color: #151515; }
.pipe-problema { background: #d66355; border-color: #9f2c24; }

.asset-mini {
    align-items: center;
    display: flex;
    gap: 5px;
}

.asset-chip,
.stage-chip {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    padding: 4px 6px;
    white-space: nowrap;
}

.asset-chip[data-asset-toggle] {
    cursor: pointer;
}

.asset-chip[data-asset-toggle]:hover {
    border-color: #151515;
}

.fx-chip-slot {
    display: inline-flex;
}

.fx-chip {
    appearance: none;
    cursor: pointer;
    max-width: 95px;
    min-height: 21px;
}

select.fx-chip {
    padding-right: 16px;
}

.fx-add {
    background: #f7f6f1;
    border-color: #cfcabf;
    color: #5f625b;
}

.fx-chip:hover {
    border-color: #151515;
}

.fx-no-iniciado { background: #dfddd6; color: #4d504b; }
.fx-no-aplica { background: #d8d5cc; color: #555851; border-color: #bdb7aa; }
.fx-en-proceso { background: #fff2c8; color: #5f4710; border-color: #e2bd48; }
.fx-en-revision { background: #dcebf7; color: #254864; border-color: #9fc4df; }
.fx-pausado { background: #e7dedd; color: #69413e; border-color: #aa7772; }
.fx-aprobado { background: #dfefd9; color: #25502a; border-color: #9dcc94; }
.fx-por-unificar { background: #eadcf8; color: #4c2a73; border-color: #b896d8; }
.fx-colocado { background: #2f8f4e; color: #fff; border-color: #1f6f39; }

.asset-no-iniciado { background: #dfddd6; color: #5b5d57; }
.asset-no-aplica { background: #d8d5cc; color: #555851; }
.asset-en-proceso { background: #fff2c8; color: #5f4710; }
.asset-en-revision { background: #dcebf7; color: #254864; }
.asset-pausado { background: #e7dedd; color: #69413e; border-color: #aa7772; }
.asset-aprobado,
.asset-entregado,
.asset-listo { background: #dfefd9; color: #25502a; }

.stage-chip { background: #e8e6de; color: #353832; }
.stage-blk { background: var(--stage-blk-bg); border-color: var(--stage-blk-border); }
.stage-ib { background: var(--stage-ib-bg); border-color: var(--stage-ib-border); }
.stage-td { background: var(--stage-td-bg); border-color: var(--stage-td-border); }
.stage-fx { background: var(--stage-fx-bg); border-color: var(--stage-fx-border); }
.stage-clu { background: var(--stage-clu-bg); border-color: var(--stage-clu-border); }
.stage-col { background: var(--stage-col-bg); border-color: var(--stage-col-border); }
.stage-ready-to-comp { background: #d9e1ea; }
.stage-comp { background: var(--stage-comp-bg); border-color: var(--stage-comp-border); }
.stage-export { background: var(--stage-export-bg); border-color: var(--stage-export-border); }

.drawer-assets {
    margin: 8px 0;
}

.assignment-status {
    max-width: 100%;
    min-height: 22px;
    padding: 2px 5px;
}

.gantt-thumb {
    border-radius: 5px;
    height: 32px;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    width: 100%;
    -webkit-user-drag: none;
}

.pool-thumb {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-fecha .gantt-thumb {
    height: 22px;
}

.zoom-semana {
    min-height: 28px;
}

.zoom-semana .gantt-card {
    min-height: 28px;
    padding: 5px;
}

.zoom-semana .assignment-task-type {
    min-height: 22px;
}

.zoom-mes,
.zoom-año {
    min-height: 22px;
    padding: 0;
}

.zoom-mes .gantt-card,
.zoom-año .gantt-card {
    border-left-width: 0;
    min-height: 22px;
    padding: 0;
}

.zoom-mes strong,
.zoom-año strong,
.zoom-mes .assignment-task-type,
.zoom-año .assignment-task-type,
.zoom-mes .assignment-status,
.zoom-año .assignment-status,
.zoom-semana .assignment-status,
.zoom-mes span,
.zoom-año span,
.zoom-mes .gantt-thumb,
.zoom-año .gantt-thumb {
    display: none;
}

.state-pendiente,
.state-no-iniciado,
.state-sin-asignar,
.state-no-activo,
.state-programada {
    background: #eeeeea;
    border-left-color: #8b8f86;
    color: #3d403b;
}

.state-en-proceso,
.state-working,
.state-iniciado {
    background: #fff2c8;
    border-left-color: #d6a21e;
    color: #5f4710;
}

.state-en-revision {
    background: #e6eef8;
    border-left-color: #4d74a6;
    color: #284c78;
}

.state-ready-to-comp {
    background: #eadcf8;
    border-left-color: #8d55c7;
    color: #4d2776;
}

.state-problema,
.state-bloqueado {
    background: #f8dfd8;
    border-left-color: #b9472f;
    color: #74301e;
}

.state-aprobado,
.state-entregado,
.state-completado,
.state-finalizado,
.state-exportado {
    background: #dfefd9;
    border-left-color: #3d7a43;
    color: #25502a;
}

.state-pausado {
    background: #eeeeea;
    border-left-color: #8b8f86;
    color: #3d403b;
}

.state-esperando-aprobacion {
    background: #e6eef8;
    border-left-color: #4d74a6;
    color: #284c78;
}

.zoom-toolbar {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.zoom-toolbar button {
    align-items: center;
    display: inline-flex;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    width: 38px;
}

.zoom-toolbar span {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 800;
    min-width: 86px;
    padding: 8px 10px;
    text-align: center;
}

.gantt-block.selected {
    border: 0;
    box-shadow: none;
    z-index: 2;
}

.gantt-block.selected .gantt-card {
    border-color: #1f2937;
    box-shadow: 0 0 0 2px rgba(31, 41, 55, 0.18);
}

.gantt-block.dragging .gantt-card {
    opacity: 0.62;
    outline: 2px dashed rgba(31, 41, 55, 0.35);
}

.gantt-drag-ghost {
    background: rgba(17, 24, 39, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    color: #fff;
    display: grid;
    gap: 4px;
    max-width: 210px;
    padding: 8px 10px;
    pointer-events: none;
    position: fixed;
    top: -1000px;
    left: -1000px;
    z-index: 9999;
}

.gantt-drag-ghost strong {
    font-size: 12px;
    line-height: 1.2;
}

.gantt-drag-ghost span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-toolbar {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
}

.bulk-toolbar span {
    color: var(--muted);
    font-weight: 800;
    margin-right: 6px;
}

.bulk-toolbar input {
    width: 72px;
}
.gantt-bulk-hours-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.bulk-toolbar select {
    width: 160px;
}

.bulk-toolbar button {
    width: auto;
}

.selection-box {
    background: rgba(24, 24, 24, 0.04);
    border: 1px dashed rgba(24, 24, 24, 0.35);
    pointer-events: none;
    position: absolute;
    z-index: 20;
}

.shot-drawer {
    background: #fff;
    border-left: 1px solid var(--line-dark);
    bottom: 0;
    box-shadow: -10px 0 28px rgba(0, 0, 0, 0.12);
    overflow: auto;
    padding: 14px;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(104%);
    transition: transform 160ms ease;
    width: min(390px, 92vw);
    z-index: 30;
}

.shot-drawer.open {
    transform: translateX(0);
}

.drawer-close {
    background: #2f312e;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    height: 26px;
    line-height: 1;
    margin: 0 0 10px;
    padding: 0;
    width: 26px;
}

.compact-heading {
    gap: 8px;
    margin-bottom: 8px;
}

.compact-heading h2 {
    font-size: 22px;
}

.shot-detail-panel[hidden] {
    display: none;
}

.drawer-thumb {
    align-items: center;
    background: #eeeeea;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    height: 132px;
    justify-content: center;
    margin: 8px 0;
    object-fit: cover;
    width: 100%;
}

.detail-list {
    display: grid;
    gap: 8px;
    grid-template-columns: 112px minmax(0, 1fr);
}

.detail-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
}

.mini-list {
    display: grid;
    gap: 6px;
    margin: 10px 0 14px;
}

.mini-list span,
.pipe-step {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    padding: 7px;
}

.pipeline-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pipe-aprobado,
.pipe-entregado {
    background: #dfefd9;
    border-color: #b9d5b6;
}

.pipe-en-proceso,
.pipe-en-revision {
    background: #fff2c8;
    border-color: #e2c56f;
}

.button-link {
    align-items: center;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    text-decoration: none;
    width: auto;
}

.sequence-actions select,
.sequence-actions input {
    width: auto;
}

.sequence-shot-card.state-en-proceso,
.gantt-block.state-en-proceso {
    background: #fff4cc;
    border-color: #dec66f;
}

.sequence-shot-card.state-en-revision,
.gantt-block.state-en-revision {
    background: #dcebf7;
    border-color: #9fc4df;
}

.sequence-shot-card.state-ready-to-comp,
.gantt-block.state-ready-to-comp {
    background: #eadcf8;
    border-color: #b994dc;
    color: #4d2776;
}

.sequence-shot-card.state-aprobado,
.sequence-shot-card.state-entregado,
.gantt-block.state-aprobado,
.gantt-block.state-entregado {
    background: #dfefd9;
    border-color: #aacd9f;
}

.pool-card {
    background: #f1f0eb;
    border-color: #ddd8cc;
}

.asset-dot {
    border-radius: 999px;
    display: inline-block;
    height: 11px;
    margin-left: 6px;
    width: 11px;
}

.asset-label {
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    margin-top: 4px;
    padding: 3px 6px;
}

.asset-none,
.asset-dot.asset-none,
.asset-label.asset-none {
    background: #eceae3;
    border-color: #d8d2c3;
}

.asset-layout,
.asset-dot.asset-layout,
.asset-label.asset-layout {
    background: #f4d9e3;
    border-color: #db9bb2;
}

.asset-complete,
.asset-dot.asset-complete,
.asset-label.asset-complete {
    background: #d8e8f4;
    border-color: #93b9d6;
}

.gantt-drop.drop-swap {
    box-shadow: inset 0 2px 0 rgba(24, 24, 24, 0.22);
}

.gantt-drop.drop-append {
    box-shadow: inset 0 -2px 0 rgba(24, 24, 24, 0.22);
}

.shot-detail-form {
    display: grid;
    gap: 8px;
}

.detail-grid,
.asset-checks {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
}

.detail-grid label,
.asset-checks label {
    color: var(--muted);
    display: grid;
    font-size: 11px;
    font-weight: 900;
    gap: 3px;
    text-transform: uppercase;
}

.detail-grid input,
.detail-grid select,
.asset-checks select {
    min-height: 32px;
    padding: 7px 8px;
}

.wide-field {
    grid-column: 1 / -1;
}

.compact-extra {
    display: none !important;
}

.compact-section {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 7px 9px;
}

.compact-section summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.compact-section .asset-checks,
.compact-section .mini-list {
    margin-top: 8px;
}

.compact-title {
    font-size: 14px;
    margin: 2px 0 0;
}

.pipeline-progress {
    display: grid;
    gap: 5px;
}

.pipeline-progress-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.pipeline-progress-meta span {
    color: var(--text);
}

.pipeline-progress-track {
    background: #e5e2da;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.pipeline-progress-track span {
    background: #2f8f54;
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0;
    transition: width 140ms ease;
}

.pipeline-list {
    display: grid;
    gap: 4px;
}

.compact-help {
    color: var(--muted);
    font-size: 12px;
    margin: 4px 0 10px;
}

.pipeline-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 8px 0;
    overflow: hidden;
}

.pipeline-sections {
    display: flex;
    flex-direction: column;
}

.pipeline-sections.mode-Arte [data-pipeline-section="Arte"] { order: 1; }
.pipeline-sections.mode-Arte [data-pipeline-section="Animacion"] { order: 2; }

.pipeline-section > summary {
    background: var(--panel-soft);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    padding: 9px 10px;
}

.pipeline-section[open] > summary {
    border-bottom: 1px solid var(--line);
}

.pipeline-section > .stage-authorship-list,
.pipeline-section > .art-asset-list,
.pipeline-section > .compact-title,
.pipeline-section > .compact-section {
    margin-left: 9px;
    margin-right: 9px;
}

.pipeline-section > .stage-authorship-list {
    margin-top: 9px;
}

.stage-authorship-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.stage-authorship-row {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 9px;
}

.stage-authorship-row.author-pending {
    border-color: #d79524;
    box-shadow: inset 3px 0 #d79524;
}

.stage-authorship-title {
    display: grid;
    gap: 1px;
    grid-column: 1 / -1;
}

.stage-authorship-row select,
.stage-authorship-row input { min-width: 0; width: 100%; }

.stage-approval-datetime,
.asset-approval-datetime {
    display: grid;
    gap: 5px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.stage-authorship-title strong { font-size: 14px; }
.stage-authorship-title span,
.stage-authorship-title small,
.stage-origin { color: var(--muted); font-size: 11px; }

.stage-origin,
.stage-suggestion,
.stage-rework-history {
    grid-column: 1 / -1;
}

.stage-save-feedback {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    min-height: 16px;
}
.stage-save-feedback[data-state="saving"] { color: #8a6418; }
.stage-save-feedback[data-state="ok"] { color: #2f6941; }
.stage-save-feedback[data-state="error"] { color: #9f2923; }

.stage-suggestion {
    background: #fff7df;
    border: 1px dashed #d79524;
    color: #6d4a09;
    justify-self: start;
    padding: 6px 9px;
}

.stage-rework-history span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    padding-top: 4px;
}

.required-field {
    border-color: #cf3f36 !important;
    box-shadow: 0 0 0 2px rgba(207, 63, 54, 0.12);
}


.pipe-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 118px;
    min-height: 34px;
    padding: 5px 7px;
}

.pipe-row span {
    align-items: baseline;
    display: flex;
    font-size: 12px;
    gap: 5px;
    min-width: 0;
}

.pipe-row strong {
    font-size: 12px;
    min-width: 45px;
}

.pipe-row select {
    min-height: 28px;
    padding: 5px 7px;
}

.pipe-listo {
    background: #dfefd9;
    border-color: #aacd9f;
}

.drawer-save {
    position: static;
    width: 100%;
}

.pipe-no-iniciado {
    background: #efede7;
}

.pipe-en-proceso {
    background: #fff2c8;
    border-color: #e2c56f;
}

.pipe-en-revision {
    background: #dcebf7;
    border-color: #9fc4df;
}

.pipe-aprobado,
.pipe-entregado {
    background: #dfefd9;
    border-color: #aacd9f;
}

.art-asset-list {
    display: grid;
    gap: 5px;
}

.art-asset-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(110px, .8fr);
    min-height: 34px;
    padding: 5px 7px;
}

.art-asset-row .art-asset-name {
    align-items: center;
    color: var(--text);
    display: flex;
    font-size: 12px;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.art-asset-row strong {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 10px;
    min-width: 38px;
    padding: 3px 6px;
    text-align: center;
}

.art-asset-row em {
    background: #ece9e1;
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    padding: 3px 6px;
}

.art-asset-row select {
    min-height: 28px;
    padding: 5px 7px;
}

.art-asset-row > [data-art-asset-notes] {
    grid-column: 1 / -1;
    min-height: 30px;
}

.art-asset-row > [data-save-art-asset] {
    justify-self: end;
}

.asset-status-history {
    grid-column: 1 / -1;
}

.asset-status-history span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    padding-top: 4px;
}

.asset-state-no-aplica {
    background: #f2f0ea;
}

.asset-state-no-iniciado {
    background: #efede7;
}

.asset-state-en-proceso {
    background: #fff3c9;
    border-color: #dfbf55;
}

.asset-state-en-revision {
    background: #dcebf7;
    border-color: #9fc4df;
}

.asset-state-pausado {
    background: #e7dedd;
    border-color: #aa7772;
}

.asset-state-aprobado,
.asset-state-listo {
    background: #dfefd9;
    border-color: #aacd9f;
}

.art-asset-form {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 7px;
}

.art-asset-form input,
.art-asset-form select {
    min-height: 30px;
    padding: 6px 8px;
}

.art-asset-form [name="asset_name"],
.art-asset-form [name="notes"],
.art-asset-form button,
.art-asset-form .save-feedback {
    grid-column: 1 / -1;
}

.art-asset-form button {
    background: var(--ink);
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    min-height: 32px;
}

.sequence-card summary {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.sequence-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
}

.sequence-actions span {
    color: var(--muted);
    font-weight: 800;
}

.sequence-preview {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding: 10px 14px 14px;
}

.sequence-preview[hidden] {
    display: none;
}

.advanced-table {
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 10px;
}

.batch-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 8px 0;
}

.batch-actions .save-feedback {
    min-width: 140px;
    text-align: right;
}

.advanced-table summary {
    cursor: pointer;
    font-weight: 800;
    margin-bottom: 10px;
}

.sequence-shot-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
}

.sequence-shot-card,
.sequence-shot-card.state-pendiente,
.sequence-shot-card.state-sin-asignar,
.sequence-shot-card.state-no-iniciado,
.gantt-block.state-pendiente,
.gantt-block.state-sin-asignar,
.gantt-block.state-no-iniciado {
    background: #f1f0eb;
    border-color: #d8d4c9;
    color: #343832;
}

.status-sin-asignar,
.status-no-iniciado {
    background: #eeeeea;
    color: #53564f;
}

.status-en-proceso {
    background: #fff4cc;
    color: #6f5612;
}

.thumb-drop {
    background: #e9e7df;
    border: 1px dashed #c9c2b4;
    border-radius: 6px;
    display: grid;
    min-height: 96px;
    overflow: hidden;
    place-items: center;
}

.thumb-drop img {
    height: 100%;
}

.add-thumb {
    align-items: center;
    color: #5f625b;
    display: flex;
    font-weight: 900;
    justify-content: center;
    min-height: 96px;
}

.thumb-hover {
    background: rgba(0, 0, 0, 0.62);
    border-radius: 5px;
    bottom: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    left: 6px;
    opacity: 0;
    padding: 4px 6px;
    pointer-events: none;
    position: absolute;
    transition: opacity 120ms ease;
}

.thumb-drop:hover .thumb-hover {
    opacity: 1;
}

.quick-plan {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 6px;
}

/* Final state color contract shared by Secuencias and Gantt. */
.sequence-shot-card,
.sequence-shot-card.asset-layout,
.sequence-shot-card.asset-complete,
.sequence-shot-card.asset-none,
.gantt-block.state-pendiente,
.gantt-block.state-sin-asignar,
.gantt-block.state-no-iniciado {
    background: #f1f0eb;
    border-color: #d8d4c9;
    color: #343832;
}

.sequence-shot-card.state-en-proceso,
.gantt-block.state-en-proceso {
    background: #fff4cc;
    border-color: #dec66f;
    color: #4d3f14;
}

.sequence-shot-card.state-en-revision,
.gantt-block.state-en-revision {
    background: #dcebf7;
    border-color: #9fc4df;
    color: #254864;
}

.sequence-shot-card.state-ready-to-comp,
.gantt-block.state-ready-to-comp {
    background: #eadcf8;
    border-color: #b994dc;
    color: #4d2776;
}

.sequence-shot-card.state-aprobado,
.sequence-shot-card.state-completado,
.sequence-shot-card.state-entregado,
.gantt-block.state-aprobado,
.gantt-block.state-completado,
.gantt-block.state-entregado {
    background: #dfefd9;
    border-color: #aacd9f;
    color: #285437;
}

.sequence-shot-card.state-archived,
.sequence-shot-card.state-eliminado,
.sequence-shot-card.state-archived-eliminado {
    background: #e2e0da;
    border-color: #c5c0b5;
    color: #77736b;
    opacity: 0.72;
}

/* The draggable Gantt shell is only for layout/drag math; the visible state lives on .gantt-card. */
.gantt-block,
.gantt-block.state-pendiente,
.gantt-block.state-sin-asignar,
.gantt-block.state-no-iniciado,
.gantt-block.state-en-proceso,
.gantt-block.state-en-revision,
.gantt-block.state-ready-to-comp,
.gantt-block.state-aprobado,
.gantt-block.state-completado,
.gantt-block.state-entregado {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.gantt-block.state-pendiente .gantt-card,
.gantt-block.state-sin-asignar .gantt-card,
.gantt-block.state-no-iniciado .gantt-card {
    background: #f1f0eb;
    border-color: #d8d4c9;
    color: #343832;
}

.gantt-block.state-en-proceso .gantt-card {
    background: #fff4cc;
    border-color: #dec66f;
    color: #4d3f14;
}

.gantt-block.state-en-revision .gantt-card {
    background: #dcebf7;
    border-color: #9fc4df;
    color: #254864;
}

.gantt-block.state-ready-to-comp .gantt-card {
    background: #eadcf8;
    border-color: #b994dc;
    color: #4d2776;
}

.gantt-block.state-aprobado .gantt-card,
.gantt-block.state-completado .gantt-card,
.gantt-block.state-entregado .gantt-card {
    background: #dfefd9;
    border-color: #aacd9f;
    color: #285437;
}

.sequence-preview .mini-video {
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: min(100%, 480px);
    width: 480px;
}

.dept-arte {
    background: #f4ecde;
    border-color: #dfcdae;
    color: #694b1e;
}

.dept-produccion {
    background: #e8edf4;
    border-color: #c8d2e2;
    color: #334d74;
}

.gantt-block.dept-animacion,
.gantt-block.dept-arte,
.gantt-block.dept-produccion {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.overloaded {
    background: #fbfaf6;
    box-shadow: none;
}

.import-box {
    display: grid;
    gap: 12px;
}

.import-workflow {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.import-upload-form,
.import-preview-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.import-preview-toolbar {
    justify-content: space-between;
}

.import-preview-toolbar > div {
    display: grid;
    gap: 2px;
}

.import-preview-toolbar span,
.import-preview-table small,
.muted {
    color: #6f746d;
    font-size: 0.85rem;
}

.import-preview-table-wrap {
    overflow-x: auto;
}

.import-preview-table {
    border-collapse: collapse;
    min-width: 860px;
    width: 100%;
}

.import-preview-table th,
.import-preview-table td {
    border-bottom: 1px solid #e1ded5;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.import-preview-table th {
    background: #f5f3ec;
    color: #343832;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.import-preview-table tr.has-duplicates {
    background: #fff8df;
}

.chip.warn {
    background: #f6d782;
    color: #4d3f14;
}

/* Official general status colors: card/table/gantt share the same visual contract. */
.sequence-shot-card.state-no-iniciado,
.shot-row.state-no-iniciado,
.gantt-block.state-no-iniciado .gantt-card {
    background: #f1f0eb;
    border-color: #d8d4c9;
    color: #343832;
}

.sequence-shot-card.state-en-proceso,
.shot-row.state-en-proceso,
.gantt-block.state-en-proceso .gantt-card {
    background: #fff4cc;
    border-color: #dec66f;
    color: #4d3f14;
}

.sequence-shot-card.state-en-revision,
.shot-row.state-en-revision,
.gantt-block.state-en-revision .gantt-card {
    background: #dcebf7;
    border-color: #9fc4df;
    color: #254864;
}

.sequence-shot-card.state-aprobado,
.shot-row.state-aprobado,
.gantt-block.state-aprobado .gantt-card {
    background: #dfefd9;
    border-color: #aacd9f;
    color: #285437;
}

.sequence-shot-card.state-entregado,
.shot-row.state-entregado,
.gantt-block.state-entregado .gantt-card {
    background: #cde8c6;
    border-color: #75ad6d;
    color: #1f4f2e;
}

.shots-overview-table .mini-pipeline {
    min-width: 88px;
}

.tracking-sequences {
    display: grid;
    gap: 14px;
}

.tracking-sequence {
    background: #fff;
}

.tracking-sequence > .tracking-sequence-head {
    align-items: center;
    background: #fbfaf6;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 10px;
    list-style: none;
    min-height: 58px;
    padding: 8px 12px;
    user-select: none;
}

.tracking-sequence-head::marker { content: ""; }
.tracking-sequence-head::-webkit-details-marker { display: none; }

.tracking-sequence-head h3 {
    font-size: 16px;
    margin: 0 0 2px;
}

.tracking-sequence-head span {
    color: var(--muted);
    font-weight: 800;
}

.tracking-sequence-title {
    align-items: center;
    display: flex;
    flex: 0 0 190px;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
}

.tracking-sequence-title > span {
    min-width: 0;
}

.tracking-sequence-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    flex: 1 1 auto;
    gap: 5px 8px;
    justify-content: flex-end;
    min-width: 0;
}

.tracking-sequence-controls .sequence-mode-switch { flex: 0 0 auto; }
.tracking-sequence-controls .sequence-pipeline-legend { flex: 0 1 auto; }

.tracking-sequence:not([open]) .tracking-sequence-head {
    border-bottom: 0;
}

.tracking-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.tracking-summary span,
.tracking-summary a,
.tracking-summary strong {
    background: #f0eee8;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    padding: 4px 7px;
    white-space: nowrap;
}

.tracking-sequence > .progress-line { height: 4px; }

.tracking-summary a {
    color: inherit;
    text-decoration: none;
}

.tracking-summary a:hover,
.tracking-summary a.active {
    background: #151515;
    border-color: #151515;
    color: #fff;
}

.tracking-bulk-bar {
    align-items: center;
    background: rgba(244, 242, 235, 0.96);
    border: 1px solid #c9c5ba;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(42, 38, 28, 0.12);
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 8px 0;
    overflow-x: auto;
    padding: 5px 7px;
    position: sticky;
    top: 8px;
    z-index: 30;
}

.tracking-bulk-bar.has-selection {
    left: 254px;
    margin: 0;
    position: fixed;
    right: 22px;
    top: 84px;
    z-index: 80;
}

.tracking-bulk-bar strong {
    font-size: 11px;
    min-width: max-content;
    text-transform: uppercase;
}

.tracking-bulk-bar select,
.tracking-bulk-bar button {
    border-radius: 999px;
    font-size: 11px;
    min-height: 26px;
    padding-bottom: 2px;
    padding-top: 2px;
}

.tracking-bulk-bar select {
    max-width: 128px;
}

.tracking-bulk-bar .save-feedback {
    font-size: 11px;
    min-width: max-content;
}

.tracking-shot-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    padding: 10px;
}

.sequence-view-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.sequence-view-actions button,
.sequence-view-actions a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    padding: 8px 10px;
    text-decoration: none;
}

.sequence-view-actions button:hover,
.sequence-view-actions a:hover {
    border-color: #151515;
}

.tracking-shot-card.state-eliminado {
    opacity: 0.72;
}

.tracking-shot-card.state-eliminado .tracking-thumb {
    filter: grayscale(1);
}

.tracking-shot-card {
    background: #f1f0eb;
    border: 1px solid #d8d4c9;
    border-left-width: 5px;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    padding: 8px;
}

.tracking-thumb {
    aspect-ratio: 16 / 7;
    background: #dfddd6;
    border-radius: 6px;
    overflow: hidden;
}

.tracking-thumb.thumb-drop {
    align-self: stretch;
    aspect-ratio: 16 / 7;
    box-sizing: border-box;
    contain: paint;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: auto;
    inline-size: 100%;
    justify-self: stretch;
    max-inline-size: 100%;
    min-block-size: 0;
    min-height: 0;
    min-inline-size: 0;
    min-width: 0;
    overflow: hidden;
    place-items: stretch;
    width: 100%;
}

.tracking-thumb.thumb-drop > .add-thumb {
    block-size: 100%;
    box-sizing: border-box;
    font-size: 0.78rem;
    grid-area: 1 / 1;
    height: 100%;
    inline-size: 100%;
    max-block-size: 100%;
    max-inline-size: 100%;
    min-block-size: 0;
    min-height: 0;
    min-inline-size: 0;
    overflow: hidden;
    width: 100%;
}

.tracking-thumb.thumb-drop > img {
    block-size: 100%;
    box-sizing: border-box;
    display: block;
    grid-area: 1 / 1;
    height: 100%;
    inline-size: 100%;
    max-block-size: 100%;
    max-inline-size: 100%;
    min-block-size: 0;
    min-inline-size: 0;
    object-fit: cover;
    width: 100%;
}

.tracking-thumb.thumb-drop > input[type="file"] {
    grid-area: 1 / 1;
}

.tracking-thumb.thumb-drop > .thumb-hover {
    z-index: 2;
}

.tracking-shot-main,
.tracking-meta {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    min-width: 0;
}

.tracking-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.tracking-meta > .tracking-stage-select:not(.tracking-condition-select) {
    flex: 1 0 calc(50% - 3px);
    max-width: none;
    min-width: 0;
}

.gantt-mode-animacion .tracking-meta > .tracking-stage-select:not(.tracking-condition-select) {
    flex-basis: 100%;
}

.tracking-meta > .tracking-status-control {
    margin-left: 0;
    order: 2;
}

.tracking-meta > .tracking-condition-select {
    box-sizing: border-box;
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
    order: 1;
    width: auto;
}

.tracking-shot-main strong {
    font-size: 16px;
}

.tracking-talent {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracking-shot-card .status-pill {
    font-size: 10px;
    padding: 4px 6px;
}

.sequence-shot-card,
.tracking-shot-card {
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

.sequence-shot-card img,
.tracking-shot-card img {
    -webkit-user-drag: none;
    user-select: none;
}

.sequence-shot-card.is-flagged::after,
.tracking-shot-card.is-flagged::after {
    background: #cf3f38;
    border-radius: 999px;
    bottom: 0;
    content: "";
    height: 4px;
    left: 10px;
    position: absolute;
    right: 10px;
}

.shot-flag-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    height: 24px;
    justify-content: center;
    padding: 2px;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 22px;
    z-index: 8;
}

.shot-flag-button svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
    height: 21px;
    width: 16px;
}

.shot-flag-button path {
    fill: #d7d5cf;
    stroke: rgba(0, 0, 0, 0.18);
    stroke-width: 1.4;
    transition: fill 120ms ease, stroke 120ms ease, transform 120ms ease;
}

.shot-flag-button:hover path {
    fill: #bebbb2;
}

.shot-flag-button.active path {
    fill: #e53935;
    stroke: #e53935;
}

.shot-flag-button.active:hover path {
    fill: #cf3f38;
    stroke: #cf3f38;
}

.shot-flag-button:focus-visible {
    outline: 2px solid #1f6feb;
    outline-offset: 2px;
}

.art-summary-card {
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.tracking-shot-card.art-summary-none {
    background: #f2f0ea;
    border-left-color: #b9b6ad;
}

.tracking-shot-card.art-summary-partial {
    background: #e7f2fb;
    border-color: #bdd7ea;
    border-left-color: #5b9bc9;
}

.tracking-shot-card.art-summary-complete {
    background: #e2f1df;
    border-color: #b7d4ae;
    border-left-color: #4da15c;
}

.tracking-shot-card.is-retake {
    background: #f3a6a0;
    border-color: #a92f28;
    border-left-color: #7f1f1a;
    border-left-width: 8px;
    box-shadow: 0 0 0 2px rgba(169, 47, 40, 0.32), 0 8px 20px rgba(169, 47, 40, 0.18);
}

.tracking-shot-card.is-retake .tracking-thumb {
    background: #d8635a;
    border: 1px solid rgba(127, 31, 26, 0.28);
}

.tracking-shot-card.is-retake .tracking-stage-select {
    background: #fff0ee;
    border-color: #7f1f1a;
    color: #7f1f1a;
}

.mini-pipeline .pipe-no-iniciado {
    background: #e5e2d8;
    border-color: #beb9aa;
}

.mini-pipeline .pipe-en-proceso {
    background: #e2bd48;
    border-color: #a97912;
}

.mini-pipeline .pipe-aprobado,
.mini-pipeline .pipe-entregado,
.mini-pipeline .pipe-listo {
    background: #151515;
    border-color: #151515;
}

.mini-pipeline .pipe-en-revision,
.mini-pipeline .pipe-problema {
    background: #d66355;
    border-color: #9f2c24;
}

.sequence-shot-card.is-retake {
    background: #f3a6a0;
    border-color: #a92f28;
    border-left: 8px solid #7f1f1a;
    box-shadow: 0 0 0 2px rgba(169, 47, 40, 0.32), 0 8px 20px rgba(169, 47, 40, 0.18);
}

.sequence-shot-card.is-retake .thumb-drop {
    background: #d8635a;
    border-color: rgba(127, 31, 26, 0.28);
}

.sequence-shot-card.is-retake select {
    background: #fff0ee;
    border-color: #7f1f1a;
    color: #7f1f1a;
}

.retake-chip {
    align-self: start;
    background: #7f1f1a;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    justify-self: start;
    letter-spacing: 0;
    padding: 3px 7px;
}

.tracking-stage-select,
.tracking-status-select {
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    min-height: 24px;
    padding: 3px 22px 3px 7px;
}

.tracking-stage-select {
    max-width: 112px;
    min-width: 62px;
}

.tracking-status-control {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 30px;
    height: 28px;
    justify-content: center;
    position: relative;
    width: 30px;
}

.tracking-status-control:hover {
    border-color: #a6a39a;
}

.tracking-status-control .tracking-status-select {
    cursor: pointer;
    height: 100%;
    inset: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    width: 100%;
}

.status-dot {
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
    display: block;
    height: 12px;
    width: 12px;
}

.status-dot-no-iniciado { background: #b9b7ae; }
.status-dot-en-proceso { background: #e2bd48; }
.status-dot-en-revision { background: #df8a33; }
.status-dot-aprobado { background: #66a96a; }
.status-dot-entregado { background: #8061ba; }
.status-dot-eliminado { background: #74706a; }

.sequence-pipeline-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.dept-arte .sequence-pipeline-legend,
.gantt-mode-arte .sequence-pipeline-legend {
    display: none !important;
}

.sequence-pipeline-legend span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    gap: 4px;
}

.sequence-pipeline-legend i {
    background: #c8c6bd;
    border-radius: 999px;
    display: inline-block;
    height: 7px;
    width: 7px;
}

.sequence-pipeline-legend span:nth-child(1) i { background: #e3b13a; }
.sequence-pipeline-legend span:nth-child(2) i { background: #e1a743; }
.sequence-pipeline-legend span:nth-child(3) i { background: #ad8bd4; }
.sequence-pipeline-legend span:nth-child(4) i { background: #8f6bc4; }
.sequence-pipeline-legend span:nth-child(5) i { background: #d65c91; }
.sequence-pipeline-legend span:nth-child(6) i { background: #679ed0; }
.sequence-pipeline-legend span:nth-child(7) i { background: #55b9b3; }
.sequence-pipeline-legend span:nth-child(8) i { background: #6876c4; }
.sequence-pipeline-legend span:nth-child(9) i { background: #4b9b58; }

.tracking-art-line {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.art-asset-panel {
    background: #f2f0ea;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}

.art-asset-panel span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.drawer-flag-button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    min-height: 34px;
}

.drawer-flag-button.active {
    background: #f4d7d3;
    border-color: #cf3f38;
    color: #7f241f;
}

.tracking-plan-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tracking-plan-badges span {
    background: #151515;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 7px;
}

.stage-card-none,
.stage-card-- { border-left-color: #9a9d94; }
.stage-card-blk { border-left-color: var(--stage-blk-border); background: var(--stage-blk-bg); }
.stage-card-ib { border-left-color: var(--stage-ib-border); background: var(--stage-ib-bg); }
.stage-card-td { border-left-color: var(--stage-td-border); background: var(--stage-td-bg); }
.stage-card-rough { border-left-color: #b29d74; background: #f2ecdc; }
.stage-card-fx { border-left-color: var(--stage-fx-border); background: var(--stage-fx-bg); }
.stage-card-clu { border-left-color: var(--stage-clu-border); background: var(--stage-clu-bg); }
.stage-card-col { border-left-color: var(--stage-col-border); background: var(--stage-col-bg); }
.stage-card-ready-to-comp { border-left-color: #7d91aa; background: #e0e7ee; }
.stage-card-comp { border-left-color: var(--stage-comp-border); background: var(--stage-comp-bg); }
.stage-card-retake,
.stage-card-rev { border-left-color: #ce5c52; background: #f8dfdc; }
.stage-card-export { border-left-color: var(--stage-export-border); background: var(--stage-export-bg); }

.tracking-shot-card.art-summary-none {
    background: #f2f0ea;
    border-color: #dedbd2;
    border-left-color: #b9b6ad;
}

.tracking-shot-card.art-summary-partial {
    background: #e7f2fb;
    border-color: #bdd7ea;
    border-left-color: #5b9bc9;
}

.tracking-shot-card.art-summary-complete {
    background: #e2f1df;
    border-color: #b7d4ae;
    border-left-color: #4da15c;
}

.tracking-shot-card.art-type-pln { background: #f2f0ea; border-color: #d6d2c7; border-left-color: #8f948a; }
.tracking-shot-card.art-type-map { background: #e7f0ed; border-color: #bad4ca; border-left-color: #5f9d8a; }
.tracking-shot-card.art-type-lay { background: #e7f2fb; border-color: #bdd7ea; border-left-color: #5b9bc9; }
.tracking-shot-card.art-type-cs { background: #efe7f6; border-color: #d4bce5; border-left-color: #9c6bc6; }
.tracking-shot-card.art-type-chs { background: #f5e7ec; border-color: #e0b8c6; border-left-color: #c45d83; }
.tracking-shot-card.art-type-prop { background: #f5ecd9; border-color: #dfc993; border-left-color: #bf8f2e; }
.tracking-shot-card.art-type-exs { background: #e9eef6; border-color: #c1cee1; border-left-color: #6e84ad; }
.tracking-shot-card.art-type-tps { background: #e9f1dd; border-color: #c7d9a5; border-left-color: #7fa14e; }
.tracking-shot-card.art-type-ce { background: #f4e6df; border-color: #dfb8a8; border-left-color: #c47555; }
.tracking-shot-card.art-type-bg { background: #e2f1df; border-color: #b7d4ae; border-left-color: #4da15c; }

.tracking-shot-card.is-retake {
    background: #f3a6a0;
    border-color: #a92f28;
    border-left-color: #7f1f1a;
    border-left-width: 8px;
    box-shadow: 0 0 0 2px rgba(169, 47, 40, 0.32), 0 8px 20px rgba(169, 47, 40, 0.18);
}

.tracking-shot-card.is-retake .tracking-thumb {
    background: #d8635a;
    border: 1px solid rgba(127, 31, 26, 0.28);
}

.tracking-shot-card.is-retake .tracking-stage-select {
    background: #fff0ee;
    border-color: #7f1f1a;
    color: #7f1f1a;
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .side-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filters,
    .form-row,
    .form-row.compact,
    .sequence-entry,
    .shot-entry,
    .task-entry,
    .assignment-entry,
    .gantt-shell,
    .report-grid,
    .dashboard {
        grid-template-columns: 1fr;
    }
    .calendar-head,
    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tracking-bulk-bar.has-selection {
        left: 12px;
        right: 12px;
        top: 8px;
    }
}

/* Stable compact Gantt */
.gantt-shell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.task-pool {
    flex: 0 0 280px;
    min-width: 0;
    max-height: calc(100vh - 180px);
    overflow: hidden;
    transition: flex-basis 160ms ease;
}

.task-pool:not([open]) {
    flex-basis: 48px;
    padding: 10px 8px;
}

.task-pool > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    min-height: 28px;
}

.task-pool > summary::-webkit-details-marker { display: none; }
.task-pool:not([open]) > summary strong { display: none; }
.task-pool:not([open]) > summary span { margin: auto; }
.task-pool .pool-list { max-height: calc(100vh - 245px); overflow: auto; margin-top: 10px; }
.task-pool .pool-card { cursor: grab; touch-action: none; }

.pending-bulk-toolbar,
.gantt-selection-toolbar {
    align-items: center;
    background: #f8f7f3;
    border: 1px solid #d7d3ca;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 6px;
}
.pending-bulk-toolbar {
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) repeat(4, 32px);
}
.pending-bulk-toolbar > span {
    font-size: 12px;
    min-width: 0;
    white-space: nowrap;
}
.pending-bulk-toolbar button,
.gantt-selection-toolbar button,
.gantt-selection-toolbar select { min-height: 30px; padding: 5px 8px; width: auto; }
.pending-bulk-toolbar .pending-icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid #bdb9b0;
    border-radius: 7px;
    color: #171717;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-height: 32px;
    padding: 0;
    width: 32px;
}
.pending-bulk-toolbar .pending-icon-button:hover,
.pending-bulk-toolbar .pending-icon-button:focus-visible {
    border-color: #171717;
    box-shadow: 0 0 0 2px rgba(23, 23, 23, .14);
}
.pending-bulk-toolbar .pending-icon-button:disabled {
    background: #eceae4;
    border-color: #d7d3ca;
    color: #9b9890;
    cursor: not-allowed;
    opacity: .65;
}
.pending-bulk-toolbar .pending-icon-button-danger:not(:disabled) {
    border-color: #b43b36;
    color: #8f211d;
}
.pending-bulk-toolbar .pending-icon-button-danger:not(:disabled):hover,
.pending-bulk-toolbar .pending-icon-button-danger:not(:disabled):focus-visible {
    background: #fff1ef;
    border-color: #8f211d;
}
.pending-icon-button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}
.gantt-selection-toolbar { position: sticky; top: 76px; z-index: 30; }
.gantt-selection-toolbar[hidden] { display: none; }
.gantt-selection-toolbar.has-selection { border-color: #222; box-shadow: 0 2px 9px rgba(0, 0, 0, .12); }
.gantt-block.pending-remove { opacity: .5; pointer-events: none; }
.pending-select { align-items: center; display: inline-flex; left: 6px; position: absolute; top: 6px; z-index: 3; }
.pending-select input { height: 18px; margin: 0; width: 18px; }
.pool-card { position: relative; }
.pool-card.pending-selected { border-color: #171717; box-shadow: inset 0 0 0 2px #171717; }

.timeline { flex: 1 1 auto; min-width: 0; }

.gantt-view-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.week-navigation {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}
.week-navigation .gantt-icon-button {
    flex: 0 0 36px;
    text-decoration: none;
}
.week-navigation .ghost-button { white-space: nowrap; }

.gantt-view-toolbar input[type="search"] { min-width: 150px; flex: 1 1 150px; }
.gantt-view-toolbar > button,
.gantt-view-toolbar > select { width: auto; max-width: 190px; }
.gantt-view-toolbar .zoom-toolbar { margin: 0; }
.gantt-view-toolbar .zoom-toolbar button {
    width: auto;
    min-width: 46px;
    padding: 0 10px;
    background: #fff;
    border-color: #bdb9b0;
    color: #3c3a36;
    font-size: 12px;
}
.gantt-view-toolbar .zoom-toolbar button.active { background: #171717; color: #fff; }
.compact-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.gantt-view-options {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}
.gantt-history-controls {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}
.gantt-edit-controls {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}
.gantt-edit-controls .gantt-icon-button,
.gantt-history-controls .gantt-icon-button {
    flex: 0 0 36px;
    position: relative;
    width: 36px;
}
.gantt-history-count {
    align-items: center;
    background: #171717;
    border: 1px solid #fff;
    border-radius: 9px;
    color: #fff;
    display: flex;
    font-size: 8px;
    font-weight: 900;
    height: 15px;
    justify-content: center;
    line-height: 1;
    min-width: 15px;
    padding: 0 3px;
    pointer-events: none;
    position: absolute;
    right: -5px;
    top: -5px;
}
.gantt-icon-button:disabled .gantt-history-count {
    background: #aaa69e;
}
.gantt-icon-button,
.gantt-toggle-icon > span,
.gantt-auto-retake-button {
    align-items: center;
    background: #fff;
    border: 1px solid #bdb9b0;
    color: #3c3a36;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    min-height: 36px;
    padding: 0;
    width: 36px;
}
.gantt-icon-button { border-radius: 7px; }
.gantt-view-toolbar > .gantt-icon-button,
.gantt-selection-toolbar > .gantt-icon-button,
.bulk-toolbar > .gantt-icon-button {
    min-width: 36px;
    padding: 0;
    width: 36px;
}
.gantt-toggle-icon,
.gantt-auto-retake-button { flex: 0 0 36px; }
.gantt-toggle-icon {
    display: inline-flex;
    height: 36px;
    position: relative;
    width: 36px;
}
.gantt-toggle-icon > input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.gantt-toggle-icon > span,
.gantt-auto-retake-button { border-radius: 50%; }
.gantt-toggle-icon > input:checked + span,
.gantt-auto-retake-button[aria-pressed="true"] {
    background: #171717;
    border-color: #171717;
    color: #fff;
}
.gantt-icon-button:hover:not(:disabled),
.gantt-icon-button:focus-visible,
.gantt-toggle-icon > input:focus-visible + span,
.gantt-toggle-icon:hover > span,
.gantt-auto-retake-button:hover,
.gantt-auto-retake-button:focus-visible {
    border-color: #171717;
    box-shadow: 0 0 0 2px rgba(23, 23, 23, .14);
    outline: none;
}
.gantt-icon-button:disabled {
    background: #eceae4;
    border-color: #d7d3ca;
    color: #9b9890;
    cursor: not-allowed;
    opacity: .65;
}
.gantt-icon-button-danger:not(:disabled) {
    border-color: #b43b36;
    color: #8f211d;
}
.gantt-icon-button svg,
.gantt-toggle-icon svg,
.gantt-auto-retake-button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}
.gantt-action-feedback {
    background: #171717;
    border-radius: 7px;
    bottom: 18px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    max-width: min(360px, calc(100vw - 36px));
    padding: 9px 12px;
    position: fixed;
    right: 18px;
    z-index: 90;
}
.gantt-action-feedback[hidden] { display: none; }
.gantt-advanced-tools { margin: 8px 0; border: 1px solid #dedbd2; border-radius: 9px; padding: 7px 9px; }
.gantt-advanced-tools > summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.gantt-advanced-tools[open] > summary { margin-bottom: 8px; }

.gantt-table-wrap {
    --talent-width: 164px;
    overflow: auto;
    max-height: calc(100vh - 235px);
    border: 1px solid #dedbd2;
    border-radius: 12px;
    background: #fff;
    position: relative;
    user-select: none;
}

.gantt-board {
    --day-width: 112px;
    --lane-height: 58px;
    --slots-per-day: 32;
    width: calc(var(--talent-width) + var(--day-count) * var(--day-width));
    min-width: 100%;
    position: relative;
}

.gantt-board.gantt-zoom-dia { --day-width: 320px; }
.gantt-board.gantt-zoom-fecha { --day-width: 76px; }
.gantt-board.gantt-zoom-semana { --day-width: 48px; }
.gantt-board.gantt-zoom-mes,
.gantt-board.gantt-zoom-año { --day-width: 24px; }

.gantt-board-header,
.gantt-person-row {
    display: grid;
    grid-template-columns: var(--talent-width) calc(var(--day-count) * var(--day-width));
}

.gantt-board-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #dedbd2;
}

.gantt-talent-header,
.gantt-person-heading {
    position: sticky;
    left: 0;
    z-index: 12;
    background: #f8f7f3;
    border: 0;
    border-right: 1px solid #dedbd2;
    color: #252525;
    text-align: left;
}

.gantt-talent-header { display: flex; align-items: center; padding: 0 14px; font-size: 12px; font-weight: 750; z-index: 24; }
.gantt-person-heading { padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.gantt-person-heading strong { font-size: 13px; }
.gantt-person-heading span { color: #77736a; font-size: 10px; }
.gantt-person-heading.selected-person { background: #e8efff; }

.gantt-date-header,
.gantt-person-track {
    position: relative;
    width: calc(var(--day-count) * var(--day-width));
}

.gantt-day-label,
.gantt-day {
    position: absolute;
    left: calc(var(--day-index) * var(--day-width));
    width: var(--day-width);
    top: 0;
    bottom: 0;
    border-right: 1px solid #ece9e1;
}

.gantt-day-label { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: #666; }
.gantt-day-label strong { color: #363636; }
.gantt-day-label i { color: #fff; background: #d94b4b; border-radius: 10px; padding: 2px 5px; font-style: normal; }
.gantt-day-label.is-compact-date { flex-direction: column; gap: 0; font-size: 9px; line-height: 1; }
.gantt-day-label.is-compact-date .gantt-date-number { font-size: 10px; }
.gantt-day-label.is-compact-date .gantt-month-marker { color: #77736a; font-size: 8px; margin-top: 2px; }
.gantt-day-label.is-compact-date.today-col .gantt-date-number { padding: 3px 5px; border-radius: 10px; background: #d94b4b; color: #fff; }
.gantt-day.weekend-col,
.gantt-day-label.weekend-col { background: repeating-linear-gradient(135deg, #f4f3ef, #f4f3ef 5px, #faf9f6 5px, #faf9f6 10px); }
.gantt-day.today-col { box-shadow: inset 2px 0 #dd4b4b; }
.gantt-day.off-day { background-color: rgba(80, 80, 80, 0.045); }
.gantt-day.extra-day {
    background: repeating-linear-gradient(135deg, rgba(75, 143, 91, .13), rgba(75, 143, 91, .13) 5px, rgba(238, 247, 237, .7) 5px, rgba(238, 247, 237, .7) 10px);
    box-shadow: inset 0 0 0 1px rgba(75, 143, 91, .22);
}

.gantt-day.absence-day {
    background-color: rgba(197, 66, 56, 0.1);
    background-image: repeating-linear-gradient(135deg, rgba(197, 66, 56, 0.12) 0 5px, transparent 5px 11px);
}

.gantt-absence-badge {
    background: #fff0ee;
    border: 1px solid #d56a62;
    border-radius: 999px;
    color: #8e2923;
    font-size: 9px;
    font-weight: 850;
    left: calc(var(--day-index) * var(--day-width) + 3px);
    min-height: 14px;
    overflow: hidden;
    padding: 2px 5px;
    pointer-events: none;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
    bottom: 1px;
    width: calc(var(--day-width) - 6px);
    z-index: 5;
}
.gantt-board.weekends-hidden [data-weekend="1"] { visibility: hidden; }

.gantt-person-row { border-bottom: 1px solid #e7e4dc; }
.gantt-person-track {
    height: calc(max(1, var(--lane-count)) * var(--lane-height) + 14px);
    min-height: 66px;
    background: #fff;
    overflow: hidden;
    touch-action: none;
}

.gantt-lane-bands,
.gantt-grid-background { position: absolute; inset: 0; }
.gantt-lane-bands { z-index: 0; }
.gantt-grid-background { pointer-events: none; z-index: 1; }
.gantt-lane-band {
    bottom: auto;
    height: var(--lane-height);
    left: 0;
    position: absolute;
    right: 0;
    top: calc(var(--lane) * var(--lane-height));
}
.gantt-lane-band.official-lane { background: rgba(255, 255, 255, .88); }
.gantt-lane-band.parallel-lane {
    background: rgba(246, 245, 241, .74);
    border-top: 2px dashed #c8c4ba;
}
.gantt-capacity-used,
.gantt-capacity-unavailable {
    bottom: auto;
    display: block;
    pointer-events: none;
    position: absolute;
    top: 0;
}
.gantt-capacity-used {
    background: repeating-linear-gradient(135deg, rgba(84, 84, 84, .12) 0 5px, rgba(84, 84, 84, .04) 5px 10px);
    height: var(--lane-height);
    left: calc(var(--used-start) * 100% / var(--slots-per-day));
    width: calc(var(--used-span) * 100% / var(--slots-per-day));
}
.gantt-capacity-unavailable {
    background: repeating-linear-gradient(135deg, rgba(92, 92, 92, .14) 0 5px, rgba(92, 92, 92, .055) 5px 10px);
    bottom: 0;
    left: calc(var(--blocked-start) * 100% / var(--slots-per-day));
    right: 0;
}
.gantt-capacity-label {
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(146, 141, 130, .36);
    border-radius: 999px;
    color: #69665f;
    font-size: 7.5px;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
    max-width: calc(100% - 6px);
    overflow: hidden;
    padding: 1px 3px;
    bottom: 1px;
    pointer-events: none;
    position: absolute;
    right: 3px;
    text-overflow: ellipsis;
    top: auto;
    white-space: nowrap;
    z-index: 6;
}
.gantt-day.capacity-full .gantt-capacity-label { background: #e7e5df; color: #3d3c38; }
.gantt-board:not(.gantt-zoom-dia) .gantt-capacity-label { display: none; }
.gantt-day.capacity-overloaded .gantt-capacity-label {
    background: #8f211d;
    border-color: #8f211d;
    color: #fff;
}
.gantt-day.capacity-overloaded { box-shadow: inset 0 0 0 2px rgba(171, 49, 42, .56); }
.gantt-workday-overrides { inset: 0; pointer-events: none; position: absolute; z-index: 6; }
.gantt-extra-day-badge {
    background: #e2f1df;
    border: 1px solid #9fc699;
    border-radius: 999px;
    bottom: 1px;
    color: #285437;
    font-size: 8px;
    font-weight: 900;
    left: calc(var(--day-index) * var(--day-width) + 3px);
    min-height: 14px;
    overflow: hidden;
    padding: 1px 4px;
    pointer-events: auto;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: calc(var(--day-width) - 6px);
}
.gantt-board.gantt-zoom-semana .gantt-extra-day-badge,
.gantt-board.gantt-zoom-mes .gantt-extra-day-badge,
.gantt-board.gantt-zoom-año .gantt-extra-day-badge { font-size: 0; padding: 1px; }
.gantt-board.gantt-zoom-semana .gantt-extra-day-badge::after,
.gantt-board.gantt-zoom-mes .gantt-extra-day-badge::after,
.gantt-board.gantt-zoom-año .gantt-extra-day-badge::after { content: "+"; font-size: 8px; }
.gantt-new-lane-hint { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; opacity: 0; color: #6f736d; font-size: 9px; text-align: center; background: #eef4ec; transition: opacity 100ms ease; }
.gantt-person-track.drop-active .gantt-new-lane-hint { opacity: 1; }

.gantt-block,
.gantt-block.duration-tiny,
.gantt-block.duration-compact,
.gantt-block.duration-day,
.gantt-block.duration-wide {
    position: absolute;
    z-index: 4;
    left: calc(var(--start-day-index) * var(--day-width) + var(--start-slot) * var(--day-width) / var(--slots-per-day));
    top: calc(4px + var(--lane) * var(--lane-height));
    width: calc(var(--calendar-span-slots) * var(--day-width) / var(--slots-per-day));
    min-width: 10px;
    height: 40px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible;
    cursor: grab;
    touch-action: none;
}

.gantt-block.is-filtered { display: none; }
.gantt-block.outside-visible-range { display: none; }
.gantt-block.is-pointer-dragging { opacity: .22; }
.gantt-block.pending-save { opacity: .55; pointer-events: none; }
.gantt-board.pending-save { cursor: progress; }
.gantt-board.pending-save .gantt-block { transition: left .12s ease, transform .12s ease; }
.gantt-block.continues-before::before,
.gantt-block.continues-after::after {
    align-items: center;
    background: #171717;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    top: 11px;
    width: 18px;
    z-index: 12;
}
.gantt-block.continues-before::before { content: "\2039"; left: 2px; }
.gantt-block.continues-after::after { content: "\203A"; right: 2px; }

.gantt-card,
.gantt-block.duration-tiny .gantt-card,
.gantt-block.duration-compact .gantt-card,
.gantt-card.gantt-card-segment {
    position: absolute;
    left: calc(var(--segment-offset-slots) * var(--day-width) / var(--slots-per-day));
    top: 0;
    width: calc(var(--segment-span-slots) * var(--day-width) / var(--slots-per-day));
    min-width: 10px;
    height: 36px;
    padding: 3px 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(25, 25, 25, .12);
}

.gantt-card-continuation { padding: 3px 5px; }
.gantt-board.gantt-zoom-semana .gantt-thumb,
.gantt-board.gantt-zoom-semana .compact-task,
.gantt-board.gantt-zoom-semana .compact-hours,
.gantt-board.gantt-zoom-semana .gantt-status-dot { display: none !important; }
.gantt-board.gantt-zoom-semana .gantt-card { padding: 2px 3px; }
.gantt-board.gantt-zoom-semana .gantt-visible-code {
    min-width: 0;
    font-size: 8.5px;
    letter-spacing: 0;
    text-align: center;
    text-overflow: clip;
}
.gantt-visible-code { flex: 1 1 34px; min-width: 34px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.compact-task,
.compact-hours { display: inline !important; font-size: 10px !important; flex: 0 0 auto; }
.compact-hours { opacity: .72; }
.gantt-thumb { width: 24px !important; height: 28px !important; min-width: 24px; border-radius: 5px; object-fit: cover; margin: 0 !important; }
.gantt-status-dot { width: 7px; height: 7px; min-width: 7px; border-radius: 50%; background: currentColor; margin-left: auto; }

.resize-handle {
    position: absolute;
    right: -3px;
    top: 7px;
    width: 8px;
    height: 22px;
    z-index: 8;
    cursor: ew-resize;
    border-radius: 5px;
    background: rgba(20,20,20,.28);
    opacity: 0;
}
.gantt-block:hover .resize-handle { opacity: 1; }

.gantt-drag-ghost {
    position: fixed;
    z-index: 10000;
    height: 34px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    background: #252525;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.24);
}
.gantt-drag-ghost.invalid { background: #b8443d; }
.gantt-drop-preview { position: absolute; height: 36px; border: 2px solid #4c8f57; background: rgba(76,143,87,.14); border-radius: 8px; pointer-events: none; z-index: 3; }
.gantt-drop-preview.invalid { border-color: #c54c44; background: rgba(197,76,68,.14); }

.history-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 14px 0; }
.history-filters label { display: grid; gap: 4px; font-size: 11px; color: #6d6961; }
.history-filters > button,
.history-filters > .ghost-button { width: auto; flex: 0 0 auto; }
.history-filters input,
.history-filters select { min-width: 120px; }
.completion-totals { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.history-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.history-summary-card { padding: 11px; border: 1px solid #dedbd2; border-radius: 10px; background: #faf9f6; display: grid; gap: 4px; }
.history-summary-card div { display: flex; justify-content: space-between; gap: 8px; }
.history-summary-card span { color: #716d65; font-size: 11px; }
.history-table-wrap { overflow: auto; max-height: 360px; margin-top: 14px; }
.history-table { min-width: 720px; }
.history-table .history-rework { opacity: .68; background: #f8f1ef; }
.text-button { border: 0; padding: 0; background: none; color: #315f9e; box-shadow: none; }

/* Operational dashboard */
.dashboard-filters { grid-template-columns: repeat(4, minmax(140px, 1fr)) auto auto; }
.operational-section { overflow: visible; padding: 16px; }
.operational-heading { align-items: end; }
.operational-heading h2 { margin: 2px 0 0; }
.operational-heading > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.talent-activity-list { display: grid; gap: 7px; }
.talent-activity-row { border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; overflow: hidden; }
.talent-activity-row > summary { align-items: center; cursor: pointer; display: grid; gap: 14px; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.8fr) minmax(120px, .55fr) 20px; list-style: none; padding: 11px 13px; }
.talent-activity-row > summary::-webkit-details-marker,
.production-counter > summary::-webkit-details-marker,
.fx-queue-group > summary::-webkit-details-marker { display: none; }
.talent-activity-row[open] > summary { background: #f2f0e9; border-bottom: 1px solid var(--line); }
.talent-identity,
.talent-now,
.talent-completed { display: grid; gap: 3px; min-width: 0; }
.talent-identity strong { font-size: 15px; }
.talent-identity small,
.talent-now small,
.talent-completed small { color: var(--muted); font-size: 10px; font-weight: 800; }
.talent-now strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-now em { color: var(--muted); font-size: 11px; font-style: normal; }
.talent-completed { text-align: right; }
.talent-completed > strong { font-size: 22px; }
.talent-chevron { color: var(--muted); font-size: 18px; transform-origin: center; transition: transform 120ms ease; }
.talent-activity-row[open] .talent-chevron { transform: rotate(180deg); }
.talent-activity-detail { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; }
.talent-activity-detail h3 { font-size: 12px; margin: 0 0 7px; text-transform: uppercase; }
.dashboard-shot-link { align-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink); display: flex; gap: 8px; justify-content: space-between; margin: 0 0 5px; min-height: 34px; padding: 6px 8px; text-align: left; }
.dashboard-shot-link:hover { border-color: #8b887f; }
.dashboard-shot-link strong { font-size: 11px; }
.dashboard-shot-link span { color: var(--muted); font-size: 10px; }
.dashboard-shot-link.is-rework { background: #f9efec; opacity: .75; }
.dashboard-empty { color: var(--muted); font-size: 11px; margin: 4px 0; }
.talent-stage-totals { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.talent-stage-totals span { background: #ece9e1; border-radius: 999px; color: #57544e; font-size: 10px; padding: 4px 7px; }

.production-counter-grid { display: grid; gap: 9px; grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.production-counter { border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; min-width: 0; }
.production-counter > summary { cursor: pointer; display: grid; gap: 5px; list-style: none; padding: 11px; }
.production-counter[open] { grid-column: span 2; }
.stage-counter-code { color: #68645c; font-size: 11px; font-weight: 900; }
.stage-counter-name { font-size: 11px; min-height: 28px; }
.production-counter summary > strong { font-size: 25px; line-height: 1; }
.production-counter summary > strong small { color: var(--muted); font-size: 11px; }
.stage-counter-missing { color: #9b3f35; font-size: 11px; font-weight: 850; }
.stage-counter-progress { background: #e6e2da; border-radius: 999px; height: 6px; overflow: hidden; }
.stage-counter-progress i { background: #348652; display: block; height: 100%; }
.production-counter summary > small { color: var(--muted); font-size: 9px; }
.stage-missing-list { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 5px; max-height: 180px; overflow: auto; padding: 8px; }
.stage-missing-list button { align-items: center; background: #fff; border-color: var(--line); color: var(--ink); display: inline-flex; gap: 5px; min-height: 28px; padding: 4px 7px; width: auto; }
.stage-missing-list button strong { font-size: 10px; }
.stage-missing-list button span { color: var(--muted); font-size: 9px; }

.sequence-bucket-grid { display: grid; gap: 7px; grid-template-columns: repeat(6, minmax(110px, 1fr)); margin-bottom: 11px; }
.sequence-bucket { border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 3px; min-height: 68px; padding: 10px; }
.sequence-bucket strong { font-size: 23px; }
.sequence-bucket span { color: var(--muted); font-size: 10px; font-weight: 800; }
.bucket-production { background: #f2f1ed; }
.bucket-ready_comp { background: #e8f1fb; }
.bucket-composition { background: #fff2cc; }
.bucket-ready_export { background: #e8f4e4; }
.bucket-exported { background: #eee8f7; }
.bucket-delivered { background: #dcedd8; }
.operational-sequence-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.operational-sequence-row { align-items: center; border-bottom: 1px solid var(--line); color: inherit; display: grid; gap: 12px; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.5fr) 20px; padding: 10px 12px; text-decoration: none; }
.operational-sequence-row:last-child { border-bottom: 0; }
.operational-sequence-row:hover { filter: brightness(.98); }
.operational-sequence-row > span:first-child { display: grid; gap: 2px; }
.operational-sequence-row small { color: var(--muted); font-size: 10px; }
.sequence-milestone { font-size: 12px; font-weight: 850; }

.fx-queue-grid { display: grid; gap: 8px; grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.fx-queue-group { border: 1px solid var(--line); border-radius: 9px; background: #fbfaf7; overflow: hidden; }
.fx-queue-group > summary { align-items: center; cursor: pointer; display: flex; gap: 8px; list-style: none; padding: 11px; }
.fx-queue-group > summary strong { font-size: 22px; }
.fx-queue-group > summary span { color: var(--muted); font-size: 11px; font-weight: 850; }
.fx-queue-group > div { border-top: 1px solid var(--line); max-height: 240px; overflow: auto; padding: 7px; }
.fx-group-ready { background: #e8f4e4; }
.fx-group-retake { background: #f8dfd8; }
.fx-group-por_unificar { background: #eee8f7; }

/* Two-line Gantt cards: identity wins over thumbnail and secondary metadata. */
.gantt-board { --lane-height: 58px; }
.gantt-person-track { min-height: 72px; }
.gantt-block,
.gantt-block.duration-tiny,
.gantt-block.duration-compact,
.gantt-block.duration-day,
.gantt-block.duration-wide { height: 40px; }
.gantt-card,
.gantt-block.duration-tiny .gantt-card,
.gantt-block.duration-compact .gantt-card,
.gantt-card.gantt-card-segment {
    container-type: inline-size;
    height: 40px;
    padding: 4px 6px;
}
.gantt-card-copy { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; }
.gantt-visible-code { display: flex !important; flex: 0 1 auto; font-size: 10.5px !important; font-weight: 900; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-shot-code { flex: 0 0 auto; }
.gantt-sequence-code { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gantt-code-separator { flex: 0 0 auto; }
.gantt-card-meta { align-items: center; color: #666960; display: flex !important; font-size: 9px; gap: 0; line-height: 1.1; min-width: 0; overflow: hidden; white-space: nowrap; }
.gantt-card-meta .compact-task,
.gantt-card-meta .compact-hours { display: inline !important; font-size: 9px !important; }
.gantt-block .gantt-status-label { display: none; overflow: hidden; text-overflow: ellipsis; }
.gantt-card-meta .gantt-status-dot { margin-left: 5px; }
.gantt-thumb { height: 30px !important; width: 28px !important; min-width: 28px; }
.end-move-handle,
.resize-handle {
    position: absolute;
    right: -5px;
    width: 11px;
    height: 17px;
    z-index: 14;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 5px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 100ms ease, background 100ms ease;
}
.end-move-handle {
    top: 2px;
    cursor: grab;
    background: #191919;
    pointer-events: auto;
}
.end-move-handle::after {
    content: "\2194";
    color: #fff;
    display: block;
    font-size: 8px;
    font-weight: 900;
    line-height: 14px;
    text-align: center;
}
.resize-handle {
    top: 21px;
    height: 17px;
    cursor: ew-resize;
    background: rgba(20,20,20,.48);
}
.resize-handle::after { height: 9px; margin: 3px auto; }
.gantt-block:hover .end-move-handle,
.gantt-block:hover .resize-handle,
.gantt-block.selected .end-move-handle,
.gantt-block.selected .resize-handle,
.end-move-handle:focus-visible,
.resize-handle:focus-visible { opacity: 1; }
.end-move-handle:focus-visible,
.resize-handle:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.gantt-drop-preview { height: 40px; }
.gantt-drop-preview.group-preview { opacity: .58; border-style: dashed; }
.gantt-board.gantt-zoom-semana .gantt-card-meta { display: none !important; }
.gantt-board.gantt-zoom-semana .gantt-card-copy { display: flex; align-items: center; }

@container (max-width: 149px) {
    .gantt-thumb { display: none !important; }
}
@container (min-width: 220px) {
    .gantt-block .gantt-status-label { display: inline; }
}
@container (max-width: 100px) {
    .gantt-visible-code { font-size: 9.5px !important; letter-spacing: 0; }
    .gantt-card-meta .compact-task,
    .gantt-card-meta .compact-hours { font-size: 8.5px !important; }
}
@container (max-width: 55px) {
    .gantt-sequence-code,
    .gantt-code-separator { display: none !important; }
    .gantt-visible-code { font-size: 10.5px !important; }
}
@container (max-width: 39px) {
    .gantt-card-meta { display: none !important; }
    .gantt-card-copy { display: flex; align-items: center; justify-content: center; }
}

/* Legacy compact-card rules predate the two-line card markup. Keep one-hour
   cards readable and keep every visual lane aligned to the 40px card height. */
.gantt-block.duration-tiny,
.gantt-block.duration-compact {
    min-height: 40px;
}
.gantt-block.duration-compact .gantt-card-copy,
.gantt-block.duration-compact .gantt-visible-code,
.gantt-block.duration-compact .gantt-shot-code {
    display: flex !important;
}
.gantt-block.duration-compact .gantt-card {
    padding-left: 2px;
    padding-right: 2px;
}
.gantt-block.duration-compact .gantt-visible-code {
    font-size: 8.5px !important;
    justify-content: center;
    min-width: 0;
}

.gantt-block.selected { z-index: 15; }
.gantt-block.selected .gantt-card {
    border: 2px solid #050505 !important;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), 0 0 0 2px #050505, 0 5px 12px rgba(0,0,0,.28) !important;
    filter: saturate(.75) contrast(1.08);
}

.gantt-board.is-paste-placement,
.gantt-board.is-paste-placement .gantt-person-track,
.gantt-board.is-paste-placement .gantt-day {
    cursor: copy;
}
.gantt-paste-preview {
    background: rgba(23, 23, 23, .12);
    border: 2px dashed #171717;
    border-radius: 7px;
    height: 40px;
    pointer-events: none;
    position: absolute;
    transform: translateY(calc(var(--lane, 0) * var(--lane-height)));
    z-index: 28;
}
.gantt-paste-preview.invalid {
    background: rgba(181, 38, 38, .13);
    border-color: #a11d1d;
}
.gantt-block.resize-chain-preview .gantt-card {
    outline: 2px dashed #171717;
    outline-offset: 2px;
}
.gantt-block.resize-push-holding .gantt-card {
    outline-color: #c77d00;
    animation: gantt-resize-push-hold 2s linear forwards;
}
.gantt-block.resize-push-armed .gantt-card {
    outline: 3px solid #2f7d32;
    outline-offset: 2px;
}
@keyframes gantt-resize-push-hold {
    from { box-shadow: inset 0 -3px 0 rgba(199, 125, 0, .15); }
    to { box-shadow: inset 0 -3px 0 #c77d00; }
}

@media (max-width: 980px) {
    .gantt-shell { display: block; }
    .task-pool { max-width: none; margin-bottom: 10px; }
    .gantt-table-wrap { --talent-width: 126px; }
    .gantt-view-toolbar input[type="search"] { width: 100%; }
    .dashboard-filters,
    .production-counter-grid,
    .sequence-bucket-grid,
    .fx-queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .talent-activity-row > summary { grid-template-columns: minmax(130px, .7fr) minmax(180px, 1.3fr) 90px 18px; }
    .talent-activity-detail { grid-template-columns: 1fr; }
    .operational-sequence-row { grid-template-columns: minmax(150px, .8fr) minmax(210px, 1.2fr) 18px; }
    .performance-filter-bar,
    .performance-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .performance-filter-bar button { grid-column: 1 / -1; }
    .capacity-planner-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .capacity-planner-inputs button { min-height: 38px; }
    .capacity-result-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .capacity-result-summary > span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .capacity-result-summary > span:nth-child(4) { border-top: 1px solid var(--line); }
    .capacity-deadline-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scenario-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scenario-person-row { grid-template-columns: minmax(130px, 1.2fr) repeat(2, minmax(100px, .8fr)); }
    .scenario-person-row > span:last-child,
    .scenario-person-row > label:last-of-type { display: none; }
    .scenario-result-hero,
    .scenario-remediation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .talent-schedule-editor { grid-template-columns: repeat(4, minmax(70px, 1fr)); }
    .tracking-sequence > .tracking-sequence-head { align-items: stretch; flex-direction: column; }
    .tracking-sequence-title { flex-basis: auto; }
    .tracking-sequence-controls { justify-content: flex-start; }
}

@media (max-width: 720px) {
    .projection-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .talent-directory-row > summary, .talent-directory-row.is-static { grid-template-columns: 1fr auto; }
    .talent-directory-row > summary > span:nth-child(3), .talent-directory-row > summary > .talent-tags { grid-column: 1 / -1; }
    .talent-profile-fields { grid-template-columns: 1fr; }
    .talent-schedule-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .weekly-stage-history > header { align-items: start; flex-direction: column; }
    .weekly-stage-history header > div:last-child { text-align: left; }
    .talent-week-actions { align-items: center; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
    .talent-week-actions button { width: auto; }
    .projection-admin-grid { grid-template-columns: 1fr; }
    .performance-filter-bar,
    .performance-summary,
    .performance-tools,
    .performance-editor,
    .performance-calculator,
    .calculator-result { grid-template-columns: 1fr; }
    .performance-summary span + span { border-left: 0; border-top: 1px solid var(--line); }
    .capacity-planner-inputs,
    .capacity-result-summary,
    .capacity-deadline-band { grid-template-columns: 1fr; }
    .capacity-team-picker { align-items: start; grid-template-columns: 1fr; }
    .capacity-result-summary > span + span { border-left: 0; border-top: 1px solid var(--line); }
    .capacity-deadline-band b { white-space: normal; }
    .scenario-primary-controls { align-items: flex-start; flex-direction: column; }
    .scenario-input-grid,
    .scenario-result-hero,
    .scenario-remediation { grid-template-columns: 1fr; }
    .scenario-result-hero > span + span,
    .scenario-remediation span + span { border-left: 0; border-top: 1px solid var(--line); }
    .scenario-section-title { align-items: flex-start; flex-direction: column; gap: 5px; }
    .scenario-person-row { grid-template-columns: 1fr 1fr; }
    .scenario-person-row > span:last-child { display: grid; }
    .scenario-save-bar { grid-template-columns: 1fr; }
}
/* Canonical workflow colors: Gantt and Calendario are driven only by status. */
.gantt-block.state-no-iniciado .gantt-card,
.calendar-assignment.state-no-iniciado {
    background: #efefed;
    border-color: #cfcdc6;
    border-left-color: #77736a;
    color: #34332f;
}

.gantt-block.state-en-proceso .gantt-card,
.calendar-assignment.state-en-proceso {
    background: #fff1b8;
    border-color: #d5ae2d;
    border-left-color: #9e7200;
    color: #4d3b08;
}

.gantt-block.state-en-revision .gantt-card,
.calendar-assignment.state-en-revision {
    background: #d9eafb;
    border-color: #6fa5d4;
    border-left-color: #286a9f;
    color: #174365;
}

.gantt-block.state-aprobado .gantt-card,
.calendar-assignment.state-aprobado {
    background: #dcefd9;
    border-color: #83b77d;
    border-left-color: #397c43;
    color: #285437;
}

.gantt-block.state-pausado .gantt-card,
.calendar-assignment.state-pausado {
    background: #e5d5d3;
    border-color: #a77b77;
    border-left-color: #76504d;
    color: #4f3533;
}

.gantt-block.state-no-aplica .gantt-card,
.calendar-assignment.state-no-aplica {
    background: #e4e3df;
    border-color: #aaa79f;
    border-left-color: #74716a;
    color: #5d5a54;
}

.calendar-assignment span { color: inherit; opacity: .78; }

/* RTK is a condition and has visual priority without changing workflow state. */
.gantt-block.is-retake .gantt-card,
.calendar-assignment.is-retake {
    background: #f6cbc7;
    border-color: #d86e65;
    border-left-color: #a92f28;
    color: #61231f;
}

.gantt-block.is-retake .gantt-card span,
.calendar-assignment.is-retake span { color: inherit; }

.pipe-no-aplica { background: #77736a; border-color: #45423d; }
.pipe-pausado { background: #9f7772; border-color: #76504d; }
.pipe-en-revision { background: #4f91c7; border-color: #286a9f; }

.status-dot-no-aplica { background: #77736a; }
.status-dot-pausado { background: #9f7772; }

.production-assets-manager {
    margin: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafafa;
}
.production-assets-manager > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 8px 10px;
    user-select: none;
}
.production-assets-manager > summary span { display: flex; align-items: baseline; gap: 8px; }
.production-assets-manager > summary small { color: var(--muted); }
.production-assets-counts {
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.production-assets-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(350px, 1.2fr) 135px minmax(150px, .8fr) 92px auto minmax(70px, .5fr);
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
}
.production-asset-type-control {
    display: grid;
    grid-template-columns: 76px minmax(190px, 1fr);
    gap: 7px;
    align-items: center;
    min-width: 0;
}
.production-asset-type-control select { width: 100%; min-width: 0; }
.production-asset-type-control small,
.production-asset-type-hint {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.production-time-field {
    display: block;
    min-width: 0;
}
.production-time-field input {
    width: 100%;
    min-width: 0;
}
.production-time-input {
    position: relative;
    display: block;
    min-width: 0;
}
.production-time-input input {
    width: 100%;
    min-width: 0;
    padding-right: 28px;
}
.production-time-unit {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    text-transform: none;
}
.production-assets-list { border-top: 1px solid var(--line); }
.production-assets-list > .empty { margin: 0; padding: 12px; }
.production-asset-row {
    display: block;
    border-top: 1px solid var(--line);
    background: #fff;
    min-width: 0;
}
.production-assets-list > .production-asset-row:first-child { border-top: 0; }
.production-asset-row.state-no-iniciado .production-asset-quick-row { background: #eeeeea; }
.production-asset-row.state-en-proceso .production-asset-quick-row { background: #fff2c8; }
.production-asset-row.state-aprobado .production-asset-quick-row { background: #dfefd9; }
.production-asset-quick-row {
    display: grid;
    grid-template-columns: 26px minmax(170px, 1.35fr) minmax(135px, 1fr) 80px minmax(125px, .9fr) 104px 34px;
    gap: 8px;
    align-items: center;
    min-height: 50px;
    padding: 7px 10px;
    min-width: 0;
}
.production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) {
    grid-template-columns: minmax(170px, 1.35fr) minmax(135px, 1fr) 80px minmax(125px, .9fr) 104px 34px;
}
.production-asset-select {
    position: relative;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    cursor: pointer;
}
.production-asset-select input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.production-asset-select > span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1.5px solid #b8b5ae;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    pointer-events: none;
}
.production-asset-select > span::before {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg) translate(1px, -1px);
}
.production-asset-select input:checked + span { background: #151515; border-color: #151515; }
.production-asset-select input:checked + span::before { border-color: #fff; }
.production-asset-select input:focus-visible + span { outline: 2px solid #1f6feb; outline-offset: 2px; }
.production-asset-row.is-selected .production-asset-quick-row { box-shadow: inset 0 0 0 2px #151515; }
.production-asset-type {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
}
.production-asset-name,
.production-asset-stage,
.production-asset-status,
.production-asset-person {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.production-asset-quick-field {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.production-asset-quick-field > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.production-asset-quick-field select {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 3px 26px 3px 8px;
    font-size: 12px;
}
.production-asset-detail-toggle { width: 32px; height: 32px; }
.production-asset-detail-toggle[aria-expanded="true"] .chevron-down { transform: rotate(180deg); }
.production-asset-row-feedback {
    grid-column: 2 / -1;
    min-height: 0;
    font-size: 10px;
    line-height: 1;
}
.production-asset-row-feedback:empty { display: none; }
.production-asset-detail { border-top: 1px solid var(--line); background: #fafafa; min-width: 0; }
.asset-detail-loading { display: block; padding: 12px; color: var(--muted); }
.production-asset-editor { padding: 10px; }
.production-asset-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
}
.production-asset-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.production-asset-fields .wide-field { grid-column: span 2; }
.production-asset-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.production-assets-bulk-bar {
    position: sticky;
    z-index: 35;
    top: 8px;
    display: grid;
    grid-template-columns: auto repeat(4, minmax(125px, 1fr)) auto 34px 34px minmax(80px, auto);
    gap: 7px;
    align-items: center;
    margin: 8px 0;
    padding: 7px 9px;
    border: 1px solid #aaa69d;
    border-radius: 6px;
    background: rgba(250, 249, 246, .97);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}
.production-assets-bulk-bar[hidden] { display: none; }
.production-assets-manager > .production-assets-bulk-bar {
    top: 8px;
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.production-assets-bulk-bar strong { white-space: nowrap; }
.production-assets-bulk-bar select { min-width: 0; height: 34px; padding-block: 3px; }
.production-assets-bulk-bar .icon-button { width: 34px; height: 34px; }
.production-assets-bulk-bar .icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.production-asset-archive-button {
    background: #fff;
    border-color: #a33a32;
    color: #8c241e;
}

.production-asset-archive-button:hover,
.production-asset-archive-button:focus-visible {
    background: #f9e4e1;
    border-color: #7e1e18;
}

.archived-subheading {
    margin-top: 28px;
}
.production-asset-links { margin-top: 10px; }
.production-asset-history { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.production-asset-history > summary { cursor: pointer; font-weight: 700; }
.production-asset-history > div { display: grid; gap: 4px; padding-top: 6px; color: var(--muted); font-size: 12px; }
.shot-production-asset-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(145px, 1fr) minmax(350px, 1.3fr) minmax(145px, .75fr) 84px auto;
    gap: 7px;
    padding-top: 8px;
}
.shot-production-asset-form .save-feedback { grid-column: 1 / -1; }
.shot-production-assets-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.production-asset-row.is-retake { background: #f8d8d4; border-left: 4px solid #a92f28; }
.production-asset-identity { display: grid; min-width: 0; }
.production-asset-identity strong,
.production-asset-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-asset-link-list { display: grid; gap: 6px; margin-top: 8px; }
.production-asset-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f7f5;
}
.production-asset-link.is-retake { border-color: #a92f28; background: #f8d8d4; }
.production-asset-link span { display: grid; min-width: 0; }
.production-asset-link small { color: var(--muted); }
.production-asset-link-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.production-asset-link-form .save-feedback { grid-column: 1 / -1; }
.production-asset-pool-card { border-left: 4px solid #7057a8; }
.production-asset-pool-card.is-retake { border-color: #a92f28; }
.production-asset-pool-badge {
    align-self: start;
    padding: 3px 6px;
    border-radius: 4px;
    background: #ece6f7;
    color: #543f87;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .production-assets-toolbar,
    .shot-production-asset-form,
    .production-asset-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .production-asset-quick-row { grid-template-columns: 26px minmax(150px, 1fr) repeat(4, minmax(105px, .8fr)) 34px; }
    .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) { grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(105px, .8fr)) 34px; }
    .production-asset-fields .wide-field { grid-column: 1 / -1; }
    .production-assets-bulk-bar { grid-template-columns: auto repeat(2, minmax(140px, 1fr)) auto 34px 34px; }
    .production-assets-bulk-bar select:nth-of-type(n+3),
    .production-assets-bulk-bar .save-feedback { grid-row: 2; }
}

.shot-drawer { overflow-x: hidden; }
.shot-drawer .shot-panel,
.shot-drawer .shot-panel *,
.shot-drawer .production-assets-list,
.shot-drawer .production-asset-row { min-width: 0; max-width: 100%; box-sizing: border-box; }
.shot-drawer .production-asset-quick-row,
.shot-drawer .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) {
    position: relative;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    padding-top: 10px;
}
.shot-drawer .production-asset-identity {
    grid-column: 1 / -1;
    padding-right: 42px;
}
.shot-drawer .production-asset-detail-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
}
.shot-drawer .production-asset-row-feedback { grid-column: 1 / -1; }
.shot-drawer .production-asset-fields { grid-template-columns: minmax(0, 1fr); }
.shot-drawer .production-asset-fields .wide-field { grid-column: 1; }
.shot-drawer .production-asset-actions { flex-wrap: wrap; justify-content: stretch; }
.shot-drawer .production-asset-actions button { flex: 1 1 140px; }
.shot-drawer .production-asset-link-form { grid-template-columns: minmax(0, 1fr) auto; }
.shot-drawer .shot-production-asset-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot-drawer .shot-production-asset-form > :first-child,
.shot-drawer .shot-production-asset-form > [name="name"],
.shot-drawer .shot-production-asset-form > [name="existing_asset_id"],
.shot-drawer .shot-production-asset-form > button,
.shot-drawer .shot-production-asset-form > .save-feedback { grid-column: 1 / -1; }

@media (max-width: 760px) {
    .production-asset-type-control { grid-template-columns: 70px minmax(0, 1fr); }
    .production-asset-quick-row,
    .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) {
        grid-template-columns: 24px repeat(2, minmax(0, 1fr)) 34px;
    }
    .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; }
    .production-asset-identity { grid-column: 2 / 4; }
    .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) .production-asset-identity { grid-column: 1 / 3; }
    .production-asset-detail-toggle { grid-column: 4; grid-row: 1; }
    .production-asset-row .production-asset-quick-row:not(:has(.production-asset-select)) .production-asset-detail-toggle { grid-column: 3; }
    .production-asset-row-feedback { grid-column: 1 / -1; }
    .production-assets-bulk-bar { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px 34px; }
    .production-assets-bulk-bar strong,
    .production-assets-bulk-bar [data-apply-production-assets-bulk],
    .production-assets-bulk-bar .save-feedback { grid-column: 1 / -1; }
}

.read-only-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid #c8c8c2;
    border-left: 4px solid #171717;
    border-radius: 6px;
    background: #f4f4f1;
    color: #4e514d;
    font-size: 13px;
    font-weight: 700;
}

.planning-read-only .read-only-control,
.planning-read-only .read-only-control:disabled {
    cursor: not-allowed;
    opacity: .68;
}

.planning-read-only select.read-only-control:disabled,
.planning-read-only input.read-only-control:disabled,
.planning-read-only textarea.read-only-control:disabled {
    color: #343632;
    -webkit-text-fill-color: #343632;
    background: #f2f2ef;
}

.permission-item-read-only .read-only-control,
.permission-item-edit .read-only-control {
    cursor: not-allowed;
    opacity: .68;
}

.gantt-block.permission-item-read-only {
    cursor: default;
}

.gantt-block.permission-item-read-only .end-move-handle,
.gantt-block.permission-item-read-only .resize-handle {
    display: none !important;
}

.asset-chip[data-effective-permission-level="no_access"] {
    display: none !important;
}

.permission-item-read-only select.read-only-control:disabled,
.permission-item-read-only input.read-only-control:disabled,
.permission-item-read-only textarea.read-only-control:disabled,
.permission-item-edit select.read-only-control:disabled,
.permission-item-edit input.read-only-control:disabled,
.permission-item-edit textarea.read-only-control:disabled {
    color: #343632;
    -webkit-text-fill-color: #343632;
    background: #f2f2ef;
}

.planning-read-only [data-thumb-drop].read-only-control {
    cursor: default;
    opacity: 1;
}

.planning-read-only [data-thumb-drop] > img {
    filter: none;
    opacity: 1;
}

.planning-read-only [data-thumb-drop] .thumb-hover,
.planning-read-only [data-thumb-drop] input[type="file"] {
    display: none !important;
}

.planning-read-only .read-only-card {
    cursor: default;
}

.planning-read-only [data-shot-select],
.planning-read-only [data-production-asset-select],
.planning-read-only [data-shot-bulk-bar],
.planning-read-only [data-production-assets-bulk-bar],
.planning-read-only [data-pending-bulk-toolbar],
.planning-read-only [data-gantt-selection-toolbar] {
    display: none !important;
}

.talent-section-tabs {
    align-items: center;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 7px;
}

.talent-section-tabs > a,
.talent-section-tabs > span {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    gap: 7px;
    min-height: 36px;
    padding: 7px 13px;
    text-decoration: none;
    white-space: nowrap;
}

.talent-section-tabs > a.active {
    background: var(--ink);
    color: #fff;
}

.talent-section-tabs > span.disabled {
    border-color: var(--line);
    cursor: not-allowed;
    opacity: .58;
}

.talent-section-tabs small { font-size: 9px; text-transform: uppercase; }

.talent-team-summary { align-content: center; min-width: 0; }
.talent-team-summary > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-team-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.talent-team-chip {
    background: #efede7;
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    padding: 3px 6px;
}
.talent-team-chip.primary { background: #dedbd1; color: var(--ink); }

.team-admin-panel { overflow: visible; }
.team-admin-heading { align-items: start; }
.team-admin-heading span { color: var(--muted); display: block; margin-top: 3px; }
.team-admin-heading button,
.team-form-actions button,
.team-order-actions button,
.team-member-actions button { width: auto; }
.team-admin-panel button.ghost-button { background: #fff; color: var(--ink); }
.team-create-form {
    align-items: end;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    margin: 12px 0;
    padding: 12px;
}
.team-create-form[hidden] { display: none; }
.team-create-form label,
.team-card form label,
.team-member-actions label { color: var(--muted); display: grid; font-size: 10px; font-weight: 900; gap: 4px; text-transform: uppercase; }
.team-form-actions { display: flex; gap: 6px; }
.team-admin-feedback { font-size: 12px; font-weight: 900; min-height: 18px; }
.team-admin-feedback[data-state="error"] { color: var(--accent); }
.team-admin-feedback[data-state="ok"] { color: var(--ok); }
.team-admin-feedback[data-state="pending"] { color: var(--muted); }
.team-admin-loading { color: var(--muted); padding: 30px; text-align: center; }
.team-board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.team-card {
    border: 1px solid var(--line-dark);
    border-radius: 10px;
    display: grid;
    gap: 12px;
    padding: 14px;
}
.team-card.archived { background: var(--panel-soft); border-style: dashed; opacity: .82; }
.team-card-header { align-items: start; display: flex; justify-content: space-between; gap: 10px; }
.team-card-header h3 { font-size: 20px; margin: 1px 0 0; }
.team-card-header p { color: var(--muted); font-size: 10px; font-weight: 900; margin: 0; text-transform: uppercase; }
.team-order-actions { display: flex; gap: 4px; }
.team-order-actions button { min-width: 34px; padding: 6px; }
.team-stage-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 23px; }
.team-stage-chips span,
.team-role-badge,
.team-primary-badge,
.team-account-badge {
    background: #efede7;
    border-radius: 999px;
    color: var(--ink);
    font-size: 9px;
    font-weight: 900;
    padding: 4px 7px;
}
.team-stage-chips span {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    line-height: 1;
    min-height: 24px;
    white-space: nowrap;
}
.team-stage-chip.animation { background: #e5ebf4; color: #344d70; }
.team-stage-chip.art { background: #f3e7d7; color: #76552e; }
.team-stage-chips em { color: var(--muted); font-size: 11px; }
.team-role-badge.lead { background: #1c1d1b; color: #fff; }
.team-primary-badge { background: #dfead9; color: #35562d; }
.team-account-badge { background: #f6e3dc; color: #853d2e; }
.team-member-group { display: grid; gap: 6px; }
.team-member-group h4 { align-items: center; display: flex; font-size: 12px; gap: 7px; margin: 0; text-transform: uppercase; }
.team-member-group h4 span { background: #efede7; border-radius: 999px; font-size: 9px; padding: 3px 6px; }
.team-member-row { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 8px; padding: 9px; }
.team-member-identity { display: grid; gap: 2px; }
.team-member-identity span { color: var(--muted); font-size: 10px; }
.team-member-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.team-member-actions { align-items: end; display: flex; flex-wrap: wrap; gap: 5px; }
.team-member-actions button { font-size: 10px; min-height: 30px; padding: 5px 7px; }
.team-member-actions label { min-width: 130px; }
.team-member-actions select { font-size: 10px; min-height: 30px; padding: 5px 22px 5px 6px; }
.danger-button { background: #fff4f1; border: 1px solid #dca79a; color: #8e3829; }
.team-add-member,
.team-settings { border-top: 1px solid var(--line); padding-top: 9px; }
.team-add-member summary,
.team-settings summary,
.archived-team-section summary { cursor: pointer; font-size: 12px; font-weight: 900; }
.team-add-member form,
.team-settings form { align-items: end; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.team-add-member form button,
.team-settings form button { align-self: end; }
.team-settings > .danger-button { margin-top: 12px; }
.team-stage-tools { display: flex; grid-column: 1 / -1; justify-content: flex-end; }
.team-stage-tools button,
.team-stage-group header button { font-size: 10px; min-height: 30px; padding: 5px 8px; width: auto; }
.team-stage-groups { display: grid; gap: 12px; grid-column: 1 / -1; }
.team-stage-group { background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 8px; padding: 10px; }
.team-stage-group > header { align-items: center; display: flex; gap: 8px; justify-content: space-between; }
.team-stage-group > header > strong { font-size: 12px; text-transform: uppercase; }
.team-stage-grid { display: grid; gap: 5px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.team-stage-option { align-items: center; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 7px; display: flex !important; flex-direction: row; padding: 7px; text-transform: none !important; }
.team-stage-option input { flex: 0 0 auto; min-height: 16px; width: 16px; }
.team-stage-option span { display: grid; font-size: 9px; }
.team-stage-option strong { color: var(--ink); font-size: 11px; }
.team-stage-save { grid-column: 1 / -1; }
.team-empty { color: var(--muted); font-size: 11px; margin: 0; }
.team-empty-state { align-items: center; color: var(--muted); display: grid; gap: 4px; grid-column: 1 / -1; justify-items: center; padding: 44px 20px; text-align: center; }
.archived-team-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.archived-team-section .team-board { margin-top: 10px; }

.permission-admin-panel { overflow: visible; }
.permission-admin-heading { align-items: start; }
.permission-admin-heading > div > span { color: var(--muted); display: block; margin-top: 3px; }
.permission-shadow-badge {
    background: #f3ede1;
    border: 1px solid #d9c9a8;
    border-radius: 999px;
    color: #755b29;
    font-size: 10px;
    font-weight: 900;
    padding: 6px 9px;
    text-transform: uppercase;
}
.permission-level-legend { display: grid; gap: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; }
.permission-level-legend > span { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); display: grid; font-size: 10px; gap: 2px; padding: 9px; }
.permission-level-legend strong { color: var(--ink); font-size: 11px; }
.permission-admin-feedback { font-size: 12px; font-weight: 900; min-height: 18px; }
.permission-admin-feedback[data-state="error"] { color: var(--accent); }
.permission-admin-feedback[data-state="ok"] { color: var(--ok); }
.permission-admin-feedback[data-state="pending"] { color: var(--muted); }
.permission-admin-loading { color: var(--muted); padding: 30px; text-align: center; }
.permission-admin-content { display: grid; gap: 18px; }
.permission-admin-content[hidden] { display: none; }
.permission-section { border-top: 1px solid var(--line); display: grid; gap: 12px; padding-top: 14px; }
.permission-section-heading { align-items: end; display: flex; gap: 20px; justify-content: space-between; }
.permission-section-heading h3 { font-size: 18px; margin: 2px 0 0; }
.permission-section-heading > p { color: var(--muted); font-size: 10px; margin: 0; max-width: 440px; }
.permission-matrix-list { display: grid; gap: 12px; }
.permission-matrix-card { border: 1px solid var(--line-dark); border-radius: 10px; overflow: hidden; }
.permission-matrix-card > header { align-items: center; background: var(--panel-soft); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 10px 12px; }
.permission-matrix-card > header p,
.permission-effective-card header p { color: var(--muted); font-size: 9px; font-weight: 900; margin: 0; text-transform: uppercase; }
.permission-matrix-card > header h4,
.permission-effective-card header h4 { font-size: 15px; margin: 1px 0 0; }
.permission-matrix-card > header > span { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.permission-table-scroll { overflow-x: auto; }
.permission-matrix-card table { border-collapse: collapse; min-width: 680px; width: 100%; }
.permission-matrix-card th,
.permission-matrix-card td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.permission-matrix-card tr:last-child th,
.permission-matrix-card tr:last-child td { border-bottom: 0; }
.permission-matrix-card th:last-child,
.permission-matrix-card td:last-child { border-right: 0; }
.permission-matrix-card thead th { background: #faf9f6; color: var(--muted); font-size: 9px; min-width: 150px; }
.permission-matrix-card thead th:first-child { min-width: 115px; }
.permission-matrix-card th strong,
.permission-matrix-card th small { display: block; }
.permission-matrix-card tbody th { font-size: 11px; }
.permission-matrix-card tbody th small { color: var(--muted); font-size: 9px; font-weight: 500; margin-top: 2px; }
.permission-matrix-card td select { font-size: 10px; min-height: 32px; padding: 5px 24px 5px 7px; width: 100%; }
.permission-matrix-card td small { color: var(--muted); display: block; font-size: 8px; font-weight: 900; margin-top: 3px; text-transform: uppercase; }
.permission-matrix-card td.is-custom { background: #f5f0e5; }
.permission-matrix-card td.is-custom small { color: #755b29; }
.permission-account-picker { color: var(--muted); display: grid; font-size: 9px; font-weight: 900; gap: 4px; min-width: min(340px, 100%); text-transform: uppercase; }
.permission-account-summary { align-items: center; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 9px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 11px; }
.permission-account-summary > div:first-child { display: grid; gap: 2px; }
.permission-account-summary > div:first-child span { color: var(--muted); font-size: 10px; }
.permission-membership-chips { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; }
.permission-membership-chips span,
.permission-membership-chips em,
.permission-admin-lock { background: #e9e7e0; border-radius: 999px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; padding: 4px 7px; }
.permission-admin-lock { background: #1c1d1b; color: #fff; }
.permission-effective-grid { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.permission-effective-card { border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 8px; padding: 11px; }
.permission-effective-card header { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.permission-effective-card > p { color: var(--muted); font-size: 10px; margin: 0; min-height: 26px; }
.permission-effective-card label { color: var(--muted); display: grid; font-size: 9px; font-weight: 900; gap: 4px; text-transform: uppercase; }
.permission-effective-card button { background: #fff; color: var(--ink); font-size: 10px; min-height: 30px; width: auto; }
.permission-level-badge { border-radius: 999px; font-size: 9px; font-weight: 900; padding: 5px 7px; }
.permission-level-badge.level-no_access { background: #f3e5e2; color: #833d32; }
.permission-level-badge.level-read { background: #e9edf2; color: #42556c; }
.permission-level-badge.level-edit { background: #eee8d8; color: #705a24; }
.permission-level-badge.level-manage { background: #dfead9; color: #35562d; }
.permission-shadow-inactive,
.permission-shadow-clear { background: var(--panel-soft); border: 1px dashed var(--line-dark); border-radius: 9px; color: var(--muted); display: grid; font-size: 10px; gap: 3px; padding: 12px; }
.permission-shadow-inactive strong,
.permission-shadow-clear strong { color: var(--ink); font-size: 12px; }
.permission-shadow-summary { display: grid; gap: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.permission-shadow-summary > span { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); display: grid; font-size: 9px; gap: 2px; padding: 9px; text-transform: uppercase; }
.permission-shadow-summary strong { color: var(--ink); font-size: 18px; }
.permission-shadow-summary .is-exact { background: #edf4e9; }
.permission-shadow-summary .is-higher { background: #f4eddd; }
.permission-shadow-summary .is-lower { background: #f5e7e3; }
.permission-shadow-table { border: 1px solid var(--line); border-radius: 9px; max-height: 340px; overflow: auto; }
.permission-shadow-table table { border-collapse: collapse; min-width: 760px; width: 100%; }
.permission-shadow-table th,
.permission-shadow-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: middle; }
.permission-shadow-table th { background: #faf9f6; color: var(--muted); font-size: 9px; position: sticky; text-transform: uppercase; top: 0; z-index: 1; }
.permission-shadow-table td { font-size: 10px; }
.permission-shadow-table td > strong,
.permission-shadow-table td > span { display: block; }
.permission-shadow-table td > span:not(.permission-level-badge) { color: var(--muted); font-size: 9px; margin-top: 2px; }
.shadow-direction.new_higher { color: #755b29; }
.shadow-direction.new_lower { color: #8e3829; }

@media (max-width: 760px) {
    .team-create-form,
    .team-board,
    .team-add-member form,
    .team-settings form { grid-template-columns: 1fr; }
    .team-board { min-width: 0; }
    .team-member-actions { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-member-actions label { grid-column: 1 / -1; }
    .permission-level-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .permission-shadow-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .permission-section-heading { align-items: stretch; display: grid; }
    .permission-account-picker { min-width: 0; }
}
