:root {
    --jw-orange: #ed7000;
    --jw-dark: #2e2c30;
    --jw-surface: #f2f3f5;
    --jw-line: #d9dde3;
    --jw-blue: #325f9f;
    --jw-text: #21252c;
    --jw-muted: #5f6875;
    --sidebar-width: 250px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-nav-row-height: 3.2rem;
}

.order-wizard-tabs {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: thin;
}

.order-wizard-tabs .btn {
    flex: 0 0 auto;
    min-height: 42px;
}

.order-mobile-category-picker {
    display: none;
}

.order-category-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 1rem;
}

#order-category-panels {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.order-wizard-ready .order-category-panel {
    display: none;
    margin-top: 0;
}

.order-wizard-ready .order-category-panel.active {
    display: block;
}

.order-cart-heading,
.order-line-summary,
.order-wizard-navigation,
.order-submit-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-cart-heading {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.order-cart-heading .badge {
    padding: .55rem .7rem;
    font-size: .85rem;
}

.order-category-title {
    margin-bottom: .75rem;
    padding-left: .65rem;
    border-left: 4px solid var(--jw-orange);
    font-size: 1.15rem;
    font-weight: 700;
}

.order-line-list {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: .75rem;
}

.order-line {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: minmax(260px, .8fr) minmax(520px, 1.35fr);
    align-items: center;
    gap: 1rem;
    padding: .9rem;
    border: 1px solid var(--jw-line);
    border-radius: .55rem;
    background: #fff;
    transition: opacity .15s ease, background-color .15s ease, border-color .15s ease;
}

.order-line.is-excluded {
    border-color: #d8dbe0;
    background: #f2f3f5;
    opacity: .68;
}

.order-line-summary {
    justify-content: space-between;
    min-width: 0;
}

.order-line-identity {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.order-line-identity strong {
    display: block;
    overflow-wrap: anywhere;
}

.order-line-identity > div {
    min-width: 0;
}

.order-item-thumb {
    width: 48px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 2px solid #e4e8ef;
    border-radius: 5px;
    background: #f2f3f5;
}

.order-include-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    min-height: 44px;
    color: var(--jw-blue);
    font-weight: 600;
    cursor: pointer;
}

.order-include-toggle .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}

.order-line-fields {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(170px, .8fr) minmax(190px, 1fr);
    gap: .65rem;
    align-items: end;
    min-width: 0;
}

.order-template-instruction {
    display: flex;
    grid-column: 1 / -1;
    align-items: baseline;
    gap: .6rem;
    padding: .6rem .75rem;
    border-left: 4px solid var(--jw-orange);
    border-radius: .25rem;
    background: #fff4e8;
    color: var(--jw-text);
    font-size: .9rem;
}

.order-template-instruction strong {
    flex: 0 0 auto;
    color: #8a4300;
}

.order-line-field {
    display: grid;
    gap: .3rem;
    min-width: 0;
}

.order-line-field .form-control,
.order-line-field .form-select {
    width: 100%;
    min-width: 0;
}

.order-line-field > span:first-child {
    color: var(--jw-muted);
    font-size: .82rem;
    font-weight: 600;
}

.order-quantity-control {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 44px minmax(70px, 1fr) 44px;
}

.order-quantity-control button {
    border: 1px solid #bcc5d1;
    background: #f7f8fa;
    color: var(--jw-blue);
    font-size: 1.35rem;
    font-weight: 700;
}

.order-quantity-control button:first-child {
    border-radius: .375rem 0 0 .375rem;
}

.order-quantity-control button:last-child {
    border-radius: 0 .375rem .375rem 0;
}

.order-quantity-control .form-control {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    text-align: center;
}

.order-empty-state {
    display: grid;
    gap: .25rem;
    padding: 1.5rem;
    border: 1px dashed #b8c0cb;
    border-radius: .55rem;
    color: var(--jw-muted);
    text-align: center;
}

.order-wizard-navigation {
    justify-content: space-between;
    margin-top: 1rem;
}

