/* AdmTasks. Tokens del iERP Design System (los mismos nombres --ds-* y valores de AdmWeb/Content/DesignSystemBase.css),
   con sus valores oscuros en [data-theme="dark"] (los de AdmWeb/Content/DarkMode.css). Colores solo de la paleta de
   marca: Enterprise Blue, Scale Red, Start Yellow, Adm Grey, Cloud Grey, Soft Grey y sus tonos. Sin sombras ni
   degradados (Design System 1.5.3): las capas flotantes se separan con un borde --ds-divider. */

@font-face {
    font-family: "AvenirNext";
    src: url('../fonts/AvenirNextLTPro-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url('../fonts/AvenirNextLTPro-Demi.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url('../fonts/AvenirNextLTPro-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --enterprise-blue: #26A4DD;
    --resolution-blue-300: #1F87B6;
    --resolution-blue-500: #1A6F96;
    --resolution-blue-600: #145877;
    --scale-red: #D91C5C;
    --start-yellow: #FFCB06;
    --adm-grey: #2B2C2C;
    --cloud-grey: #A2ACBD;
    --soft-grey: #E6E7E8;

    --ds-bg: #F4F5F6;
    --ds-surface: #FFFFFF;
    --ds-surface-alt: #F7F8F9;
    --ds-ink: #2B2C2C;
    --ds-ink-muted: #5C6370;
    --ds-divider: #E6E7E8;
    --ds-hover: #EEF1F5;
    --ds-selection: #DDF0FA;
    --ds-primary: var(--resolution-blue-500);
    --ds-primary-hover: var(--resolution-blue-600);
    --ds-accent: var(--enterprise-blue);
    --ds-on-strong: #FFFFFF;
    --ds-success: #2E7D14;
    --ds-success-hover: #23600F;
    --ds-danger: #B8174E;
    --ds-danger-hover: #9A133F;
    --ds-wait-fill: #FFF6D1;
    --ds-error-fill: #FBE3EB;
    --ds-ok-fill: #E3F1DE;
    --ds-info-fill: #DCF0FA;
    --ds-weekend: #F1F3F5;

    /* Estados de las tareas: pendiente (amarillo), en progreso (azul), en pausa (gris), completada (verde), cancelada (rojo). */
    --ds-status-pending: #E8B100;
    --ds-status-pending-fill: #FFF7D7;
    --ds-status-progress: #26A4DD;
    --ds-status-progress-fill: #DCF0FA;
    --ds-status-pause: #8A8E9B;
    --ds-status-pause-fill: #ECEDEF;
    --ds-status-done: #3E9B3A;
    --ds-status-done-fill: #E0EFDF;
    --ds-status-canceled: #D91C5C;
    --ds-status-canceled-fill: #F9DBE5;

    /* Prioridad de las tareas: baja (Enterprise Blue), media (Start Yellow) y alta (Scale Red). */
    --ds-priority-low: #26A4DD;
    --ds-priority-medium: #E8B100;
    --ds-priority-high: #D91C5C;

    --ds-tag-amarillo: #E8B100;
    --ds-tag-amarillo-fill: #FFF7D7;
    --ds-tag-azul: #26A4DD;
    --ds-tag-azul-fill: #DCF0FA;
    --ds-tag-gris: #8A8E9B;
    --ds-tag-gris-fill: #ECEDEF;
    --ds-tag-morado: #7E57C2;
    --ds-tag-morado-fill: #EAE4F5;
    --ds-tag-naranja: #EF7D22;
    --ds-tag-naranja-fill: #FCEADC;
    --ds-tag-rojo: #D91C5C;
    --ds-tag-rojo-fill: #F9DBE5;
    --ds-tag-turquesa: #12A39A;
    --ds-tag-turquesa-fill: #D9F0EF;
    --ds-tag-verde: #3E9B3A;
    --ds-tag-verde-fill: #E0EFDF;

    --ds-radius-xs: 4px;
    --ds-radius-sm: 8px;
    --ds-radius-md: 12px;
    --ds-radius-lg: 16px;
    --ds-radius-pill: 999px;
    --ds-font: "AvenirNext", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ds-bg: #1E1F1F;
    --ds-surface: #2B2C2C;
    --ds-surface-alt: #333535;
    --ds-ink: #E6E7E8;
    --ds-ink-muted: #A2ACBD;
    --ds-divider: #414444;
    --ds-hover: #383B3B;
    --ds-selection: #1C3E50;
    --ds-primary: #26A4DD;
    --ds-primary-hover: #4DB6E4;
    --ds-accent: #26A4DD;
    --ds-on-strong: #1E1F1F;
    --ds-success: #5DBB57;
    --ds-success-hover: #78C873;
    --ds-danger: #E5537F;
    --ds-danger-hover: #EC7A9C;
    --ds-wait-fill: #4A3F12;
    --ds-error-fill: #4A1F2D;
    --ds-ok-fill: #23401A;
    --ds-info-fill: #1C3E50;
    --ds-weekend: #262828;

    --ds-status-pending: #FFCB06;
    --ds-status-pending-fill: #5E5223;
    --ds-status-progress: #26A4DD;
    --ds-status-progress-fill: #2A4956;
    --ds-status-pause: #A2ACBD;
    --ds-status-pause-fill: #484B4F;
    --ds-status-done: #5DBB57;
    --ds-status-done-fill: #374E36;
    --ds-status-canceled: #F0517F;
    --ds-status-canceled-fill: #5A3540;

    --ds-priority-low: #26A4DD;
    --ds-priority-medium: #FFCB06;
    --ds-priority-high: #F0517F;

    --ds-tag-amarillo: #FFCB06;
    --ds-tag-amarillo-fill: #5E5223;
    --ds-tag-azul-fill: #2A4956;
    --ds-tag-gris: #A2ACBD;
    --ds-tag-gris-fill: #484B4F;
    --ds-tag-morado: #A58BE0;
    --ds-tag-morado-fill: #484357;
    --ds-tag-naranja: #F59A50;
    --ds-tag-naranja-fill: #5B4635;
    --ds-tag-rojo: #F0517F;
    --ds-tag-rojo-fill: #5A3540;
    --ds-tag-turquesa: #2DC2B8;
    --ds-tag-turquesa-fill: #2B504E;
    --ds-tag-verde: #5DBB57;
    --ds-tag-verde-fill: #374E36;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ds-bg);
    color: var(--ds-ink);
    font-family: var(--ds-font);
    font-size: 14px;
    line-height: 1.45;
}

a { color: var(--ds-primary); }

[hidden] { display: none !important; }

h1.adm_title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.muted { color: var(--ds-ink-muted); }
.small { font-size: 12px; }

/* BOTONES Y CAMPOS -------------------------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    margin: 0;
    padding: 0 14px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-divider);
    background: var(--ds-surface);
    color: var(--ds-ink);
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover { background: var(--ds-hover); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn:focus-visible, .form-control:focus-visible, .segmented button:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }
.btn-primary { background: var(--ds-primary); border-color: var(--ds-primary); color: var(--ds-on-strong); }
.btn-primary:hover { background: var(--ds-primary-hover); }
.btn-success { background: var(--ds-success); border-color: var(--ds-success); color: var(--ds-on-strong); }
.btn-success:hover { background: var(--ds-success-hover); }
.btn-danger { background: var(--ds-danger); border-color: var(--ds-danger); color: #FFFFFF; }
.btn-danger:hover { background: var(--ds-danger-hover); }
.btn-default { background: var(--ds-surface); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--ds-hover); }
.btn-icon { width: 34px; padding: 0; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-sm.btn-icon { width: 28px; padding: 0; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.form-control {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--ds-divider);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-surface);
    color: var(--ds-ink);
    font: inherit;
}

textarea.form-control { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
select.form-control { padding-right: 6px; }
.form-control::placeholder { color: var(--ds-ink-muted); }

.form-stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label { font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.check input { width: 16px; height: 16px; accent-color: var(--ds-primary); }

.notice {
    padding: 10px 14px;
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-divider);
    background: var(--ds-info-fill);
}
.notice--error { background: var(--ds-error-fill); border-color: var(--ds-danger); }
.notice--wait { background: var(--ds-wait-fill); }

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--ds-divider);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-surface);
    gap: 2px;
}

.segmented button {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ds-ink-muted);
    font: inherit;
    cursor: pointer;
}

.segmented button:hover { background: var(--ds-hover); color: var(--ds-ink); }
.segmented button.active { background: var(--ds-selection); color: var(--ds-ink); font-weight: 500; }
.segmented--sm button { height: 24px; padding: 0 10px; font-size: 13px; }

/* AVATARES, ETIQUETAS Y ESTADOS ------------------------------------------------------------------------------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--avatar-fill, var(--ds-tag-azul-fill));
    color: var(--avatar-ink, var(--ds-ink));
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-transform: uppercase;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 26px; height: 26px; font-size: 11px; }
.avatar--xs { width: 22px; height: 22px; font-size: 10px; }
.avatar--empty { background: transparent; border: 1px dashed var(--cloud-grey); color: var(--ds-ink-muted); }
.avatar--c0 { --avatar-fill: var(--ds-tag-azul-fill); }
.avatar--c1 { --avatar-fill: var(--ds-tag-verde-fill); }
.avatar--c2 { --avatar-fill: var(--ds-tag-morado-fill); }
.avatar--c3 { --avatar-fill: var(--ds-tag-naranja-fill); }
.avatar--c4 { --avatar-fill: var(--ds-tag-turquesa-fill); }
.avatar--c5 { --avatar-fill: var(--ds-tag-rojo-fill); }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    max-width: 160px;
    padding: 0 8px;
    border-radius: var(--ds-radius-xs);
    background: var(--tag-fill);
    color: var(--ds-ink);
    font-size: 12px;
    white-space: nowrap;
}
.tag::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--tag-color); }
.tag > span { overflow: hidden; text-overflow: ellipsis; }
button.tag { border: 1px solid transparent; font: inherit; font-size: 12px; cursor: pointer; }
button.tag.tag--off { background: transparent; border-color: var(--ds-divider); color: var(--ds-ink-muted); }
.tag--azul { --tag-color: var(--ds-tag-azul); --tag-fill: var(--ds-tag-azul-fill); }
.tag--rojo { --tag-color: var(--ds-tag-rojo); --tag-fill: var(--ds-tag-rojo-fill); }
.tag--amarillo { --tag-color: var(--ds-tag-amarillo); --tag-fill: var(--ds-tag-amarillo-fill); }
.tag--verde { --tag-color: var(--ds-tag-verde); --tag-fill: var(--ds-tag-verde-fill); }
.tag--morado { --tag-color: var(--ds-tag-morado); --tag-fill: var(--ds-tag-morado-fill); }
.tag--naranja { --tag-color: var(--ds-tag-naranja); --tag-fill: var(--ds-tag-naranja-fill); }
.tag--turquesa { --tag-color: var(--ds-tag-turquesa); --tag-fill: var(--ds-tag-turquesa-fill); }
.tag--gris { --tag-color: var(--ds-tag-gris); --tag-fill: var(--ds-tag-gris-fill); }

.swatch { display: inline-block; width: 18px; height: 18px; border-radius: var(--ds-radius-xs); background: var(--tag-color); border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.active { border-color: var(--ds-ink); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--ds-radius-pill);
    background: var(--status-fill);
    color: var(--ds-ink);
    font-size: 12px;
    white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--status-color); }
.status--0 { --status-color: var(--ds-status-pending); --status-fill: var(--ds-status-pending-fill); }
.status--1 { --status-color: var(--ds-status-progress); --status-fill: var(--ds-status-progress-fill); }
.status--2 { --status-color: var(--ds-status-pause); --status-fill: var(--ds-status-pause-fill); }
.status--3 { --status-color: var(--ds-status-done); --status-fill: var(--ds-status-done-fill); }
.status--4 { --status-color: var(--ds-status-canceled); --status-fill: var(--ds-status-canceled-fill); }

/* Prioridad: tres barras de altura creciente; se llenan una (baja), dos (media) o tres (alta). */
.priority { display: inline-flex; flex: none; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--ds-ink-muted); white-space: nowrap; }
.priority i { display: inline-block; width: 3px; border-radius: 1px; background: var(--ds-divider); }
.priority i:nth-of-type(1) { height: 6px; }
.priority i:nth-of-type(2) { height: 9px; }
.priority i:nth-of-type(3) { height: 12px; }
.priority span { margin-left: 4px; line-height: 12px; }
.priority--1 { --priority-color: var(--ds-priority-low); }
.priority--2 { --priority-color: var(--ds-priority-medium); }
.priority--3 { --priority-color: var(--ds-priority-high); }
.priority--1 i:nth-of-type(-n+1), .priority--2 i:nth-of-type(-n+2), .priority--3 i { background: var(--priority-color); }

.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ds-ink-muted); white-space: nowrap; }
.due--overdue { color: var(--ds-danger); font-weight: 500; }
.due--today { color: var(--ds-ink); font-weight: 500; }

