/* ========================================================================== */
/* ENLACE UX v15                                                              */
/* Final presentation layer over styles-v12.css. No behaviour lives here.     */
/* ========================================================================== */

:root {
    color-scheme: light;

    /* Neutral product palette: colour is reserved for state and action. */
    --ux-white: #ffffff;
    --ux-subtle: #f7f7f5;
    --ux-ink: #191919;
    --ux-line: #e7e7e3;
    --ux-line-strong: #d7d7d2;
    --ux-muted: #6b6b65;
    --ux-faint: #9b9b94;
    --ux-hover: #efefec;
    --ux-pressed: #e9e9e5;
    --ux-accent: #2f6f4e;
    --ux-accent-strong: #245a3e;
    --ux-accent-soft: #edf5f0;
    --ux-danger: #b42318;
    --ux-danger-soft: #fff1f0;
    --ux-warning: #9a6700;
    --ux-warning-soft: #fff8e7;
    --ux-success: #18794e;
    --ux-success-soft: #edf7f1;

    /* Compatibility tokens consumed by the existing application. */
    --bg: var(--ux-white);
    --canvas: var(--ux-white);
    --surface: var(--ux-white);
    --surface-soft: var(--ux-subtle);
    --sidebar: var(--ux-subtle);
    --line: var(--ux-line);
    --border: var(--ux-line);
    --line-strong: var(--ux-line-strong);
    --text: var(--ux-ink);
    --ink: var(--ux-ink);
    --muted: var(--ux-muted);
    --faint: var(--ux-faint);
    --brand: var(--ux-accent);
    --brand-strong: var(--ux-accent-strong);
    --brand-soft: var(--ux-accent-soft);
    --accent: var(--ux-accent);
    --accent-dark: var(--ux-accent-strong);
    --accent-soft: var(--ux-accent-soft);
    --primary: var(--ux-accent);
    --green: var(--ux-success);
    --amber: var(--ux-warning);
    --warning: var(--ux-warning);
    --warning-soft: var(--ux-warning-soft);
    --red: var(--ux-danger);

    --radius: 8px;
    --radius-lg: 10px;
    --ux-radius-sm: 6px;
    --ux-radius: 8px;
    --ux-radius-lg: 10px;
    --ux-control-height: 38px;
    --ux-row-height: 46px;
    --ux-page-gap: clamp(20px, 3vw, 42px);
    --ux-card-padding: 16px;
    --shadow: 0 1px 2px rgba(25, 25, 25, .035);
    --shadow-raised: 0 10px 30px rgba(25, 25, 25, .09);
    --ux-shadow-popover: 0 14px 40px rgba(25, 25, 25, .13);
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-density="compact"],
.density-compact {
    --ux-control-height: 34px;
    --ux-row-height: 40px;
    --ux-card-padding: 12px;
}

body[data-density="comfortable"],
.density-comfortable {
    --ux-control-height: 42px;
    --ux-row-height: 52px;
    --ux-card-padding: 18px;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--ux-white);
}

body {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--ux-white);
    color: var(--ux-ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: -.006em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: color-mix(in srgb, var(--ux-accent) 16%, transparent);
}

* {
    scrollbar-color: #c9c9c4 transparent;
}

*:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--ux-accent) 68%, white);
    outline-offset: 2px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
[role="button"],
[draggable="true"] {
    -webkit-tap-highlight-color: transparent;
}

svg {
    flex: 0 0 auto;
}

h1,
h2,
h3,
h4,
strong {
    color: var(--ux-ink);
}

h1,
h2,
h3 {
    letter-spacing: -.026em;
}

h1,
h2 {
    font-weight: 650;
}

.eyebrow,
.section-label,
.sidebar-group-label {
    color: var(--ux-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.muted-text,
.section-description {
    color: var(--ux-muted);
}

.text-link {
    color: var(--ux-muted);
    text-underline-offset: 3px;
}

.text-link:hover {
    color: var(--ux-ink);
}

/* -------------------------------------------------------------------------- */
/* App frame, navigation and universal controls                               */
/* -------------------------------------------------------------------------- */

.app-shell,
.workspace,
.page-frame,
.view-section {
    min-width: 0;
}

@media (min-width: 961px) {
    .sidebar {
        width: 244px;
    }

    .workspace {
        width: calc(100% - 244px);
        margin-left: 244px;
    }

    body[data-sidebar="compact"] .sidebar {
        width: 216px;
    }

    body[data-sidebar="compact"] .workspace {
        width: calc(100% - 216px);
        margin-left: 216px;
    }
}

.sidebar {
    padding: 10px 8px;
    gap: 8px;
    overflow: hidden auto;
    background: var(--ux-subtle);
    border-right: 1px solid var(--ux-line);
}

.workspace-selector,
.brand-block {
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: var(--ux-radius);
    background: transparent;
}

.workspace-selector:hover {
    background: var(--ux-hover);
}

.brand-mark {
    border-radius: 7px !important;
    background: var(--ux-ink) !important;
    box-shadow: none !important;
}

.sidebar-nav,
.workspace-tree {
    gap: 2px;
}

.workspace-tree {
    margin-top: 5px;
    padding-top: 7px;
    border-top-color: var(--ux-line);
}

/* El rótulo vive en index; el encabezado dinámico conserva solo su acción +. */
.workspace-tree-head > span {
    display: none;
}

.sidebar-group-label {
    margin: 12px 10px 4px;
}

.nav-item {
    min-height: 38px;
    padding: 7px 10px;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: var(--ux-radius);
    color: var(--ux-muted);
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color .12s ease, color .12s ease;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
}

.nav-item:hover {
    color: var(--ux-ink);
    background: var(--ux-hover);
}

.nav-item.active {
    color: var(--ux-ink);
    background: var(--ux-pressed);
    border-color: transparent;
    box-shadow: none;
}

.nav-item.active svg {
    color: var(--ux-ink);
}

.sidebar-section {
    padding-top: 8px;
    border-top: 1px solid var(--ux-line);
}

.team-row,
.sync-indicator {
    border-radius: var(--ux-radius);
}

.team-row {
    min-height: 46px;
    padding: 7px 8px;
}

.team-row.active {
    background: transparent;
    border-color: transparent;
}

.team-row:hover {
    background: var(--ux-hover);
}

.topbar {
    min-height: 66px;
    padding: 10px var(--ux-page-gap);
    gap: 16px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--ux-line);
    backdrop-filter: blur(16px) saturate(120%);
}

.topbar #page-title {
    color: var(--ux-ink) !important;
    font-size: 18px !important;
    font-weight: 650 !important;
    letter-spacing: -.02em;
}

.topbar #page-kicker,
.breadcrumbs {
    color: var(--ux-faint) !important;
}

.breadcrumbs strong,
.breadcrumbs a {
    color: var(--ux-muted);
}

.top-actions {
    gap: 7px !important;
}

.page-frame {
    width: min(1380px, 100%);
    max-width: none;
    margin-inline: auto;
    padding: 26px var(--ux-page-gap) 58px;
}

.intro-row,
.page-title-row {
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--ux-line);
}

.intro-row .muted-text,
.page-title-row .section-description {
    max-width: 720px;
    margin-bottom: 0;
}

.btn,
.icon-btn,
.plane-dropdown-btn,
.filter-control,
.field,
.task-action-btn {
    border-color: var(--ux-line);
    border-radius: var(--ux-radius);
    box-shadow: none;
}

.btn,
.icon-btn,
.plane-dropdown-btn {
    min-height: var(--ux-control-height);
}

.btn {
    padding-inline: 13px;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.006em;
}

.btn.small {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 12px;
}

.icon-btn {
    width: var(--ux-control-height);
    color: var(--ux-muted);
}

.icon-btn.compact {
    width: 30px;
    min-height: 30px;
}

.btn svg,
.icon-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}

.btn.primary,
.icon-btn.dark {
    color: #fff;
    background: var(--ux-ink);
    border-color: var(--ux-ink);
    box-shadow: none;
}

.btn.primary:hover,
.icon-btn.dark:hover {
    background: #30302d;
    border-color: #30302d;
}

.btn.secondary,
.btn.quiet,
.icon-btn,
.plane-dropdown-btn {
    color: var(--ux-muted);
    background: var(--ux-white);
}

.btn.secondary:hover,
.btn.quiet:hover,
.icon-btn:hover,
.plane-dropdown-btn:hover {
    color: var(--ux-ink);
    background: var(--ux-subtle);
    border-color: var(--ux-line-strong);
}

.btn.danger,
.icon-btn.danger {
    color: var(--ux-danger);
    background: var(--ux-white);
    border-color: var(--ux-line);
}

.btn.danger:hover,
.icon-btn.danger:hover {
    color: var(--ux-danger);
    background: var(--ux-danger-soft);
    border-color: #efc4bf;
}

.plane-dropdown-btn {
    padding: 0 11px;
    font-size: 12px;
}

.plane-dropdown-btn kbd {
    color: var(--ux-faint) !important;
    background: var(--ux-subtle) !important;
    border-color: var(--ux-line) !important;
}

.field,
.filter-control,
input[type="search"],
input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
    color: var(--ux-ink);
    border-color: var(--ux-line);
    background-color: var(--ux-white);
}

