/* Grundlegende Formular-Elemente */
input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, background-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Layout Helper für Formulare */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 15px;
}

/* Buttons */
button.btn-primary, a.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

button.btn-primary:hover, a.btn-primary:hover {
    background-color: var(--primary-hover);
}

button.btn-primary:active, a.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    padding: 12px;
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted);
}

/* Radio Button Cards (Einnahme/Ausgabe Auswahl) */
.radio-card {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-content {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    font-weight: bold;
    color: var(--text-muted);
    transition: all 0.2s;
    background-color: var(--bg-card);
}

.radio-card:hover .radio-content {
    border-color: var(--text-muted);
}

/* Wenn ausgewählt: Allgemein */
.radio-card input:checked + .radio-content {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

/* Spezifisch: Ausgabe (Rot) */
.radio-card input[value="expense"]:checked + .radio-content {
    border-color: var(--danger);
    color: var(--danger);
    background-color: rgba(230, 57, 70, 0.1);
}

/* Spezifisch: Einnahme (Grün) */
.radio-card input[value="income"]:checked + .radio-content {
    border-color: var(--success);
    color: var(--success);
    background-color: rgba(46, 196, 182, 0.1);
}

/* Login Page Spezifisch */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.error-msg { 
    color: var(--danger); 
    background: rgba(230, 57, 70, 0.1); 
    padding: 12px; 
    border-radius: 8px; 
    margin-bottom: 20px;
    font-weight: 500;
}


/* --- SPLIT TRANSACTION STYLES --- */
.split-toggle-container {
    background: var(--bg-body);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.split-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.split-row {
    background: var(--bg-body);
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    position: relative;
    animation: fadeIn 0.2s ease-out;
}

.split-row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.split-row-footer {
    display: flex;
    gap: 10px;
}

.btn-remove-split {
    color: var(--danger);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    padding: 0 10px;
    cursor: pointer;
}

.split-summary {
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ... (alter Code) ... */

/* --- SWITCH BEAUTIFY --- */
/* Verstecke die Standard-Checkbox komplett */
.switch input { 
    display: none; 
}

/* Der Container für den Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 10px;
    cursor: pointer;
}

/* Der Slider selbst */
.slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

/* Der runde Knopf */
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Aktivierter Zustand */
.switch input:checked + .slider {
    background-color: var(--primary);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* --- SPLIT SIBLINGS (Bearbeiten Ansicht) --- */
.split-siblings {
    background-color: var(--bg-body);
    border: 1px dashed var(--border-color);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.sibling-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.sibling-item:last-child { border-bottom: none; }
.current-item-marker { font-weight: bold; color: var(--primary); }

