:root {
    color-scheme: light;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f5f8fd;
    --surface-blue: #eef4ff;
    --border: #dce3ed;
    --border-strong: #cfd8e6;
    --text: #111827;
    --muted: #647087;
    --subtle: #8b96a9;
    --blue: #075fe7;
    --blue-dark: #0453d1;
    --blue-soft: #e9f1ff;
    --green: #0aa34f;
    --green-soft: #e8f8ee;
    --orange: #fb650b;
    --orange-soft: #fff1e7;
    --red: #dc2626;
    --shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 7px 18px rgba(15, 23, 42, .035);
    --sidebar: 220px;
    --radius: 7px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

/* Project detail */
.detail-back {
    order: -1;
    min-width: 130px;
    min-height: 46px;
    border-color: var(--blue);
    color: var(--text);
}

.detail-hero {
    min-height: 112px;
    padding-right: 260px;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.detail-breadcrumb a:hover {
    color: var(--blue);
}

.detail-hero h1 {
    overflow: hidden;
    margin: 0;
    font-size: 30px;
    font-weight: 780;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-hero p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-summary,
.detail-progress-card,
.document-workspace {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.detail-summary {
    position: relative;
    min-height: 158px;
    margin-bottom: 18px;
    padding: 18px 245px 17px 20px;
}

.detail-project-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 17px;
    font-weight: 760;
}

.detail-project-title > strong {
    overflow: hidden;
    font-size: 17px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.detail-status.is-deal {
    background: var(--green-soft);
    color: var(--green);
}

.detail-status.is-progress {
    background: var(--blue-soft);
    color: var(--blue);
}

.detail-status.is-exit {
    background: var(--orange-soft);
    color: var(--orange);
}

.detail-project-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-project-actions form {
    margin: 0;
}

.detail-action-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
}

.detail-action-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-action-button.warning {
    border-color: #fed7aa;
    background: var(--orange-soft);
    color: var(--orange);
}

.detail-action-button.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: var(--red);
}

.detail-action-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.detail-facts {
    display: grid;
    grid-template-columns: minmax(140px, .9fr) minmax(150px, .9fr) minmax(190px, 1.25fr) minmax(150px, .9fr) minmax(175px, 1fr) minmax(155px, .9fr);
}

.detail-fact {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 27px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 0 16px;
    border-right: 1px solid var(--border);
}

.detail-fact:first-child {
    padding-left: 6px;
}

.detail-fact:last-child {
    border-right: 0;
}

.detail-fact svg {
    width: 24px;
    height: 24px;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--text);
    stroke-width: 1.65;
}

.detail-fact span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-fact strong {
    overflow: hidden;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-fact.detail-address strong {
    white-space: normal;
}

.detail-fact.detail-deadline strong {
    color: var(--orange);
}

.detail-takeover {
    position: absolute;
    top: 17px;
    right: 20px;
    bottom: 17px;
    width: 205px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.detail-takeover form {
    display: grid;
    grid-template-columns: 1fr 90px;
    gap: 9px;
}

.detail-takeover label {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.detail-takeover select {
    grid-column: 1 / -1;
    width: 100%;
    height: 40px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
}

.detail-takeover button {
    min-height: 38px;
}

.detail-readonly {
    padding: 10px;
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.detail-progress-card {
    min-height: 136px;
    margin-bottom: 18px;
    padding: 15px 20px 17px;
}

.detail-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
}

.detail-section-head h2,
.document-sidebar > h2,
.document-panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 750;
}

.detail-section-head p,
.document-panel-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.detail-section-head > strong {
    padding: 8px 13px;
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.detail-section-head > strong span {
    color: var(--green);
    font-size: 15px;
}

.detail-progress-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    padding: 0 15px;
}

.detail-progress-step {
    position: relative;
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 11px;
    font-weight: 650;
}

.detail-progress-step::after {
    position: absolute;
    z-index: 0;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: #b8c2d0;
    content: "";
}

.detail-progress-step:last-child::after {
    display: none;
}

.detail-progress-step i {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #cbd3df;
    border-radius: 50%;
    background: #e8ebf0;
    color: #485267;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

.detail-progress-step i svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.4;
}

.detail-progress-step.is-done i {
    border-color: #31af60;
    background: #31af60;
    color: #fff;
}

.detail-progress-step.is-done::after {
    background: #31af60;
}

.detail-progress-step.is-active {
    color: var(--blue);
}

.detail-progress-step.is-active i {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.document-workspace {
    display: grid;
    min-height: 405px;
    grid-template-columns: 340px minmax(0, 1fr);
    padding: 17px 20px 20px;
}

.document-sidebar {
    min-width: 0;
    padding-right: 20px;
    border-right: 1px solid var(--border);
}

.document-sidebar > h2 {
    margin-bottom: 12px;
}

.document-sidebar nav {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.document-nav-item {
    display: grid;
    min-height: 45px;
    grid-template-columns: 25px minmax(90px, 1fr) auto 24px 16px;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.document-nav-item:last-child {
    border-bottom: 0;
}

.document-nav-item:hover,
.document-nav-item.is-selected {
    background: var(--blue-soft);
}

.document-nav-item.is-locked {
    color: var(--muted);
}

.document-nav-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.7;
}

.document-nav-item > strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-nav-state {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f0f2f5;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.document-nav-state.is-complete {
    background: var(--green-soft);
    color: var(--green);
}

.document-nav-state.is-open {
    background: var(--blue-soft);
    color: var(--blue);
}

.document-nav-mark {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #e7eaf0;
    color: #4f5a6e;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
}

.document-nav-mark svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.4;
}

.document-nav-mark.is-complete {
    background: #31af60;
    color: #fff;
}

.document-nav-mark.is-open {
    background: var(--blue);
    color: #fff;
}

.document-nav-chevron {
    width: 16px;
    height: 16px;
}

.document-panel {
    min-width: 0;
    padding-left: 22px;
}

.document-panel-head {
    min-height: 47px;
}

.document-panel-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-panel-head h2 span {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10px;
}

.document-file-list {
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.document-file-row {
    display: grid;
    min-height: 59px;
    grid-template-columns: 38px minmax(180px, 1fr) 86px 84px 52px 48px;
    align-items: center;
    gap: 11px;
    padding: 7px 8px 7px 12px;
    border-bottom: 1px solid var(--border);
}

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

.pdf-file-icon {
    position: relative;
    width: 29px;
    height: 35px;
    border-radius: 2px;
    background: #ffe7e7;
}

.pdf-file-icon::after {
    position: absolute;
    top: 0;
    right: 0;
    border-width: 0 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
    content: "";
}

.pdf-file-icon span {
    position: absolute;
    right: -2px;
    bottom: 3px;
    left: -2px;
    padding: 2px 0;
    border-radius: 2px;
    background: #e51e2a;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    text-align: center;
}

.document-file-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.document-file-copy strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-copy span {
    color: var(--muted);
    font-size: 10px;
}

.document-version {
    justify-self: center;
    padding: 3px 8px;
    border-radius: 5px;
    background: #f0f2f5;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.document-version.is-latest {
    background: var(--blue-soft);
    color: var(--blue);
}

.document-file-action,
.document-download,
.document-delete-form {
    display: grid;
    align-self: stretch;
    place-items: center;
    border-left: 1px solid var(--border);
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.document-file-action:hover,
.document-download:hover,
.document-delete-form:hover {
    background: var(--surface-soft);
}

.document-download {
    color: var(--text);
}

.document-download svg,
.document-delete-form svg {
    width: 19px;
    height: 19px;
}

.document-delete-form {
    margin: 0;
}

.document-delete-form button {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--red);
    padding: 0;
}

.document-empty-state {
    display: grid;
    min-height: 105px;
    justify-items: center;
    align-content: center;
    gap: 5px;
    margin-bottom: 15px;
    border: 1px dashed var(--border-strong);
    border-radius: 6px;
    color: var(--muted);
    text-align: center;
}

.document-empty-state.compact {
    min-height: 70px;
}

.document-empty-state svg {
    width: 28px;
    height: 28px;
}

.document-empty-state strong {
    color: var(--text);
    font-size: 12px;
}

.document-empty-state p {
    margin: 0;
    font-size: 10px;
}

.document-upload-form {
    display: grid;
    gap: 13px;
}

.document-dropzone {
    position: relative;
    display: grid;
    min-height: 84px;
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    padding: 13px 20px;
    border: 1px dashed #aeb8c7;
    border-radius: 6px;
    cursor: pointer;
}

.document-dropzone:hover {
    border-color: var(--blue);
    background: var(--surface-soft);
}

.document-dropzone.has-file {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.document-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.document-dropzone > svg {
    width: 45px;
    height: 45px;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--muted);
    stroke-width: 1.35;
}

.document-dropzone > span {
    overflow: hidden;
    align-self: end;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-dropzone.has-file > span {
    color: var(--blue);
}

.document-dropzone > span strong {
    color: var(--blue);
}

.document-dropzone small {
    color: var(--subtle);
    font-size: 10px;
}

.document-upload-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-upload-actions button {
    min-width: 125px;
}

.document-upload-actions > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 650;
}

.document-upload-actions > span svg {
    width: 19px;
    height: 19px;
}

.finish-project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #bde8ce;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f4fff8, #ffffff);
    box-shadow: var(--shadow);
}

.finish-project-card h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 760;
}

.finish-project-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.finish-project-card form {
    margin: 0;
}

.finish-project-card button,
.finish-project-done {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
}

.finish-project-card button {
    border: 0;
    background: var(--green);
    color: #fff;
}

.finish-project-card button:hover {
    filter: brightness(.96);
}

.finish-project-done {
    background: var(--green-soft);
    color: var(--green);
}

.finish-project-card svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.3;
}

@media (max-width: 1400px) {
    .detail-summary {
        padding-right: 220px;
    }

    .detail-takeover {
        width: 185px;
    }

    .detail-facts {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
        row-gap: 16px;
    }

    .detail-fact:nth-child(3) {
        border-right: 0;
    }

    .detail-fact:nth-child(4) {
        padding-left: 6px;
    }
}

@media (max-width: 1100px) {
    .detail-summary {
        padding-right: 20px;
    }

    .detail-takeover {
        position: static;
        width: auto;
        margin-top: 20px;
        padding: 16px 0 0;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .detail-takeover form {
        grid-template-columns: minmax(200px, 1fr) 110px;
        align-items: end;
    }

    .detail-takeover label {
        grid-column: 1;
    }

    .detail-takeover select {
        grid-column: 1;
    }

    .detail-takeover button {
        grid-column: 2;
        grid-row: 2;
    }

    .document-workspace {
        grid-template-columns: 285px minmax(0, 1fr);
    }

    .document-file-row {
        grid-template-columns: 38px minmax(130px, 1fr) 74px 64px 42px;
    }
}

@media (max-width: 820px) {
    .detail-back {
        min-width: auto;
    }

    .detail-hero {
        padding-right: 200px;
    }

    .detail-facts {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .detail-fact:nth-child(odd) {
        padding-left: 6px;
    }

    .detail-fact:nth-child(even) {
        border-right: 0;
    }

    .detail-fact:nth-child(3) {
        border-right: 1px solid var(--border);
    }

    .detail-progress-track {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(95px, 1fr));
        padding-bottom: 6px;
    }

    .document-workspace {
        grid-template-columns: 1fr;
    }

    .finish-project-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-sidebar {
        padding: 0 0 18px;
        border-right: 0;
    }

    .document-panel {
        padding: 18px 0 0;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 560px) {
    .detail-hero {
        min-height: 105px;
        padding-right: 110px;
    }

    .detail-breadcrumb {
        font-size: 11px;
    }

    .detail-hero h1 {
        font-size: 22px;
    }

    .detail-summary,
    .detail-progress-card,
    .document-workspace {
        padding: 15px;
    }

    .detail-project-title {
        flex-wrap: wrap;
    }

    .detail-project-title > strong {
        max-width: calc(100% - 66px);
    }

    .detail-status {
        margin-left: 63px;
    }

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

    .detail-fact,
    .detail-fact:nth-child(3) {
        min-height: 53px;
        padding: 8px 4px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .detail-fact:last-child {
        border-bottom: 0;
    }

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

    .detail-takeover button {
        grid-column: 1;
        grid-row: auto;
    }

    .detail-section-head {
        gap: 10px;
    }

    .detail-section-head > strong {
        white-space: nowrap;
    }

    .document-nav-item {
        grid-template-columns: 23px minmax(70px, 1fr) auto 22px 14px;
        gap: 7px;
        padding: 0 8px;
    }

    .document-file-row {
        grid-template-columns: 36px minmax(0, 1fr) 40px 40px;
        gap: 8px;
    }

    .document-version {
        display: none;
    }

    .document-file-action {
        grid-column: 2;
        min-height: 30px;
        justify-self: start;
        border-left: 0;
    }

    .document-download {
        grid-column: 3;
        grid-row: 1 / 3;
    }

    .document-delete-form {
        grid-column: 4;
        grid-row: 1 / 3;
    }

    .document-dropzone {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 12px;
    }

    .document-dropzone > svg {
        width: 36px;
        height: 36px;
    }
}

/* Compact and reliable weekly schedule editor */
.schedule-week-form {
    display: block;
}

.schedule-grid-wrap {
    max-height: 455px;
    overflow: auto;
    scrollbar-color: #b9c4d4 transparent;
    scrollbar-width: thin;
}

.schedule-month-table thead th {
    position: sticky;
    z-index: 4;
    top: 0;
    height: 42px;
    box-shadow: inset 0 -1px var(--border);
}

.schedule-month-table thead th:first-child {
    z-index: 6;
    left: 0;
}

.schedule-worker-row .schedule-worker-cell {
    position: sticky;
    z-index: 2;
    left: 0;
    min-height: 42px;
    background: var(--surface);
    box-shadow: inset -1px 0 var(--border);
}

.schedule-category-row td {
    position: sticky;
    z-index: 5;
    top: 42px;
    box-shadow: inset 0 -1px var(--border);
}

.schedule-month-table td {
    height: 42px;
    padding: 5px 6px;
}

.schedule-worker-avatar {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 8px;
}

.schedule-project-input {
    height: 30px;
    padding: 0 7px;
    cursor: text;
}

.schedule-save-week {
    display: inline-flex;
    min-height: 34px !important;
    align-items: center;
    gap: 6px;
    padding: 0 11px !important;
    border: 1px solid var(--blue) !important;
    border-radius: 5px;
    background: var(--surface) !important;
    color: var(--blue) !important;
    font-size: 10px;
    font-weight: 700;
}

.schedule-save-week svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-save-week.has-changes,
.schedule-week-form.has-changes .schedule-save-week {
    background: var(--blue) !important;
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(7, 95, 231, .18);
}

.schedule-week-form.has-changes {
    border-color: #8bb6fb;
}

@media (max-width: 680px) {
    .schedule-grid-wrap {
        max-height: 390px;
    }
}

.popup-open {
    overflow: hidden;
}

.deadline-popup {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
}

.deadline-popup[hidden] {
    display: none;
}

.deadline-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 24, .62);
    backdrop-filter: blur(3px);
}

.deadline-popup-card {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    overflow: hidden;
    border: 1px solid #f3b3b0;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 28px 70px rgba(28, 14, 14, .36);
}

.deadline-popup-alert {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #e11d48, #f97316);
    color: #fff;
}

.deadline-popup-alert small {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.deadline-popup-alert strong {
    font-size: 18px;
    font-weight: 800;
}

.deadline-popup-alert-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.deadline-popup-alert-icon svg {
    width: 24px;
    height: 24px;
}

.deadline-popup-alert button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 20px;
}

.deadline-popup-body {
    padding: 20px 20px 18px;
}

.deadline-popup-message {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.deadline-popup-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.deadline-popup-meta div {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.deadline-popup-meta span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.deadline-popup-meta strong {
    color: var(--text);
    font-size: 14px;
}

.deadline-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.deadline-popup-actions .button {
    min-width: 132px;
}

@media (max-width: 560px) {
    .deadline-popup-card {
        width: 100%;
    }

    .deadline-popup-alert {
        grid-template-columns: 44px minmax(0, 1fr) 30px;
        gap: 10px;
        padding: 14px;
    }

    .deadline-popup-meta {
        grid-template-columns: 1fr;
    }

    .deadline-popup-actions {
        flex-direction: column;
    }

    .deadline-popup-actions .button {
        width: 100%;
        min-width: 0;
    }
}

.activity-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(24, 49, 89, .04);
}

.activity-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--line);
}

.activity-filters {
    display: grid;
    grid-template-columns: 1.1fr 1.35fr repeat(2, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px 26px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.activity-filters label {
    display: grid;
    gap: 5px;
}

.activity-filters label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.activity-filters select,
.activity-filters input {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
}

.activity-filters .button {
    min-height: 38px;
    white-space: nowrap;
}

.activity-panel-head h2,
.activity-panel-head p {
    margin: 0;
}

.activity-panel-head h2 {
    color: var(--ink);
    font-size: 18px;
}

.activity-panel-head p,
.activity-panel-head > span,
.activity-copy span,
.activity-row time {
    color: var(--muted);
    font-size: 12px;
}

.activity-panel-head p {
    margin-top: 5px;
}

.activity-list {
    display: grid;
}

.activity-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--line);
}

.activity-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 9px;
    background: #eaf2ff;
    color: var(--blue);
}

.activity-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.activity-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.activity-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-row time {
    white-space: nowrap;
}

.activity-empty {
    padding: 48px 26px;
    color: var(--muted);
    text-align: center;
}

.activity-pagination {
    padding: 16px 26px;
}

@media (max-width: 680px) {
    .activity-filters {
        grid-template-columns: 1fr 1fr;
        padding-right: 16px;
        padding-left: 16px;
    }

    .activity-filters label:nth-child(1),
    .activity-filters label:nth-child(2) {
        grid-column: span 2;
    }

    .activity-panel-head,
    .activity-row {
        padding-right: 16px;
        padding-left: 16px;
    }

    .activity-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .activity-row time {
        grid-column: 2;
    }
}

.online-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.online-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.online-summary-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: var(--blue);
    background: #edf3ff;
}

.online-summary-icon.is-online {
    color: var(--green);
    background: #e9f8ee;
}

.online-summary-icon.is-muted {
    color: var(--muted);
    background: #f3f6fb;
}

.online-summary-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.online-summary-card p {
    margin: 0 0 6px;
    color: var(--muted);
    font-weight: 700;
}

.online-summary-card strong {
    color: var(--text);
    font-size: 30px;
    line-height: 1;
}

.online-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.online-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.online-panel-head h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.online-panel-head p,
.online-panel-head span {
    margin: 0;
    color: var(--muted);
}

.online-list {
    display: grid;
}

.online-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) 140px minmax(210px, 1fr) 130px;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

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

