/*
 * ============================================================================
 * AQARSCOPE DESIGN SYSTEM
 * Version: 1.0.0
 * Brand: AqarScope - Real Estate Intelligence Platform
 * Primary: #059191 | Secondary: #7C7C7C | Light: #D1D3D4
 * ============================================================================
 */

/* ==========================================================================
   1. GOOGLE FONTS IMPORTS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zain:wght@300;400;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   2. CSS VARIABLES / DESIGN TOKENS
   ========================================================================== */

:root {
  /* --- Brand Primary (Teal #059191) --- */
  --color-primary-50:  #e6f7f7;
  --color-primary-100: #b3e8e8;
  --color-primary-200: #80d9d9;
  --color-primary-300: #4dcaca;
  --color-primary-400: #26bfbf;
  --color-primary-500: #059191;
  --color-primary-600: #048282;
  --color-primary-700: #036b6b;
  --color-primary-800: #025454;
  --color-primary-900: #013d3d;
  --color-primary-950: #012929;

  /* --- Brand Secondary (Gray #7C7C7C) --- */
  --color-secondary-50:  #f5f5f5;
  --color-secondary-100: #e0e0e0;
  --color-secondary-200: #c9c9c9;
  --color-secondary-300: #b0b0b0;
  --color-secondary-400: #969696;
  --color-secondary-500: #7C7C7C;
  --color-secondary-600: #6b6b6b;
  --color-secondary-700: #565656;
  --color-secondary-800: #404040;
  --color-secondary-900: #2b2b2b;
  --color-secondary-950: #1a1a1a;

  /* --- Neutral / Light (#D1D3D4) --- */
  --color-neutral-50:  #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #eeeeee;
  --color-neutral-300: #e0e0e0;
  --color-neutral-400: #D1D3D4;
  --color-neutral-500: #bdbdbd;
  --color-neutral-600: #9e9e9e;
  --color-neutral-700: #757575;
  --color-neutral-800: #424242;
  --color-neutral-900: #212121;
  --color-neutral-950: #121212;

  /* --- Semantic Colors --- */
  --color-success-50:  #ecfdf5;
  --color-success-100: #d1fae5;
  --color-success-200: #a7f3d0;
  --color-success-300: #6ee7b7;
  --color-success-400: #34d399;
  --color-success-500: #10b981;
  --color-success-600: #059669;
  --color-success-700: #047857;
  --color-success-800: #065f46;
  --color-success-900: #064e3b;

  --color-warning-50:  #fffbeb;
  --color-warning-100: #fef3c7;
  --color-warning-200: #fde68a;
  --color-warning-300: #fcd34d;
  --color-warning-400: #fbbf24;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;
  --color-warning-800: #92400e;
  --color-warning-900: #78350f;

  --color-danger-50:  #fef2f2;
  --color-danger-100: #fee2e2;
  --color-danger-200: #fecaca;
  --color-danger-300: #fca5a5;
  --color-danger-400: #f87171;
  --color-danger-500: #ef4444;
  --color-danger-600: #dc2626;
  --color-danger-700: #b91c1c;
  --color-danger-800: #991b1b;
  --color-danger-900: #7f1d1d;

  --color-info-50:  #eff6ff;
  --color-info-100: #dbeafe;
  --color-info-200: #bfdbfe;
  --color-info-300: #93c5fd;
  --color-info-400: #60a5fa;
  --color-info-500: #3b82f6;
  --color-info-600: #2563eb;
  --color-info-700: #1d4ed8;
  --color-info-800: #1e40af;
  --color-info-900: #1e3a8a;

  /* --- Typography --- */
  --font-primary: 'Zain', sans-serif;
  --font-ar: 'El Messiri', sans-serif;
  --font-secondary: 'Alexandria', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  --font-thin:       100;
  --font-extralight: 200;
  --font-light:      300;
  --font-normal:     400;
  --font-medium:     500;
  --font-semibold:   600;
  --font-bold:       700;
  --font-extrabold:  800;
  --font-black:      900;

  --leading-none:    1;
  --leading-tight:   1.25;
  --leading-snug:    1.375;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;
  --leading-loose:   2;

  --tracking-tighter: -0.05em;
  --tracking-tight:   -0.025em;
  --tracking-normal:  0;
  --tracking-wide:    0.025em;
  --tracking-wider:   0.05em;
  --tracking-widest:  0.1em;

  /* --- Spacing (4px base) --- */
  --space-0:  0;
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-7:  1.75rem;
  --space-8:  2rem;
  --space-9:  2.25rem;
  --space-10: 2.5rem;
  --space-11: 2.75rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  --space-20: 5rem;

  /* --- Border Radius --- */
  --radius-none: 0;
  --radius-sm:   0.125rem;
  --radius-md:   0.375rem;
  --radius-lg:   0.5rem;
  --radius-xl:   0.75rem;
  --radius-2xl:  1rem;
  --radius-3xl:  1.5rem;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
  --shadow-primary: 0 4px 14px 0 rgb(5 145 145 / 0.3);

  /* --- Transitions --- */
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:   cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-spring:   cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast:    150ms;
  --duration-normal:  250ms;
  --duration-slow:    350ms;
  --duration-slower:  500ms;

  /* --- Z-Index Scale --- */
  --z-dropdown:  1000;
  --z-sticky:    1020;
  --z-fixed:     1030;
  --z-backdrop:  1040;
  --z-modal:     1050;
  --z-popover:   1060;
  --z-tooltip:   1070;
  --z-toast:     1080;

  /* --- Surface / Layout --- */
  --color-body-bg:    #f8f9fa;
  --color-surface:    #ffffff;
  --color-surface-2:  #f5f5f5;
  --color-border:     #e2e8f0;
  --color-text:       #1a202c;
  --color-text-muted: #718096;
  --color-overlay:    rgb(0 0 0 / 0.5);

  /* --- Container Max Widths --- */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
}

