:root {
    --fcs-navy: #16324f;
    --fcs-blue: #1769aa;
    --fcs-sky: #33a6c9;
    --fcs-coral: #e46f61;
    --fcs-bg: #f4f7fa;
    --fcs-ink: #17202a;
    --fcs-muted: #657387;
    --fcs-line: #dce5ef;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--fcs-bg);
    color: var(--fcs-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.task-detail-fixed-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.client-fixed-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.service-fixed-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.services-catalog-fixed-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

html:has(> body > .app-shell) {
    overflow-x: clip;
    overscroll-behavior-x: none;
}

.app-shell {
    --sidebar-width: 230px;
    min-height: 100vh;
    overflow-x: clip;
}

.app-shell :where(.table-responsive, .services-catalog-scroll, .client-page-tabs, .sidebar nav) {
    overscroll-behavior-x: contain;
}

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    background: var(--fcs-navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 116px;
    padding: 12px 20px;
    background: #f8fbff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand-logo {
    width: 190px;
    max-width: 100%;
    aspect-ratio: 200 / 103;
    background: url('/assets/fcs-sidebar-logo.webp') center / contain no-repeat;
}

[data-theme="dark"] .sidebar .brand { background: #091525; }
[data-theme="dark"] .sidebar-brand-logo { background-image: url('/assets/fcs-sidebar-logo-dark.webp'); }

@media (max-width: 860px) {
    .sidebar .brand { min-height: 56px; padding: 4px 12px; }
    .sidebar-brand-logo { width: 94px; }
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--fcs-sky);
    color: var(--theme-text-082235, #082235);
    font-weight: 800;
}

.brand-mark-logo {
    background: var(--theme-bg-ffffff, #fff);
    overflow: hidden;
    padding: 4px;
}

.brand-mark-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand span, .topbar p, .muted { color: var(--fcs-muted); }
.brand span { display: block; color: rgba(255,255,255,.65); font-size: .8rem; }

.sidebar-scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.sidebar nav { padding: 14px; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-timer {
    margin: auto 14px 12px;
    padding: 12px;
    border: 1px solid rgba(51,166,201,.34);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-account {
    text-align: center;
    flex: 0 0 auto;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.55);
    font-size: .8rem;
}

.sidebar-timer + .sidebar-foot { margin-top: 0; }
.sidebar-timer-main {
    display: grid !important;
    gap: 3px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #fff !important;
    background: transparent !important;
    text-decoration: none;
}
.sidebar-timer-label {
    color: rgba(255,255,255,.58);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.sidebar-timer-main strong {
    color: #fff;
    font-size: 1.16rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.sidebar-timer-main span:last-child {
    overflow: hidden;
    color: rgba(255,255,255,.72);
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-timer-stop { margin: 0; }
.sidebar-timer-stop button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 7px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    padding: 7px 10px;
}
.sidebar-timer-stop button:hover { background: rgba(255,255,255,.2); }
.sidebar-foot { margin-top: auto; padding: 16px 20px; color: rgba(255,255,255,.55); font-size: .8rem; }
.sidebar-account-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
}

.sidebar-account-menu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.sidebar-account-menu:hover,
.sidebar-account-menu:focus-visible { background: rgba(255,255,255,.12); }
.sidebar-account-menu[aria-expanded="true"] i { transform: rotate(180deg); }

.sidebar-account-actions { display: none; }

.sidebar-account-actions {
    max-width: 150px;
    margin: 4px auto 0;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    background: rgba(255,255,255,.06);
}

.sidebar-account-actions a {
    margin: 0;
    padding: 6px 8px;
}

.sidebar-account-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sidebar .sidebar-account-bell,
.sidebar-account-theme {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.8);
    font-size: .8rem;
    line-height: 1;
}

.sidebar-account-theme { cursor: pointer; }

.sidebar-account-bell .bi,
.sidebar-account-bell .bi::before,
.sidebar-account-theme .bi,
.sidebar-account-theme .bi::before {
    display: block;
    line-height: 1;
}

.sidebar .sidebar-account-bell:hover,
.sidebar .sidebar-account-bell:focus-visible,
.sidebar .sidebar-account-bell[aria-current="page"],
.sidebar-account-theme:hover,
.sidebar-account-theme:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.12);
    border-radius: 5px;
}

.sidebar .sidebar-account-bell .notification-count {
    position: absolute;
    top: 0;
    left: 65%;
    padding: 2px 3px;
    font-size: .56rem;
    line-height: 1;
}

.sidebar .sidebar-version {
    display: inline-block;
    padding: 0;
    margin: 0;
    color: rgba(255,255,255,.68);
    font-size: .73rem;
    font-weight: 400;
    line-height: 1.2;
}

.sidebar .sidebar-version:hover,
.sidebar .sidebar-version:focus-visible {
    background: transparent;
    color: #fff;
    text-decoration: underline;
}

.main { min-width: 0; margin-left: var(--sidebar-width); padding: 24px; }

.wp-manager-page .app-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.wp-manager-page .main {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
}

.wp-manager-frame,
.web-pages-preview {
    display: block;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    border: 0;
}

.web-pages-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fcs-line);
}

.web-pages-toolbar nav { display: flex; flex-wrap: wrap; gap: 8px; }

.web-page-editor {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
}

.web-page-editor-fields {
    padding: 16px;
    overflow: auto;
    border-inline-end: 1px solid var(--fcs-line);
}

.web-page-editor .web-pages-preview { height: 100%; }

@media (max-width: 860px) {
    .web-page-editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 40%) minmax(0, 1fr); }
    .web-page-editor-fields { border-inline-end: 0; border-bottom: 1px solid var(--fcs-line); }
}


@media (max-width: 860px) {
    .wp-manager-page .app-shell {
        display: flex;
        flex-direction: column;
    }

    .wp-manager-page .sidebar {
        flex: 0 0 auto;
        max-height: 40dvh;
    }

    .wp-manager-page .main {
        flex: 1 1 0;
        height: auto;
    }
}

.task-detail-fixed-page .app-shell,
.client-fixed-page .app-shell,
.service-fixed-page .app-shell,
.services-catalog-fixed-page .app-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.task-detail-fixed-page .main,
.client-fixed-page .main,
.service-fixed-page .main,
.services-catalog-fixed-page .main {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-detail-fixed-page .topbar,
.client-fixed-page .topbar,
.service-fixed-page .topbar,
.services-catalog-fixed-page .topbar {
    flex: 0 0 auto;
}

.task-detail-fixed-page .flash-toast,
.client-fixed-page .flash-toast,
.service-fixed-page .flash-toast,
.services-catalog-fixed-page .flash-toast {
    flex: 0 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.topbar h1 { font-size: 1.55rem; margin: 0 0 2px; letter-spacing: 0; }
.topbar p { margin: 0; }

.settings-compact-page .topbar {
    display: none;
}

.task-title-meta {
    color: var(--fcs-muted);
    font-size: .9rem;
    font-weight: 500;
}

.task-created-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.task-created-meta input {
    width: 196px;
    min-height: 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.35;
    padding: 3px 8px;
}

.task-created-meta input:hover,
.task-created-meta input:focus {
    border-color: var(--theme-line-d8e3f0, #d8e3f0);
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    outline: 0;
    box-shadow: 0 0 0 .18rem rgba(23, 105, 170, .08);
}

.panel {
    min-width: 0;
    overflow-wrap: anywhere;
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    margin-bottom: 18px;
}
.panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--fcs-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-header h2 { font-size: 1rem; margin: 0; }
.panel-body { padding: 16px; }

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--fcs-line);
}

.settings-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--fcs-muted);
    font-size: .9rem;
    font-weight: 800;
    padding: 9px 13px;
    text-decoration: none;
}

.settings-tabs a:hover {
    color: var(--fcs-blue);
    background: var(--theme-bg-f8fbfd, #f8fbfd);
}

.settings-tabs a.active {
    border-color: var(--fcs-line);
    border-bottom-color: var(--theme-line-ffffff, #fff);
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-heading, var(--fcs-navy));
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.active {
    display: block;
}

.metric {
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    padding: 16px;
}
.metric span { color: var(--fcs-muted); font-size: .82rem; }
.metric strong { display: block; font-size: 1.35rem; margin-top: 4px; }

.intake-admin-list {
    display: grid;
}

.intake-admin-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--fcs-line);
    padding: 12px 14px;
}

.intake-admin-form.active {
    background: var(--theme-bg-f4fbff, #f4fbff);
}

.intake-admin-form a {
    color: var(--fcs-heading, var(--fcs-navy));
    text-decoration: none;
}

.intake-admin-form span {
    display: block;
    color: var(--fcs-muted);
    font-size: .82rem;
}

.intake-admin-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.intake-edit-grid,
.intake-field-editor,
.intake-edit-form {
    display: grid;
    gap: 14px;
}

.intake-field-list {
    display: grid;
    gap: 12px;
}

.intake-edit-grid label > span,
.intake-edit-field label > span {
    display: block;
    color: var(--fcs-heading, var(--fcs-navy));
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.intake-edit-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.intake-edit-switch span {
    color: var(--fcs-ink);
    font-weight: 700;
}

.intake-edit-field {
    display: grid;
    gap: 12px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 12px;
}

.intake-edit-field.is-dragging {
    opacity: .55;
}

.intake-edit-field-new {
    background: var(--theme-bg-ffffff, #fff);
    border-style: dashed;
}

.intake-edit-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.intake-edit-field-head strong {
    flex: 1;
    color: var(--fcs-heading, var(--fcs-navy));
}

.intake-drag-handle {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--fcs-line);
    border-radius: 7px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-muted);
    cursor: grab;
}

.intake-drag-handle:active {
    cursor: grabbing;
}

.intake-edit-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 10px;
}

.intake-edit-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.intake-edit-checks label,
.intake-edit-field-head label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fcs-muted);
    font-weight: 700;
    margin: 0;
}

.intake-add-field-button {
    justify-self: start;
}

.intake-value-list {
    display: grid;
    gap: 12px;
}

.intake-value-row {
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 12px;
}

