:root {
    --portal-navy: #17233c;
    --portal-navy-soft: #233252;
    --portal-blue: #356ae6;
    --portal-bg: #f4f6fa;
    --portal-border: #e2e7ef;
    --portal-border-strong: #d1d9e6;
    --portal-surface: #fdfdfe;
    --portal-surface-muted: #f8fafc;
    --portal-surface-blue: rgba(53, 106, 230, .035);
    --portal-surface-navy: rgba(23, 35, 60, .035);
    --portal-card-shadow: 0 .5rem 1.5rem rgba(20, 38, 70, .08);
    --portal-work-shadow: 0 .8rem 2rem rgba(20, 38, 70, .11);
    --portal-accent-width: 4px;
    --portal-row-radius: .8rem;
    --portal-glass-surface: rgba(255, 255, 255, .78);
    --portal-glass-surface-strong: rgba(255, 255, 255, .94);
    --portal-glass-rim: rgba(255, 255, 255, .96);
    --portal-glass-blue: rgba(53, 106, 230, .3);
    --portal-glass-shadow: rgba(23, 35, 60, .22);
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--portal-bg);
    color: #202b3c;
}

.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 15%, rgba(53, 106, 230, .24), transparent 30rem),
        linear-gradient(145deg, #101a2d, #1d3156);
}

.auth-card {
    width: min(100%, 470px);
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 4rem rgba(7, 17, 36, .32);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    background: linear-gradient(135deg, #5d8cff, #356ae6);
    color: #fff;
    font-weight: 800;
    letter-spacing: -.04em;
}

.portal-navbar {
    background: var(--portal-navy);
    box-shadow: 0 .2rem 1rem rgba(22, 34, 59, .15);
}

.portal-navbar .nav-link,
.portal-navbar .btn {
    border-radius: 999px;
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.portal-navbar .nav-link:hover,
.portal-navbar .btn:hover {
    background: rgba(255, 255, 255, .1);
}

.portal-navbar .nav-link.active,
.portal-navbar .nav-link[aria-current="page"] {
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), 0 .35rem .9rem rgba(7, 17, 36, .2);
    transform: scale(1.035);
}

.portal-navbar .nav-link:focus-visible,
.portal-navbar .btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .72);
    outline-offset: 2px;
}

.dropdown-menu,
.portal-context-menu {
    border: 1px solid rgba(203, 213, 225, .85);
    border-radius: 1rem;
    background: var(--portal-glass-surface-strong);
    box-shadow: 0 1rem 2.5rem rgba(23, 35, 60, .2);
    backdrop-filter: blur(16px) saturate(135%);
}

.dropdown-item,
.portal-context-menu button {
    border-radius: .65rem;
    transition: background-color .14s ease, box-shadow .14s ease;
}

.dropdown-item:hover,
.dropdown-item:focus,
.portal-context-menu button:hover,
.portal-context-menu button:focus-visible {
    background: rgba(53, 106, 230, .09);
    color: inherit;
}

.dropdown-item:focus-visible,
.portal-context-menu button:focus-visible {
    outline: 3px solid rgba(53, 106, 230, .32);
    outline-offset: -1px;
}

.portal-context-menu {
    padding: .4rem;
}

.portal-context-menu button {
    width: 100%;
    border: 0;
    padding: .45rem .6rem;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
}

.portal-tabs {
    gap: .25rem;
    border-bottom: 0;
}

.portal-tabs .nav-link {
    border: 0;
    border-radius: 999px;
    color: inherit;
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.portal-tabs .nav-link:hover {
    background: rgba(53, 106, 230, .07);
}

.portal-tabs .nav-link.active {
    background: var(--portal-glass-surface-strong);
    color: var(--portal-blue);
    box-shadow: inset 0 0 0 1px var(--portal-glass-blue), 0 .45rem 1.15rem rgba(23, 35, 60, .13);
    transform: scale(1.035);
}

.portal-tabs .nav-link:focus-visible {
    outline: 3px solid rgba(53, 106, 230, .32);
    outline-offset: 2px;
}

.content-wrap {
    max-width: 1240px;
}

.welcome-panel {
    overflow: hidden;
    border: 0;
    border-radius: 1.1rem;
    background: linear-gradient(120deg, var(--portal-navy), var(--portal-navy-soft));
    color: #fff;
    box-shadow: 0 .8rem 2.4rem rgba(23, 35, 60, .15);
}

.program-card {
    height: 100%;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    transition: transform .18s ease, box-shadow .18s ease;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .8rem 2rem rgba(20, 38, 70, .1);
}

.program-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    font-size: 1.25rem;
}

.selection-heading {
    max-width: 720px;
}

.selection-card {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--portal-border);
    border-radius: 1rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.selection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .8rem 2rem rgba(20, 38, 70, .08);
}

.selection-card:has(.selection-checkbox:focus-visible) {
    outline: 3px solid rgba(53, 106, 230, .28);
    outline-offset: 3px;
}

.selection-card:has(.selection-checkbox:checked) {
    border-color: var(--portal-blue);
    box-shadow: 0 0 0 .2rem rgba(53, 106, 230, .12);
}

.selection-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.selection-checkmark {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid #b7c1d1;
    border-radius: 50%;
    color: transparent;
    background: #fff;
}

.selection-card:has(.selection-checkbox:checked) .selection-checkmark {
    border-color: var(--portal-blue);
    background: var(--portal-blue);
    color: #fff;
}

.selection-status {
    color: #65738a;
    font-size: .9rem;
    font-weight: 600;
}

.selection-card:has(.selection-checkbox:checked) .selection-status {
    color: var(--portal-blue);
}

.selection-card:has(.selection-checkbox:checked) .selection-status::after {
    content: " · ausgewählt";
}

.selection-card-unavailable,
.program-card-unavailable {
    cursor: not-allowed;
    border-color: #d5dae3 !important;
    background: #eef0f3 !important;
    box-shadow: none !important;
    filter: grayscale(1);
    opacity: .68;
}

.selection-card-unavailable:hover,
.program-card-unavailable:hover {
    transform: none;
    box-shadow: none !important;
}

.selection-card-unavailable .selection-checkmark {
    border-color: #aeb6c2;
    color: #6c757d;
    background: #e1e4e8;
}

