@import url('./icons.css');

:root, [data-bs-theme=light] {
    --bs-primary: #008c70;
    --bs-primary-rgb: 0, 140, 112;
    --bs-blue: #008c70;
    --bs-link-color: #008c70;
    --bs-link-color-rgb: 0, 140, 112;
    --bs-link-hover-color: #006d57;
    --bs-link-hover-color-rgb: 0, 109, 87;
    --bs-primary-text-emphasis: #00382d;
    --bs-primary-bg-subtle: #cce8e3;
    --bs-primary-border-subtle: #99d1c6;
    --bs-focus-ring-color: rgba(0, 140, 112, 0.25);
}

html, body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.title.title-secondary {
    padding: 0.313rem 0 0;
    color: var(--bs-secondary-color);
}

.title-header-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 2.5rem;
}

.title-content-text {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.375rem;
}

.main-content {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.block-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    height: auto;
    max-width: 100%;
    width: 31.25rem;
}

.or {
    align-items: center;
    display: flex;
    flex-direction: row;
    padding: 0.3125rem 0;
}

.or .or-line {
    opacity: 0.2;
    width: 100%;
    border-bottom: 1px solid var(--bs-body-color);
}

.or .or-text {
    padding: 0 0.625rem 0 0.625rem;
    font-size: 0.75rem;
    line-height: 1.125rem;
    color: var(--bs-body-color);
    opacity: 0.7;
}

.links-container {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.links-container .dot {
    border-radius: 50%;
    height: 0.3125rem;
    margin: 0 0.1875rem;
    opacity: 0.7;
    width: 0.3125rem;
    background-color: var(--bs-body-color);
}

.manage-layout {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-message {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 0.625rem 1rem 0.625rem 1rem;
    position: relative;
    background-color: rgb(var(--bs-primary-rgb) / 0.15);
}

.info-message.info-panel {
    margin-bottom: 0.625rem;
}

.manage-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.large-input {
    font-size: 1.875rem;
    height: 4.3125rem;
}

.title-content-text-secondary {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
}

.confirm-button {
    margin-top: 0.3125rem;
}

.display-desktop {
    display: block;
}

.display-mobile {
    display: none;
}

.primary-btn {
    background-color: #008c70 !important;
    border-color: #008c70 !important;
    color: white;
    border-radius: 7px;
}

.primary-btn:disabled {
    background-color: #008c70 !important;
    border-color: #008c70 !important;
    color: white;
    opacity: 0.65;
    border-radius: 7px;
}

.primary-btn:hover {
    opacity: 0.85;
    color: white;
    border-radius: 7px;
}

.primary-btn-outline {
    border-color: #008c70;
    background-color: white;
    color: #008c70;
    border-radius: 7px;
}

.primary-btn-outline:hover {
    border-color: #008c70 !important;
    background-color: #008c70 !important;
    color: white;
    border-radius: 7px;
}

.success-btn {
    background-color: #008c70;
    color: white;
    border-radius: 7px;
    border-color: #008c70;
}

.success-btn:disabled {
    background-color: #008c70;
    opacity: 0.8;
    color: white;
    border-radius: 7px;
    border-color: transparent;
}

.success-btn:active {
    background-color: #008c70 !important;
    opacity: 0.8;
    color: white;
    border-radius: 7px;
    border-color: transparent;
}

.success-btn:hover {
    background-color: #008c70;
    opacity: 0.85;
    color: white;
    border-radius: 7px;
}

.warning-btn {
    background-color: #ffa800;
    color: white;
    border-radius: 7px;
}

.warning-btn:hover {
    background-color: #ffa800 !important;
    opacity: 0.85;
    color: white;
    border-radius: 7px;
}

.warning-btn-outline {
    border: 2px solid #ffd486;
    background-color: white;
    color: #ffa800;
    border-radius: 7px;
}

.warning-btn-outline:hover {
    border-color: #ffa800 !important;
    background-color: #ffa800 !important;
    color: white;
    border-radius: 7px;
}

/* ---- Reservation state buttons (calendar slot tiles) ---- */
.state-requested-btn,
.state-accepted-btn,
.state-ready-btn,
.state-completed-btn {
    border-radius: 7px;
    font-weight: 500;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.state-requested-btn {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.state-requested-btn:hover {
    background-color: #fde68a !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
}

.state-accepted-btn {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}
.state-accepted-btn:hover {
    background-color: #bfdbfe !important;
    border-color: #60a5fa !important;
    color: #1e3a8a !important;
}

.state-ready-btn {
    background-color: #ede9fe;
    border: 1px solid #c4b5fd;
    color: #5b21b6;
}
.state-ready-btn:hover {
    background-color: #ddd6fe !important;
    border-color: #a78bfa !important;
    color: #4c1d95 !important;
}

.state-completed-btn {
    background-color: #008c70;
    border: 1px solid #008c70;
    color: #fff;
}
.state-completed-btn:hover {
    background-color: #006d57 !important;
    border-color: #006d57 !important;
    color: #fff !important;
}

.state-requested-btn:disabled,
.state-accepted-btn:disabled,
.state-ready-btn:disabled,
.state-completed-btn:disabled {
    opacity: 0.7;
}

/* ---- Validation alert ---- */
.validation-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 14px 0;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    color: #7f1d1d;
    animation: validation-alert-in 0.18s ease-out;
}

@keyframes validation-alert-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.validation-alert__icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.validation-alert__icon {
    font-size: 22px !important;
    color: #dc2626;
}

.validation-alert__body {
    min-width: 0;
    flex: 1;
    text-align: left;
}

.validation-alert__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #991b1b;
    margin-bottom: 2px;
}

.validation-alert__single {
    font-size: 0.9rem;
    color: #7f1d1d;
}

.validation-alert__list {
    margin: 4px 0 0;
    padding-left: 20px;
    font-size: 0.9rem;
    color: #7f1d1d;
}

.validation-alert__list li {
    margin: 2px 0;
}

@media print {
    .validation-alert { display: none !important; }
}

/* ---- Success banner (floating toast) ---- */
.success-banner {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    z-index: 1080;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    min-width: 280px;
    max-width: min(560px, calc(100vw - 2rem));
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 12px;
    color: #14532d;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    animation: success-banner-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes success-banner-in {
    from { opacity: 0; transform: translate(-50%, -120%); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.success-banner__icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-banner__icon {
    font-size: 22px !important;
    color: #16a34a;
}

.success-banner__body {
    min-width: 0;
    flex: 1;
    text-align: left;
    font-size: 0.95rem;
}

@media print {
    .success-banner { display: none !important; }
}

/* ---- Cost panel ---- */
.cost-panel {
    padding: 16px 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
}

.cost-panel__table-wrap {
    overflow-x: auto;
}

/* Sub-event whose cost is already aggregated under a parent Cremation —
   visually de-emphasised so the office can't accidentally read the table
   as a billable amount. The aggregation banner above carries the message. */
.cost-panel__table-wrap--muted {
    opacity: 0.65;
    filter: grayscale(0.25);
}

.cost-panel__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.cost-panel__table thead th {
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cost-panel__table tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #1f2937;
    vertical-align: top;
}

.cost-panel__table tbody tr:last-child td { border-bottom: none; }

.cost-panel__price {
    font-weight: 600;
    color: var(--bs-primary);
    font-variant-numeric: tabular-nums;
}

.cost-panel__unavailable {
    color: #9aa0a6;
    font-style: italic;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .cost-panel__notes-col { display: none; }
}

@media print {
    .cost-panel {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .cost-panel__table thead th { color: #000 !important; }
}

@media (max-width: 768px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }
}

/* ---- Linked events panel ---- */
.linked-events-panel {
    width: 100%;
}

.linked-event-card {
    position: relative;
    display: flex;
    overflow: hidden;
    height: 100%;
    min-height: 140px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.linked-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 140, 112, 0.35);
}

.linked-event-card__accent {
    width: 5px;
    background: linear-gradient(180deg, var(--bs-primary), #00b38f);
    flex-shrink: 0;
}

.linked-event-card__body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.linked-event-card__body--empty {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.linked-event-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.linked-event-card__icon {
    font-size: 28px !important;
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    padding: 6px;
    border-radius: 10px;
}

.linked-event-card__icon--muted {
    color: #9aa0a6;
    background: #f4f4f4;
    font-size: 32px !important;
}

.linked-event-card__title {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.linked-event-card__title--muted {
    color: #6b7280;
    font-weight: 500;
}

.linked-event-card__meta {
    font-size: 0.85rem;
    color: #4b5563;
}

.linked-event-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.linked-event-card__chevron {
    color: #9aa0a6;
    font-size: 20px !important;
    transition: transform 0.15s ease, color 0.15s ease;
}

.linked-event-card:hover .linked-event-card__chevron {
    color: var(--bs-primary);
    transform: translateX(3px);
}

.linked-event-card--empty {
    background: transparent;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    min-height: 140px;
}

.linked-event-card--empty:hover {
    background: rgba(0, 140, 112, 0.04);
    border-color: var(--bs-primary);
    border-style: dashed;
}

.linked-event-card--empty:hover .linked-event-card__icon--muted {
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.linked-event-card__add-hint {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.linked-event-card--empty:hover .linked-event-card__add-hint {
    color: var(--bs-primary);
}

.linked-event-card--disabled,
.linked-event-card--disabled:hover {
    cursor: not-allowed;
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    transform: none;
    box-shadow: none;
}

.linked-event-card--disabled .linked-event-card__icon--muted {
    color: #c7c9cc;
    background: #f7f7f7;
}

/* ---- Linked cremation (reverse-side) card ---- */
.linked-cremation-card {
    position: relative;
    display: flex;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.linked-cremation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 140, 112, 0.35);
}

.linked-cremation-card__body {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.linked-cremation-card__main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.linked-cremation-card__icon-wrap {
    background: var(--bs-primary-bg-subtle);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.linked-cremation-card__icon {
    font-size: 32px !important;
    color: var(--bs-primary);
}

.linked-cremation-card__info {
    min-width: 0;
}

.linked-cremation-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bs-primary);
    line-height: 1.2;
}

.linked-cremation-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-top: 2px;
}

.linked-cremation-card__sub {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 2px;
}

.linked-cremation-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.linked-cremation-card__date {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.linked-cremation-card:hover .linked-event-card__chevron {
    color: var(--bs-primary);
    transform: translateX(3px);
}

/* ---- Event header ---- */
.event-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.06), rgba(0, 140, 112, 0.01));
    border: 1px solid rgba(0, 140, 112, 0.15);
    border-radius: 16px;
}

.event-header__icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bs-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 140, 112, 0.25);
}

.event-header__icon {
    font-size: 30px !important;
    color: #fff;
}

.event-header__body {
    min-width: 0;
}

.event-header__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.event-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.event-header__badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.event-header__date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 500;
}

.event-header__date-icon {
    font-size: 18px !important;
    color: var(--bs-primary);
}

.event-header__date-text {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
}

.event-header__date-sep {
    opacity: 0.5;
}

.event-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .event-header {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon body"
            "actions actions";
        gap: 12px;
        padding: 14px;
    }
    .event-header__icon-wrap { grid-area: icon; width: 48px; height: 48px; border-radius: 12px; }
    .event-header__icon { font-size: 26px !important; }
    .event-header__body { grid-area: body; }
    .event-header__actions { grid-area: actions; justify-content: stretch; flex-wrap: wrap; }
    .event-header__actions > * { flex: 1 1 auto; }
    .event-header__title { font-size: 1.25rem; }
}

/* ---- Event audit footer ---- */
.event-audit {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 16px 24px;
    align-items: center;
    padding: 12px 16px;
    margin: 12px 0 20px;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.015);
    color: #4b5563;
    font-size: 0.85rem;
}