.field,
.filter-control {
    min-height: var(--ux-control-height);
    padding-inline: 11px;
}

input::placeholder,
textarea::placeholder,
.field::placeholder,
.filter-control::placeholder {
    color: var(--ux-faint);
    opacity: 1;
}

.field:hover,
.filter-control:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--ux-line-strong);
}

.field:focus,
.filter-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--ux-accent) 58%, var(--ux-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ux-accent) 10%, transparent);
    outline: none;
}

/* -------------------------------------------------------------------------- */
/* Shared surfaces, toolbars and progressive density                          */
/* -------------------------------------------------------------------------- */

.panel,
.metric-block,
.progress-card,
.project-card,
.contact-card,
.focus-card,
.project-custom-view,
.project-overview-progress,
.ux-task-table,
.enhanced-calendar,
.timeline-shell {
    min-width: 0;
    color: var(--ux-ink);
    background: var(--ux-white);
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    box-shadow: var(--shadow);
}

.panel,
.focus-card,
.project-custom-view,
.project-overview-progress {
    padding: var(--ux-card-padding);
}

.panel-heading {
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.panel-heading h3,
.focus-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
}

.metric-block {
    min-height: 108px;
    padding: 15px 16px;
}

.metric-block span {
    color: var(--ux-muted);
    font-size: 12px;
    font-weight: 500;
}

.metric-block strong {
    margin-top: 5px;
    font-size: 27px;
    line-height: 1.05;
    font-weight: 650;
    letter-spacing: -.04em;
}

.metric-block small {
    margin-top: auto;
    color: var(--ux-faint);
    font-size: 11px;
}

.plane-toolbar,
.project-toolbar,
.calendar-toolbar,
.directory-toolbar,
.trash-toolbar,
.report-toolbar,
.filter-bar {
    min-width: 0;
    padding: 9px;
    gap: 8px;
    margin-bottom: 14px;
    background: var(--ux-white);
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    box-shadow: none;
}

.plane-toolbar,
.project-toolbar,
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plane-toolbar-left,
.plane-toolbar-right,
.project-toolbar > div,
.calendar-toolbar > div,
.project-toolbar-actions,
.calendar-toolbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.view-toggle-group,
.project-view-tabs {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    background: var(--ux-subtle);
    overflow-x: auto;
    scrollbar-width: none;
}

.view-toggle-group::-webkit-scrollbar,
.project-view-tabs::-webkit-scrollbar {
    display: none;
}

.view-toggle-btn,
.project-view-tabs button,
.project-view-tabs a {
    flex: 0 0 auto;
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    color: var(--ux-muted);
    background: transparent;
    font-size: 12px;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}

.view-toggle-btn:hover,
.project-view-tabs button:hover,
.project-view-tabs a:hover {
    color: var(--ux-ink);
}

.view-toggle-btn.active,
.project-view-tabs .active,
.project-view-tabs [aria-selected="true"] {
    color: var(--ux-ink);
    background: var(--ux-white);
    box-shadow: 0 1px 2px rgba(25, 25, 25, .08);
}

.task-item,
.file-row,
.expense-row,
.activity-row,
.trash-row,
.automation-row,
.saved-report-row,
.public-list-item {
    min-width: 0;
    min-height: var(--ux-row-height);
    border-color: var(--ux-line);
    border-radius: var(--ux-radius);
    background: var(--ux-white);
    box-shadow: none;
}

.task-item {
    padding: 10px 11px;
}

.task-title {
    color: var(--ux-ink);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.task-meta {
    color: var(--ux-muted);
    font-size: 11px;
}

.task-actions,
.task-card-footer,
.row-actions {
    transition: opacity .12s ease;
}

.task-card-footer {
    padding-top: 8px;
    border-top-color: var(--ux-line);
}

.task-item.expanded {
    border-color: color-mix(in srgb, var(--ux-accent) 30%, var(--ux-line));
    box-shadow: var(--shadow-raised);
}

.task-expanded-summary,
.drawer-properties-table {
    border-color: var(--ux-line);
    background: var(--ux-subtle);
}

.task-drag-handle {
    color: var(--ux-faint);
}

.task-item.is-dragging,
.ux-mobile-task-card.is-dragging,
.project-card.is-dragging {
    opacity: .46;
    transform: scale(.99);
}

.task-item.is-selected,
.ux-mobile-task-card.is-selected,
.task-item[aria-selected="true"],
.ux-mobile-task-card[aria-selected="true"] {
    border-color: color-mix(in srgb, var(--ux-accent) 40%, var(--ux-line));
    background: var(--ux-accent-soft);
}

.bulk-action-bar {
    color: var(--ux-ink);
    background: var(--ux-subtle);
    border-color: var(--ux-line-strong);
    box-shadow: none;
}

.is-drag-over,
.kanban-column.is-drag-over,
.project-task-board .is-drag-over {
    border-color: color-mix(in srgb, var(--ux-accent) 56%, var(--ux-line)) !important;
    background: var(--ux-accent-soft) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ux-accent) 24%, transparent) !important;
}

.checkbox-circle {
    border-color: var(--ux-line-strong);
}

.checkbox-circle:hover {
    border-color: var(--ux-accent);
    background: var(--ux-accent-soft);
}

.task-item.completed .checkbox-circle {
    background: var(--ux-success);
    border-color: var(--ux-success);
}

.status-pill,
.task-status-chip,
.expense-status,
.movement-type,
.workflow-state-pill,
.priority-badge {
    border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0;
}

.status-pill,
.task-status-chip {
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border-color: var(--ux-line);
}

.priority-badge {
    padding: 2px 7px;
    text-transform: none;
    font-size: 10px;
}

.priority-high,
.priority-urgent {
    color: var(--ux-danger);
    background: var(--ux-danger-soft);
}

.priority-medium {
    color: var(--ux-warning);
    background: var(--ux-warning-soft);
}

.priority-low {
    color: var(--ux-success);
    background: var(--ux-success-soft);
}

@media (hover: hover) {
    .task-item:hover,
    .file-row:hover,
    .expense-row:hover,
    .activity-row:hover,
    .trash-row:hover,
    .automation-row:hover,
    .saved-report-row:hover,
    .project-card:hover,
    .focus-card:hover {
        border-color: var(--ux-line-strong);
        background: #fdfdfc;
        box-shadow: 0 4px 14px rgba(25, 25, 25, .035);
    }

    .task-item:not(:hover):not(:focus-within) .task-actions,
    .task-item:not(:hover):not(:focus-within) .row-actions {
        opacity: .58;
    }
}

/* -------------------------------------------------------------------------- */
/* Focused dashboard                                                          */
/* -------------------------------------------------------------------------- */

.dashboard-focus {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-focus > * {
    min-width: 0;
}

.focus-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-height: 148px;
    overflow: hidden;
}

.focus-card.primary,
.focus-card.focus-card-primary,
.focus-card[data-emphasis="primary"] {
    min-height: 196px;
    grid-row: span 2;
}

.focus-card-header,
.focus-card-head,
.focus-card-title-row {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.focus-card-title,
.focus-card h3 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.focus-card-kicker,
.focus-card-label {
    margin: 0 0 3px;
    color: var(--ux-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.focus-card-body,
.focus-card-list {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.focus-card-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.focus-card-item {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: var(--ux-radius);
}

.focus-card-item:hover {
    border-color: var(--ux-line);
    background: var(--ux-subtle);
}

.focus-card-item > :nth-child(2),
.focus-card-item-main {
    min-width: 0;
    flex: 1;
}

.focus-card-item strong,
.focus-card-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-card-item small,
.focus-card-meta {
    color: var(--ux-muted);
    font-size: 11px;
}

.focus-card-stat {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1;
    font-weight: 650;
    letter-spacing: -.055em;
}

.focus-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: auto;
}

.focus-card-progress,
.project-overview-progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--ux-line);
}

.focus-card-progress > span,
.project-overview-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ux-accent);
    transition: width .25s ease;
}

/* -------------------------------------------------------------------------- */
/* Project catalogue and project workspace                                    */
/* -------------------------------------------------------------------------- */

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

.project-card {
    position: relative;
    min-height: 176px;
    padding: 16px;
    overflow: hidden;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.project-card header {
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-card strong {
    font-size: 15px;
    font-weight: 650;
}

.project-stats {
    gap: 7px;
}

.project-stats > * {
    min-width: 0;
    padding: 8px;
    border-radius: var(--ux-radius);
    background: var(--ux-subtle);
}

.project-stats span {
    color: var(--ux-muted);
    font-size: 10px;
}

.project-stats b {
    font-size: 16px;
    font-weight: 650;
}

.project-progress-track,
.progress-bar-container {
    background: var(--ux-line);
}

.project-progress-fill,
.progress-bar-fill {
    background: var(--ux-accent);
}

.project-detail-view,
.project-custom-view {
    min-width: 0;
}

.project-detail-back-btn {
    min-height: 36px;
    margin-bottom: 14px;
    padding: 0 10px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    color: var(--ux-muted);
    background: var(--ux-white);
}

.project-detail-back-btn:hover {
    color: var(--ux-ink);
    background: var(--ux-subtle);
    border-color: var(--ux-line-strong);
}

.project-detail-header {
    gap: 18px;
    margin-bottom: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ux-line);
}

.project-detail-header-left {
    min-width: 0;
}

.project-custom-view {
    display: grid;
    gap: 14px;
}

.project-custom-view > header,
.project-custom-view-header {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.project-overview-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 18px;
}

.project-overview-progress > strong,
.project-overview-progress-value {
    font-size: 24px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: -.04em;
}

.project-overview-progress-track {
    grid-column: 1 / -1;
}

.project-task-board {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 10px;
    align-items: start;
}

.project-task-board > section,
.project-task-board > .kanban-column,
.project-task-column {
    min-width: 0;
    min-height: 300px;
    padding: 9px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-subtle);
}