.selection-status-unavailable {
    color: #505866;
}

.wiki-hero {
    padding: 2.5rem;
    border: 1px solid var(--portal-border);
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #fff, #eef3ff);
}

.wiki-search {
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 720px;
    padding: .5rem;
    padding-left: 1rem;
    border: 1px solid #cbd4e3;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(20, 38, 70, .08);
}

.wiki-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.wiki-category {
    border-color: var(--portal-border);
    border-radius: 1rem;
    transition: transform .18s ease, box-shadow .18s ease;
}

.wiki-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 .65rem 1.5rem rgba(20, 38, 70, .08);
}

.wiki-article-list,
.wiki-article-list .list-group-item,
.wiki-article-card {
    border-color: var(--portal-border);
}

.wiki-article-list {
    border-radius: 1rem;
    overflow: hidden;
}

.wiki-article-card {
    border-radius: 1rem;
}

.wiki-meta {
    color: #65738a;
    font-size: .9rem;
}

.wiki-content {
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: normal;
}

.wiki-content h2,
.wiki-content h3,
.wiki-content h4 {
    margin-top: 2rem;
    margin-bottom: .85rem;
    font-weight: 700;
}

.wiki-content p,
.wiki-content ul,
.wiki-content ol {
    margin-bottom: 1rem;
}

.wiki-figure {
    margin: 1.5rem 0 .5rem;
}

.wiki-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--portal-border);
    border-radius: .85rem;
    box-shadow: 0 .45rem 1.4rem rgba(20, 38, 70, .08);
}

.wiki-caption {
    color: var(--bs-secondary-color);
    font-size: .9rem;
    line-height: 1.5;
}

.empty-state {
    border: 2px dashed #ccd4e2;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .7);
}

.table-card,
.form-card {
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    box-shadow: 0 .35rem 1.3rem rgba(20, 38, 70, .05);
}

.form-control,
.form-select {
    border-color: #ccd4e2;
    min-height: 2.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #7ea1f3;
    box-shadow: 0 0 0 .25rem rgba(53, 106, 230, .14);
}

@media (max-width: 767.98px) {
    .welcome-panel .display-6 {
        font-size: 1.8rem;
    }

    .wiki-hero {
        padding: 1.5rem;
    }

    .wiki-search {
        flex-wrap: wrap;
    }

    .wiki-search .btn {
        width: 100%;
    }
}

.leave-hero {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(25, 135, 84, .12), transparent 22rem),
        linear-gradient(135deg, #fff, #f1faf6);
}

.leave-stat {
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
}

.leave-stat .card-body {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .85rem;
    align-items: center;
}

.leave-stat strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1.1;
}

.leave-stat span:last-child {
    grid-column: 2;
    color: #65738a;
    font-size: .86rem;
}

.leave-stat-icon {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    font-size: 1.15rem;
}

.leave-calendar-scroll {
    overflow-x: auto;
}

.leave-calendar-table {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .75rem;
}

.leave-calendar-table th,
.leave-calendar-table td {
    height: 2.75rem;
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
    text-align: center;
}

.leave-calendar-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    color: #718096;
}

.leave-calendar-table thead th span,
.leave-calendar-table thead th strong {
    display: block;
}

.leave-calendar-table thead th strong {
    color: #202b3c;
    font-size: .9rem;
}

.leave-calendar-table .leave-person-column {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 210px;
    padding: .5rem .75rem;
    background: #fff;
    text-align: left;
}

.leave-calendar-table tbody .leave-person-column {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.leave-calendar-table .leave-person-column strong,
.leave-calendar-table .leave-person-column small {
    display: block;
    max-width: 142px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leave-calendar-table .leave-person-column small {
    color: #718096;
    font-weight: 400;
}

.leave-calendar-table .is-weekend {
    background-color: #f7f8fb;
}

.leave-calendar-table td.has-leave {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8);
}

.leave-avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--portal-navy-soft);
    color: #fff;
    font-size: .75rem;
}

.leave-balance {
    display: grid;
    place-items: center;
    width: 10rem;
    height: 10rem;
    margin-inline: auto;
    border: 14px solid #daf2e6;
    border-top-color: #198754;
    border-radius: 50%;
    text-align: center;
}

.leave-balance strong,
.leave-balance span {
    display: block;
}

.leave-balance strong {
    font-size: 2rem;
    line-height: 1;
}

.leave-balance span {
    color: #65738a;
    font-size: .78rem;
}

.leave-account-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid #edf0f5;
}

.leave-account-list dt {
    color: #65738a;
    font-weight: 500;
}

.leave-account-list dd {
    margin: 0;
    font-weight: 700;
}

.microsoft-mark {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    background: #eaf2ff;
    color: #2563b9;
    font-size: 1.15rem;
}

.microsoft-mark-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.4rem;
}

.leave-request-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf0f5;
}

.leave-request-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.leave-reply-option {
    padding: 1rem;
    border: 1px solid #d7e2f4;
    border-radius: 1rem;
    background: #f7faff;
}

.leave-account-editor {
    border-color: var(--portal-border) !important;
    background: #fff;
}

@media (max-width: 767.98px) {
    .leave-hero .card-body {
        padding: 1.5rem !important;
    }

    .leave-stat .card-body {
        padding: 1rem;
    }

    .leave-stat strong {
        font-size: 1.35rem;
    }

    .leave-stat-icon {
        width: 2.35rem;
        height: 2.35rem;
    }
}
.mrn-dropzone {
    border: 2px dashed rgba(13, 110, 253, .35);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(13, 110, 253, .06), rgba(13, 202, 240, .04));
    padding: 3.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.mrn-dropzone:hover,
.mrn-dropzone:focus,
.mrn-dropzone.drag {
    border-color: var(--bs-primary);
    background: rgba(13, 110, 253, .1);
    outline: none;
    transform: translateY(-2px);
}

.mrn-dropzone.disabled {
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: .6;
}

.mrn-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    background: var(--bs-body-bg);
    box-shadow: 0 .5rem 1.5rem rgba(15, 23, 42, .08);
}

.mrn-value {
    min-width: 13.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .035em;
}

