/* ========================================
   MANIBOT ADMIN AUTH PAGES
   Login, Setup, Password Reset
   ======================================== */

body.admin-auth {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

/* Auth Container */
.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%);
    padding: 40px 32px;
    text-align: center;
    color: white;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    opacity: 0.9;
}

/* Auth Body */
.auth-body {
    padding: 40px 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-auth:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert.visible {
    display: block;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748b;
}

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

.auth-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* QR Section (for 2FA setup) */
.qr-section {
    display: none;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.qr-section.visible {
    display: block;
}

.qr-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #1e293b;
}

#qrcode {
    display: inline-block;
    margin: 0 auto 16px;
}

.code-display {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    color: #1e293b;
    word-break: break-all;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-header,
    .auth-body {
        padding: 32px 24px;
    }
}
