/* ============================================
   TROF System v2.0 — Layout
   ============================================
   أنظمة التخطيط: Grid, Flex, Containers, Sections
   يعتمد على tokens.css و base.css
   ============================================ */

/* ==========================================
   📐 CONTAINERS — الحاويات
   ========================================== */

.container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.container-sm {
  max-width: var(--w-sm);
}

.container-md {
  max-width: var(--w-md);
}

.container-lg {
  max-width: var(--w-lg);
}

.container-xl {
  max-width: var(--w-xl);
}

.container-2xl {
  max-width: var(--w-2xl);
}

.container-content {
  max-width: var(--w-content);
}

.container-narrow {
  max-width: var(--w-narrow);
}

.container-wide {
  max-width: var(--w-wide);
}

.container-full {
  max-width: 100%;
  padding-inline: var(--s-4);
}

/* ==========================================
   📄 SECTIONS — الأقسام
   ========================================== */

.section {
  padding-block: var(--s-16);
}

.section-xs {
  padding-block: var(--s-6);
}

.section-sm {
  padding-block: var(--s-10);
}

.section-md {
  padding-block: var(--s-12);
}

.section-lg {
  padding-block: var(--s-20);
}

.section-xl {
  padding-block: var(--s-24);
}

.section-hero {
  padding-block: var(--s-20) var(--s-16);
}

/* Section divider */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border), transparent);
  margin-block: var(--s-8);
}

/* ==========================================
   🔲 PAGE — الصفحة الأساسية
   ========================================== */

.page {
  padding-block: var(--s-6) var(--s-16);
  min-height: calc(100vh - var(--h-header) - 100px);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--c-border);
}

.page-title {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  margin: 0;
}

.page-subtitle {
  font-size: var(--fs-base);
  color: var(--c-text-mut);
  margin-top: var(--s-1);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* ==========================================
   🎯 GRID SYSTEM — نظام الشبكة
   ========================================== */

.grid {
  display: grid;
  gap: var(--s-4);
}

.grid-tight {
  gap: var(--s-2);
}

.grid-loose {
  gap: var(--s-6);
}

/* Column counts */
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Responsive grids */
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 2fr; }
.grid-3-1 { grid-template-columns: 3fr 1fr; }

/* Auto-fit */
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.grid-auto-md {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-auto-lg {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-auto-xl {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* Auto-fill (يبقي المساحة الفارغة) */
.grid-fill-sm {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.grid-fill-md {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-fill-lg {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Grid gaps */
.gap-0 { gap: 0; }
.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }
.gap-10 { gap: var(--s-10); }

/* Column/Row gaps منفصلة */
.gap-x-2 { column-gap: var(--s-2); }
.gap-x-4 { column-gap: var(--s-4); }
.gap-x-6 { column-gap: var(--s-6); }
.gap-y-2 { row-gap: var(--s-2); }
.gap-y-4 { row-gap: var(--s-4); }
.gap-y-6 { row-gap: var(--s-6); }

/* Span utilities */
.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; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-full { grid-column: 1 / -1; }

.row-span-1 { grid-row: span 1 / span 1; }
.row-span-2 { grid-row: span 2 / span 2; }
.row-span-3 { grid-row: span 3 / span 3; }
.row-span-full { grid-row: 1 / -1; }

/* ==========================================
   🧩 FLEXBOX SYSTEM — نظام المرونة
   ========================================== */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col-reverse { flex-direction: column-reverse; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }

/* Alignment */
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.items-baseline { align-items: baseline; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }
.self-stretch { align-self: stretch; }

/* Flex sizing */
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }
.flex-grow { flex-grow: 1; }
.flex-grow-0 { flex-grow: 0; }
.flex-shrink { flex-shrink: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Common combos */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   🎯 SIDEBAR LAYOUT — تخطيط مع شريط جانبي
   ========================================== */

.layout-with-sidebar {
  display: grid;
  grid-template-columns: var(--w-sidebar) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--t-base) var(--ease);
}

.layout-with-sidebar.sidebar-collapsed {
  grid-template-columns: var(--w-sidebar-collapsed) 1fr;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border-inline-end: 1px solid var(--c-border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-sticky);
  transition: width var(--t-base) var(--ease);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--c-text);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  transition: var(--tr-colors);
}

.sidebar-brand:hover {
  color: var(--c-primary-400);
}

.sidebar-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--r-circle);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: var(--s-4) var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  overflow-y: auto;
}

.sidebar-footer {
  padding: var(--s-4);
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

/* Nav Section */
.nav-section {
  margin-bottom: var(--s-4);
}

.nav-section-title {
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
}

/* Nav Item */
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  color: var(--c-text-mut);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  transition: var(--tr-base);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: var(--c-surface-2);
  color: var(--c-text);
}

.nav-item.active {
  background: var(--c-surface-3);
  color: var(--c-primary-400);
  font-weight: var(--fw-bold);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--c-primary-500);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}

