:root {
    /* === Brand Colors === */
    --primary: #008e66;
    --primary-rgb: 0, 142, 102;
    --primary-hover: #007a58;
    --primary-active: #006349;
    --primary-light: rgba(0, 142, 102, 0.1);
    --primary-light-solid: #68baa3;

    /* === Semantic Colors === */
    --success: #2e7d32;
    --success-rgb: 46, 125, 50;
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger: #dc2626;
    --danger-rgb: 220, 38, 38;
    --info: #0284c7;
    --info-rgb: 2, 132, 199;

    /* === Neutral Colors (warm gray scale) === */
    --white: #ffffff;
    --gray-50: #faf9f7;
    --gray-100: #f3f2ef;
    --gray-200: #e8e6e1;
    --gray-300: #d5d3cd;
    --gray-400: #a8a49c;
    --gray-500: #78746b;
    --gray-600: #57534e;
    --gray-800: #292524;

    /* === Semantic Aliases === */
    --body-bg: var(--gray-50);
    --text-color: var(--gray-600);
    --text-muted: var(--gray-500);
    --border-color: var(--gray-200);

    /* === Layout === */
    --font-size: 0.9rem;
    --tx-zoom: 1;
    --topbar-height: 48px;
    --footer-height: 48px;
    --border-radius: 3px;

    /* === Button Colors === */
    --primary-text-color: #fff;
    --primary-bg-hover: var(--primary-hover);
    --primary-bg-active: var(--primary-active);
    --secondary-bg: var(--gray-100);
    --secondary-text-color: var(--gray-800);
    --secondary-hover-bg: var(--gray-200);
    --secondary-active-bg: var(--gray-300);
    --danger-bg: var(--danger);
    --danger-text-color: #ffffff;
    --danger-hover-bg: #b91c1c;
    --danger-active-bg: #991b1b;
    --disabled-bg: transparent;
    --disabled-text-color: var(--gray-400);
    --btn-border-radius: 3px;

    /* === Input Colors === */
    --input-border-radius: 3px;
    --input-bg-color: var(--white);
    --input-bg-focus-color: var(--white);
    --input-bd-color: var(--gray-300);
    --input-bd-focus-color: var(--primary);
    --input-bd-width: 1px;
    --input-min-height: 40px;
    --input-padding: 8px 12px;

    /* === Table Colors === */
    --table-header-bg-color: var(--gray-100);
    --table-bd-color: var(--gray-200);
    --table-row-bg: transparent;
    --table-hover-bg-color: var(--gray-100);

    /* === Menu Colors === */
    --menu-bg: transparent;
    --menu-color: var(--gray-800);
    --menu-btn-bg: transparent;
    --menu-btn-bg-hover: rgba(0, 0, 0, 0.04);
    --menu-btn-bg-active: rgba(0, 0, 0, 0.06);

    /* === Status Colors (RGB for rgba() usage) === */
    --status-not-started-rgb: 0, 142, 102;
    --status-arrived-rgb: 120, 116, 107;
    --status-done-rgb: 213, 211, 205;
    --status-late-rgb: 249, 115, 22;
    --status-alternative-rgb: 249, 200, 14;
    --status-bg-alpha: 1;
    --capacity-warning-rgb: 249, 200, 14;
    --roompreference-rgb: 255, 165, 0;

    /* Status color aliases (for charts) */
    --status-not-started: rgb(var(--status-not-started-rgb));
    --status-arrived: rgb(var(--status-arrived-rgb));
    --status-done: rgb(var(--status-done-rgb));
    --status-late: rgb(var(--status-late-rgb));

    /* === Statistics Colors === */
    --walk-in-color: var(--gray-200);
    --online-color: #44a8eb;
    --local-color: var(--primary);
    --grid-line-color: rgba(0, 0, 0, 0.08);
}

