:root {
    --ink: #181c21;
    --muted: #414752;
    --primary: #005dac;
    --line: #c1c6d4;
    --paper: #f9f9ff;
    --accent: #d4e3ff;
    --danger: #ba1a1a;
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("vendor/fonts/inter/inter-latin-wght-normal.woff2")
        format("woff2-variations");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font:
        14px/1.55 Inter,
        system-ui,
        -apple-system,
        sans-serif;
}
button,
input,
textarea,
select {
    font: inherit;
}
button,
.button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 15px;
    background: white;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 550;
}
button:hover,
.button:hover {
    background: #ecedf6;
    color: var(--primary);
}
button:disabled {
    opacity: 0.5;
    cursor: wait;
}
.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.primary:hover {
    background: #004786;
    color: white;
}
.danger {
    color: var(--danger);
}
:focus-visible {
    outline: 3px solid #789eeb;
    outline-offset: 3px;
}
h1 {
    font-size: 30px;
    letter-spacing: -1px;
    font-weight: 650;
    margin: 0 0 8px;
}
h2 {
    font-size: 20px;
    margin: 0 0 15px;
    font-weight: 650;
}
h3 {
    font-size: 16px;
    font-weight: 650;
}
p {
    margin: 0 0 18px;
}
.muted,
small {
    color: var(--muted);
}
.shell {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    min-width: 0;
    background: #102a56;
    color: #dbeafe;
    padding: 30px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    padding: 8px 8px 24px;
}
.brand-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff26;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 0 0 1px #ffffff1a;
}
.brand-copy {
    min-width: 0;
}
.brand-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand.is-contact {
    align-items: flex-start;
}
.brand.is-contact .brand-avatar {
    background: var(--primary);
    box-shadow: none;
    overflow: hidden;
    padding: 0;
}
img.brand-avatar {
    object-fit: cover;
    display: block;
}
.brand-dob {
    margin: 4px 0 0;
    font-size: 12px;
    color: #bfdbfe;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.brand-actions .icon-button {
    width: 32px;
    height: 32px;
    background: #ffffff1a;
    color: #dbeafe;
    box-shadow: 0 0 0 1px #ffffff1a;
}
.brand-actions .icon-button:hover {
    background: #ffffff2e;
    color: #fff;
}
.brand-actions .shell-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}
nav {
    display: grid;
    gap: 5px;
}
nav a {
    padding: 10px 13px;
    color: #dbeafe;
    text-decoration: none;
    border-radius: 7px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
nav a:hover {
    background: #ffffff1a;
    color: #fff;
}
nav a.active {
    background: #fff;
    color: #102a56;
    font-weight: 650;
}
.nav-label {
    padding: 20px 13px 5px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1.7px;
    color: #afc8f1;
}
.workspace {
    min-width: 0;
    overflow-x: auto;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 64px;
}
.topbar-start,
.topbar-end {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}
.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shell-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}
.icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    align-items: center;
    display: inline-flex;
    text-decoration: none;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}