/* ==========================================================================
   2b. DARK MODE TOKENS
   ========================================================================== */

[data-theme="dark"] {
  --color-body-bg:    #0f1117;
  --color-surface:    #1a1d2e;
  --color-surface-2:  #232636;
  --color-border:     #2d3148;
  --color-text:       #e2e8f0;
  --color-text-muted: #a0aec0;
  --color-overlay:    rgb(0 0 0 / 0.7);

  --color-primary-50:  #042f2f;
  --color-primary-100: #053e3e;
  --color-primary-200: #065555;
  --color-primary-300: #077070;
  --color-primary-400: #088888;
  --color-primary-500: #059191;
  --color-primary-600: #1ba3a3;
  --color-primary-700: #3fb6b6;
  --color-primary-800: #6fcece;
  --color-primary-900: #a8e3e3;

  --color-neutral-50:  #121212;
  --color-neutral-100: #1e1e1e;
  --color-neutral-200: #2d2d2d;
  --color-neutral-300: #3d3d3d;
  --color-neutral-400: #525252;
  --color-neutral-500: #6b6b6b;
  --color-neutral-600: #8a8a8a;
  --color-neutral-700: #a3a3a3;
  --color-neutral-800: #c4c4c4;
  --color-neutral-900: #e5e5e5;

  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --shadow-primary: 0 4px 14px 0 rgb(5 145 145 / 0.2);
}

/* ==========================================================================
   3. CSS RESET & BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
  font-feature-settings: normal;
  font-variation-settings: normal;
  line-height: 1.5;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

hr {
  height: 0;
  color: inherit;
  border: 0;
  border-top: 1px solid var(--color-border);
}

abbr[title] {
  text-decoration: underline dotted;
}

b, strong {
  font-weight: var(--font-bold);
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', 'Fira Code', Consolas, monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

button, select {
  text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, p, pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol, ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

::placeholder {
  opacity: 1;
  color: var(--color-text-muted);
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

img, video {
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

a:hover {
  color: var(--color-primary-700);
}

::selection {
  background-color: var(--color-primary-500);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--color-primary-500);
  color: #ffffff;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

.font-primary   { font-family: var(--font-primary); }
.font-ar        { font-family: var(--font-ar); }
.font-secondary { font-family: var(--font-secondary); }

h1, .h1 {
  font-family: var(--font-primary);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h2, .h2 {
  font-family: var(--font-primary);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h3, .h3 {
  font-family: var(--font-primary);
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

h4, .h4 {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

h5, .h5 {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--color-text);
}

h6, .h6 {
  font-family: var(--font-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--color-text);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
}

.text-body-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.text-caption {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}

.text-overline {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-text-muted);
}

.text-lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* RTL-aware Arabic typography */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  font-family: var(--font-ar);
}

.text-start   { text-align: start; }
.text-end     { text-align: end; }
.text-center  { text-align: center; }
.text-justify { text-align: justify; }

/* ==========================================================================
   5. LAYOUT - CONTAINER
   ========================================================================== */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 640px)  { .container { max-width: var(--container-sm); } }
@media (min-width: 768px)  { .container { max-width: var(--container-md); } }
@media (min-width: 1024px) { .container { max-width: var(--container-lg); } }
@media (min-width: 1280px) { .container { max-width: var(--container-xl); } }
@media (min-width: 1536px) { .container { max-width: var(--container-2xl); } }

.container-fluid {
  width: 100%;
  padding-inline: var(--space-4);
}

/* ==========================================================================
   6. LAYOUT - GRID SYSTEM
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-4);
}

.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)); }
.grid-cols-7  { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.grid-cols-8  { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.grid-cols-9  { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.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-5  { grid-column: span 5 / span 5; }
.col-span-6  { grid-column: span 6 / span 6; }
.col-span-7  { grid-column: span 7 / span 7; }
.col-span-8  { grid-column: span 8 / span 8; }
.col-span-9  { grid-column: span 9 / span 9; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .sm\:grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .sm\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sm\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .md\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .lg\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xl\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xl\:grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .xl\:grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ==========================================================================
   7. LAYOUT - FLEXBOX UTILITIES
   ========================================================================== */

.flex        { display: flex; }
.inline-flex { display: inline-flex; }

.flex-row          { flex-direction: row; }
.flex-row-reverse  { flex-direction: row-reverse; }
.flex-col          { flex-direction: column; }
.flex-col-reverse  { flex-direction: column-reverse; }

.flex-wrap         { flex-wrap: wrap; }
.flex-nowrap       { flex-wrap: nowrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch  { align-items: stretch; }

.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-auto    { align-self: auto; }
.self-start   { align-self: flex-start; }
.self-center  { align-self: center; }
.self-end     { align-self: flex-end; }
.self-stretch { align-self: stretch; }

.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; }

