/* Shared auth page styles — login, register, and django-allauth /accounts/* pages */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-card--centered {
    text-align: center;
}

.auth-card h1 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    text-align: center;
}

.auth-card p {
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-card p:last-child {
    margin-bottom: 0;
}

.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.message-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.message-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Custom login/register form groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* django-allauth form.as_p output */
.auth-card form p {
    margin-bottom: 1rem;
    text-align: left;
}

.auth-card form label {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
}

.auth-card form input[type="text"],
.auth-card form input[type="email"],
.auth-card form input[type="password"],
.auth-card form input[type="number"],
.auth-card form select,
.auth-card form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.auth-card form input:focus,
.auth-card form select:focus,
.auth-card form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.auth-card form ul.errorlist {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    font-size: 0.85rem;
    color: #721c24;
}

.auth-card form .helptext {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #888;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-card button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-card button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

.forgot-link {
    display: block;
    text-align: right;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.forgot-link a { color: #667eea; text-decoration: none; }
.forgot-link a:hover { text-decoration: underline; }

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span { padding: 0 0.75rem; }

.btn-google {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-google:hover { background: #f8f9fa; }

.auth-provider-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.auth-provider-badge span {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.auth-redirect {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.auth-redirect a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

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

.auth-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-actions {
    margin-top: 1.5rem;
}
