:root {
    --swh-accent: #0d6efd;
    --swh-navbar-height: 3.25rem;
    --settings-sticky-offset: 6.5rem;
}

body {
    background: #f4f6f9;
}

.app-navbar {
    background: #1a1d21 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    flex: 0 0 auto;
}

.app-navbar .nav-link {
    font-size: 0.925rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.app-navbar .dropdown-menu {
    font-size: 0.925rem;
    border: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.app-navbar .dropdown-item.active,
.app-navbar .dropdown-item:active {
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.nav-user-toggle {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.nav-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.nav-user-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-menu {
    min-width: 15rem;
}

.nav-user-menu .dropdown-header {
    white-space: normal;
    padding-bottom: 0.65rem;
}

.nav-count-badge {
    background: #0d6efd;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    vertical-align: middle;
}

.invoice-form .card {
    border-radius: 0.8rem;
}

.invoice-item:last-child {
    border-bottom: 0 !important;
}

.invoice-summary-card {
    position: sticky;
    top: calc(var(--swh-navbar-height) + 1.5rem);
}

@media (max-width: 991.98px) {
    .invoice-summary-card {
        position: static;
    }
}

.task-table-wrap {
    max-width: 100%;
}

.task-table-wrap--uncontained {
    overflow: visible;
}

.task-table {
    table-layout: fixed;
    width: 100%;
    min-width: 62rem;
}

.task-table th.task-col-id,
.task-table td.task-col-id {
    width: 3.5rem;
}

.task-table th.task-col-title,
.task-table td.task-col-title {
    width: 24%;
    min-width: 9rem;
    overflow: hidden;
}

.task-table th.task-col-assignee,
.task-table td.task-col-assignee {
    width: 12%;
    min-width: 6.5rem;
}

.task-table th.task-col-type,
.task-table td.task-col-type {
    width: 11%;
    min-width: 6rem;
}

.task-table th.task-col-status,
.task-table td.task-col-status {
    width: 10%;
    min-width: 6rem;
}

.task-table th.task-col-due,
.task-table td.task-col-due {
    width: 7rem;
}

.task-table th.task-col-updated,
.task-table td.task-col-updated {
    width: 8.5rem;
}

.task-table th.task-col-project,
.task-table td.task-col-project {
    width: auto;
    min-width: 8rem;
}

.task-table thead {
    user-select: none;
    -webkit-user-select: none;
}

/* Shared sticky table headers
   - .swh-table-sticky: sticks under the navbar as the page scrolls
   - .swh-table-sticky-wrap: keeps chrome above; header sticks inside the scrollport */
.swh-table-sticky > thead > tr > th,
table.swh-table-sticky thead th {
    position: sticky;
    top: var(--swh-navbar-height);
    z-index: 2;
    background-color: var(--swh-table-header-bg, #fff);
    box-shadow: inset 0 -1px 0 #dee2e6;
}

.swh-table-sticky-wrap {
    overflow: auto;
    max-width: 100%;
    max-height: calc(100vh - var(--swh-navbar-height) - var(--swh-table-wrap-offset, 8.5rem));
}

.swh-table-sticky-wrap > table > thead > tr > th,
.swh-table-sticky-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--swh-table-header-bg, #fff);
    box-shadow: inset 0 -1px 0 #dee2e6;
}

.swh-table-sticky-wrap--filters {
    --swh-table-wrap-offset: 11.5rem;
}

.swh-table-sticky-wrap--tabs {
    --swh-table-wrap-offset: 9.5rem;
}

.swh-table-sticky-wrap--tabs-status {
    --swh-table-wrap-offset: 12.25rem;
}

.swh-table-sticky-wrap--toolbar {
    --swh-table-wrap-offset: 13rem;
}

@media (max-width: 991.98px) {
    .task-table-wrap--uncontained {
        overflow-x: auto;
    }
}

.task-table th.task-col-project,
.task-table td.task-col-project {
    white-space: normal;
}

.task-table .task-project-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

.task-title-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.task-priority-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%);
}

.task-priority-dot--low {
    background: #198754;
}

.task-priority-dot--medium {
    background: #fd7e14;
}

.task-priority-dot--high {
    background: #dc3545;
}

h1 .task-priority-dot {
    width: 0.7rem;
    height: 0.7rem;
}

.task-table .task-title-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.badge.status-ready-for-review {
    background: #6f42c1;
    color: #fff;
}

.task-list-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.task-status-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.7rem;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    background: #fff;
    color: #495057;
    font-size: 0.82rem;
    line-height: 1.3;
    text-decoration: none;
}

.task-status-filter:hover {
    background: #f8f9fa;
    color: #212529;
}

.task-status-filter.is-active {
    background: #eef2ff;
    border-color: #c5d0ff;
    color: #1d4ed8;
    font-weight: 600;
}

.task-status-filter .badge {
    background: #e9ecef;
    color: #495057;
    font-size: 0.68rem;
    font-weight: 600;
}

.task-status-filter.is-active .badge {
    background: #dbe4ff;
    color: #1d4ed8;
}

.task-table .task-assignee-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.task-list-tabs .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
}

.task-list-tabs .badge {
    font-size: 0.68rem;
    font-weight: 600;
    vertical-align: middle;
}