.intake-value-row span,
.intake-summary label {
    display: block;
    color: var(--fcs-muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.intake-value-row strong {
    display: block;
    margin-top: 4px;
    white-space: pre-wrap;
    word-break: break-word;
}

.intake-summary {
    display: grid;
    gap: 10px;
}

.intake-public-page {
    background: var(--theme-bg-edf4f8, #edf4f8);
}

.intake-public-shell {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.intake-public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fcs-heading, var(--fcs-navy));
    font-weight: 800;
    margin-bottom: 16px;
}

.intake-public-card {
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 16px 36px rgba(22, 50, 79, .1);
    padding: 22px;
}

.intake-public-head {
    border-bottom: 1px solid var(--fcs-line);
    margin-bottom: 18px;
    padding-bottom: 14px;
}

.intake-public-head h1 {
    font-size: 1.55rem;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.intake-public-head p {
    color: var(--fcs-muted);
    margin: 0;
}

.intake-form {
    display: grid;
    gap: 15px;
}

.intake-field label {
    color: var(--fcs-heading, var(--fcs-navy));
    font-size: .9rem;
    font-weight: 800;
    margin-bottom: 6px;
}

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

.intake-choice-list label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    color: var(--fcs-ink);
    font-weight: 600;
    padding: 10px;
}

.intake-submit {
    justify-self: start;
}

.intake-success {
    text-align: center;
    padding: 28px 12px;
}

.intake-success i {
    color: var(--theme-text-198754, #198754);
    font-size: 2.5rem;
}

.intake-success h1 {
    font-size: 1.45rem;
    margin: 10px 0 6px;
}

@media (max-width: 760px) {
    .intake-edit-field-grid {
        grid-template-columns: 1fr;
    }

    .intake-admin-form {
        align-items: flex-start;
    }
}

.table { margin-bottom: 0; }
.table th { color: var(--fcs-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }

.task-list-table th,
.task-list-table td {
    vertical-align: middle;
}

.task-list-table {
    table-layout: fixed;
    width: 100%;
}

.task-list-col-id { width: 8%; }
.task-list-col-task { width: 25%; }
.task-list-col-client { width: 18%; }
.task-list-col-created { width: 12%; }
.task-list-col-due { width: 12%; }
.task-list-col-status { width: 14%; }
.task-list-col-priority { width: 11%; }

.task-id-cell {
    color: var(--fcs-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.task-list-quick-form {
    margin: 0;
    min-width: 0;
}

.task-list-inline-value {
    max-width: 100%;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-ink);
    font: inherit;
    line-height: 1.2;
    padding: 2px 4px;
    text-align: left;
}

.task-list-inline-value:hover,
.task-list-inline-value:focus {
    background: var(--theme-bg-edf5ff, #edf5ff);
    box-shadow: inset 0 0 0 1px #d8e3f0;
    outline: 0;
}

.task-list-inline-value span:not(.task-option-swatch) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-list-inline-editor[hidden] {
    display: none !important;
}

.task-list-quick-form.is-saving {
    opacity: .68;
}

.task-list-quick-form .task-option-picker-button {
    min-height: 32px;
    border-color: transparent;
    background: transparent;
    padding: 4px 7px;
}

.task-list-quick-form .task-option-picker-button:hover,
.task-list-quick-form .task-option-picker-button[aria-expanded="true"] {
    border-color: var(--theme-line-c9d8ea, #c9d8ea);
    background: var(--theme-bg-ffffff, #fff);
}

.task-list-quick-form .task-option-picker-menu,
.task-list-quick-form .task-date-picker-menu {
    min-width: 220px;
}

.task-list-table th,
.task-list-table td {
    overflow-wrap: anywhere;
}

.task-group-list {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
}

.task-group {
    overflow: visible;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
}

.task-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    color: var(--fcs-heading, var(--fcs-navy));
    font-weight: 800;
}

.task-group summary::-webkit-details-marker {
    display: none;
}

.task-group-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.task-group summary .bi-chevron-down {
    color: var(--fcs-sky);
    transition: transform .15s ease;
}

.task-group:not([open]) summary .bi-chevron-down {
    transform: rotate(-90deg);
}

.task-group-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    display: inline-block;
}

.task-group-count {
    min-width: 26px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--theme-bg-edf7fb, #edf7fb);
    color: var(--fcs-blue);
    font-size: .82rem;
}

.section-title {
    font-size: .92rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.check-toggle {
    border: 0;
    background: transparent;
    color: var(--fcs-blue);
    padding: 0;
}

.comment-box {
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    margin-bottom: 8px;
}

.task-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 0;
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    overflow: visible;
}

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

.task-detail-fixed-page .task-workspace {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.task-detail-fixed-page .task-main {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-detail-fixed-page .task-tabs {
    flex: 0 0 auto;
}

.task-detail-fixed-page .task-tab-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.task-detail-fixed-page .task-tab-activity {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
}

.task-detail-fixed-page .task-tab-activity .task-section-head {
    flex: 0 0 auto;
}

.task-detail-fixed-page .task-tab-activity .task-activity {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 22px;
}

.task-title-parent {
    color: var(--fcs-muted);
    font-weight: 700;
}

.task-created-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.task-created-meta > span + span {
    padding-left: 14px;
    border-left: 1px solid var(--fcs-line);
}

.task-created-display {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-muted);
    font: inherit;
    min-height: 28px;
    padding: 2px 4px;
    text-align: left;
}

.task-created-display:hover,
.task-created-display:focus {
    background: var(--theme-bg-f2f5fa, #f2f5fa);
    box-shadow: inset 0 0 0 1px #d8e3f0;
    color: var(--fcs-ink);
    outline: 0;
}

.task-created-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.task-created-editor[hidden] {
    display: none !important;
}

.task-created-date-picker {
    flex: 0 0 168px;
    width: 168px;
}

.task-created-time-picker {
    width: 64px;
}

.task-created-time-picker:last-child {
    width: 70px;
}

.task-created-meta .task-option-picker-button {
    min-height: 32px;
    padding: 5px 8px;
}

.task-created-meta .task-date-picker-menu,
.task-created-meta .task-option-picker-menu {
    z-index: 700;
}

.topbar [data-task-title-source] {
    border-radius: 6px;
    outline: 0;
    padding: 2px 4px;
}

.topbar [data-task-title-source]:hover,
.topbar [data-task-title-source].is-editing {
    background: var(--theme-bg-f2f5fa, #f2f5fa);
    box-shadow: inset 0 0 0 1px #d8e3f0;
}

.task-crumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--theme-text-8b98aa, #8b98aa);
    font-size: .82rem;
    font-weight: 700;
}

.task-crumbs span + span::before {
    content: "•";
    margin-right: 8px;
    color: #aab4c3;
}

.task-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    border-bottom: 1px solid var(--fcs-line);
    overflow-x: auto;
}

.task-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 8px;
    color: var(--theme-text-8793a6, #8793a6);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: .86rem;
}

.task-tabs a.active {
    color: var(--theme-text-243f9d, #243f9d);
    border-color: #243f9d;
    font-weight: 700;
}

.task-tabs span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--theme-bg-eef2f8, #eef2f8);
    font-size: .75rem;
}

.task-tab-body { padding: 22px; }

.task-kicker,
.task-side-form label {
    display: block;
    margin: 0 0 8px;
    color: #98a3b4;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.task-description {
    min-height: 132px;
    background: var(--theme-bg-f2f5fa, #f2f5fa);
    border-color: var(--theme-line-e2e8f2, #e2e8f2);
    resize: vertical;
}

.task-divider {
    height: 1px;
    background: var(--fcs-line);
    margin: 24px 0;
}

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

.task-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #98a3b4;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.task-section-head span {
    color: #98a3b4;
    font-size: .82rem;
    font-weight: 700;
}

.task-action-dropdown {
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
}

.task-action-dropdown summary {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--theme-line-b8d3f3, #b8d3f3);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-blue);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 800;
    list-style: none;
    padding: 7px 10px;
}

.task-action-dropdown summary::-webkit-details-marker {
    display: none;
}

.task-action-dropdown[open] summary {
    border-color: var(--fcs-blue);
    box-shadow: 0 0 0 .2rem rgba(23, 105, 170, .12);
}

.task-action-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(760px, calc(100vw - 96px));
    padding: 12px;
    border: 1px solid var(--theme-line-d8e3f0, #d8e3f0);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    overflow: visible;
    box-shadow: 0 18px 40px rgba(20, 38, 58, .18);
}

.task-action-menu .task-log-time {
    display: grid;
    grid-template-columns: minmax(150px, .9fr) minmax(90px, .55fr) minmax(95px, .55fr) minmax(160px, 1.2fr) auto auto;
}

.task-log-time-date .task-date-picker {
    width: 100%;
}

.task-progress {
    height: 7px;
    border-radius: 999px;
    background: var(--theme-bg-edf2f8, #edf2f8);
    margin-bottom: 12px;
    overflow: hidden;
}

.task-progress span {
    display: block;
    height: 100%;
    background: var(--fcs-sky);
}

.task-line-item,
.task-add-row,
.task-upload,
.task-log-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-line-item {
    min-height: 38px;
    border-bottom: 1px solid var(--theme-line-eef2f6, #eef2f6);
}

.task-checklist-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.task-subtask-link {
    color: var(--fcs-ink);
    text-decoration: none;
}

.task-subtask-link:hover {
    background: var(--theme-bg-f8fbfd, #f8fbfd);
}

.task-subtask-link .badge {
    margin-left: auto;
}

.task-line-toggle,
.task-line-delete {
    margin: 0;
}

.task-line-item button {
    border: 0;
    background: transparent;
    color: var(--theme-text-243f9d, #243f9d);
    padding: 0;
}

.task-line-delete button {
    color: #98a3b4;
    padding: 4px 6px;
}

.task-line-delete button:hover {
    color: var(--theme-text-b42318, #b42318);
}

.task-line-item .is-complete {
    color: #98a3b4;
    text-decoration: line-through;
}

.task-add-row .form-control {
    border-radius: 999px;
    background: var(--theme-bg-f7f9fc, #f7f9fc);
}

.task-comment-form {
    position: relative;
    margin-bottom: 18px;
}

.task-comment-form textarea {
    min-height: 112px;
    padding-bottom: 46px;
    background: var(--theme-bg-f2f5fa, #f2f5fa);
    border-color: var(--theme-line-e2e8f2, #e2e8f2);
}

.task-comment-form button {
    position: absolute;
    right: 10px;
    bottom: 10px;
}

.task-comment {
    padding: 12px 0;
    border-bottom: 1px solid var(--theme-line-eef2f6, #eef2f6);
}

.task-comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.task-comment-actions form {
    margin: 0;
}

.task-comment-actions button {
    border: 0;
    background: transparent;
    color: #98a3b4;
    font-size: .82rem;
    font-weight: 700;
    padding: 0;
}

.task-comment-actions button:hover,
.task-comment-actions button.is-liked {
    color: var(--theme-text-243f9d, #243f9d);
}

.task-reply-form {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.task-reply-form.is-open {
    display: flex;
}

.task-reply-form .form-control {
    border-radius: 999px;
    background: var(--theme-bg-f7f9fc, #f7f9fc);
}

.task-comment-reply {
    margin: 10px 0 0 28px;
    padding: 10px 0 0;
    border-bottom: 0;
    border-top: 1px solid var(--theme-line-eef2f6, #eef2f6);
}

.task-empty {
    color: #98a3b4;
    text-align: center;
    margin: 24px 0 0;
}

.task-empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 220px;
    color: #98a3b4;
    text-align: center;
}

.task-empty-state i {
    color: #a9b3c2;
    font-size: 2.2rem;
}

.task-empty-state strong {
    color: var(--theme-text-697588, #697588);
}

.task-empty-state span {
    display: block;
}

.task-upload {
    align-items: stretch;
    gap: 10px;
}

.task-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.task-upload-picker {
    flex: 1;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed var(--theme-line-c7d5e5, #c7d5e5);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--theme-bg-fbfdff, #fbfdff), var(--theme-bg-f5f8fc, #f5f8fc));
    color: var(--fcs-ink);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.task-upload-picker:hover,
.task-upload-picker.is-dragover {
    border-color: var(--fcs-sky);
    background: var(--theme-bg-f3fbff, #f3fbff);
    box-shadow: 0 8px 22px rgba(23, 105, 170, .08);
}

.task-upload-picker.has-file {
    border-style: solid;
    border-color: var(--theme-line-b8dcec, #b8dcec);
    background: var(--theme-bg-f7fcff, #f7fcff);
}

.task-upload-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(51, 166, 201, .13);
    color: var(--fcs-blue);
    font-size: 1.25rem;
}

.task-upload-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.task-upload-copy strong {
    overflow: hidden;
    color: var(--fcs-ink);
    font-size: .94rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-upload-copy span {
    color: var(--fcs-muted);
    font-size: .8rem;
}

.task-upload-action {
    flex: 0 0 auto;
    border: 1px solid var(--theme-line-d8e4ef, #d8e4ef);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-blue);
    font-size: .78rem;
    font-weight: 800;
    padding: 7px 10px;
}

.task-upload-submit {
    min-width: 92px;
}

.task-upload-submit:disabled {
    opacity: .52;
    cursor: not-allowed;
}

.task-attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--theme-line-eef2f6, #eef2f6);
}

.task-attachment a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--fcs-ink);
    text-decoration: none;
}

.task-attachment a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-time-summary,
.task-side-time {
    display: flex;
    gap: 18px;
    margin-bottom: 16px;
}

.task-time-summary span,
.task-side-time span {
    display: block;
    color: #98a3b4;
    font-size: .78rem;
}

.task-time-summary strong,
.task-side-time strong {
    display: block;
    font-size: 1rem;
}

.task-billable {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
}

.task-time-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.task-time-list > div,
.task-activity > div {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 0 8px;
    align-items: start;
}

.task-time-list .muted {
    grid-column: 2;
    color: #98a3b4;
}

.task-time-list > .task-time-entry {
    grid-template-columns: 14px minmax(0, 1fr) auto;
}

.task-time-entry-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    display: flex;
    gap: 6px;
}

.task-time-entry-actions .btn {
    width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.task-time-entry-edit {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.time-entry-edit-form {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.time-entry-edit-form label,
.time-entry-date-field > span,
.time-entry-clock > span {
    margin: 0;
    color: var(--fcs-muted);
    font-size: .9rem;
    font-weight: 700;
}

.time-entry-date-field,
.time-entry-clock {
    display: grid;
    gap: 8px;
}

.time-entry-clock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.time-entry-clock-grid .task-option-picker-button {
    min-height: 40px;
}

.time-entry-duration {
    display: grid;
    gap: 8px;
}

.time-entry-duration > span {
    color: var(--fcs-muted);
    font-size: .9rem;
    font-weight: 700;
}

.time-entry-duration-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.time-entry-duration-grid label {
    display: grid;
    gap: 5px;
    font-size: .78rem;
}

.time-entry-duration-grid .form-control {
    min-width: 0;
}

.task-activity-content {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.task-activity-message {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    color: #98a3b4;
    font-size: .92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-activity-label {
    color: var(--fcs-ink);
}

.task-activity small {
    color: var(--theme-text-8190a5, #8190a5);
    font-size: .82rem;
    line-height: 1.35;
}

.task-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 999px;
    background: #243f9d;
}

.task-activity {
    display: grid;
    align-content: start;
    gap: 0;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 8px;
}

.task-activity > .task-activity-entry {
    padding: 13px 0;
}

.task-activity > .task-activity-entry + .task-activity-entry {
    border-top: 1px solid var(--fcs-line);
}

.task-side {
    border-left: 1px solid var(--fcs-line);
    background: var(--theme-bg-f7f9fc, #f7f9fc);
    padding: 22px 20px;
    position: relative;
    z-index: 5;
    overflow: visible;
}

.task-detail-fixed-page .task-side {
    min-height: 0;
    overflow-y: auto;
    overflow-x: visible;
}

.task-side-form {
    display: grid;
    gap: 10px;
    position: relative;
    overflow: visible;
}

.task-side-timer {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
    padding-top: 12px;
}

.task-side-timer .btn {
    width: 100%;
    display: flex;
    justify-content: center;
}

.task-timer-running {
    display: grid;
    place-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(25, 135, 84, .28);
    border-radius: 8px;
    background: var(--theme-bg-eefaf4, #eefaf4);
}

.task-timer-elapsed {
    color: var(--fcs-ink);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.task-recurring-box {
    display: grid;
    gap: 10px;
    padding: 0;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    overflow: hidden;
}

.task-recurring-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
    color: var(--fcs-ink);
    font-size: .93rem;
    font-weight: 600;
}

.task-recurring-summary::-webkit-details-marker {
    display: none;
}

.task-recurring-box[open] {
    padding-bottom: 0;
}

.task-recurring-box[open] .task-recurring-summary {
    border-bottom: 1px solid var(--fcs-line);
}

.task-recurring-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.task-recurring-label i {
    color: var(--fcs-blue);
}

.task-recurring-value {
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 700;
    white-space: nowrap;
}

.task-recurring-chevron {
    color: #98a3b4;
    font-size: .86rem;
    transition: transform .16s ease;
}

.task-recurring-box[open] .task-recurring-chevron {
    transform: rotate(180deg);
}

.task-recurring-menu {
    display: grid;
    gap: 8px;
    padding: 10px 0 0;
    background: transparent;
}

.task-recurring-advanced[hidden] {
    display: none;
}

.task-recurring-menu .form-select,
.task-recurring-menu .form-control {
    min-height: 38px;
    border-color: var(--theme-line-d8e3f0, #d8e3f0);
    background-color: var(--theme-bg-ffffff, #fff);
    font-size: .92rem;
}

.task-recurring-date {
    display: grid;
    gap: 6px;
    margin: 0;
}

.task-recurring-date span {
    color: var(--theme-text-6b7789, #6b7789);
    font-size: .78rem;
    font-weight: 700;
}

.task-check-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 0;
    border: 1px solid var(--theme-line-d8e3f0, #d8e3f0);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 9px 11px;
    text-transform: none;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.task-check-option:hover,
.task-check-option:focus-within {
    border-color: var(--theme-line-b9cce3, #b9cce3);
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    box-shadow: 0 0 0 .16rem rgba(23, 105, 170, .08);
}

.task-check-option:has(.form-check-input:checked) {
    border-color: var(--theme-line-b9d4ef, #b9d4ef);
    background: var(--theme-bg-f3f9ff, #f3f9ff);
}

.task-check-option .form-check-input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    border-color: var(--theme-line-b9c7d8, #b9c7d8);
    box-shadow: none;
}

.task-check-option .form-check-input:checked {
    border-color: var(--fcs-blue);
    background-color: var(--fcs-blue);
}

.task-check-option span {
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.task-check-option + .task-option-picker {
    margin: -2px 0 2px 28px;
}

.task-color-select {
    border-left: 8px solid var(--task-option-color, var(--fcs-line));
    font-weight: 700;
}

.task-color-select option {
    font-weight: 700;
}

.task-option-picker {
    position: relative;
}

.task-option-picker.is-open,
.task-date-picker.is-open {
    z-index: 500;
}

.task-option-picker-button {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--theme-line-d8e3f0, #d8e3f0);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    padding: 7px 11px;
    text-align: left;
    font-weight: 700;
}

.task-option-picker-button-no-swatch,
.task-option-picker-item-no-swatch {
    grid-template-columns: minmax(0, 1fr) auto;
}

.task-option-picker-button[aria-expanded="true"] {
    border-color: var(--theme-line-8db9ef, #8db9ef);
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.18);
}

.task-option-picker-button span:not(.task-option-swatch),
.task-option-picker-item span:not(.task-option-swatch) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-option-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.task-option-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 501;
    display: none;
    max-height: min(360px, 58vh);
    overflow-y: auto;
    border: 1px solid var(--theme-line-ccd8e6, #ccd8e6);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 16px 40px rgba(20, 38, 58, .18);
    padding: 6px;
}

.task-option-picker.is-open .task-option-picker-menu {
    display: grid;
    gap: 3px;
}

.task-option-picker.opens-up .task-option-picker-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.task-date-picker {
    position: relative;
    min-width: 0;
}

.task-date-swatch {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    background: transparent !important;
    color: var(--fcs-blue);
    box-shadow: none;
}

.task-date-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: var(--task-picker-left, 0);
    right: auto;
    z-index: 501;
    display: none;
    width: min(304px, calc(100vw - 32px), var(--task-picker-width, 304px));
    min-width: min(260px, calc(100vw - 32px), var(--task-picker-width, 304px));
    max-height: min(430px, calc(100vh - 96px));
    overflow: visible;
    border: 1px solid var(--theme-line-ccd8e6, #ccd8e6);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 16px 40px rgba(20, 38, 58, .18);
    padding: 12px;
}

.task-date-picker.is-open .task-date-picker-menu {
    display: block;
}

.task-date-picker.opens-up .task-date-picker-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.task-date-picker.align-right .task-date-picker-menu {
    left: auto;
    right: 0;
}

.task-date-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.task-date-head strong {
    color: var(--fcs-ink);
    font-size: .92rem;
    line-height: 1.2;
    white-space: nowrap;
}

.task-date-head button,
.task-date-actions button {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
}

.task-date-head button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
}

.task-date-weekdays,
.task-date-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.task-date-weekdays span {
    color: var(--fcs-muted);
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
}

.task-date-day {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-ink);
    font-size: .85rem;
    line-height: 1;
    padding: 0;
}

.task-date-day:hover,
.task-date-day.is-selected {
    background: var(--theme-bg-edf5ff, #edf5ff);
    color: var(--fcs-blue);
    font-weight: 700;
}

.task-date-day.is-muted {
    color: #a7b1c0;
}

.task-date-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.task-date-actions button {
    min-height: 30px;
    padding: 4px 10px;
    font-size: .82rem;
    font-weight: 700;
}

.task-option-picker-item {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-ink);
    padding: 7px 9px;
    text-align: left;
    font-weight: 700;
}

.task-option-picker-item:hover,
.task-option-picker-item.is-selected {
    background: var(--theme-bg-edf5ff, #edf5ff);
}

.task-option-picker-item .bi-check2 {
    opacity: 0;
    color: var(--fcs-blue);
}

.task-option-picker-item.is-selected .bi-check2 {
    opacity: 1;
}

.task-side-time {
    border-top: 1px solid var(--fcs-line);
    border-bottom: 1px solid var(--fcs-line);
    padding: 14px 0;
    margin: 8px 0 4px;
}

.card-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--fcs-line);
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    font-size: .85rem;
}

.clients-list-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.client-list-header {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(0, 32rem) minmax(max-content, 1fr);
    gap: 12px;
    flex: 0 0 auto;
}

.client-list-search {
    display: flex;
    min-width: 0;
    gap: 8px;
}

.client-list-search .form-select {
    width: auto;
}

.client-list-add {
    justify-self: end;
    white-space: nowrap;
}

.client-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.client-list-pages {
    border-top: 1px solid var(--fcs-line);
    border-bottom: 0;
    flex: 0 0 auto;
    justify-content: space-between;
}

@container (max-width: 720px) {
    .client-list-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .client-list-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.client-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.client-filter-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-muted);
    padding: 6px 11px;
    text-decoration: none;
    font-weight: 700;
}

.client-filter-tabs a.active {
    border-color: var(--fcs-blue);
    color: var(--fcs-blue);
    background: var(--theme-bg-edf5ff, #edf5ff);
}

.client-filter-tabs span {
    min-width: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--theme-bg-eef6fb, #eef6fb);
    color: var(--fcs-blue);
    font-size: .76rem;
}

.client-row-actions {
    white-space: nowrap;
}

.client-list-table {
    table-layout: fixed;
    width: 100%;
}

.clients-list-panel,
.services-catalog-panel { container-type: inline-size; }
.client-list-table { margin-bottom: 0; }
.client-list-table th,
.client-list-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}
.client-list-table th:nth-child(1) { width: 15%; }
.client-list-table th:nth-child(2) { width: 19%; }
.client-list-table th:nth-child(3) { width: 24%; }
.client-list-table th:nth-child(4) { width: 6%; }
.client-list-table th:nth-child(5) { width: 10%; }
.client-list-table th:nth-child(6) { width: 12%; }
.client-list-table th:nth-child(7) { width: 14%; }
.client-list-table .card-chip { max-width: 100%; flex-wrap: wrap; }
.client-list-table .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.clients-list-page .topbar { gap: 12px; flex-wrap: wrap; }
.clients-list-page .topbar h1 { overflow-wrap: anywhere; }
@container (max-width: 650px) {
    .client-list-table, .client-list-table tbody { display: block; width: 100%; }
    .client-list-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .client-list-table tr { display: block; padding: 12px; border-bottom: 1px solid var(--fcs-line); }
    .client-list-table tr:last-child { border-bottom: 0; }
    .client-list-table td { display: block; width: 100%; padding: 5px 4px; border: 0; box-shadow: none; }
    .client-list-table td[data-label] { display: grid; grid-template-columns: minmax(0, 76px) minmax(0, 1fr); gap: 12px; align-items: start; }
    .client-list-table td[data-label]::before { content: attr(data-label); font-size: .75rem; color: var(--fcs-muted); padding-top: 3px; }
    .client-list-table td > * { min-width: 0; justify-self: start; }
    .client-list-table td .badge { white-space: normal; }
}

.client-list-row {
    cursor: pointer;
}

.client-list-row:hover > *,
.client-list-row:focus > * {
    background: var(--theme-bg-eef6fb, #eef6fb);
}

.client-list-row:focus {
    outline: none;
}

.client-list-row:focus-visible {
    box-shadow: inset 3px 0 0 var(--fcs-blue);
}

.services-catalog-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.services-catalog-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.service-catalog-table {
    table-layout: fixed;
    width: 100%;
}

.service-catalog-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--theme-bg-f4f7fa, #f4f7fa);
    box-shadow: inset 0 -1px 0 var(--fcs-line);
}

.service-catalog-table thead th {
    width: 35%;
}

.service-catalog-table thead th:first-child {
    width: 50%;
}

.service-catalog-table thead th:nth-child(2) {
    width: 15%;
}

.service-catalog-row {
    cursor: pointer;
}

.service-catalog-row > td {
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: top;
}

.service-catalog-row > td:first-child strong,
.service-catalog-row .badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
}

.service-catalog-row:hover > *,
.service-catalog-row:focus > * {
    background: var(--theme-bg-eef6fb, #eef6fb);
}

.service-catalog-row:focus {
    outline: none;
}

.service-catalog-row:focus-visible {
    box-shadow: inset 3px 0 0 var(--fcs-blue);
}

.service-catalog-options {
    display: grid;
    gap: 0;
}

.service-catalog-option-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    font-size: .95rem;
    line-height: 1.2;
}

.client-workspace {
    flex: 1 1 auto;
    min-height: 0;
}

.client-tab-workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-page-tabs {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border-bottom: 1px solid var(--fcs-line);
}

.client-page-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--fcs-muted);
    font-weight: 800;
    padding: 9px 13px;
    text-decoration: none;
}

.client-page-tabs a:hover,
.client-page-tabs a.active {
    border-color: var(--fcs-line);
    border-bottom-color: var(--theme-line-ffffff, #fff);
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-blue);
}

.client-page-tabs span {
    min-width: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--theme-bg-eef6fb, #eef6fb);
    color: var(--fcs-blue);
    font-size: .76rem;
    padding: 0 6px;
}

.client-tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.client-tab-panel[hidden] {
    display: none;
}

.client-tab-panel-header {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(180px, 260px) minmax(180px, 1fr);
    gap: 14px;
}

.client-tab-panel-header .task-top-actions {
    justify-self: end;
}

.client-profile-tab-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr);
    gap: 18px;
    align-items: start;
}

.client-profile-tab-column {
    min-width: 0;
}

.client-hours-tab-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.client-hours-summary-wide {
    flex: 0 0 auto;
    margin: 0;
}

.client-hours-month-table,
.client-hours-entry-list {
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    overflow: visible;
    background: var(--theme-bg-ffffff, #fff);
}

.client-hours-month-table {
    flex: 0 0 auto;
}

.client-hours-month-table .table,
.client-hours-entry-list .table {
    table-layout: fixed;
}

.client-hours-month-table th,
.client-hours-month-table td,
.client-hours-entry-list th,
.client-hours-entry-list td {
    padding: 10px 8px;
    vertical-align: middle;
}

.client-hours-month-table thead th,
.client-hours-entry-list thead th {
    border-bottom: 1px solid var(--fcs-line);
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    color: var(--theme-text-54657d, #54657d);
    font-size: .74rem;
    letter-spacing: .02em;
}

.client-hours-month-table tbody tr:last-child td,
.client-hours-entry-list tbody tr:last-child td {
    border-bottom: 0;
}

.client-hours-month-table th:first-child,
.client-hours-month-table td:first-child,
.client-hours-entry-list th:first-child,
.client-hours-entry-list td:first-child {
    padding-left: 12px;
}

.client-hours-month-table th:last-child,
.client-hours-month-table td:last-child,
.client-hours-entry-list th:last-child,
.client-hours-entry-list td:last-child {
    padding-right: 12px;
}

.client-hours-month-table td:not(:first-child),
.client-hours-entry-list td:not(:nth-child(2)) {
    white-space: nowrap;
}

.client-hours-entry-list {
    min-height: 0;
}

.client-hours-entry-list .panel-subhead {
    border-bottom: 1px solid var(--fcs-line);
    background: var(--theme-bg-ffffff, #fff);
    padding: 12px 12px 0;
}

.client-hours-entry-list .panel-subhead h3 {
    margin: 0 0 10px;
}

.client-hours-entry-list td:nth-child(2) {
    min-width: 0;
    overflow-wrap: anywhere;
}

.client-hours-entry-list td:nth-child(2) a {
    font-weight: 650;
    line-height: 1.25;
}

.client-invoice-actions {
    align-items: center;
}

.client-hours-invoice-form {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(0, 1.4fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--fcs-line);
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    margin: 0;
    padding: 12px 14px;
}

.client-hours-invoice-form > div:first-child {
    display: grid;
    gap: 2px;
}

.client-hours-invoice-form > div:first-child span {
    color: var(--fcs-muted);
    font-size: .82rem;
}

.client-hours-month-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-hours-month-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    font-size: .86rem;
    margin: 0;
    padding: 6px 9px;
}

.client-hours-month-options strong {
    color: var(--fcs-blue);
    font-size: .8rem;
}

.client-left-column,
.client-right-column {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.client-left-column {
    height: 100%;
}

.client-right-column {
    height: 100%;
}

.client-profile-panel {
    flex: 0 0 auto;
}

.client-fixed-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.client-invoices-panel,
.client-tasks-panel {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.client-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.client-task-groups {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.client-task-filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, 260px);
    gap: 10px;
    align-items: end;
    justify-self: center;
    width: min(260px, 100%);
    margin: 0 auto;
    padding: 0;
}

.client-task-filter-bar label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .8rem;
    font-weight: 800;
}

.client-task-filter-bar .task-option-picker-menu {
    max-height: none;
    overflow: visible;
}

.client-task-status-group {
    overflow: hidden;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
}

.client-task-status-group > header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--fcs-line);
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 10px 12px;
    color: var(--fcs-heading, var(--fcs-navy));
    font-weight: 800;
}

.client-task-status-group > header span:last-child,
.client-task-priority-head span:last-child {
    min-width: 24px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--theme-bg-eef6fb, #eef6fb);
    color: var(--fcs-blue);
    font-size: .76rem;
    margin-left: auto;
}

.client-task-priority-group + .client-task-priority-group {
    border-top: 1px solid var(--fcs-line);
}

.client-task-priority-head {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 8px 12px;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 800;
}

.client-task-table {
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.client-task-col-id { width: 8%; }
.client-task-col-task { width: 39%; }
.client-task-col-created { width: 12%; }
.client-task-col-due { width: 16%; }
.client-task-col-status { width: 14%; }
.client-task-col-priority { width: 11%; }

.client-task-table thead th {
    background: var(--theme-bg-f4f7fa, #f4f7fa);
}

.client-task-group-list {
    padding: 14px;
}

.client-profile-form {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.topbar h1 [contenteditable="true"],
.client-inline-row [contenteditable="true"] {
    outline: none;
    border-radius: 5px;
}

.topbar h1 [contenteditable="true"] {
    padding: 1px 3px;
    margin-left: -3px;
}

.topbar h1 [contenteditable="true"]:hover,
.topbar h1 [contenteditable="true"]:focus {
    background: var(--theme-bg-edf5ff, #edf5ff);
}

.client-title-badge {
    vertical-align: middle;
    margin-left: 10px;
    font-size: .76rem;
}

.client-inline-profile {
    display: grid;
    gap: 2px;
}

.client-inline-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 30px;
    border-bottom: 1px solid transparent;
    color: var(--fcs-ink);
    cursor: text;
}

.client-inline-row:hover,
.client-inline-row:focus-within {
    border-bottom-color: var(--fcs-line);
}

.client-inline-icon,
.client-inline-row i {
    color: var(--fcs-muted);
}

.client-inline-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 24px;
    border: 0;
    background: transparent;
    padding: 0;
    text-decoration: none;
}

.client-inline-icon:hover,
.client-inline-icon:focus {
    color: var(--fcs-blue);
}

.client-email-address {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 10px 12px;
    color: var(--fcs-ink) !important;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.client-inline-row .client-inline-value {
    min-width: 80px;
    min-height: 24px;
    padding: 2px 4px;
    margin-left: -4px;
    color: var(--fcs-ink);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.client-inline-row .client-inline-value:hover,
.client-inline-row .client-inline-value:focus {
    background: var(--theme-bg-edf5ff, #edf5ff);
}

.client-inline-row [contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: var(--fcs-muted);
    font-style: italic;
    font-weight: 400;
}

.client-profile-form label,
.client-billing-form label:not(.task-check-option):not(.client-billing-switch):not(.client-charge-mode-switch),
.client-billing-switch {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 400;
}

.client-billing-form {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--fcs-line);
    margin-top: 16px;
    padding-top: 14px;
}

.client-billing-state {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 8px 10px;
    font-size: .86rem;
}

.client-billing-state span {
    color: var(--fcs-muted);
    font-weight: 400;
}

.client-billing-state strong {
    font-weight: 400;
}

.client-billing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.client-billing-inline,
.client-billing-select {
    display: grid;
    gap: 6px;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 400;
}

.client-money-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    border-bottom: 1px solid transparent;
    color: var(--fcs-ink);
    font-size: 1rem;
    font-weight: 400;
}

.client-money-inline:hover,
.client-money-inline:focus-within {
    border-bottom-color: var(--fcs-line);
}

.client-money-input {
    width: 72px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--fcs-ink);
    padding: 2px 4px;
    font: inherit;
    font-weight: 400;
    outline: none;
}

.client-money-input:hover,
.client-money-input:focus {
    background: var(--theme-bg-edf5ff, #edf5ff);
}

.client-day-picker {
    position: relative;
}

.client-day-button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--theme-line-d5e2f0, #d5e2f0);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    padding: 7px 10px;
    font-weight: 400;
    text-align: left;
}

.client-day-display {
    width: fit-content;
    min-width: 30px;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-ink);
    font: inherit;
    padding: 2px 4px;
    text-align: left;
}

.client-day-display:hover,
.client-day-display:focus {
    background: var(--theme-bg-edf5ff, #edf5ff);
    box-shadow: inset 0 0 0 1px #d8e3f0;
    outline: 0;
}

.client-day-button:hover,
.client-day-picker.is-open .client-day-button {
    border-color: var(--fcs-blue);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.client-day-menu {
    position: fixed;
    top: var(--client-day-menu-top, 0);
    left: var(--client-day-menu-left, 0);
    z-index: 2000;
    display: none;
    width: min(220px, calc(100vw - 24px));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--theme-line-ccd8e6, #ccd8e6);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 16px 40px rgba(20, 38, 58, .18);
    padding: 6px;
}

.client-day-picker.is-open .client-day-menu {
    display: grid;
}

.client-day-menu button {
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fcs-ink);
    font-weight: 400;
}

.client-day-menu button:hover,
.client-day-menu button.is-selected {
    background: var(--theme-bg-edf5ff, #edf5ff);
    color: var(--fcs-blue);
}

@media (max-width: 1020px) {
    .service-billing-option {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-billing-option-description,
    .service-billing-option-actions {
        grid-column: 1 / -1;
    }

    .service-billing-option-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .client-billing-grid {
        grid-template-columns: 1fr;
    }

    .invoice-document-head,
    .invoice-footer-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-brand-block {
        text-align: left;
    }

    .invoice-meta-grid,
    .invoice-line-head,
    .invoice-line-row {
        grid-template-columns: 1fr;
    }

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

    .service-billing-option {
        grid-template-columns: 1fr;
    }

    .service-billing-option-description {
        grid-column: auto;
    }

    .service-billing-option-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.client-billing-toggles {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-billing-switch,
.client-charge-mode-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    color: var(--fcs-ink);
    padding: 0;
    font-size: .86rem;
    font-weight: 400;
}

.client-billing-toggles .form-check-input {
    flex: none;
    float: none;
    margin: 0;
}

.client-charge-mode-switch span {
    font-weight: 400;
}

.client-billing-form .client-billing-switch span {
    font-weight: 400;
}

.client-billing-switch .form-check-input,
.client-charge-mode-switch .form-check-input,
.task-billing-switch .form-check-input {
    border-color: var(--theme-line-dc3545, #dc3545);
    background-color: #dc3545;
    background-image: none;
    position: relative;
}

.client-billing-switch .form-check-input:checked,
.client-charge-mode-switch .form-check-input:checked,
.task-billing-switch .form-check-input:checked {
    border-color: #198754;
    background-color: #198754;
}

.client-billing-switch .form-check-input::before,
.client-charge-mode-switch .form-check-input::before,
.task-billing-switch .form-check-input::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--theme-bg-ffffff, #fff);
    transform: translateY(-50%);
    transition: left .15s ease;
}

.client-billing-switch .form-check-input:checked::before,
.client-charge-mode-switch .form-check-input:checked::before,
.task-billing-switch .form-check-input:checked::before {
    left: calc(100% - 14px);
}

.client-billing-switch.is-enabled span {
    color: var(--theme-text-198754, #198754);
}

.client-billing-switch.is-disabled span {
    color: var(--theme-text-dc3545, #dc3545);
}

.client-charge-mode-switch.is-enabled span {
    color: var(--theme-text-198754, #198754);
}

.client-charge-mode-switch.is-disabled span {
    color: var(--theme-text-5f6f85, #5f6f85);
}

.invoice-document-panel {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    box-shadow: 0 18px 48px rgba(22,50,79,.08);
}

.invoice-document-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    border-bottom: 1px solid var(--fcs-line);
    padding: 6px 0 24px;
    margin-bottom: 28px;
}

.invoice-kicker,
.invoice-brand-block span,
.invoice-meta-grid span,
.invoice-notes-field span,
.invoice-notes-display span {
    display: block;
    color: var(--fcs-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.invoice-document-head h2 {
    margin: 2px 0 8px;
    font-size: 2.1rem;
    font-weight: 400;
}

.invoice-brand-block {
    display: grid;
    align-content: start;
    gap: 4px;
    text-align: right;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(260px, 1.8fr) minmax(132px, .9fr) minmax(132px, .9fr);
    gap: 14px;
    margin-bottom: 28px;
}

.invoice-meta-grid > div,
.invoice-meta-grid label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.invoice-meta-grid strong {
    color: var(--fcs-ink);
    font-weight: 400;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
}

.invoice-line-editor {
    display: grid;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--theme-bg-ffffff, #fff);
}

.invoice-line-head,
.invoice-line-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 92px 132px 124px;
    gap: 0;
    align-items: center;
}

.invoice-line-head {
    background: var(--theme-bg-f6f9fc, #f6f9fc);
    color: var(--fcs-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--fcs-line);
}

.invoice-line-head span,
.invoice-line-row > * {
    min-width: 0;
    padding: 10px 12px;
}

.invoice-line-head span:not(:first-child) {
    text-align: right;
}

.invoice-line-row + .invoice-line-row {
    border-top: 1px solid var(--fcs-line);
}

.invoice-line-row .form-control {
    width: 100%;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.invoice-line-row .form-control:focus {
    border-color: var(--fcs-sky);
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 0 0 .16rem rgba(51,166,201,.14);
}

.invoice-line-total {
    color: var(--fcs-ink);
    text-align: right;
}

.invoice-lines-table {
    margin-bottom: 18px;
}

.invoice-notes-field,
.invoice-upload-form {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.invoice-notes-field textarea {
    max-width: 420px;
}

.invoice-upload-form {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: stretch;
    margin-bottom: 0;
}

.invoice-upload-form input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.invoice-upload-form label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: center;
    border: 2px dashed var(--theme-line-9fb8ff, #9fb8ff);
    border-radius: 8px;
    background: var(--theme-bg-fbfdff, #fbfdff);
    color: var(--fcs-ink);
    padding: 18px 20px;
    cursor: pointer;
    margin: 0;
}

.invoice-upload-form label i {
    grid-row: span 2;
    color: var(--fcs-blue);
    font-size: 1.8rem;
}

.invoice-upload-form label small {
    color: var(--fcs-muted);
}

.invoice-notes-display,
.invoice-attachments-section {
    border-top: 1px solid var(--fcs-line);
    padding-top: 18px;
    margin: 18px 0;
}

.invoice-email-preview {
    display: grid;
    gap: 16px;
}

.invoice-email-preview > div {
    display: grid;
    gap: 4px;
}

.invoice-email-preview span {
    color: var(--fcs-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.invoice-email-preview strong {
    color: var(--fcs-ink);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.invoice-email-preview pre {
    margin: 0;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-fbfdff, #fbfdff);
    color: var(--fcs-ink);
    font: inherit;
    line-height: 1.55;
    overflow: auto;
    white-space: pre-wrap;
    padding: 18px;
}

.invoice-email-preview textarea {
    min-height: 260px;
    line-height: 1.55;
    resize: vertical;
}

.invoice-email-signature-preview {
    color: var(--fcs-ink);
    line-height: 1.45;
}

.invoice-email-signature-preview p {
    margin: 0 0 12px;
}

.invoice-email-signature-preview img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

.invoice-attachments-head,
.invoice-attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.invoice-attachments-head h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--fcs-ink);
    font-size: 1rem;
    font-weight: 500;
}

.invoice-attachments-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    border-radius: 999px;
    background: var(--theme-bg-edf7ff, #edf7ff);
    color: var(--fcs-blue);
    font-size: .8rem;
}

.invoice-attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.invoice-attachment-row {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-fbfdff, #fbfdff);
    padding: 10px 12px;
}

.invoice-attachment-row a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--fcs-ink);
    text-decoration: none;
}

.invoice-attachment-row a:hover {
    color: var(--fcs-blue);
}

.invoice-empty-attachments {
    margin-top: 10px;
    border: 1px dashed var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-fbfdff, #fbfdff);
    color: var(--fcs-muted);
    padding: 14px;
}

.invoice-total-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 28px;
    border-top: 2px solid var(--fcs-line);
    padding-top: 16px;
    margin-top: 18px;
}

.invoice-total-bar span {
    color: var(--fcs-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.invoice-total-bar strong {
    min-width: 130px;
    color: var(--fcs-ink);
    font-size: 1.45rem;
    font-weight: 400;
    text-align: right;
}

.invoice-actions,
.invoice-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.invoice-actions {
    justify-content: flex-end;
}

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

    .invoice-line-editor {
        overflow-x: auto;
    }

    .invoice-line-head,
    .invoice-line-row {
        min-width: 640px;
    }
}

@media (max-width: 575.98px) {
    .invoice-document-head,
    .invoice-footer-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-brand-block {
        text-align: left;
    }

    .invoice-meta-grid,
    .invoice-upload-form {
        grid-template-columns: 1fr;
    }

    .invoice-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-actions .btn,
    .invoice-upload-form .btn {
        width: 100%;
    }
}

.client-subscriptions-block {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--fcs-line);
    margin-top: 14px;
    padding-top: 14px;
}

.client-hours-block {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--fcs-line);
    margin-top: 14px;
    padding-top: 14px;
}

.client-subscriptions-head,
.client-hours-head,
.client-subscription-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.client-subscriptions-head h3,
.client-hours-head h3 {
    margin: 0;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 400;
}

.client-subscriptions-head span,
.client-hours-head > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    border-radius: 999px;
    background: var(--theme-bg-edf7ff, #edf7ff);
    color: var(--fcs-blue);
    font-size: .8rem;
    padding: 0 8px;
}

.client-hours-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.client-hours-summary > div {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 8px;
}

.client-hours-summary span,
.client-hours-row span,
.client-hours-empty {
    color: var(--fcs-muted);
    font-size: .82rem;
}

.client-hours-summary span,
.client-hours-summary strong,
.client-hours-row strong,
.client-hours-row span {
    display: block;
}

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

.client-hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 8px;
}

.client-hours-total {
    flex: 0 0 auto;
    min-width: 86px;
    text-align: right;
}

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

.client-subscription-row {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 8px;
}

.client-subscription-name,
.client-subscription-meta {
    display: block;
}

.client-subscription-name {
    color: var(--fcs-ink);
}

.client-subscription-meta,
.client-subscription-empty {
    color: var(--fcs-muted);
    font-size: .82rem;
}

.client-profile-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 20px;
    border: 1px solid var(--fcs-line);
    border-radius: 12px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
}

.client-profile-dialog::backdrop {
    background: rgb(15 23 42 / 48%);
}

.client-subscription-add {
    display: grid;
    gap: 12px;
}

.client-subscription-add label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .82rem;
}

.task-billing-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fcs-ink);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    padding-left: 2.5em;
}

.task-billing-switch.is-enabled span {
    color: var(--theme-text-198754, #198754);
}

.task-billing-switch.is-disabled span {
    color: var(--theme-text-dc3545, #dc3545);
}

.client-form-panel {
    max-width: 760px;
}

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

.client-form-grid label:not(.form-switch) {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 700;
}

.client-form-grid .client-billing-toggles {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.client-form-grid .client-billing-toggles .form-check-input::before {
    background: #fff;
}

.client-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--fcs-line);
    padding-top: 14px;
    margin-top: 4px;
}

.service-detail-panel {
    width: min(1200px, 100%);
    max-width: 1200px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}

.service-fixed-page .service-detail-panel {
    height: 100%;
}

.service-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

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

.service-detail-form label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 700;
}

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

.service-detail-form textarea {
    resize: vertical;
    min-height: 132px;
}

.service-tax-switch {
    align-self: end;
    min-height: 38px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: var(--fcs-ink) !important;
    font-weight: 800 !important;
}

.service-billing-block {
    display: grid;
    gap: 0;
    border: 1px solid var(--fcs-line);
    border-radius: 8px 8px 0 0;
    background: var(--theme-bg-ffffff, #fff);
    overflow: visible;
}

.service-billing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--fcs-muted);
    font-size: .86rem;
    font-weight: 800;
    border-bottom: 1px solid var(--fcs-line);
    background: var(--theme-bg-ffffff, #fff);
    padding: 10px 12px;
}

.service-billing-head .btn {
    width: 34px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.service-billing-options {
    display: grid;
    gap: 0;
    margin-top: -1px;
    border: 1px solid var(--fcs-line);
    border-radius: 0 0 8px 8px;
    background: var(--theme-bg-ffffff, #fff);
    overflow: visible;
}

.service-billing-option {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    border: 0;
    border-radius: 0;
    background: var(--theme-bg-ffffff, #fff);
    padding: 12px 14px;
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.service-billing-options .service-billing-option + .service-billing-option {
    border-top: 1px solid var(--fcs-line);
}

.service-billing-option-primary {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    border: 0;
    border-radius: 0;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 14px;
    z-index: 3;
}

.service-billing-option-highlight {
    background: var(--theme-bg-f8fbfd, #f8fbfd);
}

.service-billing-option.is-one-time {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.service-billing-option.is-one-time .service-billing-option-actions {
    grid-column: auto;
}

.service-billing-option:focus-within,
.service-billing-option:has(.task-option-picker.is-open),
.service-billing-option-primary:focus-within,
.service-billing-option-primary:has(.task-option-picker.is-open) {
    z-index: 20;
}

.service-billing-option label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--fcs-muted);
    font-size: .8rem;
    font-weight: 800;
}

.service-billing-option .form-control,
.service-billing-option .form-select,
.service-billing-option .input-group-text,
.service-billing-option .task-option-picker-button {
    min-height: 38px;
    font-size: .92rem;
    font-weight: 400;
}

.service-billing-option .form-control[readonly] {
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
}

.service-billing-option .task-option-picker-button {
    padding-top: 7px;
    padding-bottom: 7px;
}

.service-billing-option-description {
    display: none !important;
}

.service-billing-option-description textarea {
    resize: vertical;
    min-height: 52px;
}

.service-billing-option-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    grid-column: auto;
    min-height: 38px;
}

.service-billing-option-actions .form-check {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--fcs-ink);
    font-weight: 800;
}

.service-billing-delete-disabled {
    opacity: .42;
}

@media (max-width: 1020px) {
    .service-billing-option {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-billing-option-description,
    .service-billing-option-actions {
        grid-column: 1 / -1;
    }

    .service-billing-option-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.btn-primary { background: var(--fcs-blue); border-color: var(--fcs-blue); }
.btn-outline-primary { color: var(--fcs-blue); border-color: var(--fcs-blue); }
.btn-outline-primary:hover { background: var(--fcs-blue); border-color: var(--fcs-blue); }
.topbar-icon-btn {
    width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

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

.task-action-icon-form {
    margin: 0;
}

.task-action-icon {
    width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.task-settings-button {
    width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.public-task-readonly .main {
    margin-left: 0;
}

.public-task-readonly .topbar {
    border-bottom: 1px solid var(--fcs-line);
    padding-bottom: 18px;
}

.public-task-readonly .task-workspace {
    flex: 1 1 auto;
}

.public-task-brandline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--fcs-muted);
    font-size: .9rem;
    font-weight: 700;
}

.public-task-brandline .brand-mark {
    width: 34px;
    height: 34px;
    font-size: .8rem;
}

.task-readonly-box {
    min-height: 160px;
    height: auto;
    background: var(--theme-bg-ffffff, #fff);
    line-height: 1.6;
}

.task-readonly-control {
    min-height: 38px;
    display: flex;
    align-items: center;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 8px 10px;
    color: var(--theme-text-334155, #334155);
}

.public-task-page {
    min-height: 100vh;
    background: var(--theme-bg-f6f8fb, #f6f8fb);
}

.public-task-shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.public-task-card {
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(22, 50, 79, .08);
    padding: 28px;
}

.public-task-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.public-task-brand span {
    display: block;
    color: var(--fcs-muted);
    font-size: .9rem;
}

.public-task-head h1 {
    margin: 0 0 14px;
    font-size: 2rem;
    line-height: 1.15;
}

.public-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--fcs-line);
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    color: var(--theme-text-334155, #334155);
    font-size: .9rem;
}

.public-task-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--fcs-line);
}

.public-task-section h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.public-task-description {
    color: var(--theme-text-334155, #334155);
    line-height: 1.65;
}

.public-task-checklist {
    display: grid;
    gap: 10px;
}

.public-task-checkitem {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--theme-text-334155, #334155);
}

.public-task-checkitem i {
    color: var(--fcs-blue);
    margin-top: 2px;
}

.public-task-checkitem.is-complete {
    color: var(--fcs-muted);
}

.public-task-checkitem.is-complete span {
    text-decoration: line-through;
}

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

.task-option-editor {
    display: grid;
    gap: 10px;
}

.task-option-editor h3 {
    margin: 0 0 2px;
    font-size: .96rem;
}

.task-option-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

.task-option-row.is-dragging {
    opacity: .55;
}

.task-option-drag {
    width: 32px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-muted);
    cursor: grab;
}

.task-option-drag:active {
    cursor: grabbing;
}

.task-option-color {
    width: 46px;
    min-width: 46px;
    height: 38px;
    padding: 5px;
}

.task-option-delete {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--theme-text-b54545, #b54545);
    cursor: pointer;
}

.task-option-delete.is-disabled {
    opacity: .45;
    cursor: not-allowed;
    color: var(--fcs-muted);
}

.task-option-delete input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.task-option-delete:has(input:checked) {
    background: var(--theme-bg-fff1f1, #fff1f1);
    border-color: var(--theme-line-e7aaaa, #e7aaaa);
    color: var(--theme-text-9a1f1f, #9a1f1f);
}

.task-option-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin: 6px 0 0;
}

.task-option-add span {
    grid-column: 1 / -1;
    color: var(--fcs-muted);
    font-size: .82rem;
    font-weight: 600;
}

.task-settings-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--fcs-line);
    padding-top: 14px;
}

.task-color-badge {
    border: 0;
}

.changelog h3 {
    font-size: 1rem;
    margin: 0 0 10px;
}

.changelog-entry + .changelog-entry {
    border-top: 1px solid var(--fcs-line);
    margin-top: 16px;
    padding-top: 16px;
}

.change-item {
    border-left: 3px solid var(--fcs-sky);
    padding: 8px 0 8px 12px;
    margin-bottom: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
}

.changelog-more {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--fcs-line);
    margin-top: 16px;
    padding-top: 16px;
}

.security-settings-form {
    display: grid;
    gap: 16px;
}

.sidebar .settings-section-menu {
    display: grid;
    gap: 3px;
    margin: 0 0 8px 10px;
    padding-inline-start: 8px;
    border-inline-start: 1px solid rgba(255, 255, 255, .24);
}

.sidebar .settings-section-menu a {
    display: block;
    margin: 0;
    padding: 7px 8px;
    font-size: .84rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.sidebar .settings-section-menu .settings-section-link {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.settings-section-row { display: flex; gap: 2px; }

.sidebar-settings-row > a { flex: 1; }
.sidebar-settings-row > button { margin-bottom: 4px; }
.sidebar .settings-menu-save-error { font-size: .8rem; }

.settings-section-toggle {
    flex: 0 0 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
}

.sidebar .sidebar-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
}

.sidebar .settings-section-menu .sidebar-menu-toggle {
    padding: 7px 8px;
    margin: 0;
    font-size: .84rem;
}

.sidebar .sidebar-menu-toggle i { margin-inline-start: auto; }
.sidebar .sidebar-menu-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }

@media (max-width: 860px) {
    .sidebar nav > .sidebar-menu-toggle { width: auto; }
}

.settings-section-toggle:hover { background: rgba(255, 255, 255, .12); }
.settings-section-toggle i { display: inline-block; }
.settings-section-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.settings-section-menu[hidden],
.settings-section-submenu[hidden],
.settings-section-menu [hidden] { display: none; }
.sidebar .settings-section-menu a[aria-current="page"] {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, .16);
}

.settings-section-submenu {
    display: grid;
    gap: 3px;
    margin-inline-start: 6px;
    padding-inline-start: 5px;
    border-inline-start: 1px solid rgba(255, 255, 255, .24);
}

@media (max-width: 860px) {
    .sidebar > nav:has(.settings-section-menu:not([hidden])) { flex-wrap: wrap; }
    .sidebar .settings-section-menu {
        flex: 1 0 100%;
        max-height: 15rem;
        overflow-y: auto;
        margin-inline-start: 0;
    }
}

.invoice-template-settings-form {
    display: grid;
    gap: 18px;
}

.invoice-template-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invoice-template-variable-list span {
    border: 1px solid var(--fcs-line);
    border-radius: 6px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    color: var(--fcs-muted);
    font-size: .86rem;
    padding: 6px 9px;
}

.invoice-template-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 16px;
}

.invoice-template-card h3 {
    margin: 0;
    color: var(--fcs-ink);
    font-size: 1rem;
}

.invoice-template-card p {
    margin: 3px 0 0;
    color: var(--fcs-muted);
}

.invoice-template-card textarea {
    min-height: 220px;
    line-height: 1.5;
}

.security-switches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 16px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 14px;
}

.security-switches .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 28px;
}

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

.security-log-panel {
    border-top: 1px solid var(--fcs-line);
    margin-top: 18px;
    padding-top: 16px;
}

.security-log-panel h3 {
    font-size: 1rem;
    margin: 0 0 12px;
}

.security-event-row {
    display: grid;
    gap: 4px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 10px 12px;
}

.security-event-row + .security-event-row {
    margin-top: 8px;
}

.security-event-row strong {
    text-transform: capitalize;
}

.security-event-row span,
.security-event-row p {
    color: var(--fcs-muted);
    font-size: .82rem;
    margin: 0;
}

.security-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(420px, 100%);
    background: var(--theme-bg-ffffff, #fff);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    padding: 24px;
}

.login-page {
    background: var(--theme-bg-f6f8fc, #f6f8fc);
}

.login-page .login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 20px;
}

.login-page .login-panel {
    width: min(440px, 100%);
    border: 1px solid var(--theme-line-dce2ec, #dce2ec);
    border-radius: 22px;
    box-shadow: 0 22px 48px rgba(30, 41, 59, .08);
    padding: 40px 40px 38px;
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.login-brand img {
    display: block;
    width: auto;
    max-width: 112px;
    height: 50px;
    object-fit: contain;
}

.login-header {
    margin-bottom: 34px;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    color: var(--theme-text-111827, #111827);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.18;
}

.login-header p {
    margin: 18px 0 0;
    color: var(--theme-text-667085, #667085);
    font-size: .91rem;
}

.login-page .form-label {
    margin-bottom: 8px;
    color: var(--theme-text-5f6b7d, #5f6b7d);
    font-size: .8rem;
    font-weight: 700;
}

.login-page .form-control {
    min-height: 46px;
    margin-bottom: 22px;
    border: 1px solid var(--theme-line-d9e0eb, #d9e0eb);
    border-radius: 13px;
    background: var(--theme-bg-f8f9fc, #f8f9fc);
    color: var(--theme-text-111827, #111827);
    font-size: .94rem;
    padding: 11px 16px;
    box-shadow: none;
}

.login-page .form-control::placeholder {
    color: #9aa4b2;
}

.login-page .form-control:focus {
    border-color: #2f469b;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 0 0 4px rgba(47, 70, 155, .11);
}

.login-password-wrap {
    position: relative;
}

.login-password-wrap .form-control {
    padding-right: 46px;
    margin-bottom: 10px;
}

.login-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aa4b2;
    transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus {
    color: var(--theme-text-2f469b, #2f469b);
}

.login-links {
    margin-top: 14px;
    text-align: center;
    font-size: .9rem;
}

.login-page .login-links {
    margin: 0 0 30px;
    text-align: right;
    font-size: .83rem;
    font-weight: 700;
}

.login-links a {
    color: var(--fcs-blue);
    text-decoration: none;
}

.login-page .login-links a {
    color: var(--theme-text-2f469b, #2f469b);
}

.login-links a:hover { text-decoration: underline; }

.login-page .btn-primary {
    min-height: 55px;
    border: 0;
    border-radius: 13px;
    background: #30479c;
    font-weight: 800;
    box-shadow: none;
}

.login-page .btn-primary:hover,
.login-page .btn-primary:focus {
    background: #263b86;
}

.login-page .btn-primary:disabled {
    background: var(--theme-bg-a1abd0, #a1abd0);
    color: #fff;
    opacity: 1;
}

.login-secondary-action {
    min-height: 46px;
    margin-top: 12px;
    border-radius: 13px;
    font-weight: 800;
}

.two-factor-panel {
    width: min(440px, 100%);
}

.two-factor-panel .login-header {
    margin-bottom: 34px;
}

.two-factor-panel .login-header h1 {
    font-size: 1.52rem;
}

.two-factor-panel .login-header p {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.two-factor-code-input {
    text-align: center;
    font-size: 1.25rem !important;
    font-weight: 800;
    letter-spacing: .28em;
}

.two-factor-help {
    margin: -12px 0 28px;
    color: #9aa4b2;
    font-size: .8rem;
}

.two-factor-back {
    margin-top: 22px;
    text-align: center;
}

.two-factor-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-text-667085, #667085);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}

.two-factor-back a:hover {
    color: var(--theme-text-30479c, #30479c);
}

.login-page .alert {
    border-radius: 13px;
    font-size: .9rem;
}

.turnstile-wrap {
    margin: 2px 0 16px;
    min-height: 65px;
}

.login-page .turnstile-wrap {
    margin: 0 0 18px;
}

.auth-settings-form {
    display: grid;
    gap: 16px;
}

.panel-subhead h3 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.auth-setup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.payment-profile-form {
    display: grid;
    gap: 18px;
}

.payment-provider-block {
    display: grid;
    gap: 14px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    padding: 16px;
}

.payment-provider-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.payment-provider-head h3 {
    margin: 0 0 3px;
    color: var(--fcs-ink);
    font-size: 1rem;
}

.payment-provider-head p {
    margin: 0;
    color: var(--fcs-muted);
    font-size: .88rem;
}

.payment-provider-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.payment-mode-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--theme-line-d8e3f0, #d8e3f0);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    padding: 14px;
}

.payment-mode-card h4 {
    margin: 0;
    color: var(--fcs-ink);
    font-size: .94rem;
}

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

.payment-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.payment-copy-field .btn {
    min-width: 44px;
}

.payment-copy-field .btn.copied {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.payment-webhook-events {
    display: grid;
    gap: 7px;
}

.payment-event-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.payment-event-list code {
    border: 1px solid var(--theme-line-d8e3f0, #d8e3f0);
    border-radius: 6px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    font-size: .82rem;
    padding: 6px 8px;
}

.app-action-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2100;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    padding: 22px 26px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    color: var(--fcs-ink);
    box-shadow: 0 8px 25px rgba(22, 50, 79, .16);
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

.app-action-progress[hidden] {
    display: none;
}

.app-action-progress progress {
    width: 100%;
    height: 10px;
    accent-color: var(--fcs-blue);
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1080;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}

.flash-toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 14px 34px rgba(22, 50, 79, .18);
    animation: toast-in .18s ease-out;
}

.flash-toast-success {
    border-color: var(--theme-line-9fd4bd, #9fd4bd);
    background: var(--theme-bg-e8f6ef, #e8f6ef);
    color: var(--theme-text-123d2b, #123d2b);
}

.flash-toast-danger {
    border-color: var(--theme-line-f0b4ad, #f0b4ad);
    background: var(--theme-bg-fff0ee, #fff0ee);
    color: var(--theme-text-7b251d, #7b251d);
}

.flash-toast-info {
    border-color: var(--theme-line-afd7ee, #afd7ee);
    background: var(--theme-bg-eef8fd, #eef8fd);
    color: var(--theme-text-153d55, #153d55);
}

.flash-toast button {
    appearance: none;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0 0 8px;
}

.has-app-confirm {
    overflow: hidden;
}

.app-confirm[hidden] {
    display: none;
}

.app-confirm {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.app-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 28, 42, .42);
}

.app-confirm-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-ffffff, #fff);
    box-shadow: 0 24px 70px rgba(20, 38, 58, .28);
    padding: 20px;
}

.app-confirm-dialog h2 {
    margin: 0 0 8px;
    color: var(--fcs-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.app-confirm-dialog p {
    margin: 0;
    color: var(--fcs-muted);
    font-size: .94rem;
    line-height: 1.45;
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 700;
}

.status-pill-active {
    background: var(--theme-bg-e8f6ef, #e8f6ef);
    color: var(--theme-text-123d2b, #123d2b);
    border: 1px solid var(--theme-line-9fd4bd, #9fd4bd);
}

.status-pill-waiting {
    background: var(--theme-bg-fff7e8, #fff7e8);
    color: var(--theme-text-6e4700, #6e4700);
    border: 1px solid var(--theme-line-f1d29a, #f1d29a);
}

.brand-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    align-items: start;
}

.brand-upload-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.asset-preview-slot {
    min-width: 150px;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asset-preview {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--fcs-line);
    border-radius: 8px;
    background: var(--theme-bg-f8fbfd, #f8fbfd);
    overflow: hidden;
}

.asset-preview img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    object-fit: contain;
}

.asset-preview-logo {
    width: 190px;
    height: 132px;
}

.asset-preview-favicon {
    width: 72px;
    height: 72px;
}

.asset-preview-favicon img {
    padding: 8px;
}

.upload-actions {
    grid-column: 1 / -1;
    padding-top: 2px;
}

@media (max-width: 980px) {
    .brand-upload-grid { grid-template-columns: 1fr; }
    .task-workspace { grid-template-columns: 1fr; }
    .task-side { border-left: 0; border-top: 1px solid var(--fcs-line); }
    .task-settings-grid { grid-template-columns: 1fr; }
    .client-fixed-page .topbar {
        grid-template-columns: 1fr;
    }
    .client-page-actions {
        justify-self: start;
    }
    .client-page-tabs {
        overflow-x: auto;
        padding-bottom: 1px;
    }
    .client-page-tabs a {
        flex: 0 0 auto;
    }
    .client-tab-panel-header,
    .client-profile-tab-grid {
        grid-template-columns: 1fr;
    }
    .client-task-filter-bar {
        justify-self: stretch;
        width: 100%;
    }
    .client-hours-summary {
        grid-template-columns: 1fr;
    }
    .client-hours-tab-body {
        padding: 12px;
    }
    .client-hours-month-table,
    .client-hours-entry-list {
        overflow-x: auto;
        overflow-y: visible;
    }
    .client-hours-month-table .table,
    .client-hours-entry-list .table {
        min-width: 720px;
    }
    .client-hours-invoice-form {
        align-items: stretch;
        grid-template-columns: 1fr;
    }
    .client-invoice-actions .btn {
        width: 100%;
    }
    body.client-fixed-page {
        height: auto;
        overflow: auto;
    }
    .client-fixed-page .app-shell,
    .client-fixed-page .main {
        height: auto;
        overflow: visible;
    }
    .client-workspace,
    .client-left-column,
    .client-right-column {
        height: auto;
    }
    .client-panel-scroll {
        overflow: visible;
    }
    body.service-fixed-page {
        height: auto;
        overflow: auto;
    }
    .service-fixed-page .app-shell,
    .service-fixed-page .main {
        height: auto;
        overflow: visible;
    }
    .service-fixed-page .service-detail-panel {
        height: auto;
    }
    .service-detail-scroll {
        overflow: visible;
    }
    .security-switches,
    .security-number-grid,
    .auth-setup-grid,
    .payment-mode-grid,
    .payment-settings-grid {
        grid-template-columns: 1fr;
    }

    .payment-provider-head {
        align-items: stretch;
        flex-direction: column;
    }
    .task-detail-fixed-page .task-workspace {
        grid-template-rows: minmax(0, 1fr) minmax(180px, 34dvh);
    }

    .task-detail-fixed-page .task-side {
        border-left: 0;
        border-top: 1px solid var(--fcs-line);
    }
}

@media (max-width: 560px) {
    .brand-upload-field { grid-template-columns: 1fr; }
    .asset-preview-slot {
        justify-content: flex-start;
        min-width: 0;
    }
    .task-section-head {
        align-items: flex-start;
    }
    .task-action-menu {
        right: -4px;
        width: min(320px, calc(100vw - 48px));
    }
    .task-action-menu .task-log-time {
        grid-template-columns: 1fr;
    }
    .task-add-row,
    .task-upload,
    .task-log-time {
        align-items: stretch;
        flex-direction: column;
    }
    .task-add-row .btn,
    .task-upload .btn,
    .task-log-time .btn {
        width: 100%;
    }
    .task-upload-picker {
        align-items: flex-start;
    }
    .task-upload-action {
        display: none;
    }
}

.flash-toast.is-hiding {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .toast-stack {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        overflow: hidden;
    }
    .sidebar nav { display: flex; overflow-x: auto; gap: 6px; }
    .sidebar a { white-space: nowrap; }
    .sidebar-foot { display: none; }
    .sidebar-account { padding: 6px 14px; }
    .sidebar-scroll > * { flex-shrink: 0; }
    .main { margin-left: 0; padding: 16px; }
    .topbar { align-items: flex-start; flex-direction: column; }

    .task-detail-fixed-page .app-shell {
        display: flex;
        flex-direction: column;
    }

    .task-detail-fixed-page .sidebar {
        flex: 0 0 auto;
        max-height: 40dvh;
    }

    .task-detail-fixed-page .main {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }
}

body.dashboard-fixed-page {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

.dashboard-fixed-page .app-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.dashboard-fixed-page .main {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dashboard-fixed-page .topbar,
.dashboard-fixed-page .main > .alert {
    flex: 0 0 auto;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.dashboard-inbox-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 0;
}

.dashboard-tasks-column {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 16px;
}

.dashboard-sections .panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.dashboard-sections .panel-header {
    flex: 0 0 auto;
    gap: 8px;
}

.dashboard-sections .panel-body {
    min-height: 0;
    flex: 1 1 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dashboard-invoice-panel {
    container-type: inline-size;
}

.dashboard-invoice-header {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    align-items: center;
}

.dashboard-invoice-filters { justify-self: start; flex-wrap: nowrap; }
.dashboard-invoice-view-all { justify-self: end; white-space: nowrap; }

.dashboard-invoice-totals {
    display: flex;
    gap: clamp(12px, 3cqi, 24px);
    margin: 0;
    text-align: center;
}

.dashboard-invoice-totals dt {
    color: var(--fcs-muted);
    font-size: .75rem;
}

.dashboard-invoice-totals dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

@container (max-width: 585px) {
    .dashboard-invoice-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dashboard-invoice-filters { flex-wrap: wrap; }

    .dashboard-invoice-totals {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }
}

.dashboard-invoice-scroll {
    scrollbar-gutter: stable;
}

.dashboard-sections .table {
    width: 100%;
    table-layout: fixed;
}

.dashboard-invoice-scroll th:nth-child(1) { width: 22%; }
.dashboard-invoice-scroll th:nth-child(2) { width: 31%; }
.dashboard-invoice-scroll th:nth-child(3) { width: 18%; }
.dashboard-invoice-scroll th:nth-child(4) { width: 14%; }
.dashboard-invoice-scroll th:nth-child(5) { width: 15%; }

.dashboard-sections .panel-body > .table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--theme-bg-f4f7fa, #f4f7fa);
}

.dashboard-sections .table .text-nowrap {
    white-space: normal !important;
}

.dashboard-sections .table .badge {
    max-width: 100%;
    white-space: normal;
}

.dashboard-sections .table-responsive {
    overflow: visible;
}

.dashboard-sections .dashboard-task-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-task-grouping {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.dashboard-task-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 860px) {
    .dashboard-fixed-page .app-shell {
        display: flex;
        flex-direction: column;
    }
    .dashboard-fixed-page .sidebar {
        flex: 0 0 auto;
        max-height: 40dvh;
        overscroll-behavior: contain;
    }
    .dashboard-fixed-page .main {
        flex: 1 1 0;
        height: auto;
        padding: 12px;
    }
    .dashboard-fixed-page .topbar {
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px;
    }
    .dashboard-fixed-page .topbar p { display: none; }
    .dashboard-sections { gap: 10px; }
    .dashboard-inbox-column,
    .dashboard-tasks-column { gap: 10px; }
    .dashboard-sections .panel-header { padding: 10px; }
    .dashboard-sections .panel-header h2 { font-size: .9rem; }
}

@media (max-width: 575.98px) {
    .dashboard-sections {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(540px, auto) minmax(680px, auto);
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* Keep FreedomCSM typography consistently regular-weight. */
body,
body * {
    font-weight: 400 !important;
}


/* Hide scrollbar chrome while preserving native scrolling. */
html,
* {
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}


.hosting-packages-page main {
    padding-bottom: 5rem;
}

.hosting-create-dialog {
    width: min(32rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
    color: var(--fcs-ink);
    overflow: auto;
}

.hosting-create-dialog::backdrop {
    background: rgba(0, 0, 0, .55);
}

.hosting-package-created > td {
    animation: hosting-package-highlight 3s ease-out;
}

@keyframes hosting-package-highlight {
    0%, 25% { box-shadow: inset 0 0 0 100vmax rgba(34, 197, 94, .27); }
    100% { box-shadow: inset 0 0 0 100vmax rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .hosting-package-created > td {
        animation: none;
        box-shadow: inset 0 0 0 100vmax rgba(34, 197, 94, .27);
    }
}

#hosting-create-open {
    inset-inline-start: calc(var(--sidebar-width) + 24px);
    z-index: 5;
}

@media (max-width: 860px) {
    #hosting-create-open {
        inset-inline-start: 16px;
    }
}

body.services-catalog-fixed-page,
.services-catalog-fixed-page .app-shell,
.services-catalog-fixed-page .main {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.domains-fixed-page .services-catalog-panel {
    min-width: 0;
    container-type: inline-size;
    overflow: hidden;
}

.domains-fixed-page .client-list-header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 3fr);
}

@container (max-width: 900px) {
    .domains-fixed-page .client-list-header {
        grid-template-columns: minmax(0, 1fr);
    }
    .domains-fixed-page .client-list-header .client-list-add {
        justify-self: start;
        justify-content: flex-start !important;
    }
}

.domains-fixed-page .services-catalog-scroll {
    overflow: auto;
    overscroll-behavior: contain;
}

.domains-fixed-page .services-catalog-scroll table {
    min-width: 42rem;
}

.domains-fixed-page .services-catalog-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

@media (max-width: 860px) {
    .services-catalog-fixed-page .app-shell {
        display: flex;
        flex-direction: column;
    }

    .services-catalog-fixed-page .sidebar {
        flex: 0 0 auto;
        max-height: 40dvh;
    }

    .services-catalog-fixed-page .main {
        flex: 1 1 0;
        height: auto;
    }
}

.client-profile-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    align-items: start;
    gap: 16px;
    padding: 14px 2px 18px;
}

.client-profile-card {
    min-width: 0;
    margin-bottom: 0;
}

.client-profile-card .client-inline-profile {
    gap: 12px;
}

.client-profile-card .client-inline-row {
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 3px;
    align-items: start;
}

.client-profile-card .client-inline-row > :first-child {
    grid-row: span 2;
    align-self: center;
}

.client-profile-field-label {
    color: var(--fcs-muted);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.client-profile-card .client-inline-value {
    grid-column: 2;
    overflow-wrap: anywhere;
}

.client-profile-card .client-billing-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 105px), 1fr));
}

@media (max-width: 1200px) {
    .client-profile-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .client-profile-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}