/* Verhindert den Android    Ripple Effekt  */
:root {
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Dark Mode */
[data-bs-theme="dark"] {
    color-scheme: dark;

    /* === Neutral Colors (dark) === */
    --white: #2e3136;
    --gray-50: #202329;
    --gray-100: #262a30;
    --gray-200: #2a2e35;
    --gray-300: #3a3f47;
    --gray-400: #6b7078;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-800: #f3f4f6;

    /* === Semantic (auto-updated via aliases) === */
    --body-bg: var(--gray-50);
    --text-color: var(--gray-600);
    --text-muted: var(--gray-500);
    --border-color: var(--gray-300);

    /* === Brand (slightly adjusted for dark) === */
    --primary: #00a878;
    --primary-rgb: 0, 168, 120;
    --primary-hover: #00bf8a;
    --primary-active: #008e66;
    --primary-light: rgba(0, 168, 120, 0.15);
    --primary-light-solid: #5cc9a7;

    /* === Button Colors === */
    --primary-text-color: #ffffff;
    --primary-bg-hover: var(--primary-hover);
    --primary-bg-active: var(--primary-active);
    --secondary-bg: var(--gray-200);
    --secondary-text-color: var(--gray-600);
    --secondary-hover-bg: var(--gray-300);
    --secondary-active-bg: var(--gray-300);
    --danger-bg: #ef4444;
    --danger-text-color: #ffffff;
    --danger-hover-bg: #dc2626;
    --danger-active-bg: #b91c1c;
    --disabled-bg: var(--gray-200);
    --disabled-text-color: var(--gray-400);

    /* === Input Colors === */
    --input-bg-color: var(--gray-200);
    --input-bg-focus-color: var(--gray-300);
    --input-bd-color: var(--gray-300);
    --input-bd-focus-color: var(--gray-400);
    --input-bd-width: 1px;

    /* === Table Colors === */
    --table-header-bg-color: var(--gray-100);
    --table-bd-color: var(--gray-200);
    --table-row-bg: transparent;
    --table-hover-bg-color: var(--gray-200);

    /* === Menu Colors === */
    --menu-bg: transparent;
    --menu-color: var(--gray-600);
    --menu-btn-bg: transparent;
    --menu-btn-bg-hover: rgba(255, 255, 255, 0.05);
    --menu-btn-bg-active: rgba(255, 255, 255, 0.08);

    /* === Status Colors === */
    --walk-in-color: var(--gray-300);
    --online-color: #60a5fa;
    --local-color: #34d399;
    --status-not-started-rgb: 0, 168, 120;
    --status-arrived-rgb: 156, 163, 175;
    --status-done-rgb: 58, 63, 71;
    --status-late-rgb: 251, 146, 60;
}

/* Status-Farben */
.is-not-started {
    --status-rgb: var(--status-not-started-rgb);
    background: rgba(var(--status-rgb), var(--status-bg-alpha));
}

.is-arrived {
    --status-rgb: var(--status-arrived-rgb);
    background: rgba(var(--status-rgb), var(--status-bg-alpha));
}

.is-done {
    --status-rgb: var(--status-done-rgb);
    background: rgba(var(--status-rgb), var(--status-bg-alpha));
}

.is-late {
    --status-rgb: var(--status-not-started-rgb);
    background: rgba(var(--status-rgb), var(--status-bg-alpha));
    border-left: 4px solid rgb(var(--status-late-rgb));
}

.res-table .status-bg.is-late {
    background: rgb(var(--status-late-rgb));
    border-left: none;
}

.is-request {
    --status-rgb: var(--danger-rgb);
    background: var(--danger);
}

.is-online-unconfirmed {
    --status-rgb: 68, 168, 235;
    background: rgba(var(--status-rgb), var(--status-bg-alpha));
}

.is-cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Belegungsplan Block Gradients */
.bp-block.is-not-started {
    background: linear-gradient(135deg, rgb(var(--status-not-started-rgb)), color-mix(in srgb, rgb(var(--status-not-started-rgb)) 75%, black));
}

.bp-block.is-arrived {
    background: linear-gradient(135deg, rgb(var(--status-arrived-rgb)), color-mix(in srgb, rgb(var(--status-arrived-rgb)) 75%, black));
}

.bp-block.is-done {
    background: linear-gradient(135deg, rgb(var(--status-done-rgb)), color-mix(in srgb, rgb(var(--status-done-rgb)) 75%, black));
}

.bp-block.is-late {
    background: linear-gradient(135deg, rgb(var(--status-not-started-rgb)), color-mix(in srgb, rgb(var(--status-not-started-rgb)) 75%, black));
}

.bp-block.is-request {
    background: linear-gradient(135deg, var(--danger), color-mix(in srgb, var(--danger) 75%, black));
}

.bp-block.is-online-unconfirmed {
    background: linear-gradient(135deg, rgb(68, 168, 235), color-mix(in srgb, rgb(68, 168, 235) 75%, black));
}

/* Root skaliert alles, was in rem ist */
html {
    font-size: calc(var(--font-size) * var(--tx-zoom, 1));
    font-family: 'RobotoCondensedRegular', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'RobotoCondensedRegular', sans-serif;
    font-size: var(--font-size);
    background-color: var(--body-bg);
    color: var(--text-color);
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: auto;
    user-select: none;
}

* {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

/* Header (global - used by multiple layouts and child components) */
.header-bar {
    display: flex;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background-color: var(--primary);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: white;
}

.header-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
}

.header-button {
    font-size: 0.9rem;
    min-width: 42px;
    max-width: 100px;
    flex: 1 1 auto;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    background: var(--primary);
    border: transparent;
    color: whitesmoke;
    cursor: pointer;
    gap: 2px;
    transition: filter 0.1s ease, transform 0.1s ease;
    align-content: center;
}

    .header-button.emphasized {
        position: relative;
    }

        .header-button.emphasized::before {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
        }

/* Save indicator for auto-save */
.save-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 4px;
    perspective: 400px;
}

.save-indicator-inner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: saveFlip 2.5s ease-in-out forwards;
    transform-style: preserve-3d;
}

.save-indicator-inner i {
    font-size: 1rem;
    color: white;
}

@keyframes saveFlip {
    0% {
        transform: rotateY(-90deg);
        opacity: 0;
    }
    15% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    75% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: rotateY(90deg);
        opacity: 0;
    }
}

/* Navigation arrows for date switching */
.nav-arrow {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
    transition: opacity 0.15s ease;
}

.nav-arrow-left {
    transform: rotate(90deg);
}

.nav-arrow-right {
    transform: rotate(-90deg);
}

.header-button:hover .nav-arrow {
    opacity: 0.7;
}

.header-input {
    border: none !important;
    background-color: transparent !important;
    outline: none !important;
    color: whitesmoke;
}

/* ##################################### */
/*               Icons                   */
/* ##################################### */
.mdi {
    font-size: 1.2rem;
}

/* ##################################### */
/*            Message Status             */
/* ##################################### */

.sms-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.status-ok {
    color: green;
}

.status-error {
    color: red;
}

.status-warn {
    color: darkorange;
}

.status-pending {
    color: gray;
}

.status-unknown {
    color: #666;
}

/* ##################################### */
/*            Basic Elements             */
/* ##################################### */

.divider {
    background-color: var(--gray-300);
    height: 1px;
    margin: 20px 0px;
}

.description {
    font-size: 0.7rem;
    font-weight: 400;
    color: gray;
    line-height: 1.5;
}

/* ======================================== */
/*              Inputs                      */
/* ======================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    width: 100%;
    height: var(--input-min-height);
    padding: var(--input-padding);
    font-size: var(--font-size);
    color: var(--text-color);
    background-color: var(--input-bg-color);
    border: var(--input-bd-width) solid var(--input-bd-color);
    border-radius: var(--input-border-radius);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    input[type="text"]:hover,
    input[type="email"]:hover,
    input[type="password"]:hover,
    input[type="number"]:hover,
    input[type="tel"]:hover,
    input[type="url"]:hover,
    input[type="search"]:hover,
    input[type="date"]:hover,
    input[type="time"]:hover,
    input[type="datetime-local"]:hover {
        border-color: var(--gray-400);
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="number"]:focus,
    input[type="tel"]:focus,
    input[type="url"]:focus,
    input[type="search"]:focus,
    input[type="date"]:focus,
    input[type="time"]:focus,
    input[type="datetime-local"]:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

    input[type="text"]:disabled,
    input[type="email"]:disabled,
    input[type="password"]:disabled,
    input[type="number"]:disabled,
    input[type="tel"]:disabled,
    input[type="url"]:disabled,
    input[type="search"]:disabled,
    input[type="date"]:disabled,
    input[type="time"]:disabled,
    input[type="datetime-local"]:disabled {
        background-color: var(--gray-100);
        color: var(--gray-400);
        cursor: not-allowed;
    }

/* ======================================== */
/*              Selects                     */
/* ======================================== */