.event-audit__id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    font-weight: 600;
    font-size: 0.8rem;
}

.event-audit__id-icon {
    font-size: 16px !important;
}

.event-audit__block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.event-audit__icon {
    font-size: 22px !important;
    color: #9aa0a6;
    flex-shrink: 0;
}

.event-audit__text {
    min-width: 0;
}

.event-audit__label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.event-audit__value {
    color: #1f2937;
    word-break: break-word;
}

@media (max-width: 768px) {
    .event-audit {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ---- Print / report view ---- */
@media print {
    html, body {
        overflow: visible !important;
        height: auto !important;
    }

    .event-header {
        background: #fff !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .event-header__icon-wrap {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        border: 1px solid #000;
    }
    .event-header__icon { color: #000 !important; }
    .event-header__actions { display: none !important; }

    .event-audit {
        background: #fff !important;
        border-color: #999 !important;
    }

    .linked-events-panel,
    .linked-event-card,
    .linked-cremation-card {
        break-inside: avoid;
        box-shadow: none !important;
    }
    .linked-event-card,
    .linked-cremation-card {
        border: 1px solid #000 !important;
        transform: none !important;
    }
    .linked-event-card__chevron { display: none !important; }

    /* Hide nav/save/delete buttons when printing */
    .btn,
    .primary-btn,
    .primary-btn-outline {
        display: none !important;
    }
}

/* ==================================================================
   Calendar week view
   ================================================================== */
.calendar {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 22px 24px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.calendar__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.calendar__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 140, 112, 0.2);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: calendar-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.calendar__spinner--lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.calendar__loading-center {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

@keyframes calendar-spin { to { transform: rotate(360deg); } }

.calendar__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar__week-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 991.98px) {
    .calendar__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Stacked variant: each day is a column filling the card width, slots stacked
   vertically inside the day. Used by Aufbahrungen for a room-occupancy view. */
.calendar--stacked .calendar__grid {
    grid-template-columns: unset;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 12px;
}

.calendar--stacked .calendar__periods {
    grid-template-columns: 1fr;
    gap: 6px;
}

.calendar--stacked .calendar__period {
    gap: 6px;
}

@media (max-width: 768px) {
    .calendar--stacked .calendar__grid {
        grid-auto-flow: row;
        grid-auto-columns: unset;
        grid-template-columns: 1fr;
    }
}

.calendar__day {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 14px 22px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .calendar__day { padding: 14px; }
}

.calendar__day:hover {
    border-color: rgba(0, 140, 112, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.calendar__day--today {
    border-color: rgba(0, 140, 112, 0.4);
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.05), rgba(0, 140, 112, 0.01));
}

.calendar__day--past .calendar__day-weekday,
.calendar__day--past .calendar__day-date {
    opacity: 0.55;
}

.calendar__day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar__day-weekday {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.calendar__day-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.calendar__day--today .calendar__day-date { color: var(--bs-primary); }

.calendar__periods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.calendar__periods--single { grid-template-columns: 1fr; }

.calendar__period { display: flex; flex-direction: column; gap: 6px; }

.calendar__period-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    margin-bottom: 2px;
}

/* ==================================================================
   Calendar slot button
   ================================================================== */
.slot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: transform 0.1s ease, box-shadow 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.slot-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.slot-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.slot-btn--selected,
.slot-btn--selected:hover {
    box-shadow: 0 0 0 3px rgba(0, 140, 112, 0.35) !important;
    border-color: var(--bs-primary) !important;
}

/* align pre-existing state-* buttons with new radius */
.state-requested-btn,
.state-accepted-btn,
.state-ready-btn,
.state-completed-btn { border-radius: 8px; }

/* ==================================================================
   Slot flyout — booking hover popup on calendar views. Same design
   language as the Dashboard scheduler-tooltip-card so the two hover
   surfaces feel like one product.
   ================================================================== */

/* Strip DevExpress's default flyout chrome AND let the wrapper shrink to the
   card. Without `width: max-content` (or fit-content) the body keeps its
   original width and you end up with a transparent halo around the card. */
.slot-flyout--card,
.slot-flyout--card .dxbl-flyout-content,
.slot-flyout--card .dxbl-flyout-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: max-content !important;
    max-width: 340px !important;
    min-width: 0 !important;
}

.slot-flyout-card {
    --accent: #9ca3af;
    --accent-soft: rgba(156, 163, 175, 0.12);
    display: flex;
    min-width: 260px;
    max-width: 340px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-family: inherit;
}

.slot-flyout-card__accent {
    width: 5px;
    flex-shrink: 0;
    background: var(--accent);
}

.slot-flyout-card__body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.slot-flyout-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slot-flyout-card__icon {
    font-size: 20px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px;
    border-radius: 999px;
    line-height: 1;
}

.slot-flyout-card__header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.slot-flyout-card__type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--accent);
}

.slot-flyout-card__slot {
    font-size: 0.74rem;
    color: #9ca3af;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

.slot-flyout-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-top: 4px;
    word-break: break-word;
}

.slot-flyout-card__sub {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.82rem;
}

.slot-flyout-card__time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #374151;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.slot-flyout-card__state {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.slot-flyout-card__state--requested { background: #fef3c7; color: #92400e; }
.slot-flyout-card__state--accepted  { background: #dbeafe; color: #1d4ed8; }
.slot-flyout-card__state--ready     { background: #ede9fe; color: #5b21b6; }
.slot-flyout-card__state--completed { background: #d1fae5; color: #047857; }
.slot-flyout-card__state--blocked   { background: #fee2e2; color: #991b1b; }
.slot-flyout-card__state--free      { background: #e5e7eb; color: #4b5563; }

/* Per-type accents — match scheduler-tooltip-card and the appointment pills. */
.slot-flyout-card--cremation    { --accent: #006d57; --accent-soft: #cce8e3; }
.slot-flyout-card--abdication   { --accent: #9a3412; --accent-soft: #ffedd5; }
.slot-flyout-card--earth-burial { --accent: #7c5e2e; --accent-soft: #f3e8d7; }
.slot-flyout-card--lying-out    { --accent: #5b21b6; --accent-soft: #ede9fe; }
.slot-flyout-card--burial       { --accent: #1d4ed8; --accent-soft: #dbeafe; }
.slot-flyout-card--other        { --accent: #4b5563; --accent-soft: #e5e7eb; }

/* Touch: keep the card narrower so it fits one-handed on phones. The popup
   is open on hover only on desktop; on touch it opens on tap and the user
   taps the slot button again to close. Tap-to-navigate is not supported here
   since the button click handler creates a new event vs. navigates — leaving
   the card purely informational. */
@media (hover: none) and (pointer: coarse) {
    .slot-flyout-card {
        min-width: 220px;
        max-width: min(320px, 86vw);
    }
}

/* ==================================================================
   DxDateEdit / DxCalendar popup styling (global — affects all forms)
   ================================================================== */
.dxbl-popup, .dxbl-popup-content { border-radius: 12px !important; }
.dxbl-popup { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12) !important; }
.dxbl-calendar { border-radius: 12px !important; }
.dxbl-calendar .dxbl-calendar-cell { border-radius: 8px !important; }
.dxbl-calendar .dxbl-calendar-today:not(.dxbl-calendar-selected) {
    color: var(--bs-primary) !important;
    font-weight: 700 !important;
}
.dxbl-calendar .dxbl-calendar-selected {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* ==================================================================
   Calendar responsive
   ================================================================== */
@media (max-width: 768px) {
    .calendar {
        padding: 14px 14px 16px;
        border-radius: 16px;
    }

    .calendar__header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .calendar__nav { justify-content: space-between; }
    .calendar__title { font-size: 1.2rem; }
    .calendar__grid { grid-template-columns: 1fr; gap: 12px; }

    .slot-btn { min-height: 44px; font-size: 0.95rem; }

    .dxbl-calendar .dxbl-calendar-cell {
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

/* ==================================================================
   Settings page (tabbed sections)
   ================================================================== */
.settings-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

.settings-page__header { margin-bottom: 20px; }

.settings-page__header--compact {
    margin-bottom: 12px;
    padding: 0;
}

.settings-page__header--compact .title-header-text {
    font-size: 1.25rem;
    line-height: 1.6rem;
}

.settings-page__header--compact .title-content-text {
    font-size: 0.85rem;
    line-height: 1.25rem;
    color: #6b7280;
}

.dashboard-grid-row { cursor: pointer; }
.dashboard-grid-row:hover { background: rgba(0, 140, 112, 0.04); }

/* Scheduler tooltip — modern card with a coloured event-type accent on the
   left edge. Per event type the accent + icon colour match the appointment
   pill so the office can visually link tooltip ↔ appointment at a glance. */
.scheduler-tooltip-card {
    --accent: #9ca3af;
    --accent-soft: rgba(156, 163, 175, 0.12);
    display: flex;
    min-width: 260px;
    max-width: 340px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.scheduler-tooltip-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.scheduler-tooltip-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.scheduler-tooltip-card__accent {
    width: 5px;
    flex-shrink: 0;
    background: var(--accent);
}

.scheduler-tooltip-card__body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.scheduler-tooltip-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scheduler-tooltip-card__icon {
    font-size: 20px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px;
    border-radius: 999px;
    line-height: 1;
}

.scheduler-tooltip-card__type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--accent);
}

.scheduler-tooltip-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-top: 2px;
    word-break: break-word;
}

.scheduler-tooltip-card__sub,
.scheduler-tooltip-card__time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.82rem;
}

.scheduler-tooltip-card__time {
    color: #374151;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.scheduler-tooltip-card__btn {
    align-self: flex-start;
    margin-top: 10px;
}

/* Tap hint replaces the explicit button on touch devices. Hidden on desktop
   where the button serves as the call-to-action. */
.scheduler-tooltip-card__tap-hint {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Per-type accent — pairs with the appointment pill colours below so a hover
   pop visually echoes the appointment it came from. */
.scheduler-tooltip-card--cremation         { --accent: #006d57; --accent-soft: #cce8e3; }
.scheduler-tooltip-card--abdication-kirche { --accent: #9d174d; --accent-soft: #fce7f3; }
.scheduler-tooltip-card--abdication-halle  { --accent: #9a3412; --accent-soft: #ffedd5; }
.scheduler-tooltip-card--earth-burial      { --accent: #7c5e2e; --accent-soft: #f3e8d7; }
.scheduler-tooltip-card--lying-out         { --accent: #5b21b6; --accent-soft: #ede9fe; }
.scheduler-tooltip-card--burial            { --accent: #1d4ed8; --accent-soft: #dbeafe; }
.scheduler-tooltip-card--other             { --accent: #4b5563; --accent-soft: #e5e7eb; }

/* DevExpress wraps the appointment tooltip in its own popup chrome. Strip the
   default border/shadow so our card stands alone as the only visual element. */
.dxbl-popup-content:has(.scheduler-tooltip-card),
.dxbl-popup:has(.scheduler-tooltip-card) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Touch devices: compact the card (drop the secondary details + button) and
   surface a tap-hint instead. The whole card is already clickable, so a single
   tap goes straight to the booking — no awkward hover-then-click sequence. */
@media (hover: none) and (pointer: coarse) {
    .scheduler-tooltip-card {
        min-width: 220px;
        max-width: min(320px, 86vw);
    }
    .scheduler-tooltip-card__body { padding: 12px 14px; gap: 4px; }
    .scheduler-tooltip-card__sub--desktop,
    .scheduler-tooltip-card__btn--desktop {
        display: none !important;
    }
    .scheduler-tooltip-card__tap-hint { display: flex; }
    /* DevExpress popup chrome already stripped above; nudge the popup so it
       stays inside the viewport on small screens. */
    .dxbl-popup:has(.scheduler-tooltip-card) {
        max-width: 92vw !important;
    }
}

.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.settings-tabs::-webkit-scrollbar { height: 0; }

.settings-tabs__btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.settings-tabs__btn:hover { color: #1f2937; }

.settings-tabs__btn--active,
.settings-tabs__btn--active:hover {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.settings-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card { overflow-x: auto; }
.settings-card > .row,
.settings-card > .row > .row {
    margin-left: 0;
    margin-right: 0;
}

.settings-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.settings-card__header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.settings-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
}

.settings-card__description {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .settings-page { padding: 14px; }
    .settings-card { padding: 14px 16px; border-radius: 14px; }
    .settings-card__title { font-size: 1.05rem; }
    .settings-tab-panel { gap: 12px; padding-top: 14px; }
}

/* ==================================================================
   Price settings (/settings/pricing)
   ================================================================== */
.price-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.price-summary__chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.price-summary__chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.price-summary__chip--meta {
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.08), rgba(0, 140, 112, 0.02));
    border-color: rgba(0, 140, 112, 0.18);
}

.price-summary__icon {
    font-size: 28px;
    color: var(--bs-primary);
    flex-shrink: 0;
}

.price-summary__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 600;
}

.price-summary__count {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.price-settings-card {
    padding: 0;
    overflow: hidden;
}

.price-settings-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.price-grid {
    border: none !important;
}

.price-grid .dxbl-grid {
    border: none !important;
}

.price-grid .dxbl-grid-header {
    background: #fafafa;
}

.price-grid__group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1f2937;
}

.price-grid__group-icon {
    font-size: 18px;
    color: var(--bs-primary);
}

/* Wider, comfortable popup so all three price columns actually show their
   digits. DevExpress applies inline width; !important is required and the
   class itself must be the target (not a `.dx-popup-content` descendant). */
.price-edit-popup {
    width: min(880px, 96vw) !important;
    min-width: min(880px, 96vw) !important;
    max-width: 96vw !important;
}

/* DevExpress wraps the form content in a body div — make sure it can breathe
   horizontally without re-introducing a scrollbar at typical viewport sizes. */
.price-edit-popup .dxbl-popup-body,
.price-edit-popup .dxbl-popup-content {
    overflow-x: visible !important;
}

.price-edit-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 4px 2px;
}

.price-edit-form__section {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 16px 18px;
}

.price-edit-form__section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 12px;
}

.price-edit-form__section-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Hand-rolled 12-col grid for the Grunddaten section — predictable widths,
   no fighting with DxFormLayout's internal sizing. */
.price-edit-form__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px 16px;
}

.price-edit-form__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.price-edit-form__field--4  { grid-column: span 4; }
.price-edit-form__field--6  { grid-column: span 6; }
.price-edit-form__field--8  { grid-column: span 8; }
.price-edit-form__field--12 { grid-column: span 12; }

.price-edit-form__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

/* Three-up price cards — each gets its own labeled box with the currency
   adornment so the office can never miss what they typed. */
.price-edit-form__prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.price-edit-form__price-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.price-edit-form__price-card:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(0, 140, 112, 0.15);
}

.price-edit-form__currency {
    position: absolute;
    right: 22px;
    bottom: 18px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    pointer-events: none;
    letter-spacing: 0.04em;
}

/* Force inputs to fill their cell — bypasses DevExpress's natural narrow width
   so the value is always fully visible. */
.price-edit-form__input,
.price-edit-form__input .dxbl-input,
.price-edit-form__input .dxbl-edit-input,
.price-edit-form__input input,
.price-edit-form__input textarea {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

.price-edit-form__price input {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: right;
    padding-right: 44px !important; /* leave room for the CHF adornment */
}

.price-edit-form__memo textarea {
    min-height: 90px;
    resize: vertical;
    font-size: 0.95rem;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .price-summary { grid-template-columns: repeat(2, 1fr); }
    .price-settings-card__header { padding: 16px; }
    .price-edit-form__section { padding: 12px; }
    .price-edit-popup {
        width: 96vw !important;
        min-width: 0 !important;
    }
    .price-edit-form__prices { grid-template-columns: 1fr; }
    .price-edit-form__field--4,
    .price-edit-form__field--6,
    .price-edit-form__field--8 { grid-column: span 12; }
}

/* ==================================================================
   Dashboard
   ================================================================== */
.dashboard-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    margin-bottom: 16px;
}

.dashboard-range__dates {
    font-weight: 600;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
    min-width: 190px;
    text-align: center;
}

.dashboard-range__spacer { flex: 1; }

/* Stable-sized dashboard content area: grid/scheduler is always mounted so
   width never reflows. During loads an overlay dims the panel. */
.dashboard-content {
    position: relative;
    width: 100%;
    min-height: 700px;
}
.dashboard-content--loading > *:not(.dashboard-loading-overlay) {
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
}
.dashboard-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(1px);
    border-radius: inherit;
    z-index: 5;
}

/* Compact period selector — pill-shaped, subtle, sized to content. */
.dashboard-range__period {
    width: 160px;
}
.dashboard-range__period .dxbl-edit-btn-clear-prefix { display: none; }
.dashboard-range__period .dxbl-textbox,
.dashboard-range__period .dxbl-combobox-input {
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f3f4f6;
    box-shadow: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}
.dashboard-range__period .dxbl-textbox:hover,
.dashboard-range__period .dxbl-combobox-input:hover {
    background: #e5e7eb;
}
.dashboard-range__period .dxbl-textbox:focus-within,
.dashboard-range__period .dxbl-combobox-input:focus-within {
    background: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px var(--bs-focus-ring-color);
}
.dashboard-range__period input {
    font-weight: 600;
    color: #1f2937;
    padding-left: 14px;
}
.dashboard-range__period .dxbl-edit-spin-edit-btn,
.dashboard-range__period .dxbl-edit-btn {
    color: #6b7280;
}
.dashboard-range__period[aria-disabled="true"],
.dashboard-range__period .dxbl-state-disabled {
    opacity: 0.55;
}

/* Event-type pills (used in the grid Typ column + scheduler legend) */
.dashboard-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.dashboard-pill--cremation       { background: #cce8e3; color: #006d57; }
.dashboard-pill--abdication-kirche { background: #fce7f3; color: #9d174d; }
.dashboard-pill--abdication-halle  { background: #ffedd5; color: #9a3412; }
.dashboard-pill--earth-burial    { background: #f3e8d7; color: #7c4a10; }
.dashboard-pill--lying-out       { background: #ede9fe; color: #5b21b6; }
.dashboard-pill--burial          { background: #dbeafe; color: #1e40af; }

/* Scheduler appointment background + text colors per event type.
   The `.dxbl-apt-bg` div sits behind the appointment and receives
   the `BackgroundCssClass` from the label. The `.dxbl-apt-content`
   wrapper contains the subject/time and receives the `TextCssClass`. */
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--cremation         { background-color: #cce8e3; border-color: #99d1c6; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--abdication-kirche { background-color: #fce7f3; border-color: #f9a8d4; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--abdication-halle  { background-color: #ffedd5; border-color: #fdba74; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--earth-burial      { background-color: #f3e8d7; border-color: #d7b988; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--lying-out         { background-color: #ede9fe; border-color: #c4b5fd; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--burial            { background-color: #dbeafe; border-color: #93c5fd; opacity: 1; }
.dashboard-scheduler .dxbl-apt-bg.scheduler-apt--other             { background-color: #e5e7eb; border-color: #9ca3af; opacity: 1; }

.dashboard-scheduler .scheduler-apt__text--cremation,
.dashboard-scheduler .scheduler-apt__text--cremation .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--cremation .dxbl-sc-apt-time         { color: #006d57; }
.dashboard-scheduler .scheduler-apt__text--abdication-kirche,
.dashboard-scheduler .scheduler-apt__text--abdication-kirche .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--abdication-kirche .dxbl-sc-apt-time { color: #9d174d; }
.dashboard-scheduler .scheduler-apt__text--abdication-halle,
.dashboard-scheduler .scheduler-apt__text--abdication-halle .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--abdication-halle .dxbl-sc-apt-time  { color: #9a3412; }
.dashboard-scheduler .scheduler-apt__text--earth-burial,
.dashboard-scheduler .scheduler-apt__text--earth-burial .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--earth-burial .dxbl-sc-apt-time      { color: #7c4a10; }
.dashboard-scheduler .scheduler-apt__text--lying-out,
.dashboard-scheduler .scheduler-apt__text--lying-out .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--lying-out .dxbl-sc-apt-time         { color: #5b21b6; }
.dashboard-scheduler .scheduler-apt__text--burial,
.dashboard-scheduler .scheduler-apt__text--burial .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--burial .dxbl-sc-apt-time            { color: #1e40af; }
.dashboard-scheduler .scheduler-apt__text--other,
.dashboard-scheduler .scheduler-apt__text--other .dxbl-sc-apt-subject,
.dashboard-scheduler .scheduler-apt__text--other .dxbl-sc-apt-time             { color: #374151; }

/* Match the status bar on the left edge of each appointment to its type. */
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--cremation)         .dxbl-apt-status { background-color: #006d57; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--abdication-kirche) .dxbl-apt-status { background-color: #9d174d; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--abdication-halle)  .dxbl-apt-status { background-color: #9a3412; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--earth-burial)      .dxbl-apt-status { background-color: #7c4a10; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--lying-out)         .dxbl-apt-status { background-color: #5b21b6; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--burial)            .dxbl-apt-status { background-color: #1e40af; }
.dashboard-scheduler .dxbl-sc-apt:has(.scheduler-apt--other)             .dxbl-apt-status { background-color: #6b7280; }

.dashboard-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

/* Scheduler wrapper */
.dashboard-scheduler {
    padding: 0;
    overflow: hidden;
}

.dashboard-scheduler__inner { padding: 16px; }

.dashboard-scheduler__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .dashboard-range {
        padding: 10px 12px;
        gap: 8px;
    }
    .dashboard-range__dates {
        min-width: 0;
        flex: 1 1 100%;
        text-align: center;
    }
    .dashboard-scheduler__inner { padding: 8px; }
}

/* ==================================================================
   Form view wrapper & action bar
   ================================================================== */
.form-view {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 28px 32px;
    /* width:100% is required because the parent (.page-content-container) is a
       flex column: an auto cross-axis margin (margin: 0 auto) overrides
       align-items:stretch, which would otherwise let the card shrink-wrap to the
       active tab's content width (Formular wide, Dokumente/Berichte narrow).
       Explicit width keeps every tab the same width; max-width + auto margins
       still cap + center it on ultra-wide screens. */
    width: 100%;
    max-width: 1800px;
    margin: 0 auto 40px !important;
}

.form-view__loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 160px;
}

/* ---- Form loading skeleton (shimmer placeholder, mirrors the form layout) ---- */
.form-skeleton {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 4px 0 8px;
}

.skeleton {
    background-color: #e8edf1;
    background-image: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-position: -150% 0;
    border-radius: 8px;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    to { background-position: 250% 0; }
}

.skeleton__line { height: 14px; width: 100%; }
.skeleton__line--title { height: 24px; width: 42%; }
.skeleton__line--sub { height: 14px; width: 26%; margin-top: 10px; }
.skeleton__line--grouptitle { height: 18px; width: 200px; margin-bottom: 18px; }
.skeleton__line--caption { height: 11px; width: 45%; margin-bottom: 9px; }

.skeleton__avatar { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; }
.skeleton__badge { width: 96px; height: 28px; border-radius: 999px; flex-shrink: 0; }
.skeleton__tab { width: 120px; height: 34px; border-radius: 8px; }
.skeleton__input { height: 40px; width: 100%; border-radius: 10px; }

.form-skeleton__header { display: flex; align-items: center; gap: 16px; }
.form-skeleton__headtext { flex: 1; min-width: 0; }

.form-skeleton__tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 12px;
}

.form-skeleton__group {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 20px 22px;
}

.form-skeleton__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

@media (max-width: 768px) {
    .form-skeleton__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
}

.form-view__section {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .form-view {
        padding: 16px 14px;
        border-radius: 14px;
        margin: 0 auto 24px;
    }
}

/* Form layout groups: full-width cards aligned with EventHeader, with inner
   padding that matches the header's so content has breathing room on the sides. */
.form-view .dxbl-fl {
    --dxbl-fl-group-border-radius: 16px;
    --dxbl-fl-group-content-padding-x: 1.25rem;   /* 20px — matches event-header */
    --dxbl-fl-group-content-padding-y: 1.125rem;  /* 18px */
    --dxbl-fl-group-header-padding-x: 1.25rem;
    --dxbl-fl-group-header-padding-y: 0.75rem;
    --dxbl-fl-group-spacing-y: 1rem;
}

/* DevExpress wraps the form layout's top-level groups in a Bootstrap-style row
   with negative left/right margins (-12px) and matching column padding (+12px).
   That pushes the visible card edges 12px inward, so they appear narrower than
   the EventHeader. Reset gutters at the outer row only — inner item rows
   (e.g. two ColSpanMd=6 fields side-by-side) keep their gutters. */
.form-view .dxbl-fl > .dxbl-row {
    margin-left: 0;
    margin-right: 0;
}
.form-view .dxbl-fl > .dxbl-row > [class*="dxbl-col"] {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    .form-view .dxbl-fl {
        --dxbl-fl-group-content-padding-x: 0.875rem;   /* 14px on mobile */
        --dxbl-fl-group-header-padding-x: 0.875rem;
    }
}

/* ---- Action bar (shared footer) ---- */
.form-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.form-action-bar__left,
.form-action-bar__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-action-bar__right {
    justify-content: flex-end;
    margin-left: auto;
}

.form-action-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    min-width: 112px;
    white-space: nowrap;
}

.form-action-bar__btn-icon {
    font-size: 18px !important;
    line-height: 1;
}

.form-action-bar__btn-spinner {
    width: 16px;
    height: 16px;
}

.form-action-bar__btn--save {
    border-radius: 8px;
}

.form-action-bar__errors {
    margin-top: 14px;
}

@media (max-width: 640px) {
    .form-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .form-action-bar__left,
    .form-action-bar__right {
        width: 100%;
        justify-content: stretch;
    }
    .form-action-bar__left > *,
    .form-action-bar__right > * {
        flex: 1 1 auto;
        min-width: 0;
    }
    .form-action-bar__btn {
        min-width: 0;
        width: 100%;
    }
    .form-action-bar__right {
        order: -1; /* primary action on top on mobile */
    }
}

@media print {
    .form-action-bar { display: none !important; }
}

/* ==================================================================
   Nav menu grouping (visual spacing between sections)
   ================================================================== */
.menu + .menu {
    position: relative;
    margin-top: 14px;
    padding-top: 14px;
}

.menu + .menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent);
}

/* ==================================================================
   Home page sections
   ================================================================== */
.home-section + .home-section {
    margin-top: 28px;
}

.home-section__title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin: 0 0 10px 4px;
}

/* ==================================================================
   Calendar settings – slot lock/unlock buttons
   ================================================================== */
.slot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-btn__icon {
    font-size: 16px !important;
    line-height: 1;
}

.slot-btn--locked {
    background-color: #dc3545 !important;
    border-color: #b02a37 !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.slot-btn--locked:hover:not(:disabled) {
    background-color: #bb2d3b !important;
    border-color: #a52834 !important;
    color: #fff !important;
}

.slot-btn--locked:disabled {
    background-color: #dc3545 !important;
    border-color: #b02a37 !important;
    color: #fff !important;
    opacity: 0.65;
}

/* ==================================================================
   Calendar – KW label embedded inside DxDateEdit
   ================================================================== */
.calendar__week-btn {
    pointer-events: none;
    background: var(--bs-primary-bg-subtle) !important;
    border: none !important;
    padding: 0 10px !important;
    min-width: 0 !important;
}

.calendar__week-btn:hover,
.calendar__week-btn:focus,
.calendar__week-btn:active {
    background: var(--bs-primary-bg-subtle) !important;
    box-shadow: none !important;
}

.calendar__week-btn-label {
    color: var(--bs-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ==================================================================
   Calendar – rounded & wider date picker
   ================================================================== */
.calendar__date-edit {
    min-width: 360px;
}

.calendar__date-edit .dxbl-edit,
.calendar__date-edit .dxbl-edit-input-container,
.calendar__date-edit .dxbl-text-edit-input-container,
.calendar__date-edit .dxbl-date-edit {
    border-radius: 12px !important;
}

.calendar__date-edit .dxbl-text-edit-input,
.calendar__date-edit input {
    text-align: center;
    min-width: 200px;
    text-overflow: clip !important;
}

@media (max-width: 640px) {
    .calendar__date-edit {
        min-width: 0;
        width: 100%;
    }
    .calendar__date-edit .dxbl-text-edit-input,
    .calendar__date-edit input {
        min-width: 0;
    }
}

/* ==================================================================
   User settings – grid row actions, role pills, edit popup
   ================================================================== */
.user-settings__add-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}

.user-settings__row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.user-settings__row-icon {
    font-size: 1.15rem !important;
    line-height: 1;
}

.user-settings__row--inactive {
    background-color: rgba(108, 117, 125, 0.08) !important;
    color: #6b7280;
}

.user-settings__row--inactive td { font-style: italic; }

/* Role pills */
.user-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
}

.user-pill--admin {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.user-pill--staff {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.user-pill--external {
    background: rgba(13, 110, 253, 0.1);
    color: #0a58ca;
}

.user-pill--community {
    background: rgba(255, 159, 0, 0.12);
    color: #b35900;
}

.user-pill--default {
    background: rgba(108, 117, 125, 0.12);
    color: #495057;
}

/* Edit popup */
.user-settings__edit-popup .dxbl-popup-content {
    max-width: 760px;
}

.user-edit {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-edit__hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.08), rgba(0, 140, 112, 0.02));
    border: 1px solid rgba(0, 140, 112, 0.15);
    border-radius: 14px;
}

.user-edit__avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 140, 112, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-edit__avatar .material-symbols-outlined {
    font-size: 30px;
    color: var(--bs-primary);
}

.user-edit__hero-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.user-edit__hero-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 2px;
}

.user-edit__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
}

.user-edit__hint-icon { font-size: 16px !important; }

.user-edit__notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 140, 112, 0.06);
    border: 1px solid rgba(0, 140, 112, 0.15);
    color: #1f2937;
    font-size: 0.88rem;
    line-height: 1.4;
}

.user-edit__notice-icon {
    font-size: 20px !important;
    color: var(--bs-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 640px) {
    .user-edit__hero { flex-direction: row; padding: 12px 14px; }
    .user-edit__avatar { width: 44px; height: 44px; border-radius: 12px; }
    .user-edit__avatar .material-symbols-outlined { font-size: 24px; }
    .user-edit__hero-title { font-size: 1.05rem; }
}

/* ==================================================================
   Account management (/Account/Manage/*)
   ================================================================== */
.account-page__header-icon {
    font-size: 28px !important;
    color: var(--bs-primary);
}

/* Tab bar icon alignment (uses shared .settings-tabs styling) */
.account-tabs__btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.account-tabs__icon {
    font-size: 18px !important;
    line-height: 1;
}

/* Content column: fixed max-width so switching tabs never shifts layout */
.account-page__body {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Banner (replaces alert) */
.account-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    margin: 12px 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.account-banner__icon {
    font-size: 22px !important;
    flex-shrink: 0;
    margin-top: 1px;
}

.account-banner--success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.account-banner--warn {
    background: rgba(234, 179, 8, 0.09);
    border: 1px solid rgba(234, 179, 8, 0.28);
    color: #854d0e;
}

.account-banner--error {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #991b1b;
}

.account-banner a {
    color: inherit;
    text-decoration: underline;
}

/* Chips (small status pills inside headers) */
.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.account-chip .material-symbols-outlined {
    font-size: 14px !important;
}

.account-chip--success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.account-chip--warn {
    background: rgba(234, 179, 8, 0.15);
    color: #854d0e;
}

.account-chip--muted {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

/* Field display (current e-mail row) */
.account-field-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafbfc;
    margin-bottom: 18px;
}

.account-field-display__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #6b7280;
}

.account-field-display__value {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 500;
    color: #0f172a;
}

.account-field-display__action {
    align-self: flex-start;
}

/* Subheader between sections within a card */
.account-subheader {
    margin: 18px 0 8px;
}

.account-subheader__title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}

.account-subheader__description {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Validation summary inside account forms */
.account-validation {
    color: #991b1b;
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-validation ul { margin: 0; padding-left: 18px; }

/* Actions row */
.account-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.account-actions--wrap {
    flex-wrap: wrap;
}

.account-actions__primary {
    margin-left: auto;
}

.account-actions__link {
    flex: 0 1 auto;
    min-width: 160px;
}

@media (max-width: 520px) {
    .account-actions { flex-direction: column; align-items: stretch; }
    .account-actions__primary { margin-left: 0; order: -1; }
    .account-actions__link { width: 100%; min-width: 0; }
}

/* Steps (EnableAuthenticator) */
.account-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-steps__item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafbfc;
}

.account-steps__num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.account-steps__title {
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.account-steps__body {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 10px;
}

.account-steps__body:last-child { margin-bottom: 0; }

/* Key display (authenticator) */
.account-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    letter-spacing: 0.08em;
    margin: 4px 0 8px;
    max-width: 100%;
    overflow-x: auto;
}

.account-key__icon {
    font-size: 18px !important;
    color: rgba(226, 232, 240, 0.7);
}

.account-key__value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Inline hint */
.account-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 4px;
}

.account-hint__icon { font-size: 16px !important; }

/* External providers list */
.account-provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.account-provider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fafbfc;
}

.account-provider__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #0f172a;
}

.account-provider__icon {
    font-size: 20px !important;
    color: var(--bs-primary);
}

/* ==================================================================
   Cremation type selection page (/new-cremation/…)
   ================================================================== */
.type-select {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.type-select__hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.08), rgba(0, 140, 112, 0.02));
    border: 1px solid rgba(0, 140, 112, 0.15);
}

.type-select__hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 140, 112, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.type-select__hero-icon .material-symbols-outlined {
    font-size: 30px;
    color: var(--bs-primary);
}

.type-select__hero-body { min-width: 0; }

.type-select__hero-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.2;
}

.type-select__hero-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.9rem;
}

.type-select__hero-meta .material-symbols-outlined {
    font-size: 18px;
    color: var(--bs-primary);
}

.type-select__hero-sep { color: #cbd5e1; }

.type-select__prompt {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 6px 0 -6px;
}

.type-select__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 720px) {
    .type-select__grid { grid-template-columns: 1fr; }
    .type-select__hero { flex-direction: row; padding: 14px 16px; }
    .type-select__hero-icon { width: 44px; height: 44px; border-radius: 12px; }
    .type-select__hero-icon .material-symbols-outlined { font-size: 24px; }
    .type-select__hero-title { font-size: 1.2rem; }
}

/* Type selection card */
.type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px 22px 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
    overflow: hidden;
}

.type-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at top left, rgba(0, 140, 112, 0.06), transparent 60%);
    transition: opacity 0.18s ease;
}

.type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 140, 112, 0.35);
    box-shadow: 0 10px 28px rgba(0, 140, 112, 0.10), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.type-card:hover::before { opacity: 1; }

.type-card:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.type-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bs-primary-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.type-card__icon .material-symbols-outlined {
    font-size: 28px;
    color: var(--bs-primary);
}

.type-card:hover .type-card__icon {
    background: rgba(0, 140, 112, 0.18);
    transform: scale(1.04);
}

.type-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.type-card__description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.type-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-primary);
    letter-spacing: 0.02em;
    transition: gap 0.18s ease;
}

.type-card__cta .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.18s ease;
}

.type-card:hover .type-card__cta { gap: 8px; }
.type-card:hover .type-card__cta .material-symbols-outlined { transform: translateX(2px); }

/* ==================================================================
   Upload groups (Bescheinigungen, Weitere Dokumente)
   ================================================================== */
.upload-group {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-top: 16px;
}

.upload-group__header {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    cursor: pointer;
    text-align: left;
    color: #0f172a;
    transition: background-color 0.15s ease;
}

.upload-group__header:hover { background: rgba(0, 140, 112, 0.04); }

.upload-group__chevron {
    font-size: 22px !important;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.upload-group--open .upload-group__chevron { transform: rotate(180deg); }

.upload-group__title-icon {
    font-size: 22px !important;
    color: var(--bs-primary);
}

.upload-group__title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.upload-group__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.upload-group__badge .material-symbols-outlined {
    font-size: 14px !important;
}

.upload-group__badge-max {
    color: rgba(0, 140, 112, 0.65);
    font-weight: 600;
}

.upload-group__body {
    padding: 8px 20px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.upload-group__notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.09);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #854d0e;
    font-size: 0.88rem;
    margin: 8px 0 16px;
}

.upload-group__notice .material-symbols-outlined { font-size: 18px !important; }

.upload-group__notice--muted {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.18);
    color: #475569;
}

/* Upload tiles (grid of per-document dropzones) */
.upload-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

@media (max-width: 720px) {
    .upload-tiles { grid-template-columns: 1fr; }
}

.upload-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 20px 18px;
    border: 2px dashed rgba(0, 140, 112, 0.25);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(0, 140, 112, 0.02), rgba(0, 140, 112, 0.005));
    transition: border-color 0.15s, background-color 0.15s;
}

.upload-tile:hover {
    border-color: rgba(0, 140, 112, 0.45);
    background: linear-gradient(180deg, rgba(0, 140, 112, 0.05), rgba(0, 140, 112, 0.01));
}

.upload-tile--filled {
    border-style: solid;
    border-color: rgba(0, 140, 112, 0.35);
    background: linear-gradient(180deg, rgba(0, 140, 112, 0.06), rgba(0, 140, 112, 0.015));
}

.upload-tile__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary-bg-subtle);
    margin-bottom: 4px;
}