.mrn-progress-card {
    overflow: hidden;
    border-left: var(--portal-accent-width) solid var(--portal-blue) !important;
    background: linear-gradient(135deg, var(--portal-surface), rgba(53, 106, 230, .045));
}

.mrn-progress-card .progress {
    height: .8rem;
    border: 1px solid rgba(53, 106, 230, .12);
    background: rgba(53, 106, 230, .09);
}

@media (max-width: 767.98px) {
    .mrn-actionbar {
        align-items: stretch;
        flex-direction: column;
    }

    .mrn-actionbar .btn {
        width: 100%;
    }
}

.time-hero {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 193, 7, .18), transparent 24rem),
        linear-gradient(135deg, #fff, #fffaf0);
}

.time-status-dot {
    display: inline-block;
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: #9aa5b5;
    box-shadow: 0 0 0 .25rem rgba(154, 165, 181, .15);
}

.time-status-dot.is-working {
    background: #198754;
    box-shadow: 0 0 0 .25rem rgba(25, 135, 84, .15);
}

.time-stat {
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
}

.time-stat .card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-stat strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.1;
}

.time-stat-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: .9rem;
    font-size: 1.25rem;
}

.time-secret {
    overflow-wrap: anywhere;
    letter-spacing: .02em;
}

/* Portalweite visuelle Ebenen
 * Ebene 0: Seitenhintergrund, Ebene 1: reguläre Karten,
 * Ebene 2: Arbeits-, KPI- und Funktionsflächen mit bestehenden Akzentfarben.
 */
main:not(.auth-shell) .card:not(.welcome-panel) {
    border: 1px solid var(--portal-border-strong) !important;
    border-radius: 1rem;
    background-color: var(--portal-surface);
    box-shadow: var(--portal-card-shadow);
}

main:not(.auth-shell) .card:not(.welcome-panel) > .card-header {
    border-bottom-color: var(--portal-border);
    background: var(--portal-surface-muted) !important;
}

main:not(.auth-shell) .card:not(.welcome-panel) > .card-footer {
    border-top-color: var(--portal-border);
    background: var(--portal-surface-muted) !important;
}

main:not(.auth-shell) :is(.table-card, .portal-work-surface, .card:has(.portal-table)) {
    position: relative;
    border-color: #cbd5e1 !important;
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(53, 106, 230, .72), var(--portal-work-shadow) !important;
}

main:not(.auth-shell) :is(.table-card, .portal-work-surface, .card:has(.portal-table)) > .card-header {
    background: var(--portal-surface-blue) !important;
}

main:not(.auth-shell) :is(.form-card, .portal-support-surface) {
    border-color: var(--portal-border) !important;
    background-color: rgba(255, 255, 255, .84);
    box-shadow: 0 .3rem 1rem rgba(20, 38, 70, .055) !important;
}

main:not(.auth-shell) .portal-primary-column > .card {
    border-color: #cbd5e1 !important;
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(53, 106, 230, .62), var(--portal-work-shadow) !important;
}

main:not(.auth-shell) .portal-secondary-column .card {
    border-color: var(--portal-border) !important;
    background-color: rgba(255, 255, 255, .84);
    box-shadow: 0 .3rem 1rem rgba(20, 38, 70, .055) !important;
}

main:not(.auth-shell) .portal-functional-surface {
    position: relative;
    border-color: rgba(53, 106, 230, .28) !important;
    background:
        linear-gradient(135deg, rgba(53, 106, 230, .045), transparent 55%),
        var(--portal-surface);
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(53, 106, 230, .64), var(--portal-card-shadow) !important;
}

main:not(.auth-shell) :is(.leave-hero, .portal-accent-success) {
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(25, 135, 84, .72), var(--portal-card-shadow) !important;
}

main:not(.auth-shell) .portal-primary-column > .portal-accent-success {
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(25, 135, 84, .72), var(--portal-work-shadow) !important;
}

main:not(.auth-shell) .time-hero {
    box-shadow: inset var(--portal-accent-width) 0 0 rgba(255, 193, 7, .78), var(--portal-card-shadow) !important;
}

