/**
 * Admin shell — plain CSS so the panel works even when Vite/Tailwind assets fail to load.
 * Tailwind (via @vite) can still refine spacing when available.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Login stranica (guest layout) */
body.admin-login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.admin-login-card {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-login-card h1 {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-login-card .form-row {
    margin-bottom: 1rem;
}

.admin-login-card input[type="email"],
.admin-login-card input[type="password"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    font: inherit;
}

.admin-field-error {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #b91c1c;
}

.admin-login-card button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background: #27272a;
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.admin-login-card button[type="submit"]:hover {
    background: #18181b;
}

.admin-no-access-lead {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 0.9375rem;
    color: #3f3f46;
    line-height: 1.5;
}

.admin-no-access-hint {
    margin: 0 0 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #71717a;
    line-height: 1.45;
}

.admin-no-access-logout {
    margin: 0;
}

body.admin-page {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #18181b;
    background: #f4f4f5;
    -webkit-font-smoothing: antialiased;
}

.admin-root {
    min-height: 100vh;
}

/* Overlay (mobile) — Alpine x-show kontrolira display */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(24, 24, 27, 0.45);
}

@media (min-width: 1024px) {
    .admin-overlay {
        display: none !important;
    }
}

/* Row: sidebar | content */
.admin-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.admin-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 14rem;
    width: 14rem;
    max-width: min(18rem, calc(100vw - 2.5rem));
    background: #fff;
    border-right: 1px solid #e4e4e7;
    z-index: 50;
}

.admin-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid #e4e4e7;
}

.admin-sidebar__brand a {
    color: #18181b;
    font-weight: 600;
    text-decoration: none;
}

.admin-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.875rem;
}

.admin-sidebar__nav a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 0.375rem;
    color: #27272a;
    text-decoration: none;
}

.admin-sidebar__nav a:hover {
    background: #f4f4f5;
}

.admin-sidebar__nav a.is-active {
    background: #f4f4f5;
    font-weight: 600;
}

.admin-sidebar__foot {
    border-top: 1px solid #e4e4e7;
    padding: 0.5rem;
}

.admin-sidebar__foot button {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    font: inherit;
    color: #52525b;
    cursor: pointer;
}

.admin-sidebar__foot button:hover {
    background: #f4f4f5;
}

/* Mobile drawer */
@media (max-width: 1023.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        flex: none;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    }

    .admin-sidebar.admin-sidebar--open {
        transform: translateX(0);
    }

    .admin-menu-btn {
        display: inline-flex !important;
    }

    .admin-sidebar__close {
        display: inline-flex !important;
    }
}

@media (min-width: 1024px) {
    .admin-sidebar {
        position: relative;
        transform: none !important;
    }

    .admin-menu-btn,
    .admin-sidebar__close {
        display: none !important;
    }
}

.admin-sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #71717a;
    cursor: pointer;
}

.admin-sidebar__close:hover {
    background: #f4f4f5;
    color: #18181b;
}

/* Main column */
.admin-main-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e4e4e7;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-header h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-header__logout {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-header__logout button {
    padding: 0.45rem 0.85rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.375rem;
    background: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3f3f46;
    cursor: pointer;
}

.admin-header__logout button:hover {
    background: #f4f4f5;
}

.admin-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: -0.25rem;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #52525b;
    cursor: pointer;
}

.admin-menu-btn:hover {
    background: #f4f4f5;
}

.admin-main {
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
    .admin-main {
        padding: 1.5rem;
    }
}

/* Bestellungen: volle Breite rechts neben der Sidebar (Desktop) */
@media (min-width: 1024px) {
    .admin-main.admin-main--full-width {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .admin-main.admin-main--full-width .admin-orders-table {
        min-width: 0;
        width: 100%;
    }

    .admin-main.admin-main--full-width #admin-orders-list {
        width: 100%;
        max-width: none;
    }
}

/* Tables & cards inside admin (when Tailwind missing) */
.admin-main table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.875rem;
}

.admin-main thead {
    background: #f4f4f5;
    border-bottom: 2px solid #e4e4e7;
}

.admin-main th,
.admin-main td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e4e4e7;
}

.admin-main th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #52525b;
}

.admin-main tbody tr:nth-child(even) {
    background: rgba(244, 244, 245, 0.65);
}

.admin-main tbody tr:hover {
    background: #f4f4f5;
}

/* Forms */
.admin-main input[type="text"],
.admin-main input[type="email"],
.admin-main input[type="password"],
.admin-main input[type="number"],
.admin-main input[type="date"],
.admin-main input[type="time"],
.admin-main input[type="search"],
.admin-main select,
.admin-main textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    font: inherit;
    background: #fff;
    color: #18181b;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-main input[type="text"]:focus,
