/* Custom CSS for educational CRM theme - Ko'k rang mavzusi */
:root {
    --primary: #0C0E37;      
    --primary-light: #1A1D4E; 
    --primary-foreground: #ffffff;
    --secondary: #3A3D72;     
    --background: #ffffff;
    --foreground: #374151;
    --card: #F5F6FF;          
    --border: #D1D5DB;
    --muted: #F0F2FF;
    --accent: #3A3D72;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

.bg-primary { background-color: var(--primary); }
.text-primary { color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.text-secondary { color: var(--secondary); }
.bg-card { background-color: var(--card); }
.border-custom { border-color: var(--border); }
.bg-muted { background-color: var(--muted); }

.login-container {
    background: linear-gradient(135deg, var(--card) 0%, #ffffff 100%);
    min-height: 100vh;
}

.login-card {
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(12, 14, 55, 0.1), 0 10px 10px -5px rgba(12, 14, 55, 0.04);
}

.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(12, 14, 55, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #070824;
    transform: translateY(-1px);
}

.language-toggle {
    transition: all 0.3s ease;
}

.language-toggle:hover {
    background-color: var(--muted);
}

.loading-spinner {
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toastify custom styles */
.toastify-custom {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-weight: 500;
    padding: 12px 16px;
}

.toastify-custom .toast-close {
    color: white;
    opacity: 0.8;
    position: absolute;
    right: 8px;
    top: 8px;
}

.toastify-custom .toast-close:hover {
    opacity: 1;
}

/* Premium Loader Styles */
.premium-loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(12, 14, 55, 0.95) 0%, 
        rgba(26, 29, 78, 0.95) 50%, 
        rgba(58, 61, 114, 0.95) 100%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

/* Animated Background Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite linear;
}

.particle:nth-child(odd) {
    background: rgba(58, 61, 114, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Premium Loader Animation */
.premium-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
}

/* Outer Ring */
.loader-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: rotate 2s linear infinite;
}

.loader-ring-1 {
    border-top: 3px solid #ffffff;
    border-right: 3px solid rgba(255, 255, 255, 0.3);
    animation-duration: 1.5s;
}

.loader-ring-2 {
    border-bottom: 3px solid #3A3D72;
    border-left: 3px solid rgba(58, 61, 114, 0.3);
    animation-duration: 2s;
    animation-direction: reverse;
}

.loader-ring-3 {
    border: 2px solid transparent;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-duration: 1s;
}

/* Center Logo */
.loader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffffff, #f0f2ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.loader-center i {
    font-size: 24px;
    color: var(--primary);
    animation: bounce-icon 1.5s ease-in-out infinite;
}

/* Progress Bar */
.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #3A3D72, #ffffff);
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    animation: progress-fill 3s ease-out, shimmer 2s linear infinite;
}

/* Floating Text Animation */
.loader-text-container {
    text-align: center;
    position: relative;
}

.loader-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    animation: text-glow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.loader-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
    animation: fade-slide 2s ease-in-out infinite;
}

/* Loading Steps */
.loading-steps {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.loading-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: step-pulse 1.5s ease-in-out infinite;
}

.loading-step:nth-child(1) { animation-delay: 0s; }
.loading-step:nth-child(2) { animation-delay: 0.3s; }
.loading-step:nth-child(3) { animation-delay: 0.6s; }
.loading-step:nth-child(4) { animation-delay: 0.9s; }
.loading-step:nth-child(5) { animation-delay: 1.2s; }

/* Keyframe Animations */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0% { 
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.4);
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 10px rgba(255, 255, 255, 0);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes bounce-icon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.1); }
}

@keyframes progress-fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes text-glow {
    0% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(58, 61, 114, 0.5); }
}

@keyframes fade-slide {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); }
}

@keyframes step-pulse {
    0%, 100% { 
        background: rgba(255, 255, 255, 0.3); 
        transform: scale(1); 
    }
    50% { 
        background: rgba(255, 255, 255, 0.9); 
        transform: scale(1.3); 
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .premium-loader {
        width: 100px;
        height: 100px;
    }
    
    .loader-center {
        width: 50px;
        height: 50px;
    }
    
    .loader-center i {
        font-size: 20px;
    }
    
    .progress-container {
        width: 250px;
    }
    
    .loader-title {
        font-size: 20px;
    }
    
    .loader-subtitle {
        font-size: 14px;
    }
    
    .toastify-custom {
        max-width: 90%;
        margin: 0 auto;
        right: 5%;
        left: 5%;
    }
}
/* Toast container va animatsiyalar */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-item {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(100%);
    opacity: 0;
}

.toast-item.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-item.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Premium toast dizayni */
.toast-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: white;
    padding: 16px 20px;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.toast-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.toast-premium.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.toast-premium.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.toast-premium.warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.toast-premium.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-text {
    font-size: 13px;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
    border-radius: 4px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Animatsiyalar */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-slide-in {
    animation: toastSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.toast-slide-out {
    animation: toastSlideOut 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Responsive design */
@media (max-width: 640px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast-premium {
        min-width: auto;
        width: 100%;
    }
}