/* Auth Pages Common Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
}

.auth-container {
    display: flex;
    height: 100vh;
    position: relative;
}

.auth-left {
    width: 33.33%;
    min-width: 400px;
    max-width: 600px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

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

.logo-img {
    width: 280px;
    height: auto;
    margin-bottom: 3rem;
    display: block;
}

.welcome-text {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.welcome-text.medium {
    font-weight: 500;
}

.subtitle {
    color: #0066ff;
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 2.5rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-control {
    width: 100%;
    padding: 12px 12px 12px 2.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

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

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    width: 16px;
    height: 16px;
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: #0066ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-auth:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.terms-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.terms-text a {
    color: #0066ff;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

.links-container {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.links {
    display: flex;
    font-size: 0.95rem;
}

.links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #0066ff;
}

.separator {
    color: #ccc;
    margin: 0 0.5rem;
}

/* Right side with vertical lines pattern */
.auth-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    min-width: 0;
}

.pattern-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        90deg,
        #4A90E2 0,
        #4A90E2 2px,
        transparent 2px,
        transparent 7px
    );
    opacity: 0.6;
}

.pattern-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.7) 70%,
        rgba(255, 255, 255, 1) 85%
    );
    pointer-events: none;
}

/* Language selector styles */
.language-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s ease;
}

.language-selector:hover {
    color: #0066ff;
}

.language-flag {
    width: 18px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.flag-fr {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='1' height='2' fill='%23002395'/%3E%3Crect width='1' height='2' x='1' fill='white'/%3E%3Crect width='1' height='2' x='2' fill='%23ED2939'/%3E%3C/svg%3E");
}

.flag-en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='white' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='white' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E");
}

/* Language dropdown styles */
.language-dropdown {
    position: relative;
}

.language-selector {
    border: none;
    outline: none;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    padding: 8px 0;
    list-style: none;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
}

.dropdown-menu li a img {
    display: inline-block;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.error-message svg {
    margin-right: 0.25rem;
}

/* Icons */
.icon-user {
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M8 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM3 12c0-2.5 2.2-4 5-4s5 1.5 5 4v1H3v-1z'/%3E%3C/svg%3E") center no-repeat;
}

.icon-email {
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M2 4v8l6-4 6 4V4c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2zm6 2.5L4 4h8l-4 2.5z'/%3E%3C/svg%3E") center no-repeat;
}

.icon-lock {
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M13 5h-2V3.5C11 2.1 9.9 1 8.5 1h-1C6.1 1 5 2.1 5 3.5V5H3L2 8v5c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V8l-1-3zM6 3.5c0-.8.7-1.5 1.5-1.5h1c.8 0 1.5.7 1.5 1.5V5H6V3.5z'/%3E%3C/svg%3E") center no-repeat;
}

/* Medium screens */
@media (max-width: 1400px) {
    .auth-left {
        width: 40%;
        min-width: 380px;
    }
}

/* Switch to mobile when 1/3 of screen < 400px (minimum width needed) */
/* 400px * 3 = 1200px - so switch to mobile at 1200px */
@media (max-width: 1200px) {
    .auth-right {
        display: none;
    }

    .auth-left {
        width: 100%;
        min-width: unset;
        max-width: unset;
        padding: 2rem;
    }

    .auth-form-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Large screens - make left panel 1/3 */
@media (min-width: 1920px) {
    .auth-left {
        max-width: 640px;
    }

    .auth-form-wrapper {
        max-width: 500px;
    }
}

/* Mobile design */
@media (max-width: 768px) {
    .auth-left {
        padding: 1.5rem;
    }

    .auth-form-wrapper {
        max-width: 100%;
    }

    .logo-img {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .welcome-text {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

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

    .links {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .auth-left {
        padding: 1rem;
    }

    .logo-img {
        width: 240px;
    }

    .welcome-text {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }
}