.admin-main input[type="email"]:focus,
.admin-main input[type="password"]:focus,
.admin-main input[type="number"]:focus,
.admin-main input[type="date"]:focus,
.admin-main input[type="time"]:focus,
.admin-main input[type="search"]:focus,
.admin-main select:focus,
.admin-main textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1, inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Toolbar filter: eksplicitna klasa ako Tailwind ne učita utility (npr. min-w) */
.admin-toolbar .admin-input,
.admin-input {
    display: block;
    width: 100%;
    min-width: 12rem;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    font: inherit;
    font-size: 0.9375rem;
    background: #fff;
    color: #18181b;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-toolbar .admin-input:focus,
.admin-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1, inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Ukloni Chrome/Safari default styling za type="search" */
.admin-main input[type="search"]::-webkit-search-cancel-button,
.admin-toolbar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.admin-main label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3f3f46;
}

/* Flash */
.admin-flash-success {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
    font-size: 0.875rem;
}

.admin-flash-error {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
}

/* Alatna traka iznad tablica (CRUD index) — ne ovisi o Tailwindu */
.admin-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .admin-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
    }
}

/* Gumbi / poveznice: uvijek čitljiv kontrast, nije 100% širine osim na uskom ekranu */
.admin-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto !important;
    max-width: 100%;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
    cursor: pointer;
    border-style: solid;
    border-width: 1px;
    white-space: nowrap;
}

a.admin-btn,
button.admin-btn {
    -webkit-tap-highlight-color: transparent;
}

.admin-btn--primary {
    background-color: #27272a !important;
    border-color: #18181b !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.admin-btn--primary:hover {
    background-color: #18181b !important;
    color: #ffffff !important;
}

.admin-btn--secondary {
    background-color: #ffffff !important;
    border-color: #d4d4d8 !important;
    color: #3f3f46 !important;
}

.admin-btn--secondary:hover {
    background-color: #f4f4f5 !important;
    color: #18181b !important;
}

/* Formulari: primarni / sekundarni red */
.admin-form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .admin-form-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .admin-form-actions .admin-btn {
        width: auto !important;
    }
}

/* Admin orders index — 7 columns, readable without Tailwind */
.admin-orders-table {
    min-width: 80rem;
}

.admin-orders-table th,
.admin-orders-table td {
    white-space: nowrap;
    vertical-align: top;
}

.admin-orders-table td:nth-child(1) {
    min-width: 11rem;
}

.admin-orders-table td:nth-child(2) {
    min-width: 9.5rem;
}

.admin-orders-table td:nth-child(3) {
    min-width: 10.5rem;
}

.admin-orders-table td:nth-child(5) {
    min-width: 3.5rem;
}

.admin-orders-table td:nth-child(6) {
    min-width: 14rem;
}

.admin-orders-table td:nth-child(7) {
    min-width: 12rem;
}

.admin-whatsapp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    background: #f0fdf4;
    color: #16a34a;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-whatsapp-share-btn:hover:not(:disabled) {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.admin-whatsapp-share-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-whatsapp-share-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.admin-order-meta-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.25rem;
    font-weight: 600;
    color: #18181b;
}

.admin-order-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.admin-order-meta-sep {
    color: #a1a1aa;
    font-weight: 400;
}

.admin-order-id {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #52525b;
}

.admin-order-created {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #71717a;
    white-space: nowrap;
}

.admin-order-stack {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-order-stack > * {
    white-space: nowrap;
}

.admin-order-muted {
    font-size: 0.8125rem;
    color: #71717a;
}

.admin-order-price {
    font-weight: 600;
    color: #18181b;
}

.admin-order-way-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    min-height: 2rem;
}

.admin-order-way-img {
    width: 2rem;
    height: 2rem;
    vertical-align: middle;
    display: block;
}

.admin-order-way-ab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background: #e4e4e7;
    font-size: 0.75rem;
    font-weight: 700;
    color: #3f3f46;
}

.admin-order-way-fallback {
    font-size: 0.875rem;
    color: #a1a1aa;
}

/* Abflughafen autocomplete (Alpine combobox) */
.admin-departure-combo__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 11rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.admin-departure-combo__opt {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    color: #18181b;
    cursor: pointer;
}

.admin-departure-combo__opt:hover,
.admin-departure-combo__opt:focus {
    background: #f4f4f5;
    outline: none;
}

.admin-departure-combo__empty {
    margin: 0;
}

/* Buchung FROM: Abflughafen | Flugnummer | Meet & Greet — eine Zeile 50 % / 25 % / 25 % (6+3+3) */
.admin-from-flight-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 1024px) {
    .admin-from-flight-row {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-end;
    }

    .admin-from-flight-row__departure {
        flex: 2 1 0;
        min-width: 0;
    }

    .admin-from-flight-row__flight {
        flex: 1 1 0;
        min-width: 0;
    }

    .admin-from-flight-row__meet {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        padding-bottom: 0.125rem;
    }
}

/* Flatpickr über Admin-Layout (Sidebar z-index) */
.flatpickr-calendar {
    z-index: 10050;
}

