/* Import DM Sans font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --primary-color: #362259;
    --secondary-color: #7A7896;
    --text-color: #222;
    --light-gray: #F5F6FA;
    --white: #FFFFFF;
    --border-radius: 12px;
    --tab-radius: 10px;
    --font-family: 'DM Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    background-color: var(--white);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    margin: 0;
    box-shadow: none;
    min-height: 600px;
}

/* Left Section Styles */
.left-section {
    flex: 1;
    background-color: var(--white);
    position: relative;
    height: 100vh;
    padding: 40px 40px 40px 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.left-section::after {
    content: "";
    position: absolute;
    top: 40px;
    right: 40px;
    bottom: 40px;
    left: 40px;
    background-image: url('../assets/Image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
}

/* Right Section Styles */
.right-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    height: 100vh;
    padding: 0;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 650px;
    padding: 3rem 2rem;
    text-align: center;
    margin: auto;
}

h2 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 400;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    background-color: #F8FAFB;
    border: 1px solid #DFE1E7;
    border-radius: var(--border-radius);
    padding: 0.3rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tab {
    flex: 1;
    padding: 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--tab-radius);
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.tab.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #DFE1E7;
    border-radius: var(--border-radius);
    background-color: #F8FAFB;
    transition: all 0.25s ease;
    overflow: hidden;
}

.input-container:focus-within {
    border-color: #4361EE;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #FFFFFF;
}

.input-container:focus-within .input-icon svg {
    stroke: #4361EE;
    transition: stroke 0.25s ease;
}

/* Adding style for when user is typing */
.input-container:has(input:not(:placeholder-shown)) {
    background-color: #FFFFFF;
    border-color: #A0AEC0;
}

/* Improving the visual feedback for active inputs */
.input-container:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: #4361EE;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.input-container:focus-within:before {
    transform: scaleX(1);
}

.input-container.error {
    border-color: #E53E3E;
    background-color: #FFFFFF;
}

