/* =====================================================
   AUTH.CSS - Consolidated Authentication Page Styles
   Covers: login.ejs, signup.ejs, reset.ejs, new-password.ejs, emailSent.ejs
   ===================================================== */

/* ===========================================
   BASE RESET & BODY STYLES
   =========================================== */
.page--auth * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100vw;
}

.page--auth {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ===========================================
   SPLIT CONTAINER LAYOUT
   =========================================== */
.split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 500px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   MOBILE HEADER - Hidden on Desktop
   =========================================== */
.mobile-header {
    display: none;
    width: 100%;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
}

.mobile-header--with-border {
    border-bottom: 1px solid #e9ecef;
}

.mobile-logo {
    width: 200px;
    height: auto;
}

.mobile-branding {
    text-align: left;
}

.mobile-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 2px;
    margin: 0;
}

.mobile-tagline {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* ===========================================
   LEFT PANEL - Hero/Logo Section
   =========================================== */
.left-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.hero-content {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gsft-logo {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}

/* ===========================================
   RIGHT PANEL - Form/Content Section
   =========================================== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: white;
}

.form-container,
.content-container {
    width: 100%;
    max-width: 400px;
}

/* ===========================================
   SIGNUP PAGE - Fixed height with scrolling right panel
   =========================================== */
.page--signup .split-container {
    min-height: 500px;
    max-height: 500px;
    height: 500px;
}

.page--signup .left-panel {
    position: sticky;
    top: 0;
    height: 100%;
    flex-shrink: 0;
}

.page--signup .right-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2rem 3rem;
}

.page--signup .signup-header {
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}

.page--signup .form-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scroll indicator - gradient fade */
.page--signup .split-container {
    position: relative;
}

.page--signup .split-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 80px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 10;
    border-radius: 0 0 16px 0;
}

/* Scroll indicator chevron */
.page--signup .split-container::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 20px;
    right: 25%;
    transform: translateX(50%);
    font-size: 1.2rem;
    color: #007bff;
    z-index: 11;
    pointer-events: none;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(50%) translateY(0); opacity: 0.7; }
    50% { transform: translateX(50%) translateY(8px); opacity: 1; }
}

.page--signup .split-container.hide-chevron::before {
    display: none;
}

/* Custom scrollbar for signup form container */
.page--signup .form-container::-webkit-scrollbar {
    width: 6px;
}

.page--signup .form-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 3px;
}

.page--signup .form-container::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 3px;
}

.page--signup .form-container::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* ===========================================
   GSFT BRANDING (Desktop)
   =========================================== */
.gsft-branding {
    text-align: center;
    margin-bottom: 2rem;
}

.gsft-branding--left {
    text-align: left;
}

.gsft-title {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 3px;
    margin-bottom: 0.25rem;
}

.gsft-tagline {
    font-size: 1rem;
    color: #6c757d;
}

/* ===========================================
   ICON WRAPPERS (Reset, Email, Password, etc.)
   =========================================== */
.icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.icon-wrapper i {
    font-size: 1.3rem;
    color: #ffffff;
}