select {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: var(--input-padding);
    font-size: var(--font-size);
    color: var(--text-color);
    background-color: var(--input-bg-color);
    border: var(--input-bd-width) solid var(--input-bd-color);
    border-radius: var(--input-border-radius);
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    select:hover {
        border-color: var(--gray-400);
    }

    select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

    select:disabled {
        background-color: var(--gray-100);
        color: var(--gray-400);
        cursor: not-allowed;
        opacity: 0.6;
    }

    select.select-secondary {
        background-color: var(--gray-100);
        border: none;
        color: var(--text-color);
    }

    select.select-header {
        color: white;
        background-color: var(--primary);
    }

        select.select-header:hover {
            background-color: var(--header-input-hover-bg);
        }

/* ======================================== */
/*             Checkbox                     */
/* ======================================== */

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: all 0.15s ease;
}

    input[type="checkbox"]:hover {
        border-color: var(--gray-400);
    }

    input[type="checkbox"]:checked {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    input[type="checkbox"]::after {
        content: "";
        position: absolute;
        left: 5px;
        top: 1px;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        opacity: 0;
        transition: opacity 0.1s ease;
    }

    input[type="checkbox"]:checked::after {
        opacity: 1;
    }

    input[type="checkbox"]:focus {
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

    input[type="checkbox"]:disabled {
        background-color: var(--gray-100);
        border-color: var(--gray-200);
        cursor: not-allowed;
    }

    input[type="checkbox"]:disabled:checked {
        background-color: var(--gray-300);
        border-color: var(--gray-300);
    }

.checkbox-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: fit-content;
    padding:5px 0;
}

    .checkbox-field .form-hint {
        font-size: 12px;
        color: var(--gray-500);
        margin-left: 26px;
        line-height: 1.3;
    }

.checkbox-container {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

/* ======================================== */
/*                Input                     */
/* ======================================== */

input {
    display: block;
    height: 40px;
    font-size: var(--font-size);
    color: var(--text-color);
    border: var(--input-bd-width) solid var(--input-bd-color);
    border-radius: var(--input-border-radius);
    background-color: var(--input-bg-color);
    padding: var(--input-padding);
    box-sizing: border-box;
    width: 100%;
}

    input[hidden] {
        display: none !important;
    }


    input:focus {
        border-color: var(--input-bd-focus-color);
        outline: none;
    }

    input.small {
        display: inline-block;
        height: 30px;
        font-size: var(--font-size);
        color: var(--text-color);
        border: 1px solid var(--input-bd-color);
        border-radius: var(--input-border-radius);
        background-color: var(--input-bg-color);
        padding: 2px 6px;
        box-sizing: border-box;
        width: 80px;
    }

        input.small:focus {
            border-color: var(--input-bd-focus-color);
            outline: none;
        }

textarea.grow {
    field-sizing: content;
    min-height: 40px;
    max-height: 150px;
    font-size: var(--font-size);
    color: var(--text-color);
    border: var(--input-bd-width) solid var(--input-bd-color);
    border-radius: var(--input-border-radius);
    background-color: var(--input-bg-color);
    padding: var(--input-padding);
    box-sizing: border-box;
    width: 100%;
    font-family: sans-serif;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    textarea.grow:hover {
        border-color: var(--gray-400);
    }

    textarea.grow:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

/* "Browser" Buttons Up, Down im Number input ausblenden*/
/* Webkit / Blink (Chrome, Edge, Safari, Opera) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* ======================================== */
/*              Buttons                     */
/* ======================================== */

.btn {  
    display: inline-flex;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    min-height: var(--input-min-height);
    padding: 8px 18px;
    font-size: var(--font-size);
    font-weight: 500;
    gap: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    background:var(--gray-100);
    border: 1px solid var(--border-color);
    border-radius: var(--btn-border-radius);
    color: var(--text-color);
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

    .btn:disabled {
        cursor: not-allowed;
        opacity: 0.85;
    }


.btn-primary,
.btn-secondary,
.btn-danger {
    color: var(--primary-text-color);
}

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

    .btn-primary:hover {
        background-color: var(--primary-bg-hover);
    }

    .btn-primary:active {
        background-color: var(--primary-bg-active);
    }

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--secondary-text-color);
}

    .btn-secondary:hover {
        background-color: var(--secondary-hover-bg) !important;
    }

    .btn-secondary:active {
        background-color: var(--secondary-active-bg);
    }

.btn-transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    .btn-transparent:hover {
        background: var(--gray-100) !important;
    }

.btn-footer {
    color: var(--secondary-text-color);
    border-radius: 0px;
    border: none;
    background: var(--input-bg-color);
}

    .btn-footer:hover {
        background-color: var(--secondary-hover-bg) !important;
    }

    .btn-footer:active {
        background-color: var(--secondary-active-bg);
    }

.btn-danger {
    background-color: var(--danger-bg);
    color: var(--danger-text-color);
    border: var(--danger-bg);
}

    .btn-danger:active {
        background-color: var(--danger-active-bg);
    }

    .btn-danger:disabled {
        visibility: collapse;
    }

.btn-nobg {
    background-color: transparent;
    color: var(--secondary-text-color);
}

    .btn-nobg:hover {
        background-color: var(--secondary-hover-bg);
    }

    .btn-nobg:disabled {
        visibility: collapse;
    }

/* Icon-Button */
.btn-icon,
.btn-icon.small {
    padding: 8px;
    min-width: var(--input-min-height);
    background-color: transparent;
    color: var(--text-color);
    line-height: 1;
}

    .btn-icon.small {
        padding: 2px 8px;
        max-height: 34px;
        min-height: 10px;
    }

        .btn-icon:hover,
        .btn-icon.small:hover {
            background-color: rgba(0,0,0,0.05);
        }

/* Sort Toggle Button */
.btn-sort {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
}

    .btn-sort.active {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .btn-sort:hover:not(.active) {
        background-color: rgba(0,0,0,0.05);
    }

/* Danger Icon Button */
.btn-danger-icon {
    min-width: var(--input-min-height);
    color: red;
    padding: 4px;
    border: none;
    background-color: transparent;
}

    .btn-danger-icon.small {
        padding: 2px 8px;
        margin: 0px;
        max-height: 34px;
    }

    .btn-danger-icon:hover {
        background-color: var(--danger-hover-bg);
        color: white;
    }

/* Close Button */
.btn-close {
    background-color: var(--white);
    color: var(--text-color);
}

    .btn-close:hover {
        background-color: var(--secondary-hover-bg);
    }

/* Spinner inside Button */
.btn .spinner,
.btn .smallspinner {
    border-color: hsla(0,0%,100%,0.3);
    border-top-color: var(--primary-text-color);
}

/* Focus outline */
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-circle {
    border-radius: 3px;
    color: white;
    min-height: 0;
    height: var(--input-min-height);
    width: 38px;
    background-color: var(--primary);
}

.btn-small {
    max-height: 35px;
    min-height: 30px;
    min-width: 60px;
    padding: 2px 5px;
    background: var(--primary);
    font-weight: 500;
    border: none;
    color: white;
}

/* ======================================== */
/*              Info-Box                    */
/* ======================================== */
.info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #d7ece6;
    padding: 12px 16px;
    border-radius: 2px;
    color: #2d3e50;
    font-size: var(--font-size);
    margin-bottom: 16px;
}

    .info-box > i:first-child {
        font-size: 1.2em;
        color: var(--primary);
    }

    .info-box .save-status {
        margin-left: auto;
        color: var(--muted-color);
    }

.unlock-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: #fff5e6;
    border-radius: 2px;
    margin-bottom: 16px;
}

.url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--body-bg);
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 4px;
}

    .url-row code {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9em;
    }

    .info-box.warning {
        background-color: #fff5e6;
        border-left-color: #ff9800;
    }

    .info-box.success {
        background-color: #eaf7ea;
        border-left-color: #4caf50;
    }

    .info-box.error {
        background-color: #fdecea;
        border-left-color: #f44336;
    }

