/* =========================================================
   Base utility styles
   - small project-specific helpers on top of Bootstrap
   ========================================================= */

:root {
    --app-page-bg: #f3f5f8;
    --app-page-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
}

.app-page {
    min-height: 100vh;
    background-color: var(--app-page-bg);
    background-image: var(--app-page-overlay);
    background-attachment: fixed;
}

.app-main {
    position: relative;
    z-index: 1;
}

.app-footer-link {
    color: #6b7280;
    font-size: 0.92rem;
    text-decoration: none;
}

.app-footer-link:hover,
.app-footer-link:focus-visible {
    color: #1f2937;
    text-decoration: underline;
}

.bg-orange {
    background-color: #fd7e14;
}

/* =========================================================
   Page-level layout
   - header, day navigation, legend, main planning container
   ========================================================= */

.planning-header {
    border: 1px solid #dee2e6;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
    border-radius: 10px;
}

.ui-page-header {
    border: 1px solid #dee2e6;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ui-page-header-body {
    padding: 1rem 1.15rem;
}

.setup-module-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    margin-left: auto;
    flex: 0 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
    -webkit-overflow-scrolling: touch;
}

.setup-module-nav-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.setup-module-nav .btn.disabled,
.setup-module-nav .btn:disabled {
    opacity: 1;
}

.setup-module-nav .btn[aria-disabled="true"] {
    pointer-events: none;
}

.setup-module-overview-copy {
    flex: 1 1 32rem;
    min-width: 0;
    max-width: 40rem;
}

.setup-module-overview-header .setup-module-nav {
    flex: 0 1 auto;
}