.gap-0  { gap: 0; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-5  { gap: var(--space-5); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }
.gap-20 { gap: var(--space-20); }

/* ==========================================================================
   8. SPACING UTILITIES
   ========================================================================== */

/* Margin utilities */
.m-0  { margin: 0; }
.m-1  { margin: var(--space-1); }
.m-2  { margin: var(--space-2); }
.m-3  { margin: var(--space-3); }
.m-4  { margin: var(--space-4); }
.m-5  { margin: var(--space-5); }
.m-6  { margin: var(--space-6); }
.m-8  { margin: var(--space-8); }
.m-10 { margin: var(--space-10); }
.m-12 { margin: var(--space-12); }
.m-16 { margin: var(--space-16); }
.m-20 { margin: var(--space-20); }
.m-auto { margin: auto; }

.mx-0    { margin-inline: 0; }
.mx-1    { margin-inline: var(--space-1); }
.mx-2    { margin-inline: var(--space-2); }
.mx-3    { margin-inline: var(--space-3); }
.mx-4    { margin-inline: var(--space-4); }
.mx-5    { margin-inline: var(--space-5); }
.mx-6    { margin-inline: var(--space-6); }
.mx-8    { margin-inline: var(--space-8); }
.mx-auto { margin-inline: auto; }

.my-0  { margin-block: 0; }
.my-1  { margin-block: var(--space-1); }
.my-2  { margin-block: var(--space-2); }
.my-3  { margin-block: var(--space-3); }
.my-4  { margin-block: var(--space-4); }
.my-5  { margin-block: var(--space-5); }
.my-6  { margin-block: var(--space-6); }
.my-8  { margin-block: var(--space-8); }
.my-10 { margin-block: var(--space-10); }
.my-12 { margin-block: var(--space-12); }
.my-16 { margin-block: var(--space-16); }
.my-20 { margin-block: var(--space-20); }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-20 { margin-top: var(--space-20); }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-5  { margin-bottom: var(--space-5); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-20 { margin-bottom: var(--space-20); }

.ms-0  { margin-inline-start: 0; }
.ms-1  { margin-inline-start: var(--space-1); }
.ms-2  { margin-inline-start: var(--space-2); }
.ms-3  { margin-inline-start: var(--space-3); }
.ms-4  { margin-inline-start: var(--space-4); }
.ms-auto { margin-inline-start: auto; }

.me-0  { margin-inline-end: 0; }
.me-1  { margin-inline-end: var(--space-1); }
.me-2  { margin-inline-end: var(--space-2); }
.me-3  { margin-inline-end: var(--space-3); }
.me-4  { margin-inline-end: var(--space-4); }
.me-auto { margin-inline-end: auto; }

/* Padding utilities */
.p-0  { padding: 0; }
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }
.p-12 { padding: var(--space-12); }
.p-16 { padding: var(--space-16); }
.p-20 { padding: var(--space-20); }

.px-0  { padding-inline: 0; }
.px-1  { padding-inline: var(--space-1); }
.px-2  { padding-inline: var(--space-2); }
.px-3  { padding-inline: var(--space-3); }
.px-4  { padding-inline: var(--space-4); }
.px-5  { padding-inline: var(--space-5); }
.px-6  { padding-inline: var(--space-6); }
.px-8  { padding-inline: var(--space-8); }
.px-10 { padding-inline: var(--space-10); }
.px-12 { padding-inline: var(--space-12); }

.py-0  { padding-block: 0; }
.py-1  { padding-block: var(--space-1); }
.py-2  { padding-block: var(--space-2); }
.py-3  { padding-block: var(--space-3); }
.py-4  { padding-block: var(--space-4); }
.py-5  { padding-block: var(--space-5); }
.py-6  { padding-block: var(--space-6); }
.py-8  { padding-block: var(--space-8); }
.py-10 { padding-block: var(--space-10); }
.py-12 { padding-block: var(--space-12); }
.py-16 { padding-block: var(--space-16); }
.py-20 { padding-block: var(--space-20); }

.pt-0  { padding-top: 0; }
.pt-1  { padding-top: var(--space-1); }
.pt-2  { padding-top: var(--space-2); }
.pt-4  { padding-top: var(--space-4); }
.pt-6  { padding-top: var(--space-6); }
.pt-8  { padding-top: var(--space-8); }

.pb-0  { padding-bottom: 0; }
.pb-1  { padding-bottom: var(--space-1); }
.pb-2  { padding-bottom: var(--space-2); }
.pb-4  { padding-bottom: var(--space-4); }
.pb-6  { padding-bottom: var(--space-6); }
.pb-8  { padding-bottom: var(--space-8); }

.ps-0  { padding-inline-start: 0; }
.ps-1  { padding-inline-start: var(--space-1); }
.ps-2  { padding-inline-start: var(--space-2); }
.ps-3  { padding-inline-start: var(--space-3); }
.ps-4  { padding-inline-start: var(--space-4); }

.pe-0  { padding-inline-end: 0; }
.pe-1  { padding-inline-end: var(--space-1); }
.pe-2  { padding-inline-end: var(--space-2); }
.pe-3  { padding-inline-end: var(--space-3); }
.pe-4  { padding-inline-end: var(--space-4); }

/* ==========================================================================
   9. COMPONENT - BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  user-select: none;
  transition: all var(--duration-normal) var(--ease-in-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Primary */
.btn-primary {
  background-color: var(--color-primary-500);
  color: #ffffff;
  border-color: var(--color-primary-500);
}

.btn-primary:hover {
  background-color: var(--color-primary-600);
  border-color: var(--color-primary-600);
  box-shadow: var(--shadow-primary);
}

.btn-primary:active {
  background-color: var(--color-primary-700);
  border-color: var(--color-primary-700);
}

/* Secondary */
.btn-secondary {
  background-color: var(--color-secondary-500);
  color: #ffffff;
  border-color: var(--color-secondary-500);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-600);
  border-color: var(--color-secondary-600);
}

.btn-secondary:active {
  background-color: var(--color-secondary-700);
}

/* Outline */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary-500);
  border-color: var(--color-primary-500);
}