/* ======================================== */
/*              Drag and Drop               */
/* ======================================== */

.col-order {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

.handle-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 0;
    text-align: center;
}

.drag-handle {
    cursor: grab;
    opacity: 0.4;
    padding: 0.25rem;
    background: transparent;
    border: none;
    width:100%;
    transition: opacity 0.15s ease;
}

    .drag-handle:hover {
        opacity: 0.7;
    }

    .drag-handle:active {
        cursor: grabbing;
        opacity: 1;
    }

/* ======================================== */
/*            Page Layout              */
/* ======================================== */

.page-content {
    max-width: 2000px;
    padding: 25px;
    row-gap: 8px;
    display: grid;
}

@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .page-content {
        padding: 5px;
    }
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 12px 10px;
  
  
    margin-bottom: 5px;
}

    .page-header .tx-search-input {
        flex: 1;
        max-width: 280px;
        min-width: 150px;
    }

    .page-header .btn {
        height: var(--input-min-height);
        padding: 0 12px;
        white-space: nowrap;
        min-width:100px;
    }

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

    .page-title i {
        font-size: 20px;
        color: var(--primary);
    }

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    position: sticky;
    top: -25px;
    margin: -25px -25px 0 -25px;
    padding: 25px 25px 10px 25px;
    background: var(--body-bg);
    z-index: 15;
}

    .page-toolbar .tx-search-input {
        flex: 1;
        max-width: 280px;
        min-width: 150px;
    }

    .page-toolbar .btn {
        height: var(--input-min-height);
        padding: 0 12px;
        white-space: nowrap;
    }

@media (max-width: 768px) {
    .page-toolbar {
        top: -15px;
        margin: -15px -15px 0 -15px;
        padding: 15px 15px 10px 15px;
    }
}

@media (max-width: 400px) {
    .page-toolbar {
        top: -5px;
        margin: -5px -5px 0 -5px;
        padding: 5px 5px 10px 5px;
    }
}

.header-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Two-row toolbar (z.B. RoomAndTables, HotelUnits) */
.page-toolbar.two-rows {
    flex-direction: column;
    align-items: stretch;
}

    .page-toolbar.two-rows .toolbar-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .page-toolbar.two-rows .toolbar-row.controls {
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

        .page-toolbar.two-rows .toolbar-row.controls .tx-select {
            margin: 0;
        }

.page-controls {
    display: flex;
    gap: 16px;
    align-items: end;
    padding: 12px 14px;
   
}

    .page-controls .form-field {
        margin-bottom: 0;
        min-width: 180px;
    }

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

    .settings-form h3 {
        margin: 8px 0 0 0;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-color);
    }

    .settings-form .mandatory-field {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid var(--gray-100);
    }

.notification-type-block {
    padding: 0 16px 10px 0px;
    border-bottom: 1px solid var(--gray-100);
    display: grid;
    gap: 4px;
}

    .notification-type-block:last-child {
        border-bottom: none;
    }

.notification-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .notification-type-header h3 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
    }

.page-loading {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--gray-400);
}

    .page-empty i {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .page-empty p {
        margin: 0;
        font-size: 14px;
    }

.page-body {
    padding: 0;
}

/* List Items (card-style) */
.list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
}

    .list-item:last-child {
        border-bottom: none;
    }

@media (hover: hover) {
    .list-item:hover {
        background: var(--gray-100);
    }
}

    .list-item:active {
        background: var(--gray-200);
    }

.list-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.list-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-subtitle {
    font-size: 12px;
    color: var(--gray-500);
}

.list-item-icon {
    color: var(--gray-400);
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header .tx-search-input {
        max-width: none;
    }

    .header-buttons {
        justify-content: flex-start;
    }

    .page-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-controls .form-field {
        min-width: auto;
    }
}

/* ======================================== */
/*                Table                     */
/* ======================================== */

.table-wrapper {
    max-height: unset;
    overflow: unset;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    line-height: 1.4;
    font-size: 14px;
    background:var(--white);
}

thead th {
    position: sticky;
    top: var(--toolbar-height, 0px);
    z-index: 10;
    background-color: var(--table-header-bg-color);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
}

    thead th input,
    thead th select {
        background-color: var(--input-bg-color);
        border-color: var(--gray-300);
    }

td {
    padding: 6px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-color);
   
}

.td-actions {
    padding-top: 0;
    padding-bottom: 0;
    white-space: nowrap;
    text-align: right;
}

    .td-actions .btn {
        padding: 6px 10px;
        font-size: 13px;
    }

tbody tr {
    background-color: var(--table-row-bg);
    transition: background-color 0.1s ease;
}

@media (hover: hover) {
    tbody tr:hover {
        background-color: var(--table-hover-bg-color);
        cursor: pointer;
    }
}

@media (hover: none) {
    tbody tr:active {
        background-color: var(--table-hover-bg-color);
    }
}

tr.group-header {
    position: sticky;
    top: 0;
    background-color: var(--gray-200);
    z-index: 5;
}

    tr.group-header td {
        font-weight: 600;
    }

tr.placeholder {
    cursor: default;
    pointer-events: none;
    opacity: 0.6;
}

.handle-cell {
    width: 40px;
    text-align: center;
}

