:root {
    --app-sidebar-width: 224px;
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2933;
    background: #f5f7f9;
}

body {
    background: #f5f7f9;
    margin: 0;
}

.has-app-sidebar {
    padding-left: var(--app-sidebar-width);
}

a {
    color: #1769aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d7dde3;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr auto 1fr;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.has-app-sidebar .topbar {
    align-items: stretch;
    background: #ffffff;
    border-bottom: 0;
    border-right: 1px solid #d7dde3;
    bottom: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    left: 0;
    overflow-y: auto;
    padding: 22px 14px 16px;
    position: fixed;
    top: 0;
    width: var(--app-sidebar-width);
    z-index: 20;
}

.brand {
    color: #1f2933;
    font-size: 20px;
    font-weight: 700;
}

.has-app-sidebar .brand {
    font-size: 23px;
    font-weight: 850;
    letter-spacing: .08em;
    padding: 4px 10px 14px;
}

.nav {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: flex-start;
}

.nav a {
    color: #384655;
    border-left: 3px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 11px;
}

.nav a.active,
.nav a:hover {
    background: #eef3f7;
    border-left-color: #1769aa;
    color: #1f2933;
    text-decoration: none;
}

.nav form {
    margin: 0;
}

.mobile-nav-toggle {
    display: none;
}

.account-menu {
    margin-top: auto;
    position: relative;
}

.account-menu summary,
.profile-menu summary,
.row-actions summary {
    cursor: pointer;
    list-style: none;
}

.account-menu summary::-webkit-details-marker,
.profile-menu summary::-webkit-details-marker,
.row-actions summary::-webkit-details-marker {
    display: none;
}

.account-menu summary {
    border: 1px solid #d7dde3;
    border-radius: 8px;
    color: #384655;
    overflow: hidden;
    padding: 8px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .account-menu .menu-panel {
    bottom: calc(100% + 8px);
    left: 0;
    right: auto;
    top: auto;
}

.account-menu[open] summary,
.account-menu summary:hover {
    background: #eef3f7;
}

.menu-panel {
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.14);
    display: grid;
    gap: 2px;
    min-width: 220px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 100;
}

.menu-panel a,
.menu-panel button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #384655;
    display: block;
    font: inherit;
    padding: 8px 10px;
    text-align: left;
    white-space: normal;
    width: 100%;
}

.menu-panel a:hover,
.menu-panel button:hover {
    background: #eef3f7;
    color: #1f2933;
    text-decoration: none;
}

.menu-section {
    border-bottom: 1px solid #e4e9ee;
    display: grid;
    gap: 2px;
    margin: 2px 0;
    padding: 4px 0 6px;
}

.menu-section-label,
.recent-record span,
.recent-work-list span {
    color: #697586;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.recent-record {
    display: grid !important;
    gap: 2px;
}

.recent-workspace {
    border-bottom: 1px solid #d7dde3;
    margin: 0 0 22px;
    padding: 0 0 18px;
}

.recent-workspace-empty p {
    color: #697586;
    margin: 8px 0 0;
}

.recent-workspace h2 {
    font-size: 18px;
    margin: 0;
}

.recent-app-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 10px;
}

.recent-app {
    border-left: 4px solid #1769aa;
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px 10px;
}

.recent-app h3 {
    color: #384655;
    font-size: 12px;
    margin: 0 0 2px;
}

.recent-app a {
    color: #52606d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-app a:hover {
    color: #1769aa;
}

