/* Authentication Styles */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --background-gray: #f8fafc;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--background-gray) 0%, #e0f2fe 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: flex;
    position: relative;
}

/* Custom Background Image Support */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* If custom background exists, add overlay for better readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.auth-container {
    width: 50%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
    margin-left: auto;
    background: var(--background-gray);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.auth-card {
    background: transparent;
    border-radius: 0;
    padding: 2rem;
    box-shadow: none;
    text-align: center;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-width: 150px;
    height: auto;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-blue);
    z-index: 2;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--secondary-blue);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.auth-footer {
    margin-top: 2rem;
}

.auth-footer a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-blue);
}

/* Error Messages */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 1rem;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.6s ease-out;
}

/* Logout Message */
.logout-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Auth Credits Footer */
.auth-credits {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

.auth-credits a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-credits a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.product-origin {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    opacity: 0.9;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.flag-icon {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    body::before,
    body::after {
        display: none;
    }

    .auth-container {
        padding: 1rem;
        margin-left: 0;
        box-shadow: none;
        height: 100vh;
        min-height: 100vh;
        background: var(--background-gray);
        overflow: hidden;
        width: 100%;
    }

    .auth-card {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        max-height: 100vh;
        overflow: hidden;
        gap: 1.5rem;
    }

    .auth-header {
        margin-bottom: 1.5rem;
        padding-top: 2rem;
    }

    .auth-logo {
        margin-bottom: 0.75rem;
    }

    .auth-logo img {
        max-width: 100px;
    }

    .auth-header h1 {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .auth-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

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

    .form-group input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .form-group i {
        left: 0.875rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        border-radius: 10px;
    }

    .auth-footer {
        margin-top: 1rem;
    }

    .auth-footer a {
        font-size: 0.875rem;
    }

    .error-message {
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .logout-message {
        margin-top: 0.75rem;
        padding: 0.625rem;
        font-size: 0.85rem;
    }

    .auth-credits {
        margin-top: 1rem;
        padding-top: 0.875rem;
        font-size: 0.75rem;
        padding-bottom: 2rem;
    }

    .product-origin {
        margin-top: 0.4rem;
        font-size: 0.7rem;
    }

    .flag-icon {
        width: 16px;
        height: 11px;
    }
}

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

    .auth-header {
        margin-bottom: 1.25rem;
        padding-top: 3rem;
    }

    .auth-logo {
        margin-bottom: 0.5rem;
    }

    .auth-logo img {
        max-width: 90px;
    }

    .auth-header h1 {
        font-size: 1.1rem;
    }

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

    .form-group input {
        padding: 0.7rem 0.7rem 0.7rem 2.4rem;
        font-size: 0.875rem;
    }

    .btn-primary {
        padding: 0.7rem 1.25rem;
        font-size: 0.875rem;
    }

    .auth-footer {
        margin-top: 0.875rem;
    }

    .auth-credits {
        font-size: 0.7rem;
        margin-top: 0.875rem;
        padding-top: 0.75rem;
        padding-bottom: 2.5rem;
    }

    .product-origin {
        margin-top: 0.35rem;
        font-size: 0.65rem;
    }

    .flag-icon {
        width: 14px;
        height: 9px;
    }
}