/* W33DEV Auth System Styles */

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Auth container animations */
.auth-container {
    animation: fadeIn 0.6s ease-out;
}

/* Form field focus effects */
.form-field:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Button hover effects */
.btn-auth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-auth:active {
    transform: translateY(0);
}

/* Loading states */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message animations */
.message-enter {
    animation: slideIn 0.3s ease-out;
}

.message-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(239, 68, 68, 0.1));
    border-left: 4px solid #ef4444;
}

.message-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    border-left: 4px solid #22c55e;
}

/* Form styling */
.form-group {
    position: relative;
}

.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Toggle password visibility */
.password-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #8b5cf6;
}

/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #6b7280;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    left: 1px;
    top: -1px;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* Status indicator */
.status-indicator {
    animation: pulse 2s infinite;
}

/* Responsive design */
@media (max-width: 640px) {
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Dark mode specific enhancements */
body.dark {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Background pattern overlay */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* Glass morphism effect */
.glass-card {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover states for interactive elements */
.interactive:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Focus states for accessibility */
.focus-visible:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* User management specific styles */
.user-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.user-card:hover {
    border-left-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.05);
}

.user-card.admin {
    border-left-color: #ef4444;
}

.user-card.editor {
    border-left-color: #f59e0b;
}

.user-card.viewer {
    border-left-color: #10b981;
}

/* Role badges */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-badge.admin {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-badge.editor {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-badge.viewer {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Action buttons */
.action-btn {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn.edit {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.action-btn.delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal animations */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
