/* Authentication Pages Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #8BC34A;
    --primary-dark: #689F38;
    --primary-light: #AED581;
    --secondary-color: #333333;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #2196F3;
    --background: #F5F7FA;
    --surface: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

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

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface) 100%);
    padding: 2rem;
    text-align: center;
    outline: 3px solid var(--primary-color);
}

.auth-logo {
    max-height: 60px;
    margin-bottom: 1rem;
}

.auth-title {
    color: black;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Auth Body */
.auth-body {
    padding: 2rem;
}

.auth-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

/* Error Messages */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.errorlist li {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.non-field-errors {
    background: #FFEBEE;
    color: var(--danger-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth Footer */
.auth-footer {
    padding: 1.5rem 2rem;
    background: var(--background);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Home Page Styles */
.home-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.welcome-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.welcome-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.welcome-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.welcome-header p {
    margin: 0;
    font-size: 1.25rem;
    opacity: 0.9;
}

.welcome-body {
    padding: 3rem 2rem;
    text-align: center;
}

.welcome-body p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.home-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.user-info {
    background: var(--background);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-info-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info-text {
    text-align: left;
}

.user-info-text span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-info-text strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 1.25rem 1.5rem;
    }
    
    .welcome-header h1 {
        font-size: 2rem;
    }
    
    .welcome-header p {
        font-size: 1.125rem;
    }
    
    .home-actions {
        flex-direction: column;
    }
    
    .home-actions .btn {
        width: 100%;
    }
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}