/* SHELL ------------------------------------------------------------------------------------------------------- */

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 20px;
    background: var(--ds-surface);
    border-bottom: 1px solid var(--ds-divider);
}
.topbar__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ds-ink); font-weight: 700; font-size: 17px; text-decoration: none; }
/* El logo tiene letras en Adm Grey: sobre fondos oscuros va en un recuadro claro para que se lea. */
.topbar__logo { height: 26px; }
:root[data-theme="dark"] .topbar__logo { padding: 2px 4px; border-radius: var(--ds-radius-xs); background: var(--soft-grey); }
.topbar__company { padding-left: 12px; border-left: 1px solid var(--ds-divider); color: var(--ds-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.topbar__spacer { flex: 1; }
.topbar__user { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: var(--ds-radius-pill); background: transparent; color: var(--ds-ink); font: inherit; cursor: pointer; }
.topbar__user:hover { background: var(--ds-hover); }

.realtime-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ds-ink-muted); }
.realtime-status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cloud-grey); }
.realtime-status--on .realtime-status__dot { background: var(--ds-status-done); }
.realtime-status--off .realtime-status__dot { background: var(--ds-danger); }

.menu { position: relative; }
.menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 220px;
    padding: 6px;
    background: var(--ds-surface);
    border: 1px solid var(--ds-divider);
    border-radius: var(--ds-radius-md);
}
.menu__header { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--ds-divider); font-size: 13px; }
.menu__header span { color: var(--ds-ink-muted); }
.menu__item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--ds-radius-sm); background: transparent; color: var(--ds-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.menu__item:hover { background: var(--ds-hover); }
.menu__item--danger { color: var(--ds-danger); }
.menu__item--split { display: flex; justify-content: space-between; gap: 16px; }
.menu__footer { padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--ds-divider); color: var(--ds-ink-muted); font-size: 12px; }

