:root {
  --primary-color: #5065E5; /* Tieferes, moderneres Blauviolett */
  --secondary-color: #6BCEBB; /* Gedämpfteres, eleganteres Türkis */
  --background-color: #ffffff; /* Helleres, kühleres Grau mit Blauton */
  --text-color: #2A2D3E; /* Dunkleres, tieferes Blau-Grau */
  --card-bg: #ffffff; /* Weißer Kartenhintergrund */
  --border-color: #c4c5c7;
  --card-secondary-bg: #F7F9FC; /* Sehr leicht abgetönter Hintergrund für Abwechslung */
  --shadow: 0 10px 30px rgba(37, 45, 90, 0.07); /* Weicherer, farbiger Schatten */
  --border-radius: 14px; /* Etwas weniger abgerundet für einen moderneren Look */
  --success-color: #34D399; /* Erfolgsfarbe */
  --warning-color: #FBBF24; /* Warnfarbe */
  --error-color: #F87171; /* Fehlerfarbe */
}

/* === AUTHENTICATION PAGE STYLES === */
.auth-container {
    display: flex;
    overflow-y: auto;    
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    padding-top: 120px; /* Push content below the fixed header */
    background-color: var(--background-color);
    max-height: calc(100% - 80px);
    height: 100%; 
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

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

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary-color);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.auth-form input {
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in the width */
    padding: 0.9rem;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(80, 101, 229, 0.2);
}

/* MODIFIED: Replace .auth-btn and .signup-btn with a unified structure */
.auth-btn {
    display: block; /* Ensures <a> tags behave like buttons */
    box-sizing: border-box; /* Crucial for consistent width calculation */
    width: 100%; /* Use 100% to fill the container width consistently */
    padding: 0.9rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px; /* Consistent rounded corners */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Modifier for the primary button style */
.auth-btn.btn-primary {
    background: var(--primary-color);
    color: var(--card-bg);
    border: 1px solid var(--primary-color);
}

/* Modifier for the secondary button style (replaces .signup-btn) */
.auth-btn.btn-secondary {
    background: var(--card-secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* === FLASH MESSAGE STYLES === */
.flash-messages {
    padding: 0;
    margin: 0 0 1.5rem 0;
    list-style: none;
}
.flash {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
.flash.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
}
/* === END OF AUTH STYLES === */

/* New style for horizontal form groups */
.form-group-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
}

.form-group-horizontal label {
    margin-bottom: 0; /* Override default margin */
}

.form-group-horizontal select {
    /* Reset default browser appearance */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Sizing and Layout */
    width: auto;
    min-width: 200px;
    padding: 0.8rem 2.5rem 0.8rem 1rem; /* Padding for text and arrow */
    box-sizing: border-box;

    /* Font and Color (using variables from your file) */
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--text-color);

    /* Background and Border */
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    
    /* Custom Arrow using an SVG background image */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;

    /* Transitions for a smooth focus effect */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-group-horizontal select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(80, 101, 229, 0.2);
}

.flash {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
.flash.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
}

/* Add this new rule for success messages */
.flash.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 0.2rem;
    min-width: 16px;
    width: 16px;
    height: 16px;
}

.checkbox-item label {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-item label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-item label a:hover {
    color: var(--primary-color-hover, #2563eb);
}

/* Add this to your CSS file */
.password-requirements {
    margin-top: 5px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.requirement {
    display: block;
    margin: 2px 0;
    font-size: 12px;
}

.requirement.valid {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

#password-match-indicator {
    margin-top: 5px;
}

#password-match-indicator .valid {
    color: #28a745;
}

#password-match-indicator .invalid {
    color: #dc3545;
}