.upload-tile__icon .material-symbols-outlined {
    font-size: 26px !important;
    color: var(--bs-primary);
}

.upload-tile__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.upload-tile__hint {
    color: #6b7280;
    font-size: 0.82rem;
}

.upload-tile__file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 140, 112, 0.2);
    font-size: 0.85rem;
    color: #0f172a;
    overflow: hidden;
}

.upload-tile__file .material-symbols-outlined {
    font-size: 16px !important;
    color: #dc2626;
    flex-shrink: 0;
}

.upload-tile__file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.upload-tile__file-size {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.upload-tile__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Make label-buttons (Ersetzen / Datei wählen / Datei hinzufügen) match
   DxButton SizeMode.Small so all action buttons have the same height, and
   center the inline icon. */
.upload-tile__actions .btn,
.upload-attachments__add .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    min-height: 1.75rem;
    border-radius: 7px;
}

.upload-tile__actions .btn .material-symbols-outlined,
.upload-tile__actions .btn .spinner-border,
.upload-attachments__add .btn .material-symbols-outlined,
.upload-attachments__add .btn .spinner-border {
    font-size: 16px !important;
    width: 16px;
    height: 16px;
    margin: 0 !important;
    line-height: 1;
}

/* Attachments list */
.upload-attachments__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    color: #6b7280;
    font-size: 0.9rem;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fafbfc;
}