.topbar__nav { display: flex; align-items: center; gap: 4px; }
.topbar__link { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--ds-radius-sm); color: var(--ds-ink-muted); text-decoration: none; white-space: nowrap; }
.topbar__link:hover { background: var(--ds-hover); color: var(--ds-ink); }
.topbar__link.active { background: var(--ds-selection); color: var(--ds-ink); font-weight: 500; }
/* Donde no cabe en la barra, la carga de trabajo pasa al menú del usuario: en el teléfono y entre 901 y 1200 px, donde
   el campo de búsqueda de la barra quedaría demasiado angosto (debajo de 900 px la búsqueda sale de la barra). */
.menu__item--workload { display: none; }

/* Campana y bandeja de notificaciones */
.inbox__button { position: relative; }
.inbox__badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--ds-radius-pill); background: var(--ds-danger); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.inbox__panel { width: min(400px, calc(100vw - 24px)); padding: 0; }
.inbox__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--ds-divider); }
.inbox__head .link-button:disabled { color: var(--ds-ink-muted); cursor: default; }
.inbox__list { max-height: min(480px, 70vh); overflow: auto; padding: 6px; }
.inbox__empty { margin: 0; padding: 24px 12px; text-align: center; }
.inbox__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: var(--ds-radius-sm); }
.inbox__item:hover { background: var(--ds-hover); }
.inbox__item--unread { background: var(--ds-info-fill); }
.inbox__link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ds-ink); text-decoration: none; }
.inbox__text { font-size: 13px; }
.inbox__item--unread .inbox__text { font-weight: 500; }
.inbox__task { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__comment { font-size: 12px; color: var(--ds-ink-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inbox__date { font-size: 12px; color: var(--ds-ink-muted); }
.inbox__mark { flex: none; width: 18px; height: 18px; margin-top: 4px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.inbox__mark::before { content: ""; display: block; width: 10px; height: 10px; margin: 4px; border-radius: 50%; background: var(--ds-accent); }
.inbox__mark:hover { background: var(--ds-surface); }

.page { flex: 1; padding: 24px; width: 100%; max-width: 1600px; margin: 0 auto; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-divider); background: var(--ds-surface); }
.toast--error { border-color: var(--ds-danger); background: var(--ds-error-fill); }
.toast--ok { border-color: var(--ds-success); background: var(--ds-ok-fill); }
.toast--warn { border-color: var(--ds-status-pending); background: var(--ds-wait-fill); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; text-align: center; }

.skeleton-card, .skeleton-row { border-radius: var(--ds-radius-md); background: var(--ds-surface-alt); border: 1px solid var(--ds-divider); animation: pulse 1.4s ease-in-out infinite; }
.skeleton-card { height: 190px; }
.skeleton-row { height: 44px; margin-bottom: 8px; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* LOGIN ------------------------------------------------------------------------------------------------------- */

.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login__hero { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--adm-grey); color: #FFFFFF; }
.login__hero-content { max-width: 420px; }
.login__hero-logo { height: 48px; padding: 6px 10px; border-radius: var(--ds-radius-sm); background: var(--soft-grey); }
.login__hero h2 { margin: 16px 0 8px; font-size: 34px; }
.login__hero p { margin: 0 0 24px; color: var(--soft-grey); font-size: 16px; }
.login__features { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.login__features li { display: flex; gap: 10px; align-items: flex-start; color: var(--soft-grey); }
.login__features li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--enterprise-blue); }
.login__panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login__tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.login__card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; padding: 32px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-lg); }
.login__card p { margin: 0; }
.login__version { text-align: center; }

.option-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.option-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); cursor: pointer; }
.option-card:hover { background: var(--ds-hover); }
.option-card:has(input:checked) { border-color: var(--ds-accent); background: var(--ds-selection); }
.option-card input { accent-color: var(--ds-primary); }
.option-card__text { display: flex; flex-direction: column; }

/* DASHBOARD --------------------------------------------------------------------------------------------------- */

.dashboard__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dashboard__greeting { margin: 0 0 2px; color: var(--ds-ink-muted); }
.dashboard__summary { display: flex; gap: 10px; flex-wrap: wrap; }
.summary-chip { display: flex; flex-direction: column; min-width: 120px; padding: 10px 14px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); }
.summary-chip strong { font-size: 22px; line-height: 1.1; }
.summary-chip span { font-size: 12px; color: var(--ds-ink-muted); }
.summary-chip--danger strong { color: var(--ds-danger); }
.dashboard__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dashboard__search { max-width: 320px; }

/* IMPORTAR DE TRELLO ------------------------------------------------------------------------------------------ */

.trello-import { display: flex; flex-direction: column; gap: 16px; max-width: 920px; }
.trello-import .dashboard__header { margin-bottom: 0; }
.trello-import__lede { margin: 0; }
.import-step { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); }
.import-step__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 600; }
.import-step__number { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--ds-radius-pill); background: var(--ds-selection); color: var(--ds-primary); font-size: 13px; }
.import-step__number--done { background: var(--ds-ok-fill); color: var(--ds-success); }
.import-step__instructions { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.import-step .muted.small, .import-step p { margin: 0; }
.trello-import__boards { max-height: 360px; }
.trello-import__name { max-width: 420px; }
.trello-import__members select { min-width: 220px; }
.help__table.trello-import__members td { vertical-align: middle; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.board-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 190px;
    padding: 18px 18px 16px;
    border: 1px solid var(--ds-divider);
    border-radius: var(--ds-radius-md);
    background: var(--ds-surface);
    color: var(--ds-ink);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.board-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--board-color, var(--ds-accent)); }