.icon-wrapper--blue {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.icon-wrapper--green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.icon-wrapper--animated {
    animation: pulse 2s infinite;
}

/* Legacy class aliases for backwards compatibility */
.reset-icon-wrapper {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.reset-icon-wrapper i {
    font-size: 1.3rem;
    color: #ffffff;
}

.email-icon-wrapper {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: pulse 2s infinite;
}

.email-icon-wrapper i {
    font-size: 1.3rem;
    color: #ffffff;
}

.new-password-icon-wrapper {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.new-password-icon-wrapper i {
    font-size: 1.3rem;
    color: #ffffff;
}

/* ===========================================
   FORM TITLES & SUBTITLES
   =========================================== */
.form-title,
.content-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle,
.content-message {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.content-message {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label,
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
}

/* Required field indicator */
.form-group > label::after {
    content: ' *';
    color: #dc3545;
    font-weight: 700;
}

/* Don't show asterisk on checkboxes or inline labels */
.age-checkbox-wrapper::after,
.age-checkbox-label::after,
.form-check label::after {
    content: none !important;
}

.input-wrapper {
    position: relative;
}

.icon-inside-input {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within .icon-inside-input {
    color: #007bff;
}

.password-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within .password-icon {
    color: #007bff;
}

/* Password label row with visibility toggle */
.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.25rem;
}

.password-label-row label {
    margin-bottom: 0;
    line-height: 1;
}

.password-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-visibility-toggle:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.password-visibility-toggle:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.password-toggle-icon {
    font-size: 0.85rem;
}

.password-toggle-text {
    font-weight: 500;
}

/* Legacy password toggle (in-field) - kept for backwards compatibility */
.password-toggle {
    position: absolute;
    right: 40px; /* Left of browser's autocomplete icon */
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.4rem;
    border-radius: 6px;
    z-index: auto;
    background: transparent;
}

.password-toggle:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.12);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Add extra padding to password inputs for browser autocomplete icons */
input.password-field {
    padding-right: 45px !important; /* Space for browser autocomplete (no eye icon now) */
}

.form-control,
input.form-control,
textarea.form-control {
    width: 100%;
    padding: 0.7rem 0.75rem 0.7rem 2.5rem !important;
    font-size: 0.95rem;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:hover,
input.form-control:hover,
textarea.form-control:hover {
    border-color: #adb5bd !important;
}

.form-control:focus,
input.form-control:focus,
textarea.form-control:focus {
    outline: none;
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: #ffffff !important;
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Success state for valid inputs - green border */
.form-control:valid:not(:placeholder-shown),
input.form-control:valid:not(:placeholder-shown) {
    border-color: #28a745 !important;
}

/* Turn left icon to green checkmark when input is valid (accessibility: icon change, not just color) */
.input-wrapper:has(.form-control:valid:not(:placeholder-shown)) .icon-inside-input {
    color: #28a745 !important;
}
.input-wrapper:has(.form-control:valid:not(:placeholder-shown)) .icon-inside-input::before {
    content: "\f00c"; /* Font Awesome checkmark */
}

/* Password fields: same treatment */
input.password-field:valid:not(:placeholder-shown) {
    border-color: #28a745 !important;
}

/* Turn lock icon to green checkmark when password is valid */
.input-wrapper:has(input.password-field:valid:not(:placeholder-shown)) .password-icon {
    color: #28a745 !important;
}
.input-wrapper:has(input.password-field:valid:not(:placeholder-shown)) .password-icon::before {
    content: "\f00c"; /* Font Awesome checkmark */
}

.form-control:focus-visible,
.form-select:focus-visible,
.btn-primary:focus-visible,
a:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Select inputs */
.form-select,
select.form-select {
    width: 100%;
    padding: 0.875rem;
    font-size: 16px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff !important;
    box-sizing: border-box;
    font-family: inherit;
    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;
    padding-right: 2.5rem;
}

.form-select:hover {
    border-color: #adb5bd;
}

.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.08);
    background-color: #ffffff !important;
}

/* Password with both left icon and toggle */
#signupUsername,
#signupEmail {
    padding-left: 2.75rem;
}

#signupPassword {
    padding-left: 2.75rem;
    padding-right: 3rem;
}

.password-requirements {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Form helper text */
.form-text {
    font-size: 0.8125rem;
    color: #6c757d;
    line-height: 1.5;
    margin-top: 0.375rem;
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.form-text::before {
    content: 'ℹ';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 0.75rem;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Password Requirements Checklist */
.password-requirements {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
}

.password-requirements .requirements-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.1rem;
    font-size: 0.875rem;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 rem 0;
    transition: all 0.2s ease;
}

.password-requirements .requirement i {
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.password-requirements .requirement.met i {
    color: #28a745 !important;
}

.password-requirements .requirement.met i::before {
    content: "\f00c"; /* Font Awesome check */
}

.password-requirements .requirement span {
    color: #6c757d;
}
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Date row for birth date selects */
.date-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .date-row {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   AGE CONFIRMATION CHECKBOX
   =========================================== */
.age-confirmation-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.age-confirmation-box:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.age-confirmation-box .form-text {
    margin-top: 0.75rem;
    padding-left: 0;
    text-align: left;
}

.age-confirmation-box .form-text::before {
    display: none;
}

.age-checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0;
}

.age-checkbox-wrapper::after {
    display: none !important;
    content: none !important;
}

.age-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.age-checkbox-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    margin-right: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.age-checkbox-wrapper:hover .age-checkbox-custom {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.age-checkbox-wrapper input[type="checkbox"]:checked ~ .age-checkbox-custom {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

.age-checkbox-wrapper input[type="checkbox"]:checked ~ .age-checkbox-custom::after {
    content: '';
    position: absolute;
    width: 0.375rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.age-checkbox-wrapper input[type="checkbox"]:focus-visible ~ .age-checkbox-custom {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.age-checkbox-label {
    font-size: 0.9375rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
    flex-wrap: wrap;
}

.age-checkbox-label i {
    color: #007bff;
    font-size: 1.125rem;
}

.age-checkbox-label strong {
    color: #1a1a1a;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled::before {
    display: none;
}

/* ===========================================
   LINKS
   =========================================== */
.login-link,
.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.signup-link {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.login-link a,
.signup-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-link a:hover,
.signup-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.login-link i {
    margin-right: 0.25rem;
}

/* ===========================================
   ALERTS & FLASH MESSAGES
   =========================================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.alert i {
    margin-top: 0.1rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.custom-flash-message {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px solid #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    animation: slideInDown 0.3s ease;
}

.custom-flash-message i {
    color: #dc3545;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.message-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    background-color: #ffe5e5;
    border-radius: 8px;
    color: #000;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* ===========================================
   INFO BOX (Email Sent page)
   =========================================== */
.info-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.875rem;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.info-box i {
    color: #007bff;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-box span {
    line-height: 1.5;
}

/* ===========================================
   PRIVACY SECTION
   =========================================== */
.privacy-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-left: 4px solid #007bff;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.privacy-section:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.privacy-title-text {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.625rem;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.privacy-title-text i {
    color: #007bff;
    font-size: 1.25rem;
    background: rgba(0, 123, 255, 0.1);
    padding: 0.375rem;
    border-radius: 8px;
}

.privacy-text {
    font-size: 0.875rem;
    margin-bottom: 0;
    color: #495057;
    line-height: 1.7;
}

.privacy-text a {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.privacy-text a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* ===========================================
   TERMS SECTION
   =========================================== */
.terms-section {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border: 2px solid #ffc107;
    border-left: 4px solid #ffc107;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.terms-section:hover {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.terms-prompt {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.terms-prompt a {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.terms-prompt a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

#termsStatus {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

#termsStatus .text-success {
    color: #28a745 !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#termsStatus .text-danger {
    color: #dc3545 !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===========================================
   PHONE INPUT (International Tel Input)
   =========================================== */
.iti {
    width: 100%;
}

.iti__country-list {
    font-size: 0.875rem;
    width: 320px;
    max-width: 90vw;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 2px solid #dee2e6;
}

.iti__country {
    padding: 0.625rem 0.875rem;
    transition: background-color 0.2s ease;
}

.iti__country:hover {
    background-color: rgba(0, 123, 255, 0.08);
}

.iti__selected-flag {
    padding: 0 0.875rem;
    background-image: none !important;
}

.iti__flag-container {
    background-image: none !important;
}

/* ===========================================
   MODALS
   =========================================== */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid #e9ecef;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-weight: 700;
    color: #1a1a1a;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.modal-footer {
    border-top: 2px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

/* Terms Modal specific */
#termsModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ===========================================
   FOOTER FIX
   =========================================== */
.site-footer {
    position: relative !important;
    width: 100% !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 1400px) {
    .page--auth {
        padding: 80px;
    }
}

@media (max-width: 968px) {
    .page--auth {
        padding: 50px;
        flex-direction: column;
    }
    
    .split-container {
        flex-direction: column;
    }
    
    .left-panel {
        min-height: 40vh;
        padding: 3rem 2rem;
    }
    
    .right-panel {
        padding: 3rem 2rem;
    }
    
    .gsft-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    .page--auth {
        padding: 10px !important;
        padding-top: 10px !important;
        min-height: 100vh;
        height: auto !important;
        justify-content: flex-start !important;
    }
    
    .split-container {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        flex-direction: column;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* Show mobile header, hide desktop elements */
    .mobile-header {
        display: flex !important;
        flex-shrink: 0;
    }
    
    .left-panel {
        display: none !important;
    }
    
    .gsft-branding {
        display: none !important;
    }
    
    .right-panel {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
        box-sizing: border-box !important;
        padding: 1rem;
        max-height: none !important;
        overflow-y: auto !important;
        justify-content: flex-start !important;
    }
    
    /* Reset signup-specific fixed height on mobile */
    .page--signup .split-container {
        height: auto !important;
        max-height: none !important;
    }
    
    /* Hide chevron and gradient on mobile */
    .page--signup .split-container::before,
    .page--signup .split-container::after {
        display: none !important;
    }
    
    /* Reset signup header and form container on mobile */
    .page--signup .signup-header {
        margin-bottom: 1rem;
    }
    
    .page--signup .right-panel {
        display: block !important;
        overflow: visible !important;
        padding: 1rem !important;
    }
    
    .page--signup .form-container {
        overflow: visible !important;
        padding-right: 0 !important;
    }
    
    .form-container,
    .content-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .form-title,
    .content-title {
        font-size: 1.2rem;
    }
    
    .form-subtitle {
        font-size: 0.8rem;
        margin-bottom: 16px !important;
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    /* Login, reset, and new-password pages - no scroll */
    .page--login,
    .page--reset,
    .page--new-password {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }
    
    .page--login html,
    .page--login body,
    .page--reset html,
    .page--reset body,
    .page--new-password html,
    .page--new-password body {
        overflow-y: hidden !important;
        height: 100vh !important;
    }
    
    /* Other auth pages - allow scroll */
    .page--auth {
        padding: 10px !important;
        padding-top: 10px !important;
        min-height: 100vh;
        height: auto !important;
        display: flex;
        flex-direction: column;
    }
    
    .split-container {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .left-panel {
        min-height: auto;
        padding: 0.75rem;
    }
    
    .gsft-logo {
        max-width: 120px;
        height: auto;
    }
    
    .right-panel {
        padding: 0.875rem;
        overflow-y: auto !important;
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .age-checkbox-label {
        font-size: 0.875rem;
        align-items: flex-start;
    }
    
    .age-checkbox-label i {
        flex-shrink: 0;
        margin-top: 2px;
    }
}

/* Override main.css min-width rules */
@media (max-width: 550px) {
    html, body {
        min-width: unset !important;
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .container,
    .signup-container,
    .reset-container,
    .new-password-container,
    #signup-card,
    #reset-card,
    #new-password-card {
        min-width: unset !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 450px) {
    html, body {
        min-width: unset !important;
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .container,
    .signup-container,
    .reset-container,
    .new-password-container,
    #signup-card,
    #reset-card,
    #new-password-card {
        min-width: unset !important;
    }
}