.online-row.is-online {
    background: linear-gradient(90deg, rgba(0, 166, 81, 0.08), transparent 42%);
}

.online-person {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.online-avatar {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #e8f0ff;
    color: var(--blue);
    font-weight: 900;
}

.online-person h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.online-person p {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.online-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
}

.online-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.online-status.active {
    color: var(--green);
    background: #e9f8ee;
}

.online-status.inactive {
    color: var(--muted);
    background: #f1f4f8;
}

.online-time {
    display: grid;
    gap: 4px;
}

.online-time strong {
    color: var(--text);
}

.online-time span {
    color: var(--muted);
}

.online-role {
    justify-self: start;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--blue);
    background: #eaf2ff;
    font-weight: 800;
}

@media (max-width: 980px) {
    .online-summary-grid {
        grid-template-columns: 1fr;
    }

    .online-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .online-panel-head,
    .online-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .online-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Dashboard operations overview */
.dashboard-header-button {
    min-height: 46px;
    padding-inline: 20px;
}

.send-push-reminder {
    margin: 0;
}

.push-reminder-button {
    min-height: 46px !important;
    padding-inline: 16px !important;
    background: #e84d16 !important;
    box-shadow: 0 7px 15px rgba(232, 77, 22, .18);
    white-space: nowrap;
}

.push-reminder-button:hover {
    background: #cf3f0d !important;
}

.notification-button.is-subscribed {
    color: var(--blue);
    background: var(--blue-soft);
}

.notification-button.is-subscribed::after {
    background: var(--green);
}

.dashboard-hero {
    display: flex;
    min-height: 73px;
    align-items: flex-start;
    gap: 36px;
    padding-right: 390px;
}

.dashboard-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    font-weight: 780;
    line-height: 1.15;
}

