:root {
    --bg: #f4f6f8;
    --sidebar: #17202a;
    --sidebar-soft: #202b37;
    --panel: #ffffff;
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --field: #ffffff;
    --green: #176b57;
    --green-line: #15803d;
    --blue: #245bd6;
    --amber: #9a5b00;
    --amber-line: #d97706;
    --accent-line: #ff2f68;
    --red: #b42318;
    --surface-soft: #f7fbf9;
    --shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
    --heading-blue: var(--sidebar);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --radius-control: 7px;
    --radius-panel: 10px;
    --control-height: 32px;
    --table-row-height: 36px;
    --table-header-background: #e8eef7;
    --content-width-wide: 1440px;
    --content-width-comfortable: 1120px;
    --content-width-narrow: 880px;
    --panel-shadow: none;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    border: 2px solid #ffffff;
    border-radius: 6px;
    background: #175cd3;
    color: #ffffff;
    font-weight: 600;
    padding: 9px 12px;
    transform: translateY(-150%);
    transition: transform 120ms ease;
}

.skip-link:focus {
    color: #ffffff;
    outline: 3px solid #0b3b8f;
    outline-offset: 2px;
    text-decoration: none;
    transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100vh;
    min-width: 0;
    overflow: auto;
    border-right: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    padding: 14px 12px;
}

.sidebar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    min-width: 0;
    border-bottom: 1px solid #e6ebf2;
    padding: 4px 4px 12px;
}

.brand {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink);
    padding: 0;
}

.brand:hover,
.brand:focus {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    font-weight: 700;
}

.brand-copy,
.brand-copy strong,
.brand-copy span {
    display: block;
    min-width: 0;
}

.brand-copy strong {
    font-size: 16px;
    font-weight: 700;
}

.brand-copy span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.nav-list {
    display: grid;
    gap: 3px;
}

.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: transparent;
    color: #475467;
    cursor: pointer;
    font: inherit;
    font-weight: 400;
    padding: 7px 9px;
    text-align: left;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus {
    border-color: #dce7e3;
    background: #edf8f4;
    color: var(--green);
}

.nav-label {
    min-width: 0;
}

.nav-icon {
    position: relative;
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--green);
}

.nav-icon::before,
.nav-icon::after {
    position: absolute;
    content: "";
}

.nav-icon-sales::before {
    left: 2px;
    bottom: 3px;
    width: 3px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 5px -3px 0 currentColor, 10px -6px 0 currentColor;
}

.nav-icon-sales::after {
    right: 2px;
    bottom: 2px;
    left: 1px;
    border-bottom: 2px solid currentColor;
}

.nav-icon-projects::before {
    inset: 4px 2px 3px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.nav-icon-projects::after {
    top: 2px;
    left: 4px;
    width: 7px;
    height: 4px;
    border-radius: 2px 2px 0 0;
    background: currentColor;
}

.nav-icon-support::before {
    inset: 3px 2px 5px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.nav-icon-support::after {
    right: 4px;
    bottom: 3px;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: skew(18deg);
}

.nav-icon-knowledge::before {
    inset: 2px 3px;
    border: 2px solid currentColor;
    border-radius: 2px;
    box-shadow: inset 4px 0 0 rgba(0, 185, 147, 0.18);
}

.nav-icon-knowledge::after {
    top: 6px;
    right: 5px;
    width: 6px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.nav-icon-admin::before {
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 999px;
    box-shadow: 0 -4px 0 -2px currentColor, 0 4px 0 -2px currentColor, 4px 0 0 -2px currentColor, -4px 0 0 -2px currentColor;
}

.nav-icon-admin::after {
    inset: 7px;
    border-radius: 999px;
    background: currentColor;
}

.nav-icon-checklist::before {
    top: 4px;
    right: 2px;
    width: 10px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.nav-icon-checklist::after {
    top: 4px;
    left: 1px;
    width: 5px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(38deg);
}

.nav-icon-hr::before {
    left: 2px;
    top: 3px;
    width: 14px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.nav-icon-hr::after {
    left: 8px;
    top: 1px;
    width: 2px;
    height: 16px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -5px 7px 0 currentColor, 5px 7px 0 currentColor;
}

.nav-icon-customers::before,
.nav-icon-company::before,
.nav-icon-team::before {
    top: 2px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -5px 4px 0 -1px currentColor, 5px 4px 0 -1px currentColor;
}

.nav-icon-customers::after,
.nav-icon-company::after,
.nav-icon-team::after {
    right: 2px;
    bottom: 2px;
    left: 2px;
    height: 7px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 0 0 8px 8px;
}

.nav-icon-billing::before {
    inset: 2px 4px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.nav-icon-billing::after {
    top: 7px;
    left: 7px;
    width: 5px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.nav-caret {
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 0;
    line-height: 1;
    transition: color 160ms ease, transform 160ms ease;
}

.nav-caret::before {
    display: block;
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.8px 1.8px 0;
    content: "";
    transform: rotate(45deg) translate(-1px, -1px);
}

.nav-group:not(.expanded) .nav-caret {
    color: #334155;
}

.nav-group:not(.expanded) .nav-caret::before {
    transform: rotate(-45deg) translate(-1px, 1px);
}

.nav-group-toggle:hover .nav-caret,
.nav-group-toggle:focus .nav-caret {
    color: #007e68;
}

.nav-group:not(.expanded) .nav-children {
    display: none;
}

.nav-group:not(.expanded):hover .nav-children,
.nav-group:not(.expanded):focus-within .nav-children {
    display: grid;
}

.nav-children {
    display: grid;
    gap: 3px;
    margin-left: 10px;
    border-left: 1px solid #e5edf3;
    padding-left: 10px;
}

@media (min-width: 1025px) {
    .sidebar {
        overflow: visible;
    }

    .sidebar .nav-group:not(.expanded) {
        position: relative;
    }

    .sidebar .nav-group:not(.expanded)::after {
        position: absolute;
        top: 0;
        left: 100%;
        z-index: 1099;
        display: none;
        width: 26px;
        height: 42px;
        content: "";
    }

    .sidebar .nav-group:not(.expanded):hover,
    .sidebar .nav-group:not(.expanded):focus-within {
        z-index: 1100;
    }

    .sidebar .nav-group:not(.expanded):hover::after,
    .sidebar .nav-group:not(.expanded):focus-within::after {
        display: block;
    }

    .sidebar .nav-group:not(.expanded) .nav-children {
        position: absolute;
        top: -2px;
        left: calc(100% + 22px);
        z-index: 1101;
        display: grid;
        gap: 2px;
        width: max-content;
        min-width: 230px;
        max-width: min(300px, calc(100vw - 300px));
        margin-left: 0;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
        opacity: 0;
        overflow: hidden;
        padding: 9px;
        pointer-events: none;
        transform: translateX(-4px);
        visibility: hidden;
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
    }

    .sidebar .nav-group:not(.expanded):hover .nav-children,
    .sidebar .nav-group:not(.expanded):focus-within .nav-children {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .sidebar .nav-group:not(.expanded) .nav-children::before {
        color: #17202a;
        content: attr(data-flyout-label);
        font-size: 12px;
        font-weight: 700;
        padding: 2px 7px 7px;
    }

    .sidebar .nav-group:not(.expanded) .nav-child {
        min-height: 32px;
        border-radius: 7px;
        color: #334155;
        font-size: 13px;
        font-weight: 500;
        padding: 8px 10px;
        white-space: nowrap;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    color: #475467;
    padding: 7px 9px;
    text-align: left;
}

.nav-item:hover,
.nav-item:focus,
.nav-item.active {
    border-color: #b7d9ce;
    background: #edf8f4;
    color: var(--green);
    text-decoration: none;
}

.nav-child {
    padding: 7px 9px;
    font-size: 13px;
}

.nav-child.active {
    border-color: #b7d9ce;
    background: #edf8f4;
    color: var(--green);
}

.sidebar-note {
    margin-top: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 0;
}

.sidebar-note summary {
    display: grid;
    gap: 2px;
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
}

.sidebar-note summary::-webkit-details-marker {
    display: none;
}

.sidebar-note summary::after {
    align-self: center;
    color: #94a3b8;
    content: "Show";
    font-size: 11px;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
}

.sidebar-note[open] summary::after {
    content: "Hide";
}

.sidebar-note strong,
.sidebar-note span,
.sidebar-note p {
    display: block;
}

.sidebar-note strong {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-note span {
    color: #64748b;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.sidebar-note p {
    margin: 0;
    border-top: 1px solid #e6ebf2;
    color: #64748b;
    font-size: 12px;
    padding: 10px 12px 12px;
    overflow-wrap: anywhere;
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow-x: clip;
    background: var(--bg);
    padding: 0 16px 16px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 950;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 -16px 12px;
    border-bottom: 1px solid rgba(220, 226, 234, 0.9);
    background: #f4f6f9;
    padding: 10px 16px;
    backdrop-filter: blur(10px);
}

.portal-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-bottom: 10px;
    border-bottom-color: var(--line);
    background: #f4f6f9;
    padding: 9px 20px;
}

.topbar-health-alert {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    border: 1px solid #f3aaa6;
    border-radius: 8px;
    background: #fff0ee;
    color: #8f1d18;
    padding: 7px 9px;
}

.topbar-health-alert-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c92a22;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.topbar-health-alert-copy {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
}

.topbar-health-alert-copy strong {
    flex: 0 0 auto;
    color: #821c17;
    font-weight: 700;
}

.topbar-health-alert-copy > span {
    min-width: 0;
}

.topbar-health-alert-action {
    flex: 0 0 auto;
    margin-left: auto;
    border: 1px solid #c92a22;
    border-radius: 6px;
    background: #c92a22;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-health-alert-action:hover,
.topbar-health-alert-action:focus {
    background: #a8231d;
    color: #ffffff;
    text-decoration: none;
}

.attention-sound-controls {
    position: relative;
    z-index: 2;
}

.attention-sound-controls[open] {
    z-index: 1200;
}

.attention-sound-controls summary {
    list-style: none;
}

.attention-sound-controls summary::-webkit-details-marker {
    display: none;
}

.attention-sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 64px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 0 9px;
    user-select: none;
}

.attention-sound-toggle:hover,
.attention-sound-toggle:focus {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f766e;
    outline: none;
}

.attention-sound-controls[data-sound-state="enabled"] .attention-sound-toggle,
.attention-sound-controls[data-sound-state="enabled"] .attention-sound-toggle:hover,
.attention-sound-controls[data-sound-state="enabled"] .attention-sound-toggle:focus {
    border-color: #8bd7bd;
    background: #eaf7f1;
    box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.08);
    color: #047857;
}

.attention-sound-controls[data-sound-state="muted"] .attention-sound-toggle,
.attention-sound-controls[data-sound-state="unavailable"] .attention-sound-toggle {
    border-color: #cbd5e1;
    background: #f1f5f9;
    box-shadow: none;
    color: #64748b;
}

.attention-sound-controls[data-sound-state="muted"] .attention-sound-toggle span:first-child,
.attention-sound-controls[data-sound-state="unavailable"] .attention-sound-toggle span:first-child {
    color: #64748b;
}

.attention-sound-toggle span:first-child {
    color: #0f766e;
    font-size: 16px;
    line-height: 1;
}

.attention-sound-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: grid;
    gap: 8px;
    width: min(330px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #ffffff;
    box-shadow: var(--shadow);
    color: #334155;
    padding: 10px;
}

.attention-sound-menu > strong {
    color: #17202a;
    font-size: 12px;
}

.attention-sound-status {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.attention-sound-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.attention-sound-actions button {
    min-width: 0;
    white-space: nowrap;
}

.attention-sound-actions button.is-active {
    font-weight: 600;
}

.attention-sound-actions [data-attention-sound-enable].is-active,
.attention-sound-actions [data-attention-sound-enable].is-active:hover,
.attention-sound-actions [data-attention-sound-enable].is-active:focus {
    border-color: #8bd7bd;
    background: #eaf7f1;
    color: #047857;
}

.attention-sound-actions [data-attention-sound-mute].is-active,
.attention-sound-actions [data-attention-sound-mute].is-active:hover,
.attention-sound-actions [data-attention-sound-mute].is-active:focus {
    border-color: #94a3b8;
    background: #475569;
    color: #ffffff;
}

.attention-sound-actions button:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.hourly-attention {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border: 1px solid #f0b85b;
    border-radius: 9px;
    background: #fff8e7;
    color: #7c4a03;
    padding: 9px 10px;
}

.hourly-attention[hidden] {
    display: none;
}

.hourly-attention-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #b86b00;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hourly-attention-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
}

.hourly-attention-copy strong {
    color: #713f05;
    font-size: 13px;
}

.hourly-attention-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    color: var(--heading-blue);
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 24px;
    font-weight: 500;
}

h2 {
    font-size: 16px;
    font-weight: 500;
}

h3 {
    font-size: 15px;
    font-weight: 500;
}

.global-search {
    display: grid;
    gap: 4px;
    position: relative;
    width: 250px;
    max-width: 100%;
    min-width: 0;
}

.global-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.global-search input {
    width: 100%;
}

.global-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 35;
    display: grid;
    width: min(600px, calc(100vw - 32px));
    min-width: 100%;
    max-width: 600px;
    max-height: min(360px, 70vh);
    overflow-y: auto;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    padding: 5px;
}

.global-search-group {
    display: grid;
    gap: 2px;
    padding: 3px 0;
}

.global-search-group + .global-search-group {
    margin-top: 4px;
    border-top: 1px solid #e8edf5;
    padding-top: 7px;
}

.global-search-group-title {
    color: #2563eb;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 2px 9px 3px;
    text-transform: uppercase;
}

.global-search-suggestions[hidden] {
    display: none;
}

.global-search-suggestion,
.global-search-empty {
    display: grid;
    gap: 3px;
    border-radius: 6px;
    color: var(--ink);
    padding: 8px 9px;
    text-decoration: none;
}

.global-search-suggestion:hover,
.global-search-suggestion:focus,
.global-search-suggestion.is-active {
    background: #f2f7ff;
    outline: none;
    text-decoration: none;
}

.global-search-suggestion-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-suggestion-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-suggestion-meta,
.global-search-empty {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.top-actions,
.button-row,
.toolbar,
.section-head,
.page-header,
.panel-title,
.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-actions,
.section-head,
.page-header,
.panel-title {
    justify-content: space-between;
}

.top-actions {
    position: relative;
    justify-self: end;
}

.top-user {
    color: var(--ink);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.header-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 14px;
    min-width: 0;
}

.header-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.header-metric:hover,
.header-metric:focus {
    text-decoration: none;
}

.header-metric strong {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
}

.metric-projects {
    color: #1f2937;
}

.metric-projects strong {
    background: #f0145a;
}

.metric-tickets {
    color: #1f2937;
}

.metric-tickets strong {
    background: #f97316;
}

.metric-todos {
    color: #1f2937;
}

.metric-todos strong {
    background: #3b82f6;
}

.metric-due-invoice {
    color: #1f2937;
}

.metric-due-invoice strong {
    min-width: auto;
    max-width: 150px;
    height: 22px;
    background: #dc2626;
    font-size: 11px;
    overflow: hidden;
    padding: 0 8px;
    text-overflow: ellipsis;
}

.metric-due-invoice.is-disabled strong {
    background: #94a3b8;
}

.portal-topbar .metric-projects strong,
.portal-topbar .metric-tickets strong {
    background: #64748b;
}

.portal-topbar .metric-due-invoice {
    gap: 4px;
    color: var(--amber);
}

.portal-topbar .metric-due-invoice strong,
.portal-topbar .metric-due-invoice.is-disabled strong {
    min-width: 0;
    max-width: 150px;
    height: auto;
    background: transparent;
    color: inherit;
    padding: 0;
}

.portal-topbar .metric-due-invoice.is-disabled {
    color: #64748b;
}

.portal-topbar-action {
    white-space: nowrap;
}

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

.my-task-trigger {
    width: auto;
    min-height: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    padding: 0;
}

.my-task-trigger:hover,
.my-task-trigger:focus {
    background: transparent;
    box-shadow: none;
    color: #111827;
    outline: none;
}

.my-task-trigger:focus-visible {
    border-radius: 7px;
    outline: 2px solid rgba(37, 99, 235, 0.28);
    outline-offset: 4px;
}

.header-metric.is-disabled {
    cursor: default;
}

.profile-menu {
    position: relative;
    z-index: 2;
}

.profile-menu[open] {
    z-index: 1200;
}

.profile-menu summary {
    list-style: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e8f5ef;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: grid;
    min-width: 210px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 8px;
}

.profile-menu-link {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin-top: 8px;
    border-top: 1px solid #e4e9f0;
    border-radius: 7px;
    color: #263241;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 10px 8px;
    text-decoration: none;
}

.profile-menu-link:hover,
.profile-menu-link:focus {
    background: #f2f7ff;
    color: #175cd3;
    outline: none;
    text-decoration: none;
}

.profile-name,
.profile-role {
    display: block;
    padding: 2px 4px;
}

.profile-name {
    color: #263241;
    font-weight: 600;
}

.profile-role {
    color: var(--muted);
    font-size: 12px;
}

.profile-dropdown form {
    margin-top: 6px;
}

.profile-dropdown button {
    width: 100%;
    justify-content: flex-start;
}

.environment,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.environment,
.status-badge.neutral {
    background: #eef1f5;
    color: #3f4b5e;
}

.app-version-badge {
    background: #e9f7f3;
    color: #007a62;
    border: 1px solid #b7e8da;
    font-weight: 600;
}

.status-badge.warning {
    background: #fff3dd;
    color: var(--amber);
}

.status-badge.green {
    background: #eaf7f1;
    color: var(--green);
}

.text-link {
    color: var(--blue);
    font-weight: 500;
    white-space: nowrap;
}

.content {
    display: grid;
    flex: 1 0 auto;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    column-gap: 10px;
    align-content: start;
    align-items: start;
    padding: 0 0 14px;
    width: 100%;
}

.content-width-full {
    width: 100%;
}

.content-width-wide,
.content-width-comfortable,
.content-width-narrow {
    width: min(100%, var(--content-width-wide));
    justify-self: start;
}

.content-width-comfortable {
    width: min(100%, var(--list-toolbar-width, var(--content-width-comfortable)));
}

.content-width-narrow {
    width: min(100%, var(--content-width-narrow));
}

.crm-footer {
    flex: 0 0 auto;
    margin-top: 18px;
    border-top: 1px solid #dce2ea;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    padding: 12px 4px 0;
    text-align: center;
}

.crm-footer strong {
    color: #3f4b5e;
    font-weight: 600;
}

.content:has(> .record-page-header) {
    column-gap: 0;
}

.content > :not(.page-title-strip):not(.page-header) {
    grid-column: 1 / -1;
}

.page-title-strip {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    align-items: baseline;
    margin: 4px 0 10px;
}

.page-title-strip h1 {
    color: #101828;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.page-header,
.section-head {
    margin: 0 0 8px;
}

.page-header {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    vertical-align: baseline;
}

.operational-result-count {
    color: #64748b;
    font-variant-numeric: tabular-nums;
    margin: 0;
    white-space: nowrap;
}

.operational-list-header {
    align-items: center;
    gap: 8px;
}

.operational-list-header > .actions {
    align-items: center;
    flex-direction: row;
    width: auto;
}

.page-header h1 {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.page-header .muted {
    color: var(--blue);
    font-weight: 500;
    margin-top: 2px;
}

.content > .page-title-strip ~ .page-header {
    display: contents;
    margin-top: -4px;
}

.content > .page-title-strip ~ .page-header > div:first-child {
    display: contents;
}

.content > .page-title-strip ~ .page-header h1 {
    grid-column: 2;
    grid-row: 1;
    align-self: baseline;
}

.content > .page-title-strip ~ .page-header .muted {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: -6px 0 10px;
}

.content > .page-title-strip ~ .page-header > .actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}

.content > .page-title-strip ~ .operational-list-header > .operational-result-count {
    grid-column: 2;
    grid-row: 1;
    align-self: baseline;
}

.content > .page-title-strip ~ .operational-list-header > .operational-result-count::before {
    color: #cbd5e1;
    content: '/';
    margin-right: 8px;
}

.content > .page-title-strip ~ .page-header h1::before {
    content: "/";
    margin: 0 8px 0 0;
    color: #cbd5e1;
    font-weight: 400;
}

.page-header > div,
.section-head > div,
.panel-title > div {
    min-width: 0;
}

.content > .page-title-strip ~ .record-page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-column: 2 / 4;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    min-height: 52px;
    margin: -8px 0 12px;
    border-bottom: 1px solid #d8e1ec;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    padding: 8px 10px 8px 0;
}

.content > .page-title-strip:has(~ .record-page-header) {
    position: sticky;
    top: 0;
    z-index: 31;
    align-self: stretch;
    min-height: 52px;
    margin: -8px 0 12px;
    border-bottom: 1px solid #d8e1ec;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    padding: 10px 10px 8px;
}

.content > .page-title-strip:has(~ .record-page-header) h1 {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
}

.content > .page-title-strip:has(~ .record-page-header) h1::after {
    color: #cbd5e1;
    content: "/";
    font-weight: 400;
}

.content > .page-title-strip ~ .record-page-header > div:first-child {
    display: grid;
    gap: 2px;
}

.content > .page-title-strip ~ .project-record-page-header > div:first-child {
    align-self: center;
}

.content > .page-title-strip ~ .record-page-header h1 {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    color: #475569;
}

.content > .page-title-strip ~ .record-page-header .muted {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
}

.content > .page-title-strip ~ .record-page-header > .actions {
    grid-column: auto;
    grid-row: auto;
    justify-self: end;
    align-self: start;
    gap: 0;
}

.content > .page-title-strip ~ .record-page-header h1::before {
    content: none;
}

.record-page-header > .actions {
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.public-local-invoice-page {
    min-height: 100vh;
    margin: 0;
    background: #eef3f8;
    color: #142033;
}

.public-local-invoice-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.public-local-invoice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 22px 26px;
    border: 1px solid #dce6f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(21, 41, 68, 0.08);
}

.public-local-invoice-header h1 {
    margin: 4px 0 6px;
    font-size: 24px;
}

.public-local-invoice-header p {
    margin: 0;
    color: #64748b;
}

.public-local-invoice-header .eyebrow {
    display: block;
    color: #16806a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-local-invoice-page .invoice-preview-document {
    box-shadow: 0 10px 28px rgba(21, 41, 68, 0.08);
}

.public-payment-return-shell {
    width: min(640px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.public-payment-return-card {
    padding: 34px;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(21, 41, 68, 0.08);
}

.public-payment-return-card h1 {
    margin: 8px 0 12px;
    font-size: 28px;
}

.public-payment-return-card p {
    margin: 0 0 12px;
}

@media (max-width: 640px) {
    .public-local-invoice-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 12px;
    }

    .public-local-invoice-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .public-payment-return-shell {
        width: min(100% - 20px, 640px);
        padding: 28px 0;
    }

    .public-payment-return-card {
        padding: 24px;
    }
}

/* Knowledge Base */
.knowledge-base-search-panel {
    padding-block: 14px;
}

.knowledge-base-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
}

.knowledge-base-search-form label {
    margin: 0;
}

.knowledge-base-category-strip {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.knowledge-base-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    border: 1px solid #d8e0e8;
    border-radius: 999px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    padding: 8px 12px;
    text-decoration: none;
}

.knowledge-base-category-chip:hover,
.knowledge-base-category-chip:focus,
.knowledge-base-category-chip.active {
    border-color: #00a884;
    background: #eaf8f4;
    color: #08735f;
    text-decoration: none;
}

.knowledge-base-category-chip span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    background: #eef2f6;
    font-size: 11px;
}

.knowledge-base-article-list {
    display: grid;
    gap: 10px;
}

.knowledge-base-article-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin: 0;
}

.knowledge-base-article-card-main {
    min-width: 0;
}

.knowledge-base-article-card h2 {
    margin: 5px 0 7px;
    font-size: 18px;
}

.knowledge-base-article-card h2 a {
    color: var(--ink);
    text-decoration: none;
}

.knowledge-base-article-card h2 a:hover,
.knowledge-base-article-card h2 a:focus {
    color: #008d70;
}

.knowledge-base-article-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.knowledge-base-article-meta,
.knowledge-base-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.knowledge-base-article-meta a,
.knowledge-base-breadcrumbs a {
    color: #08735f;
    font-weight: 600;
}

.knowledge-base-article-body {
    max-width: 980px;
    margin-inline: auto;
    padding: 26px 30px;
    color: #243040;
    font-size: 14px;
    line-height: 1.75;
}

.knowledge-base-article-body h2,
.knowledge-base-article-body h3,
.knowledge-base-article-body h4 {
    margin: 24px 0 10px;
    color: var(--ink);
}

.knowledge-base-article-body p,
.knowledge-base-article-body ul,
.knowledge-base-article-body ol,
.knowledge-base-article-body blockquote,
.knowledge-base-article-body table {
    margin: 0 0 14px;
}

.knowledge-base-article-body blockquote {
    border-left: 3px solid #00a884;
    background: #f4faf8;
    padding: 10px 14px;
}

.knowledge-base-article-body table,
.knowledge-base-rich-editor table {
    width: 100%;
    border-collapse: collapse;
}

.knowledge-base-article-body th,
.knowledge-base-article-body td,
.knowledge-base-rich-editor th,
.knowledge-base-rich-editor td {
    border: 1px solid #d6dee7;
    padding: 8px;
    text-align: left;
}

.knowledge-base-editor-details .form-grid.two-columns,
.knowledge-base-category-form .form-grid.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.knowledge-base-editor-details .full-span,
.knowledge-base-category-form .full-span,
.knowledge-base-editor-label {
    grid-column: 1 / -1;
}

.knowledge-base-editor-label {
    display: block;
    margin-top: 16px;
}

.knowledge-base-editor-field-label {
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 400;
}

.knowledge-base-rich-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    border: 1px solid #cfd8e3;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: #f7f9fb;
    padding: 7px;
}

.knowledge-base-rich-toolbar button,
.knowledge-base-rich-toolbar select {
    width: auto;
    min-height: 31px;
    border: 1px solid #d5dde6;
    border-radius: 5px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    padding: 5px 8px;
}

.knowledge-base-rich-source {
    display: none;
}

.knowledge-base-rich-editor {
    min-height: 320px;
    border: 1px solid #cfd8e3;
    border-radius: 0 0 7px 7px;
    background: #ffffff;
    color: var(--ink);
    line-height: 1.6;
    outline: none;
    overflow: auto;
    padding: 16px;
}

.knowledge-base-rich-editor:focus {
    border-color: #00a884;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.12);
}

.knowledge-base-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #98a2b3;
}

.knowledge-base-visibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-bottom: 16px;
}

.knowledge-base-visibility-options label,
.knowledge-base-check-list label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 400;
}

.knowledge-base-visibility-options input,
.knowledge-base-check-list input {
    width: auto;
}

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

.knowledge-base-audience-grid fieldset {
    min-width: 0;
    border: 1px solid #dde4eb;
    border-radius: 8px;
    padding: 12px;
}

.knowledge-base-audience-grid legend {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 0 5px;
}

.knowledge-base-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    max-height: 220px;
    overflow: auto;
    padding-top: 8px;
}

.compact-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.compact-actions form {
    margin: 0;
}

@media (max-width: 820px) {
    .knowledge-base-page-header,
    .knowledge-base-article-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .knowledge-base-search-form,
    .knowledge-base-editor-details .form-grid.two-columns,
    .knowledge-base-category-form .form-grid.two-columns,
    .knowledge-base-audience-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-base-article-body {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .knowledge-base-check-list {
        grid-template-columns: 1fr;
    }
}

.record-page-header > .actions .record-header-action-form {
    display: contents;
}

.record-page-header > .actions .button,
.record-page-header > .actions button {
    gap: 5px;
    min-height: 26px;
    border: 0;
    border-left: 1px solid #d8e1ec;
    border-radius: 0;
    background: transparent;
    color: #24405f;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    padding: 3px 8px;
}

.record-page-header > .actions .button:first-child,
.record-page-header > .actions button:first-child {
    border-left: 0;
}

.record-page-header > .actions .record-header-action-form button {
    border-left: 1px solid #d8e1ec;
}

.record-page-header > .actions .record-header-action-form:first-child button {
    border-left: 0;
}

.customer-create-menu,
.customer-action-menu {
    position: relative;
}

.customer-create-menu > summary,
.customer-action-menu > summary {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    list-style: none;
}

.customer-create-menu > summary::-webkit-details-marker,
.customer-action-menu > summary::-webkit-details-marker {
    display: none;
}

.customer-create-menu[open] > summary,
.customer-action-menu[open] > summary {
    border-color: #b8caf6;
    background: #eef4ff;
    color: var(--blue);
}

.customer-create-menu-list,
.customer-action-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    display: grid;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.customer-create-menu-list a,
.record-page-header > .actions .customer-action-menu-list button {
    display: block;
    width: 100%;
    min-height: 0;
    border: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: #175cd3;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    padding: 9px 12px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
}

.customer-create-menu-list a:hover,
.customer-create-menu-list a:focus,
.record-page-header > .actions .customer-action-menu-list button:hover,
.record-page-header > .actions .customer-action-menu-list button:focus {
    background: #eef4ff;
    text-decoration: none;
}

.customer-action-menu-list .record-header-action-form {
    display: block;
    margin: 0;
}

.record-page-header > .actions .button:hover,
.record-page-header > .actions .button:focus,
.record-page-header > .actions button:hover,
.record-page-header > .actions button:focus {
    background: #e8f2ff;
    color: #175cd3;
    text-decoration: none;
}

.record-page-header > .actions .button.new-action-button,
.record-page-header > .actions .button.secondary.new-action-button {
    min-width: 0;
    border-color: #d8e1ec;
    background: transparent;
    color: #24405f;
}

.record-page-header > .actions .button.is-disabled {
    color: #8a95a6;
    cursor: not-allowed;
}

.action-plus {
    position: relative;
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    color: #175cd3;
}

.action-plus::before,
.action-plus::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    background: currentColor;
}

.action-plus::before {
    top: 4px;
    left: 0;
    width: 10px;
    height: 2px;
}

.action-plus::after {
    top: 0;
    left: 4px;
    width: 2px;
    height: 10px;
}

.panel-title h2 {
    color: #101828;
    font-weight: 500;
}

.section-head > div > p.muted,
.panel-title > div > p.muted {
    display: none;
}

.section-head .has-panel-tooltip,
.panel-title .has-panel-tooltip {
    cursor: help;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin: -2px 0 10px;
}

.page-actions form {
    margin: 0;
}

.page-actions.module-actions {
    align-items: center;
}

.module-sync-form {
    margin: 0;
}

.muted {
    color: var(--muted);
    font-weight: 300;
}

.field-help {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.35;
}

.panel,
.notice {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--panel);
}

.panel {
    margin-bottom: 8px;
    padding: 10px 12px;
    box-shadow: var(--panel-shadow);
}

.notice {
    margin-bottom: 10px;
    padding: 8px 10px;
}

.notice strong,
.notice span {
    display: block;
}

.notice span {
    margin-top: 3px;
}

.role-preview-banner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.role-preview-banner form {
    margin: 0;
}

.notice:not(.warning) {
    border-color: #bfe5d6;
    background: #eaf7f1;
    color: #0f6b4c;
}

.notice.warning {
    border-color: #f3d19b;
    background: #fff7e8;
    color: #7a4300;
}

.error-list {
    margin-bottom: 16px;
    border: 1px solid #f5beb7;
    border-radius: 6px;
    background: #fff0ee;
    color: #912018;
    padding: 10px 12px;
}

.grid {
    display: grid;
    gap: 10px;
}

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

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

.project-operations-dashboard {
    display: grid;
    gap: 10px;
}

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

.project-ops-top-grid {
    grid-template-columns: minmax(0, 1fr);
}

.project-ops-bottom-grid {
    grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 1.18fr);
}

.project-operations-dashboard .panel {
    min-width: 0;
}

.table.project-ops-project-table {
    min-width: 1020px;
    table-layout: fixed;
}

.project-ops-project-table .project-ops-start-column {
    width: 120px;
}

.project-ops-project-table .project-ops-status-column {
    width: 155px;
}

.project-ops-project-table .project-ops-age-column {
    width: 115px;
}

.project-ops-project-table .project-ops-title-column {
    width: auto;
}

.project-ops-project-table .project-ops-assignee-column {
    width: 160px;
}

.project-ops-project-table .project-ops-last-update-column {
    width: 160px;
}