.project-detail-grid {
    gap: 12px;
}

.project-detail-column {
    min-width: 0;
    border-color: var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
    box-shadow: none;
}

.project-detail-column-heading {
    border-bottom-color: var(--ux-line);
}

/* -------------------------------------------------------------------------- */
/* Tasks: board, table and phone cards                                         */
/* -------------------------------------------------------------------------- */

.kanban-board {
    min-width: 0;
    gap: 10px;
}

.kanban-column {
    min-width: 0;
    padding: 9px;
    border-color: var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-subtle);
}

.kanban-column-header {
    padding: 3px 2px 9px;
}

.kanban-column-header h3,
.kanban-column h3 {
    color: var(--ux-muted);
    font-size: 12px;
    letter-spacing: 0;
}

.kanban-empty {
    border-color: var(--ux-line);
    border-radius: var(--ux-radius);
    background: rgba(255, 255, 255, .58);
}

.task-list-view {
    min-width: 0;
}

.task-table {
    width: 100%;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--ux-white);
}

.task-table th,
.task-table td {
    padding: 10px 12px;
    border-color: var(--ux-line);
}

.task-table th {
    color: var(--ux-muted);
    background: var(--ux-subtle);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.task-table tr:hover td {
    background: var(--ux-subtle);
}

.ux-task-table {
    width: 100%;
    overflow: auto;
}

table.ux-task-table,
.ux-task-table table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

table.ux-task-table {
    display: table;
    overflow: visible;
}

.ux-task-table th,
.ux-task-table td,
.ux-task-table-head > *,
.ux-task-table-row > * {
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--ux-line);
    text-align: left;
    vertical-align: middle;
}

.ux-task-table th,
.ux-task-table-head {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.ux-task-table-head,
.ux-task-table-row {
    min-width: 760px;
    display: grid;
    grid-template-columns: 34px minmax(220px, 1.5fr) minmax(120px, .75fr) minmax(120px, .7fr) minmax(110px, .65fr) 42px;
    align-items: center;
}

.ux-task-table tbody tr:last-child td,
.ux-task-table-row:last-child > * {
    border-bottom: 0;
}

.ux-task-table tbody tr,
.ux-task-table-row {
    min-height: var(--ux-row-height);
    background: var(--ux-white);
    transition: background-color .12s ease;
}

.ux-task-table tbody tr:hover,
.ux-task-table-row:hover {
    background: var(--ux-subtle);
}

.ux-task-table tbody tr:hover td {
    background: transparent;
}

.ux-task-table-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ux-ink);
    font-weight: 600;
}

.ux-task-table-title > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ux-mobile-task-list {
    display: none;
}

.ux-mobile-task-card {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
}

.ux-mobile-task-card-head,
.ux-mobile-task-card-footer,
.ux-mobile-task-card-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ux-mobile-task-card-head {
    align-items: flex-start;
}

.ux-mobile-task-card-title {
    min-width: 0;
    flex: 1;
    color: var(--ux-ink);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ux-mobile-task-card-meta {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    color: var(--ux-muted);
    font-size: 12px;
}

.ux-mobile-task-card-footer {
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px solid var(--ux-line);
}

.ux-mobile-task-card-actions {
    margin-left: auto;
}

/* -------------------------------------------------------------------------- */
/* Timeline                                                                    */
/* -------------------------------------------------------------------------- */

.task-timeline-view {
    --timeline-label-width: 220px;
    --timeline-day-width: 34px;
    --timeline-track-width: 700px;
    min-width: 0;
    display: grid;
    gap: 12px;
}

.timeline-shell {
    min-width: 0;
    overflow: auto;
    isolation: isolate;
}

.timeline-header,
.timeline-row {
    min-width: calc(var(--timeline-label-width) + var(--timeline-track-width));
    display: grid;
    grid-template-columns: var(--timeline-label-width) minmax(var(--timeline-track-width), 1fr);
}

.timeline-header {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 46px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border-bottom: 1px solid var(--ux-line);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.timeline-header > :first-child,
.timeline-row > :first-child,
.timeline-label,
.timeline-header-label {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: inherit;
    border-right: 1px solid var(--ux-line);
}

.timeline-header > :first-child,
.timeline-header-label {
    z-index: 6;
    background: var(--ux-subtle);
}

.timeline-scale,
.timeline-days {
    display: grid;
    grid-template-columns: repeat(var(--timeline-columns, 14), minmax(var(--timeline-day-width), 1fr));
    align-items: stretch;
}

.timeline-scale > *,
.timeline-days > * {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--ux-line);
}

.timeline-row {
    min-height: 58px;
    background: var(--ux-white);
    border-bottom: 1px solid var(--ux-line);
}

.timeline-row:last-child {
    border-bottom: 0;
}

.timeline-row > :first-child,
.timeline-label {
    background: var(--ux-white);
}

.timeline-row:hover,
.timeline-row:hover > :first-child {
    background: #fdfdfc;
}

.timeline-track {
    position: relative;
    min-width: 0;
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(var(--timeline-columns, 14), minmax(var(--timeline-day-width), 1fr));
    align-items: center;
    padding-block: 9px;
    overflow: hidden;
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent calc(var(--timeline-day-width) - 1px),
        var(--ux-line) calc(var(--timeline-day-width) - 1px),
        var(--ux-line) var(--timeline-day-width)
    );
}

.timeline-bar {
    position: relative;
    z-index: 2;
    grid-column: var(--timeline-start-column, auto) / span var(--timeline-span, 1);
    min-width: 34px;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-inline: 2px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--timeline-color, var(--ux-accent)) 20%, var(--ux-line));
    border-radius: 7px;
    color: var(--ux-ink);
    background: color-mix(in srgb, var(--timeline-color, var(--ux-accent)) 11%, white);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

.timeline-bar[style*="left"],
.timeline-bar[style*="--timeline-left"],
.timeline-bar[style*="--timeline-offset"],
.timeline-bar[style*="--left"],
.timeline-bar[data-position="absolute"] {
    position: absolute;
    top: 50%;
    left: var(--timeline-left, var(--timeline-offset, var(--left, auto)));
    width: var(--timeline-width, auto);
    transform: translateY(-50%);
}

.timeline-bar:hover {
    border-color: color-mix(in srgb, var(--timeline-color, var(--ux-accent)) 42%, var(--ux-line));
    box-shadow: 0 3px 10px rgba(25, 25, 25, .08);
}

.timeline-unscheduled {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px dashed var(--ux-line-strong);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-subtle);
}

.timeline-unscheduled > header,
.timeline-unscheduled-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--ux-muted);
    font-size: 12px;
    font-weight: 650;
}

/* -------------------------------------------------------------------------- */
/* Calendar                                                                    */
/* -------------------------------------------------------------------------- */

.enhanced-calendar {
    min-width: 0;
    overflow: hidden;
}

.enhanced-calendar .calendar-toolbar,
.calendar-toolbar {
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--ux-line);
    border-radius: 0;
}

.calendar-toolbar-title,
.calendar-toolbar h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}

.calendar-grid,
.task-calendar-view {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 0;
    border-radius: 0;
    background: var(--ux-white);
    overflow: hidden;
}

.task-calendar-view {
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
}

.task-calendar-view:has(> .enhanced-calendar),
.task-calendar-view:has(> .calendar-toolbar),
.task-calendar-view:has(> .calendar-grid) {
    display: block;
    border: 0;
    border-radius: 0;
}

.enhanced-calendar .calendar-grid,
.enhanced-calendar .task-calendar-view {
    border: 0;
    border-radius: 0;
}