.board-card:hover { border-color: var(--board-color, var(--ds-accent)); transform: translateY(-2px); }
.board-card__head { display: flex; align-items: center; gap: 10px; }
.board-card__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: var(--ds-radius-sm); background: var(--board-fill, var(--ds-tag-azul-fill)); font-weight: 700; font-size: 16px; }
.board-card__name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.board-card__badge { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: var(--ds-radius-pill); background: var(--ds-surface-alt); border: 1px solid var(--ds-divider); font-size: 11px; color: var(--ds-ink-muted); }
.board-card__count { display: flex; align-items: baseline; gap: 6px; }
.board-card__count strong { font-size: 30px; line-height: 1; }
.board-card__count span { color: var(--ds-ink-muted); }
.board-card__bar { display: flex; height: 8px; border-radius: var(--ds-radius-pill); background: var(--ds-surface-alt); overflow: hidden; }
.board-card__bar span { display: block; height: 100%; }
.board-card__bar .bar--0 { background: var(--ds-status-pending); }
.board-card__bar .bar--1 { background: var(--ds-status-progress); }
.board-card__bar .bar--2 { background: var(--ds-status-pause); }
.board-card__foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--ds-radius-pill); font-size: 12px; background: var(--ds-surface-alt); border: 1px solid var(--ds-divider); color: var(--ds-ink-muted); }
.pill--danger { background: var(--ds-error-fill); border-color: transparent; color: var(--ds-ink); }
.pill--wait { background: var(--ds-wait-fill); border-color: transparent; color: var(--ds-ink); }
.pill--ok { background: var(--ds-ok-fill); border-color: transparent; color: var(--ds-ink); }

.board-card--new { align-items: center; justify-content: center; border-style: dashed; color: var(--ds-ink-muted); cursor: pointer; font: inherit; }
.board-card--new::before { display: none; }
.board-card--new span:first-child { font-size: 32px; line-height: 1; color: var(--ds-accent); }

/* TABLERO ----------------------------------------------------------------------------------------------------- */

.page--board { max-width: none; }
.board__header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.board__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.board__toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.board__search { max-width: 280px; }
.board__filter { width: auto; max-width: 220px; }
.board__count { margin-left: auto; font-size: 13px; }
#board-truncated { margin-bottom: 12px; }

/* Listado */
.task-table-wrap { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: auto; }
.task-table { width: 100%; border-collapse: collapse; }
.task-table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; background: var(--ds-surface-alt); border-bottom: 1px solid var(--ds-divider); text-align: left; font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); white-space: nowrap; cursor: pointer; user-select: none; }
.task-table th.sorted::after { content: " ▾"; }
.task-table th.sorted.asc::after { content: " ▴"; }
.task-table td { padding: 8px 12px; border-bottom: 1px solid var(--ds-divider); vertical-align: middle; }
.task-table tr:last-child td { border-bottom: 0; }
.task-table tbody tr { cursor: pointer; }
.task-table tbody tr:hover { background: var(--ds-hover); }
.task-table .col-check { width: 40px; }
.task-table .col-field { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-table__group td { padding: 8px 12px; background: var(--ds-surface-alt); font-weight: 600; cursor: default; }
.task-table tbody tr.task-table__group:hover { background: transparent; }
.task-table tbody tr.task-table__group { cursor: default; }
.field-chip { display: inline-flex; align-items: center; height: 22px; max-width: 200px; padding: 0 8px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-pill); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-value--number { font-variant-numeric: tabular-nums; }
.task-table__title { font-weight: 500; }
.task-table__related { display: block; font-size: 12px; color: var(--ds-ink-muted); }
.task-table tr.is-done .task-table__title { text-decoration: line-through; color: var(--ds-ink-muted); }
.person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

.complete-toggle { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 2px solid var(--cloud-grey); border-radius: 50%; background: transparent; color: transparent; cursor: pointer; font-size: 11px; }
.complete-toggle:hover { border-color: var(--ds-status-done); color: var(--ds-status-done); }
.complete-toggle.done { border-color: var(--ds-status-done); background: var(--ds-status-done); color: #FFFFFF; }

/* Kanban */
.kanban { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; min-height: 60vh; }
.kanban__column { flex: 0 0 290px; display: flex; flex-direction: column; max-height: calc(100vh - 220px); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface-alt); }
.kanban__column-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; border-top: 4px solid var(--column-color, var(--cloud-grey)); border-radius: var(--ds-radius-md) var(--ds-radius-md) 0 0; }
.kanban__column-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban__column-count { padding: 0 8px; border-radius: var(--ds-radius-pill); background: var(--ds-surface); border: 1px solid var(--ds-divider); font-size: 12px; color: var(--ds-ink-muted); }
.kanban__cards { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 60px; padding: 4px 10px 10px; overflow-y: auto; }
.kanban__cards.drop-target { background: var(--ds-selection); border-radius: var(--ds-radius-sm); }
.kanban__hint { padding: 16px 8px; text-align: center; font-size: 12px; color: var(--ds-ink-muted); border: 1px dashed var(--ds-divider); border-radius: var(--ds-radius-sm); }
.kanban__add { margin: 0 10px 10px; }
.kanban__add input { height: 32px; }
.kanban__column--new { flex: 0 0 240px; align-items: center; justify-content: center; min-height: 120px; border-style: dashed; background: transparent; color: var(--ds-ink-muted); cursor: pointer; font: inherit; }
.kanban__column[data-status="0"] { --column-color: var(--ds-status-pending); }
.kanban__column[data-status="1"] { --column-color: var(--ds-status-progress); }
.kanban__column[data-status="2"] { --column-color: var(--ds-status-pause); }
.kanban__column[data-status="3"] { --column-color: var(--ds-status-done); }
.kanban__column[data-status="4"] { --column-color: var(--ds-status-canceled); }
.kanban__column[data-group] { --column-color: var(--ds-accent); }

.task-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-sm); background: var(--ds-surface); cursor: pointer; }
.task-card:hover { border-color: var(--ds-accent); }
.task-card[draggable="true"] { cursor: grab; }
.task-card.dragging { opacity: 0.4; }
.task-card.drop-before { box-shadow: none; border-top: 3px solid var(--ds-accent); }
.task-card__title { font-weight: 500; overflow-wrap: anywhere; }
.task-card.is-done .task-card__title { text-decoration: line-through; color: var(--ds-ink-muted); }
.task-card__related { font-size: 12px; color: var(--ds-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card__meta { display: flex; align-items: center; gap: 8px; }
.task-card__meta .spacer { flex: 1; }
.checklist-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ds-ink-muted); white-space: nowrap; }
.checklist-badge--done { color: var(--ds-status-done); }
.boards-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ds-ink-muted); white-space: nowrap; cursor: default; }
.recurrence-badge { display: inline-flex; align-items: center; font-size: 13px; line-height: 1; color: var(--ds-accent); cursor: default; }