.dashboard-tabs {
    border-bottom: 1px solid #dee2e6;
}

.dashboard-tabs .nav-link {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

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

table.dashboard-task-table > colgroup > col.task-col-id {
    width: 4%;
}

table.dashboard-task-table > colgroup > col.task-col-title {
    width: 30%;
}

table.dashboard-task-table > colgroup > col.task-col-type {
    width: 15%;
}

table.dashboard-task-table > colgroup > col.task-col-assignee {
    width: 13%;
}

table.dashboard-task-table > colgroup > col.task-col-status {
    width: 11%;
}

table.dashboard-task-table > colgroup > col.task-col-due {
    width: 11%;
}

table.dashboard-task-table th.task-col-title,
table.dashboard-task-table td.task-col-title {
    overflow: hidden;
}

table.dashboard-task-table th.task-col-type,
table.dashboard-task-table td.task-col-type,
table.dashboard-task-table th.task-col-assignee,
table.dashboard-task-table td.task-col-assignee {
    white-space: normal;
    word-break: break-word;
}

table.dashboard-task-table th.task-col-due,
table.dashboard-task-table td.task-col-due {
    font-size: 0.875rem;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    user-select: none;
    -webkit-user-select: none;
}

.filter-toolbar select,
.filter-toolbar input,
.filter-toolbar button {
    user-select: auto;
    -webkit-user-select: auto;
}

.filter-toolbar__field {
    flex: 1 1 11rem;
    min-width: 11rem;
    max-width: 18rem;
}

.filter-toolbar__action {
    flex: 0 0 auto;
    min-width: 6.5rem;
}

.reference-files-list {
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.reference-files-item {
    font-size: 0.875rem;
    color: #495057;
    padding: 0.15rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reference-files-item::before {
    content: "• ";
    color: #6c757d;
}

.task-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.task-sort-link:hover {
    color: #0d6efd;
}

.task-sort-link:focus {
    outline: none;
    box-shadow: none;
}

.task-sort-link:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 0.2rem;
}

.task-sort-icon {
    font-size: 0.72rem;
    margin-left: 0.15rem;
}

.task-sort-icon-idle {
    opacity: 0.35;
}

.notification-item--unread {
    background: #fffdf5;
}

.notification-item-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.notification-unread-slot {
    width: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 0.55rem;
}

.notification-unread-bubble {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #f0ad4e;
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.2);
}

.notification-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.notification-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.notification-action-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    background: #e9ecef;
    color: #343a40;
}

.notification-accent--assigned .notification-action-badge {
    background: #e7f0ff;
    color: #0a58ca;
}

.notification-accent--review .notification-action-badge {
    background: #fff3cd;
    color: #997404;
}

.notification-accent--revision .notification-action-badge {
    background: #f8d7da;
    color: #842029;
}

.notification-accent--mention .notification-action-badge {
    background: #e7f1ff;
    color: #084298;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.notification-accent--done .notification-action-badge {
    background: #d1e7dd;
    color: #0f5132;
}

.notification-accent--project .notification-action-badge {
    background: #e2e3e5;
    color: #41464b;
}

.notification-time {
    margin: 0;
    white-space: nowrap;
}

.notification-subtitle {
    margin-top: 0.45rem;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.35;
    color: #212529;
}

.notification-actor {
    margin-top: 0.3rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0a58ca;
}

.notification-meta {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.notification-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-top: 0.4rem;
}

.notification-body--low {
    -webkit-line-clamp: 2;
    color: #6c757d !important;
}

.notification-body--normal {
    -webkit-line-clamp: 3;
}

.notification-body--high {
    -webkit-line-clamp: 5;
    margin-top: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    background: #f8f9fa;
    border-left: 3px solid rgba(13, 110, 253, 0.35);
    font-size: 0.95rem;
    color: #212529 !important;
}

.notification-accent--mention .notification-body--high {
    background: #f3f7ff;
    border-left-color: #0d6efd;
}

.notification-accent--revision .notification-body--high {
    background: #fff5f5;
    border-left-color: #dc3545;
}

.notification-open-form {
    margin: 0.75rem 0 0;
}

.notification-unread-label {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.2rem;
}

.notification-splash-modal .modal-header {
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-splash-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #fff3cd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23b58105' viewBox='0 0 16 16'%3E%3Cpath d='M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zm.995-14.901a1 1 0 1 0-1.99 0A5.002 5.002 0 0 0 3 6c0 1.098-.5 6-2 7h14c-1.5-1-2-5.902-2-7 0-2.42-1.72-4.44-4.005-4.901z'/%3E%3C/svg%3E") center / 1.15rem no-repeat;
    border: 1px solid #ffe69c;
}

.pre-wrap {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: inherit;
}

.thread-message {
    margin-bottom: 0.75rem;
}

.thread-message.thread-participant {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border-left: none;
}

.thread-participant-0 {
    background: #e7f0ff;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.2);
}

.thread-message.thread-participant-0 .thread-meta strong {
    color: #0a58ca;
}

.thread-participant-1 {
    background: #e3f5eb;
    box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.2);
}

.thread-message.thread-participant-1 .thread-meta strong {
    color: #146c43;
}

.thread-participant-2 {
    background: #fef3e2;
    box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.2);
}

.thread-message.thread-participant-2 .thread-meta strong {
    color: #92400e;
}