.btn-outline:hover {
  background-color: var(--color-primary-500);
  color: #ffffff;
}

.btn-outline:active {
  background-color: var(--color-primary-600);
  color: #ffffff;
}

/* Ghost */
.btn-ghost {
  background-color: transparent;
  color: var(--color-primary-500);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--color-primary-50);
}

.btn-ghost:active {
  background-color: var(--color-primary-100);
}

[data-theme="dark"] .btn-ghost:hover {
  background-color: var(--color-primary-50);
}

/* Danger */
.btn-danger {
  background-color: var(--color-danger-500);
  color: #ffffff;
  border-color: var(--color-danger-500);
}

.btn-danger:hover {
  background-color: var(--color-danger-600);
  border-color: var(--color-danger-600);
}

.btn-danger:active {
  background-color: var(--color-danger-700);
}

/* Success */
.btn-success {
  background-color: var(--color-success-500);
  color: #ffffff;
  border-color: var(--color-success-500);
}

.btn-success:hover {
  background-color: var(--color-success-600);
}

/* Warning */
.btn-warning {
  background-color: var(--color-warning-500);
  color: #ffffff;
  border-color: var(--color-warning-500);
}

.btn-warning:hover {
  background-color: var(--color-warning-600);
}

/* Button Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-md {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 1rem 2.25rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-icon {
  padding: 0.625rem;
  aspect-ratio: 1;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Button Group */
.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-start-start-radius: var(--radius-lg);
  border-end-start-radius: var(--radius-lg);
}

.btn-group .btn:last-child {
  border-start-end-radius: var(--radius-lg);
  border-end-end-radius: var(--radius-lg);
}

.btn-group .btn + .btn {
  margin-inline-start: -1px;
}

/* ==========================================================================
   10. COMPONENT - CARDS
   ========================================================================== */

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-in-out);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.card-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-img-top {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Interactive Card */
.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-interactive:active {
  transform: translateY(0);
}

/* Glass Card */
.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .card-glass {
  background: rgba(26, 29, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Flat Card (no border / shadow) */
.card-flat {
  border: none;
  box-shadow: none;
  background-color: var(--color-surface-2);
}

.card-flat:hover {
  box-shadow: none;
  background-color: var(--color-neutral-200);
}

[data-theme="dark"] .card-flat:hover {
  background-color: var(--color-neutral-200);
}

/* ==========================================================================
   11. COMPONENT - BADGES / TAGS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: 1.5;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background-color: var(--color-primary-100);
  color: var(--color-primary-700);
}

.badge-secondary {
  background-color: var(--color-secondary-100);
  color: var(--color-secondary-700);
}

.badge-success {
  background-color: var(--color-success-100);
  color: var(--color-success-700);
}

.badge-warning {
  background-color: var(--color-warning-100);
  color: var(--color-warning-700);
}

.badge-danger {
  background-color: var(--color-danger-100);
  color: var(--color-danger-700);
}

.badge-info {
  background-color: var(--color-info-100);
  color: var(--color-info-700);
}

.badge-outline {
  background-color: transparent;
  border: 1px solid currentColor;
}

.badge-dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: currentColor;
}

.badge-lg {
  padding: 0.25rem 0.75rem;
  font-size: var(--text-sm);
}

[data-theme="dark"] .badge-primary {
  background-color: rgba(5, 145, 145, 0.2);
  color: var(--color-primary-800);
}

[data-theme="dark"] .badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--color-success-300);
}

[data-theme="dark"] .badge-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--color-warning-300);
}

[data-theme="dark"] .badge-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--color-danger-300);
}

[data-theme="dark"] .badge-info {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--color-info-300);
}

/* ==========================================================================
   12. COMPONENT - FORM ELEMENTS
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
}

.form-label-required::after {
  content: ' *';
  color: var(--color-danger-500);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-fast) var(--ease-in-out),
              box-shadow var(--duration-fast) var(--ease-in-out);
  appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--color-neutral-500);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(5, 145, 145, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-surface-2);
}

/* Input Sizes */
.form-input-sm {
  padding: 0.375rem 0.625rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.form-input-lg {
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* Select */
.form-select {
  padding-inline-end: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237C7C7C' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
}

/* Textarea */
.form-textarea {
  min-height: 5rem;
  resize: vertical;
}

/* Checkbox and Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 1.5rem;
  cursor: pointer;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  appearance: none;
  border: 2px solid var(--color-border);
  background-color: var(--color-surface);
  transition: all var(--duration-fast) var(--ease-in-out);
  cursor: pointer;
}

.form-check-input[type="checkbox"] {
  border-radius: var(--radius-sm);
}

.form-check-input[type="radio"] {
  border-radius: var(--radius-full);
}

.form-check-input:checked {
  background-color: var(--color-primary-500);
  border-color: var(--color-primary-500);
}

.form-check-input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M10.28 2.28a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 0 1-1.06 0L1.72 6.34a.75.75 0 1 1 1.06-1.06L4.75 7.25l4.72-4.72a.75.75 0 0 1 1.06-.25z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='3' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.form-check-input:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}

/* Toggle / Switch */
.form-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-switch-input {
  width: 2.5rem;
  height: 1.375rem;
  appearance: none;
  background-color: var(--color-neutral-400);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-in-out);
  position: relative;
}

.form-switch-input::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 1rem;
  height: 1rem;
  background-color: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-in-out);
}

.form-switch-input:checked {
  background-color: var(--color-primary-500);
}

.form-switch-input:checked::after {
  transform: translateX(1.125rem);
}

[dir="rtl"] .form-switch-input:checked::after {
  transform: translateX(-1.125rem);
}

/* Validation */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-danger-500);
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
  border-color: var(--color-success-500);
}

