: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;
    padding-top: 0;
    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: 1.5rem;
    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.0rem;
}

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

.auth-form input {
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in the width */
    padding: 0.3rem;
    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);
}

/* === NEW: Styles to normalize the date input font === */
.auth-form input[type="date"] {
    position: relative;
    font-family: 'Nunito', sans-serif;
}

/* Target WebKit (Chrome, Safari, Edge) internal parts */
.auth-form input[type="date"]::-webkit-datetime-edit {
    font-family: 'Nunito', sans-serif;
}

/* Style the calendar picker icon to be more consistent */
.auth-form input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.auth-form input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
/* === END of new styles === */


/* 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);
}

/* === NEW: Official Google Sign-In Button Styles === */
.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #747775;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: 100%; /* Full width to match input fields */
  max-width: 100%; /* Changed from 400px to 100% */
  min-width: min-content;
  margin-top: 1rem; /* Added to match spacing */
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: center; /* Modified to center content */
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  flex-grow: 0; /* Modified to prevent pushing */
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  transition: opacity .218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  background-color: #000;
}

.gsi-material-button:hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:hover .gsi-material-button-state {
  opacity: .08;
}

.gsi-material-button:active .gsi-material-button-state {
  opacity: .24;
}
/* === END of Google styles === */

/* === FLASH MESSAGE STYLES === */
.flash-messages {
    padding: 0;
    margin: 0 0 0.5rem 0;
    list-style: none;
}
.flash {
    width: min(450px, 90vw);
    box-sizing: border-box;
}

.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: 1rem;
    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.2rem 2.5rem 0.2rem 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 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start; /* Changed from 'center' to 'flex-start' */
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 0.25rem; /* Align checkbox with first line of text */
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    width: 18px;
    height: 18px;
}

.checkbox-item label {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    cursor: pointer;
    margin: 0; /* Remove any default margin */
    padding: 0; /* Remove any default padding */
    text-align: left; /* Ensure text alignment is left */
}

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

.checkbox-item label a:hover {
    color: var(--accent-hover);
}

/* 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;
}

/* Reduce font size for signup tab buttons */
#emailSignupBtn,
#googleSignupBtn,
#googleLoginTab,
#loginTab {
    font-size: 14px; /* Adjust this value as needed (default is usually 16px) */
}

@media (max-width: 768px) {
    .auth-container {
        padding-top: 80px; /* Reduce padding for smaller screens */
    }
    .auth-form .form-group {
        margin-bottom: 0.9rem;
    }

    .auth-form input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .auth-form label {
        font-size: 0.9rem;
    }

    .auth-btn {
        font-size: 1rem;
        margin-bottom: 0.1rem;        
    }

    .auth-tab-btn {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .form-group-horizontal {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 1rem;
        padding-top: 0.5rem;
    }    

    .form-group-horizontal select {
        padding: 0.4rem 2.5rem 0.4rem 1rem; /* Padding for text and arrow */
        font-size: 0.9rem;
    }

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

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


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

}



/* Optional: Make it responsive for smaller screens */
@media (max-width: 768px) {
    #emailSignupBtn,
    #googleSignupBtn,
    #googleLoginTab,
    #loginTab {
        font-size: 12px;
    }
}