/* Gantt */
.gantt { display: grid; grid-template-columns: 280px 1fr; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: hidden; }
.gantt__toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gantt__names { border-right: 1px solid var(--ds-divider); }
.gantt__names-head, .gantt__head { height: 52px; border-bottom: 1px solid var(--ds-divider); background: var(--ds-surface-alt); }
.gantt__names-head { display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 12px; color: var(--ds-ink-muted); }
.gantt__name { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--ds-divider); cursor: pointer; overflow: hidden; }
.gantt__name:hover { background: var(--ds-hover); }
.gantt__name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt__scroll { overflow-x: auto; }
.gantt__canvas { position: relative; }
.gantt__head { position: relative; }
.gantt__month { position: absolute; top: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; padding-left: 6px; border-left: 1px solid var(--ds-divider); }
.gantt__day { position: absolute; bottom: 6px; width: var(--day-width); text-align: center; font-size: 11px; color: var(--ds-ink-muted); }
.gantt__day.today { color: var(--ds-primary); font-weight: 700; }
.gantt__grid { position: absolute; top: 52px; bottom: 0; width: var(--day-width); }
.gantt__grid.weekend { background: var(--ds-weekend); }
.gantt__today { position: absolute; top: 52px; bottom: 0; width: 2px; background: var(--ds-accent); z-index: 2; }
.gantt__row { position: relative; height: 40px; border-bottom: 1px solid var(--ds-divider); }
.gantt__bar { position: absolute; top: 8px; height: 24px; display: flex; align-items: center; padding: 0 8px; border-radius: 6px; background: var(--status-fill); border: 1px solid var(--status-color); color: var(--ds-ink); font-size: 12px; white-space: nowrap; overflow: hidden; z-index: 3; cursor: pointer; user-select: none; touch-action: none; }
.gantt__bar.editable { cursor: grab; }
.gantt__bar.moving { cursor: grabbing; opacity: 0.85; }
.gantt__bar--undated { border-style: dashed; opacity: 0.7; }
.gantt__bar--overdue { border-color: var(--ds-danger); border-width: 2px; }
.gantt__handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gantt__handle--start { left: 0; }
.gantt__handle--end { right: 0; }
.gantt__links { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; overflow: visible; }
.gantt__link { fill: none; stroke: var(--ds-ink-muted); stroke-width: 1.5; }
.gantt__link--conflict { stroke: var(--ds-danger); }
.gantt__arrow { fill: var(--ds-ink-muted); }
.gantt__arrow--conflict { fill: var(--ds-danger); }

/* Calendario */
.calendar__toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calendar__title { margin: 0 8px; font-size: 16px; font-weight: 600; }
.calendar__layout { display: grid; grid-template-columns: 1fr 260px; gap: 14px; align-items: start; }
.calendar { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: hidden; }
.calendar__weekdays, .calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar__weekdays div { padding: 8px; background: var(--ds-surface-alt); border-bottom: 1px solid var(--ds-divider); font-size: 12px; color: var(--ds-ink-muted); text-transform: capitalize; }
.calendar__day { min-height: 116px; padding: 6px; border-right: 1px solid var(--ds-divider); border-bottom: 1px solid var(--ds-divider); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__day.other-month { background: var(--ds-surface-alt); }
.calendar__day.other-month .calendar__date { color: var(--ds-ink-muted); }
.calendar__day.drop-target { background: var(--ds-selection); }
.calendar__date { align-self: flex-end; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; }
.calendar__day.today .calendar__date { background: var(--ds-primary); color: var(--ds-on-strong); font-weight: 600; }
.cal-task { display: flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: var(--ds-radius-xs); background: var(--status-fill); border-left: 3px solid var(--status-color); font-size: 12px; cursor: pointer; overflow: hidden; }
.cal-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task.is-done span { text-decoration: line-through; }
.cal-task--overdue { border-left-color: var(--ds-danger); }
.cal-more { font-size: 12px; color: var(--ds-ink-muted); padding: 0 6px; cursor: pointer; border: 0; background: transparent; text-align: left; font: inherit; font-size: 12px; }
.calendar__undated { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); padding: 12px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 260px); overflow: auto; }
.calendar__undated h2 { margin: 0 0 4px; font-size: 14px; }

/* DETALLE (PANEL LATERAL) Y DIÁLOGOS -------------------------------------------------------------------------- */

.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(43, 44, 44, 0.35); }
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(620px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--ds-surface);
    border-left: 1px solid var(--ds-divider);
}
.drawer__head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--ds-divider); }
.drawer__head .spacer { flex: 1; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 22px; }
.drawer__foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--ds-divider); }
.drawer__foot .spacer { flex: 1; }
.drawer__title { width: 100%; border: 1px solid transparent; border-radius: var(--ds-radius-sm); background: transparent; color: var(--ds-ink); font: inherit; font-size: 20px; font-weight: 600; padding: 4px 6px; resize: none; }
.drawer__title:hover, .drawer__title:focus { border-color: var(--ds-divider); }
.drawer__info { font-size: 12px; color: var(--ds-ink-muted); }
.drawer__notice { margin: 0 18px; margin-top: 12px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.section__title .muted { font-weight: 400; }
.section__title .spacer { flex: 1; }

/* Registro de AdmCloud ligado a la tarea y su buscador */
.related { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.related__value { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.related__actions { display: flex; gap: 4px; }
.related-results { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.related-results__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 0; border-radius: var(--ds-radius-sm); background: transparent; color: var(--ds-ink); font: inherit; text-align: left; cursor: pointer; }
.related-results__item:hover, .related-results__item:focus-visible { background: var(--ds-hover); }
.related-results__item:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: -2px; }
.related-results__more { align-self: center; margin-top: 4px; }

.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker .person-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 2px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-pill); background: transparent; color: var(--ds-ink-muted); font: inherit; font-size: 12px; cursor: pointer; }
.picker .person-chip.selected { background: var(--ds-selection); border-color: var(--ds-accent); color: var(--ds-ink); }

/* Compartida con: los usuarios escogidos (con su botón para quitarlos) y el buscador de empleados para agregar más. */
.picker:empty { display: none; }
.picker span.person-chip { cursor: default; }
.picker .person-chip--removable { padding-right: 2px; }
.person-chip__remove { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--ds-radius-pill); background: transparent; color: var(--ds-ink-muted); font: inherit; font-size: 11px; cursor: pointer; }
.person-chip__remove:hover, .person-chip__remove:focus-visible { background: var(--ds-hover); color: var(--ds-ink); }
.share-search { position: relative; }
.share-search__results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; padding: 4px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); }
.share-search__results[hidden] { display: none; }
.share-search__item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: var(--ds-radius-sm); background: transparent; color: var(--ds-ink); font: inherit; text-align: left; cursor: pointer; }
.share-search__item:hover, .share-search__item.active { background: var(--ds-hover); }
.share-search__empty { margin: 0; padding: 6px 8px; }

/* Repetición de la tarea: tipo, "cada N" y, en la semanal, los días. */
.recurrence__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.recurrence__row select.form-control { width: auto; min-width: 160px; }
.recurrence__every { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ds-ink-muted); }
.recurrence__every .form-control { width: 72px; }
.recurrence__hint { margin: 0; }
.weekday-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday { min-width: 44px; height: 28px; padding: 0 8px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-pill); background: transparent; color: var(--ds-ink-muted); font: inherit; font-size: 12px; cursor: pointer; }
.weekday:hover:not(:disabled) { background: var(--ds-hover); }
.weekday.selected { background: var(--ds-selection); border-color: var(--ds-accent); color: var(--ds-ink); }
.weekday:disabled { cursor: default; }
.weekday:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }

.progress { height: 6px; border-radius: var(--ds-radius-pill); background: var(--ds-surface-alt); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ds-status-done); }

