@charset "UTF-8";

/* Core application utilities */
[x-cloak] {
    display: none !important;
}

html {
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Enhanced font support for Cyrillic and other scripts */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Scrollbar styling for major sections */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.25);
    border-radius: 4px;
}
body.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}
body.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.24);
}

/* Generic button system used across legacy templates */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background-color: #2563eb;
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}
.btn-secondary {
    background-color: #fff;
    border-color: #d1d5db;
    color: #1f2937;
}
.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #cbd5f5;
}
.btn-success {
    background-color: #22c55e;
    color: #fff;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}
.btn-success:hover {
    background-color: #16a34a;
}
.btn-danger {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background-color: #dc2626;
}
.btn-outline,
.btn-outline-purple {
    background-color: transparent;
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.35);
}
.btn-outline:hover,
.btn-outline-purple:hover {
    background-color: rgba(99, 102, 241, 0.1);
}
.btn-outline {
    color: #1f2937;
    border-color: #d1d5db;
}
.btn-outline:hover {
    color: #111827;
    border-color: #9ca3af;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    z-index: 1001;
    transition: opacity 0.4s ease;
}
body.dark #preloader {
    background-color: #1c1c1e;
}
#preloader .spinner {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

/* Toastify theme bridge */
.toastify-success {
    background: linear-gradient(to right, #22c55e, #16a34a) !important;
}
.toastify-error {
    background: linear-gradient(to right, #ef4444, #dc2626) !important;
}
.toastify-warning {
    background: linear-gradient(to right, #f59e0b, #b45309) !important;
}
.toastify-info {
    background: linear-gradient(to right, #0ea5e9, #0369a1) !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