.calendar-grid .calendar-day-header,
.enhanced-calendar .calendar-day-header,
.task-calendar-view .calendar-day-header {
    min-width: 0;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 7px 4px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border-right: 1px solid var(--ux-line);
    border-bottom: 1px solid var(--ux-line);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.calendar-grid .calendar-day-header:nth-child(7n),
.task-calendar-view .calendar-day-header:nth-child(7n) {
    border-right: 0;
}

.calendar-grid .calendar-cell,
.enhanced-calendar .calendar-cell,
.task-calendar-view .calendar-cell {
    min-width: 0;
    min-height: 126px;
    padding: 7px;
    overflow: hidden;
    background: var(--ux-white);
    border-right: 1px solid var(--ux-line);
    border-bottom: 1px solid var(--ux-line);
    transition: background-color .12s ease;
}

.calendar-grid .calendar-cell:hover,
.enhanced-calendar .calendar-cell:hover,
.task-calendar-view .calendar-cell:hover {
    background: #fdfdfc;
}

.calendar-grid .calendar-cell:nth-child(7n),
.task-calendar-view .calendar-cell:nth-child(7n) {
    border-right: 0;
}

.calendar-cell.different-month,
.calendar-cell.is-outside {
    color: var(--ux-faint);
    background: #fbfbfa;
}

.calendar-cell.is-today,
.calendar-cell.today {
    background: color-mix(in srgb, var(--ux-accent) 4%, white);
}

.calendar-cell-num,
.calendar-day-number {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    margin-bottom: 5px;
    border-radius: 50%;
    color: var(--ux-muted);
    font-size: 11px;
    font-weight: 650;
}

.is-today .calendar-cell-num,
.today .calendar-cell-num,
.is-today .calendar-day-number,
.today .calendar-day-number {
    color: #fff;
    background: var(--ux-ink);
}

.calendar-task-card {
    min-width: 0;
    min-height: 27px;
    padding: 5px 6px;
    gap: 5px;
    overflow: hidden;
    border: 1px solid var(--ux-line);
    border-radius: 6px;
    color: var(--ux-ink);
    background: var(--ux-subtle);
    font-size: 10px;
    font-weight: 550;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-task-card:hover {
    border-color: var(--ux-line-strong);
    background: var(--ux-white);
    box-shadow: none;
}

.mobile-agenda {
    display: none;
}

.mobile-agenda-day,
.mobile-agenda-group {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ux-line);
}

.mobile-agenda-date {
    color: var(--ux-muted);
    font-size: 11px;
    font-weight: 650;
    text-align: center;
}

.mobile-agenda-date strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.mobile-agenda-items {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.mobile-agenda-item {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    color: var(--ux-ink);
    background: var(--ux-white);
}

/* -------------------------------------------------------------------------- */
/* Public read-only project                                                    */
/* -------------------------------------------------------------------------- */

.public-share-gate {
    min-width: 0;
    padding: clamp(18px, 4vw, 54px);
    background: var(--ux-subtle);
}

.public-share-card {
    width: min(980px, 100%);
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--ux-line);
    border-radius: 12px;
    background: var(--ux-white);
    box-shadow: 0 12px 40px rgba(25, 25, 25, .07);
}

.public-share-header {
    align-items: center;
    gap: 16px;
}

.public-share-readonly {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid var(--ux-line);
    border-radius: 999px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    font-size: 11px;
    font-weight: 650;
}

.public-share-readonly svg {
    width: 14px;
    height: 14px;
}

.badge-status {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid var(--ux-line);
    border-radius: 999px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    font-size: 11px;
    font-weight: 650;
}

.public-share-actions,
.public-share-header-actions {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.public-share-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-line);
}

.public-share-summary > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--ux-white);
}

.public-share-summary strong {
    color: var(--ux-ink);
    font-size: 18px;
    line-height: 1.15;
}

.public-share-summary small {
    overflow: hidden;
    color: var(--ux-muted);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-share-tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.public-share-tabs::-webkit-scrollbar {
    display: none;
}

.public-share-tabs .tab-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 3px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--ux-muted);
    background: transparent;
    white-space: nowrap;
}

.public-share-tabs .tab-btn.active {
    color: var(--ux-ink);
    border-bottom-color: var(--ux-ink);
    background: transparent;
}

.public-list-item {
    padding: 10px 11px;
}

.print-action {
    min-height: var(--ux-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    color: var(--ux-muted);
    background: var(--ux-white);
    font-size: 12px;
    font-weight: 600;
}

.print-action:hover {
    color: var(--ux-ink);
    background: var(--ux-subtle);
    border-color: var(--ux-line-strong);
}

/* -------------------------------------------------------------------------- */
/* Drawers, dialogs and floating layers                                        */
/* -------------------------------------------------------------------------- */

.modal-overlay,
.drawer-overlay {
    background: rgba(25, 25, 25, .34);
    backdrop-filter: blur(3px);
}

.modal,
.task-detail-drawer,
.document-preview-panel {
    border-color: var(--ux-line);
    border-radius: 12px;
    background: var(--ux-white);
    box-shadow: 0 24px 70px rgba(25, 25, 25, .18);
}

.modal-header,
.drawer-header,
.file-preview-header {
    border-bottom-color: var(--ux-line);
    background: rgba(255, 255, 255, .97);
}

.dropdown-menu,
.plane-dropdown-menu,
.row-actions-popover,
.command-menu-container {
    border-color: var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
    box-shadow: var(--ux-shadow-popover);
}

/* -------------------------------------------------------------------------- */
/* v15 runtime markup alignment                                                */
/* -------------------------------------------------------------------------- */

.dashboard-focus {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.dashboard-focus > header {
    min-width: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-focus > header h3,
.dashboard-focus > header p {
    margin: 0;
}

.dashboard-focus-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.focus-card,
.focus-card.primary,
.focus-card.focus-card-primary,
.focus-card[data-emphasis="primary"] {
    width: 100%;
    min-width: 0;
    min-height: 92px;
    grid-row: auto;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    overflow: hidden;
    color: var(--ux-ink);
    background: var(--ux-white);
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    box-shadow: none;
    text-align: left;
    appearance: none;
}

.focus-card > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.focus-card > span:nth-child(2) > small,
.focus-card > span:nth-child(2) > strong,
.focus-card > span:nth-child(2) > em {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-card > span:nth-child(2) > small {
    color: var(--ux-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.focus-card > span:nth-child(2) > strong {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 650;
}

.focus-card > span:nth-child(2) > em {
    color: var(--ux-muted);
    font-size: 11px;
    font-style: normal;
}

.focus-card > svg {
    width: 15px;
    height: 15px;
    color: var(--ux-faint);
}

.focus-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--ux-radius);
    color: var(--ux-accent);
    background: var(--ux-accent-soft);
}

.focus-icon svg {
    width: 17px;
    height: 17px;
}

.focus-card.danger .focus-icon {
    color: var(--ux-danger);
    background: var(--ux-danger-soft);
}

.focus-card.empty .focus-icon {
    color: var(--ux-muted);
    background: var(--ux-subtle);
}

.focus-card.empty > span:nth-child(2) > strong,
.focus-card.empty > span:nth-child(2) > em {
    color: var(--ux-muted);
}

.task-timeline {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.timeline-toolbar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
}

.timeline-toolbar > div {
    min-width: 0;
}

.timeline-toolbar > div:last-child,
.timeline-toolbar > div:last-child > span,
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-toolbar p,
.timeline-toolbar h3 {
    margin: 0;
}

.timeline-toolbar h3 {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-rows {
    min-width: 0;
}

.timeline-task-label {
    width: 100%;
    min-width: 0;
    color: var(--ux-ink);
    border: 0;
    text-align: left;
    cursor: pointer;
}

.timeline-task-label > span:last-child {
    min-width: 0;
}

.timeline-task-label strong,
.timeline-task-label small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-task-label strong {
    font-size: 12px;
    font-weight: 650;
}

.timeline-task-label small {
    margin-top: 2px;
    color: var(--ux-muted);
    font-size: 10px;
}

.ux-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--status-color, var(--ux-faint));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color, var(--ux-faint)) 12%, transparent);
}

.timeline-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(var(--timeline-columns, 14), minmax(0, 1fr));
    pointer-events: none;
}

.timeline-grid-lines > i {
    min-width: 0;
    border-right: 1px solid var(--ux-line);
}

.timeline-grid-lines > i:last-child {
    border-right: 0;
}

.timeline-bar[style*="--left"] {
    position: absolute;
    top: 50%;
    right: auto;
    left: var(--left, 0%);
    width: var(--timeline-width, 7.142%);
    transform: translateY(-50%);
}

.timeline-bar.overdue {
    border-color: color-mix(in srgb, var(--ux-danger) 22%, var(--ux-line));
    background: color-mix(in srgb, var(--ux-danger) 8%, white);
}

.timeline-outside-marker {
    position: absolute;
    top: 50%;
    left: 8px;
    z-index: 2;
    min-height: 28px;
    padding: 4px 8px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border: 1px dashed var(--ux-line-strong);
    border-radius: 6px;
    font-size: 10px;
    transform: translateY(-50%);
}

details.timeline-unscheduled {
    display: block;
    padding: 0;
    overflow: hidden;
}

.timeline-unscheduled > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 11px;
    color: var(--ux-muted);
    cursor: pointer;
    list-style: none;
}

.timeline-unscheduled > summary::-webkit-details-marker,
.project-more-menu > summary::-webkit-details-marker,
.row-actions-menu > summary::-webkit-details-marker {
    display: none;
}

.timeline-unscheduled > summary > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.timeline-unscheduled > summary svg {
    width: 15px;
    height: 15px;
}

.timeline-unscheduled > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 7px;
    padding: 0 10px 10px;
}

.timeline-unscheduled > div > button {
    min-width: 0;
    min-height: 44px;
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    color: var(--ux-ink);
    background: var(--ux-white);
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    text-align: left;
}

.timeline-unscheduled > div > button span,
.timeline-unscheduled > div > button small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-unscheduled > div > button small {
    color: var(--ux-muted);
    font-size: 10px;
}

.calendar-cell-items {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.calendar-task-card > i {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--status-color, var(--ux-faint));
}

