/* av-framework.css вЂ” AvFramework v2.0 (Extended Edition) */

/* ========== 1. CSS Variables (Light/Dark) ========== */
:root {
  /* С†РІРµС‚Р° С„РѕРЅР° */
  --av-bg: #0a0c12;
  --av-bg-alt: #0f1117;
  --av-surface: rgba(20, 24, 40, 0.65);
  --av-surface-light: rgba(30, 35, 60, 0.85);
  --av-surface-dark: rgba(12, 14, 22, 0.9);
  
  /* Р°РєС†РµРЅС‚РЅС‹Рµ С†РІРµС‚Р° */
  --av-primary: #3b82f6;
  --av-primary-dark: #2563eb;
  --av-primary-light: #60a5fa;
  --av-secondary: #8b5cf6;
  --av-success: #10b981;
  --av-warning: #f59e0b;
  --av-danger: #ef4444;
  --av-info: #06b6d4;
  
  /* С‚РµРєСЃС‚ */
  --av-text: #eef2ff;
  --av-text-muted: #8b9bcf;
  --av-text-light: #cbd5e1;
  
  /* РіСЂР°РЅРёС†С‹ Рё СЂР°РґРёСѓСЃС‹ */
  --av-border: rgba(255, 255, 255, 0.1);
  --av-border-light: rgba(255, 255, 255, 0.05);
  --av-radius: 1rem;
  --av-radius-sm: 0.5rem;
  --av-radius-lg: 1.5rem;
  --av-radius-full: 9999px;
  
  /* С‚РµРЅРё */
  --av-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --av-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --av-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --av-shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);
  
  /* Р°РЅРёРјР°С†РёРё */
  --av-transition: all 0.2s ease;
  --av-transition-slow: all 0.3s ease;
  
  /* Р±Р»СЋСЂ */
  --av-blur-sm: blur(4px);
  --av-blur-md: blur(8px);
  --av-blur-lg: blur(16px);
}

/* СЃРІРµС‚Р»Р°СЏ С‚РµРјР° (РѕРїС†РёРѕРЅР°Р»СЊРЅРѕ) */
[data-theme="light"] {
  --av-bg: #f8fafc;
  --av-bg-alt: #f1f5f9;
  --av-surface: rgba(255, 255, 255, 0.8);
  --av-surface-light: rgba(255, 255, 255, 0.95);
  --av-text: #0f172a;
  --av-text-muted: #475569;
  --av-border: rgba(0, 0, 0, 0.1);
}

/* ========== 2. Base & Reset ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--av-bg);
  color: var(--av-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ========== 3. Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--av-primary); text-decoration: none; transition: var(--av-transition); }
a:hover { color: var(--av-primary-light); }

/* С‚РµРєСЃС‚РѕРІС‹Рµ СѓС‚РёР»РёС‚С‹ */
.text-primary { color: var(--av-primary); }
.text-secondary { color: var(--av-secondary); }
.text-success { color: var(--av-success); }
.text-warning { color: var(--av-warning); }
.text-danger { color: var(--av-danger); }
.text-info { color: var(--av-info); }
.text-muted { color: var(--av-text-muted); }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* ========== 4. Layout: Container, Grid, Flex ========== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-fluid {
  width: 100%;
  padding: 0 1.5rem;
}

/* Flex */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* responsive grid helpers */
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.row-span-1 { grid-row: span 1 / span 1; }
.row-span-2 { grid-row: span 2 / span 2; }

/* ========== 5. Spacing (Margin & Padding) ========== */
/* РІСЃРµ Р·РЅР°С‡РµРЅРёСЏ РѕС‚ 0 РґРѕ 20 (0.25rem, 0.5rem, 0.75rem, 1rem, 1.25rem, 1.5rem, 2rem, 2.5rem, 3rem) */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-4 { padding-left: 1rem; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-4 { padding-right: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.25rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }
.m-auto { margin: auto; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* ========== 6. Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--av-transition);
  cursor: pointer;
  border: none;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; display: flex; }

.btn-primary {
  background: var(--av-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--av-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--av-shadow-glow);
}

.btn-secondary {
  background: var(--av-secondary);
  color: white;
}
.btn-secondary:hover {
  background: #7c3aed;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--av-success);
  color: white;
}
.btn-danger {
  background: var(--av-danger);
  color: white;
}
.btn-warning {
  background: var(--av-warning);
  color: white;
}

.btn-outline {
  border: 1px solid var(--av-primary);
  color: var(--av-primary);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--av-text-muted);
}
.btn-ghost:hover {
  color: var(--av-text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  padding: 0.6rem;
  border-radius: var(--av-radius-full);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== 7. Cards ========== */
.card {
  background: var(--av-surface);
  backdrop-filter: blur(8px);
  border-radius: var(--av-radius);
  padding: 1.5rem;
  border: 1px solid var(--av-border);
  transition: var(--av-transition);
}
.card:hover {
  transform: translateY(-4px);
  background: var(--av-surface-light);
  border-color: var(--av-primary);
}
.card-header {
  margin-bottom: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--av-border);
  padding-bottom: 0.75rem;
}
.card-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--av-border);
}

/* ========== 8. Form Elements ========== */
.input, .textarea, .select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-sm);
  padding: 0.6rem 1rem;
  color: var(--av-text);
  width: 100%;
  outline: none;
  transition: var(--av-transition);
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--av-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
.textarea {
  resize: vertical;
  min-height: 80px;
}
.label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
}
.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.checkbox input, .radio input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--av-primary);
}
.form-group {
  margin-bottom: 1rem;
}