.checklist { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.checklist__item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--ds-radius-sm); }
.checklist__item:hover { background: var(--ds-hover); }
.checklist__item.dragging { opacity: 0.4; }
.checklist__item.drop-before { border-top: 2px solid var(--ds-accent); }
.checklist__handle { cursor: grab; color: var(--ds-ink-muted); user-select: none; }
.checklist__text { flex: 1; overflow-wrap: anywhere; cursor: text; }
.checklist__item.checked .checklist__text { text-decoration: line-through; color: var(--ds-ink-muted); }
.checklist__item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ds-status-done); }
.inline-add { display: flex; gap: 8px; }

/* Subtareas y dependencias del detalle; la insignia de bloqueada va también en tarjetas y listado. */
.relations { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.relation { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--ds-radius-sm); }
.relation:hover { background: var(--ds-hover); }
.relation .relation__text { flex: 1; min-width: 0; color: var(--ds-ink); font-size: inherit; text-align: left; overflow-wrap: anywhere; }
.relation .relation__text:hover { color: var(--ds-primary); text-decoration: underline; }
.relation.is-done .relation__text { text-decoration: line-through; color: var(--ds-ink-muted); }
.blocked-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 0 6px; border: 1px solid var(--ds-danger); border-radius: var(--ds-radius-pill); color: var(--ds-danger); font-size: 11px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.task-card__meta .blocked-badge { margin-left: 0; }
.drawer__parent .link-button { font-size: inherit; }

.task-boards { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.task-boards__item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--ds-radius-sm); }
.task-boards__item:hover { background: var(--ds-hover); }
.task-boards__name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.task-boards__name .pill { white-space: nowrap; }
.task-boards__group { width: 180px; flex: none; }
.task-boards__add select { flex: 1; min-width: 0; }

.comment { display: flex; gap: 10px; }
.comment__body { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface-alt); }
.comment__head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.comment__head strong { font-size: 13px; }
.comment__head .spacer { flex: 1; }
.comment__text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* @menciones: resaltadas en el comentario y lista para elegir al escribir @ */
.mention { padding: 0 3px; border-radius: var(--ds-radius-xs); background: var(--ds-selection); color: var(--ds-primary); font-weight: 500; }
.mention--me { background: var(--ds-wait-fill); color: var(--ds-ink); }
.mention-box { position: relative; }
.mention-list {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 30;
    width: min(300px, 100%);
    max-height: 260px;
    overflow: auto;
    padding: 4px;
    background: var(--ds-surface);
    border: 1px solid var(--ds-divider);
    border-radius: var(--ds-radius-md);
}
.mention-list__item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--ds-radius-sm); background: transparent; color: var(--ds-ink); font: inherit; text-align: left; cursor: pointer; }
.mention-list__item:hover, .mention-list__item.active { background: var(--ds-hover); }
.mention-list__empty { margin: 0; padding: 8px; }

/* Seguidores de la tarea (encabezado del detalle) */
.followers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.followers__label { font-size: 12px; color: var(--ds-ink-muted); }
.followers__avatars { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.followers .btn { margin-left: auto; }
.avatar--more { background: var(--ds-surface-alt); border: 1px solid var(--ds-divider); color: var(--ds-ink-muted); }
.link-button { border: 0; background: transparent; color: var(--ds-primary); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.link-button--danger { color: var(--ds-danger); }

.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-sm); }
.file__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--ds-radius-xs); background: var(--ds-info-fill); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.file__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file__info a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__info span { font-size: 12px; color: var(--ds-ink-muted); }

.modal-backdrop { display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-lg); }
.modal h2 { margin: 0; font-size: 18px; }
.modal p { margin: 0; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; }
.modal__foot .spacer { flex: 1; }
.field-editor { display: flex; flex-direction: column; gap: 6px; }
.field-editor__row { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-sm); }
.field-editor__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.field-editor__info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-editor { display: flex; flex-direction: column; gap: 6px; }
.option-editor__row { display: flex; align-items: center; gap: 6px; }
.tag-editor { display: flex; flex-direction: column; gap: 8px; }
.tag-editor__row { display: flex; align-items: center; gap: 8px; }
.tag-editor__row .tag { flex: 1; max-width: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }

/* AYUDA ------------------------------------------------------------------------------------------------------- */

.page--help { max-width: 1200px; }
.help__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.help__title-row { display: flex; align-items: center; gap: 10px; }
.help__search { max-width: 320px; }
.help__lede { margin: 8px 0 20px; max-width: 760px; }
.help__layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
/* Debajo de la barra superior (56px), que también es sticky. */
.help__toc { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); }
.help__toc a { padding: 4px 8px; border-radius: var(--ds-radius-sm); color: var(--ds-ink); text-decoration: none; font-size: 13px; }
.help__toc a:hover { background: var(--ds-hover); }
.help__toc-group { margin: 10px 8px 2px; font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); }
.help__content { display: flex; flex-direction: column; gap: 16px; }
.help-topic { padding: 18px 22px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); scroll-margin-top: 72px; }
.help-topic h2 { margin: 0 0 6px; font-size: 18px; }
.help-topic h3 { margin: 14px 0 4px; font-size: 15px; }
.help-topic p { margin: 8px 0; }
.help-topic ul, .help-topic ol { margin: 8px 0; padding-left: 22px; }
.help-topic li { margin: 4px 0; }
.help-topic .notice { margin-top: 12px; }
.help-topic__pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.help__table-wrap { overflow-x: auto; }
.help__table { width: 100%; border-collapse: collapse; }
.help__table th, .help__table td { padding: 8px 10px; border-bottom: 1px solid var(--ds-divider); text-align: left; vertical-align: top; }
.help__table th { font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); }
.help__table tr:last-child td { border-bottom: none; }
.help__table td:first-child { white-space: nowrap; }
kbd { display: inline-block; min-width: 22px; padding: 0 6px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-xs); background: var(--ds-surface-alt); font: inherit; font-size: 12px; text-align: center; }

/* MIS TAREAS -------------------------------------------------------------------------------------------------- */