.calendar-cell.selected {
    background: color-mix(in srgb, var(--ux-accent) 7%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ux-accent) 35%, transparent);
}

.mobile-agenda > header {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-agenda > header > div {
    min-width: 0;
}

.mobile-agenda > header small,
.mobile-agenda > header strong {
    display: block;
}

.mobile-agenda > header small {
    color: var(--ux-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mobile-agenda > header strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    text-transform: capitalize;
}

.mobile-agenda > div {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.mobile-agenda-empty {
    width: 100%;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border: 1px dashed var(--ux-line-strong);
    border-radius: var(--ux-radius-lg);
    text-align: left;
}

.mobile-agenda-empty svg {
    width: 20px;
    height: 20px;
}

.mobile-agenda-empty strong,
.mobile-agenda-empty small {
    display: block;
}

.mobile-agenda-empty small {
    margin-top: 2px;
    color: var(--ux-faint);
    font-size: 11px;
}

.ux-task-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: auto;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
}

.ux-task-table-wrap > .ux-task-table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ux-task-table .selection-cell,
.ux-task-table .actions-cell {
    width: 42px;
    text-align: center;
}

.ux-task-table .task-name-cell {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ux-task-table .task-name-cell > span {
    min-width: 0;
}

.ux-task-table .task-name-cell strong,
.ux-task-table .task-name-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ux-task-table .task-name-cell small {
    margin-top: 2px;
    color: var(--ux-muted);
    font-size: 10px;
}

.ux-inline-select,
.ux-inline-date {
    width: auto;
    max-width: 170px;
    min-height: 32px;
    padding: 0 8px;
    color: var(--ux-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11px;
}

.ux-inline-select:hover,
.ux-inline-date:hover,
.ux-inline-select:focus,
.ux-inline-date:focus {
    color: var(--ux-ink);
    background: var(--ux-white);
    border-color: var(--ux-line);
}

.ux-inline-select.status {
    color: var(--status-color, var(--ux-muted));
}

.ux-mobile-task-card > header {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 40px;
    align-items: start;
    gap: 8px;
}

.ux-mobile-task-card > header > div {
    min-width: 0;
}

.ux-mobile-task-card > header strong,
.ux-mobile-task-card > header small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ux-mobile-task-card > header strong {
    font-size: 14px;
    line-height: 1.35;
}

.ux-mobile-task-card > header small {
    margin-top: 2px;
    color: var(--ux-muted);
    font-size: 11px;
}

.ux-mobile-task-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ux-muted);
    font-size: 11px;
}

.ux-mobile-spacer {
    min-width: 6px;
    flex: 1;
}

.task-due {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ux-muted);
    font-size: 11px;
    white-space: nowrap;
}

.task-due svg {
    width: 13px;
    height: 13px;
}

.task-due.overdue,
.ux-inline-date.overdue {
    color: var(--ux-danger);
}

.task-due.today,
.ux-inline-date.today {
    color: var(--ux-warning);
}

.ux-mobile-task-controls {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 9px;
    border-top: 1px solid var(--ux-line);
}

.ux-mobile-task-controls label {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.ux-mobile-task-controls label > span {
    color: var(--ux-faint);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ux-mobile-task-controls select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding-inline: 8px;
    font-size: 12px;
}

.ux-mobile-task-card.completed > header strong {
    color: var(--ux-muted);
    text-decoration: line-through;
}

.project-summary-strip {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.project-summary-strip > article {
    min-width: 0;
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
}

.project-summary-strip span,
.project-summary-strip small {
    color: var(--ux-muted);
    font-size: 11px;
}

.project-summary-strip strong {
    overflow-wrap: anywhere;
    font-size: 23px;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.035em;
}

.project-summary-strip .project-overview-progress-track {
    margin-block: 5px;
}

.project-card .project-overview-progress {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    margin: 10px 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.project-card .project-overview-progress > span,
.project-card .project-overview-progress > small {
    color: var(--ux-muted);
    font-size: 10px;
}

.project-card .project-overview-progress > strong {
    font-size: 16px;
}

.project-card .project-overview-progress > small,
.project-card .project-overview-progress-track {
    grid-column: 1 / -1;
}

.project-task-list,
.project-files-view {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.project-task-list > article {
    min-width: 0;
    min-height: 56px;
    display: grid;
    grid-template-columns: 22px 8px minmax(180px, 1fr) 30px auto 32px;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    background: var(--ux-white);
    cursor: pointer;
}

.project-task-main {
    min-width: 0;
}

.project-task-main strong,
.project-task-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-task-main small {
    margin-top: 2px;
    color: var(--ux-muted);
    font-size: 10px;
}

.ux-assignee-avatar {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    border: 1px solid var(--ux-line);
    font-size: 9px;
    font-weight: 700;
}

.project-files-view > article {
    min-width: 0;
    min-height: 58px;
    display: grid;
    grid-template-columns: 36px minmax(180px, 1fr) auto 34px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    background: var(--ux-white);
    cursor: pointer;
}

.project-files-view > article > span:nth-child(2) {
    min-width: 0;
}

.project-files-view strong,
.project-files-view small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-files-view small,
.project-files-view > article > span:nth-child(3) {
    color: var(--ux-muted);
    font-size: 10px;
}

.project-toolbar {
    position: relative;
}

.project-toolbar-primary,
.project-toolbar-secondary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.project-more-menu {
    position: relative;
}

.project-more-menu > summary {
    list-style: none;
}

.project-more-popover {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 30;
    width: min(280px, calc(100vw - 24px));
    display: grid;
    gap: 3px;
    padding: 7px;
    background: var(--ux-white);
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    box-shadow: var(--ux-shadow-popover);
}

.project-more-popover > button,
.project-share-actions > button {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    color: var(--ux-muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    text-align: left;
}

.project-more-popover > button:hover,
.project-share-actions > button:hover {
    color: var(--ux-ink);
    background: var(--ux-subtle);
}

.project-more-popover > button.danger {
    color: var(--ux-danger);
}

.project-more-popover svg,
.project-share-actions svg,
.project-share-switch svg {
    width: 15px;
    height: 15px;
}

.project-share-switch {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    color: var(--ux-muted);
    border-top: 1px solid var(--ux-line);
    border-bottom: 1px solid var(--ux-line);
    font-size: 12px;
}

.project-share-switch > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-share-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--ux-accent);
}

.project-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.project-public-content-btn strong {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 999px;
    color: var(--ux-muted);
    background: var(--ux-subtle);
    font-size: 10px;
}

.project-share-manager {
    width: min(920px, calc(100vw - 32px));
    max-width: 920px;
    max-height: min(860px, calc(100dvh - 32px));
    padding: 0;
    overflow: hidden;
}

#project-share-manager-content {
    min-height: 0;
    max-height: min(860px, calc(100dvh - 32px));
    display: flex;
    flex-direction: column;
}

.project-share-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--ux-line);
}

.project-share-manager-head h2,
.project-share-manager-head p {
    margin: 0;
}

.project-share-manager-head h2 {
    margin-top: 3px;
    font-size: 21px;
}

.project-share-manager-head p:last-child {
    margin-top: 7px;
    color: var(--ux-muted);
    font-size: 12px;
    line-height: 1.45;
}

.project-share-safety {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 16px 24px 0;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--ux-accent) 18%, var(--ux-line));
    border-radius: var(--ux-radius-lg);
    background: color-mix(in srgb, var(--ux-accent-soft) 55%, var(--ux-white));
}

.project-share-safety > svg {
    width: 18px;
    height: 18px;
    color: var(--ux-accent);
}

.project-share-safety > span:nth-child(2),
.project-public-item > span:nth-child(2) {
    min-width: 0;
}

.project-share-safety strong,
.project-share-safety small,
.project-public-item strong,
.project-public-item small {
    display: block;
}

.project-share-safety small,
.project-public-item small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--ux-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-share-search {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 24px 0;
    padding: 0 11px;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius);
    background: var(--ux-white);
}

.project-share-search:focus-within {
    border-color: color-mix(in srgb, var(--ux-accent) 45%, var(--ux-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ux-accent) 9%, transparent);
}

.project-share-search svg {
    width: 15px;
    height: 15px;
    color: var(--ux-faint);
}

.project-share-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
}

.project-share-manager-sections {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 24px 18px;
    overflow: hidden;
}

.project-share-manager-sections > section {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ux-line);
    border-radius: var(--ux-radius-lg);
    background: var(--ux-white);
}

.project-share-manager-sections > section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    border-bottom: 1px solid var(--ux-line);
    background: var(--ux-subtle);
}

.project-share-manager-sections > section > header strong,
.project-share-manager-sections > section > header small {
    display: block;
}

.project-share-manager-sections > section > header small {
    margin-top: 2px;
    color: var(--ux-muted);
    font-size: 10px;
}

.project-share-manager-sections > section > header > span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-share-manager-sections > section > header button {
    min-height: 28px;
    padding: 0 7px;
    border: 0;
    border-radius: 5px;
    color: var(--ux-muted);
    background: transparent;
    font-size: 10px;
}

.project-share-manager-sections > section > header button:hover {
    color: var(--ux-ink);
    background: var(--ux-white);
}

.project-public-items {
    min-height: 120px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.project-public-item {
    position: relative;
    min-width: 0;
    min-height: 58px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--ux-line);
    cursor: pointer;
}