.upload-attachments__empty .material-symbols-outlined {
    font-size: 34px !important;
    color: #9ca3af;
}

.upload-attachments__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-attachments__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fafbfc;
}

.upload-attachments__file-icon {
    font-size: 22px !important;
    color: #dc2626;
    flex-shrink: 0;
}

.upload-attachments__file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #0f172a;
}

.upload-attachments__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.upload-attachments__add {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.upload-attachments__hint {
    color: #6b7280;
    font-size: 0.82rem;
}

/* ==================================================================
   Anonymous layout (Login, ForgotPassword, ResetPassword, 2FA, …)
   Centered-card design on a softly tinted backdrop. The CSS targets
   the existing .main-content / .block-content / .title classes used
   across every Identity page, so the redesign is purely additive —
   no .razor changes required per page.
   ================================================================== */
.anonymous-page {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left,  rgba(0, 140, 112, 0.10), transparent 55%),
        radial-gradient(circle at bottom right, rgba(0, 140, 112, 0.08), transparent 50%),
        #f6f8f9;
}

.anonymous-shell {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 32px);
    box-sizing: border-box;
    gap: clamp(16px, 3vw, 32px);
}

.anonymous-brand {
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: center;
}

.anonymous-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    padding: 4px 8px;
    border-radius: 12px;
    transition: background-color 0.15s ease;
}