.my-tasks__sections { display: flex; flex-direction: column; gap: 14px; }
.my-tasks__section { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: hidden; }
.my-tasks__section > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--ds-surface-alt); cursor: pointer; user-select: none; list-style: none; }
.my-tasks__section > summary::-webkit-details-marker { display: none; }
.my-tasks__section > summary::before { content: "▸"; color: var(--ds-ink-muted); transition: transform 0.15s; }
.my-tasks__section[open] > summary::before { transform: rotate(90deg); }
.my-tasks__section[open] > summary { border-bottom: 1px solid var(--ds-divider); }
.my-tasks__section-name { font-weight: 500; }
.my-tasks__section--overdue .my-tasks__section-name { color: var(--ds-danger); }
.my-tasks__list { margin: 0; padding: 0; list-style: none; }
.my-task { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--ds-divider); cursor: pointer; }
.my-task:last-child { border-bottom: 0; }
.my-task:hover { background: var(--ds-hover); }
.my-task__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-ink); font-weight: 500; text-decoration: none; }
.my-task.is-done .my-task__title { text-decoration: line-through; color: var(--ds-ink-muted); }
.my-task__board { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.my-task__board:hover { border-color: var(--ds-accent); color: var(--ds-ink); }
.my-task__due { flex: none; min-width: 110px; text-align: right; }

/* BÚSQUEDA --------------------------------------------------------------------------------------------------- */

.topbar__search { width: 220px; }
.menu__item--narrow { display: none; }
.topbar__search .form-control { height: 32px; }

.search-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.search-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; }
.saved-filters__title { margin: 8px 0 4px; font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); }
.saved-filters__empty { margin: 0; font-size: 13px; }
.saved-filters__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.saved-filter { display: flex; align-items: center; gap: 4px; padding-right: 4px; border-radius: var(--ds-radius-sm); }
.saved-filter:hover { background: var(--ds-hover); }
.saved-filter.active { background: var(--ds-selection); }
.saved-filter__link { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 7px 10px; color: var(--ds-ink); text-decoration: none; }
.saved-filter.active .saved-filter__name { font-weight: 500; }
.saved-filter__name, .saved-filter__owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-filter__owner { font-size: 12px; }
.saved-filter__shared { flex: none; color: var(--ds-ink-muted); font-size: 13px; }

.search__filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.search__text { max-width: 560px; }
.search__filter-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.search__select { width: auto; max-width: 220px; }
.search__range { display: inline-flex; align-items: center; gap: 6px; }
.search__range .muted, .search__sort .muted, #search-count { white-space: nowrap; }
.search__range .form-control { width: 150px; }
.search__field { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.search__field-value { width: 160px; }
.search__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.search__sort { display: inline-flex; align-items: center; gap: 6px; }
.search__sort .form-control { width: auto; }
.search__results { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: hidden; }
.search__results[aria-busy="true"] { opacity: 0.6; }
.search__pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.search-result__tags { flex: none; max-width: 240px; flex-wrap: nowrap; overflow: hidden; }
.search-result__people { flex: none; display: inline-flex; }

/* Filtro de varios valores: botón con el resumen y una lista de casillas. */
.multi-select__button { max-width: 260px; font-weight: 400; }
.multi-select__button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.multi-select__button.is-active { border-color: var(--ds-accent); background: var(--ds-selection); }
.multi-select__label { color: var(--ds-ink-muted); }
.multi-select .menu__panel { left: 0; right: auto; width: 260px; }
.multi-select__find { margin-bottom: 6px; }
.multi-select__options { display: flex; flex-direction: column; max-height: 300px; overflow: auto; }
.multi-select__option { padding: 6px 8px; border-radius: var(--ds-radius-sm); white-space: normal; }
.multi-select__option:hover { background: var(--ds-hover); }

/* IMPORTAR DE ASANA ------------------------------------------------------------------------------------------- */

.page--import { max-width: 1100px; }
.import__lede { margin: 0 0 18px; max-width: 760px; }
.import__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.import__card { padding: 20px; background: var(--ds-surface); border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); }
.import__card h2 { margin: 0 0 10px; font-size: 16px; }
.import__card > .segmented { align-self: flex-start; }
.import__token-row { display: flex; gap: 8px; }
.import__help { margin: 0; }
.import__projects-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.import__projects { max-height: 320px; margin-top: 6px; }
.import__projects .option-card__text { flex: 1; min-width: 0; }
.import__options { display: flex; flex-direction: column; gap: 8px; }
.import__options .check { white-space: normal; }
.import__file { height: auto; padding: 6px 10px; }
.import__map { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.import__bar { height: 8px; margin: 12px 0; overflow: hidden; border-radius: var(--ds-radius-pill); background: var(--ds-surface-alt); border: 1px solid var(--ds-divider); }
.import__bar span { display: block; height: 100%; width: 0; background: var(--ds-accent); transition: width 0.3s ease; }
.import__bar--indeterminate span { width: 30%; animation: import-slide 1.4s ease-in-out infinite; }
@keyframes import-slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.import__summary { margin: 12px 0; }
.import__boards { margin-bottom: 12px; }
.import__warnings { margin-bottom: 12px; }
.import__warnings summary { cursor: pointer; color: var(--ds-ink-muted); }
.import__warnings ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

/* PLANTILLAS ------------------------------------------------------------------------------------------------- */

.templates__sections { display: flex; flex-direction: column; gap: 28px; }
.templates__section { display: flex; flex-direction: column; gap: 8px; }
.templates__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.templates__title { margin: 0; font-size: 18px; }
.templates__section > p { margin: 0; }
/* Las dos tablas con las mismas columnas, alineadas una debajo de la otra. */
.templates__table { table-layout: fixed; min-width: 760px; }
.templates__table th { cursor: default; }
.templates__table th:nth-child(2) { width: 80px; }
.templates__table th:nth-child(3) { width: 150px; }
.templates__table th:nth-child(4) { width: 220px; }
.templates__table th:nth-child(5) { width: 120px; }
.templates__table th:nth-child(6) { width: 290px; }
.templates__table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.templates__table tbody tr { cursor: default; }
.templates__actions { display: flex; justify-content: flex-end; gap: 6px; }
.templates__actions .btn { margin: 0; }
.templates__empty { padding: 28px 16px; border: 1px dashed var(--ds-divider); border-radius: var(--ds-radius-md); }

/* REGLAS DEL TABLERO ------------------------------------------------------------------------------------------ */

.page--rules { max-width: 960px; }
.rules__heading { min-width: 0; }
.rules__heading .dashboard__greeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules__intro { margin: 0 0 16px; }
.rules__list { display: flex; flex-direction: column; gap: 12px; }
.rule-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); }
.rule-card--off { background: var(--ds-surface-alt); }
.rule-card--off .rule-card__body { color: var(--ds-ink-muted); }
.rule-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule-card__name { margin: 0; font-size: 15px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rule-card__body { display: flex; flex-direction: column; gap: 6px; }
.rule-card__part { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: baseline; }
.rule-card__label { font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); text-transform: uppercase; }
.rule-card__actions { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.rule-card__foot { margin: 0; }
.modal--wide { width: min(640px, 100%); }
.rule-form__value:empty { display: none; }
.rule-form__value { margin-top: 6px; }
.rule-form__actions { display: flex; flex-direction: column; gap: 8px; }
.rule-action { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 28px; gap: 8px; align-items: start; }
.rule-action__value:empty { display: none; }
.rule-action__value:empty + .btn { grid-column: 3; }

/* CARGA DE TRABAJO ---------------------------------------------------------------------------------------------- */
/* Celdas por capacidad con los tonos de la marca: normal (Enterprise Blue), cerca del límite (Start Yellow) y
   sobrecargada (Scale Red). Los valores oscuros vienen de los tokens. */

.workload__toolbar { gap: 10px; }
.workload__nav { display: flex; gap: 4px; margin-left: auto; }
.workload__nav .btn { margin: 0; }
.workload__legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; color: var(--ds-ink-muted); }
.workload__swatch { display: inline-block; width: 14px; height: 14px; margin-left: 8px; border-radius: var(--ds-radius-xs); border: 1px solid var(--ds-divider); }
.workload__swatch:first-child { margin-left: 0; }
.workload__grid { border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-md); background: var(--ds-surface); overflow: auto; max-height: calc(100vh - 250px); }
.workload__grid .skeleton-row { margin: 8px; }
.workload-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.workload-table th, .workload-table td { padding: 4px; border-bottom: 1px solid var(--ds-divider); text-align: center; white-space: nowrap; }
.workload-table thead th { position: sticky; top: 0; z-index: 2; padding: 8px 6px; background: var(--ds-surface-alt); font-size: 12px; font-weight: 500; color: var(--ds-ink-muted); }
.workload-table thead th.is-weekend { background: var(--ds-weekend); }
.workload-table thead th.is-current { color: var(--ds-ink); background: var(--ds-selection); }
.workload-table tr:last-child td { border-bottom: 0; }
.workload-table .workload__person { position: sticky; left: 0; z-index: 1; min-width: 220px; max-width: 260px; padding: 6px 12px; background: var(--ds-surface); border-right: 1px solid var(--ds-divider); text-align: left; }
.workload-table thead .workload__person { z-index: 3; background: var(--ds-surface-alt); }
.workload-table .workload__extra { border-left: 1px solid var(--ds-divider); }
.workload__person-main { display: flex; align-items: center; gap: 8px; }
.workload__person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.workload__person-capacity { display: block; margin-left: 30px; font-size: 12px; color: var(--ds-ink-muted); }
.workload__person.is-inactive .workload__person-name { color: var(--ds-ink-muted); font-style: italic; }
.workload-table tr.is-drop-target td { background: var(--ds-selection); }
.workload-cell {
    width: 100%;
    min-width: 46px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-xs);
    background: transparent;
    color: var(--ds-ink);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.workload-cell:hover { border-color: var(--ds-accent); }