.order-category-progress {
    color: var(--jw-muted);
    font-weight: 600;
}

.order-submit-actions {
    flex-wrap: wrap;
}

.order-item-search .search-list {
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 300px;
    box-shadow: 0 12px 28px rgba(24, 32, 51, .18);
}

@media (max-width: 1199.98px) {
    .order-line {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .order-cart {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        padding: .85rem;
    }

    .order-cart-heading {
        align-items: flex-start;
    }

    .order-wizard-tabs {
        display: none;
    }

    .order-mobile-category-picker {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .order-mobile-category-picker .form-select {
        width: 100%;
        min-height: 48px;
        font-weight: 600;
    }

    .order-line {
        grid-template-columns: 1fr;
        gap: .85rem;
        padding: .8rem;
    }

    .order-line-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: .45rem;
    }

    .order-item-thumb {
        width: 46px;
        height: 56px;
    }

    .order-include-toggle {
        width: 100%;
        min-height: 40px;
    }

    .order-line-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
    }

    .order-template-instruction {
        display: grid;
        gap: .2rem;
        padding: .65rem .75rem;
    }

    .order-line-notes {
        grid-column: 1 / -1;
    }

    .order-line-fields .form-select,
    .order-line-fields .form-control,
    .order-quantity-control button {
        min-height: 46px;
    }

    .order-quantity-control {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    .order-wizard-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }

    .order-wizard-navigation .btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding-inline: .5rem;
        line-height: 1.2;
        white-space: normal;
    }

    .order-category-progress {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
    }

    .order-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .order-submit-actions .btn {
        width: 100%;
    }
}

.storage-map-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.storage-door-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .45rem;
    margin: 0 0 1rem;
}