.dashboard-hero p,
.dashboard-section-head p,
.dashboard-card-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-date {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}

.dashboard-date svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-stat {
    display: flex;
    min-width: 0;
    min-height: 104px;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dashboard-stat-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border-radius: 7px;
}

.dashboard-stat-icon svg {
    width: 29px;
    height: 29px;
    stroke-width: 1.75;
}

.dashboard-stat-icon.is-blue,
.status-summary-icon.is-blue { background: #edf3ff; color: var(--blue); }
.dashboard-stat-icon.is-orange { background: #fff0e6; color: var(--orange); }
.dashboard-stat-icon.is-purple,
.status-summary-icon.is-purple { background: #f2ecff; color: #7338e8; }
.dashboard-stat-icon.is-green,
.status-summary-icon.is-green { background: #e9f8ee; color: var(--green); }

.dashboard-stat > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dashboard-stat span,
.dashboard-stat small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-stat strong {
    color: var(--blue);
    font-size: 23px;
    font-weight: 760;
    line-height: 1.15;
}

.dashboard-stat strong.is-orange-text { color: var(--orange); }
.dashboard-stat strong.is-purple-text { color: #7338e8; font-size: 20px; }
.dashboard-stat strong.is-green-text { color: var(--green); }

.dashboard-reminder-card,
.dashboard-summary-card {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dashboard-reminder-card {
    padding: 14px 18px 12px;
}

.dashboard-section-head {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto minmax(110px, 1fr);
    align-items: center;
    gap: 22px;
    margin-bottom: 10px;
}

.dashboard-section-head h2,
.dashboard-card-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
    font-weight: 760;
}

.dashboard-section-head > a,
.dashboard-card-head > a {
    justify-self: end;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.reminder-filters {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.reminder-filters button {
    min-width: 104px;
    min-height: 36px;
    gap: 8px;
    padding: 0 14px;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    box-shadow: none;
}

.reminder-filters button:last-child { border-right: 0; }
.reminder-filters button:hover,
.reminder-filters button.active { background: var(--blue-soft); color: var(--blue); }
.reminder-filters button b {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: rgba(7, 95, 231, .08);
    font-size: 10px;
}

.reminder-table-head,
.dashboard-reminder-row {
    display: grid;
    grid-template-columns: minmax(250px, 1.55fr) minmax(165px, 1fr) minmax(125px, .8fr) minmax(130px, .9fr) minmax(115px, .7fr) minmax(125px, .8fr) 58px;
    align-items: center;
}

.reminder-table-head {
    padding: 0 10px 7px 78px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.dashboard-reminder-list {
    display: grid;
    gap: 7px;
}

.dashboard-reminder-row {
    position: relative;
    min-height: 70px;
    padding: 8px 9px 8px 77px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 6px;
    background: var(--surface);
}

.dashboard-reminder-row[hidden] { display: none; }
.dashboard-reminder-row.is-urgent { border-color: #ffd0cd; border-left-color: #f04438; background: #fffafa; }
.dashboard-reminder-row.is-attention { border-color: #ffe1c2; border-left-color: #ff7a00; background: #fffdf9; }
.dashboard-reminder-row.is-normal { border-color: #dce7fb; border-left-color: var(--blue); }

.dashboard-reminder-row time {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 12px;
    display: grid;
    width: 48px;
    align-content: center;
    justify-items: center;
    border: 1px solid #cfe0fa;
    border-radius: 5px;
    background: #f3f7ff;
    color: var(--blue);
}

.dashboard-reminder-row.is-urgent time { border-color: #ffc4be; background: #fff2f0; color: #e22b21; }
.dashboard-reminder-row.is-attention time { border-color: #ffd7ac; background: #fff8ef; color: #e96800; }
.dashboard-reminder-row time strong { font-size: 18px; line-height: 1; }
.dashboard-reminder-row time span { margin-top: 2px; font-size: 10px; }

.reminder-project,
.reminder-stage {
    display: grid;
    min-width: 0;
}

.reminder-project small,
.reminder-project span,
.reminder-stage small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reminder-project strong {
    overflow: hidden;
    margin: 2px 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 760;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.stage-pill {
    justify-self: start;
    margin-bottom: 4px;
    padding: 3px 10px;
    border: 1px solid #bcd6ff;
    border-radius: 5px;
    background: #f1f6ff;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
}

.reminder-stage i {
    display: block;
    width: 100%;
    max-width: 138px;
    height: 4px;
    margin-top: 4px;
    overflow: hidden;
    border-radius: 3px;
    background: #dce2eb;
}

.reminder-stage i b { display: block; height: 100%; background: var(--blue); }
.reminder-docs,
.reminder-owner {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 10px;
}

.reminder-docs svg,
.reminder-owner svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--muted);
}

.reminder-owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-deadline strong {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #bed5fa;
    border-radius: 5px;
    background: #f4f8ff;
    color: var(--blue);
    font-size: 10px;
    white-space: nowrap;
}

.is-urgent .reminder-deadline strong { border-color: #ffbcb6; background: #fff3f1; color: #e12b21; }
.is-attention .reminder-deadline strong { border-color: #ffd19f; background: #fff8ef; color: #e96800; }

.reminder-priority span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #bed5fa;
    border-radius: 5px;
    color: var(--blue);
    font-size: 9px;
    white-space: nowrap;
}

.reminder-priority i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.is-urgent .reminder-priority span { border-color: #ffc7c2; background: #fff3f2; color: #e12b21; }
.is-attention .reminder-priority span { border-color: #ffddba; background: #fff8ef; color: #e96800; }
.reminder-open {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
}

.reminder-open svg { width: 17px; height: 17px; }
.reminder-note {
    display: flex;
    min-height: 30px;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 0 12px;
    border: 1px solid #d5e3fb;
    border-radius: 5px;
    background: #f3f7ff;
    color: #426698;
    font-size: 10px;
}

.reminder-note svg { width: 15px; height: 15px; color: var(--blue); }
.dashboard-reminder-empty {
    display: grid;
    min-height: 125px;
    place-items: center;
    align-content: center;
    gap: 5px;
    color: var(--muted);
    text-align: center;
}

.dashboard-reminder-empty svg { width: 35px; height: 35px; color: var(--green); }
.dashboard-reminder-empty strong { color: var(--text); font-size: 13px; }
.dashboard-reminder-empty span { font-size: 11px; }

.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 16px;
    margin-top: 14px;
}

.dashboard-summary-card { min-height: 142px; padding: 14px 16px; }
.dashboard-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dashboard-card-head h2 { font-size: 16px; }
.dashboard-card-head p { margin-top: 2px; font-size: 10px; }
.project-status-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.project-status-summary > div {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border-right: 1px solid var(--border);
}

.project-status-summary > div:last-child { border-right: 0; }
.status-summary-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; }
.status-summary-icon svg { width: 22px; height: 22px; }
.project-status-summary p { display: grid; gap: 1px; margin: 0; color: var(--muted); font-size: 9px; }
.project-status-summary strong { color: var(--blue); font-size: 19px; }
.schedule-status-list { display: grid; }
.schedule-status-list > div {
    display: flex;
    min-height: 22px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    font-size: 9px;
}

.schedule-status-list > div:last-child { border-bottom: 0; }
.schedule-status-list span { display: inline-flex; min-width: 112px; align-items: center; gap: 7px; color: var(--muted); }
.schedule-status-list i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.schedule-status-list .is-ready { color: var(--green); }
.schedule-status-list .is-pending { color: var(--orange); }

.notification-permission {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    display: grid;
    width: min(430px, calc(100vw - 32px));
    grid-template-columns: 42px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid #ffb7b0;
    border-left: 4px solid #e62c21;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(40, 17, 17, .2);
    color: var(--text);
}

.notification-permission[hidden] { display: none; }
.notification-permission > svg { width: 29px; height: 29px; color: #e62c21; }
.notification-permission > div { display: grid; gap: 2px; }
.notification-permission strong { font-size: 12px; }
.notification-permission span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.notification-permission button {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 5px;
    background: #e62c21;
    font-size: 10px;
}

.notification-permission .dismiss-notification-prompt {
    min-width: 28px;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 19px;
    box-shadow: none;
}

@media (max-width: 1250px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reminder-table-head { display: none; }
    .dashboard-reminder-row { grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 1fr) minmax(115px, .8fr) minmax(100px, .7fr) 54px; }
    .reminder-docs,
    .reminder-owner { display: none; }
}

@media (max-width: 920px) {
    .dashboard-hero { min-height: 108px; padding-right: 0; }
    .dashboard-date { display: none; }
    .dashboard-section-head { grid-template-columns: 1fr auto; }
    .dashboard-section-head > a { display: none; }
    .dashboard-reminder-row { grid-template-columns: minmax(180px, 1fr) minmax(120px, .8fr) minmax(100px, .7fr) 54px; }
    .reminder-priority { display: none; }
    .dashboard-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-section-head { display: block; }
    .reminder-filters { margin-top: 12px; }
    .reminder-filters button { min-width: 0; flex: 1; padding-inline: 8px; }
    .dashboard-reminder-row { grid-template-columns: 1fr auto; gap: 8px; padding-left: 70px; }
    .reminder-stage,
    .reminder-priority { display: none; }
    .reminder-deadline { grid-column: 1; }
    .reminder-open { grid-column: 2; grid-row: 1 / span 2; }
    .project-status-summary { grid-template-columns: 1fr; }
    .project-status-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .notification-permission { right: 16px; bottom: 16px; grid-template-columns: 35px minmax(0, 1fr) 28px; }
    .notification-permission > button:not(.dismiss-notification-prompt) { grid-column: 2; justify-self: start; }
    .dismiss-notification-prompt { grid-column: 3; grid-row: 1; }
}

/* Rich deadline alarm shown in-app alongside the native Chrome notification. */
.deadline-toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    display: grid;
    width: min(390px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

body:has(.notification-permission:not([hidden])) .deadline-toast-stack {
    bottom: 118px;
}

.deadline-toast {
    overflow: hidden;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .22), 0 4px 14px rgba(220, 38, 38, .12);
    pointer-events: auto;
    animation: deadline-toast-in .24s ease-out both;
}

.deadline-toast.is-leaving {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity .18s ease, transform .18s ease;
}

.deadline-toast-alert {
    display: grid;
    min-height: 63px;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    background: #d92d20;
    color: #fff;
}

.deadline-toast.is-warning .deadline-toast-alert { background: #e96800; }
.deadline-toast.is-notice .deadline-toast-alert { background: #075fe7; }

.deadline-toast-alert > svg {
    width: 32px;
    height: 32px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    stroke-width: 2;
}

.deadline-toast-alert > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.deadline-toast-alert small {
    overflow: hidden;
    color: rgba(255, 255, 255, .8);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deadline-toast-alert strong {
    font-size: 15px;
    font-weight: 790;
}

.deadline-toast-alert button {
    display: grid;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    box-shadow: none;
}

.deadline-toast-alert button:hover { background: rgba(255, 255, 255, .23); }
.deadline-toast-body { position: relative; padding: 13px 14px 14px; }
.deadline-toast-code {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.deadline-toast-more {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    white-space: nowrap;
}

.deadline-toast h3 {
    overflow: hidden;
    margin: 4px 0 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 780;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.deadline-toast-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-right: 118px;
}

.deadline-toast-meta span {
    display: grid;
    min-width: 0;
    gap: 2px;
    color: var(--muted);
    font-size: 8px;
}

.deadline-toast-meta b {
    overflow: hidden;
    color: var(--text);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deadline-toast-body > a {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    border-radius: 5px;
    background: var(--blue);
    color: #fff;
    font-size: 9px;
    font-weight: 730;
}

.deadline-toast-body > a:hover { background: var(--blue-dark); }
.deadline-toast-body > a svg { width: 15px; height: 15px; }

@keyframes deadline-toast-in {
    from { opacity: 0; transform: translateX(32px) scale(.98); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

[data-theme="dark"] .deadline-toast {
    border-color: #7f1d1d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

@media (max-width: 680px) {
    .deadline-toast-stack { right: 16px; bottom: 16px; }
    .deadline-toast-meta { margin-right: 0; }
    .deadline-toast-body > a { position: static; margin-top: 12px; }
}

/* Keep project colors identical in edit and locked modes. */
.project-tone-1 { --project-bg: #dbeafe; --project-text: #174ea6; }
.project-tone-2 { --project-bg: #dcfce7; --project-text: #14743c; }
.project-tone-3 { --project-bg: #fef3c7; --project-text: #8a5800; }
.project-tone-4 { --project-bg: #ede9fe; --project-text: #5f3aa2; }
.project-tone-5 { --project-bg: #ccfbf1; --project-text: #0f766e; }
.project-tone-6 { --project-bg: #ffe4e6; --project-text: #a42e4b; }
.project-tone-7 { --project-bg: #cffafe; --project-text: #14677a; }
.project-tone-8 { --project-bg: #ffedd5; --project-text: #a84608; }
.project-tone-9 { --project-bg: #e0e7ff; --project-text: #3847a5; }
.project-tone-10 { --project-bg: #ecfccb; --project-text: #4c7111; }
.project-tone-11 { --project-bg: #fae8ff; --project-text: #8a309c; }
.project-tone-12 { --project-bg: #e0f2fe; --project-text: #12658a; }
.project-tone-13 { --project-bg: #d1fae5; --project-text: #0b7754; }
.project-tone-14 { --project-bg: #fef9c3; --project-text: #80620a; }
.project-tone-15 { --project-bg: #fee2e2; --project-text: #a52c2c; }
.project-tone-16 { --project-bg: #f3e8ff; --project-text: #7137a3; }
.project-tone-17 { --project-bg: #dff7f5; --project-text: #176d67; }
.project-tone-18 { --project-bg: #ffe8df; --project-text: #a44827; }
.project-tone-19 { --project-bg: #e2e8f0; --project-text: #475569; }
.project-tone-20 { --project-bg: #e4f8df; --project-text: #3d7732; }

.schedule-project-input[class*="project-tone-"],
.schedule-project-value.has-project[class*="project-tone-"] {
    border-color: transparent !important;
    background: var(--project-bg) !important;
    color: var(--project-text) !important;
}

.schedule-week-card.is-not-generated {
    box-shadow: none;
}

.schedule-week-card.is-not-generated .schedule-week-number {
    background: var(--surface-soft);
    color: var(--muted);
}

.schedule-generated-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-weight: 700;
}

.schedule-generated-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.schedule-week-empty {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: var(--surface-soft);
}

.schedule-week-empty > div {
    display: grid;
    gap: 3px;
}

.schedule-week-empty strong {
    font-size: 12px;
}

.schedule-week-empty span {
    color: var(--muted);
    font-size: 10px;
}

.schedule-week-empty form {
    margin: 0;
}

.schedule-week-empty button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 11px;
}

.schedule-week-empty button svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 560px) {
    .schedule-week-empty {
        align-items: stretch;
        flex-direction: column;
    }
}

.schedule-edit-week,
.schedule-cancel-week {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--surface);
    font-size: 10px;
    font-weight: 700;
}

.schedule-edit-week {
    border-color: var(--blue);
    color: var(--blue);
}

.schedule-edit-week:hover {
    background: var(--blue-soft);
}

.schedule-cancel-week:hover {
    border-color: var(--red);
    color: var(--red);
}

.schedule-edit-week svg {
    width: 15px;
    height: 15px;
}

.schedule-download-excel {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
}

.schedule-download-excel:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.schedule-download-excel svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-grid-wrap {
    position: relative;
}

.schedule-grid-wrap .schedule-month-table thead th {
    position: sticky !important;
    z-index: 8;
    top: 0;
    background: var(--surface-soft);
}

.schedule-grid-wrap .schedule-month-table thead th:first-child {
    z-index: 10;
    left: 0;
}

.schedule-reset-week {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid #f0b7b7;
    border-radius: 5px;
    background: var(--surface);
    color: var(--red);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
}

.schedule-reset-week:hover {
    background: #fff1f1;
}

.schedule-reset-week svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-week-form:has(.schedule-project-input) {
    border-color: #9dbef5;
    box-shadow: 0 0 0 2px rgba(7, 95, 231, .05);
}

@media (max-width: 700px) {
    .schedule-week-meta {
        flex-wrap: wrap;
    }
}

.schedule-month-table th.is-outside,
.schedule-outside-day {
    background: #f1f3f6 !important;
}

.schedule-outside-day {
    pointer-events: none;
}

.schedule-outside-value {
    display: block;
    color: #a6afbd;
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

[data-theme="dark"] .schedule-month-table th.is-outside,
[data-theme="dark"] .schedule-outside-day {
    background: var(--surface-soft) !important;
}

.schedule-project-input,
.schedule-project-value.has-project {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.schedule-project-value.has-project {
    border: 1px solid transparent;
}

.schedule-project-input.project-tone-1,
.schedule-project-value.project-tone-1 {
    border-color: #b9d2ff;
    background: #eaf2ff;
    color: #0755c9;
}

.schedule-project-input.project-tone-2,
.schedule-project-value.project-tone-2 {
    border-color: #aee4c2;
    background: #eaf9ef;
    color: #08783c;
}

.schedule-project-input.project-tone-3,
.schedule-project-value.project-tone-3 {
    border-color: #f2d18e;
    background: #fff7df;
    color: #966000;
}

.schedule-project-input.project-tone-4,
.schedule-project-value.project-tone-4 {
    border-color: #d4c2f5;
    background: #f3edff;
    color: #6840a8;
}

.schedule-project-input.project-tone-5,
.schedule-project-value.project-tone-5 {
    border-color: #9ddfd8;
    background: #e7f8f6;
    color: #08756d;
}

.schedule-project-input.project-tone-6,
.schedule-project-value.project-tone-6 {
    border-color: #f1bdca;
    background: #fff0f4;
    color: #ad3456;
}

.schedule-project-input.project-tone-7,
.schedule-project-value.project-tone-7 {
    border-color: #abdceb;
    background: #e9f8fc;
    color: #176b83;
}

.schedule-project-input.project-tone-8,
.schedule-project-value.project-tone-8 {
    border-color: #f4c29f;
    background: #fff1e7;
    color: #b44c09;
}

[data-theme="dark"] .schedule-project-input[class*="project-tone-"],
[data-theme="dark"] .schedule-project-value[class*="project-tone-"] {
    filter: saturate(.78) brightness(.86);
}

/* Twenty project backgrounds */
.schedule-project-input[class*="project-tone-"],
.schedule-project-value[class*="project-tone-"] {
    border-color: transparent;
    background-clip: padding-box;
    font-weight: 700;
}

.schedule-project-input.project-tone-1,
.schedule-project-value.project-tone-1 { background: #dbeafe; color: #174ea6; }
.schedule-project-input.project-tone-2,
.schedule-project-value.project-tone-2 { background: #dcfce7; color: #14743c; }
.schedule-project-input.project-tone-3,
.schedule-project-value.project-tone-3 { background: #fef3c7; color: #8a5800; }
.schedule-project-input.project-tone-4,
.schedule-project-value.project-tone-4 { background: #ede9fe; color: #5f3aa2; }
.schedule-project-input.project-tone-5,
.schedule-project-value.project-tone-5 { background: #ccfbf1; color: #0f766e; }
.schedule-project-input.project-tone-6,
.schedule-project-value.project-tone-6 { background: #ffe4e6; color: #a42e4b; }
.schedule-project-input.project-tone-7,
.schedule-project-value.project-tone-7 { background: #cffafe; color: #14677a; }
.schedule-project-input.project-tone-8,
.schedule-project-value.project-tone-8 { background: #ffedd5; color: #a84608; }
.schedule-project-input.project-tone-9,
.schedule-project-value.project-tone-9 { background: #e0e7ff; color: #3847a5; }
.schedule-project-input.project-tone-10,
.schedule-project-value.project-tone-10 { background: #ecfccb; color: #4c7111; }
.schedule-project-input.project-tone-11,
.schedule-project-value.project-tone-11 { background: #fae8ff; color: #8a309c; }
.schedule-project-input.project-tone-12,
.schedule-project-value.project-tone-12 { background: #e0f2fe; color: #12658a; }
.schedule-project-input.project-tone-13,
.schedule-project-value.project-tone-13 { background: #d1fae5; color: #0b7754; }
.schedule-project-input.project-tone-14,
.schedule-project-value.project-tone-14 { background: #fef9c3; color: #80620a; }
.schedule-project-input.project-tone-15,
.schedule-project-value.project-tone-15 { background: #fee2e2; color: #a52c2c; }
.schedule-project-input.project-tone-16,
.schedule-project-value.project-tone-16 { background: #f3e8ff; color: #7137a3; }
.schedule-project-input.project-tone-17,
.schedule-project-value.project-tone-17 { background: #dff7f5; color: #176d67; }
.schedule-project-input.project-tone-18,
.schedule-project-value.project-tone-18 { background: #ffe8df; color: #a44827; }
.schedule-project-input.project-tone-19,
.schedule-project-value.project-tone-19 { background: #e2e8f0; color: #475569; }
.schedule-project-input.project-tone-20,
.schedule-project-value.project-tone-20 { background: #e4f8df; color: #3d7732; }

/* Worker resource master */
.schedule-master-button {
    min-height: 54px;
    padding: 0 16px;
}

.schedule-master-button svg,
.resource-create-card button svg,
.resource-group-icon svg,
.resource-save svg,
.resource-delete svg,
.schedule-category-row svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-category-row td {
    height: 34px !important;
    padding: 0 13px !important;
    background: #edf4ff;
    color: var(--blue);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.schedule-category-row.is-transport td {
    background: #fff4e9;
    color: #df6409;
}

.schedule-category-row svg {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 7px;
    vertical-align: middle;
}

.schedule-worker-avatar.is-transport {
    background: var(--orange-soft);
    color: var(--orange);
}

.resource-hero {
    min-height: 100px;
    padding: 2px 260px 20px 0;
}

.resource-hero h1 {
    margin: 4px 0 3px;
    font-size: 28px;
}

.resource-hero p,
.resource-create-card p,
.resource-group-card header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.resource-create-card {
    display: grid;
    min-height: 104px;
    grid-template-columns: minmax(220px, 1fr) minmax(520px, 1.6fr);
    align-items: center;
    gap: 28px;
    margin-bottom: 16px;
    padding: 17px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.resource-create-card h2,
.resource-group-card h2 {
    margin: 0 0 3px;
    font-size: 15px;
}

.resource-create-card form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 135px;
    align-items: end;
    gap: 9px;
}

.resource-create-card .field {
    display: grid;
    gap: 4px;
}

.resource-create-card label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.resource-create-card input,
.resource-create-card select,
.resource-edit-form input,
.resource-edit-form select {
    width: 100%;
    height: 39px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    outline: 0;
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
}

.resource-create-card input:focus,
.resource-create-card select:focus,
.resource-edit-form input:focus,
.resource-edit-form select:focus {
    border-color: var(--blue);
}

.resource-groups {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
    align-items: start;
    gap: 16px;
}

.resource-group-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.resource-group-card > header {
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.resource-group-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
}

.resource-group-icon.is-transport {
    background: var(--orange-soft);
    color: var(--orange);
}

.resource-list {
    display: grid;
}

.resource-row {
    display: grid;
    min-height: 58px;
    grid-template-columns: 30px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

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

.resource-edit-form {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(100px, 1fr) 115px 34px;
    gap: 7px;
}

.resource-save,
.resource-delete {
    display: grid !important;
    width: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    place-items: center;
    border-radius: 5px;
}

.resource-save {
    background: var(--blue-soft) !important;
    color: var(--blue) !important;
}

.resource-delete {
    border: 0;
    background: #fff0f0 !important;
    color: var(--red) !important;
}

.resource-empty {
    padding: 32px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 1050px) {
    .resource-create-card,
    .resource-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .resource-hero {
        padding-right: 0;
    }

    .resource-create-card form {
        grid-template-columns: 1fr;
    }

    .resource-edit-form {
        grid-template-columns: minmax(100px, 1fr) 90px 34px;
    }
}

/* Worker schedule */
.schedule-hero {
    display: flex;
    min-height: 92px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 2px 300px 18px 0;
}

.schedule-eyebrow {
    color: var(--blue);
    font-size: 10px;
    font-weight: 750;
}

.schedule-hero h1 {
    margin: 4px 0 2px;
    font-size: 30px;
    line-height: 1.2;
}

.schedule-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.schedule-lock-state {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.schedule-lock-state.is-editing {
    border-color: #a9c8ff;
    background: var(--blue-soft);
    color: var(--blue);
}

.schedule-lock-state svg,
.schedule-readonly-note svg,
.schedule-save-bar svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-toolbar {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 16px;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.schedule-month-nav {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.schedule-month-nav > .icon-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.schedule-month-nav > .icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-month-nav form {
    min-width: 315px;
}

.schedule-month-nav label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.schedule-month-input {
    display: grid;
    height: 42px;
    grid-template-columns: 25px minmax(130px, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding-left: 11px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface);
}

.schedule-month-input svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: var(--muted);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.schedule-month-input input {
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.schedule-month-input button {
    min-height: 32px;
    margin-right: 4px;
    padding: 0 12px;
    font-size: 11px;
}

.schedule-toolbar-summary {
    display: flex;
    align-items: center;
    gap: 0;
}

.schedule-toolbar-summary span {
    min-width: 105px;
    padding: 4px 18px;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.schedule-toolbar-summary strong {
    display: block;
    color: var(--text);
    font-size: 18px;
}

.schedule-empty {
    display: grid;
    min-height: 390px;
    place-items: center;
    align-content: center;
    padding: 50px 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.schedule-empty-icon {
    display: grid;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
}

.schedule-empty-icon svg,
.schedule-empty button svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.schedule-empty h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.schedule-empty p {
    max-width: 520px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 12px;
}

.schedule-empty button svg {
    width: 19px;
    height: 19px;
}

.schedule-readonly-note {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 13px;
    border: 1px solid #cfe0fb;
    border-radius: 6px;
    background: #f1f6ff;
    color: #45617f;
    font-size: 11px;
}

[data-theme="dark"] .schedule-readonly-note {
    border-color: var(--border);
    background: var(--surface-soft);
}

.schedule-weeks {
    display: grid;
    gap: 12px;
}

.schedule-week-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.schedule-week-head {
    display: grid;
    min-height: 66px;
    grid-template-columns: 42px minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.schedule-week-number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 13px;
    font-weight: 750;
}

.schedule-week-head h2 {
    margin: 0;
    font-size: 14px;
}

.schedule-week-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.schedule-week-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 10px;
}

.schedule-add-worker {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid var(--blue);
    border-radius: 5px;
    background: var(--surface);
    color: var(--blue);
    font-size: 11px;
    font-weight: 650;
}

.schedule-add-worker:hover {
    background: var(--blue-soft);
}

.schedule-add-worker svg,
.schedule-remove-row svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.schedule-grid-wrap {
    overflow-x: auto;
}

.schedule-month-table {
    width: 100%;
    min-width: 1030px;
    border-collapse: collapse;
    table-layout: fixed;
}

.schedule-month-table th,
.schedule-month-table td {
    height: 52px;
    padding: 7px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.schedule-month-table th:last-child,
.schedule-month-table td:last-child {
    border-right: 0;
}

.schedule-month-table tbody tr:last-child td {
    border-bottom: 0;
}

.schedule-month-table th {
    height: 45px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    text-align: center;
}

.schedule-month-table th:first-child {
    width: 175px;
    padding-left: 14px;
    text-align: left;
}

.schedule-month-table th span,
.schedule-month-table th strong {
    display: block;
}

.schedule-month-table th strong {
    margin-top: 1px;
    color: var(--text);
    font-size: 12px;
}

.schedule-month-table th.is-outside {
    opacity: .48;
}

.schedule-action-column,
.schedule-action-cell {
    width: 54px;
    text-align: center;
}

.schedule-worker-cell {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding-left: 12px !important;
}

.schedule-worker-cell strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-worker-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 9px;
    font-weight: 750;
}

.schedule-project-value {
    display: block;
    overflow: hidden;
    color: #a0a9b8;
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-project-value.has-project {
    padding: 6px 7px;
    border-radius: 5px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 650;
}

.schedule-worker-input,
.schedule-project-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    outline: 0;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 10px;
}

.schedule-worker-input:focus,
.schedule-project-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(7, 95, 231, .08);
}

.schedule-remove-row {
    display: grid;
    width: 30px;
    height: 30px;
    margin: auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
}

.schedule-remove-row:hover {
    background: #fff0f0;
    color: var(--red);
}

.schedule-worker-row.is-removed {
    display: none;
}

.schedule-no-worker td {
    height: 64px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.schedule-no-worker svg {
    width: 18px;
    height: 18px;
    margin-right: 7px;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.schedule-save-bar {
    position: sticky;
    z-index: 4;
    bottom: 14px;
    display: grid;
    min-height: 66px;
    grid-template-columns: minmax(250px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 12px 10px 17px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .13);
}

.schedule-save-bar > div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.schedule-cancel {
    min-height: 54px;
}

.header-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 1100px) {
    .schedule-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-toolbar-summary {
        border-top: 1px solid var(--border);
        padding-top: 10px;
    }

    .schedule-toolbar-summary span:first-child {
        border-left: 0;
    }
}

@media (max-width: 680px) {
    .schedule-hero {
        min-height: 112px;
        padding-right: 0;
    }

    .schedule-lock-state {
        display: none;
    }

    .schedule-month-nav form {
        min-width: 0;
        flex: 1;
    }

    .schedule-month-nav {
        width: 100%;
    }

    .schedule-toolbar-summary span {
        min-width: 0;
        flex: 1;
        padding: 4px 8px;
    }

    .schedule-week-head {
        grid-template-columns: 42px minmax(120px, 1fr);
    }

    .schedule-week-meta {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .schedule-save-bar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .schedule-save-bar > div {
        grid-column: 1 / -1;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

button,
select,
a.button {
    cursor: pointer;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--sidebar);
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    min-height: 118px;
    align-items: center;
    justify-content: center;
    padding: 18px 16px 10px;
}

.logo {
    display: block;
    width: 176px;
    max-height: 92px;
    height: auto;
    margin: 0;
    object-fit: contain;
    filter: none !important;
}

.nav {
    display: grid;
    gap: 7px;
    margin-top: 0;
    padding: 0 14px;
    padding-top: 8px;
}

.nav-label {
    display: block;
    margin: 0 0 8px 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav a {
    position: relative;
    display: grid;
    min-height: 51px;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 720;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .02);
}

.nav a:hover {
    border-color: #c9d7ea;
    background: var(--surface-soft);
}

.nav a.active {
    background: var(--blue-soft);
    border-color: #c9defa;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(7, 95, 231, .02);
}

.nav a.active::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 4px;
    border-radius: 6px 0 0 6px;
    background: var(--blue);
    content: "";
}

.nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #1f2937;
}

.nav-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 1.75;
}

.nav a.active .nav-icon {
    color: var(--blue);
}

.sidebar-user {
    display: grid;
    min-height: 128px;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 16px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    font-weight: 750;
}

.user-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.user-copy strong,
.user-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.user-copy span {
    color: var(--muted);
    font-size: 12px;
}

.sidebar-user form {
    grid-column: 1 / -1;
    margin: 0;
}

.push-enable-button {
    display: flex;
    width: 100%;
    height: 36px;
    min-height: 36px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #bed5fa;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 10px;
    font-weight: 720;
    box-shadow: none;
}

.push-enable-button svg {
    width: 16px;
    height: 16px;
}

.push-enable-button:hover {
    border-color: var(--blue);
    background: #dfeaff;
}

.push-enable-button.is-subscribed {
    border-color: #a7e0ba;
    background: var(--green-soft);
    color: var(--green);
}

.push-enable-button.is-blocked {
    border-color: #fecaca;
    background: #fff1f1;
    color: var(--red);
}

.sidebar-user .ghost-button {
    display: flex;
    width: 100%;
    height: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
    box-shadow: none;
}

.sidebar-user .ghost-button:hover {
    border-color: #fecaca;
    background: #fff1f1;
    color: var(--red);
}

.sidebar-user .ghost-button svg {
    width: 17px;
    height: 17px;
}

.sidebar-user .ghost-button span {
    display: inline;
}

.main {
    position: relative;
    grid-column: 2;
    min-width: 0;
    min-height: 100vh;
    padding: 32px 24px 48px 36px;
}

.app-top-actions {
    position: absolute;
    top: 31px;
    right: 29px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-button {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
}

.icon-button:hover {
    background: var(--surface-blue);
    color: var(--blue);
}

.icon-button svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.55;
}

.theme-toggle {
    display: none;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.notification-button::after {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--blue);
    content: "";
}

.button,
button[type="submit"] {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-weight: 650;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.button:hover,
button[type="submit"]:hover {
    background: var(--blue-dark);
}

.button:active,
button[type="submit"]:active {
    transform: translateY(1px);
}

.button.secondary {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.button.secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.button-icon {
    width: 22px;
    height: 22px;
}

.header-button {
    min-width: 178px;
    min-height: 54px;
    padding: 0 22px;
    box-shadow: 0 7px 15px rgba(7, 95, 231, .17);
    font-size: 15px;
}

.pm-hero {
    min-height: 88px;
    padding-right: 270px;
}

.pm-hero h1,
.title h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 760;
    line-height: 1.18;
}

.pm-hero p,
.title p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.pm-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 4px 0 25px;
}

.pm-stat {
    display: flex;
    min-width: 0;
    min-height: 120px;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.pm-stat-icon {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    place-items: center;
    border-radius: 8px;
}

.pm-stat-icon svg {
    width: 31px;
    height: 31px;
    stroke-width: 1.85;
}

.pm-stat-icon.folder,
.pm-stat-icon.trend {
    background: var(--blue-soft);
    color: var(--blue);
}

.pm-stat-icon.deal {
    background: var(--green-soft);
    color: var(--green);
}

.pm-stat-icon.calendar {
    background: var(--orange-soft);
    color: var(--orange);
}

.pm-stat p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.pm-stat strong {
    color: var(--blue);
    font-size: 27px;
    font-weight: 750;
    line-height: 1;
}

.pm-stat:nth-child(3) strong {
    color: var(--green);
}

.pm-stat:nth-child(4) strong {
    color: var(--orange);
}

.pm-control-card {
    display: flex;
    min-height: 52px;
    align-items: stretch;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 9px;
}

.pm-scope-tabs {
    display: flex;
    min-width: 334px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

.pm-scope-tabs a {
    display: flex;
    min-width: 166px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 18px;
    font-weight: 680;
}

.pm-scope-tabs a + a {
    border-left: 1px solid var(--border);
}

.pm-scope-tabs a:hover {
    background: var(--surface-soft);
}

.pm-scope-tabs a.active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.pm-scope-tabs span,
.pm-status-tabs span {
    display: inline-grid;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-blue);
    color: var(--blue);
    font-size: 12px;
    font-weight: 750;
}

.pm-scope-tabs a.active span {
    background: #fff;
    color: var(--blue);
}

.pm-search {
    display: grid;
    width: min(795px, 62%);
    grid-template-columns: minmax(250px, 1fr) 160px 180px;
    gap: 12px;
}

.pm-search label {
    position: relative;
    display: block;
}

.pm-search input,
.pm-search select {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
}

.pm-search input {
    padding: 0 18px 0 53px;
}

.pm-search select {
    padding: 0 42px 0 18px;
}

.pm-search input:focus,
.pm-search select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(7, 95, 231, .1);
}

.pm-search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 1;
    color: var(--muted);
    transform: translateY(-50%);
}

.pm-search-icon svg {
    width: 23px;
    height: 23px;
}

.pm-status-tabs {
    display: flex;
    min-height: 51px;
    align-items: stretch;
    gap: 24px;
    border-bottom: 1px solid var(--border);
}

.pm-status-tabs a {
    position: relative;
    display: flex;
    min-width: 112px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 680;
}

.pm-status-tabs a.active {
    color: var(--blue);
}

.pm-status-tabs a.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--blue);
    content: "";
}

.pm-status-tabs span {
    min-width: 24px;
    height: 24px;
}

.pm-exit-filter {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 4px;
}

.pm-exit-filter a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.pm-exit-filter a.active {
    background: var(--orange);
    color: #fff;
}

.pm-exit-filter svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pm-exit-filter span {
    display: inline-grid;
    min-width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: inherit;
    font-size: 11px;
}

.pm-board {
    padding-top: 22px;
}

.pm-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
}

.pm-board-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 750;
}

.pm-board-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.pm-board-head > strong {
    align-self: flex-start;
    margin-top: 5px;
    font-size: 13px;
}

.pm-project-list {
    display: grid;
    gap: 9px;
}

.pm-project-card {
    display: grid;
    min-height: 118px;
    grid-template-columns: 230px 92px minmax(320px, 1fr) 140px 160px 190px 160px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.pm-project-main,
.pm-current-stage,
.pm-flow,
.pm-doc-count,
.pm-designer-info,
.pm-deadline,
.pm-open {
    min-width: 0;
}

.pm-project-main {
    align-self: stretch;
    padding: 15px 0 12px 24px;
}

.pm-project-code {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.pm-project-line {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pm-initial {
    display: grid;
    width: 40px;
    height: 44px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 20px;
    font-weight: 750;
}

.pm-project-copy {
    min-width: 0;
}

.pm-project-copy h3 {
    overflow: hidden;
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.pm-project-copy p {
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-project-copy p span {
    margin: 0 4px;
}

.pm-project-copy em {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}

.pm-project-copy em svg {
    width: 16px;
    height: 16px;
    color: var(--orange);
}

.pm-current-stage {
    align-self: start;
    padding-top: 19px;
    text-align: center;
}

.pm-current-stage > span {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pm-current-stage i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pm-flow {
    display: grid;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    align-self: stretch;
    padding: 26px 12px 0;
}

.pm-step {
    position: relative;
    min-width: 0;
    text-align: center;
}

.pm-step span {
    display: block;
    overflow: hidden;
    height: 17px;
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-step i {
    position: relative;
    z-index: 2;
    display: block;
    width: 11px;
    height: 11px;
    margin: 12px auto 0;
    border-radius: 50%;
    background: #919bad;
}

.pm-step:not(:last-child)::after {
    position: absolute;
    z-index: 1;
    top: 34px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: #b9c2cf;
    content: "";
}

.pm-step.done i,
.pm-step.current i {
    background: var(--blue);
}

.pm-step.current i {
    width: 16px;
    height: 16px;
    margin-top: 9px;
    box-shadow: 0 0 0 3px rgba(7, 95, 231, .08);
}

.pm-step.done::after {
    background: var(--blue);
}

.pm-doc-count,
.pm-designer-info,
.pm-deadline,
.pm-open {
    align-self: stretch;
    border-left: 1px solid var(--border);
}

.pm-doc-count {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    color: var(--muted);
}

.pm-designer-info {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    color: var(--muted);
}

.pm-doc-count svg,
.pm-designer-info svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.pm-doc-count strong,
.pm-designer-info strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-designer-info p {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.pm-deadline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
}

.pm-mini-calendar {
    align-self: flex-start;
    margin-top: 29px;
    color: var(--orange);
}

.pm-mini-calendar svg {
    width: 20px;
    height: 20px;
}

.pm-deadline p {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.pm-deadline strong {
    display: block;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.pm-deadline em {
    display: inline-flex;
    margin-top: 7px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.pm-deadline em.safe {
    background: var(--green-soft);
    color: var(--green);
}

.pm-deadline.urgent em {
    background: #feecec;
    color: var(--red);
}

.pm-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 720;
    white-space: nowrap;
}

.pm-open:hover {
    background: var(--surface-blue);
}

.pm-open span,
.pm-open svg {
    width: 20px;
    height: 20px;
}

.pm-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    align-content: center;
    gap: 5px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.pm-empty p {
    margin: 0;
    color: var(--muted);
}

.pm-pagination {
    margin-top: 18px;
}

.pm-pagination nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pm-pagination nav > div:first-child {
    display: none;
}

.pm-pagination nav > div:last-child {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.pm-pagination nav span[aria-current="page"] span,
.pm-pagination nav a,
.pm-pagination nav span[aria-disabled="true"] span {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
}

.pm-pagination svg {
    width: 16px;
    height: 16px;
}

.user-hero {
    min-height: 88px;
}

.user-access-list {
    display: grid;
    gap: 16px;
}

.user-access-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.user-access-card form {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.user-access-head {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 210px;
    align-items: center;
    gap: 14px;
}

.user-access-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 760;
}

.user-access-head h2 {
    margin: 0 0 3px;
    font-size: 17px;
}

.user-access-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.user-access-head label {
    display: grid;
    gap: 6px;
}

.user-access-head label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.user-access-head select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
}

.access-section {
    padding: 16px;
    border: 1px solid #cce2f5;
    border-radius: 14px;
    background: #f8fcff;
}

.access-section h3 {
    margin: 0 0 6px;
    color: #064c7b;
    font-size: 16px;
}

.access-section p {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 12px;
}

.access-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
}

.access-check-grid.single {
    grid-template-columns: minmax(220px, 360px);
}

.form-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.access-check {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #c9def0;
    border-radius: 12px;
    background: var(--surface);
    color: #064c7b;
    font-weight: 750;
}

.access-check.compact {
    min-height: 38px;
    justify-content: center;
    padding: 0 12px;
    font-size: 12px;
}

.access-check input {
    width: 17px;
    height: 17px;
    accent-color: #0d6fa8;
}

.document-permission-grid {
    display: grid;
    gap: 9px;
}

.document-permission-row {
    display: grid;
    min-height: 54px;
    grid-template-columns: minmax(210px, 1fr) 120px 120px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.document-permission-row > strong {
    color: var(--text);
    font-size: 13px;
}

.user-access-actions {
    display: flex;
    justify-content: flex-end;
}

[data-theme="dark"] .access-section {
    border-color: var(--border);
    background: var(--surface-soft);
}

[data-theme="dark"] .access-section h3,
[data-theme="dark"] .access-check {
    color: var(--text);
}

.topbar {
    display: flex;
    min-height: 78px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-right: 230px;
}

.panel,
.table-wrap {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.empty-dashboard {
    min-height: 190px;
}

.dashboard-reminders {
    margin-top: 14px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: 19px;
}

.section-head p {
    margin: 4px 0 0;
}

.muted {
    color: var(--muted);
}

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

.field {
    display: grid;
    gap: 7px;
}

.field.full,
.form-grid .full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 13px;
    font-weight: 650;
}

.field input,
.field select,
.field textarea,
.upload-row input[type="file"] {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
}

.field small {
    font-size: 12px;
}

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

.meta-list {
    display: grid;
    align-content: start;
    gap: 0;
}

.meta-list > div {
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.meta-list > div > span {
    color: var(--muted);
    font-size: 12px;
}

.meta-list > form {
    margin-top: 18px;
}

.badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge.progress {
    background: var(--blue-soft);
    color: var(--blue);
}

.badge.deal {
    background: var(--green-soft);
    color: var(--green);
}

.badge.urgent,
.badge.locked-badge {
    background: #feecec;
    color: var(--red);
}

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

.doc-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
}

.doc-card.active {
    border-color: var(--blue);
}

.doc-card.locked {
    background: var(--surface-soft);
}

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

.doc-head h3 {
    margin: 0;
    font-size: 15px;
}

.pdf-preview iframe {
    width: 100%;
    height: 280px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.doc-history {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.doc-history a {
    overflow: hidden;
    color: var(--blue);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 14px;
}

.view-only-note {
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
}

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

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.reminder-item > div {
    display: grid;
    gap: 3px;
}

.reminder-item span {
    color: var(--muted);
    font-size: 12px;
}

.week-controls {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.table-wrap {
    max-width: 100%;
    margin-bottom: 14px;
    overflow-x: auto;
    padding: 0;
}

.schedule-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.schedule-table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.schedule-table input {
    width: 100%;
    min-width: 105px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
}

button.danger {
    background: var(--red);
}

.alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 6px;
}

.alert.success {
    border-color: #a7e1bc;
    background: var(--green-soft);
    color: #08783c;
}

.alert.error {
    border-color: #f2b9b9;
    background: #fff0f0;
    color: #a91d1d;
}

.errors {
    margin: 0;
    padding-left: 20px;
}

.auth-body {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 64px);
    background: #f6f9fd;
}

.login-shell {
    display: grid;
    width: min(1440px, 100%);
    min-height: min(790px, calc(100vh - 80px));
    grid-template-columns: 1.08fr .92fr;
    overflow: hidden;
    border: 1px solid #d9e2ef;
    border-radius: 9px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(42, 61, 89, .1);
}

.login-brand,
.login-card {
    padding: clamp(46px, 5.5vw, 92px);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #eef5ff;
}

.login-brand::before,
.login-brand::after {
    position: absolute;
    bottom: -215px;
    left: -235px;
    width: 470px;
    height: 470px;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-brand::before {
    z-index: 0;
    border: 1.5px solid #0b67ee;
    background: #d9e8fd;
}

.login-brand::after {
    bottom: -245px;
    left: -260px;
    width: 440px;
    height: 440px;
    border: 0;
    background: #0566ad;
    box-shadow: 0 0 0 34px #d3e4fb;
}

.login-brand-content,
.login-features {
    position: relative;
    z-index: 1;
}

.login-logo {
    display: block;
    width: min(290px, 70%);
    height: auto;
    margin: 36px 0 54px;
    object-fit: contain;
}

.login-brand-copy h1 {
    margin: 0 0 14px;
    color: #111b31;
    font-size: clamp(30px, 2.25vw, 40px);
    font-weight: 760;
    line-height: 1.18;
    letter-spacing: 0;
}

.login-brand-copy p,
.login-card-head p {
    margin: 0;
    color: #66748d;
    font-size: 17px;
    line-height: 1.55;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 64px;
    margin-left: 145px;
}

.login-feature {
    display: grid;
    min-width: 0;
    place-items: center;
    gap: 14px;
    padding: 0 20px;
    color: #101a30;
    font-size: 14px;
    font-weight: 650;
    text-align: center;
}

.login-feature + .login-feature {
    border-left: 1px solid #c9daf2;
}

.login-feature-icon {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid #cbd9ed;
    border-radius: 50%;
    background: #fff;
    color: #0866e8;
}

.login-feature-icon svg {
    width: 23px;
    height: 23px;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.login-card-head h2 {
    margin: 0 0 10px;
    color: #111b31;
    font-size: clamp(34px, 2.5vw, 43px);
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: 0;
}

.login-card .grid {
    display: grid;
    gap: 23px;
    margin-top: 42px;
}

.login-card .field {
    gap: 9px;
}

.login-card .field > label {
    color: #172033;
    font-size: 15px;
    font-weight: 700;
}

.login-input {
    position: relative;
    display: flex;
    min-height: 62px;
    align-items: center;
    border: 1px solid #bfcadd;
    border-radius: 7px;
    background: #fff;
    color: #77849a;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.login-input:focus-within {
    border-color: #0866e8;
    box-shadow: 0 0 0 3px rgba(8, 102, 232, .1);
}

.login-input > svg {
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    margin-left: 20px;
}

.login-input input {
    width: 100%;
    min-height: 60px;
    padding: 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 16px;
    box-shadow: none;
}

.login-input input::placeholder {
    color: #8a96aa;
}

.password-toggle {
    display: grid;
    width: 52px;
    min-width: 52px;
    height: 60px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #748198;
    box-shadow: none;
}

.password-toggle:hover {
    color: #075fe7;
}

.password-toggle svg {
    width: 23px;
    height: 23px;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #075fe7;
}

.login-help {
    color: #075fe7;
    font-size: 14px;
    font-weight: 600;
}

.login-submit {
    min-height: 62px;
    border: 0;
    border-radius: 7px;
    background: #075fe7;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(7, 95, 231, .18);
}

.login-submit:hover {
    background: #0453d1;
}

.login-footer {
    margin: 60px 0 0;
    color: #68758d;
    font-size: 14px;
    text-align: center;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11151d;
    --surface: #181e28;
    --surface-soft: #202733;
    --surface-blue: #182a48;
    --border: #2b3442;
    --border-strong: #3a4658;
    --text: #f5f7fb;
    --muted: #aab4c4;
    --subtle: #818c9d;
    --blue: #4c8dff;
    --blue-dark: #3478ee;
    --blue-soft: #182d50;
    --green: #41c979;
    --green-soft: #173927;
    --orange: #ff8a3d;
    --orange-soft: #412719;
    --shadow: none;
}

[data-theme="dark"] .logo { filter: none !important; }

[data-theme="dark"] .nav a {
    background: var(--surface);
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .sidebar-user .ghost-button {
    background: var(--surface-soft);
}

[data-theme="dark"] .nav-icon {
    color: var(--text);
}

[data-theme="dark"] .sidebar-user .ghost-button:hover {
    border-color: #7f1d1d;
    background: #351b22;
    color: #fca5a5;
}

[data-theme="dark"] .login-brand {
    background: #152137;
}

@media (max-width: 1420px) {
    .pm-project-card {
        grid-template-columns: minmax(215px, 1.18fr) 86px minmax(285px, 1.45fr) 128px 145px 180px 130px;
    }

    .pm-project-main {
        padding-left: 18px;
    }

    .pm-flow {
        padding-right: 6px;
        padding-left: 6px;
    }

    .pm-doc-count,
    .pm-designer-info,
    .pm-deadline {
        padding-right: 12px;
        padding-left: 12px;
    }
}

@media (max-width: 1180px) {
    :root {
        --sidebar: 200px;
    }

    .main {
        padding-right: 24px;
        padding-left: 24px;
    }

    .app-top-actions {
        right: 24px;
    }

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

    .pm-project-card {
        grid-template-columns: minmax(250px, 1.1fr) 100px minmax(350px, 1.55fr) 150px;
    }

    .pm-doc-count,
    .pm-designer-info,
    .pm-deadline,
    .pm-open {
        min-height: 68px;
        border-top: 1px solid var(--border);
    }

    .pm-doc-count {
        grid-column: 1 / 2;
        border-left: 0;
    }

    .pm-designer-info {
        grid-column: 2 / 3;
    }

    .pm-deadline {
        grid-column: 3 / 4;
    }

    .pm-mini-calendar {
        align-self: auto;
        margin-top: 0;
    }

    .pm-open {
        grid-column: 4 / 5;
    }

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

    .access-check-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 820px) {
    :root {
        --sidebar: 74px;
    }

    .logo {
        width: 58px;
        margin: 24px auto 0;
    }

    .sidebar-brand {
        min-height: 92px;
        padding: 0;
    }

    .nav {
        margin-top: 24px;
        padding: 0 8px;
        padding-top: 0;
    }

    .nav-label {
        display: none;
    }

    .nav a {
        min-height: 54px;
        grid-template-columns: 1fr;
        justify-content: center;
        padding: 0;
    }

    .nav a span:last-child,
    .user-copy,
    .sidebar-user form {
        display: none;
    }

    .nav a.active::before {
        left: -1px;
    }

    .sidebar-user {
        display: grid;
        min-height: 96px;
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .avatar {
        width: 44px;
        height: 44px;
        margin: auto;
        font-size: 15px;
    }

    .sidebar-user .ghost-button span {
        display: none;
    }

    .sidebar-user .ghost-button {
        width: 44px;
        margin: 0 auto;
    }

    .main {
        padding: 24px 18px 40px;
    }

    .app-top-actions {
        top: 20px;
        right: 18px;
    }

    .header-button {
        min-width: auto;
        min-height: 44px;
        padding: 0 14px;
    }

    .pm-hero {
        min-height: 88px;
        padding-right: 210px;
    }

    .pm-hero h1,
    .title h1 {
        font-size: 25px;
    }

    .pm-control-card {
        display: grid;
    }

    .pm-search {
        width: 100%;
    }

    .pm-project-card {
        grid-template-columns: minmax(220px, 1fr) 100px;
    }

    .pm-flow {
        grid-column: 1 / -1;
        min-height: 74px;
        border-top: 1px solid var(--border);
    }

    .pm-doc-count {
        grid-column: 1 / 2;
    }

    .pm-designer-info {
        grid-column: 2 / 3;
    }

    .pm-deadline {
        grid-column: 1 / 2;
    }

    .pm-open {
        grid-column: 2 / 3;
        min-height: 52px;
        border-left: 0;
    }

    .doc-grid,
    .form-grid,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand,
    .login-card {
        padding: 34px;
    }

    .login-brand {
        min-height: 470px;
    }

    .login-logo {
        width: 235px;
        margin: 0 0 34px;
    }

    .login-features {
        margin-top: 44px;
        margin-left: 110px;
    }

    .user-access-head {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .user-access-head label {
        grid-column: 1 / -1;
    }

    .document-permission-row {
        grid-template-columns: minmax(150px, 1fr) 110px 110px;
    }
}

@media (max-width: 560px) {
    :root {
        --sidebar: 0px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        display: none;
    }

    .main {
        grid-column: 1;
        padding: 18px 14px 34px;
    }

    .app-top-actions {
        top: 14px;
        right: 14px;
        gap: 4px;
    }

    .theme-toggle,
    .notification-button {
        display: none;
    }

    .header-button {
        min-height: 40px;
        font-size: 13px;
    }

    .pm-hero {
        min-height: 78px;
        padding-right: 145px;
    }

    .pm-hero h1 {
        font-size: 22px;
    }

    .pm-hero p {
        display: none;
    }

    .pm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pm-stat {
        min-height: 88px;
        gap: 10px;
        padding: 12px;
    }

    .pm-stat-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .pm-stat-icon svg {
        width: 23px;
        height: 23px;
    }

    .pm-stat p {
        font-size: 11px;
    }

    .pm-stat strong {
        font-size: 22px;
    }

    .pm-scope-tabs {
        min-width: 0;
    }

    .pm-scope-tabs a {
        min-width: 0;
        flex: 1;
        padding: 0 8px;
        font-size: 12px;
    }

    .pm-search {
        grid-template-columns: 1fr;
    }

    .pm-status-tabs {
        gap: 8px;
    }

    .pm-board-head h2 {
        font-size: 18px;
    }

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

    .pm-project-main,
    .pm-current-stage,
    .pm-flow,
    .pm-doc-count,
    .pm-designer-info,
    .pm-deadline,
    .pm-open {
        grid-column: 1;
    }

    .pm-current-stage {
        padding: 0 16px 14px;
        text-align: left;
    }

    .pm-flow {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(56px, 1fr));
    }

    .pm-doc-count,
    .pm-designer-info,
    .pm-deadline,
    .pm-open {
        border-left: 0;
    }

    .pm-deadline {
        min-height: 86px;
    }

    .topbar {
        padding-right: 0;
    }

    .topbar .button {
        display: none;
    }

    .panel {
        padding: 17px;
    }

    .upload-row {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-card {
        padding: 28px 22px;
    }

    .access-check-grid,
    .document-permission-row {
        grid-template-columns: 1fr;
    }

    .access-check.compact {
        justify-content: flex-start;
    }
}

/* Final schedule editor overrides */
.project-tone-1 { --project-bg: #dbeafe; --project-text: #174ea6; }
.project-tone-2 { --project-bg: #dcfce7; --project-text: #14743c; }
.project-tone-3 { --project-bg: #fef3c7; --project-text: #8a5800; }
.project-tone-4 { --project-bg: #ede9fe; --project-text: #5f3aa2; }
.project-tone-5 { --project-bg: #ccfbf1; --project-text: #0f766e; }
.project-tone-6 { --project-bg: #ffe4e6; --project-text: #a42e4b; }
.project-tone-7 { --project-bg: #cffafe; --project-text: #14677a; }
.project-tone-8 { --project-bg: #ffedd5; --project-text: #a84608; }
.project-tone-9 { --project-bg: #e0e7ff; --project-text: #3847a5; }
.project-tone-10 { --project-bg: #ecfccb; --project-text: #4c7111; }
.project-tone-11 { --project-bg: #fae8ff; --project-text: #8a309c; }
.project-tone-12 { --project-bg: #e0f2fe; --project-text: #12658a; }
.project-tone-13 { --project-bg: #d1fae5; --project-text: #0b7754; }
.project-tone-14 { --project-bg: #fef9c3; --project-text: #80620a; }
.project-tone-15 { --project-bg: #fee2e2; --project-text: #a52c2c; }
.project-tone-16 { --project-bg: #f3e8ff; --project-text: #7137a3; }
.project-tone-17 { --project-bg: #dff7f5; --project-text: #176d67; }
.project-tone-18 { --project-bg: #ffe8df; --project-text: #a44827; }
.project-tone-19 { --project-bg: #e2e8f0; --project-text: #475569; }
.project-tone-20 { --project-bg: #e4f8df; --project-text: #3d7732; }

.schedule-project-input[class*="project-tone-"],
.schedule-project-value.has-project[class*="project-tone-"] {
    border-color: transparent !important;
    background: var(--project-bg) !important;
    color: var(--project-text) !important;
}

.schedule-week-form {
    display: block;
}

.schedule-grid-wrap {
    max-height: 455px;
    overflow: auto;
    scrollbar-color: #b9c4d4 transparent;
    scrollbar-width: thin;
}

.schedule-month-table thead th {
    position: sticky;
    z-index: 4;
    top: 0;
    height: 42px;
    padding-top: 4px;
    padding-bottom: 4px;
    box-shadow: inset 0 -1px var(--border);
}

.schedule-month-table thead th:first-child {
    z-index: 6;
    left: 0;
}

.schedule-worker-row .schedule-worker-cell {
    position: sticky;
    z-index: 2;
    left: 0;
    min-height: 42px;
    background: var(--surface);
    box-shadow: inset -1px 0 var(--border);
}

.schedule-category-row td {
    position: sticky;
    z-index: 5;
    top: 42px;
    height: 32px !important;
    box-shadow: inset 0 -1px var(--border);
}

.schedule-month-table td {
    height: 42px;
    padding: 5px 6px;
}

.schedule-worker-avatar {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 8px;
}

.schedule-project-input {
    height: 30px;
    padding: 0 7px;
    cursor: text;
}

.schedule-save-week {
    display: inline-flex;
    min-height: 34px !important;
    align-items: center;
    gap: 6px;
    padding: 0 11px !important;
    border: 1px solid var(--blue) !important;
    border-radius: 5px;
    background: var(--surface) !important;
    color: var(--blue) !important;
    font-size: 10px;
    font-weight: 700;
}

.schedule-save-week svg {
    width: 15px;
    height: 15px;
}

.schedule-save-week.has-changes,
.schedule-week-form.has-changes .schedule-save-week {
    background: var(--blue) !important;
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(7, 95, 231, .18);
}

.schedule-week-form.has-changes {
    border-color: #8bb6fb;
}

@media (max-width: 680px) {
    .schedule-grid-wrap {
        max-height: 390px;
    }
}