.input-container.error:focus-within {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.input-container.error:before {
    background-color: #E53E3E;
}

.input-container.error:focus-within:before {
    transform: scaleX(1);
}

.input-container.error .input-icon svg {
    stroke: #E53E3E;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.input-icon svg, 
.toggle-password svg {
    width: 20px;
    height: 20px;
    stroke: var(--secondary-color);
}

.input-container .toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    outline: none;
    z-index: 1;
    width: 24px;
    height: 24px;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    stroke: var(--secondary-color);
    transition: all 0.2s ease;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.8rem 3.5rem;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background-color: transparent;
    border: none;
    outline: none;
    color: #333;
    font-weight: 400;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #A0AEC0;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Checkbox styling */
.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #DFE1E7;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background-color: #F8FAFB;
}

.remember-me input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.remember-me input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me span {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 1.2rem;
    background-color: #F8FAFB;
    color: var(--secondary-color);
    border: 1px solid #DFE1E7;
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 600;
    margin-top: 1rem;
    letter-spacing: -0.01em;
}

.login-btn:hover {
    background-color: #EFF1F5;
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #E5E7EB;
    z-index: 0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background-color: var(--white);
    padding: 0 1rem;
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.google-btn,
.apple-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem;
    border: 1px solid #DFE1E7;
    border-radius: var(--border-radius);
    background-color: #F8FAFB;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    width: 100%;
    letter-spacing: -0.01em;
    font-feature-settings: "tnum";
}

.google-btn svg, 
.apple-btn svg {
    width: 20px;
    height: 20px;
    filter: brightness(1.05);
}

.apple-btn svg {
    width: 18px;
    height: 18px;
    margin-right: 2px;
}

.apple-btn {
    color: #000;
    font-weight: 500;
}

.google-btn:hover,
.apple-btn:hover {
    background-color: #EFF1F5;
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-container {
        padding: 2rem 3rem;
        max-width: 550px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 1.1rem 2.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-section {
        height: 35vh;
        min-height: 250px;
        padding: 20px;
    }

    .left-section::after {
        top: 20px;
        right: 20px;
        bottom: 20px;
        left: 20px;
        border-radius: 20px;
    }

    .right-section {
        height: 65vh;
        overflow-y: auto;
        padding: 10px;
    }

    .login-container {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    .tab {
        padding: 1rem;
    }

    .social-login {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        margin-bottom: 1.5rem;
    }
    
    .error-banner {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .error-banner .error-message {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.25rem 1rem;
    }
    
    .tabs {
        max-width: 100%;
    }
    
    h2 {
        font-size: 1.7rem;
        margin-bottom: 0.3rem;
    }
    
    .subtitle {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
    
    .tab {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    
    label {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .input-container {
        border-radius: 10px;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 1rem 2.5rem;
        font-size: 0.95rem;
    }
    
    .login-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .remember-me span {
        font-size: 0.85rem;
    }
    
    .forgot-password {
        font-size: 0.85rem;
    }
    
    .divider {
        margin: 1.25rem 0;
    }
    
    .divider span {
        font-size: 0.85rem;
    }
    
    .social-login {
        gap: 0.5rem;
    }
    
    .google-btn, 
    .apple-btn {
        padding: 0.9rem;
        font-size: 0.9rem;
    }
    
    .back-link {
        margin-top: 1.5rem;
    }
    
    .error-banner {
        padding: 10px;
        gap: 8px;
    }
    
    .error-banner .error-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .error-banner .error-message {
        font-size: 0.9rem;
    }
    
    .left-section {
        padding: 16px;
    }
    
    .left-section::after {
        top: 16px;
        right: 16px;
        bottom: 16px;
        left: 16px;
        border-radius: 16px;
    }
}

@media (max-height: 700px) {
    .container {
        height: auto;
        min-height: 100vh;
    }
    
    .left-section {
        height: 30vh;
        min-height: 200px;
    }
    
    .right-section {
        height: auto;
        min-height: 70vh;
    }
    
    .login-container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 1rem 0.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .tabs {
        margin-bottom: 1.5rem;
    }
    
    .tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .login-btn {
        margin-top: 0.75rem;
    }
    
    .input-icon {
        left: 0.75rem;
    }
    
    .input-icon svg, 
    .toggle-password svg {
        width: 18px;
        height: 18px;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 0.9rem 0.75rem 0.9rem 2.25rem;
    }
    
    .input-container .toggle-password {
        right: 0.75rem;
    }
    
    .left-section {
        padding: 12px;
    }
    
    .left-section::after {
        top: 12px;
        right: 12px;
        bottom: 12px;
        left: 12px;
        border-radius: 12px;
    }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    .container {
        height: -webkit-fill-available;
    }
    
    body, html {
        min-height: -webkit-fill-available;
    }
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
    width: 100%;
}

.form-group.half {
    flex: 1;
    margin-bottom: 2rem;
    text-align: left;
}

.form-group.half .input-container {
    width: 100%;
}

.error-message {
    color: #E53E3E;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.error-message svg {
    width: 16px;
    height: 16px;
    stroke: #E53E3E;
    fill: #E53E3E;
}

.hidden {
    display: none;
}

.back-link {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.back-link a {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-decoration: none;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: var(--primary-color);
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Error notification banner */
.error-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #FEF2F2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    width: 100%;
    text-align: left;
}

.error-banner .error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.error-banner .error-icon svg {
    width: 24px;
    height: 24px;
    fill: #E53E3E;
    color: #E53E3E;
}

.error-banner .error-message {
    color: #1F2937;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    .container {
        flex-direction: row;
        height: auto;
        min-height: 100vh;
    }
    
    .left-section {
        width: 40%;
        min-width: 300px;
        height: auto;
        min-height: 100vh;
        padding: 20px;
    }
    
    .left-section::after {
        top: 20px;
        right: 20px;
        bottom: 20px;
        left: 20px;
        height: auto;
    }
    
    .right-section {
        width: 60%;
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .login-container {
        padding: 2rem;
    }
}

/* Additional refinements for DM Sans characteristics */
input::placeholder {
    font-family: var(--font-family);
    opacity: 0.7;
}

@media (min-resolution: 2dppx) {
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    h2 {
        letter-spacing: -0.03em;
    }
} 