.project-public-item:last-child {
    border-bottom: 0;
}

.project-public-item:hover,
.project-public-item:focus-within {
    background: var(--ux-subtle);
}

.project-public-item[hidden] {
    display: none;
}

.project-public-item-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ux-line);
    border-radius: 7px;
    color: var(--ux-muted);
    background: var(--ux-white);
}

.project-public-item-icon svg {
    width: 15px;
    height: 15px;
}

.project-public-item strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-public-item input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.project-public-switch {
    position: relative;
    width: 34px;
    height: 20px;
    border: 1px solid var(--ux-line-strong);
    border-radius: 999px;
    background: var(--ux-soft);
    transition: background .14s ease, border-color .14s ease;
}

.project-public-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ux-white);
    box-shadow: 0 1px 3px rgba(25, 25, 25, .24);
    transition: transform .14s ease;
}

.project-public-item input:checked + .project-public-switch {
    border-color: var(--ux-accent);
    background: var(--ux-accent);
}

.project-public-item input:checked + .project-public-switch::after {
    transform: translateX(14px);
}

.project-public-item input:focus-visible + .project-public-switch {
    outline: 3px solid color-mix(in srgb, var(--ux-accent) 18%, transparent);
    outline-offset: 2px;
}

.project-public-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--ux-muted);
    font-size: 11px;
    text-align: center;
}

.project-share-manager-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 24px;
    border-top: 1px solid var(--ux-line);
    background: var(--ux-subtle);
}

.project-share-manager-footer > span {
    color: var(--ux-muted);
    font-size: 11px;
}

.project-share-manager-footer > span strong {
    color: var(--ux-ink);
}