.recent-app-contact { background: #eef7ed; border-color: #4b8c54; }
.recent-app-company { background: #fff7e7; border-color: #b78022; }
.recent-app-profile { background: #edf5ff; border-color: #377dc0; }
.recent-app-job { background: #fff0f5; border-color: #bd4d7c; }
.recent-app-budget-estimate { background: #f3efff; border-color: #7554ad; }
.recent-app-list { background: #eef8f7; border-color: #2b8a83; }

.workspace-search-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-left: 4px solid #1769aa;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.07);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: -8px 0 22px;
    padding: 14px 16px;
}

.workspace-search-card h2 {
    font-size: 22px;
    margin: 0;
}

.workspace-search-card p:last-child {
    color: #697586;
    margin: 4px 0 0;
}

.workspace-search-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.workspace-search-links a {
    background: #eef3f7;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #384655;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 10px;
}

.workspace-search-links a:hover {
    background: #eaf5ff;
    border-color: #1769aa;
    color: #1769aa;
    text-decoration: none;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 24px;
}

.messages {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.message {
    background: #eef7ed;
    border: 1px solid #bddbb8;
    border-radius: 4px;
    color: #275d22;
    margin: 0;
    padding: 10px 12px;
}

.message-error {
    background: #fff2f0;
    border-color: #ffccc7;
    color: #a8071a;
}

.message-info {
    background: #eef3f7;
    border-color: #d7dde3;
    color: #384655;
}

.toolbar,
.detail-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page > .toolbar {
    background: rgba(245, 247, 249, 0.96);
    border: 1px solid #d7dde3;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.08);
    margin: -12px 0 16px;
    padding: 10px 12px;
    position: sticky;
    top: 12px;
    z-index: 9;
}

.page > .toolbar h1 {
    font-size: 22px;
}

.toolbar-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-heading {
    display: grid;
    gap: 3px;
}

h1 {
    font-size: 28px;
    margin: 0;
}

.record-count {
    color: #697586;
    font-size: 13px;
    line-height: 1.2;
    margin: 0;
}

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

.dashboard-heading p:last-child {
    color: #697586;
    margin: 0;
}

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

.landing-layout-actions > span {
    color: #697586;
    font-size: 13px;
}

.landing-layout-actions > span.is-error {
    color: #b42318;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.dashboard-tile {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.07);
    color: #1f2933;
    display: grid;
    gap: 14px;
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 112px;
    padding: 18px;
}

.dashboard-tile:hover {
    border-color: #1769aa;
    box-shadow: 0 14px 28px rgba(31, 41, 51, 0.12);
    text-decoration: none;
    transform: translateY(-1px);
}

.dashboard-tile.is-muted {
    background: #f7f9fb;
    border-style: dashed;
    color: #697586;
}

.dashboard-tile.is-muted:hover {
    border-color: #d7dde3;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.07);
    transform: none;
}

.dashboard-icon {
    align-items: center;
    background: #eef3f7;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    color: #1769aa;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.dashboard-icon svg {
    fill: none;
    height: 28px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 28px;
}

.dashboard-tile-text {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dashboard-tile-text strong {
    font-size: 20px;
    line-height: 1.1;
}

.dashboard-tile-text span {
    color: #697586;
    font-size: 14px;
}

.landing-dashboard-grid .dashboard-tile {
    position: relative;
}

.landing-tile-controls {
    display: none;
    gap: 3px;
    position: absolute;
    right: 6px;
    top: 6px;
    z-index: 2;
}

.landing-tile-controls button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #9fb4c5;
    border-radius: 999px;
    color: #1769aa;
    display: inline-flex;
    font-size: 11px;
    height: 22px;
    justify-content: center;
    min-height: 0;
    padding: 0;
    width: 22px;
}

.landing-dashboard-grid.is-arranging {
    background: #eef6fc;
    border: 1px dashed #65a3cf;
    border-radius: 10px;
    padding: 10px;
}

.landing-dashboard-grid.is-arranging .dashboard-tile {
    border-color: #65a3cf;
    cursor: grab;
    padding-right: 58px;
    user-select: none;
}

.landing-dashboard-grid.is-arranging .dashboard-tile:hover {
    transform: none;
}

.landing-dashboard-grid.is-arranging .dashboard-tile.is-dragging {
    cursor: grabbing;
    opacity: .55;
}

.landing-dashboard-grid.is-arranging .landing-tile-controls {
    display: flex;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.search {
    display: flex;
    gap: 8px;
}

.toolbar-actions {
    align-items: center;
    display: flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    min-width: min(100%, 280px);
}

.search input {
    min-width: min(280px, 100%);
}

.toolbar-actions .search {
    justify-content: flex-end;
    max-width: 520px;
    width: 100%;
}

.toolbar-actions .search input {
    flex: 1 1 220px;
}

.list-search-form input[type="search"] {
    min-width: min(420px, 100%);
}

.list-builder-workspace .search-status {
    margin: 8px 0 14px;
}

.search-status {
    color: #697586;
    min-height: 20px;
    margin: -10px 0 14px;
}

.worklist-builder {
    align-items: end;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: -4px 0 18px;
    padding: 14px 16px;
}

.worklist-hint {
    color: #697586;
    flex-basis: 100%;
    font-size: 13px;
    margin: -6px 0 0;
}

.worklist-builder h2 {
    font-size: 18px;
    margin: 0;
}

.worklist-controls {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.worklist-controls label {
    color: #384655;
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 4px;
}

.worklist-controls input,
.worklist-controls select {
    min-width: 180px;
}

input,
select,
textarea {
    border: 1px solid #b8c2cc;
    border-radius: 4px;
    box-sizing: border-box;
    font: inherit;
    padding: 9px 10px;
}

.lookup-select-enhanced {
    display: none;
}

.lookup-trigger {
    background: #ffffff;
    border: 1px solid #b8c2cc;
    color: #1f2933;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    width: 100%;
}

.lookup-trigger:hover {
    background: #fbfcfd;
    border-color: #1769aa;
}

.lookup-modal[hidden] {
    display: none;
}

.lookup-backdrop {
    background: rgba(18, 31, 43, 0.42);
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1100;
}

.lookup-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(18, 31, 43, 0.28);
    display: grid;
    gap: 12px;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: min(560px, calc(100vh - 64px));
    left: 50%;
    max-width: 720px;
    padding: 18px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 48px);
    z-index: 1101;
}

.lookup-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.lookup-header h2 {
    font-size: 22px;
    margin: 0;
}

.lookup-header-actions,
.lookup-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.lookup-search {
    width: 100%;
}

.lookup-results {
    align-content: start;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    min-height: 0;
    overflow: auto;
}

.lookup-option {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e1e7ec;
    color: #1f2933;
    display: grid;
    gap: 2px;
    min-height: 44px;
    padding: 10px 12px;
    text-align: left;
}

.lookup-option:last-child {
    border-bottom: 0;
}

.lookup-option:hover,
.lookup-option.active {
    background: #eef3f7;
}

.lookup-option.active {
    box-shadow: inset 3px 0 0 #1769aa;
}

.lookup-option-detail {
    color: #697586;
    font-size: 12px;
    font-weight: 400;
}

.lookup-empty {
    color: #697586;
    margin: 0;
    padding: 12px;
}

button,
.actions a,
.pagination a,
.button-link,
.button-secondary {
    background: #1769aa;
    border: 1px solid #1769aa;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    padding: 9px 12px;
}

.button-secondary,
.actions .button-secondary {
    background: #ffffff;
    color: #1769aa;
}

.button-danger {
    background: #ffffff;
    border-color: #d92d20;
    color: #b42318;
}

.button-confirm {
    background: #11845b;
    border-color: #11845b;
    color: #ffffff;
    font-weight: 700;
}

.button-confirm:hover {
    background: #0b6f4b;
    border-color: #0b6f4b;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.actions form {
    margin: 0;
}

.compact-form {
    margin: 0;
}

.compact-form button {
    padding: 6px 9px;
}

.contacts-table {
    background: #ffffff;
    border-collapse: collapse;
    overflow: visible;
    width: 100%;
}

.contacts-table th,
.contacts-table td {
    border-bottom: 1px solid #e1e7ec;
    padding: 12px 14px;
    text-align: left;
}

.contacts-table tbody tr {
    position: relative;
}

.contacts-table tbody tr:hover {
    background: #fbfcfd;
    z-index: 5;
}

.contacts-table th {
    background: #eef3f7;
    color: #384655;
}

.copy-reference {
    background: #f7f9fb;
    border: 1px solid #d7dde3;
    border-radius: 4px;
    color: #384655;
    font: inherit;
    max-width: 220px;
    padding: 6px 8px;
    width: 100%;
}

.copy-reference:focus {
    background: #ffffff;
    border-color: #1769aa;
    outline: 2px solid rgba(23, 105, 170, 0.15);
}

.copy-reference-wide {
    max-width: 520px;
}

.copy-reference-text {
    background: #f7f9fb;
    border: 1px solid #d7dde3;
    border-radius: 4px;
    color: #384655;
    display: block;
    font-family: inherit;
    font-size: 12px;
    height: auto;
    line-height: 1.25;
    max-width: 190px;
    min-height: 44px;
    overflow: hidden;
    overflow-wrap: anywhere;
    padding: 5px 7px;
    resize: none;
    user-select: text;
    white-space: normal;
    width: 100%;
}

.copy-reference-text:focus {
    background: #ffffff;
    border-color: #1769aa;
    outline: 2px solid rgba(23, 105, 170, 0.15);
}

.record-id-column {
    color: #697586;
    font-size: 12px;
    white-space: nowrap;
    width: 64px;
}

.record-id-cell {
    color: #697586;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.table-scroll .contacts-table {
    min-width: max-content;
}

.profile-document-row td {
    background: #f8fafc;
    padding: 0 14px 14px;
}

.contacts-table tbody .profile-document-row:hover {
    background: transparent;
}

.profile-document-groups {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 100%;
    padding-top: 12px;
}

.profile-document-group {
    border: 1px solid #d7e0e8;
    border-radius: 6px;
    overflow: hidden;
}

.profile-document-group h3 {
    background: #eef3f7;
    color: #384655;
    font-size: 14px;
    margin: 0;
    padding: 9px 11px;
}

.mini-document-table {
    background: #ffffff;
    border-collapse: collapse;
    width: 100%;
}

.mini-document-table th,
.mini-document-table td {
    border-bottom: 1px solid #e5ebf0;
    font-size: 13px;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.mini-document-table th {
    background: #f6f8fa;
    color: #4b5b6b;
}

.mini-document-table tr:last-child td {
    border-bottom: 0;
}

.muted-text {
    color: #7b8794;
}

.profile-share-table th {
    width: 220px;
}

.profile-share-documents {
    margin-top: 16px;
}

.import-format-table .contacts-table th,
.import-format-table .contacts-table td {
    white-space: nowrap;
}

.actions-column {
    width: 56px;
}

.worklist-column {
    width: 78px;
}

.row-actions {
    position: relative;
    text-align: right;
}

.row-actions summary {
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #384655;
    display: inline-grid;
    font-size: 17px;
    font-weight: 700;
    height: 32px;
    line-height: 1;
    opacity: 0.55;
    place-items: center;
    width: 36px;
}

.contacts-table tr:hover .row-actions summary,
.row-actions details[open] summary,
.row-actions summary:focus {
    opacity: 1;
}

.row-actions summary:hover,
.row-actions details[open] summary {
    background: #ffffff;
    border-color: #1769aa;
    color: #1f2933;
}

.row-actions .menu-panel {
    right: 0;
    top: calc(100% + 4px);
}

.action-menu-table {
    overflow: visible;
}

.action-menu-table td {
    overflow: visible;
}

.panel-section {
    background: #ffffff;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.06);
    margin-top: 24px;
    overflow: visible;
    padding: 20px;
}

.panel-section .toolbar-title {
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-section h2 {
    font-size: 22px;
    margin: 0;
}

.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar .inline-form,
.panel-section .inline-form:last-child {
    margin-bottom: 0;
}

.inline-form select {
    min-width: 280px;
}

.inline-rate-form {
    align-items: center;
    display: flex;
    gap: 6px;
    margin: 0;
}

.inline-rate-form input {
    min-width: 0;
    padding: 6px 7px;
    width: 112px;
}

.currency-prefix {
    color: #384655;
    font-size: 13px;
    font-weight: 800;
    min-width: 18px;
    text-align: right;
}

.inline-rate-form input::-webkit-inner-spin-button,
.inline-rate-form input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.table-search-form {
    margin-top: 12px;
}

.table-search-form input[type="search"] {
    min-width: min(360px, 100%);
}

.inline-notes-form {
    margin: 0;
}

.inline-notes-form textarea {
    min-height: 42px;
    resize: vertical;
    width: min(420px, 100%);
}

[data-crewtype-field][data-save-state="saving"] {
    border-color: #8a6116;
    outline: 2px solid rgba(138, 97, 22, 0.12);
}

[data-crewtype-field][data-save-state="saved"] {
    border-color: #247a4d;
    outline: 2px solid rgba(36, 122, 77, 0.12);
}

[data-crewtype-field][data-save-state="error"] {
    border-color: #b42318;
    outline: 2px solid rgba(180, 35, 24, 0.12);
}

.master-create-panel {
    margin: -6px 0 20px;
    padding: 18px;
}

.worklist-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.worklist-type-tile {
    align-content: start;
    cursor: pointer;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    margin: 0;
    position: relative;
}

.worklist-type-tile:hover,
.worklist-type-tile:focus,
.worklist-type-tile:focus-within {
    border-color: #1769aa;
    box-shadow: 0 14px 28px rgba(31, 41, 51, 0.12);
    transform: translateY(-1px);
}

.worklist-type-tile:focus {
    outline: 2px solid #1769aa;
    outline-offset: 3px;
}

.worklist-type-tile.is-active {
    background: #edf5ff;
    border-color: #1769aa;
    box-shadow: 0 12px 24px rgba(23, 105, 170, 0.16);
}

.worklist-type-tile > .dashboard-icon {
    grid-column: 1;
}

.worklist-type-tile > .dashboard-tile-text {
    grid-column: 2;
}

.worklist-type-add {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5df;
    border-radius: 999px;
    color: #1769aa;
    cursor: pointer;
    display: inline-grid;
    font-size: 22px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    line-height: 1;
    list-style: none;
    min-height: 34px;
    padding: 0;
    width: 34px;
}

.worklist-type-add::-webkit-details-marker {
    display: none;
}

.worklist-type-add:hover,
.worklist-type-add:focus {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, 0.12);
    outline: 0;
}

.auth-panel,
.form-panel {
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 6px;
    margin: 40px auto;
    max-width: 640px;
    padding: 28px;
}

.form {
    display: grid;
    gap: 12px;
}

.form p {
    display: grid;
    gap: 6px;
    margin: 0;
}

.label-row {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.field-with-action {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.icon-add-link {
    align-items: center;
    background: #1769aa;
    border: 1px solid #1769aa;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 28px;
}

.icon-add-link:hover {
    background: #0f4f82;
    color: #ffffff;
    text-decoration: none;
}

.compact-add-link {
    white-space: nowrap;
}

.form input,
.form select {
    width: 100%;
}

.form input[type="checkbox"] {
    width: auto;
}

.form ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.form li label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.image-upload-widget {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.mobile-upload-preview {
    align-items: center;
    background: #ffffff;
    border: 1px dashed #c7d2dc;
    border-radius: 8px;
    color: #697586;
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 8px 10px;
}

.mobile-upload-preview img {
    border-radius: 6px;
    height: 58px;
    object-fit: cover;
    width: 58px;
}

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

.mobile-upload-option {
    align-items: center;
    background: #ffffff;
    border: 1px solid #b8c9d8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 66px;
    overflow: hidden;
    padding: 9px 11px;
    position: relative;
}

.mobile-upload-option:hover,
.mobile-upload-option:focus-within {
    background: #eef6fc;
    border-color: #1769aa;
    box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.mobile-upload-option > span:not(.mobile-upload-icon) {
    display: grid;
    gap: 3px;
}

.mobile-upload-option strong {
    color: #1f2933;
}

.mobile-upload-option small {
    color: #697586;
    line-height: 1.25;
}

.mobile-upload-icon {
    align-items: center;
    background: #1769aa;
    border-radius: 7px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    min-width: 36px;
    padding: 0 3px;
}

.mobile-upload-option input[type="file"] {
    cursor: pointer;
    height: 100%;
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
}

.current-file {
    display: grid;
    gap: 4px;
}

.file-label {
    color: #697586;
    font-size: 13px;
    font-weight: 700;
}

.current-file a {
    overflow-wrap: anywhere;
}

.clear-file,
.upload-file {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.clear-file {
    color: #b42318;
}

.upload-file span {
    color: #384655;
    font-weight: 700;
}

.form-note {
    margin: 16px 0 0;
}

.helptext {
    color: #697586;
    font-size: 13px;
}

.mobile-record-switcher,
.mobile-form-steps,
.mobile-form-intro {
    display: none;
}

.mobile-workflow-callout {
    align-items: center;
    background: #eef6fc;
    border: 1px solid #b9d6ec;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.mobile-workflow-callout p {
    color: #526170;
    margin: 4px 0 0;
}

.mobile-workflow-callout .button-secondary {
    text-align: center;
}

.errorlist {
    color: #a8071a;
    margin: 0;
    padding-left: 18px;
}

.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #a8071a;
    padding: 10px 12px;
}

.profile-card {
    align-items: start;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(31, 41, 51, 0.08);
    display: grid;
    gap: 24px;
    grid-template-columns: 220px 1fr;
    overflow: visible;
    padding: 0 24px 24px;
}

.profile-workbench {
    margin-bottom: 24px;
}

.profile-card-header {
    align-items: center;
    background: #eef3f7;
    border-bottom: 1px solid #d7dde3;
    display: flex;
    gap: 16px;
    grid-column: 1 / -1;
    justify-content: space-between;
    margin: 0 -24px;
    padding: 18px 24px;
}

.job-profile-card .profile-card-header {
    position: sticky;
    top: 62px;
    z-index: 9;
}

.section-label {
    color: #697586;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.record-id {
    color: #697586;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin: 4px 0 0;
}

.profile-status {
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #384655;
    padding: 7px 12px;
}

.profile-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
    min-width: 0;
    width: 100%;
}

.copy-reference-header {
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 4px;
    color: #384655;
    flex: 1 1 420px;
    font: inherit;
    font-size: 13px;
    line-height: 1.25;
    max-height: none;
    max-width: 540px;
    min-height: 36px;
    min-width: 260px;
    overflow: hidden;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    resize: none;
}

.copy-reference-header:focus {
    border-color: #1769aa;
    outline: 2px solid rgba(23, 105, 170, 0.15);
}

.job-status-form {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    display: flex;
    gap: 6px;
    padding: 4px 5px 4px 10px;
}

.job-status-form label {
    color: #697586;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.job-status-form select {
    border: 0;
    min-height: 28px;
    padding: 3px 5px;
    width: auto;
}

.job-status-form button {
    font-size: 12px;
    min-height: 28px;
    padding: 4px 8px;
}

.profile-summary {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 20px;
    text-align: center;
}

.profile-summary h2 {
    font-size: 22px;
    line-height: 1.15;
    margin: 0;
}

.profile-summary p {
    color: #697586;
    margin: 0;
    overflow-wrap: anywhere;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #384655;
    display: inline-grid;
    font-size: 18px;
    font-weight: 700;
    height: 36px;
    place-items: center;
    width: 44px;
}

.profile-menu summary:hover,
.profile-menu[open] summary {
    background: #ffffff;
    border-color: #1769aa;
}

.profile-menu .menu-panel {
    left: 50%;
    right: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%);
}

.profile-photo {
    align-items: center;
    aspect-ratio: 1;
    background: #eef3f7;
    border: 4px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #d7dde3, 0 8px 18px rgba(31, 41, 51, 0.12);
    color: #384655;
    display: flex;
    font-size: 28px;
    font-weight: 700;
    justify-content: center;
    overflow: hidden;
    text-transform: uppercase;
    width: 150px;
}

.profile-photo img {
    display: block;
    height: 150px;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.company-avatar {
    background: #e9f6f2;
    color: #22594c;
}

.profile-details {
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    min-width: 0;
    overflow: visible;
    padding: 0;
}

.profile-form {
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    padding: 20px;
}

.hidden-field {
    display: none;
}

.profile-form p {
    align-content: start;
}

.form-section {
    border-bottom: 1px solid #e1e7ec;
    display: grid;
    gap: 12px;
    padding-bottom: 18px;
}

.form-section h3 {
    font-size: 17px;
    margin: 0;
}

.workflow-step {
    border: 1px solid #d9e4ed;
    border-radius: 8px;
    padding: 16px;
}

.step-heading {
    align-items: start;
    display: flex;
    gap: 12px;
}

.step-number {
    align-items: center;
    background: #1769aa;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    line-height: 1;
    width: 30px;
}

.step-heading h2,
.step-heading h3 {
    margin: 0;
}

.section-help {
    color: #697586;
    margin: 0;
}

.import-flow-hero {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.import-flow-hero h1 {
    margin-bottom: 4px;
}

.import-step-rail {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.import-step-rail li {
    align-items: center;
    background: #f4f7fa;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #52606d;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    min-height: 30px;
    padding: 3px 10px 3px 4px;
    white-space: nowrap;
}

.import-step-rail span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #52606d;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.import-step-rail .is-current {
    background: #edf5ff;
    border-color: #1769aa;
    color: #184f78;
}

.import-step-rail .is-current span {
    background: #1769aa;
    border-color: #1769aa;
    color: #ffffff;
}

.import-workflow-card {
    margin-bottom: 22px;
}

.maintenance-intro { margin: 0 0 18px; }
.maintenance-search-panel { margin-bottom: 22px; }
.maintenance-search-panel .inline-form select { min-width: 170px; }
.maintenance-search-panel input[type="search"] { min-width: min(430px, 100%); }
.maintenance-toolbar {
    align-items: stretch;
    display: grid;
    gap: 8px;
}
.maintenance-toolbar-head {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
}
.maintenance-table-tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.maintenance-table-tile {
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr);
    height: 54px;
    min-height: 0;
    overflow: hidden;
    padding: 8px 10px;
}
.maintenance-table-tile .dashboard-icon {
    font-size: 12px;
    height: 32px;
    width: 32px;
}
.maintenance-table-tile .dashboard-tile-text {
    gap: 3px;
}
.maintenance-table-tile .dashboard-tile-text strong {
    font-size: 14px;
}
.maintenance-table-tile .dashboard-tile-text span {
    display: -webkit-box;
    font-size: 11px;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.maintenance-table-tile.is-active {
    background: #edf5ff;
    border-color: #1769aa;
    box-shadow: 0 12px 24px rgba(23, 105, 170, 0.16);
}
.maintenance-toolbar-row {
    align-items: center;
    border-top: 1px solid #d7dde3;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(430px, 0.9fr) minmax(420px, 1.1fr);
    padding-top: 8px;
}
.maintenance-merge-controls {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #c8dced;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 7px 8px;
}
.maintenance-merge-controls h2 {
    font-size: 15px;
    margin: 0;
}
.maintenance-selected-table {
    background: transparent;
    border: 0;
    border-left: 1px solid #c8dced;
    flex: 1 1 auto;
    min-width: 180px;
    padding: 1px 0 1px 10px;
}
.maintenance-selected-table h2 {
    color: #1769aa;
}
.maintenance-selected-table .record-count {
    color: #315f85;
}
.maintenance-toolbar-row > .toolbar-actions {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    justify-content: flex-end;
    padding: 7px 8px;
}
.maintenance-record-panel {
    margin-top: 0;
    padding: 0;
}
.maintenance-record-panel .toolbar-actions {
    align-items: center;
}
.maintenance-search-form {
    margin: 0;
}
.maintenance-search-form input[type="search"] {
    min-width: min(360px, 42vw);
}
.maintenance-review-button {
    background: #eef9f4;
    border-color: #9bcfb8;
    border-radius: 6px;
    box-shadow: 0 2px 0 #8abca5;
    color: #23684a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    min-height: 38px;
    min-width: 165px;
    padding: 8px 12px;
    text-align: center;
}
.maintenance-review-button:hover {
    background: #e1f3eb;
    border-color: #7fb99c;
    color: #1f5f43;
    text-decoration: none;
    transform: translateY(-1px);
}
.maintenance-search-status {
    margin: -6px 0 14px;
}
.maintenance-current-search {
    background: #edf5ff;
    border: 1px solid #b7d3ed;
    border-radius: 6px;
    color: #315f85;
    margin: 0 0 12px;
    padding: 9px 11px;
}
.maintenance-current-search strong {
    color: #1769aa;
}
.maintenance-record-panel .table-scroll {
    border: 1px solid #d7dde3;
    border-radius: 8px;
    max-height: max(360px, calc(100vh - 292px));
    overflow: auto;
}
.maintenance-record-panel .contacts-table th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.maintenance-record-table mark {
    background: #fff0a8;
    border-radius: 3px;
    color: #4b3b00;
    padding: 1px 2px;
}
.maintenance-select-column {
    text-align: center;
    width: 76px;
}
.maintenance-select-column input {
    accent-color: #1769aa;
}
.button-confirm.is-disabled,
.button-confirm.is-disabled:hover {
    background: #c8d2dc;
    border-color: #c8d2dc;
    color: #52606d;
    cursor: not-allowed;
    pointer-events: none;
}
.maintenance-match-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.maintenance-match-reasons mark { padding: 3px 8px; border-radius: 999px; background: #fff0a8; color: #4b3b00; font-size: .82rem; }
.maintenance-pair-list { display: grid; gap: 18px; }
.maintenance-pair { background: #ffffff; border: 1px solid #d7dde3; border-radius: 8px; overflow: hidden; }
.maintenance-pair > header { align-items: center; background: #f4f7fa; border-bottom: 1px solid #d7dde3; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 10px 14px; }
.maintenance-pair > header span { color: #52606d; font-size: 13px; }
.maintenance-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.maintenance-compare > section { min-width: 0; padding: 16px; }
.maintenance-compare > section + section { border-left: 1px solid #d7dde3; }
.maintenance-compare h2 { font-size: 17px; margin: 0 0 12px; overflow-wrap: anywhere; }
.maintenance-compare dl { display: grid; font-size: 13px; gap: 7px 10px; grid-template-columns: 88px minmax(0, 1fr); margin: 0; }
.maintenance-compare dt { color: #697586; font-weight: 700; }
.maintenance-compare dd { margin: 0; overflow-wrap: anywhere; }
.maintenance-actions { background: #fbfcfd; border-top: 1px solid #d7dde3; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
.maintenance-actions form { display: flex; flex-wrap: wrap; gap: 8px; }

.import-next-actions {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d7dde3;
    border-radius: 8px;
    bottom: 12px;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px;
    position: sticky;
    z-index: 8;
}

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

.field-grid .wide-field {
    grid-column: 1 / -1;
}

.profile-form ul,
.company-checkboxes > div {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
}

.profile-form li label,
.company-checkboxes label {
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 6px;
    padding: 8px 10px;
}

.company-checkboxes label:has(input:checked) {
    background: #eef7ed;
    border-color: #9bc49a;
    color: #275d22;
    font-weight: 700;
}

.company-checkboxes input {
    accent-color: #1769aa;
}

.linked-companies {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.linked-companies a,
.linked-companies span {
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 999px;
    color: #384655;
    padding: 7px 10px;
}

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

.document-forms {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
}

.document-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    justify-content: flex-end;
}

.document-action {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(31, 41, 51, 0.05);
    color: #384655;
    display: inline-flex;
    gap: 10px;
    min-height: 48px;
    padding: 8px 10px;
}

.document-action:hover {
    background: #ffffff;
    border-color: #1769aa;
    box-shadow: 0 10px 22px rgba(31, 41, 51, 0.1);
    color: #1f2933;
    text-decoration: none;
}

.document-icon {
    align-items: center;
    background: #1769aa;
    border-radius: 7px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    min-width: 32px;
    padding: 0 4px;
}

.document-action-text {
    font-weight: 700;
    line-height: 1.2;
}

.mini-form {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    padding: 16px;
}

.mini-form h3 {
    font-size: 17px;
    margin: 0;
}

.mini-form button {
    justify-self: start;
}

.document-wide-form {
    grid-column: 1 / -1;
}

.picker-card {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.picker-card select {
    min-height: 150px;
}

.profile-form .wide-field,
.form-actions {
    grid-column: 1 / -1;
}

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

.detail-grid {
    border: 0;
    display: grid;
    grid-template-columns: 180px 1fr;
    margin: 0;
}

.detail-grid dt,
.detail-grid dd {
    border-bottom: 1px solid #e1e7ec;
    margin: 0;
    padding: 12px 14px;
}

.detail-grid dt {
    background: #eef3f7;
    font-weight: 700;
}

.pagination {
    align-items: center;
    background: rgba(245, 247, 249, 0.96);
    border: 1px solid #d7dde3;
    border-radius: 8px;
    box-shadow: 0 -8px 18px rgba(31, 41, 51, 0.08);
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px auto 0;
    padding: 10px 12px;
    position: sticky;
    bottom: 0;
    width: fit-content;
    z-index: 8;
}

.form > .form-actions,
.profile-form > .form-actions,
.form-panel .form-actions {
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e1e7ec;
    bottom: 0;
    margin: 0 -2px;
    padding: 12px 0 0;
    position: sticky;
    z-index: 8;
}

.table-wrap {
    border: 1px solid #d7dde3;
    border-radius: 8px;
    max-width: 100%;
    overflow: auto;
}

.data-table {
    border-collapse: collapse;
    min-width: 100%;
    table-layout: auto;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #e1e7ec;
    max-width: 320px;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.data-table th {
    background: #eef3f7;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-files {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    padding: 14px;
}

.selected-files h3 {
    margin-top: 0;
}

.selected-files ul {
    margin: 0;
    padding-left: 18px;
}

.file-warning {
    color: #a15b00;
    font-weight: 700;
}

.mapping-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mapping-row {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.4fr);
    padding: 10px 12px;
}

.mapping-row span {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mapping-row select {
    min-width: 0;
}

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

.inline-checkbox input {
    width: auto;
}

.radio-tile-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.radio-tile-grid > div {
    min-width: 0;
}

.profile-form .radio-tile-grid label {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
    border: 1px solid #d7dde3;
    border-radius: 6px;
    box-shadow: 0 2px 0 #c9d3dc, 0 6px 12px rgba(31, 41, 51, 0.06);
    color: #384655;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    min-height: 52px;
    padding: 9px 8px;
    text-align: center;
}

.profile-form .radio-tile-grid label:hover {
    background: #ffffff;
    border-color: #1769aa;
    box-shadow: 0 2px 0 #9eb2c3, 0 8px 15px rgba(31, 41, 51, 0.1);
    transform: translateY(-1px);
}

.profile-form .radio-tile-grid input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.profile-form .radio-tile-grid label:has(input:checked) {
    background: linear-gradient(180deg, #eef9f4 0%, #dff2eb 100%);
    border-color: #11845b;
    box-shadow: inset 0 0 0 1px #11845b, 0 1px 0 #0d6f4b;
    color: #22594c;
    transform: translateY(1px);
}

.profile-form .radio-tile-grid label:has(input:focus-visible) {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.radio-tile-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.checkbox-tile-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.checkbox-tile-grid > div {
    min-width: 0;
}

.profile-form .checkbox-tile-grid label {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
    border: 1px solid #d7dde3;
    border-radius: 6px;
    box-shadow: 0 2px 0 #c9d3dc, 0 6px 12px rgba(31, 41, 51, 0.06);
    color: #384655;
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    min-height: 52px;
    padding: 9px 8px;
    text-align: center;
}

.profile-form .checkbox-tile-grid label:hover {
    background: #ffffff;
    border-color: #1769aa;
    box-shadow: 0 2px 0 #9eb2c3, 0 8px 15px rgba(31, 41, 51, 0.1);
    transform: translateY(-1px);
}

.profile-form .checkbox-tile-grid input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.profile-form .checkbox-tile-grid label:has(input:checked) {
    background: linear-gradient(180deg, #eef9f4 0%, #dff2eb 100%);
    border-color: #11845b;
    box-shadow: inset 0 0 0 1px #11845b, 0 1px 0 #0d6f4b;
    color: #22594c;
    transform: translateY(1px);
}

.profile-form .checkbox-tile-grid label:has(input:focus-visible) {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.checkbox-tile-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}

.profile-form .checkbox-tile-grid-compact label {
    font-size: 12px;
    min-height: 36px;
    padding: 6px 8px;
}

.department-requirements {
    display: grid;
    gap: 12px;
}

.department-requirement {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.department-requirement[hidden] {
    display: none;
}

.department-requirement h4 {
    font-size: 15px;
    margin: 0;
}

.department-requirement textarea {
    min-height: 78px;
    overflow: hidden;
    resize: vertical;
    width: 100%;
}

.department-requirement-list {
    display: grid;
    gap: 12px;
}

.department-requirement-card {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    padding: 12px;
}

.department-requirement-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.department-requirement-card p {
    margin: 0;
}

.commission-compact {
    align-items: start;
    background: #fbfcfd;
    border: 1px solid #e1e7ec;
    border-radius: 6px;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(110px, 0.55fr) minmax(100px, 0.42fr) minmax(190px, 0.9fr);
    padding: 8px;
}

.commission-compact .radio-tile-grid {
    gap: 4px;
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
}

.profile-form .commission-compact .radio-tile-grid label {
    border-radius: 5px;
    box-shadow: 0 1px 0 #d7dde3;
    font-size: 11px;
    font-weight: 600;
    min-height: 28px;
    padding: 4px 5px;
}

.commission-compact input {
    font-size: 12px;
    min-height: 30px;
    padding: 5px 7px;
}

.commission-compact p {
    gap: 3px;
}

.commission-compact label {
    color: #697586;
    font-size: 11px;
}

.contact-autofill {
    align-items: end;
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    padding: 12px;
}

.contact-autofill input[readonly] {
    background: #ffffff;
    color: #384655;
}

.compact-contact-edit {
    align-self: end;
    white-space: nowrap;
}

.field-choice-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field-choice-grid fieldset {
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
}

.field-choice-grid legend {
    font-weight: 700;
    padding: 0 4px;
}

.worklist-field-choices > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    list-style: none;
}

.worklist-field-choices > summary::-webkit-details-marker {
    display: none;
}

.worklist-field-choices-summary > span:first-child {
    display: grid;
    gap: 3px;
}

.worklist-field-choices-summary strong {
    color: #1f2933;
    font-size: 22px;
    line-height: 1.2;
}

.worklist-field-choices-summary small {
    color: #697586;
    font-size: 12px;
}

.worklist-field-choice-count {
    align-items: center;
    color: #1769aa;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    gap: 10px;
}

.worklist-field-choice-count::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    height: 7px;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
    width: 7px;
}

.worklist-field-choices[open] .worklist-field-choice-count::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.worklist-field-choices-body {
    border-top: 1px solid #e1e7ec;
    margin-top: 16px;
    padding-top: 16px;
}

.worklist-field-choice-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.checkbox-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 6px;
}

.checkbox-control-button {
    font-size: 12px;
    padding: 5px 9px;
}

.sort-link {
    color: inherit;
    display: inline-flex;
    gap: 6px;
}

.sort-link.active {
    color: #1769aa;
    font-weight: 700;
}

.inline-add-form {
    margin: 0;
}

.link-button {
    background: transparent;
    border: 0;
    color: #1769aa;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}

.link-button:hover {
    text-decoration: underline;
}

.import-progress-overlay {
    align-items: center;
    background: rgba(18, 31, 43, 0.42);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.import-progress-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(18, 31, 43, 0.28);
    max-width: 460px;
    padding: 24px;
    width: 100%;
}

.import-progress-panel h2 {
    margin-top: 0;
}

.import-progress-bar {
    background: #dfe7ee;
    border-radius: 999px;
    height: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.import-progress-fill {
    animation: import-progress-slide 1.2s ease-in-out infinite;
    background: #2f6fed;
    border-radius: inherit;
    height: 100%;
    width: 38%;
}

@keyframes import-progress-slide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(280%);
    }
}

.equipment-kpi-grid {
    border-bottom: 1px solid #e1e7ec;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 14px;
}

.equipment-kpi-card {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
}

.equipment-kpi-card span {
    color: #697586;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.equipment-kpi-card strong {
    font-size: 19px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.equipment-flag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.equipment-flag-list span,
.equipment-color-pill,
.equipment-selection-chip {
    background: #eef3f7;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    color: #384655;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    padding: 5px 8px;
}

.equipment-checkbox-grid {
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
}

.equipment-checkbox-grid label {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 6px;
    display: inline-flex;
    gap: 8px;
    padding: 8px 10px;
}

.equipment-checkbox-grid input {
    accent-color: #1769aa;
}

.equipment-checkbox-grid label:has(input:checked) {
    background: #eef7ed;
    border-color: #9bc49a;
    color: #275d22;
    font-weight: 700;
}

.equipment-tile-builder {
    display: grid;
    gap: 12px;
}

.equipment-picker-tools {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.equipment-picker-tools label {
    color: #52606d;
    display: grid;
    flex: 1 1 320px;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
}

.equipment-picker-tools .search-status {
    margin: 0;
}

.equipment-color-picker {
    display: grid;
    gap: 6px;
    position: relative;
}

.equipment-color-picker > label {
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
}

.equipment-color-picker select {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.equipment-color-swatch-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.equipment-color-swatch {
    border: 2px solid #d7dde3;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    padding: 7px;
    text-align: left;
}

.equipment-color-swatch span {
    font-size: 11px;
    font-weight: 800;
}

.equipment-color-swatch.is-selected {
    box-shadow: 0 0 0 3px rgba(23, 105, 170, .22);
    transform: translateY(-1px);
}

.equipment-builder-layout {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
    min-height: 0;
}

.equipment-search-panel,
.equipment-composite-panel {
    border: 1px solid #d7dde3;
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(620px, 68vh);
    min-height: min(460px, 68vh);
    overflow: hidden;
    padding: 12px;
}

.equipment-composite-panel {
    align-self: stretch;
    position: sticky;
    top: 12px;
}

.equipment-panel-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.equipment-panel-header strong {
    display: block;
}

.equipment-panel-header span {
    color: #697586;
    font-size: 12px;
}

.equipment-result-list,
.equipment-selected-list {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.equipment-result-list {
    align-content: start;
}

.equipment-selected-list {
    align-content: start;
}

.equipment-result-card,
.equipment-selected-card {
    background: rgba(255,255,255,.82);
    border: 1px solid #d7dde3;
    border-radius: 8px;
    color: #1f2933;
    display: grid;
    gap: 4px;
    padding: 9px;
    text-align: left;
}

.equipment-result-card {
    cursor: pointer;
    min-height: 74px;
}

.equipment-result-card:hover,
.equipment-result-card:focus,
.equipment-result-card.is-selected {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, .14);
}

.equipment-result-card b {
    color: #1769aa;
    font-size: 12px;
    justify-self: start;
}

.equipment-result-card span,
.equipment-selected-card span,
.equipment-result-card small,
.equipment-selected-card small {
    color: #52606d;
    font-size: 11px;
}

.equipment-selected-card {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
}

.equipment-selected-card > div:first-of-type {
    min-width: 0;
}

.equipment-selected-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-selected-card.is-just-added {
    animation: equipment-pulse .45s ease;
}

.equipment-selected-controls {
    align-items: center;
    display: flex;
    gap: 4px;
}

.equipment-selected-controls button {
    background: #eef3f7;
    border: 1px solid #b8c2cc;
    border-radius: 5px;
    color: #1769aa;
    cursor: pointer;
    font-weight: 900;
    min-height: 30px;
    min-width: 30px;
}

.equipment-selected-controls .equipment-remove-item {
    color: #8a2c21;
}

.equipment-selected-controls input {
    min-height: 30px;
    text-align: center;
    width: 58px;
}

@keyframes equipment-pulse {
    0% { box-shadow: 0 0 0 0 rgba(47, 133, 90, .35); }
    100% { box-shadow: 0 0 0 8px rgba(47, 133, 90, 0); }
}

.equipment-selection-summary {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    padding: 10px;
}

.equipment-selection-empty {
    color: #697586;
    font-size: 13px;
}

.equipment-picker-quantity {
    min-width: 0;
    width: 76px;
}

.equipment-picker-table tbody tr[hidden] {
    display: none;
}

@media (max-width: 880px) {
    .equipment-builder-layout {
        grid-template-columns: 1fr;
    }
    .equipment-composite-panel {
        position: static;
    }
    .equipment-search-panel,
    .equipment-composite-panel {
        max-height: none;
        min-height: 320px;
    }
    .equipment-result-list,
    .equipment-selected-list {
        max-height: 360px;
    }
}

.equipment-color-blue,
.equipment-color-pill.equipment-color-blue { background: #e8f2ff; border-color: #9ec5fe; color: #184f78; }
.equipment-color-green,
.equipment-color-pill.equipment-color-green { background: #e8f8ee; border-color: #9bd5ad; color: #22543d; }
.equipment-color-yellow,
.equipment-color-pill.equipment-color-yellow { background: #fff8db; border-color: #f3d86b; color: #735c00; }
.equipment-color-red,
.equipment-color-pill.equipment-color-red { background: #fff0ee; border-color: #f5aaa2; color: #8a2c21; }
.equipment-color-orange,
.equipment-color-pill.equipment-color-orange { background: #fff3e4; border-color: #f4bf7f; color: #7a4411; }
.equipment-color-purple,
.equipment-color-pill.equipment-color-purple { background: #f2edff; border-color: #c5b4ff; color: #4b317a; }
.equipment-color-pink,
.equipment-color-pill.equipment-color-pink { background: #fff0f6; border-color: #f4a9c7; color: #7a294d; }
.equipment-color-cyan,
.equipment-color-pill.equipment-color-cyan { background: #e6fbff; border-color: #8ddbe7; color: #155e67; }
.equipment-color-teal,
.equipment-color-pill.equipment-color-teal { background: #e6f7f5; border-color: #8bcfc8; color: #1d5a54; }
.equipment-color-slate,
.equipment-color-pill.equipment-color-slate { background: #eef3f7; border-color: #c3ced8; color: #384655; }

@media (max-width: 620px) {
    .lookup-panel {
        border-radius: 8px 8px 0 0;
        bottom: 0;
        box-sizing: border-box;
        height: min(78dvh, 600px);
        left: 0;
        max-width: none;
        padding: 14px;
        top: auto;
        transform: none;
        width: 100%;
    }

    .lookup-header h2 {
        font-size: 18px;
    }

    .lookup-option {
        min-height: 48px;
    }

    .import-progress-overlay {
        align-items: end;
        padding: 0;
    }

    .import-progress-panel {
        border-radius: 8px 8px 0 0;
        box-sizing: border-box;
        max-width: none;
        padding: 20px;
    }
}

@media print {
    @page {
        margin: 14mm;
    }

    body {
        background: #ffffff;
        color: #000000;
        padding-left: 0;
    }

    .topbar,
    .messages,
    .no-print,
    .print-toolbar button,
    .row-actions,
    .actions-column,
    .menu-panel {
        display: none !important;
    }

    .page {
        margin: 0;
        max-width: none;
        padding: 0;
    }

    .toolbar,
    .print-toolbar,
    .panel-section {
        border: 0;
        box-shadow: none;
        margin: 0 0 12px;
        padding: 0;
    }

    .contacts-table,
    .mini-document-table {
        border-collapse: collapse;
        min-width: 0 !important;
        width: 100%;
    }

    .contacts-table th,
    .contacts-table td,
    .mini-document-table th,
    .mini-document-table td {
        border: 1px solid #b8c2cc;
        padding: 6px 8px;
    }

    .contacts-table th,
    .mini-document-table th,
    .profile-document-group h3 {
        background: #eeeeee !important;
        color: #000000;
    }

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

    a {
        color: #000000;
        text-decoration: none;
    }
}

@media (max-width: 720px) {
    .has-app-sidebar {
        padding-left: 0;
    }

    .toolbar,
    .toolbar-title,
    .toolbar-actions,
    .worklist-field-choices > summary,
    .worklist-builder,
    .worklist-controls,
    .detail-heading,
    .nav,
    .search {
        align-items: stretch;
        flex-direction: column;
    }

    .worklist-field-choices > summary {
        gap: 10px;
    }

    .worklist-field-choice-count {
        align-self: flex-start;
    }

    .topbar,
    .has-app-sidebar .topbar {
        align-items: center;
        border-bottom: 1px solid #d7dde3;
        border-right: 0;
        bottom: auto;
        display: grid;
        gap: 8px 12px;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: auto;
        left: auto;
        min-height: 56px;
        overflow: visible;
        padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
        position: sticky;
        right: auto;
        top: 0;
        width: auto;
    }

    .brand,
    .has-app-sidebar .brand {
        align-self: center;
        font-size: 18px;
        grid-column: 1;
        grid-row: 1;
        letter-spacing: .06em;
        padding: 0;
    }

    .mobile-nav-toggle {
        align-items: center;
        background: #eef3f7;
        border: 1px solid #d7dde3;
        border-radius: 8px;
        color: #1f2933;
        display: inline-flex;
        font-size: 13px;
        font-weight: 700;
        gap: 7px;
        grid-column: 3;
        grid-row: 1;
        min-height: 38px;
        padding: 7px 10px;
    }

    .mobile-nav-toggle-icon,
    .mobile-nav-toggle-icon::before,
    .mobile-nav-toggle-icon::after {
        background: currentColor;
        border-radius: 2px;
        display: block;
        height: 2px;
        position: relative;
        transition: transform .18s ease;
        width: 16px;
    }

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

    .mobile-nav-toggle-icon::before {
        top: -5px;
    }

    .mobile-nav-toggle-icon::after {
        top: 5px;
    }

    .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon {
        background: transparent;
    }

    .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .topbar .nav {
        background: #ffffff;
        border: 1px solid #d7dde3;
        border-radius: 10px;
        box-shadow: 0 14px 32px rgba(31, 41, 51, .16);
        display: none;
        gap: 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        left: 12px;
        margin: 0;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        padding: 8px;
        position: absolute;
        right: 12px;
        top: calc(100% + 6px);
        white-space: normal;
    }

    .topbar .nav.is-open {
        display: grid;
    }

    .nav a {
        align-items: center;
        border-left: 0;
        display: flex;
        min-height: 42px;
        padding: 8px 10px;
    }

    .account-menu {
        grid-column: 4;
        grid-row: 1;
        margin-top: 0;
    }

    .app-sidebar .account-menu .menu-panel {
        bottom: auto;
        left: auto;
        right: 0;
        top: calc(100% + 8px);
    }

    .page > .toolbar {
        margin-top: 0;
        position: static;
    }

    .import-flow-hero {
        grid-template-columns: 1fr;
    }

    .import-step-rail {
        justify-content: flex-start;
    }

    .import-step-rail li {
        font-size: 11px;
    }

    .import-next-actions {
        bottom: 8px;
        justify-content: stretch;
    }

    .import-next-actions .button-confirm,
    .import-next-actions .button-secondary,
    .import-next-actions .button-link,
    .import-next-actions button,
    .import-next-actions a {
        justify-content: center;
        text-align: center;
    }

    .maintenance-compare,
    .maintenance-actions { grid-template-columns: 1fr; }

    .maintenance-compare > section + section { border-left: 0; border-top: 1px solid #d7dde3; }

    .maintenance-toolbar-head,
    .maintenance-table-tabs { grid-template-columns: 1fr; }

    .maintenance-toolbar-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .maintenance-merge-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .maintenance-selected-table {
        border-left: 0;
        border-top: 1px solid #c8dced;
        padding: 10px 0 0;
    }

    .maintenance-review-button {
        min-width: 0;
    }

    .maintenance-search-form input[type="search"] {
        min-width: 0;
        width: 100%;
    }

    .pagination {
        width: auto;
    }

    .account-menu {
        grid-column: 4;
        grid-row: 1;
        justify-self: end;
    }

    .account-menu summary {
        max-width: 42vw;
        overflow: hidden;
        padding: 6px 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: max-content;
    }

    .row-actions summary {
        opacity: 1;
    }

    .menu-panel {
        max-width: calc(100vw - 48px);
        min-width: 190px;
    }

    .profile-menu .menu-panel {
        left: auto;
        right: 0;
        transform: none;
    }

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

    .profile-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .profile-card-header {
        align-items: stretch;
        flex-direction: column;
        margin: -20px -20px 0;
        padding: 18px 20px;
    }

    .job-profile-card .profile-card-header {
        position: static;
    }

    .profile-summary {
        padding: 18px;
    }

    .profile-photo {
        width: 132px;
    }

    .profile-photo img {
        height: 132px;
    }

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

    .home-page .account-menu summary {
        max-width: 30vw;
    }

    .home-page .page {
        padding-top: 18px;
    }

    .home-page .dashboard-heading {
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }

    .home-page .dashboard-heading h1 {
        font-size: 24px;
    }

    .home-page .dashboard-heading .section-label {
        margin-bottom: 4px;
    }

    .home-page .dashboard-heading > p {
        font-size: 13px;
    }

    .home-page .landing-layout-actions {
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
    }

    .home-page .landing-layout-actions > span {
        flex-basis: 100%;
    }

    .home-page .landing-layout-actions button {
        flex: 1;
        justify-content: center;
    }

    .home-page .dashboard-grid {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-page .dashboard-tile {
        align-content: start;
        gap: 10px;
        grid-template-columns: 1fr;
        min-height: 116px;
        padding: 14px;
    }

    .home-page .landing-dashboard-grid.is-arranging {
        padding: 7px;
    }

    .home-page .landing-dashboard-grid.is-arranging .dashboard-tile {
        padding: 36px 10px 10px;
    }

    .home-page .landing-tile-controls {
        left: auto;
        right: 6px;
    }

    .home-page .landing-tile-controls button {
        flex: 0 0 24px;
        height: 24px;
        width: 24px;
    }

    .home-page .dashboard-icon {
        height: 40px;
        width: 40px;
    }

    .home-page .dashboard-icon svg {
        height: 22px;
        width: 22px;
    }

    .home-page .dashboard-tile-text {
        gap: 3px;
    }

    .home-page .dashboard-tile-text strong {
        font-size: 16px;
    }

    .home-page .dashboard-tile-text span {
        font-size: 12px;
    }

    .home-page .recent-workspace,
    .home-page .workspace-search-card {
        margin-bottom: 14px;
    }

    .mobile-record-page .page {
        max-width: none;
        padding: 12px 10px 84px;
    }

    .mobile-record-switcher {
        background: #ffffff;
        border: 1px solid #cfd8e3;
        border-radius: 10px;
        display: grid;
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 12px;
        padding: 5px;
    }

    .mobile-record-switcher a {
        border: 1px solid transparent;
        border-radius: 7px;
        color: #526170;
        display: grid;
        gap: 2px;
        min-width: 0;
        padding: 9px 10px;
    }

    .mobile-record-switcher a:hover {
        text-decoration: none;
    }

    .mobile-record-switcher a.active {
        background: #eef3f7;
        border-color: #c9d9e6;
        color: #1769aa;
    }

    .mobile-record-switcher span {
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-record-page .profile-card {
        border-radius: 10px;
        gap: 12px;
        padding: 0 12px 12px;
    }

    .mobile-record-page .profile-card-header {
        align-items: flex-start;
        gap: 10px;
        margin: -1px -12px 0;
        padding: 14px 12px;
    }

    .mobile-record-page .profile-card-header h1 {
        font-size: 22px;
    }

    .mobile-record-page .profile-status {
        align-self: flex-start;
        font-size: 12px;
        max-width: 100%;
        padding: 6px 9px;
    }

    .mobile-record-page .profile-summary {
        align-items: center;
        gap: 4px 12px;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        justify-items: start;
        padding: 10px;
        text-align: left;
    }

    .mobile-record-page .profile-summary .profile-photo {
        grid-row: 1 / span 3;
        width: 64px;
    }

    .mobile-record-page .profile-summary .profile-photo img {
        height: 64px;
    }

    .mobile-record-page .profile-summary h2 {
        font-size: 17px;
    }

    .mobile-record-page .profile-summary .profile-menu,
    .mobile-record-page .profile-summary .actions {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    .mobile-record-page .profile-summary p {
        font-size: 12px;
    }

    .mobile-record-page .profile-form {
        border: 0;
        padding: 0;
    }

    .mobile-form-steps {
        display: flex;
        gap: 7px;
        grid-column: 1 / -1;
        margin: 0 -2px;
        overflow-x: auto;
        padding: 2px 2px 6px;
        scrollbar-width: thin;
    }

    .mobile-form-steps a {
        background: #eef3f7;
        border: 1px solid #cfdae4;
        border-radius: 999px;
        color: #384655;
        flex: 0 0 auto;
        font-size: 13px;
        font-weight: 700;
        padding: 8px 11px;
    }

    .mobile-form-steps a:hover {
        background: #e1effa;
        border-color: #1769aa;
        color: #1769aa;
        text-decoration: none;
    }

    .mobile-form-intro {
        color: #526170;
        display: block;
        font-size: 13px;
        grid-column: 1 / -1;
        line-height: 1.4;
        margin: 0;
    }

    .mobile-record-page .form-section {
        gap: 10px;
        padding: 14px 0;
        scroll-margin-top: 112px;
    }

    .mobile-record-page .form-section h3 {
        font-size: 18px;
    }

    .mobile-record-page [data-mobile-record-form] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .mobile-record-page [data-mobile-record-form] select,
    .mobile-record-page [data-mobile-record-form] textarea,
    .mobile-record-page [data-mobile-record-form] .lookup-trigger {
        font-size: 16px;
        min-height: 48px;
    }

    .mobile-record-page [data-mobile-record-form] textarea {
        min-height: 112px;
    }

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

    .mobile-upload-option {
        align-items: flex-start;
        flex-direction: column;
        min-height: 92px;
    }

    .mobile-workflow-callout {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .mobile-workflow-callout .button-secondary {
        min-height: 46px;
        padding-top: 12px;
    }

    .mobile-record-page [data-mobile-record-form] > .form-actions {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #cfd8e3;
        border-radius: 10px 10px 0 0;
        bottom: 0;
        box-shadow: 0 -10px 24px rgba(31, 41, 51, 0.14);
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        margin: 0 -12px -12px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .mobile-record-page [data-mobile-record-form] > .form-actions button,
    .mobile-record-page [data-mobile-record-form] > .form-actions a {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 46px;
        text-align: center;
    }

    .mobile-record-page .people-list-table,
    .mobile-record-page .people-list-table tbody {
        background: transparent;
        display: block;
    }

    .mobile-record-page .people-list-table thead {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .mobile-record-page .people-list-table tbody {
        display: grid;
        gap: 10px;
    }

    .mobile-record-page .people-list-table tbody tr {
        background: #ffffff;
        border: 1px solid #d7dde3;
        border-radius: 9px;
        box-shadow: 0 5px 14px rgba(31, 41, 51, 0.05);
        display: grid;
        padding: 8px 42px 8px 8px;
        position: relative;
    }

    .mobile-record-page .people-list-table tbody tr:hover {
        background: #ffffff;
    }

    .mobile-record-page .people-list-table tbody td {
        align-items: start;
        border: 0;
        display: grid;
        gap: 8px;
        grid-template-columns: 78px minmax(0, 1fr);
        min-width: 0;
        overflow-wrap: anywhere;
        padding: 6px;
    }

    .mobile-record-page .people-list-table tbody td::before {
        color: #697586;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

    .mobile-record-page .people-list-table tbody .row-actions {
        display: block;
        padding: 0;
        position: absolute;
        right: 8px;
        top: 8px;
    }

    .mobile-record-page .people-list-table tbody .row-actions::before {
        display: none;
    }

    .mobile-record-page .people-list-table .row-actions summary {
        min-height: 38px;
        min-width: 38px;
    }

    .field-grid,
    .field-with-action,
    .profile-pickers,
    .document-forms,
    .document-actions,
    .profile-form ul,
    .company-checkboxes > div,
    .equipment-checkbox-grid,
    .equipment-kpi-grid {
        grid-template-columns: 1fr;
    }

    .document-wide-form {
        grid-column: auto;
    }

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

@media (max-width: 720px) {
    .timeline-tile-editor-backdrop {
        align-items: stretch !important;
        padding: 0 !important;
    }

    .timeline-tile-editor-window {
        border-radius: 0 !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        height: 100dvh !important;
        max-height: none !important;
        max-width: none !important;
        overflow: hidden !important;
        width: 100% !important;
    }

    .timeline-tile-editor-grid {
        gap: 10px !important;
        overflow-y: auto !important;
        padding: 12px !important;
    }

    .timeline-tile-editor-section [data-tile-editor-notes],
    .timeline-tile-editor-section textarea {
        min-height: 110px !important;
    }

    .timeline-tile-editor-crew-list {
        max-height: 260px !important;
    }

    .timeline-crew-popover {
        border-radius: 0 !important;
        bottom: 0 !important;
        box-sizing: border-box !important;
        height: 100dvh !important;
        left: 0 !important;
        max-height: none !important;
        max-width: none !important;
        min-height: 0 !important;
        min-width: 0 !important;
        padding: 10px !important;
        resize: none !important;
        right: 0 !important;
        top: 0 !important;
        width: auto !important;
    }

    .timeline-crew-popover-head {
        cursor: default !important;
    }
}

@media (max-width: 620px) {
    .touring-day-editor {
        border-radius: 0 !important;
        bottom: 0 !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        height: 100dvh !important;
        left: 0 !important;
        max-height: none !important;
        max-width: none !important;
        min-height: 0 !important;
        min-width: 0 !important;
        resize: none !important;
        right: 0 !important;
        top: 0 !important;
        width: auto !important;
    }

    .touring-day-editor form {
        height: auto !important;
    }

    .touring-day-editor-main {
        overflow-y: auto !important;
        padding: 10px !important;
    }

    .touring-day-editor > form > footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }
}