.icon-button:hover {
    background: #e6e8f0;
    color: var(--ink);
}
.topbar .search {
    max-width: 440px;
    width: 100%;
}
.search input {
    width: 100%;
    border: 1px solid var(--line);
    background: #f2f3fc;
    padding: 10px 14px;
    border-radius: 8px;
}
.topbar small {
    white-space: nowrap;
}
main {
    max-width: 1600px;
    margin: auto;
    padding: 36px;
}
#confirm-save-workspace:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 4;
    background: var(--paper);
    color: var(--ink);
    padding: 36px;
    overflow: auto;
}
.heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 25px;
    min-width: 0;
}
.page-identity {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    min-width: 0;
    flex: 1 1 12rem;
}
.page-identity > div {
    min-width: 0;
}
.record-avatar {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    object-fit: cover;
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 24px;
    font-weight: 700;
}
.record-contact-summary,
.record-contact-channels,
.record-contact-dob,
.record-contact-types {
    margin: 4px 0 0;
}
.record-type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.record-contact-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.7px;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 650;
}
.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 2px 2px #181c2103;
}
.hero {
    background: #ecedf6;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #d4e3ff;
}
.hero h1 {
    max-width: 620px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.dashboard-widget-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
}
.dashboard-widget-grid > .card {
    min-width: 0;
}
.dashboard-widget-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.dashboard-widget-panel-head h2 {
    margin: 0;
}
.dashboard-widget-preview,
.dashboard-widget-balances {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.dashboard-widget-preview li,
.dashboard-widget-balances li {
    padding: 8px 0;
    border-top: 1px solid var(--line);
}
.dashboard-widget-preview li:first-child,
.dashboard-widget-balances li:first-child {
    border-top: 0;
    padding-top: 0;
}
.dashboard-widget-customize {
    list-style: none;
    margin: 12px 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.dashboard-widget-customize li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dashboard-widget-span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 850px) {
    .dashboard-widget-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-widget-grid > .card {
        grid-column: 1 / -1 !important;
    }
}
.two {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}
.rowline {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.rowline:last-child {
    border: 0;
}
.stack {
    display: grid;
    gap: 15px;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.badge {
    font-size: 11px;
    letter-spacing: 0.3px;
    background: var(--accent);
    color: #004786;
    border-radius: 30px;
    padding: 6px 10px;
    font-weight: 550;
}
.badge.pending {
    background: #fff3d2;
    color: #7b611a;
}
.empty {
    padding: 30px 0;
    color: var(--muted);
    font-size: 14px;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 16px;
}
.empty-state-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    color: var(--muted);
}
.empty-state h2 {
    margin: 12px 0 0;
    font-size: 18px;
    font-weight: 700;
}
.empty-state .muted {
    max-width: 36rem;
}
.folder-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.folder-toolbar-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
}
.folder-toolbar-action.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.folder-toolbar-action .shell-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}
.folder-selection {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}
.folder-selection-count {
    font-weight: 650;
}
.folder-select {
    margin: 0;
}
.folder-note-subject {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
}
.stat {
    font-size: 36px;
    letter-spacing: -1px;
    font-weight: 650;
}
.table-wrap {
    overflow: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}