.project-share-manager-footer > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.project-more-menu:not([open]) .project-more-popover {
    display: none;
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-focus {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-task-board {
        overflow-x: auto;
        grid-template-columns: repeat(3, minmax(270px, 1fr));
    }
}

@media (max-width: 960px) {
    body {
        background: var(--ux-white);
    }

    .workspace,
    body[data-sidebar="compact"] .workspace {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        min-height: 58px;
        padding: 8px 14px;
        background: rgba(255, 255, 255, .97);
    }

    .topbar #page-title {
        font-size: 17px !important;
    }

    .page-frame {
        width: 100%;
        padding: 18px 14px calc(94px + env(safe-area-inset-bottom));
    }

    .mobile-tabs {
        min-height: 68px;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--ux-line);
        box-shadow: 0 -6px 22px rgba(25, 25, 25, .05);
        backdrop-filter: blur(16px);
    }

    .mobile-tabs a {
        min-width: 0;
        min-height: 52px;
        padding-inline: 3px;
        border-radius: var(--ux-radius);
        color: var(--ux-muted);
    }

    .mobile-tabs a > span,
    .mobile-tabs a > small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-tabs a.active {
        color: var(--ux-ink);
        background: var(--ux-subtle);
    }

    .dashboard-focus {
        grid-template-columns: minmax(0, 1fr);
    }

    .focus-card.primary,
    .focus-card.focus-card-primary,
    .focus-card[data-emphasis="primary"] {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* -------------------------------------------------------------------------- */
/* Purpose-built touch layout                                                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 720px) {
    :root {
        --ux-control-height: 44px;
        --ux-row-height: 54px;
        --ux-card-padding: 14px;
        --ux-page-gap: 14px;
    }

    html,
    body,
    .app-shell,
    .workspace,
    .page-frame,
    .view-section,
    .panel,
    .project-detail-view,
    .project-custom-view,
    .enhanced-calendar,
    .task-timeline-view {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    body {
        overscroll-behavior-x: none;
    }

    h2,
    .page-title-row h2,
    #view-dashboard .intro-row h2,
    #view-tasks .page-title-row h2 {
        font-size: 22px;
        line-height: 1.2;
    }

    h3 {
        font-size: 14px;
    }

    .section-description,
    .muted-text {
        font-size: 12.5px;
    }

    .topbar {
        position: sticky;
        width: 100%;
        min-height: 56px;
        padding: 8px 12px;
        overflow: hidden;
    }

    .topbar #page-kicker,
    .topbar .breadcrumbs {
        display: none;
    }

    .topbar > div:first-child {
        min-width: 0;
    }

    .topbar #page-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-frame {
        padding: 14px 12px calc(92px + env(safe-area-inset-bottom));
    }

    .intro-row,
    .page-title-row {
        gap: 10px;
        margin-bottom: 13px;
        padding-bottom: 13px;
    }

    .page-actions,
    .top-actions,
    .panel-heading-actions,
    .public-share-actions,
    .public-share-header-actions {
        gap: 6px;
    }

    .btn,
    .icon-btn,
    .plane-dropdown-btn,
    .filter-control,
    .field,
    .view-toggle-btn,
    .project-view-tabs button,
    .project-view-tabs a,
    .project-detail-back-btn,
    .print-action,
    .mobile-agenda-item {
        min-height: 44px;
    }

    .icon-btn {
        width: 44px;
        min-width: 44px;
    }

    .btn.small,
    .icon-btn.compact {
        min-height: 44px;
    }

    .panel,
    .focus-card,
    .project-card,
    .project-custom-view,
    .project-overview-progress {
        border-radius: var(--ux-radius-lg);
        box-shadow: none;
    }

    .dashboard-focus {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .focus-card,
    .focus-card.primary,
    .focus-card.focus-card-primary,
    .focus-card[data-emphasis="primary"] {
        grid-column: auto;
        min-height: 0;
    }

    .focus-card-item {
        min-height: 48px;
        padding: 8px;
    }

    .metrics-grid {
        max-width: 100%;
    }

    .plane-toolbar,
    .project-toolbar,
    .calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .project-toolbar > div,
    .calendar-toolbar > div,
    .project-toolbar-actions,
    .calendar-toolbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .project-toolbar .field,
    .project-toolbar .filter-control,
    .calendar-toolbar .field,
    .calendar-toolbar .filter-control {
        flex: 1 1 160px;
        min-width: 0;
    }

    .project-view-tabs,
    .view-toggle-group {
        width: 100%;
        scroll-snap-type: x proximity;
    }

    .project-view-tabs button,
    .project-view-tabs a,
    .view-toggle-btn {
        flex: 1 0 auto;
        scroll-snap-align: start;
    }

    /* Projects become a dedicated single-column touch surface. */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-card {
        width: 100%;
        min-height: 150px;
        padding: 14px;
    }

    .project-card:hover {
        transform: none;
        box-shadow: none;
    }

    #view-projects:has(.project-detail-view:not([style*="display: none"])) #projects-list-container {
        display: none;
    }

    .project-detail-view:not([style*="display: none"]),
    .project-custom-view {
        min-height: calc(100dvh - 148px);
        margin: -14px -12px calc(-92px - env(safe-area-inset-bottom));
        padding: 14px 12px calc(92px + env(safe-area-inset-bottom));
        background: var(--ux-white);
    }

    .project-detail-view .project-custom-view {
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .project-detail-header,
    .project-custom-view > header,
    .project-custom-view-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .project-workflow-control {
        width: 100%;
        min-width: 0 !important;
    }

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

    .project-detail-grid {
        grid-template-columns: 1fr;
    }

    .project-detail-column {
        width: 100%;
        min-width: 0;
    }

    .project-task-board,
    .project-task-board.grouped-project,
    .project-task-board.grouped-priority {
        display: flex;
        width: 100%;
        max-width: 100%;
        gap: 10px;
        padding-bottom: 5px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .project-task-board::-webkit-scrollbar {
        display: none;
    }

    .project-task-board > section,
    .project-task-board > .kanban-column,
    .project-task-column {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        scroll-snap-align: start;
    }

    /* One kanban column per viewport; scrolling is contained in the board. */
    #view-tasks .kanban-board,
    #view-tasks .kanban-board.grouped-priority,
    #view-tasks .kanban-board.grouped-project,
    #view-tasks .kanban-board.grouped-tag {
        display: flex;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 0 5px;
        gap: 10px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    #view-tasks .kanban-board::-webkit-scrollbar {
        display: none;
    }

    #view-tasks .kanban-column {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: calc(100dvh - 238px);
        scroll-snap-align: start;
    }

    #view-tasks .task-item,
    .ux-mobile-task-card {
        min-height: 96px;
        padding: 12px;
    }

    #view-tasks .task-title,
    .ux-mobile-task-card-title {
        font-size: 15px;
    }

    #view-tasks .task-select-checkbox {
        width: 22px;
        height: 22px;
    }

    #view-tasks .checkbox-circle {
        width: 26px;
        height: 26px;
    }

    #view-tasks .task-drag-handle {
        display: none;
    }

    .ux-task-table,
    table.ux-task-table,
    .task-table.ux-task-table,
    .ux-task-table-shell {
        display: none !important;
    }

    .ux-mobile-task-list {
        width: 100%;
        display: grid;
        gap: 9px;
    }

    .ux-mobile-task-card-head input,
    .ux-mobile-task-card-head button,
    .ux-mobile-task-card-actions button,
    .ux-mobile-task-card-actions a {
        min-width: 44px;
        min-height: 44px;
    }

    .ai-operations-table {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ai-operations-row {
        width: 700px;
        min-width: 700px;
    }

    /* Timeline changes semantics on touch: rows become a vertical agenda. */
    .task-timeline-view {
        gap: 10px;
    }

    .timeline-shell {
        width: 100%;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .timeline-header {
        display: none;
    }

    .timeline-row {
        width: 100%;
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 9px;
        padding: 11px;
        border: 1px solid var(--ux-line);
        border-radius: var(--ux-radius-lg);
        background: var(--ux-white);
    }

    .timeline-row > :first-child,
    .timeline-label {
        position: static;
        min-height: 30px;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 13px;
        font-weight: 650;
    }

    .timeline-track {
        min-height: 0;
        display: block;
        padding: 0;
        overflow: visible;
        background: none;
    }

    .timeline-bar,
    .timeline-bar[style*="left"],
    .timeline-bar[data-position="absolute"] {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        min-height: 44px;
        margin: 0;
        padding: 9px 11px;
        transform: none !important;
        white-space: normal;
    }

    .timeline-unscheduled {
        padding: 11px;
        background: var(--ux-subtle);
    }

    /* Compact month at the top, actionable agenda underneath. */
    .enhanced-calendar {
        width: 100%;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .enhanced-calendar .calendar-toolbar,
    .calendar-toolbar {
        padding: 8px 0 11px;
        border-bottom: 0;
    }

    .calendar-grid,
    .task-calendar-view {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        border: 1px solid var(--ux-line);
        border-radius: var(--ux-radius-lg);
        overflow: hidden;
    }

    .calendar-grid .calendar-day-header,
    .enhanced-calendar .calendar-day-header,
    .task-calendar-view .calendar-day-header {
        min-height: 30px;
        padding: 5px 1px;
        overflow: hidden;
        font-size: 9px;
        letter-spacing: 0;
    }

    .calendar-grid .calendar-cell,
    .enhanced-calendar .calendar-cell,
    .task-calendar-view .calendar-cell {
        position: relative;
        min-height: 48px;
        aspect-ratio: 1 / 1;
        padding: 4px 2px;
        overflow: hidden;
    }

    .calendar-cell-num,
    .calendar-day-number {
        width: 23px;
        height: 23px;
        margin: 0 auto;
        font-size: 10px;
    }

    .calendar-task-card {
        width: 5px;
        min-width: 5px;
        height: 5px;
        min-height: 5px;
        display: inline-block;
        margin: 2px 1px 0;
        padding: 0;
        overflow: hidden;
        border: 0;
        border-radius: 50%;
        color: transparent;
        background: var(--ux-accent);
        font-size: 0;
        vertical-align: top;
    }

    .calendar-task-card > * {
        display: none;
    }

    .mobile-agenda {
        width: 100%;
        display: grid;
        margin-top: 14px;
        padding-top: 2px;
    }

    .mobile-agenda-day,
    .mobile-agenda-group {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    /* Public pages are standalone touch pages, not squeezed desktop cards. */
    .public-share-gate {
        align-items: flex-start;
        width: 100%;
        min-height: 100dvh;
        padding: 0;
        background: var(--ux-white);
    }

    .public-share-card {
        width: 100%;
        min-height: 100dvh;
        padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .public-share-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-share-actions,
    .public-share-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .public-share-actions .btn,
    .public-share-actions .print-action {
        flex: 1 1 130px;
    }

    .public-share-header-actions .print-action {
        flex: 0 0 44px;
    }

    .public-share-header-actions .badge-status {
        margin-left: auto;
    }

    .public-share-summary {
        margin: 18px 0;
    }

    .public-share-summary > span {
        padding: 10px 8px;
    }

    .public-share-summary strong {
        font-size: 16px;
    }

    .public-share-summary small {
        font-size: 9px;
    }

    .public-share-tabs {
        margin-inline: -14px !important;
        padding-inline: 14px !important;
    }

    .public-list-item {
        min-height: 58px;
    }

    .task-detail-drawer,
    .task-detail-drawer.wide {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .modal {
        max-width: calc(100vw - 20px);
    }
}

/* Exact touch composition for the DOM emitted by ux-v15.js. */
@media (max-width: 720px) {
    .dashboard-focus {
        gap: 9px;
    }

    .dashboard-focus > header {
        align-items: center;
    }

    .dashboard-focus > header .text-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
    }

    .dashboard-focus-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .focus-card,
    .focus-card.primary,
    .focus-card.focus-card-primary,
    .focus-card[data-emphasis="primary"] {
        min-height: 84px;
        grid-template-columns: 38px minmax(0, 1fr) 16px;
        padding: 11px;
    }

    .focus-card > span:nth-child(2) > strong {
        font-size: 14px;
    }

    .ux-mobile-task-card > header {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .ux-mobile-task-card .task-select-checkbox,
    #view-tasks .task-select-checkbox {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        margin: -9px 0 0;
        padding: 0;
        appearance: none;
        -webkit-appearance: none;
        background-color: transparent;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Crect x='2.75' y='2.75' width='16.5' height='16.5' rx='4' fill='white' stroke='%23b8b8b2' stroke-width='1.5'/%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 22px 22px;
        border: 0;
        cursor: pointer;
    }

    .ux-mobile-task-card .task-select-checkbox:checked,
    #view-tasks .task-select-checkbox:checked {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Crect x='2' y='2' width='18' height='18' rx='4.5' fill='%232f6f4e'/%3E%3Cpath d='M6.6 11.1l2.8 2.8 6-6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .project-task-list .checkbox-circle,
    #view-tasks .checkbox-circle {
        position: relative;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        color: transparent !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .project-task-list .checkbox-circle::before,
    #view-tasks .checkbox-circle::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 24px;
        height: 24px;
        border: 1.5px solid var(--ux-line-strong);
        border-radius: 50%;
        background: var(--ux-white);
        transform: translate(-50%, -50%);
    }

    #view-tasks .task-item.completed .checkbox-circle::before {
        background: var(--ux-success);
        border-color: var(--ux-success);
    }

    #view-tasks .task-item.completed .checkbox-circle::after {
        content: "✓";
        position: absolute;
        top: 50%;
        left: 50%;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        transform: translate(-50%, -52%);
    }

    .ux-mobile-task-card > header .icon-btn.compact {
        width: 44px;
        min-width: 44px;
    }

    .ux-mobile-task-meta {
        flex-wrap: wrap;
    }

    .ux-mobile-task-meta .task-due {
        max-width: 54%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ux-mobile-task-controls select {
        min-height: 44px;
    }

    .task-timeline {
        width: 100%;
        max-width: 100%;
    }

    .timeline-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .timeline-toolbar > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .timeline-toolbar > div:last-child > span {
        margin-left: auto;
    }

    .timeline-mobile-agenda {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: grid;
        gap: 14px;
    }

    .timeline-mobile-agenda > section {
        min-width: 0;
        display: grid;
        gap: 8px;
    }

    .timeline-mobile-agenda > section > header {
        min-height: 34px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-inline: 2px;
    }

    .timeline-mobile-agenda > section > header strong {
        font-size: 13px;
    }

    .timeline-mobile-agenda > section > header span {
        min-width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: var(--ux-muted);
        background: var(--ux-subtle);
        font-size: 10px;
        font-weight: 700;
    }

    .enhanced-calendar {
        width: calc(100% + 24px);
        max-width: none;
        margin-inline: -12px;
    }

    .enhanced-calendar .calendar-toolbar {
        padding-inline: 12px;
    }

    .calendar-toolbar > div:last-child {
        justify-content: flex-end;
    }

    .calendar-cell-items {
        height: 8px;
        min-height: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-flow: row nowrap;
        gap: 2px;
        margin-top: 1px;
        overflow: hidden;
    }

    .calendar-cell-items > small {
        display: none;
    }

    .mobile-agenda {
        width: auto;
        margin: 14px 12px 0;
    }

    .mobile-agenda > header {
        align-items: flex-start;
    }

    .mobile-agenda > header .btn.small {
        flex: 0 0 auto;
        min-height: 44px;
    }

    .project-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-block: 12px;
    }

    .project-summary-strip > article {
        min-height: 104px;
        padding: 11px;
    }

    .project-summary-strip strong {
        font-size: 19px;
    }

    .project-toolbar-primary,
    .project-toolbar-secondary {
        width: 100%;
        flex-wrap: wrap;
    }

    .project-toolbar-secondary {
        justify-content: flex-end;
    }

    .project-more-popover {
        width: min(280px, calc(100vw - 20px));
        max-height: min(480px, 72dvh);
        overflow-y: auto;
    }

    .project-more-popover > button,
    .project-share-actions > button,
    .project-share-switch {
        min-height: 44px;
    }

    .project-public-content-btn {
        flex: 1 1 auto;
    }

    #project-share-manager-modal {
        align-items: stretch;
        padding: 0;
    }

    .project-share-manager {
        width: 100vw;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    #project-share-manager-content {
        height: 100dvh;
        max-height: 100dvh;
    }

    .project-share-manager-head {
        padding: 16px 14px 13px;
    }

    .project-share-safety,
    .project-share-search {
        margin-inline: 14px;
    }

    .project-share-search {
        height: 44px;
    }

    .project-share-safety {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .project-share-safety .status-pill {
        grid-column: 2;
        justify-self: start;
    }

    .project-share-manager-sections {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px 14px 14px;
        overflow-y: auto;
    }

    .project-public-items {
        max-height: 260px;
    }

    .project-public-item {
        min-height: 64px;
    }

    .project-share-manager-sections > section > header button {
        min-height: 44px;
        padding-inline: 10px;
    }

    .project-share-manager-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
    }

    .project-share-manager-footer > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-task-list > article {
        min-height: 94px;
        grid-template-columns: 44px 8px minmax(0, 1fr) 44px;
        grid-template-rows: auto auto;
        gap: 7px 8px;
        padding: 10px;
    }

    .project-task-list > article > .checkbox-circle {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
        width: 44px;
        height: 44px;
    }

    .project-task-list > article > .ux-status-dot {
        grid-column: 2;
        grid-row: 1;
    }

    .project-task-list > article > .project-task-main {
        grid-column: 3;
        grid-row: 1;
    }

    .project-task-list > article > .ux-assignee-avatar {
        grid-column: 4;
        grid-row: 1;
        justify-self: end;
    }

    .project-task-list > article > .task-due {
        grid-column: 2 / 4;
        grid-row: 2;
        align-self: center;
    }

    .project-task-list > article > .icon-btn {
        grid-column: 4;
        grid-row: 2;
        width: 44px;
        min-width: 44px;
    }

    .project-files-view > article {
        min-height: 70px;
        grid-template-columns: 36px minmax(0, 1fr) 44px;
        grid-template-rows: auto auto;
        gap: 4px 9px;
        padding: 9px;
    }

    .project-files-view > article > .file-icon {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .project-files-view > article > span:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .project-files-view > article > span:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .project-files-view > article > .row-actions-menu {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
        justify-self: end;
    }

    .project-files-view .row-actions-menu > summary.icon-btn {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .project-files-view .row-actions-popover {
        position: fixed;
        right: 10px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        left: 10px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 420px) {
    .page-frame {
        padding-inline: 10px;
    }

    .project-detail-view:not([style*="display: none"]),
    .project-custom-view {
        margin-inline: -10px;
        padding-inline: 10px;
    }

    .enhanced-calendar {
        width: calc(100% + 20px);
        margin-inline: -10px;
    }

    .enhanced-calendar .calendar-toolbar {
        padding-inline: 10px;
    }

    .mobile-agenda {
        margin-inline: 10px;
    }

    .ux-mobile-task-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .project-stats > * {
        padding: 7px 5px;
    }

    .project-stats b {
        font-size: 15px;
    }

    .mobile-agenda-day,
    .mobile-agenda-group {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 7px;
    }

    .mobile-tabs {
        gap: 1px;
        padding-inline: 4px;
    }

    .mobile-tabs a {
        padding-inline: 1px;
        font-size: 9px;
        letter-spacing: -.015em;
    }

    .mobile-tabs svg {
        width: 17px;
        height: 17px;
    }
}

@media (pointer: coarse) {
    .btn,
    .icon-btn,
    .plane-dropdown-btn,
    .filter-control,
    .field,
    .nav-item,
    .file-location-item,
    .view-toggle-btn,
    .project-view-tabs button,
    .project-view-tabs a,
    .dropdown-item,
    .mobile-tabs a,
    .print-action {
        min-height: 44px;
    }

    .btn.small,
    .icon-btn.compact {
        min-height: 44px;
    }

    .icon-btn.compact {
        width: 44px;
        min-width: 44px;
    }

    .icon-btn:not(.compact) {
        width: 44px;
    }

    .task-item,
    .file-row,
    .project-card,
    .contact-card,
    .focus-card,
    .ux-mobile-task-card {
        -webkit-tap-highlight-color: transparent;
    }

    .task-item:hover,
    .file-row:hover,
    .project-card:hover,
    .contact-card:hover,
    .focus-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* -------------------------------------------------------------------------- */
/* Print: clean landscape reports with no clipped rows or application chrome   */
/* -------------------------------------------------------------------------- */

@page {
    size: A4 landscape;
    margin: 11mm;
}

@media print {
    :root {
        --ux-white: #ffffff;
        --ux-subtle: #f7f7f5;
        --ux-ink: #191919;
        --ux-line: #d9d9d5;
        --shadow: none;
        --shadow-raised: none;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: #fff !important;
        color: #191919 !important;
        font-size: 10pt;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .sidebar,
    .topbar,
    .mobile-tabs,
    .assistant-fab,
    .task-mobile-toolbar,
    .task-mobile-scrim,
    .selection-action-dock,
    .bulk-action-bar,
    .plane-toolbar,
    .project-toolbar,
    .filter-bar,
    .calendar-toolbar-actions,
    .project-view-tabs,
    .view-toggle-group,
    .project-detail-back-btn,
    .project-workflow-control,
    .public-share-actions,
    .print-action,
    .task-actions,
    .row-actions,
    .row-actions-menu,
    .task-drag-handle,
    .icon-btn,
    .btn,
    [data-print-hide],
    .no-print {
        display: none !important;
    }

    input,
    select,
    textarea {
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        color: var(--ux-ink) !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        outline: 0 !important;
        appearance: none;
        -webkit-appearance: none;
    }

    input[type="checkbox"],
    input[type="radio"] {
        width: 3.5mm !important;
        height: 3.5mm !important;
        appearance: auto;
        -webkit-appearance: auto;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    textarea {
        height: auto !important;
        overflow: visible !important;
        resize: none !important;
        white-space: pre-wrap;
    }

    .app-shell,
    .workspace,
    body[data-sidebar="compact"] .workspace,
    .page-frame,
    .view-section.active,
    .project-detail-view,
    .project-custom-view {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        transform: none !important;
        background: #fff !important;
    }

    .view-section:not(.active) {
        display: none !important;
    }

    .intro-row,
    .page-title-row,
    .project-detail-header,
    .public-share-header {
        margin: 0 0 5mm !important;
        padding: 0 0 4mm !important;
        border-bottom: 1px solid var(--ux-line) !important;
    }

    .dashboard-focus,
    .dashboard-grid,
    .metrics-grid,
    .projects-grid,
    .project-detail-grid,
    .project-task-board {
        gap: 3mm !important;
    }

    .panel,
    .metric-block,
    .focus-card,
    .project-card,
    .project-summary-strip > article,
    .project-task-list > article,
    .project-files-view > article,
    .project-detail-column,
    .project-custom-view,
    .project-overview-progress,
    .task-item,
    .ux-mobile-task-card,
    .public-list-item,
    .mobile-agenda-item {
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .panel,
    .focus-card,
    .project-card,
    .project-detail-column,
    .project-custom-view,
    .project-overview-progress {
        padding: 3.5mm !important;
        border: 1px solid var(--ux-line) !important;
    }

    .task-list,
    .activity-list,
    .expense-list,
    .file-list,
    .photos-gallery {
        max-height: none !important;
        overflow: visible !important;
    }

    .kanban-board,
    .project-task-board {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        overflow: visible !important;
    }

    .kanban-column,
    .project-task-board > section,
    .project-task-column {
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .ux-mobile-task-list {
        display: none !important;
    }

    .ux-task-table,
    .ux-task-table-wrap,
    .ux-task-table-shell {
        display: block !important;
        width: 100% !important;
        overflow: visible !important;
        border: 1px solid var(--ux-line) !important;
    }

    table.ux-task-table,
    .ux-task-table table,
    .task-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        border-collapse: collapse;
    }

    .ux-task-table th,
    .ux-task-table td,
    .task-table th,
    .task-table td {
        position: static !important;
        padding: 2.2mm !important;
        border: 1px solid var(--ux-line) !important;
        overflow-wrap: anywhere;
        white-space: normal !important;
    }

    .ux-task-table tr,
    .task-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .task-timeline-view,
    .timeline-shell {
        width: 100% !important;
        overflow: visible !important;
        border: 1px solid var(--ux-line) !important;
    }

    .timeline-header,
    .timeline-row {
        width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: 42mm minmax(0, 1fr) !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .timeline-header > :first-child,
    .timeline-row > :first-child,
    .timeline-label,
    .timeline-header-label {
        position: static !important;
    }

    .timeline-track {
        min-width: 0 !important;
        overflow: visible !important;
    }

    .timeline-bar {
        box-shadow: none !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .enhanced-calendar,
    .calendar-grid,
    .task-calendar-view {
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        margin: 0 !important;
        border-color: var(--ux-line) !important;
    }

    .calendar-grid .calendar-cell,
    .enhanced-calendar .calendar-cell,
    .task-calendar-view .calendar-cell {
        min-height: 24mm !important;
        aspect-ratio: auto !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .calendar-task-card {
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 5mm !important;
        display: flex !important;
        padding: 1.2mm !important;
        border: 1px solid var(--ux-line) !important;
        border-radius: 1mm !important;
        color: var(--ux-ink) !important;
        background: var(--ux-subtle) !important;
        font-size: 7.5pt !important;
        white-space: normal !important;
    }

    .calendar-task-card > * {
        display: initial !important;
    }

    .mobile-agenda {
        display: none !important;
    }

    .public-share-gate {
        position: static !important;
        width: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .public-share-card {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}