.storage-door-tab {
    padding: .7rem .35rem;
    border: 1px solid var(--jw-line);
    border-radius: .35rem;
    background: #fff;
    color: var(--jw-blue);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.storage-door-tab.active {
    border-color: var(--jw-orange);
    background: var(--jw-orange);
    color: #fff;
}

.storage-shelves {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.storage-shelf-card {
    min-width: 0;
}

.storage-shelf-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.storage-shelf-heading h2 {
    margin: 0;
    font-size: 1.1rem;
}

.storage-shelf-heading span {
    color: var(--jw-muted);
}

.storage-slot-grid {
    display: grid;
    grid-template-columns: minmax(3.8rem, .6fr) repeat(4, minmax(0, 1fr));
    gap: .35rem;
}

.storage-grid-section,
.storage-grid-depth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    color: var(--jw-muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.storage-grid-depth {
    flex-direction: column;
    line-height: 1.05;
}

.storage-slot {
    display: flex;
    min-width: 0;
    min-height: 5rem;
    flex-direction: column;
    justify-content: center;
    gap: .12rem;
    padding: .45rem;
    border: 1px dashed #b7bec8;
    border-radius: .35rem;
    overflow: hidden;
    text-align: center;
}

.storage-slot.empty {
    background: #fafbfc;
    color: var(--jw-muted);
}

.storage-slot.unavailable {
    border-style: solid;
    border-color: #c9cdd3;
    background: repeating-linear-gradient(135deg, #eceef1, #eceef1 6px, #e1e4e8 6px, #e1e4e8 12px);
    color: #737b86;
}

.storage-slot.occupied {
    border: 1px solid #8cabd3;
    border-left: 4px solid var(--jw-blue);
    background: #e8f0fa;
    color: var(--jw-text);
}

.storage-slot.shared {
    overflow: visible;
    padding: 0;
}

.storage-slot-shared-toggle {
    display: flex;
    width: 100%;
    min-height: 5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    padding: .45rem;
    border: 0;
    background: transparent;
    color: inherit;
    line-height: inherit;
}

.storage-slot-shared-toggle::after {
    margin-top: .15rem;
}

.storage-slot-menu {
    min-width: 16rem;
    max-width: min(22rem, calc(100vw - 2rem));
    max-height: 20rem;
    overflow-y: auto;
}

.storage-slot-menu .dropdown-item {
    display: grid;
    gap: .1rem;
    padding-block: .55rem;
    white-space: normal;
}

.storage-slot-menu .dropdown-item span,
.storage-slot-menu .dropdown-item small {
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
}

.storage-slot span,
.storage-slot small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storage-slot small {
    color: var(--jw-muted);
}

.storage-map-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.storage-region-list {
    display: grid;
    gap: .35rem;
}

.storage-region-row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .55rem .65rem;
    border-left: 3px solid var(--jw-blue);
    background: #eef3f9;
    color: var(--jw-text);
}

.storage-region-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storage-region-form-card,
.form-card-narrow {
    max-width: 860px;
}

.storage-region-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .2rem 1rem;
    padding: .8rem 1rem;
    border-left: 4px solid var(--jw-orange);
    background: #f6f7f9;
}

.storage-region-summary span {
    color: var(--jw-muted);
}

.storage-choice-group {
    padding: 0;
    border: 0;
}

.storage-choice-group legend {
    margin-bottom: .45rem;
    font-size: 1rem;
}

.storage-choice-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
}

.storage-choice-buttons.depth {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storage-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.storage-choice span {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #b7bec8;
    border-radius: .35rem;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
}

.storage-choice input:checked + span {
    border-color: var(--jw-blue);
    background: #dfeaf8;
    box-shadow: inset 0 0 0 1px var(--jw-blue);
    color: #163d70;
}

.storage-choice input:focus-visible + span {
    outline: 3px solid rgba(50, 95, 159, .25);
}

@media (max-width: 767.98px) {
    .storage-map-filters,
    .storage-shelves,
    .storage-map-footer-grid {
        grid-template-columns: 1fr;
    }

    .storage-door-tabs {
        position: sticky;
        z-index: 5;
        top: var(--mobile-header-height, 3rem);
        padding: .4rem 0;
        background: var(--jw-surface);
    }

    .storage-slot-grid {
        grid-template-columns: 3.3rem repeat(4, minmax(0, 1fr));
        gap: .25rem;
    }

    .storage-slot {
        min-height: 4.5rem;
        padding: .3rem .2rem;
        font-size: .78rem;
    }

    .storage-slot-shared-toggle {
        min-height: 4.5rem;
        padding: .3rem .2rem;
    }

    .storage-slot span,
    .storage-slot small {
        font-size: .7rem;
    }

    .storage-region-row {
        grid-template-columns: 4.5rem minmax(0, 1fr);
    }

    .storage-region-row small {
        grid-column: 2;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    color: var(--jw-text);
    background: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
}

a {
    text-decoration: none;
}

.auth-shell {
    min-height: calc(100vh - 70px);
    display: grid;
    place-items: center;
    background: #f3f3f3;
    padding: 1.5rem 1rem;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-footer {
    margin-top: auto;
    padding: 1rem;
    background: #ededed;
    border-top: 1px solid #d8d8d8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-footer__copyright {
    margin: 0;
    font-size: 0.9rem;
    color: #555d68;
}

.auth-footer__links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-footer__links a {
    color: var(--jw-blue);
    font-size: 0.9rem;
    font-weight: 600;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 48px;
    background: var(--jw-dark);
    color: #f0f0ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.9rem 0 0;
}

.topbar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-logo-toggle {
    width: 48px;
    height: 48px;
    background: var(--jw-orange);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-top: 0;
    border-left: 0;
    border-bottom: 0;
    padding: 0;
    cursor: pointer;
}

.topbar-logo-link {
    width: 48px;
    height: 48px;
    background: var(--jw-orange);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.topbar-logo-image {
    width: 48px;
    height: auto;
    display: block;
}

.topbar-logo-menu-icon {
    width: 19px;
    height: 19px;
    stroke: #fff;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    display: none;
}

.topbar-logo-toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.topbar-page-title {
    margin-left: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 992px) {
    html.sidebar-collapsed .topbar-logo-toggle .topbar-logo-image {
        display: none;
    }

    html.sidebar-collapsed .topbar-logo-toggle .topbar-logo-menu-icon {
        display: block;
    }
}

.topbar-actions {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.topbar-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.topbar-nav-link:hover,
.topbar-nav-link:focus,
.topbar-nav-link:active {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}

.topbar-nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    flex-shrink: 0;
}

.topbar-user-toggle {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.topbar-user-toggle:hover,
.topbar-user-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
}

.topbar-user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-user-avatar-fallback {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.topbar-user-dropdown-menu {
    min-width: 290px;
    padding: 0;
}

.topbar-user-dropdown-header {
    padding: 0.8rem 1rem;
}

.topbar-user-dropdown-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d333d;
    line-height: 1.25;
}

.topbar-user-dropdown-congregation {
    margin-top: 0.45rem;
    color: #3f4855;
    font-size: 1.05rem;
}

.topbar-language-form {
    margin: 0;
    padding: 0.75rem 1rem 0.8rem;
}

.topbar-language-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4a5360;
}

.topbar-language-controls {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.topbar-language-select {
    min-height: 34px;
    font-size: 0.9rem;
}

.topbar-language-save {
    min-width: 72px;
    white-space: nowrap;
}

.topbar-logout-form {
    margin: 0;
}

.topbar-logout-button {
    color: var(--jw-blue);
    font-weight: 600;
    text-decoration: none;
}

.topbar-logout-button:hover,
.topbar-logout-button:focus {
    color: #244a7e;
    background: #f3f7ff;
    text-decoration: none;
}

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width, 250px) minmax(0, 1fr);
    min-height: calc(100vh - 60px);
    transition: grid-template-columns 220ms ease;
    background: #f6f6f6;
}

.sidebar {
    background: #ebebeb;
    border-right: 1px solid #d8d8d8;
    padding: 1rem 0.75rem;
    transition: padding 220ms ease, opacity 180ms ease, border-color 220ms ease;
}

html.sidebar-collapsed .app-layout {
    grid-template-columns: 0 minmax(0, 1fr);
}

html.sidebar-collapsed .sidebar {
    padding: 1rem 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-right-color: transparent;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu hr {
    margin: 0.85rem 0.15rem 0.7rem;
    border: 0;
    border-top: 1px solid #cfd5de;
}

.menu-group-title {
    display: block;
    padding: 0 0.75rem 0.35rem;
    color: #3d434c;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.02rem;
}

.menu a {
    color: var(--jw-blue);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.menu a:hover {
    color: #274f85;
    background: #e5e5e5;
}

.menu a.active {
    color: #1f416f;
    background: #e2e2e2;
    box-shadow: inset 3px 0 0 #557aa9;
}

.content {
    background: #f6f6f6;
    padding: 1.25rem;
    padding-bottom: 4.8rem;
}

.page-title {
    margin-bottom: 1rem;
    font-weight: 700;
}

.app-card {
    background: #fff;
    border: 1px solid var(--jw-line);
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(24, 35, 53, 0.06);
    padding: 1rem;
}

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

.dashboard-heading__eyebrow,
.dashboard-actions__eyebrow {
    display: block;
    margin-bottom: 0.15rem;
    color: #a34e09;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-heading__title {
    margin-bottom: 0.15rem;
}

.dashboard-heading__description {
    max-width: 760px;
    margin: 0;
    color: var(--jw-muted);
    font-size: 1rem;
}

.dashboard-profile-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 126px;
    overflow: hidden;
    padding: 1.15rem 1.25rem;
}

.dashboard-profile-card::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    background: var(--jw-orange);
    content: "";
}

.dashboard-profile-card__avatar,
.dashboard-profile-card__avatar-fallback {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border: 2px solid #d7dce4;
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-profile-card__avatar-fallback {
    font-size: 1.8rem;
}

.dashboard-profile-card__body {
    min-width: 0;
}

.dashboard-profile-card__name {
    margin: 0 0 0.1rem;
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.15;
}

.dashboard-profile-card__context,
.dashboard-profile-card__hall {
    color: var(--jw-muted);
}

.dashboard-profile-card__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.dashboard-metric {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--jw-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 12px rgba(24, 35, 53, 0.045);
    padding: 0.95rem 1rem 0.9rem 1.15rem;
}

.dashboard-metric::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--metric-accent, var(--jw-blue));
    content: "";
}

.dashboard-metric--orange { --metric-accent: var(--jw-orange); }
.dashboard-metric--green { --metric-accent: #238655; }
.dashboard-metric--slate { --metric-accent: #737b86; }

.dashboard-metric__label {
    color: var(--jw-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-metric__value {
    margin-top: 0.08rem;
    color: var(--jw-text);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-metric__hint {
    margin-top: 0.3rem;
    color: #727b87;
    font-size: 0.8rem;
}

.dashboard-actions {
    margin-top: 0.9rem;
    padding: 1.1rem;
}

.dashboard-actions__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dashboard-actions__title {
    margin: 0;
    font-size: 1.45rem;
}

.dashboard-actions__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    min-height: 72px;
    gap: 0.75rem;
    border: 1px solid #cbd2dc;
    border-radius: 9px;
    background: #fff;
    color: #2c4f7c;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.dashboard-action:hover,
.dashboard-action:focus-visible {
    border-color: #7f9dc2;
    color: #1f416f;
    box-shadow: 0 5px 12px rgba(50, 95, 159, 0.12);
    transform: translateY(-1px);
}

.dashboard-action--primary {
    border-color: var(--jw-orange);
    background: linear-gradient(135deg, #f47a11, var(--jw-orange));
    color: #fff;
}

.dashboard-action--primary:hover,
.dashboard-action--primary:focus-visible {
    border-color: #d66100;
    color: #fff;
    box-shadow: 0 6px 14px rgba(237, 112, 0, 0.22);
}

.dashboard-action__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.dashboard-action__content strong {
    line-height: 1.15;
}

.dashboard-action__content small {
    margin-top: 0.2rem;
    overflow: hidden;
    color: #697584;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-action--primary .dashboard-action__content small {
    color: rgba(255, 255, 255, 0.86);
}

.dashboard-action__icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.table-group-row > td {
    background: #e3e6e8 !important;
    border-top: 2px solid #c6c9cc;
    color: #343234;
    letter-spacing: .02em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #ffffff, #f4f7fc);
    border: 1px solid var(--jw-line);
    border-radius: 12px;
    padding: 0.95rem;
}

.stat-label {
    color: var(--jw-muted);
    font-size: 0.92rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.table-wrap {
    overflow: auto;
    background: #fff;
    border: 1px solid var(--jw-line);
    border-radius: 12px;
}

.table thead th {
    background: #f1f4f8;
    font-size: 0.88rem;
    text-transform: uppercase;
    color: #4f5868;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.table tbody tr > * {
    background: #fff;
}

.table tbody tr:nth-of-type(even) > * {
    background: #f8fafd;
}

.table tbody tr:hover > * {
    background: #edf3fb;
}

.search-list {
    border: 1px solid var(--jw-line);
    border-radius: 10px;
    background: #fff;
    max-height: 240px;
    overflow-y: auto;
}

.search-input-shell {
    position: relative;
}

.search-input-shell > .form-control {
    padding-right: 3rem;
}

.search-input-clear {
    position: absolute;
    top: 50%;
    right: 0.3rem;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #667085;
    font-size: 1.35rem;
    line-height: 1;
}

.search-input-clear:hover,
.search-input-clear:focus-visible {
    background: #edf0f4;
    color: #172033;
    outline: none;
}

.search-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 0.65rem;
    border-bottom: 1px solid #edf1f5;
}

.search-item:hover,
.search-item:focus,
.search-item.active {
    background: #edf4ff;
    outline: 0;
}

.search-item-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.search-item-thumb {
    height: 30px;
    width: 30px;
    object-fit: cover;
    border: 2px solid #e4e8ef;
    border-radius: 4px;
    flex-shrink: 0;
}

.search-empty {
    color: #667085;
    padding: 0.75rem;
}

.congregation-autocomplete {
    position: relative;
}

.congregation-autocomplete .search-list {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 10px 24px rgba(24, 32, 51, 0.14);
}

.stock-locator-search {
    max-width: 1100px;
    margin-top: 1.25rem;
}

.stock-locator-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: start;
}

.stock-locator-autocomplete {
    position: relative;
    min-width: 0;
}

.stock-locator-autocomplete .search-list {
    position: absolute;
    z-index: 20;
    width: 100%;
    box-shadow: 0 10px 24px rgba(24, 32, 51, 0.14);
}

.stock-locator-submit {
    min-height: 44px;
}

.stock-locator-suggestion-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 5px;
    color: #fff;
    background: var(--jw-orange);
    font-size: 0.72rem;
    font-weight: 700;
}

.stock-locator-suggestion-icon.region {
    background: #42699b;
}

.stock-locator-suggestion-copy {
    display: grid;
    min-width: 0;
}

.stock-locator-suggestion-heading {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.stock-locator-suggestion-type {
    flex: 0 0 auto;
    color: #42699b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stock-locator-suggestion-title {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-locator-suggestion-subtitle {
    overflow: hidden;
    color: #667085;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-locator-results {
    max-width: 1200px;
}

.stock-locator-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.stock-locator-eyebrow {
    color: var(--jw-orange);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stock-locator-count {
    display: grid;
    place-items: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.55rem;
    border-radius: 50%;
    color: #fff;
    background: #2d2b2d;
    font-weight: 700;
}

.stock-locator-result-list {
    display: grid;
    gap: 0.65rem;
}

.stock-locator-result-card {
    display: grid;
    grid-template-columns: minmax(92px, 0.6fr) minmax(260px, 2fr) minmax(170px, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--jw-line);
    border-left: 4px solid #42699b;
    border-radius: 10px;
    background: #fff;
}

.stock-locator-region {
    display: grid;
}

.stock-locator-region span,
.stock-locator-metrics small {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stock-locator-region strong {
    color: #274f82;
    font-size: 1.15rem;
}

.stock-locator-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.stock-locator-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: cover;
    border: 2px solid #e4e8ef;
    border-radius: 5px;
}

.stock-locator-place {
    display: grid;
}

.stock-locator-place span {
    color: #667085;
    font-size: 0.88rem;
}

.stock-locator-metrics {
    display: flex;
    gap: 0.85rem;
}

.stock-locator-metrics span {
    display: grid;
    min-width: 58px;
    text-align: center;
}

.stock-locator-metrics strong {
    font-size: 1.05rem;
}

.stock-locator-map-link {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .stock-locator-search-row {
        grid-template-columns: 1fr;
    }

    .stock-locator-submit {
        width: 100%;
    }

    .stock-locator-result-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .stock-locator-region {
        align-self: stretch;
        min-width: 72px;
        padding-right: 0.7rem;
        border-right: 1px solid var(--jw-line);
    }

    .stock-locator-item,
    .stock-locator-place,
    .stock-locator-metrics,
    .stock-locator-map-link {
        grid-column: 2;
    }

    .stock-locator-metrics {
        justify-content: flex-start;
    }

    .stock-locator-metrics span {
        text-align: left;
    }

    .stock-locator-map-link {
        justify-self: start;
    }
}

.location-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.location-search-result > div {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.location-search-result span,
.location-search-result small {
    color: #667085;
}

.location-search-result small {
    white-space: nowrap;
}

.form-control,
.form-select {
    border-color: #c9d1dc;
    min-height: 44px;
}

.tpe-ready-confirmation,
.tpe-ready-submit {
    min-height: 44px;
}

.tpe-ready-confirmation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding-left: 0;
}

.tpe-ready-confirmation .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.users-toolbar {
    align-items: stretch;
}

.users-toolbar-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.users-search-form {
    margin: 0;
    align-items: stretch;
}

.users-search-form .form-control {
    min-width: 190px;
}

.publications-toolbar {
    align-items: stretch;
}

.publications-toolbar-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.publications-search-form {
    margin: 0;
    align-items: stretch;
}

.publications-search-form .form-control {
    min-width: 220px;
}

.btn-primary {
    background: var(--jw-orange);
    border-color: var(--jw-orange);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #e36600;
    border-color: #e36600;
}

.mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid var(--jw-line);
    display: flex;
    align-items: stretch;
    z-index: 30;
    padding-bottom: var(--mobile-safe-bottom);
    min-height: calc(var(--mobile-nav-row-height) + var(--mobile-safe-bottom));
    box-shadow: 0 -5px 16px rgba(24, 35, 53, 0.08);
}

.mobile-nav__item,
.mobile-nav a.mobile-nav__item {
    flex: 1 1 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.3rem 0.2rem 0.25rem;
    min-height: var(--mobile-nav-row-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    text-align: center;
    color: var(--jw-muted);
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__item:hover,
.mobile-nav__item:focus-visible,
.mobile-nav__item.active {
    color: var(--jw-blue);
    background: #f4f7fb;
}

.mobile-nav__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mobile-nav__menu-button {
    font-family: inherit;
}

.mobile-menu-sheet {
    height: min(82dvh, 680px);
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 32px rgba(20, 28, 40, 0.2);
}

.mobile-menu-sheet__header {
    border-bottom: 1px solid var(--jw-line);
    padding: 1rem 1.1rem 0.85rem;
}

.mobile-menu-sheet__eyebrow {
    display: block;
    color: #a34e09;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-menu-sheet__title {
    margin-top: 0.05rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.mobile-menu-sheet__body {
    overflow-y: auto;
    padding: 0.65rem 0.8rem calc(1rem + var(--mobile-safe-bottom));
}

.mobile-menu-list {
    gap: 0;
}

.mobile-menu-list hr {
    margin: 0.65rem 0.15rem 0.55rem;
}

.mobile-menu-list .menu-group-title {
    padding: 0.25rem 0.7rem 0.3rem;
    font-size: 0.82rem;
}

.mobile-menu-list a {
    min-height: 42px;
    border-radius: 8px;
    padding: 0.62rem 0.7rem;
    font-size: 0.98rem;
}

.login-layout {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-layout__main-container {
    width: 100%;
    max-width: 530px;
}

.login-layout__main-content {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding: 1.05rem;
}

.login-layout__main-footer {
    margin-top: 1.2rem;
    text-align: center;
}

.first-access-link,
.first-access-link:hover,
.first-access-link:active,
.first-access-link:visited {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.first-access-link {
    cursor: pointer;
}

.first-access-link:focus-visible {
    outline: 2px solid var(--jw-blue);
    outline-offset: 3px;
}

.login-page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.login-page-logo {
    width: 48px;
    height: 48px;
    display: block;
}

.login-page-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 400;
    color: #222;
}

.jw-login-form .form-label {
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #1f252d;
}

.jw-login-link-wrap {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.jw-login-link-wrap a {
    color: var(--jw-blue);
}

.btn-outline-primary {
    color: var(--jw-orange);
    border-color: var(--jw-orange);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--jw-orange);
    border-color: var(--jw-orange);
}

.login-hint {
    color: #475160;
    margin-bottom: 1.15rem;
}

.my-work-entity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.my-work-avatar,
.my-work-thumb {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border: 2px solid #e4e8ef;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f2f3f5;
}

.my-work-avatar-fallback {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid #e4e8ef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--jw-blue);
    background: #f1f4f8;
    flex-shrink: 0;
}

.count-publication-id {
    display: inline-block;
    white-space: nowrap;
    word-break: keep-all;
}

@media (max-width: 992px) {
    .app-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .app-card,
    .table-wrap {
        width: 100%;
    }

    .count-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .count-header .btn {
        width: 100%;
    }

    .count-form-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .count-form-actions .btn {
        width: 100%;
    }

    .content {
        padding: 1rem;
        padding-bottom: calc(4rem + var(--mobile-safe-bottom));
    }

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

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

    .dashboard-desktop-only {
        display: none !important;
    }

    .auth-shell {
        min-height: calc(100vh - 120px);
    }

    .auth-footer {
        padding: 0.9rem;
    }
}

@media (max-width: 576px) {
    .dashboard-heading {
        margin-bottom: 0.75rem;
    }

    .dashboard-heading__eyebrow {
        font-size: 0.7rem;
    }

    .dashboard-heading__title {
        font-size: 1.85rem;
        line-height: 1.05;
    }

    .dashboard-heading__description {
        display: none;
    }

    .dashboard-profile-card {
        min-height: 92px;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    .dashboard-profile-card::after {
        width: 5px;
    }

    .dashboard-profile-card__avatar,
    .dashboard-profile-card__avatar-fallback {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .dashboard-profile-card__avatar-fallback {
        font-size: 1.3rem;
    }

    .dashboard-profile-card__name {
        overflow: hidden;
        font-size: 1.15rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-profile-card__context {
        overflow: hidden;
        font-size: 0.86rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-profile-card__hall,
    .dashboard-profile-card__secondary-role {
        display: none;
    }

    .dashboard-profile-card__roles {
        margin-top: 0.35rem;
    }

    .dashboard-profile-card__roles .badge {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        margin-top: 0.65rem;
    }

    .dashboard-metric {
        min-height: 84px;
        padding: 0.65rem 0.45rem 0.55rem 0.65rem;
    }

    .dashboard-metric::before {
        width: 3px;
    }

    .dashboard-metric__label {
        min-height: 2.15em;
        font-size: 0.7rem;
        line-height: 1.08;
    }

    .dashboard-metric__value {
        margin-top: 0.15rem;
        font-size: 1.38rem;
    }

    .dashboard-metric__hint {
        display: none;
    }

    .dashboard-actions {
        margin-top: 0.65rem;
        padding: 0.8rem;
    }

    .dashboard-actions__header {
        margin-bottom: 0.55rem;
    }

    .dashboard-actions__eyebrow {
        display: none;
    }

    .dashboard-actions__title {
        font-size: 1.2rem;
    }

    .dashboard-actions__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .dashboard-action {
        min-height: 54px;
        gap: 0.35rem;
        padding: 0.55rem 0.6rem;
    }

    .dashboard-action__content strong {
        font-size: 0.82rem;
    }

    .dashboard-action__content small {
        display: none;
    }

    .dashboard-action__icon {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }

    .users-toolbar {
        width: 100%;
    }

    .users-search-form {
        flex: 1 1 auto;
    }

    .users-search-form .form-control {
        min-width: 0;
    }

    .publications-toolbar {
        width: 100%;
    }

    .publications-search-form {
        flex: 1 1 auto;
    }

    .publications-search-form .form-control {
        min-width: 0;
    }

    .topbar {
        padding: 0 0.6rem 0 0;
    }

    .topbar-logo-toggle,
    .topbar-logo-link {
        width: 52px;
    }

    .topbar-logo-image {
        width: 38px;
    }

    .topbar-page-title {
        margin-left: 0.75rem;
        font-size: 1.2rem;
    }

    .topbar-actions {
        gap: 0.75rem;
    }

    .topbar-user-dropdown-menu {
        min-width: 270px;
    }

    .topbar-language-controls {
        flex-direction: column;
    }

    .topbar-language-save {
        width: 100%;
    }

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

    .login-layout__main-content {
        padding: 0.9rem;
    }

    .login-page-title {
        font-size: 1.8rem;
    }

    .login-page-logo {
        width: 44px;
        height: 44px;
    }

    .auth-footer {
        justify-content: center;
    }

    .auth-footer__copyright {
        width: 100%;
        text-align: center;
    }

    .auth-footer__links {
        justify-content: center;
    }
}