.anonymous-brand__link:hover {
    background-color: rgba(0, 140, 112, 0.06);
}

.anonymous-brand__logo {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.anonymous-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.anonymous-brand__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.anonymous-brand__subtitle {
    font-size: 0.85rem;
    color: var(--bs-primary);
    font-weight: 500;
    margin-top: 2px;
}

.anonymous-content {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
}

.anonymous-footer {
    margin-top: auto;
    padding-top: 16px;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
}

/* Card itself — drop the original flex-center wrapper and replace with
   the elevated white card. .main-content / .block-content already exist
   on every Identity page; we just restyle them inside the anonymous
   surface. */
.anonymous-content .main-content {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px -8px rgba(15, 23, 42, 0.12);
    padding: clamp(24px, 5vw, 40px);
    align-items: stretch;
    height: auto;
    width: 100%;
}

.anonymous-content .block-content {
    width: 100%;
    max-width: none;
    gap: 14px;
}

.anonymous-content .title {
    padding: 0 0 4px 0;
    gap: 6px;
}

.anonymous-content .title-header-text {
    font-size: 1.6rem;
    line-height: 2rem;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.anonymous-content .title-content-text,
.anonymous-content .title-content-text-secondary {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.45;
}

/* DxFormLayout labels — slightly smaller + uppercase tracking gives the
   inputs a more modern, less form-y look. */
.anonymous-content .dxbl-flv-layout-item-cap {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 4px;
}

/* Input boxes — slightly taller, softer border, focus ring matches brand. */
.anonymous-content .dxbl-textbox,
.anonymous-content .dxbl-input {
    border-radius: 10px !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.anonymous-content .dxbl-textbox:focus-within,
.anonymous-content .dxbl-input:focus-within {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 140, 112, 0.18);
}

/* Primary submit button — full width inside the card, branded teal. */
.anonymous-content .dxbl-btn {
    border-radius: 10px !important;
    font-weight: 600;
    height: 44px;
    transition: filter 0.15s ease, transform 0.05s ease;
}

.anonymous-content .dxbl-btn-primary,
.anonymous-content button[type="submit"].dxbl-btn {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.anonymous-content .dxbl-btn-primary:hover,
.anonymous-content button[type="submit"].dxbl-btn:hover {
    filter: brightness(0.95);
}

.anonymous-content .dxbl-btn:active {
    transform: translateY(1px);
}

/* Validation messages — turn the bare red list into a softer banner. */
.anonymous-content .validation-summary-errors,
.anonymous-content .validation-message {
    color: #991b1b;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 4px 0 0;
}

.anonymous-content .validation-summary-errors {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    list-style: none;
}

.anonymous-content .validation-summary-errors ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Status banner inside the card — keep above the form. */
.anonymous-content .account-banner {
    margin: 0 0 4px 0;
}

/* Links row below the form (e.g. "Passwort vergessen?"). */
.anonymous-content .links-container {
    justify-content: center;
    margin-top: 6px;
    font-size: 0.9rem;
}

.anonymous-content .links-container a {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
}

.anonymous-content .links-container a:hover {
    text-decoration: underline;
}

/* When the page uses .large-input (2FA code), keep it nicely centered
   inside the card. */
.anonymous-content .large-input {
    text-align: center;
    letter-spacing: 0.3em;
}

/* ── Responsive — mobile (≤ 540px) ─────────────────────────────────── */
@media (max-width: 540px) {
    .anonymous-shell {
        padding: 16px 14px 24px;
        gap: 16px;
    }

    .anonymous-brand__logo {
        height: 44px;
    }

    .anonymous-brand__title {
        font-size: 0.95rem;
    }

    .anonymous-brand__subtitle {
        font-size: 0.78rem;
    }

    .anonymous-content .main-content {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .anonymous-content .title-header-text {
        font-size: 1.4rem;
        line-height: 1.7rem;
    }

    .anonymous-footer {
        font-size: 0.72rem;
        padding-top: 12px;
    }
}

/* ── Very small screens (≤ 360px) ──────────────────────────────────── */
@media (max-width: 360px) {
    .anonymous-brand__link {
        gap: 10px;
    }
    .anonymous-content .main-content {
        padding: 18px 16px;
    }
}

/* ==================================================================
   Report Data panel (collapsible, mounted on every event detail view).
   Reuses .upload-group from the document-upload sections so the look
   matches "Bescheinigungen hochladen". The only adjustment: the inner
   DxTabs strip needs to scroll horizontally on narrow viewports — with
   8 tabs the label row would otherwise wrap and look broken.
   ================================================================== */
.report-data-group .report-data-panel__tabs {
    overflow-x: auto;
    overflow-y: hidden;
}

.report-data-group .report-data-panel__tabs .dxbl-tabs-nav {
    flex-wrap: nowrap;
}

/* Bullet indicator on tab labels — green dot next to reports with data. */
.report-data-group .report-data-panel__badge {
    color: var(--bs-primary);
    margin-left: 6px;
    font-size: 0.85em;
    line-height: 1;
}

/* Action row (save button + status) below the active tab's form. */
.report-data-group .report-data-panel__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 540px) {
    .report-data-group .report-data-panel__actions {
        flex-wrap: wrap;
    }
}

/* ==================================================================
   Event-view segmented control (Formular | Dokumente | Berichte)
   spec §2.1 — brand teal active indicator, disabled state for NewMode.
   ================================================================== */
.event-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.07);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.event-tabs::-webkit-scrollbar { height: 0; }

.event-tabs__btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 11px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    border-radius: 8px 8px 0 0;
}

.event-tabs__btn:hover:not(:disabled) {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.03);
}