.nav-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  font-size: var(--fs-lg);
}

.nav-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-badge {
  padding: 2px 8px;
  background: var(--c-primary-500);
  color: var(--c-text-inv);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  min-width: 0; /* مهم لاحتواء flex */
  background: var(--c-bg);
}

.main-content-inner {
  flex: 1;
  padding: var(--s-6);
  max-width: var(--w-wide);
  margin-inline: auto;
  width: 100%;
}

/* ==========================================
   🎯 HEADER LAYOUT — التخطيط مع رأس ثابت
   ========================================== */

.layout-with-header {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--h-header);
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--c-border);
}

[data-theme="light"] .header {
  background: rgba(250, 250, 247, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--c-text);
  font-weight: var(--fw-bold);
  text-decoration: none;
  font-size: var(--fs-lg);
}

.header-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-circle);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  flex: 1;
  justify-content: center;
}

.header-nav-link {
  padding: var(--s-2) var(--s-3);
  color: var(--c-text-mut);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: var(--tr-colors);
}

.header-nav-link:hover {
  color: var(--c-text);
  background: var(--c-surface-2);
}

.header-nav-link.active {
  color: var(--c-primary-400);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}

/* ==========================================
   🎯 DASHBOARD LAYOUT — تخطيط لوحة التحكم
   ========================================== */

.dashboard {
  display: grid;
  grid-template-columns: var(--w-sidebar) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  transition: grid-template-columns var(--t-base) var(--ease);
}

.dashboard.collapsed {
  grid-template-columns: var(--w-sidebar-collapsed) 1fr;
}

/* Dashboard Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: var(--h-topbar);
  padding-inline: var(--s-5);
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--c-border);
}

[data-theme="light"] .topbar {
  background: rgba(250, 250, 247, 0.85);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* Sidebar toggle */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  color: var(--c-text-mut);
  transition: var(--tr-colors);
}

.sidebar-toggle:hover {
  background: var(--c-surface-2);
  color: var(--c-text);
}

/* Page content */
.page-content {
  padding: var(--s-6);
  max-width: var(--w-wide);
  margin-inline: auto;
  width: 100%;
}

/* Page enter animation */
.page-enter {
  animation: page-enter var(--t-slow) var(--ease);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   📱 BOTTOM NAV — شريط التنقل السفلي (موبايل)
   ========================================== */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: var(--z-fixed);
  height: var(--h-bottom-nav);
  background: rgba(10, 9, 8, 0.95);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-top: 1px solid var(--c-border);
  padding-bottom: env(safe-area-inset-bottom);
}

[data-theme="light"] .bottom-nav {
  background: rgba(250, 250, 247, 0.95);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  height: 100%;
  max-width: 600px;
  margin-inline: auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--c-text-mut);
  text-decoration: none;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  transition: var(--tr-colors);
  padding: var(--s-2);
  position: relative;
}

.bottom-nav-item.active {
  color: var(--c-primary-400);
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 25%;
  height: 2px;
  background: var(--c-primary-500);
  border-radius: 0 0 var(--r-full) var(--r-full);
}

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* ==========================================
   🎯 SPLIT LAYOUT — تخطيط مقسم
   ========================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}

.split-40-60 {
  grid-template-columns: 40% 1fr;
}

.split-60-40 {
  grid-template-columns: 1fr 40%;
}

.split-30-70 {
  grid-template-columns: 30% 1fr;
}

/* ==========================================
   🎯 STACK & CLUSTER — تخطيطات بديلة
   ========================================== */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.stack-sm { gap: var(--s-2); }
.stack-lg { gap: var(--s-6); }
.stack-xl { gap: var(--s-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

.cluster-sm { gap: var(--s-2); }
.cluster-lg { gap: var(--s-5); }

.cluster-between {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  justify-content: space-between;
}

/* ==========================================
   🎯 CENTER — التوسيط
   ========================================== */

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-h {
  display: flex;
  justify-content: center;
}

.center-v {
  display: flex;
  align-items: center;
}

/* Centered container */
.center-box {
  max-width: 500px;
  margin-inline: auto;
  padding: var(--s-8);
  text-align: center;
}

/* ==========================================
   📱 RESPONSIVE — التجاوب
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: var(--w-sidebar) 1fr;
  }

  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split-40-60,
  .split-60-40,
  .split-30-70 {
    grid-template-columns: 1fr;
  }

  .grid-2-1,
  .grid-1-2,
  .grid-3-1 {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--w-sidebar-mobile);
    z-index: var(--z-drawer);
    transform: translateX(-100%);
    transition: transform var(--t-base) var(--ease);
  }

  html[dir="rtl"] .sidebar {
    transform: translateX(100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--sh-xl);
  }

  .bottom-nav {
    display: block;
  }

  .page-content {
    padding: var(--s-4);
    padding-bottom: calc(var(--h-bottom-nav) + var(--s-4));
  }

  .main-content-inner {
    padding: var(--s-4);
    padding-bottom: calc(var(--h-bottom-nav) + var(--s-4));
  }

  .container {
    padding-inline: var(--s-4);
  }

  .section {
    padding-block: var(--s-10);
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .col-span-2,
  .col-span-3,
  .col-span-4 {
    grid-column: 1 / -1;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding-inline: var(--s-3);
  }

  .page-content {
    padding: var(--s-3);
  }

  .grid-auto {
    grid-template-columns: 1fr;
  }

  .grid-auto-sm,
  .grid-auto-md {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   🎯 LARGE SCREENS — الشاشات الكبيرة
   ========================================== */

@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }

  .page-content {
    max-width: 1400px;
  }
}

