/* ==========================================================================
   NEUE DESIGNELEMENTE (BOOTSTRAP 5 & DARK MODE)
   ========================================================================== */

:root {
    --ColorTrackDark: #475569;    /* Inaktive Spur des Sliders */
    --ColorSuccessLt: #4ade80;    /* Helles Grün für aktiven Status */
    --ColorPrimaryDk: #0f172a;    /* Dunkle Schriftfarbe im Tooltip */
    --ColorDisabled: #64748b;     /* Schiefergrau deaktiviert */
    --ColorSuccessBtn: #28a745;   /* Kräftiges Grün für Toast/Erfolg */
}

body {
    background-color: #121212 !important;
}

/* Cards für Login & Registrierung */
.login-card, .register-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    border-radius: 15px;
    background: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin: 2rem auto;
}

/* Einheitliche Formularfelder */
.form-control, .form-select {
    background-color: #2b2b2b !important;
    border: 1px solid #3d3d3d !important;
    color: white !important;
    padding: 0.75rem !important;
}

.form-control:focus, .form-select:focus {
    background-color: #333 !important;
    border-color: #0d6efd !important;
    box-shadow: none !important;
    color: white !important;
}

/* --- TOAST BENACHRICHTIGUNG --- */
#saveToast {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background-color: var(--ColorSuccessBtn) !important; 
    color: white !important;
    border-radius: 10px;
    padding: 12px 28px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    white-space: nowrap;
    transition: opacity 0.4s ease, visibility 0.4s;
}

#saveToast.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Erfolgshäkchen (Registrierung) */
.success-icon {
    font-size: 5rem !important;
    color: var(--ColorSuccessBtn) !important;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

/* --- ABMELDEN BUTTON & NAVIGATION --- */
.logout-area {
    margin-top: 70px; 
    margin-bottom: 30px;
}

.btn-logout {
    border: 1px solid #dc354599 !important; /* Dezentes Rot */
    color: #dc3545 !important;
    padding: 8px 35px !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
}

.btn-logout:hover {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* ==========================================================================
   DEINE "HEILIGEN" SCHIEBEREGLER & IOS SWITCH (UNVERÄNDERT)
   ========================================================================== */

/* --- iOS Switch Styling --- */
.slider-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 99%;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.switch-label {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 500;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    margin: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.ios-switch input:checked + .ios-slider {
    background-color: var(--ColorSuccessLt);
}

.ios-switch input:checked + .ios-slider:before {
    transform: translateX(20px);
}

/* --- Range Slider Base Styling --- */
.range-slider {
    --range-slider-common-height: 16px;
    --range-slider-handle-width: 24px;
    --range-slider-handle-height: 24px;

    position: relative;
    display: flex;
    align-items: center;
    width: 99%;
    height: 60px; 
    transition: opacity 0.3s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.range-slider > div {
    position: absolute;
    display: flex;
    align-items: center;
    left: 12px;
    right: 12px;
    height: var(--range-slider-common-height);
    width: auto;
}

.range-slider > div > .range-slider-val-left, 
.range-slider > div > .range-slider-val-right, 
.range-slider > div > .range-slider-val-range {
    height: 10px;
    transition: background-color 0.3s ease;
}

.range-slider > div > .range-slider-val-left,
.range-slider > div > .range-slider-val-right {
    position: absolute;
    border-radius: 10px;
    background-color: var(--ColorTrackDark);
}
.range-slider > div > .range-slider-val-left { left: 0; }
.range-slider > div > .range-slider-val-right { right: 0; }

.range-slider > div > .range-slider-val-range {
    position: absolute;
    border-radius: 14px;
    background-color: var(--ColorSuccessLt);
}

.range-slider > div > .range-slider-handle {
    z-index: 2;
    position: absolute;
    top: -4px;
    margin-left: -12px;
    width: var(--range-slider-handle-width);
    height: var(--range-slider-handle-height);
    border-radius: 25%;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 3px 8px rgba(0, 0, 0, 0.6);
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.range-slider input[type="range"].range-slider-input-left,
.range-slider input[type="range"].range-slider-input-right {
    z-index: 3;
    position: absolute;
    left: 0;
    top: 22px; 
    width: 100%;
    height: var(--range-slider-common-height);
    opacity: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.range-slider input[type="range"].range-slider-input-left::-webkit-slider-thumb,
.range-slider input[type="range"].range-slider-input-right::-webkit-slider-thumb {
    pointer-events: all; 
    width: var(--range-slider-handle-width); 
    height: var(--range-slider-handle-height); 
    background: transparent;
    border: none;
}
.range-slider input[type="range"].range-slider-input-left::-moz-range-thumb,
.range-slider input[type="range"].range-slider-input-right::-moz-range-thumb {
    pointer-events: all; 
    width: var(--range-slider-handle-width); 
    height: var(--range-slider-handle-height);
    background: transparent;
    border: none;
}

.range-slider > div > .range-slider-tooltip {
    z-index: 1;
    position: absolute;
    top: -42px;
    width: 56px;
    height: 30px;
    margin-left: -28px;
    border-radius: 5px;
    background-color: var(--ColorSuccessLt);
    color: var(--ColorPrimaryDk);
    text-align: center;
    opacity: 1;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.range-slider > div > .range-slider-tooltip:after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -6px;
    top: 30px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--ColorSuccessLt);
    transition: border-top-color 0.3s ease;
}

.range-slider > div > .range-slider-tooltip > span {
    font-size: 14px;
    font-weight: 800;
    line-height: 30px;
    display: block;
}

.range-slider > div > .range-slider-tooltip.is-stacked {
    top: -76px; 
    z-index: 5;
}

.range-slider > div > .range-slider-tooltip.is-stacked:after {
    top: 30px;
    border-top-width: 40px;
    opacity: 0.4;
}

.range-slider.is-disabled {
    opacity: 0.5;
}

.range-slider.is-disabled > div > .range-slider-handle { cursor: default; background-color: #94a3b8; }
.range-slider.is-disabled > div > .range-slider-val-range { background-color: var(--ColorDisabled); }
.range-slider.is-disabled > div > .range-slider-tooltip { background-color: #334155; color: #94a3b8; }
.range-slider.is-disabled > div > .range-slider-tooltip:after { border-top-color: #334155; }