.form-input.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-feedback {
  font-size: var(--text-xs);
  margin-top: var(--space-1);
}

.form-feedback-invalid {
  color: var(--color-danger-500);
}

.form-feedback-valid {
  color: var(--color-success-500);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Input Group */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-input {
  border-radius: 0;
}

.input-group .form-input:first-child {
  border-start-start-radius: var(--radius-lg);
  border-end-start-radius: var(--radius-lg);
}

.input-group .form-input:last-child {
  border-start-end-radius: var(--radius-lg);
  border-end-end-radius: var(--radius-lg);
}

.input-group-text {
  display: flex;
  align-items: center;
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.input-group-text:first-child {
  border-start-start-radius: var(--radius-lg);
  border-end-start-radius: var(--radius-lg);
  border-inline-end: 0;
}

.input-group-text:last-child {
  border-start-end-radius: var(--radius-lg);
  border-end-end-radius: var(--radius-lg);
  border-inline-start: 0;
}

/* ==========================================================================
   13. COMPONENT - ALERTS
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  border: 1px solid transparent;
}

.alert-title {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.alert-success {
  background-color: var(--color-success-50);
  color: var(--color-success-800);
  border-color: var(--color-success-200);
}

.alert-warning {
  background-color: var(--color-warning-50);
  color: var(--color-warning-800);
  border-color: var(--color-warning-200);
}

.alert-danger {
  background-color: var(--color-danger-50);
  color: var(--color-danger-800);
  border-color: var(--color-danger-200);
}

.alert-info {
  background-color: var(--color-info-50);
  color: var(--color-info-800);
  border-color: var(--color-info-200);
}

.alert-dismissible {
  position: relative;
  padding-inline-end: var(--space-10);
}

.alert-close {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--duration-fast);
}

.alert-close:hover {
  opacity: 1;
}

[data-theme="dark"] .alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success-300);
}

[data-theme="dark"] .alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning-300);
}

[data-theme="dark"] .alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger-300);
}

[data-theme="dark"] .alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-info-300);
}

/* ==========================================================================
   14. COMPONENT - TABLES
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: start;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  background-color: var(--color-surface-2);
}

.table-striped tbody tr:nth-child(even) {
  background-color: var(--color-surface-2);
}

.table-hover tbody tr {
  transition: background-color var(--duration-fast);
}

.table-hover tbody tr:hover {
  background-color: var(--color-primary-50);
}

[data-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(5, 145, 145, 0.08);
}

.table-bordered {
  border: 1px solid var(--color-border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--color-border);
}

.table-compact th,
.table-compact td {
  padding: var(--space-2) var(--space-3);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   15. COMPONENT - MODALS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--color-overlay);
  z-index: var(--z-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-in-out),
              visibility var(--duration-normal);
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-spring);
  z-index: var(--z-modal);
}

.modal-backdrop.is-active .modal {
  transform: scale(1) translateY(0);
}

.modal-sm   { max-width: 24rem; }
.modal-lg   { max-width: 48rem; }
.modal-xl   { max-width: 64rem; }
.modal-full { max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-fast);
}

.modal-close:hover {
  background-color: var(--color-surface-2);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   16. COMPONENT - TOOLTIPS
   ========================================================================== */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: #ffffff;
  background-color: var(--color-neutral-900);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-in-out),
              visibility var(--duration-fast);
  pointer-events: none;
  z-index: var(--z-tooltip);
}

.tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--color-neutral-900);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-in-out),
              visibility var(--duration-fast);
  pointer-events: none;
  z-index: var(--z-tooltip);
}

.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

.tooltip-bottom::after {
  bottom: auto;
  top: calc(100% + 6px);
}

.tooltip-bottom::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--color-neutral-900);
}

/* ==========================================================================
   17. COMPONENT - PROGRESS BAR
   ========================================================================== */

.progress {
  display: flex;
  height: 0.5rem;
  overflow: hidden;
  background-color: var(--color-neutral-200);
  border-radius: var(--radius-full);
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: var(--color-primary-500);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-in-out);
}

.progress-bar-success { background-color: var(--color-success-500); }
.progress-bar-warning { background-color: var(--color-warning-500); }
.progress-bar-danger  { background-color: var(--color-danger-500); }
.progress-bar-info    { background-color: var(--color-info-500); }

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
  0%   { background-position: 1rem 0; }
  100% { background-position: 0 0; }
}

.progress-sm { height: 0.25rem; }
.progress-lg { height: 0.75rem; }
.progress-xl { height: 1rem; }

.progress-xl .progress-bar {
  font-size: var(--text-xs);
  color: #ffffff;
}

/* ==========================================================================
   18. COMPONENT - BREADCRUMBS
   ========================================================================== */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-inline-end: var(--space-1);
  color: var(--color-neutral-400);
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  content: '\\';
}

.breadcrumb-item a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.breadcrumb-item a:hover {
  color: var(--color-primary-500);
}

.breadcrumb-item.is-active {
  color: var(--color-text);
  font-weight: var(--font-medium);
}

/* ==========================================================================
   19. COMPONENT - PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  text-decoration: none;
}

.pagination-item:hover {
  background-color: var(--color-surface-2);
  border-color: var(--color-neutral-500);
}

.pagination-item.is-active {
  background-color: var(--color-primary-500);
  border-color: var(--color-primary-500);
  color: #ffffff;
}

.pagination-item:disabled,
.pagination-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   20. COMPONENT - TABS
   ========================================================================== */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  gap: 0;
  overflow-x: auto;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-in-out);
  text-decoration: none;
}

