:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --text: #1e293b;
    --text-muted: #64748b;
    --accent: #f97316;
    --danger: #ef4444;
    --success: #10b981;
    --container-pad: 1.5rem;
    --card-pad: 2rem;
    --glass: #ffffff;
    --glass-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background: radial-gradient(circle at top right, #e0e7ff, #f8fafc, #ffffff) !important;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-pad);
    width: 100%;
    flex-grow: 1; /* Pushes footer down */
}

/* Modern Card Styles */
.glass-card {
    background: var(--card-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px;
    padding: var(--card-pad);
    box-shadow: var(--card-shadow) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text) !important;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.1) !important;
}

/* Typografie */
h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Formulare */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text) !important;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 1rem;
    color: var(--text);
    /* Default dark text */
}

.btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    /* Force high contrast white text on dark backgrounds */
}

.btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Dashboard-Raster */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Response Anpassungen */
@media (max-width: 768px) {
    :root {
        --container-pad: 0.75rem;
        --card-pad: 1.25rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn {
        padding: 0.8rem 1rem;
        width: 100%;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Globale Benachrichtigungs-Toasts */
#global-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification-toast {
    background: #ffffff;
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: var(--text);
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}