.td-icons {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

    .td-icons i {
        color: var(--gray-300);
        margin-left: 8px;
    }

    .td-icons .qr-icon {
        color: var(--primary);
    }

    .td-icons .time-credit {
        font-size: 12px;
        color: var(--muted-color);
        margin-left: 8px;
    }

.icon-action {
    cursor: pointer;
    transition: color 0.15s;
}

    .icon-action:hover {
        color: var(--primary) !important;
    }

.hotel-rooms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Opening Hours */
.opening-hours-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0px 5px 12px 0;
    background: var(--body-bg);
    border-bottom: 1px solid var(--border-color);
}

.opening-hours-btn {
    font-size: 13px;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

    .opening-hours-btn.active {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

    .opening-hours-btn:hover:not(.active) {
        background: var(--lightgray-color);
    }

.opening-hours-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--table-header-bg-color);
    border-bottom: 1px solid var(--border-color);
}

.opening-hours-title {
    font-weight: 600;
    color: var(--text-color);
}

.opening-hours-table {
    width: 100%;
}

    .opening-hours-table td {
        vertical-align: middle;
        padding: 5px 8px;
    }

    .opening-hours-table .col-day {
        width: 70px;
    }

    .opening-hours-table .col-date {
        width: 100px;
    }

    .opening-hours-table .col-actions {
        width: 70px;
    }

    .opening-hours-table .time-select {
        min-width: 80px;
        max-width: 100px;
    }

.td-actions {
    text-align: right;
    white-space: nowrap;
    width: 80px;
}

.save-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: var(--muted-color);
    font-size: 13px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mobile styles for Opening Hours */