th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 12px;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
td .button {
    padding: 5px 11px;
}
label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 550;
    margin: 0;
}
label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 9px;
}
input:not([type="checkbox"]),
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c1c6d4;
    border-radius: 7px;
    background: white;
    color: var(--ink);
}
textarea {
    min-height: 110px;
}
input[type="checkbox"] {
    width: 17px;
    height: 17px;
}
.field-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}
.mono {
    font:
        12px/1.5 ui-monospace,
        monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow: auto;
    background: #f2f3fc;
    padding: 16px;
    border-radius: 8px;
}
dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    width: 600px;
    max-width: 94vw;
    padding: 28px;
    color: var(--ink);
}
dialog::backdrop {
    background: #181c2170;
}
dialog .actions {
    margin-top: 22px;
    justify-content: flex-end;
}
.login {
    max-width: 460px;
    margin: 9vh auto;
}
.login .brand {
    color: var(--primary);
    padding: 0 0 25px;
}
.login h1 {
    font-size: 26px;
}
.notice {
    background: #edf3ff;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 13px;
    border-left: 3px solid #005dac;
}
.error {
    color: var(--danger);
    background: #fff0ed;
    padding: 12px;
    border-radius: 6px;
}
.skip-group {
    position: absolute;
    top: -80px;
    left: 5px;
    display: flex;
    gap: 8px;
    z-index: 999;
}
.skip-group:focus-within {
    top: 5px;
}
.skip {
    position: static;
    background: white;
    padding: 10px;
    border-radius: 8px;
}
#status {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 460px;
    background: #102a56;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 30px #0002;
    z-index: 3000;
    padding: 0;
}
#status:not(:empty) {
    padding: 15px 22px;
}
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}
.tabs [role="tab"][aria-selected="true"] {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tabs [role="tab"] .shell-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
.tabs [role="tab"][aria-selected="true"]:hover {
    background: #004786;
    color: white;
}
.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.status-pills [role="tab"] {
    border-radius: 999px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid var(--line);
    background: white;
    font-weight: 550;
}
.status-pills [role="tab"][aria-selected="true"] {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.formio-component .form-control {
    border-radius: 7px;
}
.formio-component button {
    border-radius: 7px;
}
.formio-form {
    color: var(--ink);
}
.builder-sidebar {
    font-size: 13px;
}
.preview-effect {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    margin: 8px 0;
}
.effect-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-width: 32rem;
    max-height: 12rem;
    overflow: auto;
    margin: 0;
}
.crumb {
    font-size: 13px;
    margin-bottom: 15px;
}
.crumb a {
    color: var(--primary);
}
@media (max-width: 900px) {
    .shell {
        grid-template-rows: max-content 1fr;
        grid-template-columns: minmax(0, 1fr);
    }
    .sidebar {
        min-width: 0;
        height: auto;
        position: static;
        padding: 15px;
    }
    .brand {
        padding: 0 10px 10px;
    }
    nav {
        display: flex;
        overflow-x: auto;
    }
    nav a {
        white-space: nowrap;
    }
    .nav-label {
        display: none;
    }
    .topbar {
        padding: 15px;
    }
    main {
        padding: 22px;
    }
    .two {
        grid-template-columns: minmax(0, 1fr);
    }
    .heading {
        flex-direction: column;
    }
}

.calendar-day {
    min-height: 105px;
    min-width: 105px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
}
.calendar-day a {
    font-size: 12px;
    text-align: left;
}
.calendar-month-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    text-align: left;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 650;
}
.calendar-month-item-when {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-month-item-title {
    margin-top: 4px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-month-item:hover {
    filter: brightness(0.98);
}
.calendar-day.outside-month {
    opacity: 0.65;
}
.calendar-weekday {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}
.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: -8px 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.calendar-toolbar h2 {
    margin: 0;
}
.calendar-toolbar-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.calendar-toolbar .tabs {
    margin-bottom: 0;
    padding: 4px;
}
.calendar-month-nav {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}
.calendar-month-nav button {
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--line);
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.calendar-month-nav button:last-child {
    border-right: 0;
}
.calendar-month-nav .shell-icon {
    width: 18px;
    height: 18px;
}
.calendar-more {
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0 4px;
    cursor: pointer;
}
.calendar-day-today {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
}
.calendar-day-number {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 650;
    min-width: 2rem;
    height: 2rem;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
}
.calendar-day-today .calendar-day-number {
    background: var(--primary);
    color: white;
}
.actions > .tabs {
    margin-bottom: 0;
}
.calendar-day-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 34rem;
    overflow: auto;
}
.calendar-day-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    color: inherit;
    text-decoration: none;
    font-weight: 650;
}
.calendar-day-item-when {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.calendar-day-item-title {
    margin-top: 8px;
    font-size: 14px;
}
.calendar-day-item:hover {
    filter: brightness(0.98);
}

[hidden] {
    display: none !important;
}

/* Source palette: X2026 _AppHeadResources and _Sidebar, revision 60c8314. */
.shell.menu-collapsed {
    grid-template-columns: minmax(0, 1fr);
}
.topbar .search {
    flex: 1;
    min-width: 160px;
}
.menu-toggle,
.density-toggle {
    white-space: nowrap;
}
.icon-button.menu-toggle {
    white-space: normal;
}
.density-toggle[aria-pressed="true"] {
    color: var(--primary);
    background: var(--accent);
}
html[data-density="compact"] main {
    padding: 20px;
}
html[data-density="compact"] .card {
    padding: 16px;
    margin-bottom: 14px;
}
html[data-density="compact"] td {
    padding: 7px 10px;
}
html[data-density="compact"] th {
    padding: 8px 10px;
}
html[data-density="compact"] .rowline {
    padding: 7px 0;
}
html[data-density="compact"] .stack {
    gap: 10px;
}
html[data-density="compact"] nav a {
    padding: 7px 10px;
}
html[data-density="compact"] .hero {
    padding: 20px;
}
html[data-density="compact"] .record-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 18px;
}
html.dark {
    color-scheme: dark;
    --ink: #f1f5f9;
    --muted: #94a3b8;
    --primary: #a5c8ff;
    --line: #334155;
    --paper: #020617;
    --accent: #1e3a5f;
    --danger: #ffb4ab;
}
html.dark .sidebar {
    background: #020617;
}
html.dark nav a.active {
    background: #1e293b;
    color: #f1f5f9;
}
html.dark .icon-button:hover {
    background: #1e293b;
    color: #f1f5f9;
}
html.dark .brand-actions .icon-button:hover {
    background: #ffffff2e;
    color: #fff;
}
html.dark button,
html.dark .button {
    background: #0f172a;
    color: var(--ink);
}
html.dark button:hover,
html.dark .button:hover {
    background: #1e293b;
    color: var(--primary);
}
html.dark .primary {
    background: var(--primary);
    color: #001c3a;
    border-color: var(--primary);
}
html.dark .primary:hover {
    background: #d4e3ff;
    color: #001c3a;
}
html.dark .card,
html.dark dialog,
html.dark .skip {
    background: #0f172a;
}
html.dark .hero {
    background: #0f172a;
    border-color: #1e3a5f;
}
html.dark .search input,
html.dark input:not([type="checkbox"]),
html.dark select,
html.dark textarea {
    background: #0f172a;
    border-color: var(--line);
    color: var(--ink);
}
html.dark .mono,
html.dark .history-navigation {
    background: #0f172a;
}
html.dark .notice {
    background: #0f172a;
    border-left-color: var(--primary);
}
html.dark .error {
    background: #3f1514;
}
html.dark .badge {
    color: #d4e3ff;
}
html.dark .badge.pending {
    background: #3f2e12;
    color: #fde68a;
}
html.dark .density-toggle[aria-pressed="true"] {
    color: var(--primary);
    background: var(--accent);
}
html.dark .tabs {
    background: #0f172a;
}
html.dark .tabs [role="tab"][aria-selected="true"] {
    background: var(--primary);
    color: #001c3a;
    border-color: var(--primary);
}
html.dark .tabs [role="tab"][aria-selected="true"]:hover {
    background: #d4e3ff;
    color: #001c3a;
}
html.dark .status-pills [role="tab"] {
    background: #0f172a;
}
html.dark .status-pills [role="tab"][aria-selected="true"] {
    background: var(--primary);
    color: #001c3a;
    border-color: var(--primary);
}
html.dark .record-avatar {
    color: #001c3a;
}
html.dark .calendar-toolbar {
    border-color: #334155;
}
html.dark .calendar-month-nav {
    background: #0f172a;
}
html.dark .folder-toolbar-action {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.dark .folder-toolbar-action.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #001c3a;
}
html.dark .empty-state-icon {
    color: #94a3b8;
}
html.dark .calendar-more {
    color: #93c5fd;
}
html.dark .calendar-day-today .calendar-day-number {
    color: #001c3a;
}
html.dark .calendar-day-item,
html.dark .calendar-month-item {
    border-color: #334155;
}
@media (max-width: 600px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .sidebar:not([hidden]) {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(224px, 80vw);
        z-index: 30;
        box-shadow: 16px 0 32px #181c2140;
    }
    .topbar {
        gap: 10px;
    }
    .topbar .search {
        order: 5;
        flex-basis: 100%;
        max-width: none;
    }
    .topbar small {
        margin-left: auto;
    }
    .page-title {
        white-space: normal;
    }
    main {
        padding: 20px 16px;
    }
    h1 {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 900px) {
    .shell.menu-collapsed {
        grid-template-rows: 1fr;
    }
}

/* Long revision trails keep paging within reach without changing the source shell. */
dialog:has(.record-history) {
    width: min(960px, calc(100vw - 32px));
}
.history-navigation {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    padding: 8px 0;
}

dialog:has(.catalog-review) {
    width: min(960px, calc(100vw - 32px));
}
.catalog-review td {
    vertical-align: top;
}
.catalog-review-value {
    display: grid;
    gap: 6px;
}

/* Self-hosted outlined symbols for X2026 tag metadata. OFL: vendor/fonts/material-symbols/OFL.txt. */
@font-face { font-family: "Material Symbols Outlined Variable"; font-style: normal; font-display: swap; font-weight: 100 700; src: url("vendor/fonts/material-symbols/outlined.woff2") format("woff2"); }
.contact-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    margin: 0.125rem;
}
.contact-tag-icon {
    font-family: "Material Symbols Outlined Variable";
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    font-feature-settings: "liga";
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

/* X2026 participant Files navigation; narrow screens stack above the file list. */
.folder-workspace { display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: 1rem; }
.folder-workspace-content { min-width: 0; }
.folder-navigation { border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; overflow-wrap: anywhere; }
.folder-navigation h2 { font-size: 1rem; }
.folder-navigation ul { list-style: none; padding-left: .8rem; margin: .25rem 0; border-left: 1px solid var(--line); }
.folder-navigation-row { display: flex; align-items: flex-start; gap: .25rem; }
.folder-navigation-row button { min-width: 1.75rem; min-height: 1.75rem; }
.folder-navigation-row a { display: flex; gap: .3rem; padding: .25rem; min-width: 0; }
.folder-navigation [aria-current="page"] { font-weight: 700; text-decoration: underline; }
.folder-navigation-row svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; color: #b07813; }
@media (max-width: 850px) { .folder-workspace { grid-template-columns: minmax(0, 1fr); } }

.sidebar-close { display: none; }
@media (max-width: 600px) { .sidebar-close { display: block; margin: .75rem; } }
.my-folder-groups { overflow-wrap: anywhere; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.my-folder-groups h3 { font-size: 1rem; }
.help-body { overflow-wrap: anywhere; white-space: pre-wrap; }

/* Staff conversation and alert workspaces. */
.communications {
    min-width: 0;
}
.communication-layout {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
    gap: 1rem;
    align-items: start;
}
.communication-layout > * {
    min-width: 0;
}
.communication-layout aside ul {
    max-height: 65vh;
    overflow-y: auto;
    list-style: none;
    padding: 0;
}
.communication-layout aside li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border, #ddd);
}
.communication-layout aside p {
    margin: 0.3rem 0;
}
.communications p,
.communications a,
.communications h2,
.communications li {
    overflow-wrap: anywhere;
}
.communication-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}
.chat-messages {
    max-height: 65vh;
    overflow-y: auto;
    padding-left: 1.5rem;
}
.chat-messages li {
    padding: 0.75rem;
}
.chat-messages p,
.communication-body {
    white-space: pre-wrap;
}
.chat-composer {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    width: 100%;
}
.chat-composer textarea {
    width: 100%;
    min-height: 5rem;
}
.chat-composer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.chat-composer-hint {
    margin: 0;
    font-size: 0.9rem;
    color: #445;
}
.chat-attachment-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0;
    margin: 0.5rem 0 0;
}
.chat-attachment-list li {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    max-width: 10rem;
    padding: 0.5rem;
    border: 1px solid #c9d0da;
    background: #f7f9fc;
}
.chat-attachment-thumb {
    display: block;
    width: 8rem;
    height: 8rem;
    object-fit: cover;
}
.chat-attachment-name {
    word-break: break-word;
    font-size: 0.9rem;
}
.communications .card {
    margin-bottom: 1rem;
    padding: 1rem;
}
.communications nav a {
    display: inline-block;
    margin-right: 1rem;
}
@media (max-width: 760px) {
    .communication-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.communication-filters fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

/* Keep service actions readable inside the table's horizontal scroll region. */
.actions.service-row-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: start;
    justify-content: start;
}
