/*
    Authentication styles for giiHelpdesk
    - Extends the main design system
    - Form-focused layouts
    - Responsive design
*/

/* Import base styles */
@import url('style.css');

/* Authentication container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #eaf2ff 0%, #ffffff 100%);
}

.auth-card {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--color-muted);
    font-size: 14px;
}

/* Form styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 14px;
}

.required {
    color: #dc3545;
    font-weight: 700;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: var(--radius);
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(10, 117, 255, 0.1);
}

.form-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-input.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.form-help {
    color: var(--color-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* Button styles */
.auth-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 48px;
}

.auth-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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

.auth-btn--secondary {
    background: #6bb2f1;
}

.auth-btn--danger {
    background: #dc3545;
}
.auth-btn--warning {
    background: lch(80.15% 25.16 93.13);
}
/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Domain availability indicator */
.domain-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-top: 4px;
}

.domain-status--available {
    color: #28a745;
}

.domain-status--unavailable {
    color: #dc3545;
}

.domain-status--checking {
    color: var(--color-muted);
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.strength-fill--weak { width: 25%; background: #dc3545; }
.strength-fill--fair { width: 50%; background: #ffc107; }
.strength-fill--good { width: 75%; background: #17a2b8; }
.strength-fill--strong { width: 100%; background: #28a745; }

.strength-text {
    font-size: 12px;
    color: var(--color-muted);
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

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

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

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

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

.auth-divider span {
    background: white;
    padding: 0 16px;
    color: var(--color-muted);
    font-size: 14px;
}

/* Social login buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--radius);
    background: white;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: var(--color-primary);
    background: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
        margin: 16px;
    }
    
    .auth-container {
        padding: 16px;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

.toast--success {
    border-left: 4px solid #28a745;
}

.toast--error {
    border-left: 4px solid #dc3545;
}

.toast--warning {
    border-left: 4px solid #ffc107;
}

.toast--info {
    border-left: 4px solid var(--color-primary);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 14px;
    color: var(--color-muted);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-muted);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f8f9fa;
    color: var(--color-text);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Account dashboard styles */
.account-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

.account-header {
    margin-bottom: 32px;
}

.account-title {
    font-size: 32px;
    margin-bottom: 8px;
}

.account-subtitle {
    color: var(--color-muted);
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.account-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.account-card__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-card__content {
    margin-bottom: 20px;
}

.account-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f3f4;
}

.account-info__label {
    color: var(--color-muted);
    font-weight: 500;
}

.account-info__value {
    font-weight: 600;
}

.subscription-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-badge--free {
    background: #e3f2fd;
    color: #1976d2;
}

.subscription-badge--pro {
    background: #e8f5e8;
    color: #2e7d32;
}

.subscription-badge--team {
    background: #fff3e0;
    color: #f57c00;
}

.subscription-badge--cancelled {
    background: #ffebee;
    color: #c62828;
}

@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
    
    .account-container {
        padding: 24px 16px;
    }
}

