
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100vw;
}

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

/* Fix footer positioning for login page */
.site-footer {
    position: relative !important;
    width: 100% !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* Main Container - Split Screen 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 - side by side logo and branding */
.mobile-header {
    display: none;
    width: 100%;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
}

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

.mobile-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mobile-title {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.1;
}

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

/* Left Panel - Hero Section */
.left-panel {
    flex: 1;
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.8rem 3rem;
    overflow: hidden;
}

.left-panel::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(10px);
}

.hero-icon i {
    font-size: 1.6rem;
    color: white;
}

.hero-quote {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.4rem;
}

.hero-author {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Right Panel - Form Section */
.right-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 3rem 2.8rem 3rem;
}

.form-container {
    width: 100%;
    max-width: 450px;
}

.gsft-branding {
    text-align: left;
    margin-bottom: 2.1rem;
}

.gsft-title {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gsft-tagline {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 0.9375rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

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

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    padding-left: 5rem;
    font-size: 16px !important;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    /* iOS requires min 16px to prevent zoom on focus */
}

/* High specificity override for input fields */
input.form-control,
input#email,
input#password,
.input-wrapper input,
.form-group input.form-control {
    font-size: 16px !important;
    background-color: #ffffff !important;
}

#email, #password {
    font-size: 16px !important;
    background-color: #ffffff !important;
}

/* Override browser autofill styles */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
#email:-webkit-autofill,
#email:-webkit-autofill:hover,
#email:-webkit-autofill:focus,
#password:-webkit-autofill,
#password:-webkit-autofill:hover,
#password:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
    font-size: 16px !important;
    background-color: #ffffff !important;
    caret-color: #333 !important;
}

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

.icon-inside-input,
.password-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
    pointer-events: none;
    margin-right: 1rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: #0056b3;
}

#password {
    padding-right: 2.75rem;
}

/* Forgot Password Link */
.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: #007bff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Remember Me Toggle */
.remember-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.remember-label input {
    margin-right: 0.5rem;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Sign Up Link */
.signup-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

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

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

/* Alert Messages */
.alert {
    border-radius: 8px;
    padding: 0.7rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.alert-danger {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.custom-flash-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.custom-flash-message i {
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
    body {
        padding: 80px;
    }
}

@media (max-width: 968px) {
    body {
        padding: 50px;
        flex-direction: column;
    }
    
    .split-container {
        flex-direction: column;
    }
    
    .left-panel {
        min-height: 40vh;
        padding: 3rem 2rem;
    }
    
    .hero-quote {
        font-size: 2rem;
    }
    
    .right-panel {
        padding: 3rem 2rem;
    }
    
    .gsft-title {
        font-size: 2.5rem;
    }
    
    .site-footer {
        position: relative !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        margin-top: 2rem !important;
    }
}

@media (max-width: 768px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    body {
        padding: 10px !important;
        padding-top: 10px !important;
        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: auto !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: none !important;
        box-sizing: border-box !important;
        padding: 1rem;
        max-height: none !important;
        overflow-y: auto !important;
    }
    
    .form-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .form-title {
        font-size: 1.2rem;
    }
    
    .form-subtitle {
        font-size: 0.8rem;
    }
    
    .site-footer {
        position: relative !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin-top: auto !important;
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    body {
        padding: 10px !important;
        padding-top: 10px !important;
        height: auto !important;
    }
    
    .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;
    }
    
    .right-panel {
        padding: 0.875rem;
        overflow-y: auto !important;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .site-footer {
        position: relative !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin-top: auto !important;
        flex-shrink: 0;
        box-sizing: border-box !important;
    }
}

/* Override main.css min-width rules that force horizontal scroll */
@media (max-width: 550px) {
    html, body {
        min-width: unset !important;
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .container,
    .login-container,
    #login-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,
    .login-container,
    #login-card {
        min-width: unset !important;
    }
}

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