.ui-page-overline {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.ui-page-title {
    font-size: 1.85rem;
    line-height: 1.12;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.ui-page-subtitle,
.ui-description {
    color: #6b7280;
    line-height: 1.5;
}

.ui-page-meta {
    font-size: 0.95rem;
    color: #4b5563;
}

.ui-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ui-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ui-section-overline {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.ui-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
}

.ui-meta-text,
.ui-help-text {
    font-size: 0.82rem;
    color: #6b7280;
}

.ui-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

.ui-card-compact {
    padding: 0.8rem 0.9rem;
}

.ui-card-soft {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.ui-list-card {
    border: 1px solid #e6ebf1;
    border-radius: 10px;
    background: #fbfdff;
    padding: 0.75rem 0.85rem;
}

.ui-form-section {
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
}

.ui-form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.ui-action-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ui-danger-panel {
    border-color: #efc7c7;
    background: linear-gradient(180deg, #fffefe 0%, #fff6f6 100%);
}

.ui-danger-title {
    color: #991b1b;
}

.ui-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 1.6rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    border: 1px solid transparent;
}

.ui-badge-neutral {
    background: #eef2f7;
    color: #475569;
    border-color: #dbe3ec;
}

.ui-badge-info {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.ui-badge-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.ui-badge-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ui-badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.profile-password-panel {
    overflow: hidden;
}

.profile-password-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.profile-password-summary::-webkit-details-marker {
    display: none;
}

.profile-password-panel[open] > .profile-password-summary {
    margin-bottom: 0.25rem;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    min-height: 2rem;
    padding-inline: 0.8rem;
}

.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-danger {
    box-shadow: none;
}

.btn-ghost,
.btn-utility {
    background: transparent;
    border: 1px solid #dbe3ec;
    color: #475569;
}

.btn-ghost:hover,
.btn-utility:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1f2937;
}

.navbar .nav-link {
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #1f2937;
}

.navbar .nav-link.active,
.navbar .nav-link.show {
    background: transparent;
    color: #1f2937;
    font-weight: 600;
}

.dropdown-menu .dropdown-item {
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #1f2937;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background: transparent;
    color: #1f2937;
    font-weight: 600;
}

.app-notification-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.app-notification-bell {
    font-size: 1rem;
    line-height: 1;
}

.app-notification-dot {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 0 0 2px #f8f9fa;
}

.app-notification-menu {
    width: min(28rem, calc(100vw - 2rem));
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.app-notification-menu-header,
.app-notification-footer,
.app-notification-empty {
    padding: 0.9rem 1rem;
    background: #fff;
}

.app-notification-footer,
.app-notification-empty {
    border-top: 1px solid #eef2f7;
}

.app-notification-footer .btn {
    flex-shrink: 0;
}

.app-notification-list {
    max-height: 28rem;
    overflow-y: auto;
    background: #f8fafc;
}

.app-notification-item {
    padding: 0.95rem 1rem;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

.app-notification-item:first-child {
    border-top: 0;
}

.app-notification-item.is-unseen {
    background: #f8fbff;
}

.app-notification-item-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.app-notification-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.app-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.dashboard-hero {
    position: relative;
}

.dashboard-hero-media {
    min-height: 140px;
}

.dashboard-hero-content {
    position: relative;
    z-index: 1;
}

.dashboard-hero-media-fallback {
    min-height: 140px;
}

.planning-days {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.planning-days .btn-group .btn {
    min-width: 62px;
}

.planning-days .btn {
    padding: 0.25rem 0.55rem;
}

.days-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.planning-legend {
    font-size: 0.78rem;
    color: #7b8794;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-top: 0.85rem;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
}

.legend-title {
    font-weight: 600;
    margin-right: 6px;
}

.legend-text {
    margin-right: 10px;
    color: #6b7280;
}

/* =========================================================
   Planning table container
   - outer shell of the matrix without excessive nested frames
   ========================================================= */

.planning-table-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px;
}

.event-template-card {
    border-color: #cfe0ff;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.event-template-card-note {
    padding: 0.85rem 1rem;
    border: 1px solid #d9e6fb;
    border-radius: 12px;
    background: #f8fbff;
    color: #4b5563;
    line-height: 1.5;
}

.event-template-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-template-option-group {
    padding: 1rem;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.event-template-option-group-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.2rem;
}

.event-template-option-group-copy {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.event-template-option-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    height: 100%;
    margin: 0;
    padding: 1rem;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.event-template-option-card:hover {
    border-color: #bfd4f6;
    background: #f8fbff;
}

.event-template-option-card.is-selected {
    border-color: #91b8ff;
    background: #eef5ff;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.event-template-option-card .form-check-input {
    flex: 0 0 auto;
    margin: 0.15rem 0 0;
    margin-left: 0;
    float: none;
}

.event-template-option-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.2rem;
}

.event-header-image-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 0.95rem;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #fbfdff;
}

.event-header-image-card.is-empty [data-header-image-present] {
    display: none;
}

.event-header-image-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.event-header-image-meta {
    margin-top: 0.85rem;
}

.event-header-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.event-header-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.event-header-image-card.is-empty .event-header-image-upload {
    display: flex !important;
}

.event-mapping-builder {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-mapping-row {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.event-mapping-source {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 0.85rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #dbe4ef;
    font-weight: 600;
    color: #1f2937;
}

.registration-consent-intro {
    line-height: 1.5;
}

.registration-consent-grid {
    display: grid;
    gap: 1.4rem;
}

.registration-consent-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.95rem 1rem;
}

.registration-consent-card-required {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    border-color: #bcd2f5;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08), 0 6px 16px rgba(59, 130, 246, 0.06);
}

.registration-consent-card-optional {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border-color: #e5e7eb;
}

.registration-consent-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.registration-consent-card-required .registration-consent-heading {
    color: #1d4ed8;
}

.registration-consent-copy {
    line-height: 1.45;
}

.registration-privacy-details {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.9rem 1rem;
}

.registration-privacy-summary {
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

.registration-privacy-body {
    line-height: 1.55;
    white-space: pre-line;
}

.privacy-policy-body {
    color: #374151;
    line-height: 1.7;
}

.privacy-policy-body p:last-child {
    margin-bottom: 0;
}

.system-settings-section {
    scroll-margin-top: 6rem;
    padding: 0.95rem 1rem;
}

.system-settings-section-header {
    align-items: flex-start;
}

.system-settings-save-hint {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eef2f7;
}

.system-settings-group + .system-settings-group {
    padding-top: 0.4rem;
    border-top: 1px solid #eef2f7;
}

.system-settings-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.1rem 0;
}

.system-settings-group {
    border-top: 1px solid #eef2f7;
    padding-top: 0.75rem;
}

.system-settings-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.system-settings-group-toggle {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.system-settings-group-toggle:hover .system-settings-group-title {
    color: #0f172a;
}

.system-settings-group-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.system-settings-group-description {
    max-width: 56rem;
}

.system-settings-group-toggle-icon {
    width: 0.75rem;
    height: 0.75rem;
    margin-top: 0.35rem;
    flex-shrink: 0;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.15s ease, margin-top 0.15s ease;
}

.system-settings-group.is-open .system-settings-group-toggle-icon {
    transform: rotate(-135deg);
    margin-top: 0.55rem;
}

.system-settings-group-body {
    margin-top: 0.75rem;
}

.system-settings-inline-note {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.system-settings-field {
    padding: 0.15rem 0.1rem;
}

.system-settings-field.has-error {
    padding: 0.65rem 0.75rem;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
}

.system-settings-usage {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
}

.system-settings-section-footer {
    border-top: 1px solid #eef2f7;
}

.dashboard-hint-footer {
    border-top: 1px solid #e5e7eb;
}

.dashboard-hint-footer .btn {
    flex-shrink: 0;
}

.dashboard-hint-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

[data-dashboard-hints-root="true"].is-loading {
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.app-notification-overview-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    overflow: hidden;
}

.dashboard-hints-overview-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-hints-overview-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
}

.dashboard-hints-overview-item.is-critical {
    border-color: #fecaca;
    background: #fff8f8;
}

.dashboard-hints-overview-item.is-warning {
    border-color: #fde68a;
    background: #fffdf5;
}

.dashboard-hints-overview-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.dashboard-hints-overview-title {
    font-weight: 600;
    color: #111827;
}

.dashboard-hints-overview-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timetable-warning-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timetable-warning-item {
    background: #fffaf0;
}

.timetable-stage-section + .timetable-stage-section {
    padding-top: 0.75rem;
    border-top: 1px solid #eef2f7;
}

.timetable-stage-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.65rem;
}

.timetable-day-card {
    padding: 1rem;
}

.timetable-list-table th {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom-color: #dbe3ec;
    padding: 0.55rem 0.75rem;
}

.timetable-list-table td {
    border-color: #eef2f7;
    padding: 0.65rem 0.75rem;
    vertical-align: top;
}

.timetable-list-table th:first-child,
.timetable-list-table td:first-child {
    width: 1%;
    white-space: nowrap;
    padding-right: 1rem;
}

.timetable-program-table th,
.timetable-program-table td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.timetable-program-table tbody tr + tr td {
    border-top-color: #e2e8f0;
}

.timetable-program-col-time {
    width: 9.75rem;
    min-width: 9.75rem;
}

.timetable-program-col-stage {
    width: 8rem;
}

.timetable-program-table thead th {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    padding-bottom: 0.8rem;
}

.timetable-program-time {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.timetable-program-stage-cell {
    width: 8rem;
}

.timetable-stage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    min-width: 6.75rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.15;
}

.timetable-program-band {
    font-weight: 600;
    color: #111827;
}

.timetable-graphic {
    overflow-x: auto;
}

.timetable-graphic-day-card {
    padding: 1rem 1rem 1.1rem;
    border-color: #dbe3ec;
}

.timetable-graphic-day-card + .timetable-graphic-day-card {
    margin-top: 0.5rem;
}

.timetable-graphic-day-card .ui-section-title {
    font-size: 1.18rem;
}

.timetable-graphic-grid {
    display: grid;
    grid-template-columns: 6.5rem minmax(36rem, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.timetable-graphic-time-column {
    position: sticky;
    left: 0;
    z-index: 3;
}

.timetable-graphic-time-header,
.timetable-stage-column-header {
    min-height: 2.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.timetable-graphic-time-body,
.timetable-stage-column-body {
    position: relative;
    margin-top: 0.6rem;
}

.timetable-graphic-time-body {
    border-right: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.timetable-hour-label {
    position: absolute;
    left: 0.15rem;
    width: 100%;
    transform: translateY(-50%);
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.timetable-hour-label.is-first {
    transform: none;
}

.timetable-hour-label.is-last {
    transform: translateY(-100%);
}

.timetable-hour-label span {
    display: inline-block;
    min-width: 4.75rem;
    padding: 0.15rem 0.5rem 0.15rem 0;
    background: linear-gradient(90deg, rgba(252, 253, 255, 0.96) 0%, rgba(252, 253, 255, 0.74) 72%, rgba(252, 253, 255, 0) 100%);
}

.timetable-graphic-stages {
    display: grid;
    gap: 0.9rem;
    min-width: 36rem;
}

.timetable-stage-column {
    min-width: 0;
}

.timetable-stage-column-header {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.timetable-stage-column-body {
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
    overflow: hidden;
}

.timetable-hour-line,
.timetable-half-hour-line {
    position: absolute;
    left: 0;
    right: 0;
}

.timetable-hour-line {
    border-top: 1px solid #d7dee8;
}

.timetable-half-hour-line {
    border-top: 1px dashed #eef2f6;
    opacity: 0.75;
}

.timetable-band-block {
    position: absolute;
    box-sizing: border-box;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #93c5fd;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    min-height: 3.3rem;
}

.timetable-band-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
}

.timetable-band-block-title {
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.2;
    font-size: 0.86rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: 2.1em;
    padding-right: 0.2rem;
}

.timetable-band-block-time {
    font-size: 0.76rem;
    color: #526174;
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
    line-height: 1.2;
}

.helper-event-header-body {
    padding-block: 1.15rem;
}

.helper-event-header-main {
    max-width: 44rem;
}

.helper-event-header-name {
    font-size: 2rem;
    line-height: 1.1;
}

.helper-event-header-subtitle {
    font-size: 0.96rem;
}

.helper-event-header-meta-wrap {
    max-width: 26rem;
}

.helper-event-meta-label {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.helper-event-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.helper-event-main-card {
    padding: 1rem;
}

.helper-event-contact-card {
    padding: 0.85rem 0.95rem;
}

.helper-event-contact-card .form-label {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.helper-event-contact-card .form-control {
    min-height: 2.5rem;
}

.helper-event-contact-card .helper-event-info-card {
    padding: 0.7rem 0.8rem;
}

.helper-event-info-card {
    height: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid #e7edf3;
    border-radius: 12px;
    background: #fbfdff;
}

.helper-event-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.helper-event-info-value {
    color: #1f2937;
    font-weight: 600;
    line-height: 1.4;
}

.helper-event-section-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.helper-event-sidebar {
    position: sticky;
    top: 1rem;
}

.helper-event-side-heading {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 -0.45rem 0.1rem;
}

.helper-event-side-card {
    padding: 1rem;
}

.helper-event-side-card-title {
    font-size: 1.02rem;
}

.helper-event-compact-list {
    padding-left: 1rem;
}

.helper-event-compact-list li + li {
    margin-top: 0.35rem;
}

.helper-event-shift-card {
    border: 1px solid #e5ebf1;
    border-radius: 10px;
    background: #fbfdff;
    padding: 0.7rem 0.8rem;
}

.helper-event-shift-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1f2937;
}

.helper-event-shift-station {
    margin-top: 0.18rem;
    color: #1f2937;
}

.helper-event-shift-trade {
    margin-top: 0.12rem;
    font-size: 0.82rem;
    color: #6b7280;
}

.helper-event-stamm-summary {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.helper-event-stamm-item {
    padding: 0.7rem 0.8rem;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    background: #fbfcfe;
}

.helper-event-stamm-form {
    border-top: 1px solid #e8edf2;
    padding-top: 1rem;
}

.helper-event-checkbox-group {
    border: 1px solid #e8edf2;
    border-radius: 10px;
    background: #fbfcfe;
    padding: 0.75rem 0.85rem;
}

.helper-event-checkbox-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.helper-event-checkbox-group li + li {
    margin-top: 0.45rem;
}

.helper-event-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.helper-event-day-grid .errorlist {
    display: none;
}

.helper-event-day-tile {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.helper-event-day-tile input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.helper-event-day-tile-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #fbfdff;
    color: #344054;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.helper-event-day-tile:hover .helper-event-day-tile-label,
.helper-event-day-tile:focus-within .helper-event-day-tile-label {
    border-color: #bfdbfe;
    background: #f8fbff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.helper-event-day-tile input:checked + .helper-event-day-tile-label,
.helper-event-day-tile.is-selected .helper-event-day-tile-label,
.helper-event-day-tile-static.is-selected {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e3a8a;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.08);
}

.helper-event-day-grid-readonly {
    align-items: start;
}

.helper-event-day-tile-static {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #fbfdff;
}

.helper-event-trade-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.helper-event-trade-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #eef4fb;
    border: 1px solid #d7e2ee;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
}

.helper-event-admin-card {
    border-color: #efc7c7;
    background: linear-gradient(180deg, #fffefe 0%, #fff6f6 100%);
}

.helper-event-withdraw-dialog {
    border: 0;
    border-radius: 14px;
    padding: 0;
    max-width: 32rem;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.helper-event-withdraw-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.helper-event-withdraw-dialog-shell {
    padding: 1.15rem 1.2rem;
    background: #ffffff;
}

.helper-event-withdraw-dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.8rem;
}

.setup-task-dialog {
    max-width: 52rem;
}

.setup-task-dialog-shell {
    max-height: min(85vh, 52rem);
    overflow: auto;
}

@media (max-width: 1199.98px) {
    .helper-event-sidebar {
        position: static;
    }

    .helper-event-header-meta-wrap {
        max-width: none;
    }
}

.helper-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.helper-meta {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.35;
}

.helper-note {
    margin-top: 4px;
}

.helper-note summary {
    font-size: 0.75rem;
    color: #0d6efd;
    cursor: pointer;
    user-select: none;
}

.helper-note-text {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #495057;
    line-height: 1.3;
}

.shift-head {
    background: #f8fafc !important;
    text-align: center;
    min-width: 140px;
}

.shift-time {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1f2937;
}

.shift-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #6b7280;
}

.shift-open {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
}

.shift-full {
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d;
}

.shift-head.shift-partial {
    background: linear-gradient(180deg, #fff8e8 0%, #ffefc7 100%) !important;
    border-color: #facc15 !important;
}

.shift-head.shift-empty {
    background: linear-gradient(180deg, #fff1f3 0%, #ffd8df 100%) !important;
    border-color: #f1aeb5 !important;
}

.shift-head.shift-full-state {
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%) !important;
    border-color: #d3dde8 !important;
}

/* =========================================================
   Matrix cell layout
   - keeps status and action visually grouped inside a cell
   ========================================================= */

.shift-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 70px;
    padding: 6px;
    border-radius: 6px;
}

.shift-status {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.shift-action {
    margin-top: auto;
}

.shift-action .btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 2px 8px;
}

/* =========================================================
   Trade detail
   - compact structure editing for trades, stations and shifts
   ========================================================= */

.trade-detail-savebar {
    position: sticky;
    top: 12px;
    z-index: 20;
    border-color: #d9e3ec;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.trade-detail-panel {
    padding: 0;
    overflow: hidden;
}

.trade-detail-panel-compact .trade-detail-panel-body {
    padding: 12px 14px;
}

.trade-detail-panel-header {
    padding: 12px 14px;
    border-bottom: 1px solid #e8edf2;
    background: linear-gradient(180deg, #fafbfd 0%, #f4f7fa 100%);
}

.trade-detail-panel-body {
    padding: 14px;
}

.trade-detail-leader-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-detail-leader-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    background: #fbfcfd;
}

.trade-detail-stations {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
}

/* =========================================================
   Dashboard configuration
   - compact in-app maintenance views for blocks, widgets and hints
   ========================================================= */

.dashboard-config-entry-card {
    padding: 16px;
}

.dashboard-config-note {
    padding: 10px 12px;
    border: 1px solid #d9e3ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #4b5563;
    font-size: 0.92rem;
}

.dashboard-config-tabs .btn {
    min-width: 104px;
}

.dashboard-config-targets {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin-top: 2px;
}

.dashboard-config-targets-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 4px;
}

.dashboard-config-target-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-main .card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.app-main .card + .card {
    margin-top: 1rem;
}

.app-main .card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.app-main .clickable-card {
    cursor: pointer;
}

.app-main .clickable-card:hover {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.app-main .clickable-card:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.app-main .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 0;
    background: transparent;
    border-bottom: 0;
}

.app-main .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.78rem;
    color: #6b7280;
}

.app-main .card-body {
    padding: 14px 16px 16px;
}

.block {
    margin-bottom: 1.5rem;
}

.block-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.card-grid {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.dashboard-widget-description {
    color: #4b5563;
    line-height: 1.5;
}

.dashboard-widget-description-build-phase {
    white-space: nowrap;
    line-height: 1.35;
}

.dashboard-widget-card {
    border: 1px solid #e5e7eb;
    height: 100%;
}

.dashboard-widget-card-body {
    padding: 16px;
    min-height: 100%;
}

.dashboard-card-button {
    width: 100%;
    font-weight: 500;
    opacity: 0.94;
    margin-top: auto;
}

.alert {
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 500;
}

.dashboard-config-target-note {
    flex-basis: 100%;
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.4;
}

.dashboard-config-list-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.dashboard-config-list-main {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-config-list-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0;
}

.dashboard-config-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.dashboard-config-meta-item {
    font-size: 0.78rem;
    color: #6b7280;
}

.dashboard-config-key-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.dashboard-config-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dashboard-config-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
}

.dashboard-config-badge.is-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.dashboard-config-badge.is-muted {
    background: #f3f4f6;
    color: #6b7280;
}

.dashboard-config-block-section {
    padding: 14px;
    background: linear-gradient(180deg, #fafbfd 0%, #f5f7fa 100%);
    border-color: #dbe3ea;
}

.block-container {
    background: #f9fafb;
    padding: 12px;
    border-radius: 10px;
}

.dashboard-config-block-header {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-config-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.dashboard-config-widget-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-config-entity-card,
.dashboard-config-widget-card {
    overflow: hidden;
}

.dashboard-config-widget-card {
    padding: 0;
    background: #ffffff;
    border-color: #e5e7eb;
}

.dashboard-config-entity-card {
    padding: 0;
}

.dashboard-config-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.dashboard-config-widget-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-config-widget-badge-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.dashboard-config-badge-label {
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dashboard-config-widget-badges {
    justify-content: flex-end;
    flex: 0 0 auto;
}

.dashboard-config-description {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 0.84rem;
    line-height: 1.45;
}

.dashboard-config-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-config-inline-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-config-inline-field {
    max-width: 240px;
}

.dashboard-config-widget-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
    gap: 12px;
}

.dashboard-config-widget-preview-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.dashboard-config-widget-preview-card .dashboard-config-section {
    margin-top: 0;
}

.dashboard-config-section {
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.dashboard-config-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.dashboard-config-section-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.dashboard-config-order-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 8px;
}

.dashboard-config-order-grid-primary {
    grid-template-columns: minmax(140px, 220px);
}

.dashboard-config-order-grid-stacked {
    grid-template-columns: minmax(220px, 360px);
}

.dashboard-config-hint-threshold-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 10px;
}

.dashboard-config-order-note {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.dashboard-config-order-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.dashboard-config-order-group-title-secondary {
    margin-top: 4px;
    color: #4b5563;
}

.dashboard-config-advanced-panel {
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.dashboard-config-advanced-summary {
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 700;
    color: #374151;
    list-style: none;
}

.dashboard-config-advanced-summary::-webkit-details-marker {
    display: none;
}

.dashboard-config-order-cell {
    min-width: 0;
}

.dashboard-config-order-label {
    color: #6b7280;
}

.dashboard-config-order-label-primary {
    color: #1f2937;
    font-weight: 700;
}

.dashboard-config-order-input {
    border-color: #dbe3ea;
}

.dashboard-config-order-input::placeholder {
    color: #9ca3af;
}

.dashboard-config-order-input-primary {
    border-color: #93c5fd;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.dashboard-config-threshold-panel {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fbfcfd;
}

.dashboard-config-threshold-panel.is-disabled {
    background: #f8fafc;
    color: #6b7280;
}

.dashboard-config-threshold-header {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.dashboard-config-threshold-help {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 8px;
}

.dashboard-config-list-actions {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
}

.dashboard-config-move-buttons {
    display: inline-flex;
    gap: 6px;
}

.dashboard-config-card-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.dashboard-config-move-button {
    min-width: 78px;
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    opacity: 0.9;
}

.dashboard-config-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-config-group-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.86rem;
    color: #374151;
    cursor: pointer;
}

.dashboard-config-group-option input {
    margin: 0;
}

.dashboard-config-target-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.86rem;
    color: #374151;
    cursor: pointer;
}

.dashboard-config-target-option.is-all-option {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.dashboard-config-target-option.for-all {
    font-weight: 600;
    margin-bottom: 4px;
}

.dashboard-config-target-option.is-all-option input:checked + span {
    color: #1d4ed8;
}

.dashboard-config-target-option input {
    margin: 0;
}

.dashboard-config-target-hint {
    flex-basis: 100%;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
}

.dashboard-config-tabs-bar {
    justify-content: space-between;
}

.dashboard-config-backlink {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .dashboard-config-list-row {
        flex-direction: column;
    }

    .dashboard-config-list-actions {
        align-self: flex-end;
    }

    .dashboard-config-order-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .dashboard-config-order-grid-stacked {
        grid-template-columns: 1fr;
    }

    .dashboard-config-hint-threshold-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .dashboard-config-widget-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-config-widget-badge-group {
        align-items: flex-start;
    }

    .dashboard-config-card-actions {
        justify-content: flex-start;
    }

    .dashboard-config-widget-badges {
        justify-content: flex-start;
    }
}

.trade-detail-station-card {
    border: 1px solid #dbe4ec;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.trade-detail-station-card + .trade-detail-station-card {
    margin-top: 1rem;
}

.trade-detail-station-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #e8edf2;
    background: linear-gradient(180deg, #f8fbfe 0%, #edf4f9 100%);
}

.trade-detail-station-title {
    flex: 1 1 auto;
}

.trade-detail-station-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.45rem;
}

.trade-detail-station-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trade-detail-station-heading {
    flex: 1 1 280px;
}

.trade-detail-station-name-input {
    font-weight: 600;
}

.trade-detail-station-context {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #d7e2ec;
    font-size: 0.82rem;
    color: #475569;
}

.trade-detail-station-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.45rem;
    min-height: 1.15rem;
}

.trade-detail-station-status {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.trade-detail-station-status.is-saving {
    color: #7c3aed;
}

.trade-detail-station-status.is-saved {
    color: #15803d;
}

.trade-detail-station-status.is-error {
    color: #b91c1c;
}

.trade-detail-station-field-error {
    margin-left: auto;
}

.trade-detail-station-delete {
    flex: 0 0 auto;
    padding-top: 22px;
}

.trade-detail-station-actions {
    display: flex;
    align-items: start;
    gap: 8px;
    padding-top: 22px;
}

.trade-detail-station-actions .trade-detail-station-delete {
    padding-top: 0;
}

.trade-detail-station-meta,
.trade-detail-shifts,
.trade-detail-new-shift,
.trade-detail-shift-batch {
    padding: 14px;
}

.trade-detail-station-meta {
    padding-bottom: 10px;
}

.trade-detail-shifts {
    padding-top: 8px;
}

.trade-detail-shift-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.trade-detail-shift-day-group {
    border: 1px solid #e7edf3;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.trade-detail-shift-day-head {
    padding: 0.7rem 0.9rem;
    background: #f6f9fc;
    border-bottom: 1px solid #e7edf3;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.trade-detail-shift-list {
    display: flex;
    flex-direction: column;
}

.trade-detail-shift-item + .trade-detail-shift-item {
    border-top: 1px solid #eef2f6;
}

.trade-detail-shift-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    cursor: pointer;
}

.trade-detail-shift-summary::-webkit-details-marker {
    display: none;
}

.trade-detail-shift-summary-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.trade-detail-shift-time {
    font-weight: 700;
    color: #1f2937;
}

.trade-detail-shift-required {
    font-size: 0.88rem;
    color: #64748b;
}

.trade-detail-shift-summary-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.trade-detail-shift-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #475569;
    font-size: 0.95rem;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.trade-detail-shift-item[open] .trade-detail-shift-toggle {
    transform: rotate(180deg);
    background: #dce9f7;
}

.trade-detail-shift-edit-panel {
    padding: 0 0.9rem 0.9rem;
    border-top: 1px solid #eef2f6;
    background: #fbfdff;
    margin-left: 0.9rem;
    margin-right: 0.9rem;
    margin-bottom: 0.9rem;
    border-radius: 10px;
}

.trade-detail-shift-edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.trade-detail-new-shift {
    border-top: 1px solid #e8edf2;
    background: #fbfcfd;
}

.trade-detail-shift-batch {
    border-top: 1px solid #e8edf2;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
}

.trade-detail-new-shift-secondary {
    background: #fcfdff;
}

.trade-detail-form-panel {
    margin-top: 0.85rem;
    padding: 0;
    border: 1px solid #d9e4ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.trade-detail-form-panel-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    font-weight: 700;
    color: #334155;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.trade-detail-form-panel-summary::after {
    content: "Aufklappen";
    flex: 0 0 auto;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 700;
}

.trade-detail-form-panel[open] > .trade-detail-form-panel-summary {
    border-bottom: 1px solid #d9e4ef;
}

.trade-detail-form-panel[open] > .trade-detail-form-panel-summary::after {
    content: "Geöffnet";
    background: #dbeafe;
    color: #1d4ed8;
}

.trade-detail-form-panel-summary::-webkit-details-marker {
    display: none;
}

.trade-detail-form-panel-body {
    padding: 1rem 1.1rem 1.1rem;
    background: #ffffff;
}

.trade-detail-shift-batch.trade-detail-form-panel {
    border-left: 4px solid #3b82f6;
}

.trade-detail-new-shift.trade-detail-form-panel {
    border-left: 4px solid #64748b;
}

.trade-detail-new-stations {
    margin: 0 14px 14px;
    padding-top: 14px;
    border-top: 1px solid #e8edf2;
}

.trade-detail-shift-table th,
.trade-detail-shift-table td {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    vertical-align: middle;
}

.trade-detail-shift-table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
}

.trade-detail-shift-table .form-control,
.trade-detail-shift-table .form-select {
    min-width: 0;
}

.trade-detail-new-shift-table {
    background: #ffffff;
    border: 1px dashed #dbe4ec;
    border-radius: 10px;
}

.trade-detail-station-active-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
}

.trade-detail-station-active-field {
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0;
    width: 100%;
}

.trade-detail-station-active-field .form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    margin-bottom: 0;
}

.trade-detail-station-active-field .form-check-input {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.trade-detail-shift-batch .trade-detail-new-shift-table {
    border-style: solid;
    border-color: #d5e2ef;
}

@media (max-width: 991.98px) {
    .trade-detail-station-actions {
        padding-top: 0;
    }

    .trade-detail-shift-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .trade-detail-shift-summary-actions {
        width: 100%;
        justify-content: space-between;
    }

    .trade-detail-shift-edit-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.form-label-sm {
    margin-bottom: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #6b7280;
}

.trade-helper-bulk-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d7e3ef;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
}

.trade-helper-filter-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    padding: 12px 14px;
}

.trade-helper-filter-form {
    margin: 0;
}

.trade-helper-filter-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 38px;
    justify-content: center;
}

.trade-helper-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trade-helper-sort-link:hover {
    text-decoration: underline;
}

.trade-helper-scope-details summary,
.trade-helper-filter-panel summary {
    cursor: pointer;
    list-style: none;
}

.trade-helper-scope-details summary::-webkit-details-marker,
.trade-helper-filter-panel summary::-webkit-details-marker {
    display: none;
}

.trade-helper-scope-details summary.btn {
    width: 100%;
    text-align: left;
}

.trade-helper-bulk-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.trade-helper-day-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trade-helper-day-stat {
    min-width: 72px;
    text-align: right;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.trade-helper-day-stat:hover {
    background: #f8fafc;
    border-color: #dbe3ea;
    transform: translateY(-1px);
}

.trade-helper-day-stat.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.trade-helper-day-stat .status-badge {
    margin-right: 0;
}

.trade-helper-assigned-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-helper-assigned-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    background: #fbfcfd;
}

.trade-helper-assigned-panel {
    background: linear-gradient(180deg, #fbfcfd 0%, #f6f8fb 100%);
}

.trade-helper-assigned-main {
    min-width: 0;
}

.trade-helper-assigned-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trade-helper-assigned-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-helper-assigned-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.trade-helper-assigned-form .form-select {
    min-width: 0;
    flex: 1 1 0;
}

.trade-helper-assigned-form .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.trade-helper-inline-assign-form {
    margin: 0;
}

.trade-helper-action-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.trade-helper-inline-assign-form--day {
    flex: 1 1 220px;
}

.trade-helper-day-assign-group {
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.trade-helper-day-assign-group .form-select {
    min-height: calc(1.5em + 0.5rem + 2px);
    flex: 1 1 160px;
}

.trade-helper-assigned-table td:last-child .trade-helper-assigned-form .form-select {
    flex-basis: 110px;
}

.trade-helper-candidate-table th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
}

.trade-helper-assigned-table th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
}

.trade-helper-assigned-table {
    table-layout: fixed;
}

.trade-helper-assigned-table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-color: #edf0f3;
}

.trade-helper-candidate-table td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.trade-helper-candidate-table tbody tr:hover > td {
    background: #fbfcfe;
}

.helper-candidate-row-conflict > td {
    background: #fff7f7;
}

.trade-helper-assigned-table tbody tr:hover > td {
    background: #fbfcfe;
}

.trade-helper-col-person,
.trade-helper-col-current {
    padding-right: 1rem;
}

.trade-helper-col-edit,
.trade-helper-col-remove {
    padding-left: 0.5rem;
}

.trade-helper-person {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-helper-person-name {
    font-weight: 600;
    color: #1f2937;
}

.trade-helper-assignment-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
}

.trade-helper-conflict-badge {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

.trade-helper-action-btn {
    min-width: 96px;
    padding-inline: 0.8rem;
    min-height: calc(1.5em + 0.5rem + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.trade-helper-remove-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trade-helper-empty-state {
    font-size: 0.82rem;
    color: #6b7280;
}

.trade-helper-remove-link {
    padding: 0;
    font-size: 0.82rem;
    text-decoration: none;
    align-self: flex-end;
}

.trade-helper-remove-link:hover,
.trade-helper-remove-link:focus {
    text-decoration: underline;
}

.group-permission-matrix-wrapper {
    max-height: 70vh;
    overflow: auto;
}

.group-permission-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8f9fa;
    box-shadow: inset 0 -1px 0 #dfe5eb;
}

.group-permission-matrix .group-permission-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: inset -1px 0 0 #e5e7eb;
}

.group-permission-matrix thead .group-permission-sticky-col {
    z-index: 4;
    background: #f8f9fa;
}

.group-permission-group-head {
    vertical-align: top;
}

.group-permission-section-head {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #e9ecef !important;
}

.group-permission-section-toggle {
    color: #212529;
    font-weight: 600;
}

.group-permission-section-toggle:hover,
.group-permission-section-toggle:focus {
    color: #0d6efd;
}

.group-permission-section-icon {
    display: inline-block;
    width: 1rem;
}

.helper-candidate-row {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.helper-candidate-row-selected > td {
    background: #f4f8ff !important;
    box-shadow: inset 0 1px 0 rgba(13, 110, 253, 0.08), inset 0 -1px 0 rgba(13, 110, 253, 0.08);
}

/* =========================================================
   Trade day scheduler
   - final station-based scheduler layout with shared time axis
   ========================================================= */

.scheduler-scroll {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.scheduler-matrix-card {
    padding: 0;
    overflow: visible;
}

.scheduler-board {
    width: max-content;
    min-width: calc(240px + var(--scheduler-width, 1200px));
}

.scheduler-axis-row,
.scheduler-station-header,
.scheduler-row {
    display: grid;
    grid-template-columns: 240px var(--scheduler-width, 1200px);
    align-items: stretch;
}

.scheduler-axis-row {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #ffffff;
    margin-bottom: 4px;
}

.scheduler-stations {
    display: flex;
    flex-direction: column;
}

.scheduler-station + .scheduler-station {
    border-top: 1px solid #d7e0e8;
    margin-top: 14px;
}

.scheduler-station {
    background: linear-gradient(180deg, #fcfdff 0%, #f5f9fc 100%);
    border-radius: 10px;
    border: 1px solid #dbe4ec;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    overflow: visible;
}

.scheduler-helper-head,
.scheduler-station-label,
.scheduler-helper {
    position: sticky !important;
    left: 0;
    inset-inline-start: 0;
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    box-sizing: border-box;
    z-index: 12;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
}

.scheduler-helper-head {
    display: flex;
    align-items: end;
    min-height: 44px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #495057;
}

.scheduler-axis {
    position: relative;
    width: var(--scheduler-width, 1200px);
    min-width: var(--scheduler-width, 1200px);
    height: 38px;
    border-bottom: 1px solid #e5e7eb;
    background:
        linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    overflow: hidden;
}

.scheduler-station-header {
    background: linear-gradient(180deg, #eef4fa 0%, #e6eef6 100%);
    box-shadow: inset 0 -1px 0 #d9e3ec;
}

.scheduler-station-label {
    padding: 8px 12px;
    border-top: 1px solid #e5ebf1;
}

.scheduler-station-summary {
    margin-top: 4px;
    color: #6b7280;
    font-weight: 600;
}

.scheduler-station-header-lane {
    position: relative;
    width: var(--scheduler-width, 1200px);
    min-width: var(--scheduler-width, 1200px);
    min-height: 56px;
    border-top: 1px solid #e5ebf1;
    background: linear-gradient(180deg, #f9fbfe 0%, #f2f6fa 100%);
    overflow: hidden;
}

.scheduler-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px solid #edf0f2;
}

.scheduler-tick span {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.68rem;
    color: #9ca3af;
    white-space: nowrap;
}

.scheduler-station-body {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.scheduler-row {
    position: relative;
    height: 164px;
    min-height: 164px;
    max-height: 164px;
    overflow: visible;
}

.scheduler-row + .scheduler-row {
    border-top: 1px solid #edf0f2;
}

.scheduler-helper {
    height: 164px !important;
    min-height: 164px !important;
    max-height: 164px !important;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: visible;
    align-self: stretch;
    z-index: 14;
    box-shadow: 6px 0 8px -8px rgba(15, 23, 42, 0.18);
}

.scheduler-helper-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2px;
    gap: 4px;
    overflow: hidden;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.scheduler-lane {
    position: relative;
    width: var(--scheduler-width, 1200px);
    min-width: var(--scheduler-width, 1200px);
    height: 164px !important;
    min-height: 164px !important;
    max-height: 164px !important;
    background: #fbfcfd;
    overflow: hidden;
    align-self: stretch;
}

.scheduler-lane-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed #eef2f5;
    pointer-events: none;
}

.scheduler-shift {
    position: absolute;
    top: 10px;
    height: 140px;
    max-height: 140px;
}

.scheduler-shift-head-wrap {
    position: absolute;
    top: 4px;
    bottom: 4px;
}

.scheduler-shift-head-wrap .shift-head {
    height: 100%;
    min-width: 0;
    border: 1px solid #d3dde8;
    border-radius: 8px;
    padding: 4px 8px;
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.scheduler-shift .shift-cell {
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    padding: 6px 6px 5px;
    gap: 3px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.scheduler-shift .shift-status {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
    margin-bottom: 2px;
    overflow: hidden;
}

.scheduler-shift .shift-action {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-top: 2px;
}

.scheduler-shift .shift-action form {
    display: inline-flex;
}

.scheduler-shift .shift-action .btn {
    width: auto;
    min-width: 86px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
    padding: 2px 10px;
    border-radius: 999px;
}

.scheduler-shift .shift-action .text-danger,
.scheduler-shift .shift-action .text-muted {
    font-size: 0.72rem;
    text-align: center;
}

.shift-detail-notes {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    min-height: 18px;
}

.shift-detail-note {
    font-size: 0.66rem;
    line-height: 1.15;
    color: #667085;
    text-align: center;
}

.scheduler-shift .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    padding: 0.18rem 0.4rem;
    margin-right: 0;
    margin-bottom: 0;
    white-space: nowrap;
    text-align: center;
}

.scheduler-row .helper-meta,
.scheduler-row .helper-note,
.scheduler-row .helper-note summary,
.scheduler-row .helper-note-text {
    font-size: 0.66rem;
    line-height: 1.15;
}

.helper-meta-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.helper-band-hints {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}

.helper-band-hint {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.helper-band-hint-name {
    font-weight: 600;
    color: #475467;
}

.helper-band-hint-priority {
    color: #667085;
}

.scheduler-row .helper-note {
    margin-top: 0;
    flex: 0 0 auto;
    position: relative;
}

.scheduler-helper-panel .helper-note summary {
    display: list-item;
    list-style-position: inside;
    cursor: pointer;
    margin-top: 1px;
}

.scheduler-helper-panel .helper-note[open] {
    display: block;
}

.scheduler-helper-panel .helper-note summary {
    color: #475467;
}

.scheduler-helper-panel .helper-note[open] .helper-note-text {
    position: static;
    margin-top: 4px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
    white-space: normal;
    text-overflow: clip;
    max-height: 92px;
    overflow-y: auto;
    color: #4b5563;
}

.helper-note-section + .helper-note-section {
    margin-top: 6px;
}

.helper-note-title {
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
}

.scheduler-row .helper-name {
    font-size: 0.88rem;
    line-height: 1.1;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduler-helper-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduler-helper-link:hover,
.scheduler-helper-link:focus-visible {
    color: #0d6efd;
    text-decoration: underline;
}

.scheduler-row .helper-meta {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.1;
}

.helper-note-minor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fff1f2;
    color: #b42318;
    font-weight: 700;
    text-align: center;
}

.scheduler-row .helper-note-compact {
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduler-shift .shift-time {
    font-size: 0.72rem;
    line-height: 1.1;
}

.scheduler-shift .shift-meta {
    font-size: 0.72rem;
    line-height: 1.05;
    text-align: center;
}

.shift-note {
    margin-top: 4px;
    font-size: 0.66rem;
    line-height: 1.15;
    color: #667085;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduler-shift .d-flex.flex-column {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.scheduler-shift .fw-semibold.small {
    margin-bottom: 0;
    line-height: 1.05;
    font-size: 0.76rem !important;
}

/* =========================================================
   Cell background states
   - light tint behind the content based on warning severity
   ========================================================= */

.cell-ok {
    background-color: #f8fcf9;
}

.cell-assigned {
    background-color: #f4f8ff;
}

.cell-warning {
    background-color: #fffaf0;
}

.cell-availability {
    background-color: #fff4ec;
}

.cell-critical {
    background: linear-gradient(180deg, #fff1f3 0%, #ffe1e7 100%);
    box-shadow: inset 0 0 0 1px rgba(190, 24, 93, 0.12);
}

/* =========================================================
   Status badges
   - custom badges to visually separate informational vs. critical states
   ========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.45rem;
    border-radius: 999px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    text-align: center;
    border: 1px solid transparent;
}

.status-assigned {
    background-color: #cfe2ff;
    color: #084298;
    border-color: #9ec5fe;
}

.status-ok {
    background-color: #e2f5e9;
    color: #146c43;
    border-color: #b7dfc8;
    opacity: 0.85;
}

.status-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-color: #ffe69c;
}

.status-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
    font-size: 0.62rem;
    padding: 0.14rem 0.34rem;
    opacity: 0.9;
}

.status-availability {
    background-color: #ffe5d0;
    color: #8a3d00;
    border-color: #ffbe8a;
}

.status-critical {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f1aeb5;
}

/* =========================================================
   Optional generic table stability
   - kept lightweight for future reuse
   ========================================================= */

.table-planning {
    table-layout: fixed;
}

.table-planning td,
.table-planning th {
    vertical-align: top;
}

.shiftplan-compact-card .scheduler-station-header-lane {
    min-height: 196px;
    background: linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%);
}

.shiftplan-compact-card .scheduler-shift-head-wrap {
    top: 12px;
    bottom: 12px;
}

.shiftplan-compact-wrap .shift-head {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.shiftplan-compact-helper-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.shiftplan-compact-helper {
    font-size: 0.78rem;
    line-height: 1.3;
    color: #475467;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shiftplan-compact-empty {
    font-size: 0.76rem;
    line-height: 1.2;
    color: #667085;
    opacity: 0.85;
}

.shiftplan-day-row {
    margin-bottom: 0;
}

.shiftplan-day-head {
    min-height: 32px;
    align-items: center;
    font-size: 0.76rem;
    color: #6b7280;
    background: #f8fafc;
}

.shiftplan-day-axis {
    position: relative;
    width: var(--scheduler-width, 1200px);
    min-width: var(--scheduler-width, 1200px);
    min-height: 32px;
    border-bottom: 1px solid #d8dee6;
    background: #f8fafc;
    overflow: hidden;
}

.shiftplan-day-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-left: 2px solid #c7d2df;
    background: rgba(255, 255, 255, 0.45);
}

.shiftplan-day-segment:first-child {
    border-left: 0;
}

.shiftplan-day-segment span {
    font-size: 0.74rem;
    font-weight: 700;
    color: #475467;
    white-space: nowrap;
}

.shiftplan-day-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid #cbd5e1;
    pointer-events: none;
}

.helper-event-availability-block {
    border: 1px solid #d8e1ec;
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fafc;
}

.setup-helper-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setup-helper-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f4f7fb;
    color: #334155;
    border: 1px solid #dde5ee;
    font-size: 0.85rem;
    line-height: 1.2;
}

.setup-day-summary-card {
    height: 100%;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.setup-day-summary-link {
    display: block;
}

.setup-day-summary-card-clickable {
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.setup-day-summary-link:hover .setup-day-summary-card-clickable,
.setup-day-summary-link:focus-visible .setup-day-summary-card-clickable {
    transform: translateY(-1px);
    border-color: #cbd8e6;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.setup-task-create-advanced {
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.setup-task-create-advanced-title {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.65rem;
}

.setup-day-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    align-items: start;
}

.setup-day-filter-form .form-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #667085;
}

.setup-day-filter-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.625rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #ffffff;
}

.setup-day-filter-check .form-check-input {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    flex: 0 0 auto;
}

.setup-day-filter-check .form-check-label {
    color: #344054;
}

.setup-done-toggle {
    white-space: nowrap;
}

.setup-done-count,
.setup-day-column-count {
    color: #667085;
}

.setup-day-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.setup-day-column-droppable {
    position: relative;
}

.setup-day-column-drag-over {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
    background-color: #f8fbff;
}

.setup-day-column-title {
    font-size: 1rem;
    font-weight: 700;
    color: #223048;
}

.setup-day-column-subtitle {
    margin-top: -8px;
    font-size: 0.82rem;
    color: #667085;
}

.setup-day-column-collapsed-note {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px dashed #dbe3ec;
    background: #f8fafc;
    font-size: 0.88rem;
    color: #5b6472;
}

.setup-day-column-collapsed-note a {
    font-weight: 600;
}

.setup-task-card {
    --setup-area-color: #94a3b8;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--setup-area-color) 28%, #d8e1ea);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--setup-area-color) 16%, #ffffff) 0%,
            color-mix(in srgb, var(--setup-area-color) 9%, #ffffff) 100%
        );
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.setup-task-card + .setup-task-card {
    margin-top: 10px;
}

.setup-task-card-interactive:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--setup-area-color) 44%, #cbdcf6);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.setup-task-card-dragging {
    opacity: 0.55;
    transform: rotate(-1deg);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
}

.setup-task-card-active {
    border-color: color-mix(in srgb, var(--setup-area-color) 30%, #93c5fd);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--setup-area-color) 14%, #f8fbff) 0%,
            color-mix(in srgb, var(--setup-area-color) 10%, #eef5ff) 100%
        );
    box-shadow: 0 10px 22px rgba(31, 92, 187, 0.08);
}

.setup-task-card-done {
    border-color: color-mix(in srgb, var(--setup-area-color) 18%, #d9e6db);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--setup-area-color) 8%, #fafdfb) 0%,
            color-mix(in srgb, var(--setup-area-color) 6%, #f3f8f3) 100%
        );
    box-shadow: 0 8px 18px rgba(15, 81, 50, 0.06);
}

.setup-task-card-monitor {
    padding: 16px 18px;
    border-radius: 18px;
}

.setup-task-card-summary {
    min-width: 0;
}

.setup-task-card-summary-clickable {
    cursor: pointer;
}

.setup-task-card-summary-clickable:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 10px;
}

.setup-task-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.setup-task-card-contact {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setup-task-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.setup-task-status-in_progress {
    color: #0c63e7;
}

.setup-task-status-done {
    color: #0f5132;
}

.setup-task-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
}

.setup-task-card-compact-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.76rem;
    color: #344054;
}

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

.setup-task-flag {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #526174;
    font-size: 0.69rem;
    font-weight: 600;
}

.setup-task-flag-icon {
    min-width: 2rem;
    justify-content: center;
    padding-inline: 0.4rem;
    font-size: 0.95rem;
}

.setup-task-detail-dialog {
    max-width: 40rem;
}

.setup-task-detail-dialog-shell {
    max-height: min(82vh, 42rem);
    overflow: auto;
}

.setup-task-detail-dialog-body {
    display: grid;
    gap: 0.9rem;
}

.setup-task-detail-topline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.setup-task-area-badge {
    --setup-area-color: #577590;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--setup-area-color) 14%, white);
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid color-mix(in srgb, var(--setup-area-color) 30%, white);
}

.setup-task-detail-section {
    display: grid;
    gap: 6px;
}

.setup-task-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.setup-task-detail-text {
    color: #1f2937;
    line-height: 1.5;
}

.setup-task-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e6ecf2;
}

.setup-task-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setup-task-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.setup-task-inline-form .btn {
    min-height: 34px;
}

.setup-task-inline-form .form-select {
    min-height: 34px;
}

.setup-task-move-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setup-area-color-preview {
    --setup-area-color: #577590;
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--setup-area-color);
    border: 1px solid rgba(15, 23, 42, 0.15);
}


.setup-day-board-monitor {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.setup-day-column-monitor {
    min-height: 300px;
}

.setup-monitor-header .ui-page-title {
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.setup-monitor-summary {
    border-width: 2px;
}

.setup-day-board-monitor .setup-task-actions,
.setup-day-board-monitor .setup-task-status-badge {
    display: none;
}

.setup-day-board-monitor .setup-task-card {
    min-height: 132px;
}

.setup-day-board-monitor .setup-task-card-compact-meta {
    gap: 6px;
    font-size: 0.88rem;
}

.setup-day-board-monitor .setup-task-area-badge {
    font-size: 0.78rem;
}

.dashboard-widget-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-widget-stat {
    min-width: 76px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f4f7fb;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-widget-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.dashboard-widget-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #667085;
}

.dashboard-widget-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-widget-task {
    padding: 8px 10px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #dbe4ef;
}

.dashboard-widget-task-active {
    background: #e8f1ff;
    border-color: #c8dafd;
}

.dashboard-widget-task-critical {
    background: #fff1f0;
    border-color: #f4c7c3;
}

.dashboard-widget-task-title {
    font-size: 0.83rem;
    font-weight: 700;
    color: #1f2937;
}

.dashboard-widget-task-meta {
    font-size: 0.74rem;
    color: #667085;
}

.helper-checkin-row {
    cursor: pointer;
}

.helper-checkin-row td {
    vertical-align: middle;
}

.helper-checkin-summary-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #dbe3ec;
    background: #f8fbff;
}

.helper-checkin-summary-card-critical {
    border-color: #fde68a;
    background: #fff9e8;
}

.helper-checkin-summary-label {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #64748b;
}

.helper-checkin-summary-value {
    font-size: 1.2rem;
    line-height: 1;
    color: #111827;
}

.helper-checkin-row.is-checked-in {
    background: #eef9f0;
}

.helper-checkin-toggle-cell {
    text-align: center;
    vertical-align: middle;
}

.helper-checkin-toggle-cell form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
}

.helper-checkin-toggle-cell .form-check-input {
    margin: 0;
}

.event-dashboard-action-card {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.event-dashboard-action-card-primary {
    border-color: #cfe0ff;
    background: linear-gradient(180deg, #f7fbff 0%, #eff6ff 100%);
}

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

.event-dashboard-secondary-slot {
    min-width: 0;
}

.event-dashboard-action-placeholder {
    min-height: 4.25rem;
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .event-dashboard-secondary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .event-dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .setup-day-board {
        grid-template-columns: 1fr;
    }

    .setup-day-filter-check {
        min-height: auto;
        padding-inline: 0.75rem;
    }

    .setup-task-inline-form {
        align-items: stretch;
    }

    .setup-task-inline-form .btn,
    .setup-task-inline-form .form-select {
        width: 100%;
    }

    .setup-task-actions {
        gap: 8px;
    }
}