.event-tabs__btn--active,
.event-tabs__btn--active:hover {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.event-tabs__btn--disabled,
.event-tabs__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.event-tabs__btn-icon {
    font-size: 18px !important;
    line-height: 1;
}

@media (max-width: 480px) {
    .event-tabs__btn {
        padding: 10px 14px;
        font-size: 0.85rem;
        gap: 5px;
    }
    .event-tabs__btn-icon { font-size: 16px !important; }
}

/* Tab panels size to the ACTIVE tab's content (inactive panels are display:none
   via d-none), so short tabs (Dokumente/Berichte) don't leave blank scroll space
   below them. A viewport min-height keeps a short tab filling a good part of the
   screen instead of collapsing to a tiny card, while staying under one screen so
   it never reintroduces off-screen blank. */
.event-tabpanels {
    min-height: 40vh;
    min-height: 40dvh;
}

/* ==================================================================
   Berichte tab — card grid + detail view
   spec §2.3/§2.4 — responsive 1/2/3-column card grid.
   ================================================================== */
.berichte-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 4px 0 24px;
}

@media (max-width: 1199px) {
    .berichte-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .berichte-grid { grid-template-columns: 1fr; }
}

.berichte-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 16px;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.13s ease, box-shadow 0.13s ease, border-color 0.13s ease;
    outline: none;
}