.project-ops-project-table th:nth-child(4),
.project-ops-project-table td:nth-child(4),
.project-ops-project-table td:nth-child(4) .table-link,
.project-ops-project-table td:nth-child(5) {
    white-space: normal;
}

.project-ops-project-table td:nth-child(4) .table-link,
.project-ops-project-table td:nth-child(5) {
    overflow-wrap: anywhere;
}

.project-ops-count-panel .table {
    min-width: 1120px;
}

.project-ops-closed-panel .table {
    min-width: 900px;
}

.project-count-link {
    color: #0757c8;
    display: inline-flex;
    font-weight: 700;
    min-width: 2ch;
    text-decoration: none;
}

.project-count-link:hover,
.project-count-link:focus {
    text-decoration: underline;
}

.project-ops-closed-filters {
    margin-bottom: 10px;
}

.project-ops-closed-filters label,
.project-ops-closed-filters label:first-child,
.project-ops-closed-filters.module-list-filters label:first-of-type {
    flex: 1 1 150px;
    min-width: 140px;
}

.project-ops-filter-actions {
    flex: 0 0 auto;
}

.module-summary,
.audit-summary,
.record-meta-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 8px;
}

.summary-card,
.record-hero,
.detail-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: #ffffff;
}

.summary-card {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}

.module-summary.local-billing-detail-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.module-summary.local-billing-detail-summary .summary-card {
    display: inline-flex;
    align-items: center;
    flex: 1 1 110px;
    gap: 6px;
    min-height: 32px;
    padding: 6px 9px;
}

.module-summary.local-billing-detail-summary .summary-label {
    font-size: 11px;
}

.module-summary.local-billing-detail-summary .summary-value {
    font-size: 14px;
    line-height: 1;
}

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

a.summary-card:hover,
a.summary-card:focus {
    border-color: #bfe5d6;
    background: #f8fdfb;
    box-shadow: inset 3px 0 0 #00b993;
    text-decoration: none;
}

a.summary-card.is-active {
    border-color: #9db7e8;
    background: #eef4ff;
    box-shadow: inset 3px 0 0 #2563eb;
}

.module-summary.is-list-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: min(100%, var(--list-toolbar-width, var(--content-width-comfortable)));
    justify-self: start;
}

.module-summary.is-list-summary .summary-card {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 6px;
    min-height: 28px;
    border: 0;
    background: transparent;
    padding: 4px 7px;
}

.module-summary.is-list-summary .summary-label {
    font-size: 11px;
}

.module-summary.is-list-summary .summary-value {
    font-size: 13px;
    line-height: 1;
}

.module-summary.is-list-summary:has(+ .panel.filters.module-list-filters),
.module-summary.is-list-summary:has(+ form.panel.filters.module-list-filters) {
    width: min(100%, var(--list-toolbar-width, var(--content-width-comfortable)));
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    background: var(--panel);
    padding: 5px 8px 2px;
}

.module-summary.is-list-summary + .panel.filters.module-list-filters,
.module-summary.is-list-summary + form.panel.filters.module-list-filters {
    margin-top: 0;
    border-top: 0;
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
    padding-top: 5px;
}

.summary-label,
.field-note,
.entity-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 300;
}

.summary-card .summary-label {
    font-size: 11px;
    font-weight: 400;
}

.sr-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.inline-fields,
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-fields > * {
    flex: 1 1 0;
}

.checkbox-line {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
}

.checkbox-line input {
    inline-size: auto;
}

.hr-location-helper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
}

.attendance-correction-panel {
    padding: 0;
    overflow: hidden;
}

.attendance-correction-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    padding: 12px;
    cursor: pointer;
}

.attendance-correction-panel > summary::-webkit-details-marker {
    display: none;
}

.attendance-correction-panel > summary strong,
.attendance-correction-panel > summary small {
    display: block;
}

.attendance-correction-panel > summary strong {
    color: var(--heading-blue);
}

.attendance-correction-panel > summary small {
    margin-top: 3px;
    color: var(--muted);
}

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

.attendance-correction-panel > .placeholder-form {
    padding: 12px;
}

.attendance-correction-form,
.attendance-manual-checkout-form {
    display: grid;
    gap: 12px;
}

.attendance-selected-record {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
}

.attendance-selected-record > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.attendance-selected-record span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.attendance-selected-record strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.attendance-correction-modes {
    min-width: 0;
    margin: 0;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    padding: 10px;
}

.attendance-correction-modes legend {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 0 5px;
}

.attendance-correction-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.placeholder-form .attendance-correction-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    padding: 9px 10px;
}

.attendance-correction-mode-option:has(input:checked) {
    border-color: #9db7e8;
    background: #eef4ff;
}

.placeholder-form .attendance-correction-mode-option input {
    flex: 0 0 auto;
    width: auto;
    min-height: auto;
    margin-top: 2px;
}

.attendance-correction-mode-option span,
.attendance-correction-mode-option strong,
.attendance-correction-mode-option small {
    display: block;
    font-size: inherit;
}

.attendance-correction-mode-option small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
}

.attendance-correction-mode-option strong {
    font-size: 13px;
    line-height: 1.35;
}

.placeholder-form.attendance-correction-form > .grid > label,
.placeholder-form.attendance-manual-checkout-form > .grid > label {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.attendance-correction-form label > .field-note,
.attendance-manual-checkout-form label > .field-note {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
}

.attendance-correction-mode-help,
.attendance-automation-management-note {
    margin: 0;
    line-height: 1.45;
}

.attendance-correction-payroll-note {
    margin: 0;
    border-left: 3px solid #b8caf6;
    background: #f6f9ff;
    padding: 8px 10px;
    line-height: 1.45;
}

.attendance-correction-payroll-note strong {
    color: #334155;
    font-weight: 600;
}

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

.attendance-automation-panel {
    display: grid;
    gap: 10px;
}

.attendance-automation-message {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
}

.attendance-automation-summary {
    align-items: stretch;
}

.module-summary.is-list-summary.attendance-automation-summary .summary-card {
    align-items: flex-start;
    flex: 1 1 210px;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 7px;
    background: #f8fafc;
}

.attendance-automation-copy-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.attendance-automation-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 7px;
    background: #f8fafc;
    padding: 10px;
}

.attendance-automation-copy-row > span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.attendance-automation-copy-row code {
    min-width: 0;
    color: #1f2937;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.attendance-row-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.attendance-log-table {
    min-width: 880px;
}

.attendance-log-table td[data-label="Status"] .badge + .badge {
    margin-left: 4px;
}

.attendance-audit-actor {
    max-width: 260px;
    white-space: normal;
}

@media (max-width: 900px) {
    .attendance-selected-record,
    .attendance-correction-mode-options,
    .attendance-automation-copy-list {
        grid-template-columns: 1fr;
    }

    .attendance-automation-copy-row {
        grid-template-columns: 1fr;
    }

    .attendance-automation-copy-row > span {
        grid-column: auto;
    }

    .attendance-automation-copy-row .button {
        justify-self: start;
    }

    .attendance-row-actions {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .attendance-row-actions .button,
    .attendance-form-actions .button,
    .attendance-form-actions button {
        justify-content: center;
        width: 100%;
    }
}

.summary-value {
    color: var(--heading-blue);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
}

.summary-card .badge,
.summary-card .status-badge {
    justify-self: start;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
}

.filters.module-list-filters {
    width: min(100%, var(--list-toolbar-width, var(--content-width-comfortable)));
    justify-self: start;
    padding: 8px 10px;
}

.module-summary.is-list-summary:has(+ .panel.filters.module-list-filters .list-view-quick-actions),
.module-summary.is-list-summary:has(+ form.panel.filters.module-list-filters .list-view-quick-actions),
.filters.module-list-filters:has(.list-view-quick-actions) {
    --list-toolbar-width: var(--content-width-wide);
}

.filters .filter-fields {
    display: contents;
}

.filters label {
    flex: 1 1 170px;
    min-width: 150px;
}

.filters label:first-child {
    flex: 2 1 300px;
    min-width: 240px;
}

.filters.module-list-filters label:first-of-type {
    flex: 0 0 420px;
    max-width: 420px;
    min-width: 260px;
}

.filters.module-list-filters .list-view-filter {
    flex: 0 0 235px;
    max-width: 260px;
    min-width: 190px;
}

.filters.module-list-filters .list-search-field,
.filters.module-list-filters label.list-search-field:first-of-type {
    flex: 0 1 260px;
    max-width: 280px;
    min-width: 200px;
}

.customers-list-filters .compact-filter-field {
    flex: 0 0 200px;
    max-width: 200px;
    min-width: 170px;
}

.filters.module-list-filters.customers-list-filters .list-view-quick-actions {
    flex: 0 1 auto;
    width: auto;
}

.filters.module-list-filters.customers-list-filters .customer-follow-up-filter,
.filters.module-list-filters.customers-list-filters label.customer-follow-up-filter:first-of-type {
    flex: 0 0 170px;
    max-width: 170px;
    min-width: 170px;
}

.filters.module-list-filters.customers-list-filters .customer-shortlist-filter {
    flex: 0 0 175px;
    max-width: 190px;
    min-width: 160px;
}

.customers-list-filters .customer-follow-up-filter.is-danger-filter select {
    border-color: #fca5a5;
    background: #fff1f2;
    color: #991b1b;
}

.customer-filter-category,
.customer-filter-field-grid,
.project-filter-category,
.project-filter-field-grid {
    display: grid;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.customer-filter-category-title,
.project-filter-category-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.customer-filter-actions,
.project-filter-actions {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.filters .button,
.filters button {
    flex: 0 0 auto;
}

.list-more-filters,
.list-table-options {
    flex: 1 1 100%;
    min-width: 0;
}

.list-more-filters > summary,
.list-table-options > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--control-height);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-control);
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    list-style: none;
    padding: 5px 9px;
}

.list-more-filters > summary::-webkit-details-marker,
.list-table-options > summary::-webkit-details-marker {
    display: none;
}

.list-more-filters > summary::after,
.list-table-options > summary::after {
    color: #64748b;
    content: '▾';
    font-size: 11px;
}

.list-more-filters[open] > summary,
.list-table-options[open] > summary {
    border-color: #9db7e8;
    background: #eef4ff;
    color: #175cd3;
}

.list-more-filter-fields,
.list-table-option-fields {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    border-top: 1px solid #e4e9f0;
    padding-top: 8px;
}

.list-more-filter-fields > label {
    flex: 0 1 190px;
    min-width: 160px;
}

.list-more-filter-fields .list-view-quick-actions {
    flex: 1 1 100%;
}

.list-filter-count {
    color: #64748b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.filter-quick-actions {
    display: flex;
    align-items: center;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 6px;
}

.list-view-quick-actions {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

@media (min-width: 901px) {
    .filters.module-list-filters .list-view-quick-actions {
        flex: 0 1 auto;
        width: auto;
    }

    .filters.module-list-filters:has(.filter-quick-actions):not(:has(.list-view-filter)) .filter-quick-actions {
        flex: 1 1 auto;
        gap: 8px;
        order: 1;
    }

    .filters.module-list-filters:has(.filter-quick-actions):not(:has(.list-view-filter)) .list-search-field {
        flex-basis: 210px;
        max-width: 220px;
        min-width: 170px;
        order: 2;
    }

    .filters.module-list-filters:has(.filter-quick-actions):not(:has(.list-view-filter)) .filter-fields > button[type='submit'] {
        order: 3;
    }

    .filters.module-list-filters:has(.filter-quick-actions):not(:has(.list-view-filter)) .filter-fields > .button.secondary {
        order: 3;
    }

    .filters.module-list-filters {
        position: relative;
        z-index: 20;
        align-items: center;
        flex-wrap: nowrap;
        width: min(100%, var(--list-toolbar-width, var(--content-width-wide)));
        overflow: visible;
        border-width: 0;
        border-radius: 0;
        background: transparent;
        padding: 6px 0;
    }

    .filters.module-list-filters:has(details[open]) {
        z-index: 50;
    }

    .filters.module-list-filters .list-view-quick-actions,
    .filters.module-list-filters .filter-quick-actions {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .filters.module-list-filters .list-more-filters,
    .filters.module-list-filters .list-table-options {
        position: relative;
        flex: 0 0 auto;
        min-width: 0;
    }

    .filters.module-list-filters .list-more-filter-fields,
    .filters.module-list-filters .list-table-option-fields {
        position: absolute;
        z-index: 60;
        top: calc(100% + 6px);
        left: 0;
        align-items: end;
        flex-wrap: nowrap;
        width: max-content;
        max-width: min(1120px, calc(100vw - 280px));
        max-height: min(320px, calc(100vh - 160px));
        overflow: auto;
        margin: 0;
        border: 1px solid #cfd8e3;
        border-radius: 5px;
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
        padding: 8px;
    }

    .filters.module-list-filters .list-table-option-fields {
        right: 0;
        left: auto;
    }

    .filters.module-list-filters .list-more-filter-fields > label,
    .filters.module-list-filters .list-table-option-fields > label {
        flex: 0 0 176px;
        min-width: 160px;
    }

    .filters.module-list-filters .list-more-filter-fields .list-view-quick-actions,
    .filters.module-list-filters .list-table-option-fields .list-view-quick-actions {
        flex: 0 0 auto;
        width: auto;
    }

    .filters.module-list-filters .list-more-filter-fields:has(> .is-secondary-view-actions):not(:has(> label)) {
        align-items: stretch;
        flex-direction: column;
        width: min(240px, calc(100vw - 32px));
        overflow-x: hidden;
        overflow-y: auto;
    }

    .filters.module-list-filters .list-more-filter-fields .list-view-quick-actions.is-secondary-view-actions {
        display: grid;
        flex: 0 0 auto;
        gap: 2px;
        min-width: 210px;
        width: 100%;
        overflow-x: visible;
        white-space: normal;
    }

    .filters.module-list-filters .list-more-filter-fields .is-secondary-view-actions .filter-quick-button {
        justify-content: flex-start;
        width: 100%;
        border-color: transparent;
        background: transparent;
        text-align: left;
        white-space: normal;
    }

    .filters.module-list-filters .list-more-filter-fields .is-secondary-view-actions .filter-quick-button:hover,
    .filters.module-list-filters .list-more-filter-fields .is-secondary-view-actions .filter-quick-button:focus,
    .filters.module-list-filters .list-more-filter-fields .is-secondary-view-actions .filter-quick-button.is-active {
        border-color: #cbdaf6;
        background: #eef4ff;
    }

    .filters.module-list-filters .list-more-filter-fields .button,
    .filters.module-list-filters .list-more-filter-fields button,
    .filters.module-list-filters .list-table-option-fields .button,
    .filters.module-list-filters .list-table-option-fields button {
        white-space: nowrap;
    }

    .filters.module-list-filters.customers-list-filters .list-more-filter-fields {
        display: grid;
        align-items: start;
        grid-template-areas:
            'status fields'
            'status actions';
        grid-template-columns: minmax(210px, 0.85fr) minmax(360px, 1.65fr);
        gap: 10px 14px;
        left: 50%;
        width: min(640px, calc(100vw - 32px));
        max-width: 640px;
        max-height: none;
        overflow: visible;
        transform: translateX(-50%);
    }

    .filters.module-list-filters.customers-list-filters .customer-status-filter-category {
        grid-area: status;
    }

    .filters.module-list-filters.customers-list-filters .customer-detail-filter-category {
        grid-area: fields;
    }

    .filters.module-list-filters.customers-list-filters .customer-filter-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters.module-list-filters.customers-list-filters .customer-filter-field-grid > label {
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .filters.module-list-filters.customers-list-filters .customer-filter-actions {
        grid-area: actions;
        justify-content: flex-end;
    }

    .filters.module-list-filters.projects-list-filters .list-more-filter-fields {
        display: grid;
        align-items: start;
        grid-template-areas:
            'status fields'
            'status actions';
        grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
        gap: 10px 14px;
        width: min(680px, calc(100vw - 32px));
        max-width: 680px;
        max-height: none;
        overflow: visible;
    }

    .filters.module-list-filters.projects-list-filters .project-status-filter-category {
        grid-area: status;
    }

    .filters.module-list-filters.projects-list-filters .project-detail-filter-category {
        grid-area: fields;
    }

    .filters.module-list-filters.projects-list-filters .project-status-filter-category .is-secondary-view-actions,
    .filters.module-list-filters.projects-list-filters .project-filter-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters.module-list-filters.projects-list-filters .project-status-filter-category .is-secondary-view-actions {
        min-width: 0;
    }

    .filters.module-list-filters.projects-list-filters .project-filter-field-grid > label {
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .filters.module-list-filters.projects-list-filters .project-filter-actions {
        grid-area: actions;
        justify-content: flex-end;
    }

    .filters.module-list-filters.support-list-filters .list-more-filter-fields {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        width: fit-content;
        min-width: 234px;
        max-width: min(300px, calc(100vw - 32px));
        max-height: none;
        overflow: visible;
        padding: 12px;
    }

    .filters.module-list-filters.support-list-filters .support-filter-group {
        display: grid;
        gap: 6px;
        min-width: 0;
        width: 100%;
    }

    .filters.module-list-filters.support-list-filters .support-filter-group-title {
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .filters.module-list-filters.support-list-filters .support-filter-group .is-secondary-view-actions {
        min-width: 0;
        width: 100%;
    }

    .filters.module-list-filters.support-list-filters .list-more-filter-fields > .support-priority-filter {
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .filters.module-list-filters.support-list-filters .support-filter-actions {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .filters.module-list-filters.support-list-filters .support-filter-actions > .button,
    .filters.module-list-filters.support-list-filters .support-filter-actions > button {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
    }

    .filters.module-list-filters.customers-list-filters .list-table-option-fields {
        align-items: stretch;
        flex-direction: column;
        width: min(300px, calc(100vw - 32px));
        max-width: 300px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .filters.module-list-filters.customers-list-filters .list-table-option-fields > form {
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .filters.module-list-filters.customers-list-filters .list-table-option-fields .payment-month-column-form {
        display: grid;
        align-items: stretch;
        margin-left: 0;
        width: 100%;
    }

    .filters.module-list-filters.customers-list-filters .list-table-option-fields .payment-month-column-form input,
    .filters.module-list-filters.customers-list-filters .list-table-option-fields .payment-month-column-form button {
        max-width: none;
        width: 100%;
    }
}

.sales-dashboard-actions {
    align-items: center;
}

.sales-dashboard-actions .button-row {
    flex-wrap: nowrap;
    width: auto;
}

.filter-context-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid #bfe5d6;
    border-radius: 999px;
    background: #eaf7f1;
    color: var(--green);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 11px;
    white-space: nowrap;
}

label {
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 400;
}

.filters label,
.placeholder-form label:not(.check-row):not(.toggle-row):not(.install-checkbox):not(.setting-field-row):not(.staff-ai-choice-label),
.placeholder-form form label:not(.check-row):not(.toggle-row):not(.install-checkbox):not(.setting-field-row):not(.staff-ai-choice-label) {
    font-size: 0;
}

.placeholder-form .field-label-text {
    display: block;
    margin-bottom: 4px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.form-block-divider {
    margin: 18px 0 10px;
    padding-top: 14px;
    border-top: 1px solid #e1e7ef;
}

.form-block-divider h3 {
    margin: 0 0 3px;
    color: var(--blue);
    font-size: 15px;
    font-weight: 600;
}

.form-block-divider p {
    margin: 0;
}

.filters .field-label-text {
    display: block;
    margin-bottom: 4px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    min-height: var(--control-height);
    margin-top: 4px;
    border: 1px solid #cfd6e2;
    border-radius: var(--radius-control);
    background: var(--field);
    color: var(--ink);
    padding: 5px 8px;
    outline: none;
    font-weight: 400;
}

.filters input,
.filters select,
.placeholder-form input,
.placeholder-form select,
.placeholder-form textarea,
.placeholder-form form input,
.placeholder-form form select,
.placeholder-form form textarea {
    margin-top: 0;
    font-size: 13px;
}

::placeholder {
    color: #7a8495;
    font-weight: 300;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(23, 107, 87, 0.14);
}

input.is-required-missing,
select.is-required-missing,
textarea.is-required-missing,
.searchable-select-trigger.is-required-missing {
    border-color: #d92d20;
    background: #fff4f2;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.field-has-error {
    color: #912018;
}

.searchable-select {
    position: relative;
    width: 100%;
    margin-top: 4px;
    font-size: 13px;
}

.filters .searchable-select,
.placeholder-form .searchable-select,
.placeholder-form form .searchable-select {
    margin-top: 0;
}

.searchable-select-source {
    position: absolute;
    inset: auto auto 0 0;
    width: 1px;
    min-height: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.searchable-select-trigger {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid #cfd6e2;
    border-radius: var(--radius-control);
    background: var(--field);
    color: var(--ink);
    padding: 5px 8px;
    text-align: left;
}

.searchable-select-trigger:hover,
.searchable-select-trigger:focus {
    border-color: var(--blue);
    background: var(--field);
    color: var(--ink);
    box-shadow: 0 0 0 3px rgba(36, 91, 214, 0.12);
}

.searchable-select-trigger:disabled,
.searchable-select.is-disabled .searchable-select-trigger {
    cursor: not-allowed;
    border-color: #d9e1eb;
    background: #eef2f6;
    color: #8a94a6;
    box-shadow: none;
}

.searchable-select-trigger.is-placeholder .searchable-select-value {
    color: #7a8495;
    font-weight: 300;
}

.searchable-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-icon {
    color: #64748b;
    flex: 0 0 auto;
}

.searchable-select-panel {
    position: fixed;
    z-index: 1200;
    border: 1px solid #cfd6e2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
    padding: 6px;
}

.searchable-select-search {
    margin: 0 0 6px;
    background: #ffffff;
}

.searchable-select-options {
    display: grid;
    max-height: 220px;
    overflow-y: auto;
}

.payment-form-panel {
    padding-top: 16px;
}

.payment-form-grid {
    display: grid;
    gap: 16px 28px;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.payment-due-summary {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fbff;
}

.payment-due-summary[hidden] {
    display: none;
}

.payment-due-summary div {
    display: grid;
    gap: 3px;
    min-width: 0;
    border-right: 1px solid #dbe4f0;
    padding: 10px 12px;
}

.payment-due-summary div:last-child {
    border-right: 0;
}

.payment-due-summary strong {
    color: #334f75;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.payment-due-summary span {
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.payment-due-summary-primary {
    background: #ecfdf3;
}

.payment-due-summary-primary strong,
.payment-due-summary-primary span {
    color: #067647;
}

.payment-tax-row,
.payment-options-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    border-top: 1px solid #e4e9f0;
    padding-top: 14px;
    color: #334155;
    font-size: 13px;
}

.payment-tds-panel {
    display: grid;
    align-items: end;
    gap: 10px 16px;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    margin-top: 12px;
}

.payment-tds-panel[hidden] {
    display: none;
}

.payment-tds-panel .field-note {
    margin: 0 0 8px;
}

.inline-choice {
    display: inline-flex;
    align-items: center;
    width: auto;
    gap: 7px;
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 400;
}

.inline-choice input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.payment-notes-grid {
    margin-top: 18px;
}

.payment-notes-grid textarea {
    min-height: 84px;
}

.payment-action-button:not(.is-disabled) {
    border-color: #8bd7bd;
    background: #ffffff;
    color: var(--green);
}

.payment-action-button:not(.is-disabled):hover,
.payment-action-button:not(.is-disabled):focus {
    border-color: var(--green);
    background: #eaf7f1;
    color: var(--green);
}

.button.is-disabled,
.payment-action-button.is-disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

.project-tile-card {
    gap: 12px;
}

.project-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.confirmation-popover {
    position: relative;
    display: inline-block;
}

.confirmation-popover summary {
    list-style: none;
}

.confirmation-popover summary::-webkit-details-marker {
    display: none;
}

.confirmation-popover-body {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    display: grid;
    width: min(420px, calc(100vw - 48px));
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 14px;
}

.recurring-reminder-confirmation .confirmation-popover-body {
    right: 0;
    left: auto;
}

.sales-project-action-card {
    position: relative;
    z-index: 2;
}

.sales-project-confirmation {
    display: block;
}

.sales-project-confirmation[open] {
    z-index: 40;
}

.sales-project-confirmation .confirmation-popover-body {
    position: static;
    width: 100%;
    margin-top: 10px;
    box-shadow: none;
}

.searchable-select-option {
    justify-content: flex-start;
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    padding: 6px 8px;
    text-align: left;
}

.searchable-select-option + .searchable-select-option {
    border-top: 1px solid #edf1f7;
}

.searchable-select-option:hover,
.searchable-select-option:focus,
.searchable-select-option.is-selected {
    background: #eef4ff;
    color: var(--blue);
    box-shadow: none;
}

.searchable-select-option.is-disabled,
.searchable-select-option:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.searchable-select-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 8px;
}

.sales-order-total-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.sales-order-total-row .billing-total-card {
    width: min(440px, 100%);
}

.sales-order-notes-grid {
    gap: 16px;
}

.sales-order-notes-grid textarea {
    min-height: 92px;
}

input:disabled {
    color: #8792a3;
    cursor: not-allowed;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--control-height);
    border: 1px solid var(--green);
    border-radius: var(--radius-control);
    background: var(--green);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 5px 9px;
}

.button:hover,
.button:focus {
    text-decoration: none;
}

.button.secondary,
button.secondary,
.profile-dropdown button {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #1f2937;
}

.button.secondary.filter-quick-button.is-active {
    border-color: #9db7e8;
    background: #eef4ff;
    color: #175cd3;
}

.button.secondary.filter-quick-button.is-success-filter.is-active {
    border-color: #8bd7bd;
    background: #eaf7f1;
    color: #047857;
}

.button.secondary.filter-quick-button.is-danger-filter.is-active {
    border-color: #ef4444;
    background: #fff1f2;
    color: #991b1b;
}

.button.marked-sent-button.is-disabled {
    border-color: #8bd7bd;
    background: #eaf7f1;
    color: #047857;
    cursor: default;
    pointer-events: none;
}

.form-footer button:disabled,
.settings-actions button:disabled,
.settings-actions .button:disabled,
.twilio-service-update-action-trigger:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
    cursor: not-allowed;
}

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

.button.compact,
button.compact {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 13px;
}

.button.outline-status {
    border: 1px solid;
    background: #ffffff;
    box-shadow: none;
}

.button.outline-status:hover,
.button.outline-status:focus {
    background: #ffffff;
}

.button.outline-status.is-warning {
    border-color: var(--amber-line);
    color: var(--amber);
}

.button.outline-status.is-positive {
    border-color: var(--green-line);
    color: var(--green);
}

.button.outline-status.is-accent {
    border-color: var(--accent-line);
    color: var(--accent-line);
}

.compact-action-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.equal-height-grid {
    align-items: stretch;
}

.compact-soft-surface {
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--panel);
    box-shadow: none;
}

.compact-dashboard-section {
    min-width: 0;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--panel);
    padding: 11px 12px;
}

.compact-dashboard-accordion {
    padding: 0;
}

.compact-dashboard-accordion-summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    padding: 10px 40px 10px 12px;
    cursor: pointer;
    list-style: none;
}

.compact-dashboard-accordion-summary::-webkit-details-marker {
    display: none;
}

.compact-dashboard-accordion-summary::after {
    position: absolute;
    top: 50%;
    right: 14px;
    color: var(--green);
    content: "+";
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-50%);
}

.compact-dashboard-accordion[open] > .compact-dashboard-accordion-summary::after {
    content: "−";
}

.compact-dashboard-accordion-summary:focus-visible {
    border-radius: 10px;
    outline: 2px solid rgba(23, 107, 87, 0.34);
    outline-offset: 2px;
}

.compact-dashboard-accordion-summary h2 {
    margin: 0;
    color: #101828;
    font-size: 16px;
    font-weight: 500;
}

.compact-dashboard-accordion-meta {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
}

.compact-dashboard-accordion-content {
    border-top: 1px solid #e4e9f0;
    padding: 9px 12px 12px;
}

.compact-dashboard-accordion-content > .owner-dashboard-inline-links {
    margin-bottom: 8px;
}

.compact-dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.compact-dashboard-heading h2 {
    margin: 0;
    color: #101828;
    font-size: 16px;
    font-weight: 500;
}

.compact-dashboard-heading > span {
    color: var(--muted);
    font-size: 12px;
}

.compact-dashboard-kicker {
    margin: 0 0 2px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compact-dashboard-list {
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.compact-dashboard-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(215px, 0.46fr) minmax(110px, auto);
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 54px;
    border-bottom: 1px solid #e4e9f0;
    padding: 8px 10px 8px 15px;
    color: inherit;
    text-decoration: none;
}

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

.compact-dashboard-row::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 5px;
    width: 3px;
    border-radius: 999px;
    background: #94a3b8;
    content: "";
}

.compact-dashboard-row.is-tone-red::before {
    background: #dc2626;
}

.compact-dashboard-row.is-tone-amber::before {
    background: #d97706;
}

.compact-dashboard-row.is-tone-green::before {
    background: #059669;
}

.compact-dashboard-row.is-tone-blue::before {
    background: var(--blue);
}

a.compact-dashboard-row:hover,
a.compact-dashboard-row:focus-visible {
    background: #f7fbf9;
}

a.compact-dashboard-row:focus-visible {
    z-index: 1;
    outline: 2px solid rgba(23, 107, 87, 0.34);
    outline-offset: -2px;
}

.compact-dashboard-row-primary {
    display: grid;
    grid-template-columns: minmax(120px, 0.68fr) minmax(100px, 0.52fr) minmax(170px, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.compact-dashboard-row-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compact-dashboard-row-value {
    color: #101828;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.08;
    white-space: nowrap;
}

.compact-dashboard-row-value.is-money {
    font-size: clamp(15px, 1.55vw, 19px);
}

.compact-dashboard-row-detail {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.compact-dashboard-row-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.compact-dashboard-row-meta > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    border-radius: 5px;
    background: #f1f5f9;
    padding: 3px 5px;
    color: #475569;
    font-size: 10px;
    line-height: 1.2;
}

.compact-dashboard-row-meta > span.is-primary {
    background: #edf8f4;
    color: var(--green);
}

.compact-dashboard-row-meta b {
    font-size: 10px;
    font-weight: 500;
}

.compact-dashboard-row-meta small {
    color: inherit;
    font-size: 9px;
    white-space: nowrap;
}

.compact-dashboard-row-action {
    justify-self: end;
    color: var(--green);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    text-align: right;
}

a.compact-dashboard-row .compact-dashboard-row-action::after {
    margin-left: 3px;
    content: "›";
    font-size: 13px;
    line-height: 1;
}

.compact-metric-section {
    padding-block: 9px;
}

.compact-metric-heading {
    align-items: center;
    margin-bottom: 6px;
}

.compact-metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.compact-metric {
    display: grid;
    grid-template-areas:
        "label value"
        "count value"
        "delta delta";
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    gap: 2px 12px;
    min-width: 0;
    min-height: 60px;
    border-left: 1px solid #e4e9f0;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
}

.compact-metric:first-child {
    border-left: 0;
}

a.compact-metric:hover,
a.compact-metric:focus-visible {
    background: #f7fbf9;
}

a.compact-metric:focus-visible {
    z-index: 1;
    outline: 2px solid rgba(23, 107, 87, 0.34);
    outline-offset: -2px;
}

.compact-metric-label {
    grid-area: label;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.compact-metric-value {
    grid-area: value;
    align-self: center;
    color: #101828;
    font-size: clamp(18px, 1.7vw, 21px);
    line-height: 1.08;
    white-space: nowrap;
}

a.compact-metric .compact-metric-value::after {
    margin-left: 4px;
    color: #6b85a5;
    content: "›";
    font-size: 13px;
    vertical-align: 2px;
}

.compact-metric-count {
    grid-area: count;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
}

.compact-metric-delta {
    grid-area: delta;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.25;
}

.compact-metric-delta.is-positive {
    color: #047857;
}

.compact-metric-delta.is-negative {
    color: #b91c1c;
}

.compact-metric-disclosure {
    position: relative;
    z-index: 4;
}

.compact-metric-disclosure > summary {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    list-style-position: inside;
}

.compact-metric-disclosure > summary:focus-visible {
    outline: 2px solid rgba(37, 91, 214, 0.34);
    outline-offset: 2px;
}

.compact-metric-disclosure-content {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100vw - 48px));
    border: 1px solid #dce2ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 9px;
}

.compact-metric-disclosure-content section {
    display: grid;
    gap: 4px;
}

.compact-metric-disclosure-content section + section {
    border-top: 1px solid #e4e9f0;
    padding-top: 8px;
}

.compact-metric-disclosure-content section > strong {
    color: var(--navy);
    font-size: 11px;
}

.compact-metric-disclosure-content section > span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: baseline;
    gap: 8px;
    color: #475569;
    font-size: 10px;
}

.compact-metric-disclosure-content section > span small {
    color: var(--muted);
    white-space: nowrap;
}

.table.compact-dashboard-table th,
.table.compact-dashboard-table td {
    border-right: 0;
}

.table.compact-dashboard-table th {
    background: var(--table-header-background);
    color: #667085;
}

.table.compact-dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.panel.compact-soft-surface > .pagination-footer {
    background: transparent;
    padding: 8px 0 0;
}

@media (max-width: 980px) {
    .compact-dashboard-row {
        grid-template-columns: minmax(0, 1fr) minmax(210px, 0.55fr);
    }

    .compact-dashboard-row-action {
        grid-column: 1 / -1;
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 700px) {
    .compact-dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-dashboard-heading > span {
        display: none;
    }

    .compact-dashboard-accordion-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .compact-dashboard-accordion-meta {
        text-align: left;
    }

    .compact-dashboard-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding-block: 10px;
    }

    .compact-dashboard-row-primary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
    }

    .compact-dashboard-row-detail {
        grid-column: 1 / -1;
    }

    .compact-dashboard-row-action {
        grid-column: auto;
    }

    .compact-metric-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .compact-metric {
        min-height: 54px;
        border-top: 1px solid #e4e9f0;
        border-left: 0;
    }

    .compact-metric:first-child {
        border-top: 0;
    }
}

.customer-portal-shell .content .button,
.customer-portal-shell .content button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 13px;
}

.customer-portal-shell .content .button {
    white-space: nowrap;
}

.customer-portal-shell .content > .page-title-strip ~ .page-header > .button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: auto;
}

.button.filter-new-button,
.button.new-action-button,
.button.secondary.new-action-button {
    justify-content: center;
    min-width: 64px;
    border-color: var(--green);
    background: var(--green);
    color: #ffffff;
}

.button.module-sync-button {
    justify-content: center;
    gap: 0;
    min-width: 34px;
    width: 34px;
    padding: 5px;
    font-size: 18px;
    line-height: 1;
}

.button.module-sync-button:disabled,
button.module-sync-button:disabled {
    border-color: #d8dee8;
    background: #f6f8fb;
    color: #9aa4b2;
    cursor: not-allowed;
}

.button.is-working,
button.is-working {
    cursor: wait;
    opacity: 0.86;
    pointer-events: none;
}

button.is-working:not(.module-sync-button)::before,
.button.is-working:not(.module-sync-button)::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
    animation: action-spin 0.72s linear infinite;
}