@media (max-width: 768px) {
    .opening-hours-selector {
        padding: 0px 5px 12px 0;
        gap: 5px;
        overflow-x: auto;
    }

    .opening-hours-btn {
        font-size: 12px;
        padding: 5px 8px;
        flex-shrink: 0;
    }

    .opening-hours-header {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .opening-hours-title {
        font-size: 13px;
    }

    .opening-hours-table {
        font-size: 13px;
    }

    .opening-hours-table .col-day {
        width: 40px;
    }

    .opening-hours-table .col-date {
        width: 70px;
        font-size: 12px;
    }

    .opening-hours-table .col-actions {
        width: 40px;
    }

    .opening-hours-table td {
        padding: 4px 3px;
    }

    .opening-hours-table .time-select {
        min-width: auto;
        max-width: none;
    }

    .opening-hours-table .time-select .tx-select-trigger {
        font-size: 13px;
        padding: 2px 4px;
        background: transparent;
        border: none;
        min-height: auto;
        height: auto;
        box-shadow: none;
    }

    .opening-hours-table .time-select .tx-select-value {
        font-size: 13px;
    }

    .opening-hours-table .time-select .tx-select-caret {
        font-size: 14px;
        margin-left: 2px;
    }

    .td-actions {
        width: 40px;
        min-width: 40px;
    }

    .td-actions .btn-icon {
        width: 28px;
        height: 28px;
        padding: 0;
    }

    .toolbar-left,
    .toolbar-right {
        gap: 5px;
    }

    .toolbar-left {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .toolbar-right .tx-checkbox {
        flex: 1;
    }
}

.table-row-header {
    position: sticky;
    display: flex;
    top: 40px;
    margin: 0;
    flex: 1;
    background-color: var(--table-header-bg-color);
    border-bottom: 0px solid var(--gray-300);
    padding: 0 10px;
    height: 35px;
    align-items: center;
    font-weight: 600;
    justify-content: space-between;
    z-index:9;
}

.group-pax {
    font-weight: 600;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ##################################### */
/*            Layouts                */
/* ##################################### */

.hFlex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vFlex {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.form-field {
    display: grid;
}

    .form-field label {
        font-size: var(--font-size);
        font-weight: 400;
        color: var(--text-color);
        margin-bottom: 3px;
    }

    .form-field .form-hint {
        font-size: 12px;
        color: var(--gray-500);
        margin-bottom: 4px;
        line-height: 1.3;
    }

.chip-select-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    min-height: 38px;
    padding: 5px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    cursor: pointer;
}

    .chip-select-container:hover {
        border-color: var(--primary);
    }

    .chip-select-container .placeholder-text {
        color: var(--gray-300);
    }

    .chip-select-container .chip-select-icon {
        margin-left: auto;
        color: var(--gray-300);
    }

/* ##################################### */
/*        �berschriften-Stile            */
/* ##################################### */

h1, h2, h3 {
    margin: 0;
    padding: 0;
    font-weight: bold;
    line-height: 1.4;
    color: var(--text-color);
    align-content: center;
}

h1 {
    font-size: 1.2rem;
    color: whitesmoke;
}

h2 {
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
    min-height: 40px;
}

h3 {
    font-size: var(--font-size);
    font-weight: 600;
}

b, strong { /* wtf, blazor internal stylesheet :D */
    font-weight: bold;
}

/* ##################################### */
/*               Spinner                 */
/* ##################################### */

.spinner {
    border: 2px solid #f3f3f3 !important;
    border-top: 2px solid #3498db !important;
    border-radius: 50% !important;
    width: 22px;
    height: 22px;
    animation: spin 0.5s linear infinite, spinnerFadeIn 0.1s ease-out 0.2s forwards;
    opacity: 0;
    display: inline-block !important;
    align-self: center !important;
}

    .spinner.small {
        width: 10px;
        height: 10px;
        margin: 0 10px;
    }

@keyframes spinnerFadeIn {
    to { opacity: 1; }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* BASIS-LAYOUT BLOCK */

/* Desktop + Tablet*/
.page-container {
    padding: 30px 30px;
    margin: 0px 0px;
    max-width: 1450px;
    min-height: calc(100dvh - 100px);
}

/* Tablet*/
@media (max-width: 800px) {
    .page-container {
        padding: 20px 20px;
        margin: 0px 0px;
    }
}

/* Mobile*/
@media (max-width: 500px) {
    .page-container {
        padding: 10px 10px;
        margin: 0px 0px;
    }
}

/* MROs Phone*/
@media (max-width: 400px) {
    .page-container {
        padding: 2px 2px;
        margin: 0px 0px;
    }
}

/* Sub-Tabs für kombinierte Settings */
.sub-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.sub-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.15s ease;
}

    .sub-tab:hover {
        background: var(--gray-100);
    }

    .sub-tab.active {
        background: var(--primary);
        color: white;
    }

    .sub-tab i {
        font-size: 18px;
    }

@media (max-width: 500px) {
    .sub-tabs {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .sub-tab {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .sub-tab i {
        font-size: 16px;
    }
}

.block {
    display: grid;
    grid-template-columns: minmax(90px, 110px) repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    align-content: start;
}

    /* Header oder volle Breite */
    .block > h3,
    .block > .full {
        grid-column: 1 / -1;
    }

    /* =============================== */
    /* SPALTENSTEUERUNG                */
    /* =============================== */

    /* Column Start*/
    .block > .c1 {
        grid-column-start: 1;
    }

    .block > .c2 {
        grid-column-start: 2;
    }

    .block > .c3 {
        grid-column-start: 3;
    }

    .block > .c4 {
        grid-column-start: 4;
    }

    /* Column Span */
    .block > .s1 {
        grid-column-end: span 1;
    }

    .block > .s2 {
        grid-column-end: span 2;
    }

    .block > .s3 {
        grid-column-end: span 3;
    }

    .block > .s4 {
        grid-column-end: span 4;
    }

@media (max-width: 650px) {
    .block > *:not(.c1):not(.c2):not(.c3):not(.c4) {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 650px) {
    .block > .c1,
    .block > .c2,
    .block > .c3,
    .block > .c4 {
        grid-column-start: auto;
    }
}

/* =============================== */
/* AUSRICHTUNG (HORIZONTAL/VERTIKAL) */
/* =============================== */

/* Horizontal */
.block > .left {
    justify-self: start;
    text-align: left;
}

.block > .center {
    justify-self: center;
    text-align: center;
}

.block > .right {
    justify-self: end;
    text-align: right;
}

/* Vertikal */
.block > .align-top {
    align-self: start;
}

.block > .align-middle {
    align-self: center;
}

.block > .align-bottom {
    align-self: end;
}

/* =============================== */
/* HEADER-VARIANTEN                */
/* =============================== */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1px;
    min-width: 300px;
}

    .topbar-right .header-button {
        font-size: 0.9rem;
        min-width: 50px;
        max-width: 100px;
        flex: 1 1 auto;
        height: var(--topbar-height);
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-evenly;
        background: var(--primary);
        border: transparent;
        color: whitesmoke;
        cursor: pointer;
        gap: 2px;
        transition: filter 0.1s ease, transform 0.1s ease;
    }

        .topbar-right .header-button:hover {
            filter: brightness(1.10);
        }

        .topbar-right .header-button:active {
            filter: brightness(0.9);
            transform: scale(0.98); /* Leicht eindr�cken */
        }

.header-button.emphasized {
    filter: brightness(1.01);
}

    .header-button.emphasized:hover {
        filter: brightness(1.15);
    }

    .header-button.emphasized:active {
        filter: brightness(0.95);
        transform: scale(0.98);
    }

/* 2-Spaltiger Header (z. B. Titel + Button) */
.block.header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    border-bottom: 0px solid var(--gray-100);
    border-radius: 0px;
    margin-bottom: 10px;
    align-items: center;
    min-height: 45px;
    position: sticky;
    top: 0;
    background-color: var(--body-bg);
    z-index: 20;
}

/* Admin utility classes */
.header-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-left: auto;
    align-items: center;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

    .form-row > .form-field {
        margin-bottom: 0;
    }

.sticky-action {
    position: sticky;
    top: 65px;
}

.empty-state {
    padding: 10px;
    color: var(--gray-500);
}

.nowrap {
    white-space: nowrap;
}

.border-bottom {
    border-bottom: 1px solid var(--gray-100);
}

.text-danger {
    color: red;
}

/* Narrow admin pages (single column forms) */
.adm-narrow {
    max-width: 650px;
}

    .adm-narrow .block.header,
    .adm-narrow .block {
        max-width: 100%;
    }

/* Verf�gbarkeitsstatus */
.available {
    border: 1px solid green;
    background-color: white;
    color: green;
}

.unavailable {
    border: 1px solid red;
    background-color: #ffe6e6;
    color: red;
}

.show {
    display: block;
}

.hide {
    display: none;
}

.validation-message {
    color: red;
}

/* Pflichtfelder: roter Rahmen auf das Input-Element */
.required-label ~ input,
.required-label ~ select,
.required-label ~ textarea,
.required-label ~ .tx-select-container .tx-select-trigger {
    border-color: var(--danger) !important;
}

.input-invalid {
    border-color: var(--danger, #d9534f);
    outline: none;
}

.required {
    border-color: var(--danger) !important;
}

@media (max-width:500px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width:800px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (min-width:800px) {
    .hide-desktop {
        display: none !important;
    }
}

.mobile-footer {
    display: flex !important;
    width: 100%;
    height: 50px;
}

    .mobile-footer > * {
        flex: 1;
    }

.mobile-only {
    display: none !important;
}

@media (max-width: 800px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .topbar-right .header-button {
        width: 100%;
        padding: 0px;
    }
}

@media (max-width: 1000px) {
    .tx-select-item[data-value="both"] {
        display: none;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */

.inline {
    display: inline-flex;
}

.muted {
    opacity: 0.65;
}

* {
    scrollbar-width: thin;
}

/* Chips */
.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    background:var(--gray-50);
}

.chip--table {
    background: rgba(var(--primary-rgb), 0.15);
}

.chip--alt {
    background: rgba(var(--status-alternative-rgb), 0.5);
}

.chip--room {
    background: rgba(var(--roompreference-rgb), 0.8);
    color: white;
}

.chip--appprovider {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Chip-Buttons für Filter (Pill Style) */
.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 15px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-height: 34px;
    min-width: 60px;
    justify-content: center;
}

.chip-btn:hover {
    border-color: var(--gray-400);
}

.chip-btn.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}

.chip-btn i.mdi {
    font-size: 1.1rem;
}

/* Swipe Action Label (global, da am body angehängt) */
.swipe-action-label {
    position: fixed;
    pointer-events: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1000;
}

.swipe-action-label.visible {
    opacity: 1;
}

.swipe-action-label.checkin {
    background: var(--primary);
    color: white;
}

.swipe-action-label.checkout {
    background: #3498db;
    color: white;
}

/* ======================================== */
/*            Guided Tour                   */
/* ======================================== */

/* Tour Container - erzeugt einen eigenen Stacking Context ganz oben */
.tour-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647; /* Maximum z-index */
    pointer-events: none;
    isolation: isolate;
}

/* Spotlight mit box-shadow für Overlay */
.tour-spotlight {
    position: fixed;
    border-radius: 8px;
    /* pointer-events: none damit man durch das Loch klicken kann */
    pointer-events: none;
    /* Sanfte Animation beim Wechseln */
    transition: all 0.25s ease-out;
    /* Box-shadow erzeugt das dunkle Overlay mit Loch */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    /* Pulsierender Rahmen */
    border: 3px solid var(--primary, #007bff);
    animation: tourPulse 1.5s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% {
        border-color: var(--primary, #007bff);
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65), 0 0 0 4px rgba(0, 123, 255, 0.3);
    }
    50% {
        border-color: #4da3ff;
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65), 0 0 15px 6px rgba(0, 123, 255, 0.5);
    }
}

.tour-tooltip {
    position: fixed;
    z-index: 1;
    pointer-events: auto;
    background: var(--body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 16px;
    width: 340px;
    max-width: calc(100vw - 32px);
    animation: tourFadeIn 0.3s ease-out;
}

@keyframes tourFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tour-tooltip-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--body-bg, #fff);
    transform: rotate(45deg);
}

/* Fix positionierter Tooltip unten rechts */
.tour-tooltip.tour-fixed {
    bottom: 24px;
    right: 24px;
    top: auto;
    left: auto;
}

/* Arrow nicht mehr nötig bei fixer Position */
.tour-tooltip.tour-fixed .tour-tooltip-arrow {
    display: none;
}

/* Legacy arrow styles für dynamische Positionierung */
.tour-tooltip.bottom .tour-tooltip-arrow {
    top: -7px;
    left: 24px;
}

.tour-tooltip.top .tour-tooltip-arrow {
    bottom: -7px;
    left: 24px;
}

.tour-tooltip.left .tour-tooltip-arrow {
    right: -7px;
    top: 24px;
}

.tour-tooltip.right .tour-tooltip-arrow {
    left: -7px;
    top: 24px;
}

.tour-tooltip.center .tour-tooltip-arrow {
    display: none;
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tour-step-counter {
    font-size: 0.75rem;
    color: var(--gray-300);
    font-weight: 600;
    background: var(--gray-100);
    padding: 2px 10px;
    border-radius: 10px;
}

.tour-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-300);
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.tour-close-btn:hover {
    background: var(--gray-100);
    color: var(--text-color);
}

.tour-tooltip-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.tour-tooltip-content {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.tour-tooltip-content p { margin: 0 0 8px 0; }
.tour-tooltip-content ul { margin: 8px 0; padding-left: 20px; }
.tour-tooltip-content li { margin-bottom: 6px; }
.tour-tooltip-content b, .tour-tooltip-content strong { color: var(--text-color); font-weight: 600; }

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.tour-tooltip-footer .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    cursor: pointer;
}

.tour-finish-buttons {
    display: flex;
    gap: 8px;
}

/* Article Text (Help Content) - muss global sein für MarkupString */
.article-text {
    line-height: 1.6;
    color: var(--text-color);
    font-size: 13px;
}

.article-text p {
    margin: 0 0 10px 0;
}

.article-text ul {
    margin: 0 0 10px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.article-text ol {
    margin: 0 0 10px 0;
    padding-left: 24px;
    list-style-type: decimal;
}

.article-text li {
    margin-bottom: 4px;
    display: list-item;
}

.article-text strong {
    font-weight: 600;
}

.article-text h3 {
    margin: 16px 0 8px 0;
    padding: 4px 0 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    border-left: 2px solid var(--gray-400);
    background: var(--gray-100);
}

.article-text h3:first-child {
    margin-top: 0;
}

.article-text h4 {
    margin: 12px 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
}

.article-text h4:first-child {
    margin-top: 0;
}

.article-text blockquote {
    margin: 8px 0 10px 0;
    padding: 6px 10px;
    background: var(--gray-100);
    border-left: 2px solid var(--gray-400);
    font-style: italic;
    font-size: 12px;
}

.article-text blockquote p {
    margin: 0;
}

.article-text em {
    font-style: italic;
    color: var(--gray-500);
}

/* Help Section Cards */
.article-text .help-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.article-text .help-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.article-text .help-section-header i {
    font-size: 18px;
    color: var(--primary);
}

.article-text .help-section-body {
    padding: 14px;
}

.article-text .help-section-body > *:last-child {
    margin-bottom: 0;
}

/* Callout Boxes */
.article-text .callout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.article-text .callout i {
    font-size: 18px;
    flex-shrink: 0;
}

.article-text .callout-tip {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary-hover);
}

.article-text .callout-tip i {
    color: var(--primary);
}

.article-text .callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: #92400e;
}

.article-text .callout-warning i {
    color: var(--warning);
}

.article-text .callout-info {
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid var(--info);
    color: #075985;
}

.article-text .callout-info i {
    color: var(--info);
}

/* Step Cards */
.article-text .steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.article-text .step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
}

.article-text .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.article-text .step-content {
    flex: 1;
    padding-top: 2px;
}

.article-text code {
    background: var(--gray-100);
    padding: 1px 4px;
    border-radius: 2px;
    font-family: monospace;
    font-size: 12px;
}

@media (max-width: 480px) {
    .tour-tooltip.tour-fixed {
        width: calc(100vw - 32px);
        left: 4px !important;
        right: 0;
        bottom: 16px;
    }
    .tour-tooltip-arrow { display: none; }
}


.is-move-mode .bp-block--moving {
    opacity: 0.3;
    pointer-events: none !important;
}

/* Belegungsplan Drag Tooltip - Capacity Badge */
.capacity-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.capacity-badge.positive {
    background: rgba(0, 142, 102, 0.2);
    color: #006b4f;
}

.capacity-badge.negative {
    background: rgba(220, 53, 69, 0.2);
    color: #a71d2a;
}

/* ========================================
   TEST RUNNER PANEL (nur in Debug-Builds)
   ======================================== */

.test-runner-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.test-runner-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, background 0.2s;
    position: relative;
    font-size: 24px;
}

.test-runner-toggle:hover {
    transform: scale(1.1);
}

.test-runner-panel.running .test-runner-toggle {
    background: var(--warning);
    color: #333;
}

.test-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.test-badge.passed {
    background: var(--success);
    color: white;
}

.test-badge.failed {
    background: var(--danger);
    color: white;
}

.test-runner-panel.expanded .test-runner-toggle {
    display: none;
}

.test-runner-content {
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    flex-direction: column;
}

.test-runner-panel.expanded .test-runner-content {
    display: flex;
}

.test-runner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
}

.test-runner-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.test-runner-header .btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

.test-runner-suites {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
    flex-wrap: wrap;
}

.test-runner-suites label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.test-runner-suites select {
    flex: 1;
    min-width: 150px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.test-runner-suites .btn {
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.test-runner-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.test-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 12px;
}

.test-summary.passed {
    background: #e8f5e9;
}

.test-summary.failed {
    background: #ffebee;
}

.summary-icon i {
    font-size: 24px;
}

.test-summary.passed .summary-icon i {
    color: var(--success);
}

.test-summary.failed .summary-icon i {
    color: var(--danger);
}

.summary-stats {
    display: flex;
    gap: 12px;
    flex: 1;
}

.summary-stats .stat {
    font-size: 13px;
    font-weight: 500;
}

.stat.passed {
    color: var(--success);
}

.stat.failed {
    color: var(--danger);
}

.stat.skipped {
    color: var(--gray-500);
}

.summary-time {
    font-size: 12px;
    color: #666;
}

.test-steps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.test-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    background: #f9f9f9;
}

.test-step.passed {
    background: #f1f8f1;
}

.test-step.failed {
    background: #fef2f2;
}

.test-step.running {
    background: #fff8e1;
}

.test-step.skipped {
    background: #f5f5f5;
    opacity: 0.7;
}

.step-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.test-step.passed .step-icon {
    color: var(--success);
}

.test-step.failed .step-icon {
    color: var(--danger);
}

.test-step.running .step-icon {
    color: var(--warning);
}

.test-step.skipped .step-icon {
    color: var(--gray-500);
}

.step-name {
    flex: 1;
    font-size: 13px;
}

.step-time {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
}

.step-error {
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    font-size: 12px;
    user-select: text;
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.error-message {
    color: var(--danger);
    flex: 1;
    user-select: text;
    cursor: text;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 12px;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.error-details {
    margin-top: 4px;
    padding: 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 2px;
    font-size: 10px;
    color: #666;
    overflow-x: auto;
    max-height: 100px;
    user-select: text;
    cursor: text;
}

.test-runner-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.test-runner-empty i {
    font-size: 48px;
    margin-bottom: 12px;
}

.test-runner-empty p {
    margin: 0;
    text-align: center;
    font-size: 14px;
}

.test-runner-empty p.hint {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.7;
}

/* All Suites Results */
.test-summary.all-suites {
    background: #f0f4f8;
    border-left: 4px solid var(--primary);
}

.test-summary.all-suites.passed {
    border-left-color: var(--success);
}

.test-summary.all-suites.failed {
    border-left-color: var(--danger);
}

.test-summary .summary-label {
    flex: 1;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.test-suites-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.test-suite-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

.test-suite-item.passed {
    background: rgba(0, 142, 102, 0.08);
}

.test-suite-item.failed {
    background: rgba(220, 53, 69, 0.08);
}

.test-suite-item.running {
    background: rgba(255, 193, 7, 0.15);
}

.test-suite-item.skipped {
    background: rgba(108, 117, 125, 0.08);
}

.test-suite-item .suite-icon {
    width: 18px;
    display: flex;
    justify-content: center;
}

.test-suite-item.passed .suite-icon {
    color: var(--success);
}

.test-suite-item.failed .suite-icon {
    color: var(--danger);
}

.test-suite-item.running .suite-icon {
    color: var(--warning);
}

.test-suite-item.skipped .suite-icon {
    color: #999;
}

.test-suite-item .suite-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.test-suite-item .suite-stats {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.test-suite-item .suite-expand {
    width: 20px;
    display: flex;
    justify-content: center;
    color: #999;
    transition: transform 0.2s;
}

.test-suite-item.expanded .suite-expand {
    color: #666;
}

.test-suite-item {
    cursor: pointer;
    transition: background 0.2s;
}

.test-suite-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.test-suite-item.expanded {
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.suite-steps-details {
    background: #f8f9fa;
    border-radius: 0 0 4px 4px;
    padding: 8px;
    margin-bottom: 4px;
    border: 1px solid #eee;
    border-top: none;
}

.suite-steps-details .test-step {
    padding: 4px 8px;
    font-size: 12px;
    background: transparent;
}

.suite-steps-details .test-step .step-name {
    font-size: 12px;
}

.suite-steps-details .step-error {
    margin-top: 4px;
    font-size: 11px;
}

.suite-steps-details .error-details {
    font-size: 10px;
    max-height: 100px;
}

.current-suite-steps {
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    max-height: 150px;
    overflow-y: auto;
}

.current-suite-steps .test-steps-list {
    max-height: none;
}

.btn-stop {
    background: var(--danger) !important;
    color: white !important;
}

.btn-stop:hover {
    background: #c82333 !important;
}

@media (max-width: 480px) {
    .test-runner-content {
        width: calc(100vw - 40px);
        max-height: 70vh;
    }

    .test-runner-panel {
        bottom: 10px;
        right: 10px;
    }
}

/* ========================================
   Timeline Drag Ghost Element
   Needs explicit styles because Blazor scoped CSS is lost on clone
   ======================================== */
.oh-drag-ghost {
    position: fixed !important;
    pointer-events: none !important;
    z-index: 10001 !important;
    opacity: 0.9 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, black)) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    color: white !important;
}

.oh-drag-ghost .oh-block-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 4px !important;
    width: 100% !important;
}

.oh-drag-ghost .oh-block-time {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: white !important;
}

.oh-drag-ghost .oh-resize-handle,
.oh-drag-ghost .oh-close-time,
.oh-drag-ghost .oh-close-time-vertical {
    display: none !important;
}

/* Drag tooltip - must be above ghost (10001) */
#oh-drag-tooltip {
    position: fixed;
    padding: 6px 12px;
    background: var(--gray-800);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    pointer-events: none;
    z-index: 10005 !important;
    white-space: nowrap;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

#oh-drag-tooltip i {
    font-size: 14px;
}

/* Body state during timeline drag */
body.timeline-dragging {
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.timeline-dragging.drag-move {
    cursor: grabbing !important;
}

body.timeline-dragging.drag-move * {
    cursor: grabbing !important;
}

body.timeline-dragging.drag-resize,
body.timeline-dragging.drag-resize-vertical {
    cursor: ew-resize !important;
}

body.timeline-dragging.drag-resize *,
body.timeline-dragging.drag-resize-vertical * {
    cursor: ew-resize !important;
}

body.timeline-dragging.drag-resize-vertical,
body.timeline-dragging.drag-resize-vertical * {
    cursor: ns-resize !important;
}

/* Close time resize */
body.timeline-dragging.drag-resize-close,
body.timeline-dragging.drag-resize-close * {
    cursor: ew-resize !important;
}