.thread-participant-3 {
    background: #f0e9fb;
    box-shadow: inset 0 0 0 1px rgba(111, 66, 193, 0.2);
}

.thread-message.thread-participant-3 .thread-meta strong {
    color: #59359a;
}

.thread-participant-4 {
    background: #e2f6fa;
    box-shadow: inset 0 0 0 1px rgba(10, 162, 192, 0.2);
}

.thread-message.thread-participant-4 .thread-meta strong {
    color: #087990;
}

.thread-participant-5 {
    background: #fce8f2;
    box-shadow: inset 0 0 0 1px rgba(214, 51, 132, 0.2);
}

.thread-message.thread-participant-5 .thread-meta strong {
    color: #ab296a;
}

.thread-participant-self {
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.thread-participant-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 0.25rem;
    vertical-align: middle;
}

.thread-participant-0 .thread-participant-tag {
    background: rgba(13, 110, 253, 0.14);
    color: #084298;
}

.thread-participant-1 .thread-participant-tag {
    background: rgba(25, 135, 84, 0.14);
    color: #0a3622;
}

.thread-participant-2 .thread-participant-tag {
    background: rgba(180, 83, 9, 0.14);
    color: #78350f;
}

.thread-participant-3 .thread-participant-tag {
    background: rgba(111, 66, 193, 0.14);
    color: #432874;
}

.thread-participant-4 .thread-participant-tag {
    background: rgba(10, 162, 192, 0.14);
    color: #055160;
}

.thread-participant-5 .thread-participant-tag {
    background: rgba(214, 51, 132, 0.14);
    color: #80174c;
}

.thread-participant-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8125rem;
}

.thread-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    color: #495057;
    line-height: 1.25;
}

