/* ----- СБРОС И БАЗОВЫЕ СТИЛИ ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body, html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    background-color: #f8fafc;
    color: #0f172a;
    transition: background-color 0.3s, color 0.3s;
}
body.dark {
    background-color: #020617;
    color: #f1f5f9;
}

/* ----- УТИЛИТЫ (как Tailwind, но руками) ----- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.hidden { display: none; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.relative { position: relative; }
.static { position: static; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.bottom-6 { bottom: 1.5rem; }
.left-6 { left: 1.5rem; }
.right-6 { right: 1.5rem; }
.left-1\/2 { left: 50%; }
.top-4 { top: 1rem; }
.-bottom-1 { bottom: -0.25rem; }
.-left-1 { left: -0.25rem; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.translate-y-\[-10px\] { transform: translateY(-10px); }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }

.w-full { width: 100%; }
.w-1 { width: 0.25rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-24 { width: 6rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-\[75\%\] { max-width: 75%; }
.h-full { height: 100%; }
.h-1 { height: 0.25rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.min-h-\[48px\] { min-height: 48px; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-20 { padding-top: 5rem; }
.pb-24 { padding-bottom: 6rem; }
.ml-2 { margin-left: 0.5rem; }
.-ml-2 { margin-left: -0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.font-sans { font-family: 'Inter', sans-serif; }
.font-mono { font-family: monospace; }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[15px\] { font-size: 15px; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-words { word-wrap: break-word; }
.uppercase { text-transform: uppercase; }

.text-white { color: #ffffff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-900 { color: #0f172a; }
.text-slate-600 { color: #475569; }
.text-slate-300 { color: #cbd5e1; }
.text-blue-600 { color: #2563eb; }
.text-red-500 { color: #ef4444; }
.text-green-500 { color: #22c55e; }

.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-red-50 { background-color: #fef2f2; }
.bg-black\/60 { background-color: rgba(0,0,0,0.6); }
.bg-white\/90 { background-color: rgba(255,255,255,0.9); }
.bg-transparent { background-color: transparent; }
.bg-\[#eef1f5\] { background-color: #eef1f5; }

.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37,99,235,0)); }
.to-indigo-700 { --tw-gradient-to: #4338ca; }
.from-indigo-500 { --tw-gradient-from: #6366f1; }
.to-purple-600 { --tw-gradient-to: #9333ea; }
.from-blue-500\/10 { --tw-gradient-from: rgba(59,130,246,0.1); }
.to-purple-500\/10 { --tw-gradient-to: rgba(168,85,247,0.1); }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-700\/50 { border-color: rgba(51,65,85,0.5); }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.border-white\/50 { border-color: rgba(255,255,255,0.5); }
.border-transparent { border-color: transparent; }
.border-blue-500\/30 { border-color: rgba(59,130,246,0.3); }
.border-t-transparent { border-top-color: transparent; }

.rounded-full { border-radius: 9999px; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-\[2rem\] { border-radius: 2rem; }
.rounded-tr-sm { border-top-right-radius: 0.125rem; }
.rounded-tl-sm { border-top-left-radius: 0.125rem; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05); }
.shadow-blue-500\/30 { box-shadow: 0 10px 15px -3px rgba(37,99,235,0.3); }
.shadow-slate-200\/50 { box-shadow: 0 25px 50px -12px rgba(226,232,240,0.5); }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.transform { transform: translateX(0) translateY(0) rotate(0) scale(1); }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(12px); }
.blur { filter: blur(8px); }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.scroll-smooth { scroll-behavior: smooth; }

.outline-none { outline: none; }
.ring-blue-500\/50 { --tw-ring-color: rgba(59,130,246,0.5); }
.focus-within\:ring-2:focus-within { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }

.active\:scale-95:active { transform: scale(0.95); }
.active\:scale-90:active { transform: scale(0.9); }
.active\:scale-\[0\.99\]:active { transform: scale(0.99); }
.hover\:border-blue-500\/30:hover { border-color: rgba(59,130,246,0.3); }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:text-slate-600:hover { color: #475569; }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

.group:hover .group-hover\:opacity-100 { opacity: 1; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.dark .glass {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.page-enter { animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.msg-enter { animation: msgPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes msgPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.loader { width: 20px; height: 20px; border: 3px solid #FFF; border-bottom-color: transparent; border-radius: 50%; display: inline-block; box-sizing: border-box; animation: rotation 1s linear infinite; }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.dark .dark\:bg-slate-900 { background-color: #0f172a; }
.dark .dark\:bg-slate-950 { background-color: #020617; }
.dark .dark\:bg-slate-800 { background-color: #1e293b; }
.dark .dark\:bg-slate-700 { background-color: #334155; }
.dark .dark\:bg-slate-900\/30 { background-color: rgba(15,23,42,0.3); }
.dark .dark\:bg-slate-800\/90 { background-color: rgba(30,41,59,0.9); }
.dark .dark\:bg-blue-900\/30 { background-color: rgba(30,58,138,0.3); }
.dark .dark\:bg-red-900\/20 { background-color: rgba(127,29,29,0.2); }
.dark .dark\:bg-\[#0b1120\] { background-color: #0b1120; }
.dark .dark\:text-white { color: #ffffff; }
.dark .dark\:text-slate-900 { color: #0f172a; }
.dark .dark\:text-slate-400 { color: #94a3b8; }
.dark .dark\:text-slate-200 { color: #e2e8f0; }
.dark .dark\:text-slate-300 { color: #cbd5e1; }
.dark .dark\:text-blue-400 { color: #60a5fa; }
.dark .dark\:border-slate-800 { border-color: #1e293b; }
.dark .dark\:border-slate-700\/50 { border-color: rgba(51,65,85,0.5); }
.dark .dark\:border-slate-800\/90 { border-color: rgba(30,41,59,0.9); }
.dark .dark\:shadow-black\/50 { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.dark .dark\:hover\:text-slate-200:hover { color: #e2e8f0; }
.dark .dark\:bg-blue-600 { background-color: #2563eb; }
.dark .dark\:left-7 { left: 1.75rem; }

@media (min-width: 640px) {
    .sm\:border-x { border-left-width: 1px; border-right-width: 1px; }
    .sm\:border-slate-200 { border-color: #e2e8f0; }
}
.dark .dark\:sm\:border-slate-800 { border-color: #1e293b; }

.placeholder\:normal-case::placeholder { text-transform: none; }