.module-sync-form.is-working .module-sync-button span[aria-hidden="true"] {
    animation: action-spin 0.72s linear infinite;
}

@keyframes action-spin {
    to {
        transform: rotate(360deg);
    }
}

.button.filter-new-button:hover,
.button.filter-new-button:focus,
.button.new-action-button:hover,
.button.new-action-button:focus,
.button.secondary.new-action-button:hover,
.button.secondary.new-action-button:focus {
    border-color: #105c49;
    background: #105c49;
    color: #ffffff;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap[tabindex]:focus-visible {
    border-radius: 8px;
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.mobile-record-only {
    display: none;
}

.bulk-selection-context {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.bulk-selection-context[hidden] {
    display: none !important;
}

.record-selection-hit-area {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
}

.record-selection-hit-area input {
    margin: 0;
}

.panel:has(> .table-wrap) {
    overflow: hidden;
}

.panel:has(> .table-wrap):not(:has(> .panel-title)) {
    padding: 0;
}

.panel:has(> .table-wrap):not(:has(> .panel-title)) > .table-wrap {
    padding: 12px;
}

@media (min-width: 901px) {
    .content > section.panel.content-width-full:has(.table-wrap) {
        overflow: visible;
        border: 1px solid var(--line);
        border-radius: var(--radius-panel);
        background: #ffffff;
        box-shadow: none;
        padding: 0;
    }

    .content > section.panel.content-width-full:has(.table-wrap) .table-wrap {
        padding: 0;
    }
}

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

.table.recurring-history-table {
    min-width: 660px;
}

.table th,
.table td {
    border-bottom: 1px solid #e4e9f0;
    height: var(--table-row-height);
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.customer-match-table .table {
    min-width: 920px;
}

.customer-match-table .table td {
    vertical-align: top;
    white-space: normal;
}

.customer-match-table .table td > span,
.customer-match-table .table td > strong,
.customer-match-table .table td > a {
    display: block;
}

.customer-match-actions {
    display: grid;
    gap: 6px;
    min-width: 180px;
}

.customer-match-actions form {
    margin: 0;
}

.customer-match-actions button {
    width: 100%;
}

.customer-match-actions select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    padding: 6px 8px;
    font: inherit;
    color: var(--ink);
    background: #ffffff;
}

.customer-match-candidate {
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid #e4e9f0;
    border-radius: 6px;
    background: #ffffff;
}

.customer-match-candidate span {
    color: var(--ink);
    font-size: 12px;
}

.table th:not(:last-child) {
    border-right: 1px solid #edf1f6;
}

.table td:not(:last-child) {
    border-right: 0;
}

.table tbody tr:nth-child(even):not(.is-selected) td {
    background: #fbfdff;
}

.table.is-record-table th:first-child,
.table.is-record-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 1px 0 0 #e4e9f0;
}

.table.is-record-table th:first-child {
    z-index: 3;
    background: var(--table-header-background);
}

.table.is-record-table tbody tr:nth-child(even):not(.is-selected) td:first-child {
    background: #fbfdff;
}

.table th {
    background: var(--table-header-background);
    color: #475569;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.table th.is-sortable {
    padding: 0;
}

.table-sort-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0;
    padding: 6px 8px;
    text-align: left;
    text-transform: none;
}

.table-sort-button:hover,
.table-sort-button:focus {
    background: #e8eef7;
    color: #175cd3;
    outline: none;
}

.table-sort-indicator {
    color: #8a96a8;
    font-size: 11px;
    line-height: 1;
}

.table th[aria-sort="ascending"] .table-sort-indicator,
.table th[aria-sort="descending"] .table-sort-indicator {
    color: #175cd3;
}

.table strong {
    font-weight: 400;
}

.table tr.is-selected td {
    background: #f1f7ff;
}

.table tbody tr:hover td {
    background: #f8fafc;
}

.table.is-record-table tbody tr:hover td:first-child {
    background: #f8fafc;
}

.table tbody tr.is-selected:hover td {
    background: #f1f7ff;
}

.table.is-record-table tbody tr.is-selected:hover td:first-child,
.table.is-record-table tr.is-selected td:first-child {
    background: #f1f7ff;
}

.table .is-secondary,
.table .secondary-cell {
    color: #64748b;
}

.table .amount-cell {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.table .action-cell {
    text-align: right;
}

.table .action-cell a:not(.button) {
    color: #175cd3;
    font-weight: 500;
}

.payroll-review-filters {
    justify-content: flex-start;
    margin: 10px 0 6px;
}

.table.payroll-review-table {
    min-width: 880px;
    table-layout: fixed;
    font-size: 12px;
}

.payroll-review-table .payroll-employee-column {
    width: 25%;
}

.payroll-review-table .payroll-attendance-column {
    width: 11%;
}

.payroll-review-table .payroll-leave-column {
    width: 9%;
}

.payroll-review-table .payroll-payable-column {
    width: 10%;
}

.payroll-review-table .payroll-money-column {
    width: 9%;
}

.payroll-review-table .payroll-deductions-column {
    width: 11%;
}

.payroll-review-table .payroll-action-column {
    width: 7%;
}

.payroll-review-table th,
.payroll-review-table td {
    overflow: hidden;
    padding: 6px;
    text-overflow: ellipsis;
}

.payroll-review-table th {
    font-size: 11px;
}

.payroll-review-table .table-sort-button {
    gap: 4px;
    min-height: 30px;
    padding: 6px;
}

.payroll-review-table th:not(:first-child) {
    text-align: right;
}

.payroll-review-table th:not(:first-child) .table-sort-button {
    justify-content: flex-end;
    text-align: right;
}

.payroll-review-table th:last-child {
    text-align: center;
}

.payroll-employee-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .payroll-review-table .payroll-employee-name {
        white-space: normal;
    }

    .table.payroll-review-table.is-mobile-list-table .empty-state::before {
        content: none;
    }
}

.table.recurring-invoice-list-table {
    min-width: 930px;
    table-layout: fixed;
}

.recurring-invoice-list-table th:nth-child(1) {
    width: 18%;
}

.recurring-invoice-list-table th:nth-child(2) {
    width: 21%;
}

.recurring-invoice-list-table th:nth-child(3) {
    width: 10%;
}

.recurring-invoice-list-table th:nth-child(4),
.recurring-invoice-list-table th:nth-child(5) {
    width: 14%;
}

.recurring-invoice-list-table th:nth-child(6) {
    width: 10%;
}

.recurring-invoice-list-table th:nth-child(7) {
    width: 13%;
}

.recurring-invoice-list-table th,
.recurring-invoice-list-table td {
    padding-right: 6px;
    padding-left: 6px;
}

.recurring-invoice-list-table th {
    font-size: 10px;
}

.recurring-invoice-list-table .table-sort-button {
    gap: 4px;
    padding-right: 6px;
    padding-left: 6px;
    white-space: nowrap;
}

.recurring-invoice-list-table th:not(:last-child),
.recurring-invoice-list-table td:not(:last-child) {
    border-right: 0;
}

.recurring-invoice-list-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.recurring-invoice-list-table .recurring-customer-cell,
.recurring-invoice-list-table .recurring-profile-cell,
.recurring-invoice-list-table .recurring-profile-cell .table-link {
    white-space: normal;
    overflow-wrap: anywhere;
}

.recurring-invoice-list-table .recurring-frequency-cell,
.recurring-invoice-list-table .recurring-date-cell {
    font-variant-numeric: tabular-nums;
}

.recurring-date-empty {
    color: #64748b;
}

.recurring-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.recurring-status.is-active {
    color: #067647;
}

.recurring-status.is-paused {
    color: #b54708;
}

.recurring-status.is-stopped {
    color: #d92d20;
}

.recurring-status.is-neutral {
    color: #475569;
}

.table-sticky-header-viewport {
    display: none;
}

@media (min-width: 901px) {
    .local-invoice-list-table thead th,
    .table-sticky-header thead th {
        box-shadow: 0 1px 0 #d8e0ec;
    }

    .table-sticky-header-viewport {
        box-sizing: border-box;
        position: fixed;
        top: 0;
        z-index: 940;
        overflow: hidden;
        margin: 0;
        border-bottom: 1px solid #d8e0ec;
        background: var(--table-header-background);
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
        isolation: isolate;
        pointer-events: none;
    }

    .table-sticky-header-viewport.is-visible {
        display: block;
    }

    .table-sticky-header {
        margin: 0;
        max-width: none;
        background: var(--table-header-background);
        transform-origin: left top;
    }

    .table-sticky-header thead,
    .table-sticky-header thead tr,
    .table-sticky-header thead th {
        background: var(--table-header-background);
    }

    .table-sticky-header.local-invoice-list-table.is-record-table thead th:first-child {
        position: static;
    }
}

.table.local-invoice-list-table {
    min-width: 0;
    table-layout: fixed;
}

.table.local-invoice-list-table th,
.table.local-invoice-list-table td {
    overflow: hidden;
    padding: 7px 6px;
    text-overflow: ellipsis;
}

.table.local-invoice-list-table th:nth-child(1) {
    width: 11%;
}

.table.local-invoice-list-table th:nth-child(2) {
    width: 20%;
}

.table.local-invoice-list-table th:nth-child(3) {
    width: 9%;
}

.table.local-invoice-list-table th:nth-child(4) {
    width: 11%;
}

.table.local-invoice-list-table th:nth-child(5) {
    width: 7%;
}

.table.local-invoice-list-table th:nth-child(6) {
    width: 13%;
}

.table.local-invoice-list-table th:nth-child(7) {
    width: 11%;
}

