/**
 * QuantumLayers Frontend Authentication Styles
 */

/* Auth Container */
.ql-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ql-auth-container {
    width: 100%;
    max-width: 450px;
}

.ql-auth-box {
    background: #ffffff;
    border-radius: 2px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ql-auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.ql-auth-logo h1 {
    font-size: 28px;
    color: #1d2327;
    margin: 0;
    font-weight: 700;
}

.ql-auth-logo p {
    color: #666;
    margin: 8px 0 0 0;
    font-size: 14px;
}

/* Alerts */
.ql-alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 2px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ql-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ql-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ql-alert-icon {
    font-size: 18px;
    font-weight: bold;
    margin-right: 12px;
}

.ql-alert-message {
    flex: 1;
}

.ql-alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.ql-alert-close:hover {
    opacity: 1;
}

/* Google Sign In */
.ql-google-signin-wrapper {
    margin-bottom: 20px;
}

#google-signin-btn {
    width: 100% !important;
}

.ql-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 600;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s;
}

.ql-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ql-google-btn svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.ql-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.ql-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.ql-divider span {
    background: #fff;
    padding: 0 20px;
    position: relative;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Form Styles */
.ql-form {
    margin: 0;
}

.ql-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
}

.ql-form-group {
    margin-bottom: 20px;
}

.ql-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.ql-form-group input[type="text"],
.ql-form-group input[type="email"],
.ql-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 15px;
    color: #333;
    transition: all 0.2s;
    box-sizing: border-box;
}

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

.ql-form-group input::placeholder {
    color: #333;
}

.ql-form-group small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 13px;
}

.ql-form-group.has-error input {
    border-color: #dc3545;
}

.ql-form-group.has-error .ql-error-message {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
}

/* Password Field with Toggle */
.ql-password-wrapper {
    position: relative;
}

.ql-password-wrapper input {
    padding-right: 50px;
}

.ql-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
}

.ql-toggle-password:hover {
    color: #333;
}

/* Checkbox */
.ql-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.ql-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.ql-checkbox label {
    font-weight: normal;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* Auth Links */
.ql-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

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

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

.ql-auth-links span {
    margin: 0 8px;
    color: #ddd;
}

/* Dashboard Styles */
.ql-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ql-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.ql-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ql-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.ql-user-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.ql-user-details h2 {
    margin: 0;
    font-size: 28px;
    color: #1d2327;
}

.ql-user-details p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.ql-badge {
    display: inline-block;
    background: #e7f3ff;
    color: #2271b1;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Stats Grid */
.ql-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ql-stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ql-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ql-stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.ql-stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.ql-stat-label {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section */
.ql-section {
    background: #fff;
    padding: 30px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ql-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.ql-section-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1d2327;
}

/* Empty State */
.ql-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.ql-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.ql-empty-state p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Loading State */
.ql-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.ql-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f1;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .ql-auth-box {
        padding: 30px 20px;
    }
    
    .ql-form-row {
        grid-template-columns: 1fr;
    }
    
    .ql-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .ql-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.ql-text-center {
    text-align: center;
}

.ql-mt-2 {
    margin-top: 20px;
}

.ql-mb-2 {
    margin-bottom: 20px;
}

.ql-hidden {
    display: none !important;
}

.ql-auth-required {
    display: none;
}

.ql-auth-required.ql-logged-in {
    display: block;
}

.ql-auth-hidden {
    display: block;
}

.ql-auth-hidden.ql-logged-in {
    display: none;
}