/* ========== 9. Badges / Tags ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--av-radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--av-surface);
  color: var(--av-text);
}
.badge-primary { background: var(--av-primary); color: white; }
.badge-success { background: var(--av-success); color: white; }
.badge-danger { background: var(--av-danger); color: white; }
.badge-warning { background: var(--av-warning); color: white; }
.badge-info { background: var(--av-info); color: white; }

/* ========== 10. Alerts ========== */
.alert {
  padding: 1rem;
  border-radius: var(--av-radius-sm);
  margin-bottom: 1rem;
  border-left: 4px solid;
  background: var(--av-surface);
}
.alert-primary { border-left-color: var(--av-primary); }
.alert-success { border-left-color: var(--av-success); background: rgba(16, 185, 129, 0.1); }
.alert-danger { border-left-color: var(--av-danger); background: rgba(239, 68, 68, 0.1); }
.alert-warning { border-left-color: var(--av-warning); background: rgba(245, 158, 11, 0.1); }
.alert-info { border-left-color: var(--av-info); background: rgba(6, 182, 212, 0.1); }

/* ========== 11. Modal (simple, no JS) ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal:target {
  display: flex;
}
.modal-content {
  background: var(--av-bg-alt);
  border-radius: var(--av-radius-lg);
  max-width: 500px;
  width: 90%;
  padding: 1.5rem;
  border: 1px solid var(--av-border);
  animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-close {
  background: none;
  border: none;
  color: var(--av-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== 12. Breadcrumbs ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--av-text-muted);
}
.breadcrumb-item a {
  color: var(--av-text-muted);
}
.breadcrumb-item.active {
  color: var(--av-text);
}

/* ========== 13. Avatar ========== */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--av-radius-full);
  background: var(--av-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
}
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.25rem; }
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ========== 14. Navbar ========== */
.navbar {
  background: var(--av-surface-dark);
  backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--av-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}
.navbar-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
}
.navbar-menu a {
  color: var(--av-text-muted);
}
.navbar-menu a:hover {
  color: var(--av-text);
}

/* ========== 15. Tabs ========== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--av-border);
  gap: 0.5rem;
}
.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--av-transition);
}
.tab.active {
  border-bottom-color: var(--av-primary);
  color: var(--av-primary);
}
.tab-pane {
  display: none;
  padding: 1rem 0;
}
.tab-pane.active {
  display: block;
}

/* ========== 16. Dropdown (CSS only) ========== */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--av-surface-dark);
  backdrop-filter: blur(12px);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-sm);
  min-width: 160px;
  z-index: 10;
}
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--av-text);
}
.dropdown-menu a:hover {
  background: rgba(255,255,255,0.05);
}

/* ========== 17. Progress Bar ========== */
.progress {
  background: rgba(255,255,255,0.1);
  border-radius: var(--av-radius-full);
  height: 0.5rem;
  overflow: hidden;
}
.progress-bar {
  background: var(--av-primary);
  width: 0%;
  height: 100%;
  border-radius: var(--av-radius-full);
  transition: width 0.3s;
}

/* ========== 18. Utilities (Borders, Shadows, Display) ========== */
.rounded { border-radius: var(--av-radius); }
.rounded-sm { border-radius: var(--av-radius-sm); }
.rounded-lg { border-radius: var(--av-radius-lg); }
.rounded-full { border-radius: var(--av-radius-full); }
.border { border: 1px solid var(--av-border); }
.border-t { border-top: 1px solid var(--av-border); }
.border-b { border-bottom: 1px solid var(--av-border); }

.shadow-sm { box-shadow: var(--av-shadow-sm); }
.shadow-md { box-shadow: var(--av-shadow-md); }
.shadow-lg { box-shadow: var(--av-shadow-lg); }
.shadow-glow { box-shadow: var(--av-shadow-glow); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Р°РЅРёРјР°С†РёРё */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-up { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ========== 19. Star Background (optional) ========== */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at 20% 30%, #0a0c12, #010101);
}
.stars-bg::before,
.stars-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(2px 2px at 10% 20%, #9ca3af, rgba(0,0,0,0)),
                    radial-gradient(1px 1px at 25% 45%, #d1d5db, rgba(0,0,0,0));
  background-repeat: no-repeat;
  opacity: 0.4;
  animation: twinkle 6s infinite alternate;
}
@keyframes twinkle {
  0% { opacity: 0.2; }
  100% { opacity: 0.7; }
}

/* ========== 20. Scrollbar (Webkit) ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--av-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--av-primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--av-primary-dark);
}

/* ========== 21. Responsive Breakpoints (Mobile first, then sm, md, lg) ========== */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:text-xl { font-size: 1.25rem; }
}
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:flex-row { flex-direction: row; }
}
@media (max-width: 767px) {
  .mobile\:flex-col { flex-direction: column; }
  .mobile\:gap-2 { gap: 0.5rem; }
  .navbar-menu {
    display: none; /* РґР»СЏ РјРѕР±РёР»СЊРЅРѕРіРѕ РјРµРЅСЋ РёСЃРїРѕР»СЊР·РѕРІР°С‚СЊ JS */
  }
}

/* ========== 22. Р”РѕРїРѕР»РЅРёС‚РµР»СЊРЅС‹Рµ РєРѕРјРїРѕРЅРµРЅС‚С‹ (Tooltip) ========== */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]:before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 20;
}
[data-tooltip]:hover:before {
  opacity: 1;
}

/* ========== 23. Print styles ========== */
@media print {
  .no-print { display: none; }
  body { background: white; color: black; }
  .card { background: white; border: 1px solid #ccc; }
}