.portal-kpi-grid > [class*="col-"] .card {
    position: relative;
    overflow: hidden;
    background-color: var(--portal-surface);
    background-image: linear-gradient(135deg, rgba(53, 106, 230, .045), transparent 66%);
    box-shadow: inset 3px 0 0 var(--portal-blue), 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid > [class*="col-"]:nth-child(4n + 1) .card {
    background-image: linear-gradient(135deg, rgba(25, 135, 84, .07), transparent 66%);
    box-shadow: inset 3px 0 0 #198754, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid > [class*="col-"]:nth-child(4n + 2) .card {
    background-image: linear-gradient(135deg, rgba(53, 106, 230, .065), transparent 66%);
    box-shadow: inset 3px 0 0 var(--portal-blue), 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid > [class*="col-"]:nth-child(4n + 3) .card {
    background-image: linear-gradient(135deg, rgba(255, 193, 7, .095), transparent 66%);
    box-shadow: inset 3px 0 0 #ffc107, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid > [class*="col-"]:nth-child(4n + 4) .card {
    background-image: linear-gradient(135deg, rgba(13, 202, 240, .07), transparent 66%);
    box-shadow: inset 3px 0 0 #0dcaf0, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid .card:has(.text-success) {
    background-image: linear-gradient(135deg, rgba(25, 135, 84, .07), transparent 66%);
    box-shadow: inset 3px 0 0 #198754, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid .card:has(.text-warning, .text-warning-emphasis) {
    background-image: linear-gradient(135deg, rgba(255, 193, 7, .095), transparent 66%);
    box-shadow: inset 3px 0 0 #ffc107, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid .card:has(.text-danger) {
    background-image: linear-gradient(135deg, rgba(220, 53, 69, .065), transparent 66%);
    box-shadow: inset 3px 0 0 #dc3545, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

.portal-kpi-grid .card:has(.text-info) {
    background-image: linear-gradient(135deg, rgba(13, 202, 240, .07), transparent 66%);
    box-shadow: inset 3px 0 0 #0dcaf0, 0 .28rem .9rem rgba(20, 38, 70, .065) !important;
}

main:not(.auth-shell) .modal-content {
    overflow: hidden;
    border: 1px solid var(--portal-border-strong);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 1.25rem 3.5rem rgba(23, 35, 60, .22);
}

main:not(.auth-shell) .modal-header,
main:not(.auth-shell) .modal-footer {
    border-color: var(--portal-border);
    background: var(--portal-surface-muted);
}

main:not(.auth-shell) .card .list-group-item {
    border-color: var(--portal-border);
    background-color: rgba(255, 255, 255, .72);
}

main:not(.auth-shell) .card .list-group-item-action:hover {
    background-color: rgba(53, 106, 230, .055);
}

.empty-state {
    border-color: #c7d2e2;
    background:
        radial-gradient(circle at 50% 0, rgba(53, 106, 230, .055), transparent 18rem),
        var(--portal-surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.empty-state > i:first-child {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid var(--portal-border);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 .35rem 1rem rgba(20, 38, 70, .08);
}

.empty-state:focus-within {
    border-color: rgba(53, 106, 230, .48);
    box-shadow: inset 0 0 0 1px rgba(53, 106, 230, .16);
}

.portal-table > tbody > tr:only-child > td[colspan].text-center,
.card .border.rounded.text-center:has(> i) {
    border: 1px dashed #c7d2e2 !important;
    border-radius: var(--portal-row-radius);
    background: var(--portal-surface-muted) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.portal-table > tbody > tr:only-child > td[colspan].text-center > i:first-child,
.card .border.rounded.text-center:has(> i) > i:first-child {
    display: inline-grid !important;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 1px solid var(--portal-border);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 .3rem .9rem rgba(20, 38, 70, .07);
}

main:not(.auth-shell) :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(53, 106, 230, .38);
    outline-offset: 2px;
}

:is(.program-card, .wiki-category, .selection-card):hover {
    box-shadow: 0 .65rem 1.5rem rgba(20, 38, 70, .09);
}

/* Die Verladungsplanung nutzt eine kompakte Vollbildstruktur, erhält aber
 * dieselben Ebenen, ohne ihre bestehenden Auswahlzustände zu überschreiben. */
.loading-app .loading-toolbar,
.loading-app .loading-statusbar {
    border-color: var(--portal-border-strong);
    background: var(--portal-surface);
    box-shadow: 0 .2rem .7rem rgba(20, 38, 70, .045);
}

.loading-workspace {
    background: linear-gradient(180deg, rgba(53, 106, 230, .018), transparent 14rem);
}

.loading-unit-card:not(.is-selected),
.loading-tour:not(.is-selected-tour):not(.is-tour-over) {
    border-color: var(--portal-border-strong);
    background: var(--portal-surface);
    box-shadow: var(--portal-card-shadow);
}

.loading-empty,
.loading-tour-unit__empty {
    border: 1px dashed #c7d2e2;
    border-radius: 1rem;
    background: var(--portal-surface-muted);
}

.loading-empty {
    margin: 8px 10px 12px;
}

.loading-app .loading-empty i,
.loading-app .loading-tour-unit__empty i {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid var(--portal-border);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 .3rem .9rem rgba(20, 38, 70, .07);
}

@media (prefers-reduced-motion: reduce) {
    main:not(.auth-shell) .card,
    .empty-state {
        transition: none !important;
    }
}

.portal-table {
    --portal-table-row-gap: .34rem;
    border-collapse: separate;
    border-spacing: 0 var(--portal-table-row-gap);
}

.portal-table.portal-table-compact {
    --portal-table-row-gap: .2rem;
}

.portal-table > :not(caption) > * > * {
    border-top-width: 1px;
    border-bottom-width: 1px;
    border-color: var(--portal-border);
    background-clip: padding-box;
    transition: background-color .14s ease, box-shadow .17s ease, transform .17s ease;
}

.portal-table > :not(caption) > * > :first-child {
    border-left-width: 1px;
    border-radius: var(--portal-row-radius) 0 0 var(--portal-row-radius);
}

.portal-table > :not(caption) > * > :last-child {
    border-right-width: 1px;
    border-radius: 0 var(--portal-row-radius) var(--portal-row-radius) 0;
}

.portal-table > :not(caption) > * > :only-child {
    border-radius: var(--portal-row-radius);
}

.portal-table > thead > tr > * {
    border-top: 0;
    border-radius: 0;
}

.portal-table > tbody > tr:hover > * {
    background-color: rgba(53, 106, 230, .055);
}

.portal-table > tbody > tr:is(.is-selected, .table-active, .driver-row-selected, [aria-selected="true"]) > *,
.portal-table > tbody > tr:has(input[type="checkbox"]:checked) > * {
    position: relative;
    z-index: 1;
    background-color: var(--portal-glass-surface-strong);
    box-shadow: inset 0 0 0 1px var(--portal-glass-blue), 0 .55rem 1.35rem var(--portal-glass-shadow);
    transform: scaleY(1.07);
}

.portal-table > tbody > tr:is(.is-selected, .table-active, .driver-row-selected, [aria-selected="true"]) > :first-child,
.portal-table > tbody > tr:has(input[type="checkbox"]:checked) > :first-child {
    box-shadow: inset 1px 0 0 var(--portal-glass-rim), inset 0 1px 0 var(--portal-glass-blue), inset 0 -1px 0 var(--portal-glass-blue), 0 .55rem 1.35rem var(--portal-glass-shadow);
    transform: scale(1.025, 1.09);
}

.portal-table > tbody > tr:is(.is-selected, .table-active, .driver-row-selected, [aria-selected="true"]) > :last-child,
.portal-table > tbody > tr:has(input[type="checkbox"]:checked) > :last-child {
    box-shadow: inset -1px 0 0 var(--portal-glass-rim), inset 0 1px 0 var(--portal-glass-blue), inset 0 -1px 0 var(--portal-glass-blue), 0 .55rem 1.35rem var(--portal-glass-shadow);
    transform: scale(1.025, 1.09);
}

.portal-table :is(th, td, .week-day).is-selected-column {
    position: relative;
    z-index: 2;
    border-color: rgba(53, 106, 230, .38);
    background-color: var(--portal-glass-surface-strong) !important;
    box-shadow: inset 1px 0 0 var(--portal-glass-blue), inset -1px 0 0 var(--portal-glass-blue), 0 .25rem 1rem rgba(23, 35, 60, .16);
    transform: scaleX(1.035);
}

.portal-table :is(a, button, input, select, textarea):focus-visible {
    position: relative;
    z-index: 4;
    outline: 3px solid rgba(53, 106, 230, .38);
    outline-offset: 2px;
}

/* Freigabecenter: Nutzerfreigabe als gut sichtbare, vollständige Zeilenfläche. */
.portal-table > tbody > tr.release-module-row {
    --release-row-bg: rgba(53, 106, 230, .14);
    --release-row-border: rgba(53, 106, 230, .42);
    --release-row-accent: var(--portal-blue);
}

.portal-table > tbody > tr.release-module-row[data-release-visibility="released"] {
    --release-row-bg: rgba(25, 135, 84, .17);
    --release-row-border: rgba(25, 135, 84, .48);
    --release-row-accent: #198754;
}

.portal-table > tbody > tr.release-module-row[data-release-visibility="pilot"] {
    --release-row-bg: rgba(53, 106, 230, .17);
    --release-row-border: rgba(53, 106, 230, .5);
    --release-row-accent: var(--portal-blue);
}

.portal-table > tbody > tr.release-module-row[data-release-visibility="hidden"] {
    --release-row-bg: rgba(255, 193, 7, .22);
    --release-row-border: rgba(196, 145, 0, .5);
    --release-row-accent: #c49100;
}

.portal-table > tbody > tr.release-module-row > * {
    border-color: var(--release-row-border);
    background-color: var(--release-row-bg) !important;
}

.portal-table > tbody > tr.release-module-row > :first-child {
    box-shadow: inset 5px 0 0 var(--release-row-accent);
}

.portal-table > tbody > tr.release-module-row:hover > * {
    background-color: color-mix(in srgb, var(--release-row-bg) 86%, white) !important;
}

.portal-table > tbody > tr.release-module-row :is(.form-select, .form-control) {
    border-color: var(--release-row-border);
    background-color: rgba(255, 255, 255, .88);
}

/* Verladungsplanung */
.portal-full-bleed { overflow: hidden; }
.portal-full-bleed > main { height: calc(100dvh - 78px); overflow: hidden; }
.loading-app { --lp-navy:#17233c; --lp-blue:#356ae6; --lp-line:#dfe5ee; --lp-bg:#f4f6fa; height:100%; display:flex; flex-direction:column; background:var(--lp-bg); color:#202b3c; font-size:12px; }
.loading-toolbar { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 12px; background:#fff; border-bottom:1px solid var(--lp-line); }
.loading-toolbar__brand { display:flex; align-items:center; gap:8px; min-width:180px; }
.loading-toolbar__mark { width:30px; height:30px; display:grid; place-items:center; color:#fff; background:var(--lp-blue); border-radius:6px; font-size:16px; }
.loading-toolbar__brand strong,.loading-toolbar__brand small { display:block; line-height:1.1; }
.loading-toolbar__brand small { margin-top:3px; color:#718096; font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.loading-toolbar__controls { display:flex; align-items:center; justify-content:flex-end; gap:7px; min-width:0; }
.loading-week-control { display:flex; align-items:center; gap:5px; margin:0; font-size:10px; font-weight:700; text-transform:uppercase; color:#64748b; }
.loading-week-control input,.loading-search input { height:30px; border:1px solid var(--lp-line); border-radius:5px; padding:0 7px; color:#202b3c; background:#fff; }
.loading-search { position:relative; margin:0; }
.loading-search i { position:absolute; left:8px; top:7px; color:#94a3b8; }
.loading-search input { width:260px; padding-left:27px; padding-right:78px; }
.loading-search__hint { position:absolute; right:7px; top:7px; color:#94a3b8; font-size:9px; pointer-events:none; }
.loading-search-results { position:absolute; z-index:1080; top:36px; right:0; width:min(520px,calc(100vw - 24px)); max-height:min(620px,75vh); overflow:auto; background:#fff; border:1px solid var(--lp-line); border-radius:8px; box-shadow:0 16px 42px rgba(23,35,60,.2); color:#202b3c; }
.loading-search-results__head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; padding:9px 11px; background:#f8fafc; border-bottom:1px solid var(--lp-line); text-transform:uppercase; letter-spacing:.04em; font-size:10px; font-weight:700; }
.loading-search-results__head small { color:#718096; font-weight:600; }
.loading-search-result { display:grid; grid-template-columns:112px 1fr; gap:2px 10px; padding:9px 11px; border-bottom:1px solid #edf1f6; color:inherit; text-decoration:none; }
.loading-search-result:hover,.loading-search-result:focus { background:#eef4ff; color:inherit; outline:none; }
.loading-search-result__id { grid-row:1 / span 2; align-self:center; color:var(--lp-blue); font-weight:700; }
.loading-search-result strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.loading-search-result > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#718096; font-size:10px; }
.loading-search-empty { display:flex; align-items:center; justify-content:center; gap:8px; min-height:78px; padding:14px; color:#718096; }
.loading-search-empty i { position:static; }
.loading-search-results__all,.loading-search-results__advanced { display:flex; align-items:center; justify-content:space-between; width:100%; padding:10px 11px; border:0; color:var(--lp-blue); background:#fff; font-weight:700; text-decoration:none; }
.loading-search-results__all { border-top:1px solid var(--lp-line); }
.loading-search-results__advanced { justify-content:flex-start; gap:8px; border-top:1px solid var(--lp-line); background:#f8fafc; }
.loading-search-results__all:hover,.loading-search-results__advanced:hover { background:#eef4ff; }
.loading-search-results__all i,.loading-search-results__advanced i { position:static; color:inherit; }
.loading-unit-number[data-edit-unit-number],.loading-tour-unit__number[data-edit-unit-number] { cursor:pointer; text-decoration:underline dotted transparent; text-underline-offset:3px; }
.loading-unit-number[data-edit-unit-number]:hover,.loading-tour-unit__number[data-edit-unit-number]:hover { color:var(--lp-blue); text-decoration-color:currentColor; }
.loading-save-state { color:#64748b; white-space:nowrap; font-size:10px; }
.loading-save-state.is-dirty { color:#b45309; }
.loading-save-state.is-saving { color:var(--lp-blue); }
.loading-statusbar { height:34px; display:flex; align-items:center; padding:0 10px; gap:10px; background:#fff; border-bottom:1px solid var(--lp-line); flex:none; }
.loading-tabs { display:flex; align-self:stretch; gap:2px; }
.loading-tab { align-self:center; border:0; border-radius:999px; background:transparent; color:#64748b; padding:6px 10px; font-size:11px; font-weight:700; transition:background-color .14s ease,box-shadow .16s ease,transform .16s ease; }
.loading-tab:hover { background:rgba(53,106,230,.07); }
.loading-tab.is-active { color:var(--lp-blue); background:var(--portal-glass-surface-strong); box-shadow:inset 0 0 0 1px var(--portal-glass-blue),0 4px 12px rgba(23,35,60,.13); transform:scale(1.035); }
.loading-tab:focus-visible { outline:3px solid rgba(53,106,230,.32); outline-offset:2px; }
.loading-tab .badge { font-size:9px; }
.loading-selection-summary { flex:1; color:#475569; font-size:10px; }
.loading-stats { display:flex; gap:10px; white-space:nowrap; color:#64748b; font-size:10px; }
.loading-import-panel { flex:none; padding:8px 10px 0; }
.loading-drop-zone { min-height:50px; display:flex; align-items:center; gap:10px; padding:7px 12px; border:1px dashed #9db5e8; border-radius:7px; background:#f8fbff; color:#334155; }
.loading-drop-zone.is-over { border-color:var(--lp-blue); background:#eaf1ff; box-shadow:inset 0 0 0 1px var(--lp-blue); }
.loading-drop-zone > i { color:var(--lp-blue); font-size:22px; }
.loading-drop-zone > div { flex:1; }
.loading-drop-zone strong,.loading-drop-zone span { display:block; line-height:1.25; }
.loading-drop-zone span { color:#64748b; font-size:10px; }
.loading-import-progress { margin-top:5px; padding:5px 9px; background:#fff7ed; border:1px solid #fed7aa; border-radius:5px; color:#9a3412; font-size:10px; }
.loading-workspace { flex:1; min-height:0; overflow:auto; padding:8px 10px 12px; }
.loading-empty { min-height:280px; height:100%; display:grid; place-items:center; text-align:center; color:#64748b; }
.loading-empty i { display:block; color:#cbd5e1; font-size:42px; margin-bottom:8px; }
.loading-unit-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(365px,1fr)); gap:8px; align-items:start; }
.loading-unit-card { min-width:0; background:#fff; border:1px solid var(--lp-line); border-radius:1rem; box-shadow:0 1px 2px rgba(15,23,42,.04); overflow:visible; }
.loading-unit-card.is-selected { border-color:var(--portal-glass-blue); background:var(--portal-glass-surface-strong); box-shadow:inset 0 0 0 1px var(--portal-glass-rim),0 .7rem 1.6rem var(--portal-glass-shadow); transform:scale(1.012); }
.loading-unit-card.is-locked { border-color:#b9c5d4; background:#f8fafc; }
.loading-unit-card__header { height:34px; display:flex; align-items:center; gap:7px; padding:4px 7px; color:#fff; background:var(--lp-navy); border-radius:calc(1rem - 1px) calc(1rem - 1px) 0 0; }
.loading-unit-card.is-locked .loading-unit-card__header { background:#536176; }
.loading-unit-select { width:13px; height:13px; margin:0; }
.loading-unit-number { font-weight:800; letter-spacing:.03em; }
.loading-unit-meta { flex:1; overflow:hidden; color:#c7d7f4; font-size:9px; white-space:nowrap; text-overflow:ellipsis; }
.loading-unit-volume { font-weight:800; white-space:nowrap; }
.loading-unit-volume.is-over { color:#fecaca; }
.loading-unit-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0 .2rem; font-size:10px; }
.loading-unit-table th { height:18px; padding:1px 4px; color:#64748b; background:#f1f5f9; border-bottom:1px solid var(--lp-line); font-size:8px; text-align:left; text-transform:uppercase; }
.loading-unit-table td { height:18px; padding:1px 4px; border-bottom:1px solid #eef2f7; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.loading-unit-table tr:last-child td { border-bottom:0; }
.loading-unit-table tbody tr:hover { background:#eff6ff; }
.loading-unit-table .col-grip { width:18px; text-align:center; color:#a3afbf; cursor:grab; }
.loading-unit-table .col-check { width:22px; text-align:center; }
.loading-unit-table .col-nr { width:34px; }
.loading-unit-table .col-maker { width:95px; }
.loading-unit-table .col-amount { width:62px; text-align:right; }
.loading-unit-table input[type=checkbox] { width:12px; height:12px; margin:0; vertical-align:middle; }
.loading-unit-table tr.is-selected { background:var(--portal-glass-surface-strong); }
.loading-unit-table tr.is-dragging { opacity:.45; }
.loading-unit-card.is-locked tbody tr { color:#64748b; }
.loading-unit-card.is-locked .col-grip { cursor:not-allowed; color:#d8dee8; }
.loading-unit-card__footer { height:25px; display:flex; align-items:center; justify-content:space-between; padding:2px 6px; border-top:1px solid var(--lp-line); border-radius:0 0 calc(1rem - 1px) calc(1rem - 1px); background:#fbfcfe; }
.loading-unit-card__footer small { color:#64748b; }
.loading-lock { border:0; border-radius:4px; padding:2px 6px; color:var(--lp-blue); background:transparent; font-size:10px; font-weight:700; }
.loading-lock:hover { background:#eaf1ff; }
.loading-unit-card.is-locked .loading-lock { color:#475569; }
.loading-finished { display:inline-flex; align-items:center; gap:3px; padding:1px 5px; color:#166534; background:#dcfce7; border:1px solid #bbf7d0; border-radius:999px; font-size:8px; font-weight:800; text-transform:uppercase; }
.loading-loose-table { width:100%; min-width:850px; border-collapse:separate; border-spacing:0 .2rem; background:#fff; border:1px solid var(--lp-line); border-radius:var(--portal-row-radius); overflow:visible; font-size:11px; }
.loading-loose-table th { position:sticky; top:0; z-index:2; height:28px; padding:4px 7px; color:#475569; background:#e9eef5; border-bottom:1px solid #cbd5e1; text-align:left; font-size:9px; text-transform:uppercase; }
.loading-loose-table td { height:25px; padding:3px 7px; border-bottom:1px solid #eef2f7; }
.loading-loose-table tr.is-selected td { background:var(--portal-glass-surface-strong); }
.loading-loose-table .drag-cell { width:28px; color:#94a3b8; text-align:center; cursor:grab; }
.loading-warehouse-actions { display:flex; justify-content:flex-end; margin-bottom:7px; }
.warehouse-mark { width:24px; height:18px; display:inline-grid; place-items:center; border:2px solid #111; color:#111; font-weight:900; }
.warehouse-mark.is-partial { background:repeating-linear-gradient(135deg,#111 0,#111 2px,#fff 2px,#fff 5px); color:transparent; }
.loading-tour-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:var(--planning-tour-height,350px); align-content:start; gap:9px; width:100%; height:auto; min-height:0; }
.loading-tour-grid[data-tour-count="1"] { grid-template-columns:minmax(0,1fr); }
.loading-tour { min-width:0; height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--lp-line); border-radius:8px; background:#fff; transition:border-color .15s ease,box-shadow .15s ease,opacity .15s ease; }
.loading-tour.is-selected-tour { border-color:var(--lp-blue); box-shadow:0 0 0 2px rgba(53,106,230,.2),0 8px 20px rgba(23,35,60,.14); }
.loading-tour.is-tour-over { border-color:#1d4ed8; box-shadow:inset 0 0 0 3px rgba(53,106,230,.28); }
.loading-tour.is-dragging-tour { opacity:.55; }
.loading-tour__header { height:32px; display:flex; align-items:center; gap:10px; padding:0 12px; color:#fff; background:#233252; flex:none; cursor:pointer; user-select:none; }
.loading-tour__header:focus { outline:2px solid #93c5fd; outline-offset:-2px; }
.loading-tour__drag { color:#9fbae7; cursor:grab; font-size:22px; }
.loading-tour__header:active .loading-tour__drag { cursor:grabbing; }
.loading-tour__title { font-size:18px; font-weight:800; text-transform:uppercase; cursor:text; text-decoration:underline dotted transparent; text-underline-offset:3px; }
.loading-tour__title:hover { color:#fff; text-decoration-color:#9fbae7; }
.loading-tour__select-all { display:flex; align-items:center; gap:5px; margin:0; color:#dbe8ff; font-size:15px; cursor:pointer; }
.loading-tour__select-all input { width:16px; height:16px; margin:0; }
.loading-tour__selection { flex:1; color:#aecdff; font-size:15px; }
.loading-tour__remove { border:0; color:#aecdff; background:transparent; padding:0; }
.loading-tour__units { display:grid; grid-template-columns:1fr 1fr; flex:1; min-height:0; }
.loading-tour-unit { min-width:0; display:flex; flex-direction:column; position:relative; border-right:1px solid var(--lp-line); }
.loading-tour-unit:last-child { border-right:0; }
.loading-tour-unit.is-over-target { background:#edf4ff; box-shadow:inset 0 0 0 2px #6c96ee; }
.loading-tour-unit__head { height:50px; flex:none; padding:4px 9px; border-bottom:1px solid var(--lp-line); background:#fff; }
.loading-tour-unit.is-locked .loading-tour-unit__head { background:#eef2f6; }
.loading-tour-unit__line { display:flex; align-items:center; justify-content:space-between; gap:7px; font-size:15px; line-height:18px; }
.loading-tour-unit__number { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:2px 8px; color:#fff; background:var(--lp-blue); border-radius:4px; font-size:15px; font-weight:800; }
.loading-tour-unit.is-locked .loading-tour-unit__number { background:#64748b; }
.loading-capacity { height:3px; margin-top:3px; overflow:hidden; border-radius:2px; background:#e2e8f0; }
.loading-capacity span { display:block; height:100%; background:var(--lp-blue); }
.loading-capacity.is-over span { background:#dc3545; }
.loading-tour-rows { flex:1 1 auto; height:auto; min-height:0; overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#b8c4d5 #eef2f7; }
.loading-tour-row { height:24px; display:grid; grid-template-columns:18px 18px 34px 115px minmax(0,1fr) 70px; align-items:center; border-bottom:1px solid #f0f3f7; padding:0 7px; font-size:15px; line-height:1; }
.loading-tour-row:nth-child(even) { background:#f8fafc; }
.loading-tour-row { border-radius:.35rem; transition:background-color .14s ease,box-shadow .16s ease,transform .16s ease; }
.loading-tour-row:hover { background:rgba(53,106,230,.045); }
.loading-tour-row.is-selected { position:relative; z-index:1; background:var(--portal-glass-surface-strong); box-shadow:inset 0 0 0 1px var(--portal-glass-blue),0 3px 10px rgba(23,35,60,.2); transform:scale(1.018,1.16); }
.loading-tour-row .drag { color:#b2bdca; cursor:grab; }
.loading-tour-row span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.loading-tour-row .amount { text-align:right; font-weight:700; }
.loading-tour-unit.is-locked .loading-tour-row { color:#7b8796; }
.loading-tour-unit.is-locked .loading-tour-row .drag { color:#dce2e9; cursor:not-allowed; }
.loading-tour-unit__foot { height:28px; display:flex; align-items:center; justify-content:space-between; flex:none; padding:0 9px; border-top:1px solid var(--lp-line); background:#fbfcfe; font-size:15px; }
.loading-tour-unit__empty { flex:1; display:grid; place-items:center; color:#94a3b8; background:#fbfcfe; text-align:center; }
.loading-tour-unit__empty i { display:block; margin:auto; font-size:20px; }
.loading-tour-actions { min-height:36px; display:flex; align-items:center; justify-content:center; gap:12px; flex:none; margin-top:8px; padding:5px 10px; border:1px solid var(--lp-line); border-radius:7px; color:#64748b; background:#fff; font-size:10px; }
.loading-app.is-planning .loading-workspace { display:block; overflow-x:hidden; overflow-y:auto; scroll-behavior:smooth; }
.loading-app.is-planning .loading-tour-grid { height:auto; min-height:0; }
.loading-context-menu { position:fixed; z-index:1090; width:270px; max-height:calc(100vh - 16px); overflow:auto; }
.loading-context-menu button { display:flex; align-items:center; gap:7px; font-size:11px; }
.loading-context-menu button:disabled { color:#a4afbd; background:#fff; }
.loading-context-menu__title { display:flex; align-items:center; gap:9px; padding:9px 11px; border-bottom:1px solid var(--lp-line); color:#233252; background:#f5f8fd; }
.loading-context-menu__title > i { color:var(--lp-blue); font-size:18px; }
.loading-context-menu__title span { display:grid; min-width:0; }
.loading-context-menu__title strong { font-size:12px; }
.loading-context-menu__title small { color:#64748b; font-size:10px; }
.loading-context-menu__title .loading-context-back { flex:none; width:28px; height:28px; justify-content:center; border:0; border-radius:50%; padding:0; color:#174ea6; background:#e8f0ff; }
.loading-context-menu__title .loading-context-back:hover { background:#d8e6ff; }
.loading-context-menu__tours { display:grid; padding:4px; }
.loading-context-menu .loading-context-tour { width:100%; min-height:32px; justify-content:flex-start; border:0; border-radius:4px; padding:5px 8px; color:#24324c; background:#fff; text-align:left; }
.loading-context-menu .loading-context-tour:hover:not(:disabled) { color:#174ea6; background:#eef4ff; }
.loading-context-menu .loading-context-tour span { flex:1; display:grid; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.loading-context-menu .loading-context-tour span strong { overflow:hidden; text-overflow:ellipsis; }
.loading-context-menu .loading-context-tour span small { font-weight:400; }
.loading-context-menu .loading-context-tour small { color:#9aa5b4; }
.loading-shipment-move-list { display:grid; gap:6px; max-height:280px; overflow:auto; padding-right:3px; }
.loading-shipment-move-item { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:8px 10px; border:1px solid #dce4ef; border-radius:7px; background:#f8fafc; }
.loading-shipment-move-item__name { display:grid; min-width:0; }
.loading-shipment-move-item__name strong { overflow:hidden; color:#233252; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.loading-shipment-move-item__name small { color:#64748b; font-size:11px; }
.loading-shipment-move-item__origin { flex:none; display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:999px; color:#174ea6; background:#e8f0ff; font-size:11px; font-weight:700; white-space:nowrap; }
.loading-toast-region { position:fixed; right:14px; bottom:14px; z-index:1100; display:grid; gap:6px; }
.loading-toast { max-width:360px; padding:9px 12px; border-radius:6px; color:#fff; background:#25344f; box-shadow:0 8px 22px rgba(15,23,42,.22); font-size:11px; }
.loading-toast.is-error { background:#a61b2b; }
@media (max-width:1500px) { .loading-search input { width:180px; } .loading-tour-row { grid-template-columns:18px 18px 34px 105px minmax(0,1fr) 65px; font-size:14.25px; } }
@media (max-width:900px) { .portal-full-bleed { overflow:auto; } .portal-full-bleed > main { height:auto; min-height:calc(100vh - 58px); } .loading-toolbar { align-items:flex-start; flex-direction:column; } .loading-toolbar__controls { width:100%; flex-wrap:wrap; justify-content:flex-start; } .loading-search { flex:1; } .loading-search input { width:100%; } .loading-tour-grid,.loading-tour-grid[data-tour-count="1"] { grid-template-columns:1fr; grid-template-rows:none; } }
@media (max-width:600px) { .loading-shipment-move-item { align-items:flex-start; flex-direction:column; gap:5px; } }
@media (prefers-reduced-motion: reduce) { .portal-navbar .nav-link,.portal-navbar .btn,.portal-tabs .nav-link,.portal-table > :not(caption) > * > *,.loading-tab,.loading-unit-card,.loading-tour-row { transition:none!important; } }
@media print { .portal-navbar,.loading-toolbar,.loading-statusbar,.loading-import-panel,.loading-warehouse-actions { display:none!important; } .portal-full-bleed,.portal-full-bleed > main,.loading-app,.loading-workspace { height:auto!important; overflow:visible!important; background:#fff!important; } .loading-workspace { padding:0!important; } .loading-loose-table { border:1px solid #000; font-size:10pt; } .loading-loose-table th,.loading-loose-table td { color:#000!important; background:#fff!important; border-color:#000!important; } .portal-table { border-collapse:collapse!important; border-spacing:0!important; } .portal-table > :not(caption) > * > *,.loading-unit-card,.loading-tour-row { box-shadow:none!important; transform:none!important; } }

.loading-import-review-host{flex:1;min-height:0;overflow:auto;padding:10px;background:#f4f6fa}
.loading-planning-note-strip{display:flex;justify-content:flex-end;margin-bottom:7px}.loading-planning-note-strip .btn{color:#475569;text-decoration:none;font-weight:700}
.loading-tour-row{grid-template-columns:18px 18px 34px 115px minmax(0,1fr) 70px 30px}
.loading-inline-note{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:2px;width:26px;height:24px;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:#7b8796;font-size:12px}.loading-inline-note:hover{border-color:#b9c9e8;background:#eef4ff;color:var(--lp-blue)}.loading-inline-note.has-notes{border-color:#a9bee9;background:#edf3ff;color:var(--lp-blue)}.loading-inline-note span{font-size:9px;font-weight:800}
.loading-tour-unit__line .loading-inline-note{margin-left:auto}.loading-tour-unit__line .loading-inline-note+.loading-finished,.loading-tour-unit__line .loading-inline-note+.bi{margin-left:3px}
.loading-planning-notes{max-height:260px;overflow:auto}.loading-planning-note{padding:10px 12px;margin-bottom:8px;border-left:3px solid var(--lp-blue);border-radius:4px;background:#f4f7fc}.loading-planning-note small{display:block;margin-top:4px;color:#718096}
@media(max-width:1200px){.loading-tour-row{grid-template-columns:18px 18px 34px 105px minmax(0,1fr) 65px 28px}}