.tab-item:hover {
  color: var(--color-primary-500);
  border-bottom-color: var(--color-neutral-400);
}

.tab-item.is-active {
  color: var(--color-primary-500);
  border-bottom-color: var(--color-primary-500);
}

.tab-content {
  display: none;
  padding: var(--space-4) 0;
}

.tab-content.is-active {
  display: block;
}

/* Pill Tabs */
.tabs-pill {
  border-bottom: none;
  gap: var(--space-1);
  background-color: var(--color-surface-2);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.tabs-pill .tab-item {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.tabs-pill .tab-item.is-active {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

/* ==========================================================================
   21. COMPONENT - AVATARS
   ========================================================================== */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--color-primary-100);
  color: var(--color-primary-700);
  font-weight: var(--font-semibold);
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-xs  { width: 1.5rem;  height: 1.5rem;  font-size: var(--text-xs); }
.avatar-sm  { width: 2rem;    height: 2rem;    font-size: var(--text-xs); }
.avatar-md  { width: 2.5rem;  height: 2.5rem;  font-size: var(--text-sm); }
.avatar-lg  { width: 3rem;    height: 3rem;    font-size: var(--text-base); }
.avatar-xl  { width: 4rem;    height: 4rem;    font-size: var(--text-xl); }
.avatar-2xl { width: 5rem;    height: 5rem;    font-size: var(--text-2xl); }

.avatar-square {
  border-radius: var(--radius-lg);
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 2px solid var(--color-surface);
}

.avatar-group .avatar + .avatar {
  margin-inline-start: -0.5rem;
}

.avatar-status {
  position: relative;
}

.avatar-status::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 25%;
  height: 25%;
  min-width: 8px;
  min-height: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-surface);
  background-color: var(--color-success-500);
}

.avatar-status-offline::after {
  background-color: var(--color-neutral-400);
}

.avatar-status-busy::after {
  background-color: var(--color-danger-500);
}

.avatar-status-away::after {
  background-color: var(--color-warning-500);
}

/* ==========================================================================
   22. COMPONENT - DROPDOWNS
   ========================================================================== */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-start: 0;
  min-width: 12rem;
  padding: var(--space-1);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.dropdown-menu.is-active,
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu-end {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-fast);
  text-decoration: none;
  width: 100%;
}

.dropdown-item:hover {
  background-color: var(--color-surface-2);
  color: var(--color-text);
}

.dropdown-item.is-active {
  background-color: var(--color-primary-50);
  color: var(--color-primary-600);
}

[data-theme="dark"] .dropdown-item.is-active {
  background-color: rgba(5, 145, 145, 0.15);
}

.dropdown-item:disabled,
.dropdown-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.dropdown-divider {
  height: 1px;
  margin: var(--space-1) 0;
  background-color: var(--color-border);
}