.table.local-invoice-list-table th:nth-child(8) {
    width: 18%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(1) {
    width: 4%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(2) {
    width: 10%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(3) {
    width: 18%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(4) {
    width: 8%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(5) {
    width: 10%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(6) {
    width: 7%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(7) {
    width: 12%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(8) {
    width: 11%;
}

.table.local-invoice-list-table.has-invoice-selection th:nth-child(9) {
    width: 20%;
}

.local-invoice-list-table .invoice-select-cell {
    overflow: visible;
    text-align: center;
    text-overflow: clip;
}

.local-invoice-list-table .invoice-select-cell input {
    width: auto;
    min-height: auto;
}

.local-invoice-list-table .invoice-select-cell input:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.invoice-bulk-checkbox-control,
.invoice-bulk-unavailable {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
}

.invoice-bulk-checkbox-control {
    cursor: pointer;
}

.invoice-bulk-unavailable.invoice-reminder-disabled-control {
    gap: 5px;
    width: 44px;
}

.invoice-bulk-unavailable > input {
    pointer-events: none;
}

.invoice-bulk-unavailable > .invoice-reminder-tooltip {
    right: auto;
    left: calc(100% + 8px);
    transform: translate(-4px, -50%);
}

.invoice-bulk-unavailable:hover > .invoice-reminder-tooltip,
.invoice-bulk-unavailable:focus-visible > .invoice-reminder-tooltip {
    transform: translate(0, -50%);
}

.invoice-bulk-disabled-text {
    display: none;
}

.local-invoice-list-table .table-sort-button {
    gap: 3px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 10px;
    white-space: nowrap;
}

.local-invoice-list-table th[data-sortable="false"] {
    font-size: 10px;
    text-align: center;
}

.local-invoice-list-table .invoice-reminder-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
}

.table.local-invoice-list-table td.action-cell {
    overflow: visible;
}

.local-invoice-list-table .invoice-reminder-actions > .inline-form {
    display: flex;
    width: 100%;
}

.invoice-reminder-disabled-control {
    display: inline-flex;
    position: relative;
    min-width: 0;
    width: 100%;
    cursor: help;
    outline: none;
}

.invoice-reminder-tooltip {
    position: absolute;
    z-index: 60;
    top: 50%;
    right: calc(100% + 8px);
    width: max-content;
    max-width: 280px;
    padding: 7px 9px;
    border-radius: 6px;
    background: #172033;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    transform: translate(4px, -50%);
    transition: opacity 120ms ease, transform 120ms ease;
    visibility: hidden;
    white-space: normal;
}

.invoice-reminder-disabled-control:hover,
.invoice-reminder-disabled-control:focus-visible {
    z-index: 61;
}

.invoice-reminder-disabled-control:hover > .invoice-reminder-tooltip,
.invoice-reminder-disabled-control:focus-visible > .invoice-reminder-tooltip {
    opacity: 1;
    transform: translate(0, -50%);
    visibility: visible;
}

.invoice-reminder-disabled-control:focus-visible {
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.invoice-reminder-disabled-control > .button {
    gap: 5px;
    width: 100%;
    pointer-events: none;
}

.invoice-reminder-disabled-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.local-invoice-list-table .invoice-reminder-actions .button {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 30px;
    overflow: hidden;
    padding: 4px 6px;
    color: #1f2937;
    font-size: 11px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.local-invoice-list-table .invoice-reminder-actions .button.is-disabled,
.local-invoice-list-table .invoice-reminder-actions .button:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
}

.table .risk-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table .status-stack {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 160px;
}

.customer-monthly-table {
    min-width: 2424px;
}

.customer-monthly-table .customer-select-cell {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
}

.customer-monthly-table .customer-select-cell input {
    width: auto;
    min-height: auto;
}

.customer-monthly-table .customer-company-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    background: #ffffff;
    box-shadow: 1px 0 0 #dfe6ef;
    white-space: normal;
}

.customer-monthly-table.has-customer-selection .customer-company-cell {
    left: 44px;
}

.customer-monthly-table thead .customer-company-cell {
    z-index: 4;
    background: #f3f6fa;
}

.customer-monthly-table tbody tr:nth-child(even):not(.is-selected) .customer-company-cell {
    background: #fbfdff;
}

.customer-monthly-table tbody tr:hover .customer-company-cell {
    background: #f8fafc;
}

.customer-monthly-table tbody tr.is-selected .customer-company-cell,
.customer-monthly-table tbody tr.is-selected:hover .customer-company-cell {
    background: #f1f7ff;
}

.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-india-no-gst:not(.is-selected) > td,
.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-india-no-gst:not(.is-selected) .customer-company-cell {
    background: #fff4bf;
}

.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-india-no-gst:not(.is-selected):hover > td,
.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-india-no-gst:not(.is-selected):hover .customer-company-cell {
    background: #ffec9f;
}

.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-other:not(.is-selected) > td,
.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-other:not(.is-selected) .customer-company-cell {
    background: #eef4ff;
}

.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-other:not(.is-selected):hover > td,
.table.is-record-table.customer-monthly-table tbody tr.is-no-recurring-invoice-other:not(.is-selected):hover .customer-company-cell {
    background: #e2ecff;
}

.customer-monthly-table .customer-person-cell {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.customer-monthly-table .customer-website-cell {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.customer-monthly-table .customer-website-cell .table-link {
    overflow-wrap: anywhere;
    white-space: normal;
}

.customer-monthly-table .customer-company-cell .entity-cell.is-stacked,
.customer-monthly-table .customer-company-cell .entity-title,
.customer-monthly-table .customer-company-cell .table-link,
.customer-monthly-table .customer-company-cell .entity-meta {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.customer-monthly-table .customer-company-cell .entity-cell.is-stacked {
    display: block;
}

.customer-monthly-table .customer-company-cell .entity-title {
    display: block;
    overflow: visible;
    white-space: normal;
}

.customer-monthly-table .customer-company-cell .table-link {
    display: inline;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
}

.customer-monthly-table .customer-company-cell .entity-meta {
    flex: 0 0 auto;
    white-space: nowrap;
}

.existing-invoice-list-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.existing-invoice-list-notice .button {
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .existing-invoice-list-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .existing-invoice-list-notice .button {
        justify-content: center;
        width: 100%;
    }
}

.customer-monthly-table .customer-outstanding-cell {
    min-width: 190px;
    vertical-align: top;
}

.customer-outstanding-summary,
.customer-recurring-summary {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.customer-recurring-summary {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.customer-recurring-amount-cell {
    min-width: 185px;
    vertical-align: middle;
}

.customer-monthly-table .payment-month-header {
    min-width: 210px;
    text-align: right;
}

.customer-monthly-table .payment-month-cell {
    position: relative;
    min-width: 210px;
    padding-right: 42px;
    text-align: right;
    vertical-align: top;
    white-space: normal;
}

.payment-month-column-form {
    display: inline-flex;
    align-items: end;
    gap: 8px;
    margin-left: auto;
}

.customer-bulk-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    border-top: 1px solid #e4e9f0;
    padding: 10px 12px;
}

.customer-select-all,
.customer-bulk-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.customer-bulk-field {
    flex: 0 1 210px;
}

.customer-select-all input {
    width: auto;
    min-height: auto;
}

.customer-selection-count {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.customer-bulk-toolbar button:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.payment-month-column-form label {
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.payment-month-column-form input {
    min-height: 34px;
    width: 130px;
    border: 1px solid #cbd6e2;
    border-radius: 7px;
    padding: 5px 8px;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

.payment-month-display {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 22px;
    overflow: hidden;
    white-space: nowrap;
}

.payment-month-amount {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.payment-month-amount.is-paid {
    color: #067647;
}

.payment-month-sources {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.payment-month-invoice-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 18px;
    white-space: nowrap;
}

.payment-month-more {
    color: #667085;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.payment-month-source,
.payment-month-remark {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    font-size: 11px;
    line-height: 1.2;
}

.payment-month-source {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #eef6ff;
    color: #175cd3;
    overflow-wrap: normal;
    padding: 1px 7px;
    white-space: nowrap;
    word-break: keep-all;
}

.payment-month-source.is-paid {
    background: #ecfdf3;
    color: #067647;
}

.payment-month-source.is-unpaid,
.payment-month-source.is-partial {
    background: #fffaeb;
    color: #b54708;
}

.payment-month-source.is-overdue {
    background: #fef3f2;
    color: #b42318;
}

.payment-month-source.is-draft {
    background: #f2f4f7;
    color: #667085;
}

a.payment-month-source {
    text-decoration: none;
}

a.payment-month-source:hover {
    border-color: #9bb7eb;
    background: #dbeafe;
}

a.payment-month-source.is-paid:hover {
    background: #d1fadf;
}

a.payment-month-source.is-unpaid:hover,
a.payment-month-source.is-partial:hover {
    background: #fef0c7;
}

a.payment-month-source.is-overdue:hover {
    background: #fee4e2;
}

a.payment-month-source.is-draft:hover {
    background: #e4e7ec;
}

.payment-month-remark {
    color: var(--muted);
    font-weight: 300;
}

.payment-month-remark-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    justify-self: end;
    max-width: 140px;
}

.payment-month-remark {
    max-width: 118px;
    overflow: hidden;
    text-align: right;
}

.payment-month-remark-date {
    flex: 0 0 auto;
    color: #94a3b8;
    font-weight: 500;
}

.payment-month-remark-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-month-remark-view {
    flex: 0 0 auto;
}

.payment-month-remark-view[open] {
    display: grid;
    flex-basis: 100%;
    justify-items: end;
}

.payment-month-remark-view summary {
    display: inline-grid;
    place-items: center;
    width: 20px;
    min-height: 20px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.payment-month-remark-view summary::-webkit-details-marker {
    display: none;
}

.payment-month-remark-view .role-action-icon {
    transform: scale(0.72);
}

.payment-month-remark-full {
    display: grid;
    gap: 2px;
    width: 140px;
    margin-top: 4px;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    background: #f8fafc;
    color: #475569;
    padding: 6px 7px;
    text-align: left;
    white-space: normal;
}

.payment-month-remark-full strong {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

.payment-month-editor {
    margin-top: 6px;
    text-align: left;
}

.payment-month-editor:not([open]) {
    margin-top: 0;
}

.payment-month-editor summary {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-grid;
    align-items: center;
    place-items: center;
    width: 28px;
    min-height: 24px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #ffffff;
    color: #175cd3;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.payment-month-editor[open] summary {
    border-color: #9bb7eb;
    background: #eef6ff;
}

.payment-month-editor summary::-webkit-details-marker {
    display: none;
}

.payment-month-editor form {
    display: grid;
    gap: 6px;
    margin-top: 6px;
    min-width: 150px;
}

.payment-month-editor label {
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.payment-month-editor input,
.payment-month-editor textarea {
    min-height: 30px;
    width: 100%;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    padding: 5px 7px;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
}

.payment-month-editor textarea {
    min-height: 48px;
    resize: vertical;
}

.payment-month-editor button {
    min-height: 30px;
    padding: 5px 9px;
    width: 100%;
}

.entity-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    max-width: 100%;
}

.entity-cell.is-stacked {
    display: grid;
    gap: 3px;
    min-width: 220px;
}

.entity-cell.is-stacked .entity-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.entity-title {
    color: var(--ink);
    font-weight: 400;
    white-space: nowrap;
}

.table-link {
    color: #175cd3;
    font-weight: 400;
    white-space: nowrap;
}

.table-link:hover,
.table-link:focus {
    text-decoration: underline;
}

.icon-link {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    background: #ffffff;
    color: #175cd3;
    font-weight: 600;
    text-decoration: none;
}

.icon-link:hover,
.icon-link:focus {
    border-color: #9fc0ff;
    background: #eef4ff;
    text-decoration: none;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #94a3b8;
}

.status-dot.green {
    border-color: #0e8f67;
    background: #18a878;
}

.status-dot.gray {
    background: #a8b2c0;
}

.entity-meta {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-meta.mobile-record-only {
    display: none;
}

.reference-cell {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.sync-check-icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid #bfe5d6;
    border-radius: 999px;
    background: #eaf7f1;
    color: var(--green);
    font-size: 11px;
    line-height: 1;
}

.sync-check-icon::before {
    width: 6px;
    height: 3px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    content: "";
    transform: rotate(-45deg) translate(1px, -1px);
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c7d7fe;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    min-height: 22px;
    padding: 2px 7px;
    white-space: nowrap;
}

.badge.green {
    border-color: #bfe5d6;
    background: #eaf7f1;
    color: var(--green);
}

.badge.amber {
    border-color: #f3d19b;
    background: #fff4df;
    color: var(--amber);
}

.badge.red {
    border-color: #f7b7b0;
    background: #fff0ee;
    color: var(--red);
}

.badge.gray {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #475569;
}

.pagination-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    border: 0;
    background: #ffffff;
    padding: 8px 10px;
}

.content > section.panel.content-width-full:has(.table-wrap):has(> .pagination-footer) {
    overflow: visible;
}

.content > section.panel.content-width-full:has(.table-wrap) > .pagination-footer {
    width: calc(100% + 2px);
    margin: 0 -1px -1px;
}

.pagination-controls {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.pagination-button {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid #d8dee8;
    border-left-width: 0;
    background: #ffffff;
    color: #175cd3;
    font-size: 13px;
    font-weight: 400;
    padding: 0 10px;
}

.pagination-button:first-child {
    border-left-width: 1px;
    border-radius: 4px 0 0 4px;
}

.pagination-button:last-child {
    border-radius: 0 4px 4px 0;
}

.pagination-button:hover,
.pagination-button:focus {
    background: #edf4ff;
    text-decoration: none;
}

.pagination-button.active {
    z-index: 1;
    border-color: #8bb8ff;
    background: #edf4ff;
    box-shadow: inset 0 0 0 1px #60a5fa;
    color: #175cd3;
}

.pagination-button.disabled {
    color: #a8b2c0;
    cursor: default;
    pointer-events: none;
}

.pagination-page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin: 0;
    color: #475569;
    font-size: 13px;
}

.pagination-page-size select {
    width: auto;
    min-width: 90px;
    margin-top: 0;
    background: #eef1f5;
}

.pagination-summary {
    margin-left: 0;
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

.badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.progress-meter {
    display: grid;
    gap: 5px;
    min-width: 120px;
}

.progress-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf2;
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.tab {
    border: 1px solid transparent;
    border-bottom: 0;
    color: #334155;
    padding: 8px 10px;
}

.tab.active {
    border-color: var(--line);
    border-radius: 6px 6px 0 0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
}

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

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

.project-tab-list label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
}

.placeholder-form .project-tab-list label.tab:not(.check-row):not(.toggle-row):not(.install-checkbox):not(.setting-field-row),
.placeholder-form form .project-tab-list label.tab:not(.check-row):not(.toggle-row):not(.install-checkbox):not(.setting-field-row) {
    font-size: 13px;
}

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

.project-quick-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 7px;
    margin-bottom: 16px;
    padding: 0 2px;
    color: #526173;
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
}

.project-quick-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.project-quick-summary-item > span {
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

.project-quick-summary-item > .project-quick-summary-value {
    min-width: 0;
    color: #344054;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.project-assignment-form {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 5px;
    width: auto;
    max-width: 100%;
}

.project-assignment-form select {
    width: 220px;
    min-width: 0;
    max-width: min(220px, 45vw);
    min-height: 32px;
    padding: 5px 30px 5px 9px;
    font-size: 12px;
}

.project-assignment-form button {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.project-quick-summary-separator {
    color: #a7b0bd;
    font-weight: 400;
}

#project-form-overview:checked ~ .project-tab-list label[for="project-form-overview"],
#project-form-strategy:checked ~ .project-tab-list label[for="project-form-strategy"],
#project-form-agreement:checked ~ .project-tab-list label[for="project-form-agreement"],
#project-detail-overview:checked ~ .project-tab-list label[for="project-detail-overview"],
#project-detail-strategy:checked ~ .project-tab-list label[for="project-detail-strategy"],
#project-detail-ai:checked ~ .project-tab-list label[for="project-detail-ai"],
#project-detail-agreement:checked ~ .project-tab-list label[for="project-detail-agreement"],
#project-detail-updates:checked ~ .project-tab-list label[for="project-detail-updates"] {
    border-color: #b8caf6;
    border-radius: 6px 6px 0 0;
    background: #eef4ff;
    color: var(--blue);
    font-weight: 700;
}

#project-form-overview:checked ~ .project-tab-panels .project-overview-tab,
#project-form-strategy:checked ~ .project-tab-panels .project-strategy-tab,
#project-form-agreement:checked ~ .project-tab-panels .project-agreement-tab,
#project-detail-overview:checked ~ .project-tab-panels .project-overview-tab,
#project-detail-strategy:checked ~ .project-tab-panels .project-strategy-tab,
#project-detail-ai:checked ~ .project-tab-panels .project-ai-tab,
#project-detail-agreement:checked ~ .project-tab-panels .project-agreement-tab,
#project-detail-updates:checked ~ .project-tab-panels .project-updates-tab {
    display: block;
}

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

.agreement-form-block {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f6;
}

.agreement-editor,
.agreement-audience-section,
.agreement-editor-section {
    min-width: 0;
}

#project-form-agreement:checked ~ .project-tab-panels .agreement-editor {
    display: grid;
    gap: 14px;
}

.agreement-audience-section,
.agreement-editor-section {
    display: grid;
    gap: 12px;
    border: 1px solid #dbe3ed;
    border-radius: 9px;
    background: #ffffff;
    padding: 13px;
}

.agreement-internal-section {
    background: #f8fafc;
}

.agreement-shared-section {
    border-color: #bcded2;
    background: #fbfefc;
}

.agreement-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.agreement-section-header h3,
.agreement-section-header p,
.agreement-form-heading h4,
.agreement-internal-notes-card h4 {
    margin: 0;
}

.agreement-section-header h3 {
    color: #172033;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
}

.agreement-section-header p {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.agreement-section-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #527064;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.agreement-section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.agreement-visibility-link {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 12px;
}

.agreement-internal-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    background: #ffffff;
}

.agreement-internal-summary > div {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    border-left: 1px solid #edf1f6;
    padding: 9px 10px;
}

.agreement-internal-summary > div:first-child {
    border-left: 0;
}

.agreement-internal-summary span,
.agreement-shared-status > span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.agreement-internal-summary strong,
.agreement-shared-status strong {
    color: #172033;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.agreement-internal-notes-card {
    gap: 8px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.agreement-internal-notes-card h4,
.agreement-form-heading h4 {
    color: #26364d;
    font-size: 13px;
    font-weight: 650;
}

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

.agreement-internal-notes-grid p {
    display: grid;
    grid-template-columns: minmax(115px, .45fr) minmax(0, 1fr);
    gap: 8px;
    border-top: 1px solid #edf1f6;
    padding: 7px 0;
}

.agreement-internal-notes-grid p:nth-child(-n + 2) {
    border-top: 0;
}

.agreement-internal-notes-grid strong,
.agreement-internal-notes-grid span {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    overflow-wrap: anywhere;
}

.agreement-internal-notes-grid span {
    color: #172033;
    font-weight: 400;
}

.agreement-shared-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dbe8e3;
    border-radius: 7px;
    background: #ffffff;
    padding: 8px 10px;
}

.agreement-internal-form-grid {
    align-items: start;
}

.agreement-visibility-control {
    scroll-margin-top: 120px;
}

.placeholder-form label.agreement-visibility-toggle,
.placeholder-form form label.agreement-visibility-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
    cursor: pointer;
}

.agreement-visibility-toggle:has(input:checked) {
    border-color: #75c8aa;
    background: #eefaf5;
}

.agreement-visibility-toggle input {
    width: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--green);
}

.agreement-visibility-toggle strong,
.agreement-visibility-toggle small {
    display: block;
    text-transform: none;
}

.agreement-visibility-toggle strong {
    color: #172033;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

.agreement-visibility-toggle small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.agreement-terms-editor-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
}

.agreement-form-block:last-of-type {
    border-bottom: 0;
}

.agreement-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.agreement-form-heading h3 {
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.agreement-form-heading h4 {
    margin: 0;
}

.agreement-form-note {
    color: #64748b;
    font-size: 12px;
}

.agreement-choice-section {
    display: grid;
    gap: 8px;
    align-content: start;
}

.agreement-choice-grid,
.agreement-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.grid.three.agreement-frequency-grid {
    align-items: stretch;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agreement-frequency-grid .agreement-choice-section {
    border-left: 1px solid #e4e9f0;
    padding-left: 18px;
}

.agreement-frequency-grid .agreement-choice-section:first-child {
    border-left: 0;
    padding-left: 0;
    padding-right: 18px;
}

.agreement-frequency-grid .agreement-choice-section:not(:first-child):not(:last-child) {
    padding-right: 18px;
}

.placeholder-form label.agreement-choice-card,
.placeholder-form form label.agreement-choice-card {
    font-size: 13px;
}

.agreement-choice-card {
    display: grid;
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 58px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
}

.agreement-choice-card.compact {
    min-height: 58px;
}

.agreement-choice-card:has(input:checked) {
    border-color: #8bd7bd;
    background: #f0fbf6;
}

.agreement-choice-card input {
    width: 16px;
    min-height: 16px;
    margin-top: 2px;
    accent-color: var(--green);
}

.agreement-choice-card strong {
    display: block;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.agreement-choice-card small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.agreement-channel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.agreement-option-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.agreement-frequency-grid .agreement-option-row {
    gap: 6px 10px;
}

.agreement-frequency-grid .agreement-choice-card.compact {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    padding: 7px 8px;
}

.agreement-frequency-grid .agreement-choice-card.compact:has(input:checked) {
    border-color: transparent;
    background: #f0fbf6;
}

.agreement-terms-textarea {
    min-height: 220px;
}

.agreement-detail-view {
    gap: 14px;
}

#project-detail-agreement:checked ~ .project-tab-panels .agreement-detail-view,
#project-detail-overview:checked ~ .project-tab-panels .project-details-tab,
#project-detail-updates:checked ~ .project-tab-panels .project-updates-tab {
    display: grid;
}

.project-details-tab {
    gap: 12px;
}

.project-details-tab .record-summary-list-grid {
    background: #fbfcfe;
}

.agreement-priority-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
    overflow: hidden;
    border: 1px solid #d9e2ef;
    border-left: 4px solid var(--green);
    border-radius: 8px;
    background: #ffffff;
}

.agreement-summary-main,
.agreement-summary-item {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    border-left: 1px solid #edf1f6;
    padding: 12px;
}

.agreement-summary-main {
    border-left: 0;
    background: #f7fcfa;
}

.agreement-eyebrow,
.agreement-summary-item > span,
.agreement-priority-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.agreement-summary-main strong {
    color: #172033;
    font-size: 18px;
    line-height: 1.2;
}

.agreement-summary-main > span:last-child,
.agreement-summary-item strong {
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
}

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

.agreement-priority-card,
.agreement-secondary-card,
.agreement-terms-card {
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #ffffff;
}

.agreement-priority-card {
    border-top: 3px solid var(--green);
}

.agreement-support-card {
    border-top-color: #f59e0b;
}

.agreement-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.agreement-card-head h3,
.agreement-secondary-card h3,
.agreement-terms-card h3 {
    margin: 0;
}

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

.agreement-metric {
    display: grid;
    gap: 5px;
    min-height: 0;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fbfdff;
    padding: 8px;
}

.agreement-metric span {
    color: #172033;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.agreement-support-summary {
    display: grid;
    gap: 8px;
}

.agreement-support-summary p,
.agreement-secondary-card p {
    display: grid;
    gap: 4px;
    border-top: 1px solid #edf1f6;
    padding-top: 8px;
}

.agreement-support-summary p:first-child,
.agreement-secondary-card p:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.agreement-followup-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
}

.agreement-terms-card p {
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.agreement-detail-view .detail-card strong,
.agreement-detail-view .agreement-terms-card strong {
    letter-spacing: 0;
    text-transform: none;
}

.agreement-terms-card p + p {
    margin-top: 7px;
}

.agreement-terms-card p strong {
    color: #334f75;
    font-weight: 650;
}

.project-detail-panel .strategy-status-bar strong,
.project-detail-panel .strategy-review-heading,
.project-detail-panel .strategy-review-label,
.project-detail-panel .agreement-summary-item > span,
.project-detail-panel .agreement-priority-label,
.project-detail-panel .agreement-metric strong,
.project-detail-panel .agreement-support-summary strong,
.project-detail-panel .agreement-secondary-card p strong,
.project-updates-tab .project-activity-item strong {
    font-weight: 600;
}

.project-detail-panel .strategy-review-grid-read p,
.project-detail-panel .detail-card p,
.project-detail-panel .agreement-support-summary span,
.project-detail-panel .agreement-secondary-card p span,
.project-detail-panel .agreement-terms-card p,
.project-updates-tab .project-activity-item p {
    color: #172033;
    font-weight: 400;
}

.project-detail-panel .agreement-metric span {
    font-weight: 600;
}

.project-updates-tab {
    gap: 16px;
}

.project-updates-tab .project-update-composer {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .agreement-priority-layout,
    .agreement-followup-grid {
        grid-template-columns: 1fr;
    }

    .agreement-channel-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .agreement-internal-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .agreement-internal-summary > div:nth-child(4) {
        border-left: 0;
        border-top: 1px solid #edf1f6;
    }

    .agreement-internal-summary > div:nth-child(n + 5) {
        border-top: 1px solid #edf1f6;
    }

    .agreement-terms-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .grid.three.agreement-frequency-grid,
    .agreement-priority-summary,
    .agreement-metric-grid,
    .agreement-channel-grid,
    .agreement-option-row {
        grid-template-columns: 1fr;
    }

    .agreement-summary-item {
        border-top: 1px solid #edf1f6;
        border-left: 0;
    }

    .agreement-frequency-grid .agreement-choice-section {
        border-top: 1px solid #e4e9f0;
        border-left: 0;
        padding: 12px 0 0;
    }

    .agreement-frequency-grid .agreement-choice-section:first-child {
        border-top: 0;
        padding-top: 0;
        padding-right: 0;
    }

    .agreement-card-head {
        display: grid;
    }

    .agreement-section-header,
    .agreement-shared-status {
        align-items: flex-start;
        display: grid;
    }

    .agreement-section-actions {
        justify-content: flex-start;
    }

    .agreement-internal-summary,
    .agreement-internal-notes-grid {
        grid-template-columns: 1fr;
    }

    .agreement-internal-summary > div,
    .agreement-internal-summary > div:first-child,
    .agreement-internal-summary > div:nth-child(4),
    .agreement-internal-summary > div:nth-child(n + 5),
    .agreement-internal-notes-grid p,
    .agreement-internal-notes-grid p:nth-child(-n + 2) {
        border-top: 1px solid #edf1f6;
        border-left: 0;
    }

    .agreement-internal-summary > div:first-child,
    .agreement-internal-notes-grid p:first-child {
        border-top: 0;
    }

    .agreement-internal-notes-grid p {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.settings-page-shell {
    --settings-page-width: 1180px;
    --settings-reading-width: 920px;
    --settings-detail-width: 1120px;
    width: min(100%, var(--settings-page-width));
    justify-self: start;
}

.content:has(> .settings-page-shell) > .page-title-strip {
    margin-top: 4px;
    margin-bottom: 10px;
}

.content:has(> .settings-page-shell) > .page-title-strip h1 {
    color: #101828;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.settings-page-shell > .section-head,
.settings-page-shell > .settings-workspace {
    width: 100%;
}

.settings-page-shell > .section-head {
    align-items: flex-start;
    margin-bottom: 16px;
}

.settings-page-shell > .section-head .eyebrow {
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.settings-page-shell > .section-head h1 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.settings-page-shell > .notice,
.settings-page-shell > .error-list,
.settings-page-shell > section.panel,
.settings-workspace-content > .notice,
.settings-workspace-content > .error-list,
.settings-workspace-content > section.panel {
    width: min(100%, var(--settings-reading-width));
}

.settings-page-shell > .module-summary,
.settings-page-shell > .setting-detail-grid,
.settings-page-shell > .backup-history-grid,
.settings-workspace-content > .module-summary,
.settings-workspace-content > .setting-detail-grid,
.settings-workspace-content > .backup-history-grid {
    width: min(100%, var(--settings-detail-width));
}

.settings-page-shell > .settings-page-footer,
.settings-workspace-content > .settings-page-footer {
    width: min(100%, var(--settings-reading-width));
}

.settings-workspace {
    display: grid;
    align-items: start;
    gap: 18px;
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
}

.settings-workspace-content {
    display: grid;
    justify-items: start;
    min-width: 0;
}

.settings-navigation {
    position: sticky;
    top: 112px;
    z-index: 8;
    align-self: start;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.settings-nav-heading {
    display: grid;
    gap: 3px;
    margin: 0 10px;
    border-bottom: 1px solid var(--line);
    padding: 14px 8px 11px;
}

.settings-nav-heading span {
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.settings-nav-heading strong {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.settings-tree {
    display: grid;
    gap: 2px;
    padding: 8px;
}

.settings-nav-group {
    display: grid;
    min-width: 0;
}

.settings-nav-parent,
.settings-nav-child {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
}

.settings-nav-parent {
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 7px 12px;
    white-space: nowrap;
}

.settings-nav-parent > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-nav-parent:hover,
.settings-nav-parent:focus-visible {
    border-color: #dce7e3;
    background: #f7fbf9;
    color: var(--green);
}

.settings-nav-parent.active {
    border-color: #b7d9ce;
    background: #edf8f4;
    color: var(--green);
    font-weight: 600;
}

.settings-nav-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.75;
    transform: rotate(-45deg);
}

.settings-nav-group.is-open .settings-nav-chevron {
    transform: rotate(45deg) translate(-1px, -1px);
}

.settings-nav-children {
    display: grid;
    min-width: 0;
    gap: 2px;
    margin: 2px 8px 6px 20px;
    border-left: 1px solid #dce7e3;
    padding-left: 9px;
}

.settings-nav-child {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    white-space: nowrap;
}

.settings-nav-child:hover,
.settings-nav-child:focus-visible {
    border-color: #dce7e3;
    background: #f7fbf9;
    color: var(--green);
}

.settings-nav-child.active {
    border-color: #b7d9ce;
    background: #edf8f4;
    color: var(--green);
    font-weight: 600;
}

.settings-workspace-content > .panel,
.settings-workspace-content > form.panel,
.settings-workspace-content > .setting-detail-grid > .panel {
    padding: 16px;
}

.settings-workspace-content .panel-title h2 {
    color: #101828;
    font-weight: 500;
}

.settings-workspace-content .settings-field-label label {
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

.settings-workspace-content input,
.settings-workspace-content select,
.settings-workspace-content textarea {
    min-height: 36px;
    border-color: #d1d5dd;
    background: #ffffff;
}

.settings-workspace-content > .settings-primary-area,
.settings-workspace-content > .settings-primary-action {
    order: -100;
}

.setting-detail-grid > .settings-primary-action {
    order: -100;
}

.settings-detail-summary {
    grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
    justify-content: start;
}

.settings-detail-summary .summary-card {
    position: relative;
    width: 100%;
    max-width: 180px;
    padding-right: 30px;
}

.setting-detail-grid p,
.setting-field-row span {
    overflow-wrap: anywhere;
}

.setting-detail-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    justify-content: start;
}

.setting-detail-grid > * {
    width: 100%;
    max-width: 520px;
}

.setting-detail-grid .panel {
    width: 100%;
    max-width: 520px;
    margin-bottom: 0;
}

.setting-field-list {
    display: grid;
    gap: 10px;
}

.settings-local-form {
    width: min(100%, 860px);
}

.settings-local-form--wide {
    width: min(100%, 1040px);
}

.settings-local-form--support {
    max-width: 1040px;
}

.settings-local-form--support .setting-field-list {
    align-items: start;
    gap: 14px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-local-form--support .setting-field-row {
    align-content: start;
    min-width: 0;
}

.settings-local-form--support .setting-field-row em {
    min-height: 34px;
}

.settings-local-form--support .settings-actions {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.setting-field-row {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.settings-field-label,
.settings-title-with-help {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.settings-field-label label {
    color: #334155;
    font-weight: 500;
}

.settings-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.settings-help-trigger,
.settings-page-shell .settings-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    min-height: 20px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    cursor: help;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

.settings-help-trigger:hover,
.settings-help-trigger:focus-visible {
    border-color: #8bcbb5;
    background: #eef9f5;
    color: #087a5b;
}

.settings-help-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: -8px;
    z-index: 40;
    width: 290px;
    max-width: calc(100vw - 64px);
    border-radius: 7px;
    background: #17202a;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0;
    padding: 9px 10px;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    visibility: hidden;
}

.settings-help-tooltip code {
    color: #d8f3e8;
}

.settings-help:hover > .settings-help-tooltip,
.settings-help:focus-within > .settings-help-tooltip {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.settings-summary-help {
    position: absolute;
    top: 8px;
    right: 8px;
}

.settings-summary-help .settings-help-tooltip {
    right: -8px;
    left: auto;
}

.settings-field-group-heading {
    margin-top: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 7px;
}

.settings-field-group-heading:first-child {
    margin-top: 0;
}

.settings-field-group-heading h3 {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
}

.settings-local-form textarea {
    min-height: 128px;
    resize: vertical;
}

.settings-page-footer {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    border-top: 1px solid #dbe3ec;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 2px 2px;
}

.settings-page-footer > strong {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.settings-page-footer-copy {
    display: grid;
    gap: 4px;
}

.settings-page-footer p {
    margin: 0;
    color: inherit;
}

.settings-page-footer code {
    color: #475569;
    font-size: inherit;
}

.settings-local-form > .settings-actions {
    position: sticky;
    bottom: -10px;
    z-index: 3;
    justify-content: flex-end;
    margin: 14px -12px -10px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 12px;
    backdrop-filter: blur(6px);
}

.setting-field-row small {
    color: var(--muted);
    font-weight: 500;
}

.setting-field-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    overflow-wrap: anywhere;
}

.setting-field-row input,
.setting-field-row select {
    margin-top: 0;
}

.setting-saved-value {
    color: var(--green);
    font-size: 12px;
    font-weight: 500;
}

.settings-link-list,
.settings-copy-list {
    display: grid;
    gap: 10px;
}

.settings-link-list {
    grid-template-columns: repeat(2, minmax(0, max-content));
    margin-bottom: 14px;
}

.settings-copy-row {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 7px;
    background: #f8fafc;
    padding: 10px;
}

.settings-copy-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.settings-copy-row code {
    display: block;
    color: #1f2937;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.settings-note {
    margin-top: 12px;
}

.settings-actions {
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.settings-actions > form {
    width: auto;
    margin: 0;
}

.backup-schedule-grid {
    display: grid;
    align-items: start;
    gap: 14px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backup-schedule-actions {
    grid-column: 1 / -1;
    margin-top: 0;
}

.backup-history-grid {
    display: grid;
    align-items: start;
    gap: 12px;
    grid-template-columns: 1fr;
}

.backup-history-panel {
    min-width: 0;
}

.backup-history-table {
    min-width: 860px;
}

.backup-history-table td {
    vertical-align: top;
}

.backup-history-table td:nth-child(3) strong,
.backup-history-table td:nth-child(3) .field-note,
.backup-history-table td:nth-child(2) .field-note {
    display: block;
    white-space: normal;
}

.backup-download-link {
    margin-top: 6px;
}

.backup-restore-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 190px;
}

.backup-restore-form input {
    width: 86px;
    min-height: 30px;
    margin: 0;
    text-transform: uppercase;
}

.smtp-test-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
}

.smtp-test-form label {
    display: grid;
    gap: 4px;
    min-width: min(260px, 100%);
    margin: 0;
}

.smtp-test-form span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.smtp-test-form input {
    margin: 0;
}

.permission-fieldset {
    min-width: 0;
    margin: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    padding: 12px;
}

.permission-fieldset legend {
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
}

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

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 500;
}

.check-row input {
    width: 16px;
    min-height: 16px;
    margin: 0;
}

.team-edit-list,
.company-access-list,
.role-matrix {
    display: grid;
    gap: 16px;
}

.team-edit-card,
.company-access-card,
.role-card {
    display: grid;
    gap: 14px;
}

.team-user-filters {
    margin-bottom: 10px;
}

.team-create-form > .permission-fieldset {
    align-self: start;
}

.team-profile-header,
.linked-customer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.team-profile-header h3,
.team-profile-header p {
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-profile-badges {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.team-linked-meta {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.linked-customer-list {
    display: grid;
    gap: 12px;
}

.linked-customer-block {
    display: grid;
    gap: 10px;
    min-width: 0;
    border-top: 1px solid #e4e9f0;
    padding-top: 12px;
}

.linked-customer-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.linked-customer-head strong,
.linked-customer-head span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.linked-customer-head strong {
    color: #263241;
    font-size: 13px;
    font-weight: 600;
}

.linked-customer-head span {
    color: var(--muted);
    font-size: 12px;
}

.role-table {
    min-width: 920px;
}

.role-table code {
    border-radius: 5px;
    background: #f4f6f9;
    color: #475569;
    font-size: 12px;
    padding: 3px 6px;
}

.role-table .role-description-cell {
    max-width: 440px;
    color: var(--muted);
    line-height: 1.4;
    white-space: normal;
}

.role-action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.role-icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    min-height: 32px;
    border-radius: 6px;
    background: #ffffff;
    padding: 0;
}

.role-icon-button.is-view {
    border-color: #00a67e;
    color: #008f70;
}

.role-icon-button.is-edit {
    border-color: #f59e0b;
    color: #b45309;
}

.role-icon-button.is-delete {
    border-color: #ef4444;
    color: #dc2626;
}

.role-icon-button:hover,
.role-icon-button:focus {
    background: #f8fafc;
    box-shadow: 0 0 0 3px rgba(36, 91, 214, 0.12);
}

.role-action-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
}

.role-action-icon::before,
.role-action-icon::after {
    position: absolute;
    content: "";
}

.role-action-icon-view::before {
    inset: 4px 1px;
    border: 1.5px solid currentColor;
    border-radius: 999px / 70%;
}

.role-action-icon-view::after {
    top: 7px;
    left: 7px;
    width: 4px;
    height: 4px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    background: currentColor;
}

.role-action-icon-edit::before {
    top: 3px;
    left: 8px;
    width: 4px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
}

.role-action-icon-edit::after {
    right: 2px;
    bottom: 2px;
    width: 9px;
    height: 1.5px;
    background: currentColor;
}

.role-action-icon-delete::before {
    top: 6px;
    left: 4px;
    width: 10px;
    height: 9px;
    border: 1.5px solid currentColor;
    border-top: 0;
    border-radius: 0 0 2px 2px;
}

.role-action-icon-delete::after {
    top: 3px;
    left: 3px;
    width: 12px;
    height: 1.5px;
    border-top: 1.5px solid currentColor;
    box-shadow: 4px -2px 0 -0.5px currentColor;
}

body.has-role-modal {
    overflow: hidden;
}

.role-modal[hidden] {
    display: none;
}

.role-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 28px 24px;
}

.role-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}

.role-modal-window {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1120px, calc(100vw - 48px));
    max-height: calc(100vh - 56px);
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.3);
    overflow: hidden;
}

.role-modal-header,
.role-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e4e9f0;
    padding: 12px 16px;
}

.role-modal-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.role-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #e4e9f0;
    border-bottom: 0;
    background: #f8fafc;
}

.role-modal-close {
    position: relative;
    width: 34px;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: #1f2937;
    padding: 0;
}

.role-modal-close::before,
.role-modal-close::after {
    position: absolute;
    top: 16px;
    left: 9px;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.role-modal-close::before {
    transform: rotate(45deg);
}

.role-modal-close::after {
    transform: rotate(-45deg);
}

.role-modal-close:hover,
.role-modal-close:focus {
    background: #eef1f5;
    box-shadow: none;
}

.role-modal-body {
    display: grid;
    gap: 8px;
    overflow: auto;
    padding: 14px 16px 18px;
}

.twilio-invoice-modal-window {
    width: min(820px, calc(100vw - 48px));
}

.twilio-invoice-modal-body {
    gap: 16px;
}

.twilio-preview-status,
.twilio-queue-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.twilio-preview-status h3,
.twilio-approved-preview h3,
.twilio-consent-capture h3,
.twilio-template-option h3 {
    margin: 2px 0 0;
    font-size: 15px;
}

.twilio-preview-facts {
    margin: 0;
}

.twilio-template-preview {
    margin: 10px 0 0;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #f8fafc;
    color: #1f2937;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.55;
    padding: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.twilio-approved-preview,
.twilio-consent-capture,
.twilio-queue-confirmation {
    border-top: 1px solid #e4e9f0;
    padding-top: 16px;
}

.twilio-consent-capture .setting-field-list {
    margin-top: 12px;
}

.twilio-queue-confirmation {
    align-items: flex-end;
}

.twilio-queue-confirmation p {
    margin: 0;
    max-width: 560px;
}

.twilio-template-manager-grid {
    align-items: start;
}

.twilio-scheduled-payment-reminder-panel {
    min-width: 0;
    grid-column: 1 / -1;
}

.twilio-template-option {
    margin-top: 12px;
}

.settings-copy-list code {
    display: inline-block;
    margin: 0 6px 6px 0;
}

.twilio-worker-recovery-panel,
.twilio-evidence-layout,
.twilio-evidence-main,
.twilio-evidence-rail,
.twilio-event-copy {
    min-width: 0;
}

.twilio-worker-health-summary {
    margin: 14px 0;
}

.twilio-worker-recovery-grid {
    align-items: start;
}

.twilio-evidence-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.twilio-evidence-facts > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #ffffff;
}

.twilio-evidence-facts dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.twilio-evidence-facts dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.twilio-operator-runbook {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e4e9f0;
}

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

.twilio-command-list .settings-copy-row {
    min-width: 0;
    align-content: start;
}

.twilio-command-list code,
.twilio-command-list small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.twilio-process-command-row {
    border-color: #f0c36a;
    background: #fffaf0;
}

.twilio-evidence-page-head {
    align-items: flex-start;
}

.twilio-evidence-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.twilio-evidence-main,
.twilio-evidence-rail {
    display: grid;
    gap: 18px;
}

.twilio-evidence-facts-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.twilio-event-timeline {
    display: grid;
    gap: 0;
    margin-top: 14px;
}

.twilio-event-entry {
    position: relative;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 18px;
}

.twilio-event-entry:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: -2px;
    left: 7px;
    width: 2px;
    background: #dbe4ee;
}

.twilio-event-marker {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px #b8c7d9;
}

.twilio-event-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 14px;
}

.twilio-event-head time {
    color: var(--muted);
    font-size: 12px;
}

.twilio-event-copy p {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .twilio-invoice-modal {
        padding: 12px;
    }

    .twilio-invoice-modal-window {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .twilio-preview-status,
    .twilio-queue-confirmation {
        align-items: stretch;
        flex-direction: column;
    }

    .twilio-queue-confirmation form,
    .twilio-queue-confirmation button {
        width: 100%;
    }

    .twilio-invoice-action-trigger {
        white-space: normal;
    }

    .twilio-service-update-panel .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .twilio-service-update-action-trigger {
        justify-content: center;
        width: 100%;
        white-space: normal;
    }

    .twilio-command-list,
    .twilio-evidence-layout,
    .twilio-evidence-facts,
    .twilio-evidence-facts-wide {
        grid-template-columns: minmax(0, 1fr);
    }

    .twilio-evidence-page-head .button-row,
    .twilio-evidence-page-head .button {
        width: 100%;
    }

    .twilio-evidence-page-head .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .twilio-command-list .settings-copy-row,
    .twilio-command-list button {
        width: 100%;
    }
}

body.has-my-task-modal {
    overflow: hidden;
}

.my-task-modal[hidden] {
    display: none;
}

.my-task-modal {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: grid;
    align-items: start;
    justify-items: end;
    padding: 72px 24px 24px;
}

.my-task-backdrop {
    position: absolute;
    inset: 0;
    background: #17202ab3;
}

.my-task-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(23, 32, 42, 0.18);
}

.my-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #374151;
    background: #4b5563;
    padding: 12px 14px 10px;
}

.my-task-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

.my-task-header span {
    display: block;
    margin-top: 2px;
    color: #d1d5db;
    font-size: 11px;
    font-weight: 400;
}

.my-task-close {
    position: relative;
    flex: 0 0 32px;
    width: 32px;
    min-height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0;
}

.my-task-close::before,
.my-task-close::after {
    position: absolute;
    top: 14px;
    left: 8px;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.my-task-close::before {
    transform: rotate(45deg);
}

.my-task-close::after {
    transform: rotate(-45deg);
}

.my-task-close:hover,
.my-task-close:focus {
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.my-task-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-bottom: 1px solid #e6ebf2;
    background: #ffffff;
    padding: 10px 12px;
}

.my-task-tabs button {
    justify-content: center;
    width: auto;
    min-height: 30px;
    border: 1px solid #d9dee7;
    border-radius: 7px;
    background: #f8fafc;
    color: #334155;
    padding: 5px 9px;
    font-size: 12px;
}

.my-task-tabs button span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #e8edf4;
    color: #334155;
    font-size: 11px;
}

.my-task-tabs button.is-active {
    border-color: #bfe5d6;
    background: #e8f5ef;
    color: var(--green);
}

.my-task-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(124px, 152px) auto;
    align-items: end;
    gap: 8px;
    border-bottom: 1px solid #e6ebf2;
    background: #f9fafb;
    padding: 10px 12px 12px;
}

.my-task-form label {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.my-task-form input,
.my-task-form select {
    min-height: 34px;
    width: 100%;
    border-color: #cbd5e1;
    background: #ffffff;
    color: var(--ink);
    padding: 7px 9px;
}

.my-task-form input::placeholder {
    color: #64748b;
}

.my-task-form input:focus,
.my-task-form select:focus {
    border-color: rgba(18, 118, 83, 0.72);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(18, 118, 83, 0.22);
}

.my-task-form button {
    justify-content: center;
    width: auto;
    min-height: 34px;
    border-color: #0f766e;
    background: #0f766e;
    color: #ecfeff;
    padding: 7px 11px;
}

.my-task-form button:hover,
.my-task-form button:focus {
    border-color: #14b8a6;
    background: #0d9488;
}

.my-task-error {
    margin: 0;
    border-bottom: 1px solid #f5beb7;
    background: #fff0ee;
    color: var(--red);
    font-size: 12px;
    padding: 8px 12px;
}

.my-task-list {
    display: grid;
    flex: 1 1 auto;
    align-content: start;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
}

.my-task-empty {
    margin: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    padding: 14px;
    text-align: center;
}

.my-task-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    padding: 8px;
}

.my-task-row:nth-child(odd) {
    background: #ffffff;
}

.my-task-row:nth-child(even) {
    background: #f7f8fa;
}

.my-task-row + .my-task-row {
    margin-top: 6px;
}

.my-task-row:hover,
.my-task-row:focus-within {
    border-color: #cbd5e1;
    background: #eef4ff;
}

.my-task-check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.my-task-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #22c55e;
}

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

.my-task-title {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.my-task-details {
    display: block;
    margin-top: 3px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.my-task-source-link {
    display: inline-flex;
    margin-top: 5px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.my-task-source-link:hover,
.my-task-source-link:focus {
    text-decoration: underline;
}

.my-task-date {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
}

.my-task-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    color: #687386;
    font-size: 10px;
    line-height: 1.3;
}

.my-task-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-task-meta-creator {
    display: block;
}

.my-task-assignee-chip {
    display: block;
    max-width: 138px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff1f2;
    color: #b42318;
    padding: 1px 7px;
    text-align: right;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
}

.my-task-row.is-closed .my-task-title {
    color: #687386;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.my-task-row.is-loading {
    opacity: 0.58;
    pointer-events: none;
}

.my-task-reminder {
    position: fixed;
    top: var(--my-task-reminder-top, 58px);
    left: var(--my-task-reminder-left, 0);
    right: auto;
    bottom: auto;
    z-index: 940;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: start;
    gap: 4px;
    width: min(168px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    border: 1px solid rgba(18, 118, 83, 0.38);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-soft) 100%);
    color: #e8f5ef;
    padding: 6px 7px 6px 9px;
    text-align: left;
    box-shadow: 0 18px 36px rgba(23, 32, 42, 0.28);
}

.my-task-reminder::before {
    position: absolute;
    top: -5px;
    left: calc(var(--my-task-reminder-pointer-left, 148px) - 5px);
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(18, 118, 83, 0.38);
    border-left: 1px solid rgba(18, 118, 83, 0.38);
    background: var(--sidebar);
    content: "";
    transform: rotate(45deg);
}

.my-task-reminder:hover,
.my-task-reminder:focus-within {
    border-color: rgba(18, 118, 83, 0.72);
    background: linear-gradient(180deg, #1c2935 0%, var(--sidebar-soft) 100%);
    box-shadow: 0 20px 42px rgba(23, 32, 42, 0.34);
    text-decoration: none;
}

.my-task-reminder-body {
    display: grid;
    justify-items: start;
    gap: 2px;
    min-width: 0;
    min-height: 0;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
}

.my-task-reminder-body:hover,
.my-task-reminder-body:focus {
    background: transparent;
    box-shadow: none;
}

.my-task-reminder span {
    color: #b7c1d1;
    font-size: 10px;
    font-weight: 500;
}

.my-task-reminder strong {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.my-task-reminder strong span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.my-task-reminder-close {
    position: relative;
    width: 20px;
    min-height: 20px;
    border: 1px solid rgba(232, 245, 239, 0.28);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbe4ee;
    padding: 0;
}

.my-task-reminder-close::before,
.my-task-reminder-close::after {
    position: absolute;
    top: 8px;
    left: 5px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.my-task-reminder-close::before {
    transform: rotate(45deg);
}

.my-task-reminder-close::after {
    transform: rotate(-45deg);
}

.my-task-reminder-close:hover,
.my-task-reminder-close:focus {
    border-color: rgba(232, 245, 239, 0.48);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

@media (max-width: 640px) {
    .my-task-modal {
        align-items: start;
        justify-items: center;
        padding: 66px 12px 12px;
    }

    .my-task-panel {
        width: min(100%, calc(100vw - 24px));
        max-height: calc(100vh - 78px);
        max-height: calc(100dvh - 78px);
        min-height: 240px;
    }

    .my-task-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .my-task-assignee-field {
        grid-column: 1 / -1;
    }

    .my-task-form button,
    .my-task-tabs button,
    .my-task-close {
        width: auto;
    }

    .my-task-reminder {
        gap: 3px;
        width: min(156px, calc(100vw - 24px));
        padding: 6px 6px 6px 8px;
    }

    .my-task-reminder span {
        font-size: 9px;
    }

    .my-task-reminder strong {
        font-size: 12px;
    }
}

.role-name-field {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.role-name-field input {
    min-height: 40px;
    margin: 0;
    background: #f8fafc;
}

.role-permissions-panel {
    min-width: 0;
    border: 1px solid #e4e9f0;
    background: #ffffff;
}

.role-permissions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e4e9f0;
    padding: 12px 14px;
}

.role-permissions-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.role-permission-bulk-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.role-create-fields > .role-name-field,
.role-create-description {
    grid-column: 1 / -1;
}

.role-uncheck-button {
    border-color: #fb923c;
    color: #c2410c;
}

.role-permission-tree {
    display: grid;
    gap: 4px;
    padding: 12px 14px 16px;
}

.permission-branch {
    border: 1px solid transparent;
}

.permission-branch summary {
    display: grid;
    align-items: center;
    grid-template-columns: 22px 24px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 36px;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    padding: 6px 8px;
}

.permission-branch summary::-webkit-details-marker {
    display: none;
}

.permission-branch[open] > summary {
    background: #eef1f5;
}

.permission-caret {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: rotate(-45deg);
    transform-origin: center;
}

.permission-branch[open] > summary .permission-caret {
    transform: rotate(45deg);
}

.permission-parent-control {
    display: inline-grid;
    place-items: center;
}

.permission-parent-control input,
.role-permission-row input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: #00a67e;
}

.permission-branch-name {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-branch-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.permission-children {
    display: grid;
    gap: 2px;
    padding: 6px 8px 8px 62px;
}

.permission-matrix {
    gap: 0;
    overflow-x: auto;
}

.permission-matrix-row {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(180px, 1.5fr) repeat(var(--permission-action-count), minmax(82px, 0.7fr));
    min-width: calc(180px + (var(--permission-action-count) * 82px));
    border-bottom: 1px solid #edf1f7;
}

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

.permission-matrix-head {
    min-height: 30px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.permission-matrix-head span,
.permission-matrix-cell,
.permission-matrix-item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
}

.permission-matrix-head span:not(:first-child),
.permission-matrix-cell {
    justify-content: center;
}

.permission-matrix-item {
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
}

.permission-matrix-check {
    display: inline-grid;
    place-items: center;
    margin: 0;
}

.permission-matrix-check input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: #00a67e;
}

.permission-matrix-empty {
    width: 20px;
    height: 1px;
    background: #d8dee8;
}

.role-permission-row {
    display: grid;
    align-items: center;
    grid-template-columns: 22px minmax(160px, 1.4fr) minmax(104px, 0.6fr) minmax(150px, auto);
    gap: 8px;
    min-height: 34px;
    border-radius: 4px;
    color: #2f3b4c;
    font-size: 13px;
    font-weight: 400;
    padding: 4px 6px;
}

.role-permission-row-head {
    min-height: 26px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.role-permission-row:hover {
    background: #f8fafc;
}

.role-permission-row-head:hover {
    background: transparent;
}

.role-permission-row.is-read-only {
    cursor: default;
}

.role-permission-row span,
.role-permission-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-permission-access {
    color: #475569;
    font-size: 12px;
}

.role-permission-row small {
    color: #94a3b8;
    font-size: 11px;
    text-align: right;
}

.company-access-card {
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    padding: 14px;
}

.company-access-card.is-locked {
    background: #f8fafc;
}

.company-access-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

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

.permission-summary-grid span {
    border-top: 1px solid #e4e9f0;
    color: #475569;
    font-size: 13px;
    padding-top: 8px;
}

.permission-summary-grid strong {
    color: #111827;
    font-weight: 600;
}

.access-lock-note {
    margin: 0;
}

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

.meta-list div {
    border-bottom: 1px solid #e4e9f0;
    padding-bottom: 8px;
}

.meta-list strong {
    font-weight: 600;
}

.record-hero {
    align-items: start;
    background: #fbfcfe;
    box-shadow: none;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.record-title-stack {
    display: grid;
    gap: 8px;
}

.record-title-stack .muted {
    margin: 0;
}

.record-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
    gap: 12px;
    border-bottom: 1px solid #e4e9f0;
    padding-bottom: 8px;
}

.record-summary-title {
    display: grid;
    align-content: start;
    min-width: 180px;
    gap: 2px;
}

.record-summary-kicker {
    margin: 0;
    color: #334f75;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

.record-summary-heading {
    margin: 0;
    color: #175cd3;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.record-summary-list-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.82fr);
    gap: 0;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #f8fafc;
}

.razorpay-payment-link-panel,
.razorpay-webhook-evidence-panel {
    padding: 10px 12px;
}

.razorpay-payment-link-panel > .panel-title,
.razorpay-webhook-evidence-panel > .panel-title {
    margin-bottom: 8px;
}

.razorpay-payment-link-summary {
    grid-template-columns: 0.65fr 0.85fr 1.5fr 1fr;
}

.razorpay-payment-link-heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.razorpay-webhook-evidence-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.razorpay-payment-link-summary > p,
.razorpay-webhook-evidence-summary > p {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    border-top: 1px solid #e4e9f0;
}

.razorpay-payment-link-summary > p:nth-child(2n),
.razorpay-webhook-evidence-summary > p:nth-child(3n + 2),
.razorpay-webhook-evidence-summary > p:nth-child(3n + 3) {
    border-left: 1px solid #e4e9f0;
}

.razorpay-payment-link-summary > p:nth-child(3),
.razorpay-payment-link-summary > p:nth-child(4) {
    border-left: 1px solid #e4e9f0;
}

.razorpay-payment-link-summary > p:nth-child(-n + 2),
.razorpay-webhook-evidence-summary > p:nth-child(-n + 3) {
    border-top: 0;
}

.razorpay-payment-link-summary > p:nth-child(-n + 4) {
    border-top: 0;
}

.razorpay-payment-link-summary > p > strong,
.razorpay-webhook-evidence-summary > p > strong {
    color: #223955;
    font-size: 12px;
}

.razorpay-payment-link-summary > p {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 7px 8px;
}

.razorpay-payment-link-summary > p > span,
.razorpay-webhook-evidence-summary > p > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.razorpay-payment-link-summary > p:nth-child(n + 3) > span,
.razorpay-payment-link-summary > p:nth-child(n + 3) > span > a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.razorpay-payment-link-panel .settings-actions {
    margin-top: 10px;
}

.local-billing-compact-panel {
    padding: 10px 12px;
}

.local-billing-compact-panel > .panel-title {
    align-items: center;
    margin-bottom: 7px;
}

.local-billing-share-actions {
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

.local-billing-share-actions form {
    display: inline-flex;
}

.local-billing-share-actions .button.is-disabled,
.local-billing-share-actions .button:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
}

.local-billing-share-actions .invoice-reminder-disabled-control {
    width: auto;
}

.compact-panel-note {
    margin: 6px 0 0;
    font-size: 12px;
}

.invoice-customer-reminders-panel {
    border-color: #d8e1ec;
    background: #f4f6f9;
    box-shadow: none;
    padding: 10px 12px;
}

.invoice-customer-reminders-panel > .panel-title {
    margin-bottom: 8px;
    border-bottom: 1px solid #dce3ec;
    padding-bottom: 7px;
}

.invoice-customer-reminders-panel > .panel-title h2 {
    font-size: 15px;
}

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

.invoice-operation-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 82px;
    border: 1px solid #dce3ec;
    border-radius: 7px;
    background: #ffffff;
    padding: 9px 10px;
}

.invoice-operation-card[data-automatic-reminder-control="active"] {
    border-color: #bfe5d6;
    background: #fbfffd;
}

.invoice-operation-card[data-automatic-reminder-control="paused"] {
    border-color: #f3d19b;
    background: #fffaf0;
}

.invoice-operation-card[data-automatic-reminder-control="paid-disabled"],
.invoice-operation-card[data-automatic-reminder-control="unavailable"] {
    background: #f8fafc;
}

.invoice-operation-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.invoice-operation-card-head .record-summary-kicker {
    padding-top: 3px;
}

.invoice-operation-card-head .badge {
    flex: 0 1 auto;
    max-width: 100%;
    text-align: right;
    white-space: normal;
}

.invoice-operation-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.invoice-operation-actions form,
.invoice-operation-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

.invoice-operation-actions .button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.invoice-operation-actions .invoice-reminder-disabled-control {
    width: auto;
}

.invoice-operation-meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-reminder-history-disclosure {
    margin-top: 8px;
    border: 1px solid #dce3ec;
    border-radius: 7px;
    background: #f8fafc;
    overflow: hidden;
}

.invoice-reminder-history-disclosure > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    cursor: pointer;
    list-style: none;
    padding: 7px 10px;
}

.invoice-reminder-history-disclosure > summary::-webkit-details-marker {
    display: none;
}

.invoice-reminder-history-disclosure > summary::before {
    flex: 0 0 auto;
    color: #64748b;
    content: "\203A";
    font-size: 18px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 120ms ease;
}

.invoice-reminder-history-disclosure[open] > summary::before {
    transform: rotate(90deg);
}

.invoice-reminder-history-disclosure > summary strong {
    min-width: 0;
    margin-right: auto;
    color: #334f75;
    font-size: 13px;
    font-weight: 700;
}

.invoice-reminder-history-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #dce3ec;
    background: #ffffff;
}

.invoice-reminder-history-column {
    min-width: 0;
    padding: 9px 10px 10px;
}

.invoice-reminder-history-column + .invoice-reminder-history-column {
    border-left: 1px solid #e4e9f0;
}

.invoice-reminder-history-column h3 {
    margin: 0 0 6px;
    color: #334f75;
    font-size: 12px;
    font-weight: 700;
}

.invoice-reminder-history-list {
    display: grid;
    gap: 0;
}

.invoice-reminder-history-list > .empty-state {
    margin: 0;
    border: 0;
    background: transparent;
    padding: 6px 0;
    text-align: left;
}

.invoice-reminder-history-entry {
    display: grid;
    gap: 3px;
    min-width: 0;
    border-top: 1px solid #edf1f6;
    padding: 7px 0;
}

.invoice-reminder-history-entry:first-child {
    border-top: 0;
    padding-top: 2px;
}

.invoice-reminder-history-entry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.invoice-reminder-history-entry-head strong {
    min-width: 0;
    color: #172033;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-reminder-history-entry-head .badge {
    flex: 0 0 auto;
}

.invoice-reminder-history-entry > span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-document-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.invoice-document-divider::before,
.invoice-document-divider::after {
    height: 1px;
    flex: 1 1 auto;
    background: #d8e1ec;
    content: "";
}

.invoice-document-divider::before {
    flex-basis: 28px;
    flex-grow: 0;
}

@media (max-width: 900px) {
    .invoice-operations-grid,
    .invoice-reminder-history-columns {
        grid-template-columns: 1fr;
    }

    .invoice-operation-card {
        min-height: 0;
    }

    .invoice-reminder-history-column + .invoice-reminder-history-column {
        border-top: 1px solid #e4e9f0;
        border-left: 0;
    }

    .invoice-document-divider {
        margin-top: 14px;
    }
}

.razorpay-payment-link-last-checked {
    margin: 7px 0 0;
    color: #6b7b91;
    font-size: 12px;
}

@media (max-width: 900px) {
    .razorpay-payment-link-summary,
    .razorpay-webhook-evidence-summary {
        grid-template-columns: 1fr;
    }

    .razorpay-payment-link-summary > p,
    .razorpay-webhook-evidence-summary > p {
        border-left: 0 !important;
    }

    .razorpay-payment-link-summary > p:first-child,
    .razorpay-webhook-evidence-summary > p:first-child {
        border-top: 0;
    }

    .razorpay-payment-link-summary > p:not(:first-child) {
        border-top: 1px solid #e4e9f0;
    }
}

.record-summary-list {
    display: grid;
    align-content: start;
    min-width: 0;
    padding: 12px 14px;
}

.record-summary-list + .record-summary-list {
    border-left: 1px solid #e4e9f0;
    background: #f3f6fa;
}

.record-summary-list-head {
    display: grid;
    gap: 2px;
    margin-bottom: 8px;
    min-width: 0;
}

.record-summary-list-row {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    border-top: 1px solid #edf1f6;
    padding: 8px 0;
}

.record-summary-list-row:first-of-type {
    border-top-color: #e4e9f0;
}

.record-summary-list-row.is-contrast-row {
    margin: 0 -5px;
    border: 1px solid #cfe0f8;
    border-radius: 5px;
    background: #eaf3ff;
    padding: 5px;
}

.record-summary-list-row > span:first-child {
    color: #334f75;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.record-summary-list-row > strong,
.record-summary-link {
    min-width: 0;
    color: #172033;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.record-summary-link {
    color: #175cd3;
    text-decoration: none;
}

.record-summary-link:hover,
.record-summary-link:focus {
    color: #009a79;
    text-decoration: underline;
}

.record-summary-list-row .badge {
    justify-self: start;
}

.record-summary-list-row .progress-meter {
    min-width: 0;
}

.project-overview-summary .record-summary-list-grid {
    border-color: #1e3858;
    background: #12213a;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.project-overview-summary .record-summary-list {
    background: #13243e;
}

.project-overview-summary .record-summary-list + .record-summary-list {
    border-left-color: rgba(191, 219, 254, 0.16);
    border-top-color: rgba(191, 219, 254, 0.16);
    background: #172a46;
}

.project-overview-summary .record-summary-kicker {
    color: #dbeafe;
    font-weight: 700;
}

.project-overview-summary .record-summary-list-row {
    border-top-color: rgba(191, 219, 254, 0.14);
}

.project-overview-summary .record-summary-list-row:first-of-type {
    border-top-color: rgba(191, 219, 254, 0.22);
}

.project-overview-summary .record-summary-list-row > span:first-child {
    color: #a9c3e6;
    font-weight: 600;
}

.project-overview-summary .record-summary-list-row > strong,
.project-overview-summary .record-summary-link {
    color: #f8fbff;
    font-weight: 400;
}

.project-overview-summary .record-summary-link {
    color: #8ec5ff;
}

.project-overview-summary .record-summary-link:hover,
.project-overview-summary .record-summary-link:focus {
    color: #bde3ff;
}

.project-overview-summary .record-summary-list-row .badge {
    font-weight: 500;
}

.invoice-preview-document {
    display: grid;
    gap: 22px;
    margin-bottom: 16px;
    padding: 28px 32px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.invoice-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #d7e0ea;
    padding-bottom: 20px;
}

.invoice-preview-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.invoice-preview-mark {
    display: inline-grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: #102a43;
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.invoice-preview-brand strong,
.invoice-preview-party strong,
.invoice-preview-party-link {
    display: block;
    min-width: 0;
    color: #175cd3;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.invoice-preview-brand span {
    display: block;
    margin-top: 3px;
    color: #52657a;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-preview-title {
    display: grid;
    justify-items: end;
    gap: 8px;
    text-align: right;
}

.invoice-preview-title p {
    margin: 0;
    color: #5f4316;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.invoice-preview-title strong,
.invoice-preview-title span {
    display: block;
    color: #172033;
    line-height: 1.25;
}

.invoice-preview-title strong {
    font-size: 15px;
}

.invoice-preview-title span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.invoice-preview-parties {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.invoice-preview-party {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.invoice-preview-party h2,
.invoice-preview-notes h3 {
    margin: 0 0 4px;
    color: #334f75;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.invoice-preview-party span,
.invoice-preview-party a {
    color: #172033;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.invoice-preview-party a:not(.invoice-preview-party-link) {
    color: #175cd3;
    text-decoration: none;
}

.invoice-preview-party a:hover,
.invoice-preview-party a:focus,
.invoice-preview-meta a:hover,
.invoice-preview-meta a:focus {
    color: #009a79;
    text-decoration: underline;
}

.invoice-preview-party .muted {
    color: #7a8796;
}

.invoice-preview-party-meta {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid #d7e0ea;
}

.invoice-preview-party-meta div {
    display: grid;
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.invoice-preview-party-meta dt {
    color: #334f75;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.invoice-preview-party-meta dd {
    margin: 0;
    min-width: 0;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-align: right;
}

.invoice-preview-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.invoice-preview-meta div {
    display: grid;
    align-content: start;
    min-width: 0;
    gap: 4px;
    padding: 10px 12px;
    border-right: 1px solid #e4e9f0;
    border-bottom: 1px solid #e4e9f0;
}

.invoice-preview-meta div:nth-child(3n) {
    border-right: 0;
}

.invoice-preview-meta div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.invoice-preview-meta dt,
.invoice-preview-totals dt {
    color: #334f75;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.invoice-preview-meta dd,
.invoice-preview-totals dd {
    margin: 0;
    min-width: 0;
    color: #172033;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-preview-meta a {
    color: #175cd3;
    text-decoration: none;
}

.invoice-preview-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.invoice-preview-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    table-layout: fixed;
}

.invoice-preview-table th {
    background: #0f8a70;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    padding: 11px 10px;
    text-align: left;
    text-transform: uppercase;
}

.invoice-preview-table th:first-child {
    width: 38px;
}

.invoice-preview-table th:nth-child(2) {
    width: 28%;
}

.invoice-preview-table th:nth-child(3) {
    width: 52px;
}

.invoice-preview-table th:nth-child(4) {
    width: 78px;
}

.invoice-preview-table th:nth-child(5) {
    width: 112px;
}

.invoice-preview-table th:nth-child(6) {
    width: 88px;
}

.invoice-preview-table th:nth-child(7) {
    width: 120px;
}

.invoice-preview-table.is-six-column th:nth-child(2) {
    width: 36%;
}

.invoice-preview-table.is-six-column th:nth-child(4) {
    width: 112px;
}

.invoice-preview-table.is-six-column th:nth-child(6) {
    width: 120px;
}

.invoice-preview-table td {
    border-bottom: 1px solid #e4e9f0;
    color: #172033;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    padding: 11px 8px;
    text-align: left;
    vertical-align: top;
}

.invoice-preview-table th:nth-child(3),
.invoice-preview-table th:nth-child(5),
.invoice-preview-table th:nth-child(7),
.invoice-preview-table td:nth-child(3),
.invoice-preview-table td:nth-child(5),
.invoice-preview-table td:nth-child(7) {
    text-align: right;
}

.invoice-preview-table.is-six-column th:nth-child(4),
.invoice-preview-table.is-six-column th:nth-child(6),
.invoice-preview-table.is-six-column td:nth-child(4),
.invoice-preview-table.is-six-column td:nth-child(6) {
    text-align: right;
}

.invoice-preview-table.is-six-column th:nth-child(5),
.invoice-preview-table.is-six-column td:nth-child(5) {
    text-align: left;
}

.invoice-preview-table td strong,
.invoice-preview-table td span {
    display: block;
}

.invoice-preview-table td span {
    margin-top: 3px;
    color: #7a8796;
    font-size: 12px;
}

.invoice-preview-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    gap: 28px;
    align-items: start;
}

.invoice-preview-footer-actions {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
    margin-top: -6px;
}

.invoice-preview-footer-actions .confirmation-popover-body {
    top: auto;
    right: 0;
    bottom: calc(100% + 8px);
    left: auto;
}

.invoice-cancel-summary.button.danger {
    min-height: 26px;
    border-color: #ef4444;
    background: #fff1f2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
}

.invoice-cancel-summary.button.danger:hover,
.invoice-cancel-summary.button.danger:focus {
    background: #fee2e2;
    color: #7f1d1d;
}

.invoice-preview-notes {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.invoice-preview-notes article {
    border-top: 1px solid #e4e9f0;
    padding-top: 12px;
}

.invoice-preview-notes p {
    margin: 0;
    color: #52657a;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.invoice-preview-notes p span {
    display: block;
}

.invoice-preview-payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: start;
    gap: 18px;
}

.invoice-preview-payment-layout.is-qr-only {
    grid-template-columns: 132px;
}

.invoice-preview-payment-details {
    min-width: 0;
}

.invoice-preview-payment-qr {
    display: grid;
    justify-items: center;
    width: 132px;
    margin: 0;
    color: #172033;
    text-align: center;
}

.invoice-preview-payment-qr svg {
    display: block;
    width: 132px;
    height: 132px;
    border: 1px solid #e4e9f0;
    background: #ffffff;
}

.invoice-preview-payment-qr figcaption {
    margin-top: 7px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.invoice-preview-payment-qr > span {
    margin-top: 2px;
    color: #667085;
    font-size: 9px;
    line-height: 1.35;
}

.invoice-preview-pay-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    min-height: 36px;
    margin-top: 14px;
    border-radius: 0;
    background: var(--green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 560px) {
    .invoice-preview-payment-layout {
        grid-template-columns: 1fr;
    }

    .invoice-preview-payment-qr {
        justify-self: start;
    }
}

.invoice-preview-terms-page {
    margin-top: 28px;
    border-top: 1px solid #e4e9f0;
    padding-top: 18px;
}

.invoice-preview-terms-page article {
    max-width: none;
}

.invoice-preview-terms-page h3 {
    margin: 0 0 8px;
    color: #294565;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.invoice-preview-terms-page p {
    margin: 0;
    color: #52657a;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.invoice-preview-totals {
    display: grid;
    gap: 0;
    min-width: 0;
    margin: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.invoice-preview-totals div {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(0, auto);
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border-top: 1px solid #edf1f6;
}

.invoice-preview-totals div:first-child {
    border-top: 0;
}

.invoice-preview-totals dd {
    justify-self: end;
    font-weight: 700;
    text-align: right;
}

.invoice-preview-totals .is-grand-total {
    background: #eaf6ff;
}

.invoice-preview-totals .is-balance-due {
    background: #f1fbf8;
}

.record-action-strip,
.customer-record-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.record-action-strip {
    justify-content: flex-end;
}

.record-action-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #d8dee8;
    border-radius: 999px;
    background: #f4f6f9;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 3px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.record-action-chip:hover,
.record-action-chip:focus {
    border-color: #c7d7fe;
    background: #eef4ff;
    color: #175cd3;
    text-decoration: none;
}

.record-meta-grid {
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
}

.detail-card {
    padding: 12px;
}

.record-meta-grid div {
    display: grid;
    align-items: start;
    min-width: 0;
    border-top: 1px solid #e4e9f0;
    padding: 8px 10px;
}

.record-hero > .record-meta-grid > div:not(:nth-child(3n)) {
    border-right: 1px solid #e4e9f0;
}

.record-hero > .record-meta-grid > div:nth-child(3n + 1) {
    padding-left: 0;
}

.record-hero > .record-meta-grid > div:nth-child(3n) {
    padding-right: 0;
}

.record-hero > .record-meta-grid > div:nth-child(-n + 3) {
    border-top: 0;
}

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

.portal-invoice-actions .settings-note {
    margin: 0;
}

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

.record-meta-grid strong,
.detail-card strong,
.timeline-user {
    display: block;
    color: #334f75;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.record-meta-grid .record-meta-copy > span,
.detail-card span {
    display: block;
    overflow-wrap: anywhere;
}

.record-meta-grid .record-meta-copy > span {
    margin-top: 0;
    color: #172033;
    line-height: 1.35;
}

.record-detail-shell {
    display: grid;
    align-items: start;
    gap: 0;
    height: calc(100vh - 148px);
    grid-template-columns: minmax(220px, 242px) minmax(0, 1fr);
    margin-left: -10px;
    overflow: hidden;
}

.record-detail-main {
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
    background: #f5f7fb;
    padding-right: 8px;
    padding-left: 6px;
    scrollbar-gutter: stable;
}

.record-detail-rail {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 8px;
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 10px 0;
    scrollbar-color: #94a3b8 transparent;
    scrollbar-gutter: auto;
}

.record-detail-rail::-webkit-scrollbar {
    width: 8px;
}

.record-detail-rail::-webkit-scrollbar-track {
    border: 0;
    background: transparent;
}

.record-detail-rail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #94a3b8;
}

.record-detail-rail::-webkit-scrollbar-corner {
    background: transparent;
}

.record-detail-rail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #d8e1ec;
    padding: 0 2px 10px;
}

.record-detail-rail-head small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.record-detail-rail-head strong {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.record-detail-rail-nav {
    display: grid;
    gap: 0;
}

.record-detail-rail-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    padding: 8px 10px;
    text-decoration: none;
}

.record-detail-rail-nav a:nth-child(even):not(.is-active),
.record-detail-rail-nav a.is-rail-alt:not(.is-active) {
    background: #f8fafc;
}

.record-detail-rail-nav a:hover,
.record-detail-rail-nav a:focus {
    background: #e7f8f3;
    color: var(--green);
    text-decoration: none;
}

.record-detail-rail-nav a.is-active {
    background: #e7f8f3;
    box-shadow: inset 3px 0 0 var(--green);
    color: var(--green);
    font-weight: 400;
}

.record-detail-rail-nav a[hidden] {
    display: none;
}

.record-rail-view,
.record-rail-sort,
.record-rail-search {
    display: block;
    min-width: 0;
}

.record-rail-controls {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.record-rail-view select,
.record-rail-sort select,
.record-rail-search input {
    width: 100%;
    height: 30px;
    border: 1px solid #d8e1ec;
    border-radius: 7px;
    background: #ffffff;
    color: #172033;
    font-size: 12px;
    padding: 6px 9px;
}

.record-rail-view select,
.record-rail-sort select {
    cursor: pointer;
}

.record-rail-search input::placeholder {
    color: #8a96a8;
}

.record-rail-view select:focus,
.record-rail-sort select:focus,
.record-rail-search input:focus {
    border-color: #91c9ec;
    box-shadow: 0 0 0 3px rgba(36, 91, 214, 0.08);
    outline: none;
}

.record-rail-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: #94a3b8;
}

.record-rail-dot-green {
    background: #00b993;
}

.record-rail-dot-amber {
    background: #f59e0b;
}

.record-rail-dot-red {
    background: #ef4444;
}

.record-rail-dot-gray {
    background: #94a3b8;
}

.record-rail-primary {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}

.record-rail-empty {
    border: 1px dashed #d8dee8;
    border-radius: 7px;
    color: #64748b;
    font-size: 12px;
    padding: 10px;
}

.record-section-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.record-section-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.record-section-tabs a:hover,
.record-section-tabs a:focus {
    border-color: #b8c6dc;
    background: #f4f8fb;
    color: #175cd3;
    text-decoration: none;
}

.record-section-tabs small {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.recurring-page-header {
    align-items: flex-start;
    margin-bottom: 12px;
}

.recurring-page-header h1 {
    margin-bottom: 4px;
}

.recurring-page-header .actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.recurring-page-header .button {
    white-space: nowrap;
}

.recurring-status-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    margin-bottom: 10px;
    border: 1px solid #e4e9f0;
    border-left: 4px solid #cbd5e1;
    border-radius: 8px;
    background: #fbfcfe;
    box-shadow: none;
    padding: 16px;
}

.recurring-status-card.is-cancelled {
    border-left-color: #dc2626;
}

.recurring-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    border-bottom: 1px solid #e4e9f0;
    padding-bottom: 12px;
}

.recurring-status-head h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.recurring-kicker,
.recurring-field-label {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: uppercase;
}

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

.recurring-field {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.recurring-field-value {
    display: block;
    color: #172033;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.recurring-field-value.is-amount {
    color: #111827;
    font-size: 18px;
}

.recurring-next-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-bottom: 10px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #fbfcfe;
    padding: 12px 14px;
}

.recurring-next-action.is-cancelled {
    border-color: #fecaca;
    background: #fff7f7;
}

.recurring-next-action p {
    margin: 3px 0 0;
    color: #172033;
    font-size: 14px;
    font-weight: 600;
}

.recurring-section-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.recurring-section-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid #d8dee8;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 11px;
    text-decoration: none;
    white-space: nowrap;
}

.recurring-section-nav a:hover,
.recurring-section-nav a:focus {
    border-color: #b8c6dc;
    background: #f4f6f9;
    color: #175cd3;
    text-decoration: none;
}

.recurring-detail-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
}

.recurring-info-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.recurring-info-card.is-quiet {
    background: #fbfcfe;
}

.recurring-info-card h2 {
    margin: 0;
    color: #172033;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.recurring-info-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.recurring-info-list > div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
    min-width: 0;
    border-top: 1px solid #edf1f6;
    padding: 8px 0;
}

.recurring-info-list > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.recurring-info-list dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.recurring-info-list dd {
    margin: 0;
    color: #172033;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.recurring-info-list.is-secondary-list {
    margin-top: 4px;
    border-top: 1px solid #e4e9f0;
    padding-top: 6px;
}

.compact-empty-state {
    margin: 2px 0 0;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
}

.subtle-inline {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.recurring-internal-panel {
    margin-top: 0;
}

.recurring-internal-panel .detail-card h3 {
    margin: 0;
    color: #334f75;
    font-size: 13px;
    font-weight: 700;
}

.description-block {
    margin: 0;
    color: #334155;
    overflow-wrap: anywhere;
}

.record-summary-note {
    border-top: 1px solid #e4e9f0;
    padding-top: 8px;
}

.section-gap {
    margin-top: 12px;
}

.form-gap {
    margin-bottom: 16px;
}

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

.detail-card {
    display: grid;
    align-content: start;
    gap: 8px;
}

.detail-card p {
    margin: 0;
}

.project-details-customer-card .detail-card-subsection {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
}

.project-details-customer-card h4 {
    margin: 0;
    color: #334f75;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.project-details-summary-panel .detail-card p {
    display: grid;
    grid-template-columns: minmax(126px, 0.7fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
}

.project-details-summary-panel .detail-card p strong,
.project-details-summary-panel .detail-card p span {
    display: block;
}

.portal-project-details-locked {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.portal-project-details-locked h2 {
    margin: 0;
}

.portal-project-details-locked p {
    margin: 4px 0 0;
}

.portal-dashboard-ticket-form-fields {
    display: grid;
    gap: 10px;
}

.portal-dashboard-compact {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.notice.customer-preview-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    padding: 7px 10px;
}

.notice.customer-preview-compact strong,
.notice.customer-preview-compact span {
    display: inline;
    margin: 0;
}

.notice.customer-preview-compact span {
    color: #64748b;
    font-size: 12px;
}

.portal-dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.42fr);
    gap: 12px;
}

.portal-dashboard-main-grid.is-ticket-form-unavailable {
    grid-template-columns: minmax(0, 1fr);
}

.portal-dashboard-surface {
    min-width: 0;
    padding: 12px;
}

.portal-dashboard-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.portal-dashboard-section-title h2 {
    margin: 0;
    font-size: 16px;
}

.portal-dashboard-section-title > a {
    font-size: 12px;
    font-weight: 600;
}

.portal-ticket-fields-stacked {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.portal-ticket-fields-stacked textarea {
    min-height: 112px;
}

.portal-ticket-fields-compact {
    display: grid;
    min-width: 0;
    gap: 9px;
}

.portal-ticket-fields-compact textarea {
    min-height: 82px;
    resize: vertical;
}

.portal-dashboard-ticket-form-fields .form-footer {
    position: static;
    justify-content: flex-start;
    margin-top: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.portal-dashboard-ticket-form-fields .form-footer button {
    min-width: 132px;
}

.portal-ticket-more-options {
    border: 0;
    background: transparent;
}

.portal-ticket-more-options > summary {
    width: max-content;
    color: #315f91;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style-position: outside;
}

.portal-ticket-more-options-fields {
    display: grid;
    gap: 9px;
    margin-top: 9px;
}

.portal-dashboard-recent-tickets .table-wrap {
    overflow: visible;
}

.customer-portal-shell .panel.compact-soft-surface > .panel-title {
    margin-bottom: 8px;
}

.customer-portal-shell .panel.compact-soft-surface > .pagination-footer {
    background: transparent;
    padding: 8px 0 0;
}

.portal-dashboard-ticket-table {
    min-width: 0;
    table-layout: fixed;
}

.portal-dashboard-ticket-table th:first-child {
    width: 56%;
}

.portal-dashboard-ticket-table th:nth-child(2) {
    width: 13%;
}

.portal-dashboard-ticket-table th:nth-child(3) {
    width: 19%;
}

.portal-dashboard-ticket-table th:last-child {
    width: 12%;
}

.customer-portal-shell .table.portal-record-table th,
.customer-portal-shell .table.portal-record-table td {
    border-right: 0 !important;
}

.customer-portal-shell .table.portal-record-table th:first-child,
.customer-portal-shell .table.portal-record-table td:first-child,
.customer-portal-shell .table.portal-record-table tbody tr:nth-child(even):not(.is-selected) td:first-child,
.customer-portal-shell .table.portal-record-table tbody tr:hover td:first-child,
.customer-portal-shell .table.portal-record-table tr.is-selected td:first-child {
    position: static;
    left: auto;
    z-index: auto;
    box-shadow: none;
}

.customer-portal-shell .table.portal-record-table th {
    background: var(--table-header-background);
    color: #667085;
}

.customer-portal-shell .table.portal-record-table tbody tr:not(.is-selected) td,
.customer-portal-shell .table.portal-record-table tbody tr:nth-child(even):not(.is-selected) td {
    background: transparent;
}

.customer-portal-shell .table.portal-record-table tbody tr:not(.is-selected):hover td {
    background: rgba(255, 255, 255, 0.64);
}

.customer-portal-shell .table.portal-record-table tbody tr:last-child td {
    border-bottom: 0;
}

.portal-dashboard-ticket-table td {
    height: 48px;
}

.portal-dashboard-ticket-table .entity-title,
.portal-dashboard-ticket-table .entity-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-dashboard-ticket-table .entity-cell {
    display: grid;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.project-overview-grid .detail-card p {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f6;
}

.project-overview-grid .detail-card p:last-child {
    border-bottom: 0;
}

.project-overview-grid .detail-card strong {
    color: #334f75;
    font-weight: 700;
}

.project-overview-grid .detail-card span {
    color: #172033;
}

.detail-card .muted {
    overflow-wrap: anywhere;
}

.project-detail-panel .project-tab-panels,
.project-form-panel .project-tab-panels {
    min-width: 0;
}

.project-progress-updates-layout {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(300px, 45fr);
    align-items: start;
    gap: 18px;
}

.project-updates-column {
    display: grid;
    min-width: 0;
    gap: 18px;
}

.project-update-composer,
.project-activity-history {
    display: grid;
    gap: 12px;
}

.compact-panel-title {
    margin-bottom: 0;
}

.compact-panel-title h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.project-update-composer {
    border: 1px solid #d8e9e3;
    border-radius: 8px;
    background: #f7fcfa;
    padding: 12px;
}

.project-progress-form {
    display: grid;
    gap: 10px;
}

.project-progress-form textarea {
    min-height: 92px;
    resize: vertical;
}

.project-update-options,
.project-milestone-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-progress-panel {
    display: grid;
    min-width: 0;
    gap: 14px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    background: #fff;
    padding: 15px;
}

.portal-project-section-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    border-bottom: 1px solid #dce4ef;
    margin-bottom: 0;
    scrollbar-width: thin;
}

.portal-project-section-tabs a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    color: #52627a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    padding: 8px 14px;
    text-decoration: none;
    white-space: nowrap;
}

.portal-project-section-tabs a.is-active {
    border-color: #b8caf6;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #eef4ff;
    color: var(--blue);
    font-weight: 700;
}

.portal-project-section-tabs a:hover:not(.is-active) {
    background: #f7f9fc;
    color: #17489c;
}

.portal-project-section-tabs a:focus-visible {
    outline: 2px solid #2864dc;
    outline-offset: -2px;
}

.portal-project-tab-panels,
.portal-project-tab-panel {
    min-width: 0;
}

.portal-project-tab-panel {
    scroll-margin-top: 18px;
}

.portal-project-tab-panel[hidden] {
    display: none !important;
}

.portal-project-details-tab {
    display: grid;
    gap: 14px;
}

.portal-progress-workspace {
    scroll-margin-top: 18px;
}

.portal-progress-workspace-title {
    align-items: flex-start;
}

.portal-contract-panel {
    display: grid;
    gap: 13px;
    scroll-margin-top: 18px;
}

.portal-contract-title {
    align-items: flex-start;
}

.portal-contract-title h2,
.portal-contract-title p,
.portal-contract-card h3,
.portal-contract-card p,
.portal-contract-card dl,
.portal-contract-card dt,
.portal-contract-card dd {
    margin: 0;
}

.portal-contract-title p {
    margin-top: 3px;
}

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

.portal-contract-text-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
}

.portal-contract-card {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    border: 1px solid #d9e3ed;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.portal-contract-card h3 {
    color: #253b5b;
    font-size: 14px;
    font-weight: 650;
}

.portal-contract-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.portal-contract-metrics > div {
    display: grid;
    gap: 4px;
    border: 1px solid #e5eaf1;
    border-radius: 7px;
    background: #f9fbfd;
    padding: 9px;
}

.portal-contract-metrics dt,
.portal-contract-rows dt {
    color: #5b6b80;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.portal-contract-metrics dd,
.portal-contract-rows dd {
    color: #172033;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.portal-contract-rows {
    display: grid;
}

.portal-contract-rows > div {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr);
    gap: 9px;
    border-top: 1px solid #e8edf3;
    padding: 8px 0;
}

.portal-contract-rows > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.portal-contract-terms p {
    color: #26364d;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.portal-contract-terms p + p {
    margin-top: 2px;
}

.portal-contract-terms strong {
    color: #334f75;
    font-weight: 650;
}

.portal-progress-updates-layout {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(300px, 45fr);
    align-items: start;
    gap: 18px;
}

.portal-customer-update-column,
.portal-project-progress-panel,
.portal-action-section,
.portal-milestone-section {
    display: grid;
    min-width: 0;
    gap: 11px;
}

.portal-project-progress-panel {
    border: 1px solid #dce4ef;
    border-radius: 9px;
    background: #f9fbfe;
    padding: 13px;
}

.portal-customer-update-feed,
.portal-milestone-list {
    display: grid;
    gap: 9px;
}

.portal-customer-update-item {
    display: grid;
    gap: 7px;
    border: 1px solid #e0e7ef;
    border-left: 4px solid #3b82b6;
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
}

.portal-customer-update-item time {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.portal-customer-update-item p,
.portal-progress-empty-state p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.portal-progress-empty-state {
    display: grid;
    gap: 5px;
    border: 1px dashed #b9c9df;
    border-radius: 8px;
    background: #f8fbff;
    padding: 13px;
}

.portal-milestone-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    border-bottom: 1px solid #e1e7ef;
    padding: 6px 1px;
}

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

.portal-milestone-row > span:last-child {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.portal-milestone-row strong,
.portal-milestone-row small {
    overflow-wrap: anywhere;
}

.portal-milestone-row small {
    color: #64748b;
    font-size: 12px;
}

.portal-milestone-row.is-completed .project-milestone-marker {
    border-color: #268767;
    background: #268767;
}

.portal-milestone-row.is-delayed .project-milestone-marker {
    border-color: #cc4545;
}

.portal-milestone-row.is-action_pending .project-milestone-marker {
    border-color: #d99b20;
}

.project-progress-heading,
.project-progress-section-title,
.project-action-item > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.project-progress-heading h3,
.project-progress-section-title h4 {
    margin: 0;
}

.project-progress-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-progress-overview,
.project-progress-actions-panel,
.project-milestone-checklist,
.project-milestone-form {
    display: grid;
    gap: 10px;
}

.project-progress-score {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.project-progress-score strong {
    color: #16325c;
    font-size: 28px;
    line-height: 1;
}

.project-progress-score span,
.project-milestone-summary-copy small {
    color: #64748b;
    font-size: 12px;
}

.project-progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #e7edf5;
}

.project-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #268767;
}

.project-progress-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.project-progress-dates div {
    border: 1px solid #e3e9f1;
    border-radius: 7px;
    background: #f8fafc;
    padding: 9px;
}

.project-progress-dates dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.project-progress-dates dd {
    margin: 3px 0 0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.project-progress-empty,
.project-progress-good {
    border: 1px dashed #b9c9df;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.project-progress-empty p,
.project-progress-good {
    margin: 5px 0 0;
    color: #52627a;
    font-size: 13px;
}

.project-action-items,
.project-milestone-list {
    display: grid;
    gap: 8px;
}

.project-progress-section-title > span {
    display: inline-grid;
    min-width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 99px;
    background: #edf2f7;
    color: #40516a;
    font-size: 12px;
    font-weight: 800;
}

.project-action-item {
    display: grid;
    gap: 5px;
    border: 1px solid #f0d9a2;
    border-left: 4px solid #d99b20;
    border-radius: 8px;
    background: #fffbef;
    padding: 10px;
}

.project-action-item.is-delayed {
    border-color: #f1c2c2;
    border-left-color: #cc4545;
    background: #fff7f7;
}

.project-action-item p {
    margin: 0;
    color: #44546b;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.project-milestone-item,
.project-add-milestone {
    border: 1px solid #e0e7ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.project-milestone-item summary,
.project-add-milestone > summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    padding: 9px 10px;
}

.project-milestone-item summary::-webkit-details-marker,
.project-add-milestone > summary::-webkit-details-marker {
    display: none;
}

.project-milestone-item summary::after,
.project-add-milestone > summary::after {
    content: "+";
    margin-left: auto;
    color: #66758a;
    font-weight: 800;
}

.project-milestone-item[open] summary::after,
.project-add-milestone[open] > summary::after {
    content: "−";
}

.project-milestone-marker {
    display: inline-grid;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 2px solid #aab8cb;
    border-radius: 99px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.project-milestone-item.is-completed .project-milestone-marker {
    border-color: #268767;
    background: #268767;
}

.project-milestone-item.is-delayed .project-milestone-marker {
    border-color: #cc4545;
}

.project-milestone-item.is-action_pending .project-milestone-marker {
    border-color: #d99b20;
}

.project-milestone-summary-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.project-milestone-summary-copy strong,
.project-milestone-summary-copy small {
    overflow-wrap: anywhere;
}

.project-milestone-detail {
    display: grid;
    gap: 10px;
    border-top: 1px solid #e0e7ef;
    padding: 11px;
}

.project-milestone-detail > p {
    margin: 0;
    color: #465870;
    font-size: 13px;
}

.project-milestone-form {
    border-top: 1px solid #e3e9f1;
    padding-top: 10px;
}

.project-add-milestone .project-milestone-form {
    padding: 0 11px 11px;
}

@media (max-width: 1024px) {
    .portal-dashboard-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .project-progress-panel {
        grid-row: 1;
    }

    .project-updates-column {
        grid-row: 2;
    }

    .portal-progress-updates-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-project-progress-panel {
        grid-row: 1;
    }

    .portal-customer-update-column {
        grid-row: 2;
    }

    .portal-contract-text-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .portal-contract-grid,
    .portal-contract-metrics {
        grid-template-columns: 1fr;
    }

    .portal-contract-rows > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.project-progress-actions {
    justify-content: flex-start;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.project-activity-history {
    border-top: 1px solid #d8e9e3;
    padding-top: 14px;
}

.project-activity-feed,
.project-activity-list {
    display: grid;
    gap: 10px;
}

.project-activity-day {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 12px;
}

.project-activity-date {
    color: #526986;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    padding-top: 11px;
}

.project-activity-item {
    display: grid;
    gap: 8px;
    border: 1px solid #e4e9f0;
    border-left: 3px solid #9fb9e8;
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
}

.project-activity-item.is-manual {
    border-left-color: #37a27f;
    background: #fbfffd;
}

.project-activity-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.project-activity-meta time,
.project-activity-meta .muted {
    color: #66758a;
    font-size: 12px;
}

.project-activity-meta .muted::before {
    content: "by ";
}

.project-activity-item p {
    margin: 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .project-update-options,
    .project-milestone-form-grid,
    .project-progress-dates {
        grid-template-columns: 1fr;
    }

    .project-progress-panel {
        padding: 12px;
    }

    .project-progress-score {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-activity-day {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .project-activity-date {
        padding-top: 0;
    }
}

.staff-ai-library-panel,
.staff-ai-artifact-panel,
.staff-ai-readiness-panel,
.staff-ai-library-form,
.staff-ai-template-notes {
    display: grid;
    gap: 14px;
}

.staff-ai-readiness-states {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.staff-ai-readiness-states div,
.staff-ai-capability-budget-list article {
    display: grid;
    gap: 4px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fbff;
    padding: 10px;
}

.staff-ai-readiness-states span,
.staff-ai-capability-budget-list span {
    color: #64748b;
    font-size: 12px;
}

.staff-ai-capability-budget-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.staff-ai-template-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-ai-template-notes p {
    display: grid;
    gap: 5px;
    margin: 0;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fbff;
    padding: 10px;
}

.staff-ai-template-notes strong {
    color: #2b3d57;
    font-size: 13px;
}

.staff-ai-template-notes span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.staff-ai-artifact-output {
    min-height: 440px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
}

.project-ai-workspace,
.project-ai-template-card,
.project-ai-template-card form,
.project-ai-result {
    display: grid;
    gap: 14px;
}

.project-ai-workspace {
    max-width: 1040px;
}

.project-ai-head {
    border-bottom: 1px solid #dbe7f4;
    padding-bottom: 12px;
}

.project-ai-context-gate {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid #cce6db;
    border-radius: 9px;
    background: #f4fbf8;
    padding: 12px;
}

.project-ai-context-gate div {
    display: grid;
    gap: 3px;
}

.project-ai-context-gate span {
    color: #64748b;
    font-size: 12px;
}

.project-ai-context-gate strong {
    color: #195f49;
    overflow-wrap: anywhere;
}

.project-ai-context-gate p {
    grid-column: 1 / -1;
    margin: 0;
    color: #526173;
    font-size: 12px;
}

.project-ai-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.project-ai-template-card {
    align-content: space-between;
    min-width: 0;
    border: 1px solid #d7e3f1;
    border-radius: 10px;
    background: #fbfdff;
    padding: 13px;
}

.project-ai-template-card h4 {
    margin: 0 0 5px;
    color: #263c5a;
}

.project-ai-template-card p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.project-ai-template-card textarea {
    min-height: 104px;
    resize: vertical;
}

.project-ai-template-card button {
    width: 100%;
    justify-content: center;
}

.project-ai-template-card button:disabled {
    border-color: #d8e0ea;
    background: #e9eef4;
    color: #8793a4;
    cursor: not-allowed;
    box-shadow: none;
}

.project-ai-requirements-warning ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.project-ai-requirements-warning li + li {
    margin-top: 3px;
}

.project-ai-card-requirements {
    align-self: start;
    margin: 0;
    padding: 10px;
    font-size: 12px;
}

.project-ai-card-requirements ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.project-ai-card-requirements li + li {
    margin-top: 3px;
}

.project-ai-result {
    margin-top: 2px;
    border-top: 1px solid #dbe7f4;
    padding-top: 16px;
}

@media (max-width: 800px) {
    .staff-ai-template-notes {
        grid-template-columns: 1fr;
    }

    .staff-ai-readiness-states,
    .staff-ai-capability-budget-list {
        grid-template-columns: 1fr;
    }

    .project-ai-account-gate,
    .project-ai-template-grid {
        grid-template-columns: 1fr;
    }
}

.support-message-panel {
    display: grid;
    gap: 12px;
}

.support-quick-filters,
.attendance-quick-filters,
.support-bulk-toolbar,
.project-bulk-toolbar,
.invoice-bulk-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.support-quick-filters .button.is-active,
.attendance-quick-filters .button.is-active {
    border-color: #b8caf6;
    background: #eef4ff;
    color: var(--blue);
    font-weight: 700;
}

.support-bulk-toolbar,
.project-bulk-toolbar,
.invoice-bulk-toolbar {
    justify-content: flex-start;
    border-top: 1px solid #e4e9f0;
    padding: 7px 10px;
}

.support-select-all,
.project-select-all,
.invoice-select-all,
.project-bulk-field,
.project-bulk-reason {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.project-bulk-field,
.project-bulk-reason {
    flex: 0 1 210px;
}

.project-bulk-reason {
    flex-basis: 270px;
}

.support-select-all input,
.support-select-cell input,
.project-select-all input,
.project-select-cell input,
.invoice-select-all input,
.invoice-select-cell input {
    width: auto;
    min-height: auto;
}

.support-selection-count,
.project-selection-count,
.invoice-selection-count,
.invoice-bulk-note {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.support-bulk-toolbar button:disabled,
.project-bulk-toolbar button:disabled,
.invoice-bulk-toolbar button:disabled {
    border-color: #d8dee8;
    background: #f4f6f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.support-ticket-table .support-select-cell,
.project-list-table .project-select-cell,
.local-invoice-list-table .invoice-select-cell {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
}

.table.project-list-table {
    min-width: 1180px;
}

.project-list-table .project-identity-cell {
    min-width: 360px;
}

.project-list-table .project-account-id-cell {
    min-width: 132px;
    font-variant-numeric: tabular-nums;
}

.invoice-bulk-note {
    margin-right: auto;
    font-weight: 500;
}

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

    .invoice-bulk-toolbar .button {
        width: 100%;
    }

    .table.is-record-table.is-mobile-list-table .invoice-select-cell {
        display: flex;
        min-height: 42px;
        width: 100%;
        min-width: 0;
        max-width: none;
        align-items: center;
        justify-content: flex-start;
    }

    .table.is-record-table.is-mobile-list-table tbody tr.is-selected {
        border-color: #b8caf6;
        background: #eef4ff;
    }

    .table.is-record-table.is-mobile-list-table .invoice-bulk-unavailable {
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        text-align: left;
    }

    .table.is-record-table.is-mobile-list-table .invoice-bulk-unavailable > .invoice-reminder-tooltip {
        display: none;
    }

    .table.is-record-table.is-mobile-list-table .invoice-bulk-disabled-text {
        display: inline;
        color: #64748b;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
}

.support-ticket-table .support-ticket-subject-cell {
    min-width: 280px;
}

.support-ticket-table .support-ticket-date-cell {
    min-width: 120px;
}

.support-summary,
.support-list-filters {
    --list-toolbar-width: var(--content-width-wide);
}

.support-summary-action {
    margin-left: auto;
}

.support-list-filters label:first-of-type,
.support-list-filters.module-list-filters label:first-of-type {
    flex-basis: 210px;
    max-width: 220px;
    min-width: 190px;
}

@media (min-width: 901px) {
    .support-queue-panel:has(> form[data-support-bulk-form]) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: 12px;
    }

    .support-queue-panel:has(> form[data-support-bulk-form]) > .panel-title {
        grid-column: 1;
        grid-row: 1;
        padding-bottom: 6px;
    }

    .support-queue-panel > form[data-support-bulk-form] {
        display: contents;
    }

    .support-queue-panel .support-bulk-toolbar {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        border-top: 0;
        padding: 0 0 6px;
    }

    .support-queue-panel .table-wrap,
    .support-queue-panel > .pagination-footer {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1700px) {
    .support-ticket-table {
        min-width: 0;
        table-layout: fixed;
    }

    .support-ticket-table .support-select-column {
        width: 44px;
    }

    .support-ticket-table .support-date-column {
        width: 118px;
    }

    .support-ticket-table .support-subject-column {
        width: 32%;
    }

    .support-ticket-table .support-assigned-column {
        width: 130px;
    }

    .support-ticket-table .support-priority-column {
        width: 82px;
    }

    .support-ticket-table .support-expected-column {
        width: 110px;
    }

    .support-ticket-table .support-portal-column {
        width: 78px;
    }

    .support-ticket-table .support-status-column {
        width: 126px;
    }

    .support-ticket-table .support-action-column {
        width: 58px;
    }

    .support-ticket-table .support-ticket-subject-cell,
    .support-ticket-table .support-ticket-customer-cell,
    .support-ticket-table .support-ticket-assigned-cell {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.support-close-ticket-form {
    margin: 0;
}

.support-close-ticket-button {
    min-height: 24px;
    border: 1px solid #b8caf6;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 10px;
}

.support-close-ticket-button:hover,
.support-close-ticket-button:focus {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
}

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

.support-message-form {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 0;
    border-top: 1px solid #d8e9e3;
    border-radius: 0;
    background: transparent;
    padding: 12px 0 0;
}

.support-message-form.is-private-note-form {
    border-top-color: #f3d19b;
    background: transparent;
}

.support-message-form textarea {
    min-height: 112px;
    resize: vertical;
}

.support-message-security-alert {
    border: 1px solid #f2ce82;
    border-radius: 7px;
    background: #fff8e7;
    color: #754a00;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.support-message-list {
    display: grid;
    gap: 10px;
}

.support-message-item {
    display: grid;
    gap: 10px;
    border: 0;
    border-top: 1px solid #d8e9e3;
    border-radius: 0;
    background: transparent;
    padding: 12px 0;
}

.support-message-item.is-private-note {
    border-top-color: #f3d19b;
    background: transparent;
}

.support-message-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-inline: -3px;
    border-radius: 0;
    background: #e2e7ed;
    padding: 7px 9px;
}

.support-message-item header > div:first-child {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.support-message-item header strong {
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.support-message-sender-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.support-message-sender-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-message-byline-divider {
    color: #94a3b8;
}

.support-message-sender-line > span:last-child {
    white-space: nowrap;
}

.support-message-item header > .badge-row {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
}

.support-message-item header .badge {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 11px;
}

.support-message-item header span:not(.badge) {
    color: #64748b;
    font-size: 12px;
}

.support-message-item p {
    margin: 0;
    color: #26364b;
    overflow-wrap: anywhere;
}

.support-ticket-view-card .support-message-item > p,
.support-message-panel .support-message-item > p {
    padding: 0 10px 8px;
}

.support-ticket-view-card .support-message-list {
    gap: 8px;
    border-top: 0;
}

.support-ticket-view-card .support-message-item {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 13px 0;
}

.support-ticket-view-card .support-original-thread .support-message-item {
    border-top: 0;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.support-ticket-view-card .support-message-list .support-message-item {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.support-ticket-view-card .support-message-item.is-private-note {
    border-left: 0;
    background: transparent;
    padding: 0;
}

.support-reference-line {
    display: grid;
    gap: 4px;
    border-top: 1px solid #dff3ed;
    padding-top: 10px;
}

.support-reference-line strong {
    color: #334f75;
    font-size: 12px;
    line-height: 1.25;
    text-transform: uppercase;
}

.support-reference-line span {
    color: #334155;
    overflow-wrap: anywhere;
}

.support-compose-header {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.support-compose-form {
    display: grid;
    gap: 12px;
}

.support-compose-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: 20px;
    align-items: start;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 16px 0 0;
}

.support-compose-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.support-compose-body {
    display: grid;
    gap: 6px;
}

.support-compose-subject input {
    min-height: 42px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: #ffffff;
    color: #172033;
    font-size: 18px;
    padding: 6px 0;
}

.support-compose-subject input:focus {
    border-color: #2f6df6;
    background: #f8fbff;
    box-shadow: none;
}

.support-compose-body textarea {
    min-height: 300px;
    line-height: 1.55;
    padding: 16px;
}

.support-compose-body textarea,
.support-compose-sidebar textarea,
.support-message-form textarea,
.support-sidebar-textarea-box textarea {
    border: 0;
    border-top: 1px solid #dbe4ef;
    border-radius: 0;
    background: #fbfdff;
    box-shadow: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.support-compose-body textarea:focus,
.support-compose-sidebar textarea:focus,
.support-message-form textarea:focus,
.support-sidebar-textarea-box textarea:focus {
    border-top-color: #2f6df6;
    background: #eef6ff;
    box-shadow: inset 0 -2px 0 #2f6df6;
    outline: none;
}

.support-compose-body input[type="file"],
.support-message-form input[type="file"] {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-top: 1px solid #e4e9f0;
    border-radius: 0;
    background: transparent;
    color: #475569;
    padding: 10px 0 0;
}

.support-compose-body input[type="file"]:focus,
.support-message-form input[type="file"]:focus {
    border-top-color: #2f6df6;
    background: #f8fbff;
    box-shadow: inset 0 -2px 0 #2f6df6;
    outline: 0;
}

.primary-work-panel.support-message-panel > .panel-title {
    margin-bottom: 0;
    border-bottom: 0;
    padding-bottom: 0;
}

.support-message-panel > .support-message-form {
    border-top: 0;
    padding-top: 0;
}

.support-message-panel > .support-message-form .support-portal-reply-label {
    font-weight: 700;
}

.support-message-panel > .support-message-form textarea {
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    padding: 10px;
}

.support-message-panel > .support-message-form textarea:focus {
    border-color: #2f6df6;
    box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.12);
}

.support-message-panel .support-message-list {
    gap: 8px;
}

.support-message-panel .support-message-list .support-message-item {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.support-attachment-list {
    display: grid;
    gap: 0;
    margin-top: 6px;
    border-top: 1px solid #e4e9f0;
}

.support-attachment-list .badge {
    justify-content: flex-start;
    width: 100%;
    min-height: 32px;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    border-radius: 0;
    background: transparent;
    color: #245bd6;
    padding: 8px 0;
    white-space: normal;
}

.support-attachment-list .badge:last-child {
    border-bottom: 0;
}

.support-attachment-list .badge:hover,
.support-attachment-list .badge:focus {
    background: #f5f9ff;
    color: #1d4ed8;
}

.support-compose-sidebar {
    display: grid;
    gap: 12px;
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.support-compose-sidebar label {
    display: grid;
    gap: 5px;
}

.support-compose-sidebar > label + label,
.support-compose-sidebar > label + .support-project-context,
.support-compose-sidebar > .support-project-context + label {
    border-top: 1px solid #edf1f6;
    padding-top: 10px;
}

.support-compose-sidebar .checkbox-line {
    display: flex;
    align-items: center;
}

.support-compose-sidebar textarea {
    min-height: 80px;
}

.support-project-context {
    display: grid;
    gap: 8px;
}

.support-compose-submit {
    justify-content: center;
    min-height: 42px;
    border-color: #00b894;
    background: #00b894;
}

.support-compose-actions {
    display: grid;
    gap: 8px;
}

.support-compose-email-submit {
    border-color: #175cd3;
    background: #175cd3;
}

.support-compose-actions .field-help {
    line-height: 1.45;
}

.support-compose-errors {
    display: block;
    border-color: #fecaca;
    background: #fff5f5;
    color: #912018;
    padding: 10px 12px;
}

.support-ticket-view-card {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: stretch;
    border-top: 0;
    background: #ffffff;
    padding: 20px;
}

.support-ticket-view-card .support-compose-main {
    align-content: start;
}

.support-ticket-subject-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 4px 12px;
    align-items: start;
    padding-bottom: 0;
}

.support-ticket-subject-block h1 {
    margin: 0;
    color: #172033;
    font-size: 21px;
    line-height: 1.2;
}

.support-ticket-subject-meta {
    display: grid;
    gap: 4px;
    justify-items: end;
    min-width: 0;
}

.support-ticket-subject-meta > span {
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    text-align: right;
}

.support-ticket-subject-meta .badge-row {
    justify-content: flex-end;
}

.support-thread-block {
    display: grid;
    gap: 12px;
}

.support-original-thread {
    padding-top: 0;
}

.support-thread-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.support-thread-head h2 {
    margin: 0;
    color: #172033;
    font-size: 16px;
    line-height: 1.3;
}

.support-update-thread {
    margin-top: 50px;
}

.support-thread-page-size-footer {
    display: flex;
    justify-content: flex-end;
}

.support-attachment-field {
    min-width: 0;
}

.support-attachment-picker-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.support-file-picker-button {
    width: auto;
    min-height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    color: #334155;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.support-file-picker-button:hover,
.support-file-picker-button:focus {
    border-color: #8bb8ff;
    background: #f8fbff;
    color: #175cd3;
}

.support-file-selection {
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.support-attachment-picker-row .field-help {
    display: inline;
    margin-left: auto;
}

.support-ticket-sidebar {
    align-content: start;
    width: 100%;
    max-width: 260px;
    min-width: 0;
    border: 1px solid #d9e0e9;
    border-radius: 8px;
    background: #f5f7fa;
    padding: 10px;
}

.support-sidebar-details-form {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.support-sidebar-save-top {
    min-height: 36px;
}

.support-sidebar-edit-list {
    display: grid;
    border: 0;
    border-top: 1px solid #e4e9f0;
    border-radius: 0;
    overflow: visible;
}

.support-ticket-sidebar .support-sidebar-edit-list {
    gap: 10px;
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.support-sidebar-field,
.support-sidebar-readonly-row {
    display: grid;
    gap: 5px;
    background: #ffffff;
    padding: 9px 10px;
}

.support-sidebar-field + .support-sidebar-field,
.support-sidebar-readonly-row,
.support-sidebar-readonly-row + .support-sidebar-readonly-row {
    border-top: 1px solid #edf1f6;
}

.support-ticket-sidebar .support-sidebar-field,
.support-ticket-sidebar .support-sidebar-readonly-row {
    width: 100%;
    min-width: 0;
    background: transparent;
    padding: 0;
}

.support-ticket-sidebar .support-sidebar-field + .support-sidebar-field,
.support-ticket-sidebar .support-sidebar-readonly-row,
.support-ticket-sidebar .support-sidebar-readonly-row + .support-sidebar-readonly-row {
    border-top: 0;
    padding-top: 0;
}

.support-sidebar-field > span,
.support-sidebar-field label > span,
.support-sidebar-readonly-row > span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.support-sidebar-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.support-sidebar-field-heading label {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.support-sidebar-field-heading a {
    color: #2563eb;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

.support-sidebar-field-heading a:hover,
.support-sidebar-field-heading a:focus-visible {
    text-decoration: underline;
}

.support-sidebar-field select,
.support-sidebar-field input:not([type="checkbox"]) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.support-ticket-sidebar .searchable-select,
.support-ticket-sidebar .searchable-select-trigger {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.support-ticket-sidebar .searchable-select-trigger {
    overflow: hidden;
}

.support-ticket-sidebar .searchable-select-value {
    flex: 1 1 auto;
    max-width: 100%;
}

.support-sidebar-check {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
}

.support-sidebar-check span {
    color: #172033;
    font-weight: 650;
}

.support-sidebar-readonly-row strong {
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.support-sidebar-textarea-box textarea {
    min-height: 90px;
}

.support-reply-compose textarea {
    min-height: 150px;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    padding: 10px;
}

.support-reply-compose textarea:focus {
    border-color: #2f6df6;
    box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.12);
}

.support-reply-compose {
    border-top: 0;
    padding-top: 0;
}

.support-sidebar-note-form {
    gap: 8px;
}

.support-sidebar-note-form textarea {
    min-height: 105px;
}

.support-public-link-card {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
    border-top: 1px solid #dbe4ef;
    padding-top: 12px;
}

.support-public-link-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.support-public-link-heading > div {
    min-width: 0;
}

.support-public-link-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 14px;
    line-height: 1.35;
}

.support-public-link-heading p,
.support-public-link-once,
.support-public-link-reason {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.support-public-link-card > form button {
    width: 100%;
}

.support-public-link-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    min-width: 0;
}

.support-public-link-copy-row input {
    min-width: 0;
    font-size: 11px;
}

.support-public-link-copy-row .button {
    min-height: 36px;
    padding: 7px 10px;
}

.support-public-link-error {
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff5f5;
    color: #912018;
    padding: 8px 9px;
    font-size: 12px;
    line-height: 1.4;
}

.support-public-link-list {
    display: grid;
    gap: 7px;
}

.support-public-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #e4e9f0;
    padding-top: 8px;
    color: #475569;
    font-size: 11px;
}

.support-public-link-revoke {
    min-height: auto;
    border: 0;
    background: transparent;
    color: #b42318;
    padding: 2px 0;
    font-size: 11px;
}

.support-message-history-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.support-compose-meta-list {
    display: grid;
    border: 0;
    border-top: 1px solid #e4e9f0;
    border-radius: 0;
    overflow: visible;
}

.support-compose-meta-row {
    display: grid;
    grid-template-columns: minmax(78px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    background: #ffffff;
    padding: 9px 10px;
}

.support-compose-meta-row + .support-compose-meta-row {
    border-top: 1px solid #edf1f6;
}

.support-compose-meta-row span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.support-compose-meta-row strong,
.support-compose-meta-row a {
    color: #172033;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.support-compose-note-box {
    display: grid;
    gap: 6px;
    border: 0;
    border-top: 1px solid #d8e9e3;
    border-radius: 0;
    background: transparent;
    padding: 10px 0 0;
}

.support-compose-note-box.is-private {
    border-top-color: #f3d19b;
    background: #fffaf4;
    padding-right: 10px;
    padding-left: 10px;
}

.support-compose-note-box strong {
    color: #334f75;
    font-size: 12px;
    line-height: 1.25;
    text-transform: uppercase;
}

.support-compose-note-box p {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.strategy-status-row,
.strategy-status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.staff-ai-strategy-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    border: 1px solid #bed8f4;
    border-radius: 10px;
    background: #f6faff;
    padding: 14px;
}

.staff-ai-panel-head,
.staff-ai-run-summary,
.staff-ai-suggestion-head,
.staff-ai-prepare-actions,
.staff-ai-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.staff-ai-panel-head h3,
.staff-ai-run-summary h4,
.staff-ai-suggestion-head h5 {
    margin: 0;
}

.staff-ai-panel-head p,
.staff-ai-run-summary p {
    margin: 4px 0 0;
    color: #5f6f83;
    font-size: 13px;
}

.staff-ai-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #245bd6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.staff-ai-badges,
.staff-ai-section-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.staff-ai-section-picker {
    margin: 0;
    border: 0;
    padding: 0;
}

.staff-ai-section-picker legend {
    width: 100%;
    margin-bottom: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.staff-ai-section-picker label,
.staff-ai-suggestion-head label {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.staff-ai-section-picker input,
.staff-ai-suggestion-head input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.staff-ai-run-review,
.staff-ai-suggestion-list {
    display: grid;
    gap: 12px;
}

.staff-ai-source-disclosure {
    overflow: hidden;
    border: 1px solid #d5e3f2;
    border-radius: 8px;
    background: #fff;
}

.staff-ai-source-disclosure summary {
    cursor: pointer;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
}

.staff-ai-source-list {
    border-top: 1px solid #e5edf6;
}

.staff-ai-source-row {
    display: grid;
    grid-template-columns: minmax(140px, .7fr) minmax(220px, 1.4fr) auto;
    align-items: start;
    gap: 10px;
    padding: 9px 12px;
    overflow-wrap: anywhere;
}

.staff-ai-source-row + .staff-ai-source-row {
    border-top: 1px solid #edf2f7;
}

.staff-ai-suggestion-card {
    display: grid;
    gap: 10px;
    border: 1px solid #d5e3f2;
    border-radius: 9px;
    background: #fff;
    padding: 12px;
}

.staff-ai-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.staff-ai-comparison-grid section {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
}

.staff-ai-comparison-grid h5 {
    margin: 0 0 8px;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
}

.staff-ai-rich-preview {
    max-height: 280px;
    overflow: auto;
    color: #27364b;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.staff-ai-rich-preview > :first-child {
    margin-top: 0;
}

.staff-ai-rich-preview > :last-child {
    margin-bottom: 0;
}

.staff-ai-review-reason {
    display: grid;
    gap: 6px;
}

@media (max-width: 700px) {
    .staff-ai-source-row,
    .staff-ai-comparison-grid {
        grid-template-columns: 1fr;
    }

    .staff-ai-source-row .badge {
        justify-self: start;
    }
}

.project-detail-panel .project-strategy-tab {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 0 0;
    box-sizing: border-box;
}

.strategy-status-bar {
    justify-content: space-between;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.strategy-review-grid {
    display: grid;
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    overflow: hidden;
}

.strategy-review-header,
.strategy-review-row {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(150px, 0.55fr) minmax(220px, 1fr) 154px;
    align-items: center;
    padding: 8px 10px;
}

.strategy-review-row + .strategy-review-row {
    border-top: 1px solid #edf1f6;
}

.strategy-review-heading {
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.strategy-review-label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.strategy-review-grid-read p {
    min-height: 34px;
    margin: 0;
    border: 1px solid #e4e9f0;
    border-radius: 7px;
    background: #ffffff;
    padding: 8px 9px;
    overflow-wrap: anywhere;
}

.strategy-review-static {
    color: #64748b;
    font-size: 12px;
}

.strategy-ppc-group {
    margin-bottom: 14px;
    border: 1px solid #cddcec;
    border-radius: 9px;
    background: #f8fbff;
    padding: 10px;
}

.strategy-ppc-group-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-bottom: 9px;
}

.strategy-ppc-group-head h3 {
    margin: 0;
    color: #253b5b;
    font-size: 15px;
}

.strategy-ppc-group-head p {
    margin: 0;
    color: #66758a;
    font-size: 12px;
}

.strategy-ppc-group .strategy-review-grid {
    margin-bottom: 0;
    background: #ffffff;
}

.project-detail-panel .project-strategy-tab .strategy-form-actions {
    position: static;
    bottom: auto;
    z-index: auto;
    margin-top: 16px;
    box-shadow: none;
}

.strategy-content-disclosures {
    display: grid;
    gap: 8px;
}

.strategy-content-disclosure {
    overflow: hidden;
    border: 1px solid #d8e9e3;
    border-radius: 8px;
    background: #ffffff;
}

.strategy-content-disclosure summary {
    display: grid;
    grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    padding: 9px 11px;
}

.strategy-content-disclosure summary::-webkit-details-marker {
    display: none;
}

.strategy-content-disclosure summary:focus-visible {
    outline: 2px solid #7da2f4;
    outline-offset: -2px;
}

.strategy-content-disclosure summary > strong {
    color: #243249;
    font-size: 14px;
    font-weight: 600;
}

.strategy-content-preview {
    overflow: hidden;
    color: #66758a;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.strategy-content-disclosure-action {
    min-width: 48px;
    border: 1px solid #cfd8e5;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    padding: 6px 8px;
}

.strategy-content-hide {
    display: none;
}

.strategy-content-disclosure[open] .strategy-content-view {
    display: none;
}

.strategy-content-disclosure[open] .strategy-content-hide {
    display: inline;
}

.strategy-content-disclosure[open] summary {
    border-bottom: 1px solid #e4e9f0;
}

.strategy-content-disclosure-body {
    max-height: 520px;
    overflow: auto;
    padding: 12px;
    overflow-wrap: anywhere;
}

.strategy-content-disclosure-body > :first-child {
    margin-top: 0;
}

.strategy-content-disclosure-body > :last-child {
    margin-bottom: 0;
}

.strategy-google-doc-link {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 700px) {
    .strategy-content-disclosure summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .strategy-content-preview {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.project-rich-source {
    display: none;
}

.project-rich-editor-field {
    display: block;
}

.small-textarea {
    min-height: 66px;
}

.project-rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid #cfd6e2;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: #ffffff;
    padding: 6px;
    margin-bottom: 0;
}

.project-rich-toolbar button,
.project-rich-toolbar select {
    width: auto;
    min-height: 30px;
    border-color: #cfd6e2;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 9px;
}

.project-rich-toolbar button:hover,
.project-rich-toolbar button:focus,
.project-rich-toolbar select:hover,
.project-rich-toolbar select:focus {
    border-color: var(--blue);
    color: var(--blue);
}

.project-rich-editor {
    width: 100%;
    min-height: 220px;
    margin-top: 0;
    border: 1px solid #cfd6e2;
    border-radius: 0 0 7px 7px;
    background: var(--field);
    color: var(--ink);
    padding: 10px;
    outline: none;
    overflow: auto;
    resize: vertical;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

.project-rich-editor * {
    user-select: text;
    -webkit-user-select: text;
}

.project-rich-editor:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(36, 91, 214, 0.12);
}

.project-rich-editor:empty::before {
    color: #7a8495;
    content: attr(data-placeholder);
}

.project-rich-editor table,
.strategy-rich-block table,
.detail-card table {
    width: 100%;
    border-collapse: collapse;
}

.project-rich-editor th,
.project-rich-editor td,
.strategy-rich-block th,
.strategy-rich-block td,
.detail-card th,
.detail-card td {
    border: 1px solid #d8dee8;
    padding: 6px 8px;
    vertical-align: top;
}

.strategy-bottom-actions {
    display: grid;
    gap: 18px;
    justify-items: center;
    margin-top: 16px;
    padding: 10px 0 2px;
}

.strategy-status-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
}

.strategy-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.strategy-action-row .button {
    min-width: 136px;
    justify-content: center;
}

.button.green-button {
    border-color: #00b894;
    background: #00b894;
    color: #ffffff;
}

.form-panel {
    display: grid;
    gap: 14px;
}

.portal-detail-form-grid {
    display: grid;
    gap: 0;
    border: 1px solid #dbe4ee;
    border-radius: 9px;
    background: #ffffff;
    overflow: hidden;
}

.portal-detail-form-header,
.portal-detail-form-row {
    display: grid;
    grid-template-columns: minmax(145px, 0.52fr) minmax(240px, 1fr) minmax(190px, 0.76fr);
    gap: 12px;
    align-items: start;
    padding: 9px 11px;
}

.portal-detail-form-header {
    background: #f5f8fc;
    color: #52657d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.portal-detail-form-row + .portal-detail-form-row {
    border-top: 1px solid #edf1f6;
}

.portal-detail-field-label {
    padding-top: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.portal-detail-field-control {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.portal-detail-field-control input,
.portal-detail-field-control select,
.portal-detail-field-control textarea {
    width: 100%;
}

.portal-detail-readonly-value {
    min-height: 36px;
    border: 1px solid #d8e2ed;
    border-radius: 7px;
    background: #f8fafc;
    color: #253b5b;
    padding: 8px 9px;
    font-size: 13px;
    line-height: 1.35;
}

.portal-detail-guidance {
    margin: 0;
    padding-top: 7px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.portal-detail-field-control .field-error {
    color: #b42318;
    font-size: 11px;
    line-height: 1.35;
}

.strategy-age-group-field {
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.project-details-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.project-details-form-column {
    display: grid;
    align-content: start;
    gap: 10px;
}

.project-ppc-details-group {
    min-width: 0;
    margin: 0;
    border: 1px solid #cddcec;
    border-radius: 9px;
    background: #f8fbff;
    padding: 12px;
}

.project-ppc-details-group legend {
    padding: 0 6px;
    color: #253b5b;
    font-size: 15px;
    font-weight: 700;
}

.project-ppc-details-group > .field-note {
    display: block;
    margin: 0 0 10px;
}

.portal-project-details-form textarea {
    min-height: 84px;
}

.ads-age-group-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ads-age-group-field legend {
    padding: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 400;
}

.ads-age-group-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.ads-age-group-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    background: var(--field);
    color: var(--ink);
    cursor: pointer;
}

.ads-age-group-option:has(input:checked) {
    border-color: #82a9f8;
    background: #edf4ff;
    color: #175cd3;
}

.ads-age-group-option input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #175cd3;
}

.ads-age-group-option span {
    font-size: 13px;
    line-height: 1.2;
}

.customer-details-split-grid {
    display: grid;
    gap: 18px 28px;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.customer-form-column {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.customer-form-column h3 {
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.form-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.65fr);
    gap: 16px;
    align-items: start;
}

.form-edit-column {
    min-width: 0;
}

.form-edit-grid {
    align-items: start;
}

.form-reference-column {
    display: grid;
    gap: 10px;
    min-width: 0;
    border-left: 1px solid #e4e9f0;
    padding-left: 16px;
}

.form-reference-column h3 {
    margin: 0;
    color: #162033;
    font-size: 13px;
    line-height: 1.25;
}

.field-summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.field-summary-list div {
    display: grid;
    gap: 2px;
}

.field-summary-list dt,
.plain-field .field-label-text {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.field-summary-list dd {
    margin: 0;
    color: #17233a;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.plain-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 64px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
}

.plain-field strong,
.plain-field-inline {
    color: #17233a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.plain-field-inline {
    display: block;
    min-height: 42px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
}

.form-reference-panel {
    border-color: #e4e9f0;
    background: #fbfcfe;
    box-shadow: none;
}

.form-reference-panel .record-meta-grid {
    margin-top: 4px;
}

.form-gate-note {
    display: grid;
    gap: 4px;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
}

.form-gate-note strong {
    color: #334f75;
    font-size: 12px;
    line-height: 1.25;
    text-transform: uppercase;
}

.form-gate-note span {
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
}

.form-panel .panel-title {
    align-items: flex-start;
}

@media (max-width: 900px) {
    .customer-details-split-grid,
    .form-split-grid {
        grid-template-columns: 1fr;
    }

    .portal-detail-form-header {
        display: none;
    }

    .portal-detail-form-row {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 11px;
    }

    .portal-detail-field-label,
    .portal-detail-guidance {
        padding-top: 0;
    }

    .form-reference-column {
        border-left: 0;
        border-top: 1px solid #e4e9f0;
        padding-top: 14px;
        padding-left: 0;
    }
}

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

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.toggle-row input {
    width: auto;
}

.form-footer {
    justify-content: flex-start;
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-top: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
    padding: 10px;
}

.form-footer button:not(.secondary):first-child,
.form-footer .button:not(.secondary):first-child {
    min-width: 150px;
}

.project-save-feedback {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    border: 1px solid #9bd8c6;
    border-radius: 7px;
    background: #e9f8f2;
    color: #08755d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    padding: 7px 11px;
}

.project-save-feedback[hidden] {
    display: none;
}

.project-save-feedback.field-has-error {
    border-color: #f1b5ae;
    background: #fff0ee;
    color: #912018;
}

.project-form-footer {
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .project-form-footer .project-save-feedback {
        flex: 1 0 100%;
    }
}

.audit-module {
    text-transform: capitalize;
}

.timeline-summary {
    min-width: 260px;
    overflow-wrap: anywhere;
}

.empty-state {
    color: var(--muted);
    padding: 18px 10px;
}

.billing-line-table input,
.billing-line-table select {
    margin-top: 0;
}

.billing-line-table {
    min-width: 920px;
    table-layout: fixed;
}

.billing-line-table th,
.billing-line-table td {
    white-space: normal;
}

.billing-line-table tbody td,
.local-line-table tbody td {
    vertical-align: top;
}

.billing-line-items-wrap {
    height: auto;
    max-height: none;
}

.line-item-service-stack {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.line-item-service-stack > .service-scope-editor {
    margin-top: 0;
}

.billing-line-table .line-item-column {
    width: 30%;
}

.billing-line-table .line-number-column {
    width: 14%;
}

.billing-line-table .line-rate-column {
    width: 16%;
}

.billing-line-table .line-tax-column {
    width: 21%;
}

.billing-line-table .line-amount-column {
    width: 13%;
}

.billing-line-table .line-actions-column {
    width: 6%;
    text-align: center;
}

.billing-line-table .line-amount-value {
    display: block;
    text-align: right;
    white-space: nowrap;
}

.billing-line-table .field-note {
    display: block;
    margin-top: 4px;
    white-space: normal;
}

.billing-line-table .compact-inline-field {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.billing-line-table .compact-inline-field input {
    max-width: 120px;
}

.billing-line-table .compact-tax-preview {
    max-width: 132px;
}

.billing-line-table .line-item-actions {
    text-align: center;
    vertical-align: top;
}

.line-icon-button,
.line-add-button {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 22px;
    font-weight: 700;
    justify-content: center;
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 1;
}

.line-icon-button {
    background: #1f66db;
    border-color: #1f66db;
    color: #fff;
}

.line-add-button {
    font-size: 24px;
}

.line-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.pdf-icon-button {
    background: #fff7f7;
    border-color: #fecaca;
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(180, 35, 24, 0.1);
    color: #b42318;
    display: inline-grid;
    line-height: 1;
    width: 38px;
    min-width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
}

.pdf-button-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 30px;
    color: currentColor;
}

.pdf-button-icon::before {
    position: absolute;
    inset: 1px 3px 3px;
    border: 1.8px solid currentColor;
    border-radius: 3px;
    background: #fffdfd;
    content: "";
}

.pdf-button-icon::after {
    position: absolute;
    right: 3px;
    bottom: 0;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.pdf-button-label {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 24px;
    height: 12px;
    border-radius: 2px;
    background: #c9271c;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 6px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.pdf-icon-button:hover,
.pdf-icon-button:focus-visible {
    background: #fff1f1;
    border-color: #f87171;
    box-shadow: 0 4px 14px rgba(180, 35, 24, 0.18);
    color: #991b1b;
}

.pdf-icon-button .pdf-icon-sheet,
.pdf-icon-button .pdf-icon-fold,
.pdf-icon-button .pdf-icon-arrow {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.pdf-icon-button .pdf-icon-label {
    fill: #c9271c;
}

.pdf-icon-button .pdf-icon-text {
    fill: #fff;
    font-family: Arial, sans-serif;
    font-size: 5.3px;
    font-weight: 700;
    letter-spacing: 0;
}

.record-page-header > .actions .button.pdf-icon-button,
.record-page-header > .actions button.pdf-icon-button {
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(180, 35, 24, 0.1);
    color: #b42318;
    margin: -4px 7px -4px 0;
    min-height: 34px;
    padding: 0;
}

.record-page-header > .actions .button.pdf-icon-button:hover,
.record-page-header > .actions .button.pdf-icon-button:focus-visible,
.record-page-header > .actions button.pdf-icon-button:hover,
.record-page-header > .actions button.pdf-icon-button:focus-visible {
    background: #fff1f1;
    border-color: #f87171;
    box-shadow: 0 4px 14px rgba(180, 35, 24, 0.18);
    color: #991b1b;
}

.local-line-table {
    min-width: 1040px;
}

.local-line-table th:nth-child(1),
.local-line-table td:nth-child(1) {
    width: 330px;
}

.local-line-table th:nth-child(2),
.local-line-table td:nth-child(2),
.local-line-table th:nth-child(3),
.local-line-table td:nth-child(3),
.local-line-table th:nth-child(5),
.local-line-table td:nth-child(5),
.local-line-table th:nth-child(9),
.local-line-table td:nth-child(9) {
    width: 86px;
}

.local-line-table th:nth-child(4),
.local-line-table td:nth-child(4) {
    width: 118px;
}

.local-line-table th:nth-child(6),
.local-line-table td:nth-child(6),
.local-line-table th:nth-child(7),
.local-line-table td:nth-child(7),
.local-line-table th:nth-child(8),
.local-line-table td:nth-child(8) {
    width: 116px;
}

.local-line-table .line-item-service-cell {
    vertical-align: top;
}

.local-line-table .line-item-nested-input {
    margin-top: 0;
}

.local-line-table .line-item-unit-custom-input {
    display: block;
    width: 100%;
    margin-top: 6px;
}

.local-line-table .line-item-description-input {
    min-height: 58px;
    resize: vertical;
}

.local-line-table .line-amount-value {
    display: block;
    color: #172033;
    font-size: 13px;
    line-height: 40px;
    text-align: right;
    white-space: nowrap;
}

.local-billing-form-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 20px;
    align-items: start;
    margin-top: 18px;
}

.local-billing-bank-note span {
    white-space: pre-line;
}

.local-billing-live-totals input {
    width: 130px;
    min-height: 34px;
    padding: 6px 8px;
    text-align: right;
}

.billing-total-card {
    align-self: end;
}

.billing-tax-total-card {
    display: grid;
    grid-template-columns: minmax(86px, 0.58fr) minmax(120px, 1fr);
    gap: 4px 12px;
}

.billing-tax-total-card .summary-label {
    align-self: center;
}

.billing-tax-total-card .summary-value {
    text-align: right;
}

.secondary-panel,
.blocked-actions-panel,
.advanced-panel {
    border-color: #e4e9f0;
    background: #fbfcfe;
    box-shadow: none;
}

.primary-work-panel {
    border-color: #bfe5d6;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.primary-work-panel > .panel-title {
    margin-bottom: 12px;
    border-bottom: 1px solid #dff3ed;
    padding-bottom: 10px;
}

.primary-work-panel > .panel-title h2 {
    color: #0f8a70;
}

.primary-work-panel .detail-card,
.primary-work-panel .checkpoint-summary,
.primary-work-panel .project-activity-item,
.primary-work-panel .strategy-status-bar,
.primary-work-panel .strategy-review-grid-read p {
    border-color: #d8e9e3;
    background: #ffffff;
}

.secondary-panel .detail-card,
.advanced-panel .detail-card,
.reference-panel .detail-card {
    background: #f8fafc;
    box-shadow: none;
}

.work-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.recurring-work-panel {
    align-items: flex-start;
    margin-bottom: 12px;
}

.recurring-work-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 8px 0 0;
}

.recurring-work-facts div {
    display: grid;
    gap: 2px;
    min-width: 120px;
}

.recurring-work-facts dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.recurring-work-facts dd {
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.blocked-actions-panel button:disabled,
.advanced-panel button:disabled {
    opacity: 0.66;
}

.advanced-panel {
    padding: 0;
}

.advanced-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    padding: 12px;
}

.advanced-panel > summary::-webkit-details-marker {
    display: none;
}

.advanced-panel > summary::after {
    color: #64748b;
    content: "Open";
    font-size: 12px;
}

.advanced-panel[open] > summary::after {
    content: "Close";
}

.advanced-panel-body {
    border-top: 1px solid #e4e9f0;
    padding: 12px;
}

.checkpoint-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 12px;
    padding: 12px;
}

.checkpoint-summary > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.checkpoint-summary strong {
    color: #172033;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.checkpoint-summary p {
    margin: 0;
    color: #475569;
    overflow-wrap: anywhere;
}

.checkpoint-summary > .badge {
    flex: 0 0 auto;
}

.operations-grid,
.next-step-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 10px;
}

.operation-card,
.next-step-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.next-step-card.is-active {
    border-color: #8bb8ff;
    background: #f2f7ff;
}

.next-step-card.is-ready {
    border-color: #bfe5d6;
    background: #f3fbf7;
}

.next-step-card.is-blocked {
    border-color: #f3d19b;
    background: #fff9ed;
}

.operation-card strong,
.next-step-card strong {
    color: #334f75;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.operation-card span,
.next-step-card span {
    color: #172033;
    overflow-wrap: anywhere;
}

.module-intent-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.module-intent-row .badge {
    min-height: 22px;
}

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

.check-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 18px;
}

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

.auth-page {
    display: grid;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 24px;
}

.auth-link-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: 13px;
}

.auth-link-row a {
    font-weight: 600;
}

.auth-help {
    margin-top: 12px;
}

.quick-login {
    display: grid;
    gap: 9px;
    margin-top: 18px;
    border-top: 1px solid #e4e9f0;
    padding-top: 16px;
}

.install-page {
    align-items: start;
}

.install-box {
    max-width: 880px;
}

.install-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.install-section {
    display: grid;
    gap: 12px;
    border-top: 1px solid #e4e9f0;
    padding: 16px 0;
}

.install-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.install-checks {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.install-checks li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    padding: 10px;
}

.install-checks li > span {
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
}

.install-checks li.pass > span {
    background: #eaf7f1;
    color: var(--green);
}

.install-checks li.fail > span {
    background: #fff0ee;
    color: var(--red);
}

.install-checks strong,
.install-checks small {
    display: block;
}

.install-checks small {
    margin-top: 2px;
    color: var(--muted);
}

.install-form {
    display: grid;
    gap: 0;
}

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

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

.install-checkbox {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    font-weight: 500;
}

.install-checkbox input {
    width: 16px;
    min-height: 16px;
    margin-top: 2px;
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .record-detail-shell {
        grid-template-columns: 1fr;
        height: auto;
        margin-left: 0;
        overflow: visible;
    }

    .record-detail-main {
        max-height: none;
        overflow-y: visible;
        border-left: 0;
        background: transparent;
        padding-right: 0;
        padding-left: 0;
    }

    .record-detail-rail {
        display: none;
    }

    .record-section-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .record-section-tabs a {
        flex: 0 0 auto;
    }

    .settings-navigation {
        top: 96px;
    }

    .sidebar {
        position: static;
        height: auto;
    }

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

    .sidebar-note {
        margin-top: 0;
    }
}

@media (max-width: 900px) {
    .topbar,
    .filters,
    .grid.two,
    .grid.three,
    .project-details-input-grid,
    .project-ops-grid,
    .project-ops-bottom-grid,
    .module-summary,
    .audit-summary,
    .settings-detail-summary,
    .settings-link-list,
    .setting-detail-grid,
    .record-hero,
    .record-summary-list-grid,
    .invoice-preview-parties,
    .invoice-preview-meta,
    .invoice-preview-bottom,
    .record-meta-grid,
    .detail-section-grid,
    .support-message-form-grid,
    .support-compose-card,
    .support-ticket-subject-block,
    .recurring-key-grid,
    .recurring-detail-grid,
    .operations-grid,
    .next-step-grid,
    .payment-form-grid,
    .payment-tds-panel,
    .payment-due-summary,
    .strategy-review-header,
    .strategy-review-row,
    .meta-list,
    .permission-summary-grid,
    .placeholder-grid,
    .local-billing-form-summary {
        grid-template-columns: 1fr;
    }

    .payment-due-summary div {
        border-right: 0;
        border-top: 1px solid #dbe4f0;
    }

    .payment-due-summary div:first-child {
        border-top: 0;
    }

    .support-ticket-subject-meta {
        justify-items: start;
    }

    .support-ticket-subject-meta > span {
        text-align: left;
    }

    .support-ticket-subject-meta .badge-row {
        justify-content: flex-start;
    }

    .support-ticket-sidebar {
        max-width: none;
    }

    .topbar {
        align-items: stretch;
    }

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

    .settings-navigation {
        position: static;
        top: auto;
    }

    .settings-local-form--support .setting-field-list {
        grid-template-columns: 1fr;
    }

    .backup-schedule-grid {
        grid-template-columns: 1fr;
    }

    .settings-local-form--support .setting-field-row em {
        min-height: 0;
    }

    .top-actions,
    .company-access-head,
    .section-head,
    .page-header,
    .panel-title,
    .support-thread-head,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .record-summary-head,
    .record-action-strip {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .record-summary-head {
        flex-direction: column;
    }

    .checkpoint-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .checkpoint-summary > .badge {
        align-self: flex-start;
    }

    .payment-month-column-form {
        align-items: stretch;
        flex-direction: column;
        margin-left: 0;
        width: 100%;
    }

    .payment-month-column-form input,
    .payment-month-column-form button {
        width: 100%;
    }

    .record-summary-title {
        min-width: 0;
    }

    .record-summary-list + .record-summary-list {
        border-top: 1px solid #e4e9f0;
        border-left: 0;
    }

    .support-compose-sidebar {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 14px;
        padding-left: 0;
    }

    .record-summary-list-row {
        grid-template-columns: minmax(94px, 0.38fr) minmax(0, 1fr);
    }

    .invoice-preview-document {
        gap: 18px;
        padding: 18px;
    }

    .invoice-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-preview-title {
        justify-items: start;
        text-align: left;
    }

    .invoice-preview-meta div,
    .invoice-preview-meta div:nth-child(3n),
    .invoice-preview-meta div:nth-last-child(-n + 3) {
        border-right: 0;
        border-bottom: 1px solid #e4e9f0;
    }

    .invoice-preview-meta div:last-child {
        border-bottom: 0;
    }

    .invoice-preview-bottom {
        gap: 16px;
    }

    .local-billing-live-totals input {
        width: 100%;
    }

    .recurring-page-header {
        align-items: stretch;
    }

    .recurring-page-header .actions {
        align-items: center;
        flex-direction: row;
        justify-content: flex-start;
    }

    .recurring-status-head,
    .recurring-next-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .recurring-info-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .recurring-section-nav a {
        flex: 1 1 auto;
    }

    .record-hero > .record-meta-grid > div:nth-child(-n + 3) {
        border-top: 1px solid #e4e9f0;
    }

    .record-hero > .record-meta-grid > div,
    .record-hero > .record-meta-grid > div:not(:nth-child(3n)) {
        border-right: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .record-hero > .record-meta-grid > div:first-child {
        border-top: 0;
    }

    .page-title-strip,
    .content > .page-title-strip ~ .page-header {
        display: flex;
        margin: 0 0 10px;
    }

    .content > .page-title-strip ~ .record-page-header,
    .content > .page-title-strip:has(~ .record-page-header) {
        position: static;
        min-height: 0;
        border-bottom: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .content {
        display: block;
    }

    .content > .page-title-strip ~ .page-header > div:first-child {
        display: block;
    }

    .content > .page-title-strip ~ .project-record-page-header > div:first-child {
        align-self: stretch;
    }

    .content > .page-title-strip ~ .page-header h1,
    .content > .page-title-strip ~ .page-header .muted,
    .content > .page-title-strip ~ .page-header > .actions {
        grid-column: auto;
        grid-row: auto;
        justify-self: stretch;
    }

    .content > .page-title-strip ~ .page-header .muted {
        margin: 2px 0 0;
    }

    .content > .page-title-strip ~ .page-header h1::before {
        content: none;
    }

    .content > .page-title-strip:has(~ .record-page-header) h1::after {
        content: none;
    }

    .page-header > .actions,
    .content > .page-title-strip ~ .page-header > .actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .button,
    button {
        justify-content: center;
        min-height: 44px;
        width: 100%;
    }

    .settings-page-shell .button,
    .settings-page-shell button {
        width: auto;
    }

    .settings-page-shell .settings-help-trigger {
        width: 20px;
        min-height: 20px;
        height: 20px;
    }

    .settings-page-shell .settings-detail-summary {
        grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    .searchable-select-trigger {
        min-height: 44px;
    }

    .button.compact,
    button.compact,
    .customer-portal-shell .content .button,
    .customer-portal-shell .content button,
    .portal-topbar-actions .button,
    .portal-topbar-actions button {
        min-height: 44px;
    }

    .content > .page-title-strip ~ .operational-list-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .content > .page-title-strip ~ .operational-list-header > .actions {
        align-items: center;
        flex-direction: row;
        width: auto;
    }

    .content > .page-title-strip ~ .operational-list-header > .actions .button {
        width: auto;
    }

    .content > .page-title-strip ~ .operational-list-header > .operational-result-count::before {
        content: none;
    }

    .record-page-header > .actions .button.pdf-icon-button,
    .record-page-header > .actions button.pdf-icon-button {
        align-self: flex-start;
        flex: 0 0 38px;
        min-width: 38px;
        width: 38px;
    }

    .recurring-page-header .actions {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: auto;
    }

    .recurring-page-header .actions .button {
        flex: 0 0 auto;
        min-width: 72px;
        width: auto;
    }

    .filters {
        align-items: stretch;
    }

    .filters .filter-fields {
        display: flex;
        flex: 1 1 100%;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .filters label,
    .filters label:first-child,
    .filters.module-list-filters label:first-of-type,
    .filters.module-list-filters .list-view-filter,
    .filters.module-list-filters .list-view-quick-actions,
    .filters.module-list-filters .list-search-field,
    .filters.module-list-filters label.list-search-field:first-of-type,
    .filters.module-list-filters.customers-list-filters .customer-shortlist-filter {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .filters.module-list-filters.customers-list-filters .list-view-quick-actions,
    .filters.module-list-filters.customers-list-filters .compact-filter-field,
    .filters.module-list-filters.customers-list-filters .customer-follow-up-filter,
    .filters.module-list-filters.customers-list-filters .list-more-filters,
    .filters.module-list-filters.customers-list-filters .list-table-options {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .filters .button,
    .filters button,
    .filters .module-sync-form {
        width: 100%;
    }

    .filters.module-list-filters .list-view-quick-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .filters.module-list-filters .list-view-quick-actions .button {
        flex: 0 0 auto;
        width: auto;
    }

    .list-more-filters > summary,
    .list-table-options > summary {
        min-height: 44px;
    }

    .list-more-filter-fields,
    .list-table-option-fields,
    .bulk-selection-context {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .list-more-filter-fields > label,
    .list-more-filter-fields > .button,
    .list-more-filter-fields > button,
    .list-table-option-fields > form,
    .bulk-selection-context > label,
    .bulk-selection-context > .button,
    .bulk-selection-context > button {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .filters.module-list-filters .list-more-filter-fields .list-view-quick-actions.is-secondary-view-actions {
        display: grid;
        gap: 4px;
        overflow-x: visible;
        white-space: normal;
    }

    .filters.module-list-filters .list-more-filter-fields .is-secondary-view-actions .filter-quick-button {
        justify-content: flex-start;
        width: 100%;
        white-space: normal;
    }

    .filters.module-list-filters.customers-list-filters .customer-filter-actions,
    .filters.module-list-filters.projects-list-filters .project-filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .support-summary-action {
        margin-left: 0;
    }

    .support-list-filters > .module-sync-form,
    .support-list-filters > .button {
        flex: 1 1 calc(50% - 3px);
        width: auto;
    }

    .support-list-filters > .module-sync-form .button {
        width: 100%;
    }

    .role-modal {
        padding: 14px;
    }

    .role-modal-window {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 28px);
    }

    .role-modal-header,
    .role-modal-footer,
    .role-permissions-header {
        align-items: stretch;
        flex-direction: column;
    }

    .role-modal-close,
    .role-icon-button {
        flex: 0 0 auto;
        width: 34px;
    }

    .role-modal-header .role-modal-close {
        align-self: flex-end;
        margin-top: -34px;
    }

    .role-modal-header h2 {
        width: calc(100% - 46px);
    }

    .role-permission-bulk-actions {
        justify-content: flex-start;
    }

    .role-permission-bulk-actions .button {
        width: auto;
    }

    .permission-children {
        padding-left: 18px;
    }

    .permission-matrix-row {
        grid-template-columns: minmax(150px, 1.4fr) repeat(var(--permission-action-count), minmax(76px, 0.7fr));
        min-width: calc(150px + (var(--permission-action-count) * 76px));
    }

    .role-permission-row {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .role-permission-row-head {
        display: none;
    }

    .role-permission-access {
        grid-column: 2;
    }

    .role-permission-row small {
        grid-column: 2;
        text-align: left;
    }

    .sales-dashboard-actions .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .table.is-record-table.is-mobile-list-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .table.is-record-table.is-mobile-list-table [data-mobile-hidden="true"] {
        display: none !important;
    }

    .table.is-record-table.is-mobile-list-table .mobile-record-only {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .table.is-record-table.is-mobile-list-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .table.is-record-table.is-mobile-list-table tbody {
        display: grid;
        gap: 8px;
    }

    .table.is-record-table.is-mobile-list-table tbody tr {
        display: grid;
        overflow: hidden;
        border: 1px solid #dce2ea;
        border-radius: 8px;
        background: #ffffff;
    }

    .table.is-record-table.is-mobile-list-table th:first-child,
    .table.is-record-table.is-mobile-list-table td:first-child,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td:first-child,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td:first-child,
    .table.is-record-table.is-mobile-list-table tr.is-selected td:first-child {
        position: static;
        left: auto;
        z-index: auto;
        background: transparent;
        box-shadow: none;
    }

    .table.is-record-table.is-mobile-list-table td,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td {
        display: grid;
        grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        height: auto;
        min-width: 0;
        min-height: var(--table-row-height);
        border-right: 0;
        background: transparent;
        padding: 9px 10px;
        text-align: left;
        white-space: normal;
    }

    .table.is-record-table.is-mobile-list-table td:last-child {
        border-bottom: 0;
    }

    .table.is-record-table.is-mobile-list-table td::before {
        color: #64748b;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .table.is-record-table.is-mobile-list-table td:not([data-label])::before,
    .table.is-record-table.is-mobile-list-table td[data-label=""]::before {
        content: none;
    }

    .table.is-record-table.is-mobile-list-table .amount-cell,
    .table.is-record-table.is-mobile-list-table .action-cell {
        text-align: left;
    }

    .table.is-record-table.is-mobile-list-table .action-cell {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .table.local-invoice-list-table.is-mobile-list-table td.action-cell {
        min-height: 72px;
    }

    .table.is-record-table.is-mobile-list-table .action-cell a,
    .table.is-record-table.is-mobile-list-table .role-action-buttons {
        justify-self: start;
    }

    .table.is-record-table.is-mobile-list-table .empty-state {
        display: block;
        padding: 12px;
        text-align: left;
    }

    .table.is-record-table.is-mobile-list-table .empty-state::before {
        content: none;
    }

    .table.is-record-table.is-mobile-list-table td.invoice-select-cell,
    .table.is-record-table.is-mobile-list-table td.support-select-cell,
    .table.is-record-table.is-mobile-list-table td.customer-select-cell,
    .table.is-record-table.is-mobile-list-table td.project-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td.invoice-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td.support-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td.customer-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:nth-child(even):not(.is-selected) td.project-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td.invoice-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td.support-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td.customer-select-cell,
    .table.is-record-table.is-mobile-list-table tbody tr:hover td.project-select-cell,
    .table.is-record-table.is-mobile-list-table tr.is-selected td.invoice-select-cell,
    .table.is-record-table.is-mobile-list-table tr.is-selected td.support-select-cell,
    .table.is-record-table.is-mobile-list-table tr.is-selected td.customer-select-cell,
    .table.is-record-table.is-mobile-list-table tr.is-selected td.project-select-cell {
        display: flex;
        grid-template-columns: none;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        max-width: none;
        background: transparent;
    }

    .table.is-record-table.is-mobile-list-table .record-selection-hit-area {
        min-width: 44px;
        min-height: 44px;
    }

    .table.is-record-table.is-mobile-list-table tbody tr.is-selected {
        border-color: #b8caf6;
        background: #eef4ff;
    }

    .table.customer-monthly-table.is-mobile-list-table tbody tr.is-no-recurring-invoice-india-no-gst:not(.is-selected) {
        border-color: #e8c86b;
        background: #fff4bf;
    }

    .table.customer-monthly-table.is-mobile-list-table tbody tr.is-no-recurring-invoice-other:not(.is-selected) {
        border-color: #bfd0ee;
        background: #eef4ff;
    }

    .support-bulk-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .support-bulk-toolbar .button {
        min-height: 44px;
        width: 100%;
    }

    .support-select-all {
        min-height: 44px;
    }

    .customer-select-all,
    .project-select-all,
    .invoice-select-all {
        min-height: 44px;
    }

    .table.is-record-table.is-mobile-list-table .table-link,
    .table.is-record-table.is-mobile-list-table .action-cell > a {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }

    .table.customer-monthly-table.is-mobile-list-table,
    .table.project-list-table.is-mobile-list-table,
    .table.support-ticket-table.is-mobile-list-table,
    .table.portal-record-table.is-mobile-list-table {
        min-width: 0;
        table-layout: auto;
    }

    .table.customer-monthly-table.is-mobile-list-table .customer-company-cell,
    .table.customer-monthly-table.is-mobile-list-table.has-customer-selection .customer-company-cell {
        position: static;
        left: auto;
        z-index: auto;
        width: auto;
        min-width: 0;
        max-width: none;
        background: transparent;
        box-shadow: none;
    }

    .table.customer-monthly-table.is-mobile-list-table .customer-company-cell .entity-cell.is-stacked {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .table.customer-monthly-table.is-mobile-list-table .customer-company-cell .entity-meta,
    .table.customer-monthly-table.is-mobile-list-table .customer-company-cell .entity-title,
    .table.customer-monthly-table.is-mobile-list-table .customer-company-cell .table-link {
        white-space: normal;
    }

    .table.project-list-table.is-mobile-list-table .project-identity-cell .entity-cell {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .table.project-list-table.is-mobile-list-table .project-identity-cell .entity-title,
    .table.project-list-table.is-mobile-list-table .project-identity-cell .table-link,
    .table.project-list-table.is-mobile-list-table .project-identity-cell .entity-meta {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .table.is-record-table.is-mobile-list-table .mobile-state-group {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .table.project-ops-project-table.is-mobile-list-table {
        table-layout: auto;
    }

    .table.project-ops-project-table.is-mobile-list-table col {
        width: auto;
    }

    .table {
        min-width: 660px;
    }

    .content {
        padding-bottom: 0;
    }
}

@media (max-width: 560px) {
    .main {
        padding: 14px;
    }

    .topbar {
        margin: -14px -14px 14px;
        padding: 14px;
    }

    .header-metrics {
        flex-wrap: wrap;
        justify-content: flex-start;
        row-gap: 6px;
    }

    .settings-page-shell .settings-detail-summary {
        grid-template-columns: 1fr;
    }

    .settings-page-shell .settings-detail-summary .summary-card {
        max-width: none;
    }

    .settings-help-tooltip {
        position: fixed;
        top: auto;
        right: 20px;
        bottom: 72px;
        left: 20px;
        width: auto;
        max-width: none;
    }

    .nav-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .my-task-trigger,
    .my-task-form button,
    .my-task-tabs button,
    .my-task-close {
        width: auto;
    }
}

.app-shell :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.public-intake-share-actions {
    align-items: center;
    flex-wrap: wrap;
}

.project-details-email-share-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.project-details-email-share-form .project-details-email-confirmation {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.project-details-email-share-form .project-details-email-confirmation input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--blue);
}

.public-intake-share-actions > button,
.public-intake-share-actions > .button,
.project-details-email-share-form .button {
    width: auto;
}

.public-intake-share-note {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .public-intake-share-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .public-intake-share-actions > button,
    .public-intake-share-actions > .button,
    .project-details-email-share-form {
        width: 100%;
    }

    .project-details-email-share-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .project-details-email-share-form .project-details-email-confirmation {
        min-width: 0;
        white-space: normal;
    }

    .project-details-email-share-form .project-details-email-confirmation span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .project-details-email-share-form .button {
        width: auto;
    }
}

.owner-dashboard-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.owner-dashboard-filters {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(190px, 1.1fr) minmax(95px, 0.55fr) auto;
    align-items: end;
    gap: 8px;
}

.owner-dashboard-filters label {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.owner-dashboard-filters input,
.owner-dashboard-filters select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    color: var(--text);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.owner-dashboard-custom-dates {
    display: none;
    grid-column: 1 / -1;
    min-width: 0;
}

.owner-dashboard-custom-dates[open] {
    display: block;
}

.owner-dashboard-custom-dates > summary,
.owner-dashboard-quick-add > summary {
    color: #334155;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.owner-dashboard-custom-dates > summary {
    display: none;
}

.owner-dashboard-custom-date-fields,
.owner-dashboard-custom-dates:not([open]) > .owner-dashboard-custom-date-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 230px));
    gap: 8px;
    padding-top: 2px;
}

.owner-dashboard-filter-actions,
.owner-dashboard-quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.owner-dashboard-quick-add > summary {
    display: none;
}

.owner-dashboard-quick-add:not([open]) > .owner-dashboard-quick-actions {
    display: flex;
}

.owner-dashboard-filter-actions .button,
.owner-dashboard-quick-actions .button {
    width: auto;
}

.owner-dashboard-quick-actions {
    padding-top: 2px;
}

.owner-dashboard-scope-note {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.owner-dashboard-panel-title h2 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.owner-dashboard-panel-title > div > span {
    color: var(--muted);
    font-size: 12px;
}

.owner-dashboard-scope-disclosure > summary {
    width: max-content;
    color: #475569;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.owner-dashboard-inline-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.owner-dashboard-chart-grid,
.owner-dashboard-action-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

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

.owner-dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.owner-dashboard-chart-panel,
.owner-dashboard-table-panel {
    min-width: 0;
}

.owner-dashboard-panel-title {
    align-items: flex-start;
    gap: 12px;
}

.owner-dashboard-panel-title > div {
    display: grid;
    gap: 3px;
}

.owner-chart-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: -4px 0 7px;
    color: var(--muted);
    font-size: 11px;
}

.owner-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.owner-chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: #64748b;
}

.owner-chart-legend i.is-collected {
    background: #059669;
}

.owner-chart-legend i.is-created,
.owner-month-bar.is-created {
    background: #2563eb;
}

.owner-chart-legend i.is-paid,
.owner-month-bar.is-paid,
.owner-chart-legend i.is-paid-gst,
.owner-month-bar.is-paid-gst {
    background: #059669;
}

.owner-chart-legend i.is-unpaid-gst,
.owner-month-bar.is-unpaid-gst {
    background: #ea580c;
}

.owner-chart-filter {
    display: grid;
    gap: 3px;
    min-width: 170px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.owner-chart-filter select {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    padding: 6px 28px 6px 9px;
    color: var(--text);
    font-size: 12px;
    letter-spacing: normal;
    text-transform: none;
}

.owner-month-chart-scroll {
    overflow-x: auto;
    padding: 4px 0 2px;
}

.owner-month-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
    align-items: end;
    gap: 7px;
    min-width: 640px;
    height: 250px;
    border-bottom: 1px solid var(--line);
    padding: 20px 4px 0;
}

.owner-month-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 16px 18px;
    align-items: end;
    gap: 3px;
    height: 100%;
    min-width: 0;
    text-align: center;
}

.owner-month-chart.is-grouped .owner-month-column {
    grid-template-rows: minmax(0, 1fr) 18px;
}

.owner-month-chart.is-grouped.has-count .owner-month-column {
    grid-template-rows: minmax(0, 1fr) 16px 18px;
}

.owner-month-count {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-month-column > strong {
    color: #475569;
    font-size: 10px;
    white-space: nowrap;
}

.owner-month-bar-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 5px 5px 0 0;
    background: #f1f5f9;
}

.owner-month-bar-track.is-grouped {
    gap: 3px;
    padding: 0 4px;
}

.owner-month-bar {
    --owner-month-bar-color: var(--blue);
    position: relative;
    display: block;
    width: min(24px, 68%);
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: var(--owner-month-bar-color);
}

.owner-month-bar-track.is-grouped .owner-month-bar {
    width: calc(50% - 2px);
}

.owner-month-bar.is-invoiced {
    --owner-month-bar-color: #64748b;
}

.owner-month-bar.is-collected {
    --owner-month-bar-color: #059669;
}

.owner-month-bar.is-created {
    --owner-month-bar-color: #2563eb;
}

.owner-month-bar.is-paid,
.owner-month-bar.is-paid-gst {
    --owner-month-bar-color: #059669;
}

.owner-month-bar.is-unpaid-gst {
    --owner-month-bar-color: #ea580c;
}

.owner-month-bar-label {
    position: absolute;
    top: 6px;
    left: 50%;
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.05;
    pointer-events: none;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.18);
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: translateX(-50%) rotate(180deg);
}

.owner-month-bar-label[hidden] {
    display: none;
}

.owner-month-bar.is-short .owner-month-bar-label {
    top: auto;
    bottom: calc(100% + 5px);
    color: var(--owner-month-bar-color);
    text-shadow: none;
    writing-mode: horizontal-tb;
    transform: translateX(-50%);
}

.owner-horizontal-chart {
    display: grid;
    gap: 14px;
    padding: 5px 0 3px;
}

.owner-horizontal-row {
    display: grid;
    gap: 5px;
}

.owner-horizontal-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #334155;
    font-size: 12px;
}

.owner-horizontal-row-heading span {
    min-width: 0;
}

.owner-horizontal-row-heading small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    border-radius: 999px;
    background: #eef2f7;
    padding: 2px 6px;
    color: #475569;
    font-size: 10px;
}

.owner-horizontal-row-heading strong {
    flex: 0 0 auto;
    color: var(--navy);
    font-size: 12px;
}

.owner-horizontal-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.owner-horizontal-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.owner-horizontal-track .is-pipeline {
    background: var(--blue);
}

.owner-horizontal-track .is-aging {
    background: #dc2626;
}

.owner-dashboard-table-panel {
    margin-bottom: 18px;
}

.owner-dashboard-action-grid .owner-dashboard-table-panel {
    margin-bottom: 0;
}

.owner-dashboard-table-panel .table {
    min-width: 760px;
}

.owner-dashboard-action-grid .table {
    min-width: 590px;
}

.owner-table-meta {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.owner-warning-row td {
    background: #fff7ed;
}

.owner-reason-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

@media (max-width: 1180px) {
    .owner-dashboard-filters {
        grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.1fr) minmax(90px, 0.55fr) auto;
    }

    .owner-dashboard-custom-dates {
        grid-column: 1 / -1;
    }

    .owner-dashboard-filter-actions {
        align-self: end;
    }
}

@media (max-width: 980px) {
    .owner-dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .owner-dashboard-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-dashboard-filter-actions,
    .owner-dashboard-quick-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .owner-dashboard-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-dashboard-custom-dates {
        display: block;
        grid-column: 1 / -1;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: #f8fafc;
    }

    .owner-dashboard-custom-dates > summary,
    .owner-dashboard-quick-add > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 36px;
        padding: 8px 10px;
        list-style: none;
    }

    .owner-dashboard-custom-dates > summary::after,
    .owner-dashboard-quick-add > summary::after {
        content: "+";
        color: var(--blue);
        font-size: 16px;
    }

    .owner-dashboard-custom-dates[open] > summary::after,
    .owner-dashboard-quick-add[open] > summary::after {
        content: "−";
    }

    .owner-dashboard-custom-dates:not([open]) > .owner-dashboard-custom-date-fields,
    .owner-dashboard-quick-add:not([open]) > .owner-dashboard-quick-actions {
        display: none;
    }

    .owner-dashboard-custom-date-fields {
        grid-template-columns: 1fr;
        padding: 0 10px 10px;
    }

    .owner-dashboard-quick-add {
        border-top: 1px solid var(--line);
        padding-top: 8px;
    }

    .owner-dashboard-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 0;
        padding: 2px 0 0;
    }

    .owner-dashboard-filter-actions .button,
    .owner-dashboard-quick-actions .button,
    .owner-dashboard-panel-title .button {
        width: 100%;
    }

    .owner-dashboard-panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .owner-dashboard-inline-links {
        justify-content: flex-start;
    }
}

/* Common dashboard and personal activity */
.common-dashboard-tabs {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 0 0 14px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: thin;
}

.common-dashboard-tab {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-control);
    color: #344054;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 400;
    min-height: 32px;
    padding: 5px 10px;
    text-decoration: none;
}

.common-dashboard-tab:hover,
.common-dashboard-tab:focus-visible {
    border-color: #b7d9ce;
    background: #fff;
    color: var(--green);
}

.common-dashboard-tab.is-active {
    background: #fff;
    border-color: var(--green);
    color: var(--green);
    font-weight: 500;
}

.your-dashboard {
    display: grid;
    gap: 14px;
}

.your-dashboard-top-row {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
}

.your-dashboard-top-row > *,
.your-dashboard-controls-column {
    min-width: 0;
}

.your-dashboard-controls-column {
    display: grid;
    gap: 14px;
}

.dashboard-attendance-card {
    margin: 0;
}

.dashboard-attendance-card .panel-title {
    align-items: flex-start;
    flex-direction: column;
}

.dashboard-attendance-card .badge {
    white-space: normal;
}

.dashboard-attendance-actions,
.dashboard-attendance-current {
    display: grid;
    gap: 10px;
}

.dashboard-attendance-actions form,
.dashboard-attendance-current form {
    margin: 0;
}

.dashboard-attendance-actions .button,
.dashboard-attendance-current .button {
    justify-content: center;
    width: 100%;
}

.dashboard-attendance-card .notice,
.dashboard-attendance-card .field-note {
    overflow-wrap: anywhere;
}

.dashboard-attendance-resume-actions {
    border-top: 1px solid #e3e8ee;
    padding-top: 10px;
}

.attendance-resume-actions {
    display: grid;
    gap: 8px;
}

.attendance-resume-actions .placeholder-form {
    margin: 0;
}

.dashboard-attendance-overview {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
}

.dashboard-attendance-overview > .panel {
    margin: 0;
    min-width: 0;
}

.dashboard-attendance-month-tabs {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-attendance-month-tabs .button {
    justify-content: center;
}

.dashboard-attendance-month-tabs .is-active {
    background: #ffffff;
    border-color: var(--green);
    color: var(--green);
    font-weight: 500;
}

.dashboard-attendance-month-label {
    align-items: center;
    color: #667489;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    margin-top: 12px;
}

.dashboard-attendance-month-label strong {
    color: #34475d;
}

.dashboard-attendance-metrics {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 8px;
}

.dashboard-attendance-metric {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    min-height: 58px;
    padding: 8px;
    text-align: center;
}

.dashboard-attendance-metric strong {
    color: #101828;
    font-size: 15px;
    font-weight: 500;
}

.dashboard-attendance-metric span {
    color: #69778a;
    font-size: 11px;
}

.dashboard-monthly-attendance > .field-note {
    display: block;
    margin-top: 10px;
}

.dashboard-team-attendance-list {
    display: grid;
}

.dashboard-team-attendance-row {
    align-items: center;
    border-top: 1px solid #e7ebf0;
    display: grid;
    gap: 9px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 0;
}

.dashboard-team-attendance-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.attendance-status-dot {
    background: #9ba6b3;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgb(155 166 179 / 14%);
    height: 9px;
    width: 9px;
}

.attendance-status-dot.is-green {
    background: #1f9d67;
    box-shadow: 0 0 0 3px rgb(31 157 103 / 14%);
}

.attendance-status-dot.is-red {
    background: #c94a4a;
    box-shadow: 0 0 0 3px rgb(201 74 74 / 14%);
}

.attendance-status-dot.is-amber {
    background: #d99016;
    box-shadow: 0 0 0 3px rgb(217 144 22 / 16%);
}

.dashboard-attendance-card .notice.is-amber {
    background: #fff8e4;
    border-color: #efd39b;
}

.dashboard-team-attendance-name,
.dashboard-team-attendance-state {
    display: grid;
    min-width: 0;
}

.dashboard-team-attendance-name strong,
.dashboard-team-attendance-state strong {
    color: #34475d;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-team-attendance-name small,
.dashboard-team-attendance-state small {
    color: #7b8796;
    font-size: 10px;
}

.dashboard-team-attendance-state {
    text-align: right;
}

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

.your-dashboard-summary-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    box-shadow: none;
    min-width: 0;
    padding: 10px 12px;
}

.your-dashboard-summary-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.your-dashboard-summary-head > span {
    color: #344054;
    font-size: 12px;
    font-weight: 500;
}

.your-dashboard-summary-count {
    align-items: center;
    background: #ffffff;
    border: 1px solid #b7d9ce;
    border-radius: 7px;
    color: var(--green);
    display: inline-flex;
    font-size: 15px;
    font-weight: 500;
    height: 30px;
    justify-content: center;
    min-width: 30px;
    padding: 0 8px;
    text-decoration: none;
}

button.your-dashboard-summary-count {
    cursor: pointer;
}

.your-dashboard-name-list {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.your-dashboard-name-list a,
.your-dashboard-name-list button {
    background: transparent;
    border: 0;
    color: var(--green);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 12px;
    gap: 6px;
    justify-content: space-between;
    min-width: 0;
    padding: 2px 0;
    text-align: left;
    text-decoration: none;
}

.your-dashboard-name-list a span,
.your-dashboard-name-list button {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.your-dashboard-name-list small {
    color: #7c8999;
    flex: 0 0 auto;
}

.your-dashboard-activity-panel {
    margin: 0;
}

.dashboard-activity-entry-card {
    margin: 0;
}

.dashboard-activity-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.dashboard-activity-composer {
    background: #f7f9fc;
    border: 1px solid #dce4ed;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.dashboard-activity-composer > summary {
    color: #294866;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-activity-form {
    margin-top: 12px;
}

.dashboard-activity-submit {
    justify-self: start;
    margin-top: 10px;
    width: auto;
}

.dashboard-activity-form-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-activity-form-grid label {
    margin: 0;
}

.dashboard-activity-form-grid > * {
    min-width: 0;
}

.dashboard-activity-static-type {
    display: grid;
    gap: 6px;
}

.dashboard-activity-static-type strong {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    color: #294866;
    display: flex;
    min-height: 38px;
    padding: 8px 11px;
}

.dashboard-activity-result-field {
    grid-column: auto;
}

.dashboard-activity-result-field textarea {
    min-height: 78px;
    resize: vertical;
}

.dashboard-project-update-option {
    align-self: end;
    background: #fff;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    padding: 8px 10px;
}

.dashboard-project-update-option .dashboard-compact-check {
    color: #294866;
    margin: 0;
}

.dashboard-project-update-option .field-note {
    display: block;
    margin: 4px 0 0 24px;
}

.dashboard-customer-visibility-option {
    border-top: 1px solid #e4e9ef;
    margin-top: 8px;
    padding-top: 8px;
}

.activity-slot-add {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.activity-slot-add:hover,
.activity-slot-add:focus-visible {
    color: #704900;
    text-decoration: underline;
}

.activity-history-page {
    min-width: 0;
}

.activity-history-heading {
    align-items: flex-start;
    margin-bottom: 8px;
}

.activity-history-heading h1 {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.activity-history-heading .muted {
    color: var(--muted);
    font-weight: 300;
    margin: 0;
    max-width: 920px;
}

.activity-history-heading > .actions {
    flex: 0 0 auto;
}

.activity-history-filters {
    margin-bottom: 0;
    padding: 8px 10px;
}

.activity-history-filter-toolbar {
    align-items: end;
    display: grid;
    gap: 8px 12px;
    grid-template-columns: max-content minmax(0, 1fr);
}

.activity-history-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
}

.activity-history-filter-form label {
    display: grid;
    flex: 0 1 auto;
    gap: 3px;
    margin: 0;
    min-width: 0;
}

.activity-history-subject-field {
    flex-basis: 330px !important;
    flex-grow: 1 !important;
}

.activity-history-source-field {
    flex-basis: 145px !important;
}

.activity-history-date-field {
    flex-basis: 150px !important;
}

.activity-history-filter-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.activity-history-filter-actions .button,
.activity-history-filter-actions button,
.activity-history-heading .button {
    min-height: var(--control-height);
    width: auto;
}

.activity-history-filters .field-note {
    border-top: 1px solid #e7ebf0;
    display: block;
    font-size: 11px;
    margin: 7px 0 0;
    padding-top: 6px;
}

.activity-history-report-summary {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    justify-content: space-between;
    margin: 12px 0 8px;
}

.activity-history-report-summary h2 {
    font-size: 15px;
    margin: 0;
}

.activity-history-report-summary .muted {
    font-size: 12px;
    margin: 0;
}

.activity-history-employee-groups {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 704px), 1fr));
    min-width: 0;
}

.activity-history-employee-card {
    margin-bottom: 0;
    min-width: 0;
    padding: 8px 10px;
    width: 100%;
}

.activity-history-single-panel {
    max-width: var(--content-width-comfortable);
}

.activity-history-employee-header {
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.activity-history-employee-header h2 {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}

.activity-history-employee-header > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.activity-history-employee-header > div > p.muted {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 5px;
    margin: 0;
}

.activity-history-count {
    flex: 0 0 auto;
}

.activity-history-scroll {
    max-height: 300px;
    max-width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.activity-history-scroll .activity-history-table {
    min-width: 660px;
    table-layout: fixed;
}

.activity-history-scroll .activity-history-table thead th {
    background: var(--table-header-background);
    box-shadow: inset 0 -1px #dfe5ec;
    position: sticky;
    top: 0;
    z-index: 3;
}

.activity-history-empty-state {
    color: #6c7888;
    border-top: 1px solid #e2e7ed;
    font-size: 12px;
    margin: 0;
    padding: 10px 8px 2px;
}

.activity-history-date-row th {
    background: #eaf1f8;
    color: #244563;
    font-size: 11px;
    letter-spacing: .02em;
    padding-block: 5px;
}

.activity-history-table td:first-child {
    white-space: nowrap;
    width: 220px;
}

.activity-history-table td:nth-child(2) {
    width: 28%;
}

.activity-history-table td:nth-child(n + 2) {
    overflow-wrap: anywhere;
    white-space: normal;
}

.activity-history-table td:nth-child(n + 2) a {
    overflow-wrap: anywhere;
    white-space: normal;
}

.activity-history-table td {
    padding-block: 7px;
}

.activity-history-report-meta {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.activity-history-report-period {
    color: #294866;
    font-weight: 700;
}

.activity-history-report-separator {
    color: #9aa8b8;
}

.activity-history-reference {
    display: inline-block;
    font-size: 11px;
    margin-left: 7px;
}

.activity-classification {
    line-height: 1.25;
    margin-right: 5px;
    max-width: 100%;
    white-space: normal;
}

.activity-customer-message {
    margin-top: 7px;
}

.activity-customer-message > summary {
    color: #526986;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    width: fit-content;
}

.activity-customer-message-body {
    background: #f7f9fc;
    border-left: 2px solid #b8c9dc;
    border-radius: 4px;
    color: #40536b;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 6px;
    overflow-wrap: anywhere;
    padding: 7px 9px;
    white-space: pre-wrap;
}

.attendance-leave-detail-table {
    min-width: 1180px;
}

.your-dashboard-activity-table td:first-child,
.your-dashboard-activity-table th:first-child {
    width: 190px;
}

.your-dashboard-activity-table td {
    padding-block: 8px;
}

.activity-slot-row.is-missing td {
    background: transparent;
}

.activity-slot-row.is-grace td {
    background: #eef7ff;
}

.activity-slot-row.is-current td {
    background: #f7fbff;
}

.activity-slot-row.is-upcoming td {
    background: #f7f9fc;
    color: #718094;
}

.activity-slot-row.is-lunch td {
    background: #f1f3f5;
    color: #697586;
}

.activity-slot-items,
.activity-slot-extra-items,
.outside-hours-activity {
    display: grid;
    gap: 4px;
}

.activity-slot-extra-items[hidden] {
    display: none;
}

.activity-slot-link {
    color: #273b52;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    max-width: 100%;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-slot-link:hover,
.activity-slot-link:focus-visible {
    color: #0f5f9f;
    text-decoration: underline;
}

.activity-slot-link strong {
    font-weight: 700;
}

.activity-slot-more,
.activity-slot-state {
    color: #6a7788;
    font-size: 12px;
    font-weight: 600;
}

button.activity-slot-more {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    justify-self: start;
    padding: 0;
    text-align: left;
    text-decoration: underline;
}

button.activity-slot-more:hover,
button.activity-slot-more:focus-visible,
button.activity-slot-more[aria-expanded="true"] {
    color: #0f5f9f;
}

.activity-slot-row.is-missing .activity-slot-state {
    color: #966200;
}

.activity-slot-row.is-grace .activity-slot-state,
.activity-slot-row.is-current .activity-slot-state {
    color: #175f9a;
}

.your-dashboard-activity-panel *:not(h2),
.dashboard-team-attendance *:not(h2) {
    font-weight: 400;
}

.outside-hours-activity {
    border-top: 1px solid #e2e7ed;
    padding: 12px 14px 14px;
}

.outside-hours-activity h3 {
    font-size: 13px;
    margin: 0 0 4px;
}

.project-payment-due-row > td {
    background: #fff8f8;
}

.project-payment-due-row > td:first-child {
    box-shadow: inset 3px 0 0 #c73737;
}

.project-payment-due-badge {
    margin-left: 6px;
    vertical-align: middle;
}

.project-activity-item[id] {
    scroll-margin-top: 110px;
}

@media (max-width: 1180px) {
    .activity-history-filter-toolbar {
        grid-template-columns: 1fr;
    }

    .activity-history-filter-form {
        flex-wrap: wrap;
    }

    .activity-history-subject-field {
        flex-basis: 280px !important;
    }

    .activity-history-source-field,
    .activity-history-date-field {
        flex-grow: 1 !important;
    }
}

@media (max-width: 980px) {
    .your-dashboard-top-row,
    .dashboard-attendance-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .your-dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .your-dashboard-activity-table td:first-child,
    .your-dashboard-activity-table th:first-child {
        width: 150px;
    }

    .dashboard-attendance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {
    .sales-activity-timeline-table .empty-state::before {
        content: none !important;
    }

    .common-dashboard-tabs {
        gap: 4px;
    }

    .common-dashboard-tab {
        font-size: 11px;
        min-height: 30px;
        padding: 4px 6px;
    }

    .your-dashboard-activity-panel .panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-activity-heading-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .dashboard-activity-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-activity-submit {
        min-height: 44px;
    }

    .dashboard-activity-result-field {
        grid-column: auto;
    }

    .activity-history-heading {
        display: grid;
    }

    .activity-history-heading > .actions {
        width: 100%;
    }

    .activity-history-heading .button {
        width: 100%;
    }

    .activity-history-filters .attendance-quick-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-history-filters .attendance-quick-filters .button {
        min-height: 44px;
        width: 100%;
    }

    .activity-history-filter-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .activity-history-filter-form label {
        width: 100%;
    }

    .activity-history-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .activity-history-filter-actions .button,
    .activity-history-filter-actions button {
        min-height: 44px;
        width: 100%;
    }

    .activity-history-employee-header {
        align-items: flex-start;
        display: grid;
    }

    .activity-history-count {
        justify-self: start;
    }

    .your-dashboard-activity-table thead {
        display: none;
    }

    .your-dashboard-activity-table,
    .your-dashboard-activity-table tbody,
    .your-dashboard-activity-table tr,
    .your-dashboard-activity-table td {
        display: block;
        width: 100%;
    }

    .your-dashboard-activity-table tr {
        border-bottom: 1px solid #e1e6ec;
        padding: 8px 10px;
    }

    .your-dashboard-activity-table td {
        border: 0;
        padding: 2px 0;
    }

    .your-dashboard-activity-table td:first-child {
        font-size: 11px;
        font-weight: 400;
        width: 100%;
    }
}
.service-scope-editor {
    margin-top: 8px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.service-scope-editor > summary {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 7px 9px;
    cursor: pointer;
    color: #174a7c;
    font-weight: 700;
}

.service-scope-editor > summary small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-scope-editor-body {
    padding: 0 9px 9px;
}

.service-scope-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.service-scope-fields[hidden] {
    display: none;
}

.service-scope-editor label {
    margin: 0;
    font-size: 12px;
}

.service-scope-editor input,
.service-scope-editor select,
.service-scope-editor textarea {
    display: block;
    width: 100%;
    min-height: 38px;
    margin-top: 3px;
}

.service-scope-other {
    display: block;
    margin-top: 8px !important;
}

.project-service-snapshot-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.project-service-snapshot-card {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.project-service-snapshot-card span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .service-scope-fields {
        grid-template-columns: 1fr;
    }

    .service-scope-editor > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-scope-editor > summary small {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .notice.customer-preview-compact {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-action-row .button {
        width: 100%;
    }

    .portal-dashboard-surface {
        padding: 10px;
    }

    .table.is-record-table.portal-record-table {
        min-width: 0;
    }

    .table.is-record-table.portal-record-table tbody {
        gap: 0;
    }

    .table.is-record-table.portal-record-table tbody tr {
        border: 0;
        border-bottom: 1px solid #e6ebf1;
        border-radius: 0;
        background: transparent;
    }

    .table.is-record-table.portal-record-table tbody tr:last-child {
        border-bottom: 0;
    }

    .table.is-record-table.portal-record-table td {
        height: auto;
        border-bottom: 0;
        padding: 9px 4px;
    }

    .table.is-record-table.portal-record-table .entity-cell {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        min-width: 0;
    }

    .table.is-record-table.portal-record-table .entity-cell .table-link,
    .table.is-record-table.portal-record-table .entity-cell .entity-title,
    .table.is-record-table.portal-record-table .entity-cell .entity-meta {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .table.is-record-table.portal-record-table .entity-cell .mobile-state-group {
        width: 100%;
    }

    .table.is-record-table.portal-dashboard-ticket-table td {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .table.is-record-table.portal-dashboard-ticket-table td::before {
        display: none;
        content: none;
    }

    .table.is-record-table.portal-dashboard-ticket-table .action-cell {
        display: none !important;
    }

    .table.is-record-table.portal-dashboard-ticket-table .table-link {
        display: block;
        min-width: 0;
        min-height: 0;
    }

    .portal-dashboard-ticket-table .entity-title,
    .portal-dashboard-ticket-table .entity-meta {
        max-width: 100%;
    }
}