.workload-cell:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }
.workload-cell:disabled { cursor: default; color: var(--ds-ink-muted); }
.workload-cell:disabled:hover { border-color: transparent; }
.workload-cell--1 { background: var(--ds-info-fill); }
.workload-cell--2 { background: var(--ds-wait-fill); font-weight: 500; }
.workload-cell--3 { background: var(--ds-error-fill); border-color: var(--ds-danger); color: var(--ds-danger); font-weight: 700; }
.workload-cell--plain { background: var(--ds-surface-alt); }
.workload-cell.is-selected { outline: 2px solid var(--ds-primary); outline-offset: 1px; }
.workload__empty { margin: 0; padding: 32px 16px; text-align: center; }

.workload-panel { width: min(460px, 100vw); }
.workload-panel__subtitle { margin: 0; font-size: 12px; color: var(--ds-ink-muted); }
.workload-panel .drawer__body { gap: 8px; padding: 12px; }
.workload-task { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--ds-divider); border-radius: var(--ds-radius-sm); background: var(--ds-surface); }
.workload-task[draggable="true"] { cursor: grab; }
.workload-task.is-dragging { opacity: 0.5; }
.workload-task__title { font-weight: 500; color: var(--ds-ink); text-decoration: none; overflow-wrap: anywhere; }
.workload-task__title:hover { color: var(--ds-primary); text-decoration: underline; }
.workload-task__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ds-ink-muted); }
.workload-task__reassign { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ds-ink-muted); }
.workload-task__reassign select { flex: 1; height: 30px; }

/* PANTALLAS ANGOSTAS ------------------------------------------------------------------------------------------ */

@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .login__hero { display: none; }
    .login__panel { padding-top: 66px; }
    .page { padding: 16px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar__company, .topbar__user-name, .realtime-status__label { display: none; }
    .board__title { max-width: 60vw; }
    .board__count { margin-left: 0; }
    .calendar__layout { grid-template-columns: 1fr; }
    .calendar__day { min-height: 80px; }
    .gantt { grid-template-columns: 150px 1fr; }
    .field-row, .field-row--3, .field-grid { grid-template-columns: 1fr; }
    .task-boards__item, .task-boards__add { flex-wrap: wrap; }
    .task-boards__name { flex-basis: 100%; }
    .task-boards__group { flex: 1; width: auto; }
    .task-table .col-hide-sm { display: none; }
    /* Sin espacio para otro botón en la barra: la ayuda queda en el menú del usuario. */
    .topbar__help { display: none; }
    /* Tampoco cabe el enlace a las plantillas: se abren desde el menú del usuario (menu__item--narrow). */
    .topbar__link--templates { display: none; }
    .help__search { max-width: none; }
    /* El índice pasa arriba, en fichas que se acomodan en varias líneas. */
    .help__layout { grid-template-columns: minmax(0, 1fr); }
    .help__toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
    .help__toc-group { flex-basis: 100%; margin: 6px 8px 0; }
    .help__toc a { border: 1px solid var(--ds-divider); }
    .help-topic { padding: 16px; }
    .help__table td:first-child { white-space: normal; }
    .topbar__brand span { display: none; }
    /* La campana no queda en el borde derecho: el panel ocupa el ancho de la pantalla bajo la barra. */
    .inbox__panel { position: fixed; top: 62px; left: 12px; right: 12px; width: auto; }
    .my-task { flex-wrap: wrap; }
    .my-task__title { flex-basis: calc(100% - 40px); }
    .my-task__due { min-width: 0; text-align: left; }
    /* La búsqueda se abre desde la barra ("Buscar"); el menú lateral pasa arriba de los resultados. */
    .topbar__search, .topbar__link--search { display: none; }
    .menu__item--narrow { display: block; }
    .search__range { flex-wrap: wrap; }
    .search__range .form-control { flex: 1; width: auto; min-width: 120px; }
    .search__bar { flex-wrap: wrap; }
    /* El total en su línea: el orden y su sentido quedan juntos debajo. */
    #search-count { flex-basis: 100%; }
    .search-layout { grid-template-columns: minmax(0, 1fr); }
    .search-sidebar { position: static; }
    .search-result__tags { max-width: 100%; }
    .import__layout { grid-template-columns: minmax(0, 1fr); }
    .import__token-row { flex-wrap: wrap; }
    .import-step { padding: 16px; }
    .trello-import__members select { min-width: 0; }
    .templates__actions { flex-wrap: wrap; justify-content: flex-start; }


    .rule-card__part { grid-template-columns: 1fr; gap: 2px; }
    .rule-action { grid-template-columns: minmax(0, 1fr) 28px; }
    .rule-action__value { grid-column: 1; }
    .rule-action > .btn { grid-column: 2; grid-row: 1; }
    .workload__nav { margin-left: 0; }
    .workload-table .workload__person { min-width: 150px; max-width: 170px; }
    .workload__person-capacity { margin-left: 0; }
}

@media (max-width: 560px), (min-width: 901px) and (max-width: 1200px) {
    .topbar__link--workload { display: none; }
    .menu__item--workload { display: block; }
}