.dropdown-header {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ==========================================================================
   23. KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes slideUp {
  from { transform: translateY(1rem); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-1rem); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideLeft {
  from { transform: translateX(1rem); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(-1rem); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(-5%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50%      { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Animation Utility Classes */
.animate-fade-in     { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.animate-fade-out    { animation: fadeOut var(--duration-normal) var(--ease-in) both; }
.animate-slide-up    { animation: slideUp var(--duration-normal) var(--ease-out) both; }
.animate-slide-down  { animation: slideDown var(--duration-normal) var(--ease-out) both; }
.animate-slide-left  { animation: slideLeft var(--duration-normal) var(--ease-out) both; }
.animate-slide-right { animation: slideRight var(--duration-normal) var(--ease-out) both; }
.animate-pulse       { animation: pulse 2s var(--ease-in-out) infinite; }
.animate-bounce      { animation: bounce 1s infinite; }
.animate-spin        { animation: spin 1s linear infinite; }
.animate-scale-in    { animation: scaleIn var(--duration-normal) var(--ease-spring) both; }
.animate-shake       { animation: shake 0.5s ease-in-out; }

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-neutral-200) 25%,
    var(--color-neutral-100) 50%,
    var(--color-neutral-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 1.5rem;
  width: 40%;
  margin-bottom: var(--space-3);
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
}

.skeleton-image {
  width: 100%;
  height: 12rem;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg,
    var(--color-neutral-200) 25%,
    var(--color-neutral-300) 50%,
    var(--color-neutral-200) 75%
  );
  background-size: 200% 100%;
}

/* ==========================================================================
   24. RTL SUPPORT
   ========================================================================== */

[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb {
  direction: rtl;
}

/* Float reversal for RTL */
[dir="rtl"] .float-start { float: right; }
[dir="rtl"] .float-end   { float: left; }

/* ==========================================================================
   25. DARK MODE COMPONENT OVERRIDES
   ========================================================================== */

[data-theme="dark"] .card {
  background-color: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
  background-color: var(--color-surface-2);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .form-check-input {
  background-color: var(--color-surface-2);
  border-color: var(--color-border);
}

[data-theme="dark"] .table th {
  background-color: var(--color-surface-2);
}

[data-theme="dark"] .dropdown-menu {
  background-color: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .modal {
  background-color: var(--color-surface);
}

[data-theme="dark"] .tabs {
  border-color: var(--color-border);
}

[data-theme="dark"] .tabs-pill {
  background-color: var(--color-surface-2);
}

[data-theme="dark"] .tabs-pill .tab-item.is-active {
  background-color: var(--color-surface);
}

[data-theme="dark"] .pagination-item {
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .pagination-item:hover {
  background-color: var(--color-surface-2);
}

[data-theme="dark"] .progress {
  background-color: var(--color-neutral-200);
}

[data-theme="dark"] .tooltip::after {
  background-color: var(--color-neutral-800);
}

[data-theme="dark"] a {
  color: var(--color-primary-700);
}

[data-theme="dark"] a:hover {
  color: var(--color-primary-800);
}

/* ==========================================================================
   26. ACCESSIBILITY
   ========================================================================== */

/* Focus-visible ring using brand color */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Skip Navigation */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: calc(var(--z-toast) + 10);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-primary-500);
  color: #ffffff;
  font-weight: var(--font-semibold);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  text-decoration: none;
  transition: top var(--duration-fast);
}

.skip-nav:focus {
  top: 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast */
@media (forced-colors: active) {
  .btn {
    border: 2px solid ButtonText;
  }

  .form-input,
  .form-select,
  .form-textarea {
    border: 1px solid ButtonText;
  }

  .badge {
    border: 1px solid;
  }

  :focus-visible {
    outline: 2px solid Highlight;
  }
}

/* ==========================================================================
   27. UTILITY CLASSES - TEXT & COLORS
   ========================================================================== */

/* Text Colors */
.text-primary   { color: var(--color-primary-500); }
.text-secondary { color: var(--color-secondary-500); }
.text-success   { color: var(--color-success-500); }
.text-warning   { color: var(--color-warning-500); }
.text-danger    { color: var(--color-danger-500); }
.text-info      { color: var(--color-info-500); }
.text-muted     { color: var(--color-text-muted); }
.text-white     { color: #ffffff; }
.text-current   { color: currentColor; }
.text-inherit   { color: inherit; }

/* Background Colors */
.bg-primary     { background-color: var(--color-primary-500); }
.bg-primary-50  { background-color: var(--color-primary-50); }
.bg-secondary   { background-color: var(--color-secondary-500); }
.bg-success     { background-color: var(--color-success-500); }
.bg-warning     { background-color: var(--color-warning-500); }
.bg-danger      { background-color: var(--color-danger-500); }
.bg-info        { background-color: var(--color-info-500); }
.bg-white       { background-color: #ffffff; }
.bg-surface     { background-color: var(--color-surface); }
.bg-surface-2   { background-color: var(--color-surface-2); }
.bg-body        { background-color: var(--color-body-bg); }
.bg-transparent { background-color: transparent; }

/* Font Weights */
.font-thin       { font-weight: var(--font-thin); }
.font-extralight { font-weight: var(--font-extralight); }
.font-light      { font-weight: var(--font-light); }
.font-normal     { font-weight: var(--font-normal); }
.font-medium     { font-weight: var(--font-medium); }
.font-semibold   { font-weight: var(--font-semibold); }
.font-bold       { font-weight: var(--font-bold); }
.font-extrabold  { font-weight: var(--font-extrabold); }
.font-black      { font-weight: var(--font-black); }

/* Font Sizes */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.text-5xl  { font-size: var(--text-5xl); }
.text-6xl  { font-size: var(--text-6xl); }
.text-7xl  { font-size: var(--text-7xl); }

/* Line Heights */
.leading-none    { line-height: var(--leading-none); }
.leading-tight   { line-height: var(--leading-tight); }
.leading-snug    { line-height: var(--leading-snug); }
.leading-normal  { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose   { line-height: var(--leading-loose); }

/* Text Transform */
.uppercase   { text-transform: uppercase; }
.lowercase   { text-transform: lowercase; }
.capitalize  { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Text Decoration */
.underline    { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* Text Wrapping */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.whitespace-nowrap { white-space: nowrap; }
.whitespace-normal { white-space: normal; }
.break-words { word-break: break-word; overflow-wrap: break-word; }

/* ==========================================================================
   28. UTILITY CLASSES - DISPLAY & POSITION
   ========================================================================== */

.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.hidden       { display: none; }
.contents     { display: contents; }

.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; }

/* Overflow */
.overflow-hidden  { overflow: hidden; }
.overflow-auto    { overflow: auto; }
.overflow-scroll  { overflow: scroll; }
.overflow-visible { overflow: visible; }
.overflow-x-auto  { overflow-x: auto; }
.overflow-y-auto  { overflow-y: auto; }

/* ==========================================================================
   29. UTILITY CLASSES - BORDERS
   ========================================================================== */

.border     { border: 1px solid var(--color-border); }
.border-0   { border: 0; }
.border-t   { border-top: 1px solid var(--color-border); }
.border-b   { border-bottom: 1px solid var(--color-border); }
.border-s   { border-inline-start: 1px solid var(--color-border); }
.border-e   { border-inline-end: 1px solid var(--color-border); }

.border-primary { border-color: var(--color-primary-500); }
.border-danger  { border-color: var(--color-danger-500); }
.border-success { border-color: var(--color-success-500); }

.rounded-none { border-radius: var(--radius-none); }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded      { border-radius: var(--radius-lg); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-2xl  { border-radius: var(--radius-2xl); }
.rounded-3xl  { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ==========================================================================
   30. UTILITY CLASSES - SHADOWS, OPACITY, MISC
   ========================================================================== */

.shadow-none  { box-shadow: none; }
.shadow-xs    { box-shadow: var(--shadow-xs); }
.shadow-sm    { box-shadow: var(--shadow-sm); }
.shadow-md    { box-shadow: var(--shadow-md); }
.shadow-lg    { box-shadow: var(--shadow-lg); }
.shadow-xl    { box-shadow: var(--shadow-xl); }
.shadow-2xl   { box-shadow: var(--shadow-2xl); }
.shadow-inner { box-shadow: var(--shadow-inner); }

.opacity-0   { opacity: 0; }
.opacity-25  { opacity: 0.25; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.visible   { visibility: visible; }
.invisible { visibility: hidden; }

.cursor-pointer     { cursor: pointer; }
.cursor-default     { cursor: default; }
.cursor-text        { cursor: text; }
.cursor-move        { cursor: move; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-grab        { cursor: grab; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all  { user-select: all; }

/* Width and Height */
.w-full   { width: 100%; }
.w-screen { width: 100vw; }
.w-auto   { width: auto; }
.w-fit    { width: fit-content; }
.min-w-0  { min-width: 0; }

.h-full       { height: 100%; }
.h-screen     { height: 100vh; }
.h-auto       { height: auto; }
.min-h-0      { min-height: 0; }
.min-h-screen { min-height: 100vh; }

.aspect-auto   { aspect-ratio: auto; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video  { aspect-ratio: 16 / 9; }

/* Object Fit */
.object-cover   { object-fit: cover; }
.object-contain { object-fit: contain; }
.object-fill    { object-fit: fill; }
.object-center  { object-position: center; }

/* Transition */
.transition-none   { transition: none; }
.transition-all    { transition: all var(--duration-normal) var(--ease-in-out); }
.transition-colors { transition: color var(--duration-normal) var(--ease-in-out),
                                 background-color var(--duration-normal) var(--ease-in-out),
                                 border-color var(--duration-normal) var(--ease-in-out); }
.transition-opacity   { transition: opacity var(--duration-normal) var(--ease-in-out); }
.transition-transform { transition: transform var(--duration-normal) var(--ease-in-out); }

/* Transform */
.scale-95  { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }

/* Z-Index */
.z-0    { z-index: 0; }
.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-auto { z-index: auto; }

/* ==========================================================================
   31. RESPONSIVE UTILITIES
   ========================================================================== */

/* Hide / Show at breakpoints */
@media (max-width: 639px) {
  .hide-below-sm { display: none !important; }
}

@media (max-width: 767px) {
  .hide-below-md { display: none !important; }
}

@media (max-width: 1023px) {
  .hide-below-lg { display: none !important; }
}

@media (max-width: 1279px) {
  .hide-below-xl { display: none !important; }
}

@media (min-width: 640px) {
  .hide-above-sm { display: none !important; }
}

@media (min-width: 768px) {
  .hide-above-md { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-above-lg { display: none !important; }
}

@media (min-width: 1280px) {
  .hide-above-xl { display: none !important; }
}

/* Responsive Flex */
@media (min-width: 640px) {
  .sm\:flex     { display: flex; }
  .sm\:hidden   { display: none; }
  .sm\:block    { display: block; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:flex-col { flex-direction: column; }
}

@media (min-width: 768px) {
  .md\:flex        { display: flex; }
  .md\:hidden      { display: none; }
  .md\:block       { display: block; }
  .md\:flex-row    { flex-direction: row; }
  .md\:flex-col    { flex-direction: column; }
  .md\:inline-flex { display: inline-flex; }
}

@media (min-width: 1024px) {
  .lg\:flex        { display: flex; }
  .lg\:hidden      { display: none; }
  .lg\:block       { display: block; }
  .lg\:flex-row    { flex-direction: row; }
  .lg\:flex-col    { flex-direction: column; }
  .lg\:inline-flex { display: inline-flex; }
}

@media (min-width: 1280px) {
  .xl\:flex   { display: flex; }
  .xl\:hidden { display: none; }
  .xl\:block  { display: block; }
}

/* Responsive Spacing */
@media (min-width: 768px) {
  .md\:p-0  { padding: 0; }
  .md\:p-4  { padding: var(--space-4); }
  .md\:p-6  { padding: var(--space-6); }
  .md\:p-8  { padding: var(--space-8); }
  .md\:px-6 { padding-inline: var(--space-6); }
  .md\:px-8 { padding-inline: var(--space-8); }
  .md\:py-6 { padding-block: var(--space-6); }
  .md\:py-8 { padding-block: var(--space-8); }
  .md\:gap-6 { gap: var(--space-6); }
  .md\:gap-8 { gap: var(--space-8); }
}

@media (min-width: 1024px) {
  .lg\:p-0   { padding: 0; }
  .lg\:p-6   { padding: var(--space-6); }
  .lg\:p-8   { padding: var(--space-8); }
  .lg\:px-8  { padding-inline: var(--space-8); }
  .lg\:py-8  { padding-block: var(--space-8); }
  .lg\:gap-8  { gap: var(--space-8); }
  .lg\:gap-10 { gap: var(--space-10); }
}

/* Responsive Text */
@media (min-width: 768px) {
  .md\:text-lg     { font-size: var(--text-lg); }
  .md\:text-xl     { font-size: var(--text-xl); }
  .md\:text-2xl    { font-size: var(--text-2xl); }
  .md\:text-3xl    { font-size: var(--text-3xl); }
  .md\:text-4xl    { font-size: var(--text-4xl); }
  .md\:text-center { text-align: center; }
  .md\:text-start  { text-align: start; }
}

@media (min-width: 1024px) {
  .lg\:text-xl  { font-size: var(--text-xl); }
  .lg\:text-2xl { font-size: var(--text-2xl); }
  .lg\:text-3xl { font-size: var(--text-3xl); }
  .lg\:text-4xl { font-size: var(--text-4xl); }
  .lg\:text-5xl { font-size: var(--text-5xl); }
}

/* ==========================================================================
   32. PRINT STYLES
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }

  h2, h3 {
    page-break-after: avoid;
  }

  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   END OF AQARSCOPE DESIGN SYSTEM
   ========================================================================== */