.berichte-card:hover,
.berichte-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 140, 112, 0.4);
}

.berichte-card:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.berichte-card--no-input {
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.04), #fff);
}

.berichte-card__icon-row {
    display: flex;
    align-items: center;
}

.berichte-card__type-icon {
    font-size: 28px !important;
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    padding: 8px;
    border-radius: 10px;
    line-height: 1;
}

.berichte-card--no-input .berichte-card__type-icon {
    background: rgba(0, 140, 112, 0.1);
}

.berichte-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.berichte-card__status {
    margin-top: auto;
}

.berichte-card__status-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 10px;
}

.berichte-card__status-label--done {
    background: #dcfce7;
    color: #15803d;
}

.berichte-card__status-label--open {
    background: #f3f4f6;
    color: #6b7280;
}

.berichte-card__status-label--ready {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.berichte-card__status-dot {
    font-size: 14px !important;
    line-height: 1;
}

/* ---- Detail view (State B) ---- */
.berichte-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.berichte-detail__header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.berichte-back-btn {
    appearance: none;
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.berichte-back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.18);
    color: #111827;
}

.berichte-back-btn .material-symbols-outlined {
    font-size: 18px !important;
    line-height: 1;
}

.berichte-detail__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.berichte-detail__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.berichte-detail__body {
    /* Full-width form: override any DxFormLayout max-width constraints. */
    width: 100%;
}

/* Ensure the report form fills the full detail width and has good breathing room. */
.berichte-detail__body .report-form,
.berichte-detail__body .dxbl-fl {
    width: 100%;
}

/* ==================================================================
   Berichte live cost total widget (spec §5.3)
   ================================================================== */
.berichte-live-cost {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(0, 140, 112, 0.06), rgba(0, 140, 112, 0.02));
    border: 1px solid rgba(0, 140, 112, 0.2);
    border-radius: 12px;
}

.berichte-live-cost__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.berichte-live-cost__total {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bs-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.berichte-live-cost__breakdown {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* ==================================================================
   Report form 1./2. Aufschrift pair (Kolumbarium + Urnenhain)
   Radio-style toggle: only one can be active at a time.
   spec §3.2, §3.3, §4.
   ================================================================== */
.report-aufschrift-pair {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-aufschrift-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.report-aufschrift-btn:hover {
    background: #e5e7eb;
    border-color: rgba(0, 0, 0, 0.16);
    color: #111827;
}

.report-aufschrift-btn--active {
    background: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.report-aufschrift-btn--active:hover {
    background: rgba(0, 140, 112, 0.15);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.report-aufschrift-btn__icon {
    font-size: 18px !important;
    line-height: 1;
}
