/* Auth pages (login/signup) */
:root {
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
}

/* Layout */
.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 32rem; /* Increased slightly for better spacing */
    max-height: calc(100vh - 4rem); /* Ensure it doesn't exceed viewport */
    padding: 2.5rem;    
    border-radius: 1.25rem; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contain the scrollable form */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-size: 1.875rem; 
    line-height: 2.25rem;
    font-weight: 800; 
    text-align: center;
    margin-bottom: 0.5rem; 
    color: var(--gym-primary, #111827);
    letter-spacing: -0.025em;
}

.auth-subtitle {
     text-align: center;
     color: var(--gray-500);
     margin-bottom: 2rem;
     font-size: 0.875rem;
}

/* Form container that scrolls */
.auth-form {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.75rem;
    margin-right: -0.75rem; /* Compensate for padding to keep alignment */
    padding-bottom: 1rem;
}

/* Scrollbar styling */
.auth-form::-webkit-scrollbar {
    width: 5px;
}

.auth-form::-webkit-scrollbar-track {
    background: transparent;
}

.auth-form::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.auth-form::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.auth-form h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.auth-form h3:first-of-type {
    margin-top: 0;
}

.text-center { text-align: center; }
.text-error { color: #dc2626; font-size: 0.875rem; font-weight: 500; }
.text-success { color: #16a34a; font-size: 0.875rem; font-weight: 500; }
.text-muted { color: var(--gray-500); }
.text-small { font-size: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* Form Fields */
.auth-form .field { 
  margin-bottom: 1.25rem; 
}

.form-label {
    display: block;
    font-size: 0.875rem; 
    font-weight: 600;     
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 0.5rem;
    background: var(--gray-50);
    color: #111827;
    transition: all 0.2s ease;
    outline: none;
    font-size: 0.95rem;
}

.form-input:focus {
    border-color: var(--teal-600);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.password-wrapper { position: relative; }
.toggle-icon {
    position: absolute;
    right: 1rem; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400); 
    cursor: pointer;
    transition: color 0.2s;
}
.toggle-icon:hover { color: var(--gray-600); }

.gender-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--teal-600);
    color: #fff;
    padding: 0.75rem 1.5rem; 
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover { 
    background: var(--teal-700);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.link-secondary { 
  color: var(--teal-600); 
  font-weight: 600;
  transition: color 0.2s;
}

.link-secondary:hover { 
  color: var(--teal-700);
  text-decoration: underline; 
}