.thread-legend-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.thread-legend-item.thread-participant-0 .thread-legend-dot { background: #0d6efd; }
.thread-legend-item.thread-participant-1 .thread-legend-dot { background: #198754; }
.thread-legend-item.thread-participant-2 .thread-legend-dot { background: #b45309; }
.thread-legend-item.thread-participant-3 .thread-legend-dot { background: #6f42c1; }
.thread-legend-item.thread-participant-4 .thread-legend-dot { background: #0aa2c0; }
.thread-legend-item.thread-participant-5 .thread-legend-dot { background: #d63384; }

.thread-system:not(.thread-participant) {
    border-left: 3px solid #adb5bd;
    background: #f8f9fa;
    padding: .75rem 1rem;
    border-radius: .25rem;
}

.thread-participant.thread-system .thread-event-badge {
    opacity: 0.95;
}

.thread-event-badge {
    display: inline-block;
    margin-left: .5rem;
    padding: .1rem .45rem;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #495057;
    background: #e9ecef;
    border-radius: .25rem;
    vertical-align: middle;
}

.thread-event-submitted .thread-event-badge,
.thread-event-assigned .thread-event-badge {
    background: #cfe2ff;
    color: #084298;
}

.thread-event-approved .thread-event-badge {
    background: #d1e7dd;
    color: #0f5132;
}

.thread-event-revision .thread-event-badge,
.thread-event-sent_back .thread-event-badge {
    background: #f8d7da;
    color: #842029;
}

.thread-body {
    line-height: 1.6;
    font-family: inherit;
    font-size: inherit;
}

.thread-body a {
    word-break: break-word;
}

.thread-user-ref {
    font-weight: 600;
    color: #0d6efd;
}

.thread-user-ref-unknown {
    color: #6c757d;
    font-weight: 500;
}

.thread-meta {
    font-size: .875rem;
    margin-bottom: .25rem;
}

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

.parent-task-trigger {
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: calc(1.5em + 0.75rem + 2px);
}

.place-row .place-map-btn {
    min-height: calc(1.5em + 0.75rem + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.place-import-wrap {
    width: min(100%, 16rem);
}

.place-import-status.text-success {
    color: #146c43 !important;
}

.parent-task-trigger-text.has-value {
    color: inherit;
}

.parent-task-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.parent-task-picker-list {
    max-height: 12rem;
    overflow-y: auto;
}

.parent-task-option {
    font-size: 0.875rem;
}

.parent-task-option.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.parent-task-option.active .text-secondary {
    color: rgba(255, 255, 255, 0.75) !important;
}

.multi-picker-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.multi-picker-option .form-check-input {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.multi-picker-option.active {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary-border-subtle, var(--bs-border-color));
    color: inherit;
}

.multi-picker-option.active .text-secondary {
    color: var(--bs-secondary-color) !important;
}

.wp-place-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1050;
}

.mention-input-wrap .mention-menu,
.mention-menu {
    max-height: 220px;
    overflow-y: auto;
    z-index: 1060;
}

.mention-menu.mention-menu-down {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.mention-menu.mention-menu-up {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.mention-menu .list-group-item.active {
    background-color: var(--swh-accent);
    border-color: var(--swh-accent);
    color: #fff;
}

.mention-menu .list-group-item.active .text-secondary {
    color: rgba(255, 255, 255, 0.85) !important;
}

.mention {
    font-weight: 600;
    color: var(--swh-accent);
}

.mention-unknown {
    color: #6c757d;
}

.content-preview {
    line-height: 1.6;
}

.markdown-body {
    line-height: 1.6;
}

.markdown-body h1 {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
}

.markdown-body h2 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
}

.markdown-body h3 {
    font-size: 1.1rem;
    margin: 0.85rem 0 0.4rem;
}

.markdown-body p {
    margin-bottom: 0.65rem;
}

.markdown-body p:last-child,
.markdown-body ul:last-child,
.markdown-body ol:last-child {
    margin-bottom: 0;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 0.65rem;
    padding-left: 1.35rem;
}

.markdown-body blockquote {
    margin: 0.5rem 0;
    padding: 0.35rem 0.85rem;
    border-left: 3px solid #dee2e6;
    color: #495057;
}

.markdown-body code {
    font-size: 0.9em;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    background: #f1f3f5;
}

.markdown-large {
    font-size: 1.12em;
}

.markdown-editor .markdown-hint {
    margin-top: 0.35rem;
}

.markdown-toolbar .btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.task-zone {
    margin-bottom: 1.5rem;
}

.task-zone-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.task-zone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    font-size: 0.8125rem;
    line-height: 1;
    flex-shrink: 0;
}

.task-zone-icon svg {
    display: block;
}

.task-section-copy {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
    flex-shrink: 0;
}

.task-section-copy:hover,
.task-section-copy:focus-visible {
    opacity: 1;
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

.task-section-copy.is-copied {
    opacity: 1;
    color: #198754;
}

.task-section-copy svg {
    display: block;
}

.task-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-section-header-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.thread-zone-icon {
    background: rgba(108, 117, 125, 0.14);
    color: #495057;
}

.task-brief {
    padding: 1rem 1.25rem 0.25rem;
    background: linear-gradient(180deg, #eef4fb 0%, #f6f9fc 100%);
    border: 1px solid rgba(13, 110, 253, 0.14);
    border-radius: 0.75rem;
}

.task-brief .task-zone-label {
    color: #386091;
}

.task-brief .task-zone-icon {
    background: rgba(13, 110, 253, 0.14);
    color: #0d6efd;
}

.task-brief .card {
    background: #fff;
    border: 1px solid rgba(13, 110, 253, 0.1);
    box-shadow: none;
}

.task-brief .card:last-child {
    margin-bottom: 1rem !important;
}

.task-deliverable {
    /* Cards stay full column width; only the zone title stays inset to match Task brief icons */
    padding-left: 0;
    padding-right: 0;
}

.task-deliverable .task-zone-label {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    color: #2d6a4f;
}

.task-deliverable .task-zone-icon {
    background: rgba(25, 135, 84, 0.14);
    color: #198754;
}

.task-deliverable .card {
    border-left: 3px solid rgba(25, 135, 84, 0.4);
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card {
    border: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.place-photo-thumb {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.photo-gallery {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
    min-height: 320px;
}

.photo-gallery-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.photo-gallery-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: #fff;
    text-align: left;
}

.photo-gallery-item.is-active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.photo-gallery-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 0.35rem;
    background: #f3f4f6;
}

.photo-gallery-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #6c757d;
}

.photo-gallery-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.photo-gallery-item-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-gallery-item-location {
    display: block;
    font-size: 0.72rem;
    color: #6c757d;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-gallery-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.photo-gallery-item-incomplete {
    border-color: rgba(255, 193, 7, 0.55);
    background: #fffdf5;
}

.photo-metadata-form {
    padding: 0.85rem;
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 0.5rem;
    background: #f8fbff;
}

.photo-metadata-exif summary {
    cursor: pointer;
}

.photo-metadata-badge {
    font-size: 0.65rem;
}

.swh-upload-progress-track {
    height: 0.55rem;
}

.swh-upload-progress-indeterminate .swh-upload-progress-bar {
    animation: swh-upload-indeterminate 1.2s ease-in-out infinite;
}

@keyframes swh-upload-indeterminate {
    0% { opacity: 0.55; }
    50% { opacity: 1; }
    100% { opacity: 0.55; }
}

.photo-gallery-detail {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: #fafbfc;
}

.photo-gallery-preview-link {
    display: block;
    margin-bottom: 0.85rem;
}

.photo-gallery-preview {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 0.35rem;
    background: #fff;
}

.photo-gallery-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #6c757d;
}

.photo-gallery-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.photo-metadata-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem 1rem;
    margin: 0 0 1rem;
}

.photo-metadata-row dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    margin-bottom: 0.15rem;
}

.photo-metadata-row dd {
    margin: 0;
    font-size: 0.88rem;
}

@media (max-width: 767.98px) {
    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .photo-gallery-list {
        max-height: 220px;
    }
}

.recommend-place-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.recommend-place-row .form-control,
.recommend-place-row .form-select {
    flex: 1 1 120px;
    min-width: 0;
    font-size: 0.82rem;
}

.thread-reply-quote {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.75rem;
    border-left: 3px solid #0d6efd;
    background: rgba(13, 110, 253, 0.06);
    border-radius: 0.35rem;
    font-size: 0.88rem;
}

.thread-reply-quote-meta {
    margin-bottom: 0.25rem;
    color: #6c757d;
    font-size: 0.78rem;
}

.thread-reply-quote-body {
    color: #495057;
}

.thread-reply-preview {
    padding: 0.5rem 0.65rem;
    background: #f8f9fa;
    border-radius: 0.35rem;
}

.thread-edited-label {
    font-style: italic;
}

.thread-message-actions .btn-link {
    text-decoration: none;
}

.thread-edit-form textarea {
    min-height: 5rem;
}

.place-field-tabs .nav-link {
    font-size: 0.85rem;
    white-space: nowrap;
}

.field-trip-route-map {
    height: 380px;
    background: #eef2f6;
}

.field-trip-route-stats {
    font-size: 1.05rem;
}

.field-trip-stat-sep {
    margin: 0 0.45rem;
    color: #adb5bd;
}

.field-trip-order-list {
    padding-left: 0;
    list-style: none;
}

.field-trip-order-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.field-trip-order-item:first-child {
    border-top: 0;
}

.field-trip-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.field-trip-order-badge-start {
    background: #ea580c;
}

.field-trip-order-name {
    font-weight: 500;
}

.field-trip-callout {
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(234, 88, 12, 0.35);
    border-left-width: 4px;
    border-left-color: #ea580c;
    border-radius: 0.65rem;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    color: #7c2d12;
}

.field-trip-callout-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #9a3412;
    line-height: 1.3;
}

.field-trip-callout-desc {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #9a3412;
}

.field-trip-callout-form .field-trip-callout-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding-left: 0;
    min-height: 0;
}

.field-trip-callout-form .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
    position: static;
    width: 1.15em;
    height: 1.15em;
    border-color: #ea580c;
}

.field-trip-callout-form .form-check-input:checked {
    background-color: #ea580c;
    border-color: #ea580c;
}

.field-trip-callout-form .form-check-label {
    padding-left: 0;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.field-trip-badge {
    background-color: #ea580c !important;
    color: #fff !important;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.place-map {
    z-index: 1;
    min-height: 320px;
}

#map-picker-map {
    min-height: 420px;
}

.pac-container {
    z-index: 2000;
}

.small-place-view dt {
    font-weight: 600;
}

.place-field-modified {
    background: #fff3cd;
    border-radius: 0.25rem;
}

.place-field-modified-badge {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 0.2rem;
    vertical-align: middle;
}

.place-review-section + .place-review-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.amenities-tab-pane .form-check {
    min-height: 1.75rem;
}

.draft-autosave-status {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
}

.draft-autosave-status.is-dirty {
    color: #664d03;
    border-color: #ffecb5;
    background: #fff8e1;
}

.draft-autosave-status.is-saving {
    color: #055160;
    border-color: #9eeaf9;
    background: #e7f8fc;
}

.draft-autosave-status.is-saved {
    color: #0a3622;
    border-color: #a3cfbb;
    background: #e8f5ee;
}

.draft-autosave-status.is-error {
    color: #58151c;
    border-color: #f1aeb5;
    background: #fce8ea;
}

.help-page {
    max-width: 960px;
    margin: 0 auto;
}

.help-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.help-hero-icon {
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 0.65rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.help-guide-tabs .nav-link {
    font-size: 0.9rem;
}

.help-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.help-flow-step {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.5rem;
}

.help-flow-step-review .help-flow-badge {
    background: #198754;
}

.help-flow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.help-flow-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #343a40;
}

.help-flow-arrow {
    color: #adb5bd;
    font-size: 1rem;
    line-height: 1;
}

.help-card {
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.help-steps {
    list-style: none;
    padding: 0;
    counter-reset: help-step;
}

.help-step {
    position: relative;
    padding-left: 2.75rem;
    padding-bottom: 1.35rem;
    counter-increment: help-step;
}

.help-step::before {
    content: counter(help-step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: #e7f1ff;
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-step:not(.help-step-last)::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 2.2rem;
    bottom: 0.15rem;
    width: 2px;
    background: #dee2e6;
}

.help-step-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.help-step-body {
    color: #495057;
    font-size: 0.92rem;
    line-height: 1.55;
}

.help-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.help-status-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: #495057;
}

.help-checklist {
    padding-left: 1.15rem;
    color: #495057;
    font-size: 0.92rem;
    line-height: 1.65;
}

.help-checklist li {
    margin-bottom: 0.35rem;
}

.help-type-card {
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 3px solid #0d6efd;
}

.help-type-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.help-type-tag {
    display: inline-block;
    margin: 0.15rem 0.35rem 0 0;
    padding: 0.12rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #084298;
    background: #cfe2ff;
    border-radius: 0.25rem;
}

.help-callout {
    padding: 0.85rem 1rem;
    background: #fff8e1;
    border: 1px solid #ffecb5;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    color: #664d03;
    line-height: 1.55;
}

.help-tip-card {
    padding: 1rem 1.15rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.help-tip-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.audit-ip-cell {
    white-space: nowrap;
    vertical-align: middle;
}

.audit-ip-trigger {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    color: #1a4d2e;
    cursor: pointer;
    border-bottom: 1px dashed rgba(26, 77, 46, 0.35);
}

.audit-ip-trigger:hover,
.audit-ip-trigger:focus-visible {
    color: #0f3320;
    border-bottom-color: #1a4d2e;
    outline: none;
}

.audit-ip-popover {
    position: fixed;
    z-index: 1080;
    width: min(360px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.audit-ip-popover.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.audit-ip-popover header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem 0.65rem;
    border-bottom: 1px solid #e9ecef;
}

.audit-ip-popover header .ip-line {
    font-size: 0.82rem;
    font-weight: 650;
    font-family: ui-monospace, monospace;
}

.audit-ip-popover header .acc-line {
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

.audit-ip-popover .geo-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a4d2e;
    background: #e8f3ec;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    white-space: nowrap;
}

.audit-ip-popover .audit-ip-map {
    height: 180px;
    background: #f8f9fa;
}

.audit-ip-popover .audit-ip-map .leaflet-container {
    height: 180px;
    width: 100%;
}

.audit-ip-popover .geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    padding: 0.85rem 1rem 1rem;
}

.audit-ip-popover .geo-k {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.audit-ip-popover .geo-v {
    font-size: 0.82rem;
    word-break: break-word;
}

.audit-ip-popover .geo-msg {
    padding: 0.85rem 1rem 1rem;
    font-size: 0.82rem;
}

@media (max-width: 575.98px) {
    .help-flow-arrow {
        display: none;
    }

    .help-flow {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Auth pages (login, password reset) */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #e8f3ec 0%, #f4f6f9 45%, #eef2f7 100%);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-brand-mark {
    display: inline-block;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.85rem;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.auth-card {
    border-radius: 0.75rem;
}

.auth-title {
    font-weight: 650;
}

.auth-form .form-control-lg {
    border-radius: 0.5rem;
}

.auth-form .btn-lg {
    border-radius: 0.5rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-weight: 600;
}

.auth-passkey-block .auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0.85rem;
    color: #8b949e;
    font-size: 0.8rem;
}

.auth-passkey-block .auth-divider::before,
.auth-passkey-block .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-passkey {
    background: #1d1d1f;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.btn-passkey:hover,
.btn-passkey:focus {
    background: #272729;
    color: #fff;
}

.btn-passkey:focus {
    box-shadow: 0 0 0 0.2rem rgba(29, 29, 31, 0.25);
}

.btn-passkey:active {
    background: #18181a;
    color: #fff;
}

.btn-passkey-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-passkey-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    display: block;
    object-fit: contain;
}

.passkey-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.passkey-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fafbfc;
}

.passkey-row-label {
    font-weight: 600;
}

.passkey-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.totp-code-wrap {
    margin: 0 auto;
}

.totp-code-boxes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.totp-code-digit {
    width: 2.75rem;
    height: 3.25rem;
    border: 2px solid #d8dee6;
    border-radius: 0.5rem;
    background: #f4f6f8;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.totp-code-digit:focus {
    outline: none;
    border-color: var(--swh-accent, #0d6efd);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.totp-setup-qr canvas {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.totp-setup-qr-image {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.totp-setup-secret-copy {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    margin: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid #dbe3ea;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.totp-setup-secret-copy:hover,
.totp-setup-secret-copy:focus-visible {
    border-color: var(--swh-accent, #0d6efd);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
    outline: none;
}

.totp-setup-secret-copy.is-copied {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

.totp-setup-secret-value {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(0.68rem, 2.2vw, 0.82rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
    line-height: 1.2;
}

.totp-setup-secret-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.totp-setup-secret-copy.is-copied .totp-setup-secret-meta {
    color: #198754;
    font-weight: 600;
}

.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.5rem;
}

.recovery-code-item {
    display: block;
    padding: 0.55rem 0.65rem;
    border: 1px solid #dbe3ea;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-align: center;
}

@keyframes auth-shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-7px); }
    30%, 60%, 90% { transform: translateX(7px); }
}

.flash-shake-target.is-shaking,
.auth-page.is-shaking .auth-card-wrap,
.account-settings.is-shaking {
    animation: auth-shake 0.55s ease-in-out;
}

.password-strength-wrap {
    margin-bottom: 0;
}

.password-strength-track {
    height: 3px;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.password-strength-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #dc3545;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength-wrap.is-fair .password-strength-fill {
    background: #fd7e14;
}

.password-strength-wrap.is-good .password-strength-fill {
    background: #0d6efd;
}

.password-strength-wrap.is-strong .password-strength-fill {
    background: #198754;
}

.password-strength-text,
.password-match-text {
    min-height: 1.25rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
    font-size: 0.8125rem;
}

.password-match-wrap.is-match input {
    border-color: rgba(25, 135, 84, 0.55);
}

.password-match-wrap.is-mismatch input {
    border-color: rgba(220, 53, 69, 0.65);
}

.account-settings {
    max-width: 960px;
    margin: 0 auto;
}

.account-settings--focused {
    max-width: 28rem;
}

.account-settings-header {
    padding-bottom: 0.25rem;
}

.settings-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.settings-card-header {
    padding: 1.15rem 1.35rem 0;
}

.settings-card-title {
    font-size: 1.05rem;
    font-weight: 650;
    margin-bottom: 0.25rem;
}

.settings-card-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.45;
}

.settings-card-body {
    padding: 1.15rem 1.35rem 1.35rem;
    flex: 1;
}

.settings-section-divider {
    margin: 1.35rem 0;
    border-top: 1px solid #e9ecef;
}

.settings-subsection-title {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.35rem;
}

.settings-subsection-desc {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.settings-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.settings-form--compact {
    height: auto;
}

.settings-form--compact .settings-form-actions {
    margin-top: 0;
}

.settings-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: auto;
    padding-top: 1.15rem;
    border-top: 1px solid #eef1f4;
}

.settings-location-panel {
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

.settings-location-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.settings-location-panel-title {
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.settings-location-panel .form-check-label {
    font-size: 0.875rem;
}

.settings-location-panel .location-input-address-wrap,
.settings-location-panel .location-input-coords-wrap {
    margin-bottom: 0;
}

.swh-confirm-modal .modal-header {
    align-items: flex-start;
    gap: 0.75rem;
}

.swh-confirm-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #fff3cd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23b58105' viewBox='0 0 16 16'%3E%3Cpath d='M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E") center / 1.25rem no-repeat;
    border: 1px solid #ffe69c;
}

.swh-confirm-icon.is-danger {
    background-color: #f8d7da;
    border-color: #f1aeb5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23b02a37' viewBox='0 0 16 16'%3E%3Cpath d='M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E");
}

.swh-confirm-type .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.swh-confirm-modal [data-confirm-submit]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.task-due-soon-badge .badge {
    font-size: 0.72rem;
    font-weight: 600;
}

/* —— Admin lists / users (DMS-aligned) —— */
.page-header-actions .btn {
    white-space: nowrap;
}

.admin-filter-card .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.admin-list-table {
    font-size: 0.875rem;
    margin-bottom: 0;
    --swh-table-header-bg: #f8f9fb;
}

.admin-list-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    background: var(--swh-table-header-bg, #f8f9fb);
    border-bottom: 1px solid #e9ecef;
    padding: 0.65rem 0.85rem;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-list-table tbody td {
    padding: 0.75rem 0.85rem;
    vertical-align: middle;
    line-height: 1.4;
    border-bottom-color: #eef1f4;
    color: #343a40;
}

.admin-list-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-list-table tbody tr:hover td {
    background: #fafbfc;
}

.admin-list-table .admin-list-primary {
    font-weight: 600;
    color: #212529;
}

.admin-list-table .admin-list-muted {
    color: #6c757d;
}

.admin-list-table .admin-list-nowrap {
    white-space: nowrap;
}

.admin-list-table .admin-list-actions {
    text-align: right;
    white-space: nowrap;
}

.admin-list-table .admin-list-actions a,
.admin-list-table .admin-list-actions button.link-action {
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    color: var(--swh-accent);
    cursor: pointer;
}

.admin-list-table .admin-list-actions a:hover,
.admin-list-table .admin-list-actions button.link-action:hover {
    text-decoration: underline;
}

.admin-list-table .admin-list-actions .action-sep {
    color: #cbd5e1;
    margin: 0 0.35rem;
}

.users-list-card {
    overflow: hidden;
}

.users-list-scroll {
    max-width: 100%;
}

.users-list-table {
    min-width: 44rem;
    width: 100%;
}

.users-list-table .users-col-name { min-width: 12rem; }
.users-list-table .users-col-email { min-width: 14rem; }
.users-list-table .users-col-role,
.users-list-table .users-col-status { white-space: nowrap; }
.users-list-table .users-col-login { min-width: 9rem; }

.user-form-page {
    max-width: 56rem;
}

.user-form-page-header {
    margin-bottom: 1.5rem;
}

.user-form-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.user-form-back:hover {
    color: #0f172a;
}

.user-form-page-heading {
    margin-top: 0.75rem;
}

.user-form-page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
}

.user-form-page-desc {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
    max-width: 40rem;
    line-height: 1.45;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-form-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 1.25rem;
}

.user-form-section-grid {
    display: grid;
    grid-template-columns: 13.75rem minmax(0, 1fr);
    gap: 1.5rem;
}

.user-form-eyebrow {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
}

.user-form-section-title {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.user-form-section-desc {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.user-form-section-fields .form-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.user-form-section-fields .form-control,
.user-form-section-fields .form-select {
    font-size: 0.875rem;
}

.user-form-field-divider {
    margin: 0.15rem 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
    opacity: 1;
}

.user-form-invite-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.user-form-invite-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: #fff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.user-form-invite-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
}

.user-form-invite-desc {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

.user-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.user-form-side-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.user-form-side-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 1.25rem;
}

.user-form-side-card--danger {
    border-color: rgba(220, 53, 69, 0.35);
}

.user-form-side-title {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.user-form-side-desc {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

@media (max-width: 767.98px) {
    .user-form-section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-form-actions {
        flex-wrap: wrap;
    }
}

/* —— Profile settings (DMS-aligned) —— */
.profile-settings {
    max-width: 72rem;
    margin: 0 auto;
}

.settings-sticky-header {
    position: sticky;
    top: var(--swh-navbar-height);
    z-index: 1020;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin: -1rem 0 1.5rem;
    padding: 1rem 0 1.25rem;
    background: rgba(244, 246, 249, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.profile-settings-hero {
    align-items: center;
}

.profile-settings-layout .system-settings-sidebar {
    top: calc(var(--swh-navbar-height) + var(--settings-sticky-offset));
}

.profile-settings-id {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.profile-settings-avatar {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: var(--swh-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
}

.profile-settings-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.profile-settings-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.profile-readonly-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.4;
}

.profile-readonly-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.15rem 0.5rem;
    line-height: 1.2;
}

.profile-password-card {
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    overflow: hidden;
}

.profile-password-block {
    padding: 1.25rem 1.5rem;
}

.profile-password-block-title {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.profile-password-divider {
    height: 1px;
    background: #e2e8f0;
}

.profile-password-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.profile-password-forgot {
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
}

.profile-password-forgot:hover {
    text-decoration: underline;
}

.profile-settings .password-strength-track,
.profile-settings .password-strength-text,
.profile-settings .password-match-text {
    margin-top: 0.35rem;
}

.system-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.system-settings-sidebar {
    position: sticky;
    top: calc(var(--swh-navbar-height) + var(--settings-sticky-offset));
}

.system-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.system-settings-nav-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.system-settings-nav-btn:hover {
    background: #fff;
}

.system-settings-nav-btn.is-active {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.system-settings-nav-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-settings-nav-btn.is-active .system-settings-nav-icon {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.25);
    color: var(--swh-accent);
}

.system-settings-nav-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.3;
}

.system-settings-nav-desc {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.system-settings-main {
    min-width: 0;
}

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

.system-settings-panel.is-active {
    display: block;
}

.system-settings-card {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    background: #fff;
}

.system-settings-section {
    padding: 1.75rem 2rem;
}

.system-settings-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.system-settings-section-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    background: #eef2f7;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0;
}

.system-settings-section-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.35rem 0 0;
    max-width: 46rem;
    line-height: 1.45;
}

.system-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 2rem;
    margin-top: 1.5rem;
}

.system-settings-grid--narrow {
    grid-template-columns: minmax(0, 28rem);
}

.system-settings-field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.system-settings-hint {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.system-settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef1f4;
}

@media (max-width: 991.98px) {
    .system-settings-layout {
        grid-template-columns: 1fr;
    }

    .system-settings-sidebar,
    .profile-settings-layout .system-settings-sidebar {
        position: static;
        top: auto;
    }

    .system-settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .system-settings-nav-btn {
        min-width: 12rem;
    }
}

@media (max-width: 767.98px) {
    .settings-sticky-header {
        margin-left: 0;
        margin-right: 0;
    }

    .system-settings-section {
        padding: 1.5rem;
    }

    .system-settings-grid {
        grid-template-columns: 1fr;
    }

    .profile-password-block {
        padding: 1.15rem 1.25rem;
    }

    .profile-settings-title {
        font-size: 1.35rem;
    }
}

/* ---------------------------------------------------------------- Balances */
.balance-monthbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.balance-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid #e2e6ea;
    border-radius: 0.6rem;
    background: #fff;
    color: #334155;
    text-decoration: none;
    line-height: 1.1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.balance-month:hover {
    border-color: #cbd3da;
    background: #f8fafc;
    color: #1f2937;
}

.balance-month .balance-month-mon {
    font-weight: 600;
    font-size: 0.9rem;
}

.balance-month .balance-month-year {
    font-size: 0.68rem;
    color: #94a3b8;
}

.balance-month.is-disabled {
    background: #f1f3f5;
    color: #b8c0c8;
    border-color: #edf0f2;
    cursor: default;
    pointer-events: none;
}

.balance-month.is-disabled .balance-month-year {
    color: #c6ccd2;
}

.balance-month.is-selected,
.balance-month.is-current.is-selected {
    background: #e2725b;
    border-color: #e2725b;
    color: #fff;
    box-shadow: 0 2px 6px rgba(226, 114, 91, 0.35);
}

.balance-month.is-selected:hover {
    background: #d5624b;
    border-color: #d5624b;
    color: #fff;
}

.balance-month.is-selected .balance-month-year {
    color: rgba(255, 255, 255, 0.85);
}

/* People list */
.balance-person-head,
.balance-person-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.balance-person-head {
    padding: 0.6rem 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #94a3b8;
    border-bottom: 1px solid #eef1f4;
}

.balance-col-name {
    flex: 1 1 40%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.balance-col-position {
    flex: 1 1 32%;
    color: #64748b;
}

.balance-col-total {
    flex: 0 0 28%;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.balance-person {
    border-bottom: 1px solid #eef1f4;
}

.balance-person:last-child {
    border-bottom: 0;
}

.balance-person-row {
    padding: 0.85rem 1rem;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    color: #1f2937;
}

.balance-person-row:hover {
    background: #f8fafc;
}

.balance-caret {
    display: inline-block;
    transition: transform 0.15s ease;
    color: #94a3b8;
    font-size: 1.1rem;
}

.balance-person-row[aria-expanded="true"] .balance-caret {
    transform: rotate(90deg);
}

.balance-person-body {
    display: none;
    background: #fbfcfd;
    border-top: 1px solid #eef1f4;
}

.balance-person-body.is-open {
    display: block;
}

.balance-items-table {
    background: transparent;
}

.balance-items-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #94a3b8;
}

.balance-additem {
    padding: 0.75rem 1rem;
    border-top: 1px solid #eef1f4;
    background: #fff;
}

.balance-total-card {
    position: sticky;
    top: 5rem;
}

.balance-total-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    .balance-col-position {
        display: none;
    }

    .balance-total-card {
        position: static;
        top: auto;
    }
}