.admin-order-route {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: none;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.admin-order-route-k {
    font-weight: 600;
    color: #3f3f46;
    margin-right: 0.25rem;
}

.admin-badge-ap {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #e0e7ff;
    color: #3730a3;
}

.admin-order-dep {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: #52525b;
}

.admin-order-kmmin {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #18181b;
    white-space: nowrap;
}

.admin-order-add-stop-icon {
    display: inline-block;
    margin-left: 0.25rem;
    color: #0f766e;
    font-size: 0.85rem;
    vertical-align: baseline;
    cursor: help;
}

.admin-order-note-icon {
    display: inline-block;
    margin-left: 0.25rem;
    color: #dc2626;
    font-size: 0.85rem;
    vertical-align: baseline;
    cursor: help;
}

.admin-order-seat-badge {
    display: inline-block;
    min-width: 1.25rem;
    height: 1.125rem;
    line-height: 1.125rem;
    padding: 0 0.35rem;
    margin-left: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #b91c1c;
    border-radius: 9999px;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-order-seat-badge--mg {
    background: #1d4ed8;
}

.admin-order-cnt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1rem;
    padding: 0 0.3rem;
    margin-left: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #b91c1c;
    border-radius: 9999px;
    vertical-align: middle;
}

.admin-order-flight-link {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.admin-order-flight-link:hover {
    color: #1e3a8a;
}

.admin-order-route-line {
    margin: 0;
    line-height: 1.35;
    white-space: nowrap;
}

.admin-order-route-extras {
    display: inline;
}

.admin-table-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .admin-table-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
    }
}

.admin-table-actions--icons {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.admin-icon-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    background: #fff;
    color: #4f46e5;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-icon-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #4338ca;
}

.admin-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.admin-icon-btn--danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.admin-icon-btn--danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.admin-icon-btn--storno-active {
    color: #fff;
    background: #b91c1c;
    border-color: #991b1b;
}

.admin-icon-btn--storno-active:hover {
    background: #991b1b;
    border-color: #7f1d1d;
    color: #fff;
}

.admin-link {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 500;
    color: #4f46e5;
    cursor: pointer;
    text-decoration: none;
}

.admin-link:hover {
    text-decoration: underline;
}

.admin-link--danger {
    color: #b91c1c;
}

/* Bestellformular: ~col-6 (50% Breite ab lg), mobil volle Breite */
.admin-order-form-col6 {
    width: 100%;
}

@media (min-width: 1024px) {
    .admin-order-form-col6 {
        width: 50%;
        max-width: 50%;
    }
}

/* Straße (6) + Hausnr. (3) + Anzahl Zusatzadressen (3) — eine Zeile */
.admin-address-street-add-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 1rem;
    width: 100%;
}

.admin-address-street-add-row__street {
    flex: 2 1 0;
    min-width: 0;
}

.admin-address-street-add-row__nr {
    flex: 1 1 0;
    min-width: 0;
    max-width: 10rem;
}

.admin-address-street-add-row__anzahl {
    flex: 1 1 0;
    min-width: 0;
    max-width: 12rem;
}

/* Zusatzstopp: nur Straße + Hausnr. */
.admin-street-housenr-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 1rem;
    width: 100%;
}

.admin-street-housenr-row__street {
    flex: 1 1 0;
    min-width: 0;
}

.admin-street-housenr-row__nr {
    flex: 0 0 7.5rem;
    width: 7.5rem;
    max-width: 100%;
}

@media (max-width: 22rem) {
    .admin-street-housenr-row__nr {
        flex-basis: 5rem;
        width: 5rem;
    }
}

/* Toggle / Switch — input leží nur über der Spur, nicht über dem Text */
.admin-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.admin-switch__wrap {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    height: 1.375rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.admin-switch__input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.admin-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #d4d4d8;
    pointer-events: none;
    transition: background 0.2s ease;
}

.admin-switch__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

.admin-switch__input:focus-visible + .admin-switch__track {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.admin-switch__input:checked + .admin-switch__track {
    background: #4f46e5;
}

.admin-switch__input:checked + .admin-switch__track::after {
    transform: translateX(1.25rem);
}

.admin-switch__text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #3f3f46;
    line-height: 1.375rem;
}

/* Anrede: Radio als Button-Gruppe */
.admin-radio-group {
    display: inline-flex;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fafafa;
}

.admin-radio-group__opt {
    position: relative;
}

.admin-radio-group__opt:not(:first-child) {
    border-left: 1px solid #d4d4d8;
}

.admin-radio-group__input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.admin-radio-group__btn {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #52525b;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-radio-group__input:hover + .admin-radio-group__btn {
    background: #f4f4f5;
}

.admin-radio-group__input:focus-visible + .admin-radio-group__btn {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

.admin-radio-group__input:checked + .admin-radio-group__btn {
    background: #4f46e5;
    color: #fff;
}

.admin-radio-group__input:checked:hover + .admin-radio-group__btn {
    background: #4338ca;
}