/* ==========================================
   🎯 OVERLAY — طبقة معتمة (للـ mobile sidebar)
   ========================================== */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: calc(var(--z-drawer) - 1);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.overlay.show {
  display: block;
  opacity: 1;
}

@media (min-width: 769px) {
  .overlay {
    display: none !important;
  }
}

/* ==========================================
   🎯 STICKY ELEMENTS — عناصر لاصقة
   ========================================== */

.sticky-top {
  position: sticky;
  top: var(--h-header);
  z-index: 10;
}

.sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* ==========================================
   🎯 ASPECT RATIO CONTAINERS
   ========================================== */

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-photo {
  aspect-ratio: 4 / 3;
}

.aspect-wide {
  aspect-ratio: 21 / 9;
}

/* Object fit */
.object-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.object-contain {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

/* ==========================================
   🎯 SCROLL UTILITIES
   ========================================== */

.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.scroll-y {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.scroll-hidden {
  overflow: hidden;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ==========================================
   🎯 VISIBILITY — الظهور
   ========================================== */

.hide-mobile {
  display: block;
}

.hide-desktop {
  display: none;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .hide-desktop {
    display: block;
  }
}

.show-mobile {
  display: none;
}

.show-desktop {
  display: block;
}

@media (max-width: 768px) {
  .show-mobile {
    display: block;
  }

  .show-desktop {
    display: none !important;
  }
}

/* ==========================================
   🎯 FOOTER — التذييل
   ========================================== */

.footer {
  padding-block: var(--s-8) var(--s-6);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-8);
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--r-circle);
}

.footer-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-mut);
  line-height: var(--lh-relaxed);
}

.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--c-text);
  margin-bottom: var(--s-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.footer-link {
  color: var(--c-text-mut);
  font-size: var(--fs-sm);
  transition: var(--tr-colors);
}

.footer-link:hover {
  color: var(--c-primary-400);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--s-6);
  margin-top: var(--s-6);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  color: var(--c-text-mut);
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
}

/* ==========================================
   📐 SPACING HELPERS
   ========================================== */

/* Margins */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-inline: auto; }
.my-auto { margin-block: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mt-10 { margin-top: var(--s-10); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--s-1); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-8 { margin-bottom: var(--s-8); }

.ml-auto { margin-inline-start: auto; }
.mr-auto { margin-inline-end: auto; }

/* Paddings */
.p-0 { padding: 0; }
.p-1 { padding: var(--s-1); }
.p-2 { padding: var(--s-2); }
.p-3 { padding: var(--s-3); }
.p-4 { padding: var(--s-4); }
.p-5 { padding: var(--s-5); }
.p-6 { padding: var(--s-6); }
.p-8 { padding: var(--s-8); }

.px-2 { padding-inline: var(--s-2); }
.px-3 { padding-inline: var(--s-3); }
.px-4 { padding-inline: var(--s-4); }
.px-5 { padding-inline: var(--s-5); }
.px-6 { padding-inline: var(--s-6); }

.py-2 { padding-block: var(--s-2); }
.py-3 { padding-block: var(--s-3); }
.py-4 { padding-block: var(--s-4); }
.py-5 { padding-block: var(--s-5); }
.py-6 { padding-block: var(--s-6); }

/* ==========================================
   📐 WIDTH/HEIGHT HELPERS
   ========================================== */

.w-full { width: 100%; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }
.w-screen { width: 100vw; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-screen { height: 100vh; height: 100dvh; }

.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }

.max-w-sm { max-width: var(--w-sm); }
.max-w-md { max-width: var(--w-md); }
.max-w-lg { max-width: var(--w-lg); }
.max-w-xl { max-width: var(--w-xl); }
.max-w-full { max-width: 100%; }

/* ==========================================
   🎯 POSITION HELPERS
   ========================================== */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }