:root {
    --primary-color: #1f2937;
    --primary-hover: #111827;
    --background-color: #f9fafb;
    --card-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    --input-focus: #374151;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --illustration-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --footer-bg: rgba(255, 255, 255, 0.9);
    
    /* Logo Font */
    --font-anybody: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
    border: 1px solid var(--border-color);
}

.login-form-section {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-illustration-section {
    background: var(--illustration-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.login-header {
    margin-bottom: 2rem;
    text-align: left;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: var(--text-primary);
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(55, 65, 81, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
    transform: scale(1.1);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #000000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 41, 55, 0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.2);
}

.illustration {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0;
}

.illustration-fallback {
    font-size: 4rem;
    color: var(--primary-color);
    background: white;
    width: 200px;
    height: 200px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 35px rgba(31, 41, 55, 0.15);
    border: 2px solid rgba(31, 41, 55, 0.1);
}


.alert {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.already-logged-in {
    background: #f0f9ff;
    color: #0369a1;
    border-left: 4px solid #0369a1;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.already-logged-in a {
    color: #0369a1;
    text-decoration: underline;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .login-card {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .login-illustration-section {
        display: none;
    }
    
    .login-form-section {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.625rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .login-card {
        max-width: 700px;
    }
    
    .illustration-fallback {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }
}

/* Loading animation for button */
.btn-login.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus styles for accessibility */
.form-control:focus,
.form-check-input:focus,
.btn-login:focus {
    outline: 2px solid var(--input-focus);
    outline-offset: 2px;
}

/* Anybody for Logo */
.font-anybody {
    font-family: var(--font-anybody) !important;
    font-weight: 600 !important;
    font-style: normal !important;
    letter-spacing: 0.5px !important;
}

/* Font weight variations for testing */
.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }
.font-weight-black { font-weight: 900; }

/* Footer styling for art.tonia branding */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
    padding: 1.25rem;
    text-align: center;
    z-index: 10;
    border-top: 1px solid rgba(231, 229, 228, 0.5);
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.arttonia-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 700;
    position: relative;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.arttonia-link:hover {
    color: var(--primary-color);
    background: rgba(31, 41, 55, 0.05);
    transform: translateY(-1px);
}

/* Adjust body padding to account for footer */
body {
    padding-bottom: 4rem;
}