/*
 * Aisar Utility CSS — static replacement for Tailwind Play CDN.
 * Contains every utility class used by login.php, signup.php, forgot.php,
 * reset.php, and app-shell.php, with the SDCA M3 design tokens baked in.
 *
 * No CDN dependency. RTL-aware (logical properties for start/end).
 * Keep in sync with sdca-platform/frontend/tailwind.config.js.
 */

/* ── M3 Color Palette ───────────────────────────────────────────── */
:root {
  --tw-primary: #006e06;
  --tw-on-primary: #ffffff;
  --tw-primary-container: #32ff32;
  --tw-on-primary-container: #007206;
  --tw-primary-fixed: #76ff65;
  --tw-primary-fixed-dim: #00e61a;
  --tw-on-primary-fixed: #002201;
  --tw-on-primary-fixed-variant: #005303;
  --tw-secondary: #5f5e5e;
  --tw-on-secondary: #ffffff;
  --tw-secondary-container: #e5e2e1;
  --tw-on-secondary-container: #656464;
  --tw-tertiary: #5d5f5f;
  --tw-on-tertiary: #ffffff;
  --tw-tertiary-container: #dddddd;
  --tw-on-tertiary-container: #606161;
  --tw-success: #10B981;
  --tw-success-container: #ECFDF5;
  --tw-on-success-container: #047857;
  --tw-warning: #F59E0B;
  --tw-warning-container: #FEF3C7;
  --tw-on-warning-container: #92400E;
  --tw-error: #ba1a1a;
  --tw-on-error: #ffffff;
  --tw-error-container: #ffdad6;
  --tw-on-error-container: #93000a;
  --tw-info: #3B82F6;
  --tw-info-container: #DBEAFE;
  --tw-on-info-container: #1E40AF;
  --tw-background: #f9f9f8;
  --tw-on-background: #191c1c;
  --tw-surface: #f9f9f8;
  --tw-on-surface: #191c1c;
  --tw-surface-dim: #d9dad9;
  --tw-surface-variant: #e1e3e2;
  --tw-on-surface-variant: #3c4b36;
  --tw-surface-elevated: #ffffff;
  --tw-surface-container-lowest: #ffffff;
  --tw-surface-container-low: #f3f4f3;
  --tw-surface-container: #edeeed;
  --tw-surface-container-high: #e7e8e7;
  --tw-surface-container-highest: #e1e3e2;
  --tw-outline: #6b7c64;
  --tw-outline-variant: #baccb1;
}

/* ── Display ────────────────────────────────────────────────────── */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* ── Flex direction & wrap ──────────────────────────────────────── */
.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-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }

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

/* ── Gap & space ────────────────────────────────────────────────── */
.gap-0 { gap: 0; } .gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.gap-10 { gap: 40px; } .gap-12 { gap: 48px; }

.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-x-1 > * + * { margin-inline-start: 4px; }
.space-x-2 > * + * { margin-inline-start: 8px; }

/* ── Padding / Margin ───────────────────────────────────────────── */
.p-0 { padding: 0; } .p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 12px; }
.p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; } .p-7 { padding: 28px; }
.p-8 { padding: 32px; } .p-10 { padding: 40px; } .p-12 { padding: 48px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; }
.pt-6 { padding-top: 24px; } .pt-8 { padding-top: 32px; } .pt-16 { padding-top: 64px; }
.pb-4 { padding-bottom: 16px; }
.ps-0 { padding-inline-start: 0; }
.ps-3 { padding-inline-start: 12px; }
.ps-4 { padding-inline-start: 16px; }
.ps-10 { padding-inline-start: 40px; }
.pe-4 { padding-inline-end: 16px; }
.pe-10 { padding-inline-end: 40px; }

.m-0 { margin: 0; } .m-1 { margin: 4px; } .m-2 { margin: 8px; } .m-4 { margin: 16px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mt-7 { margin-top: 28px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; } .mb-10 { margin-bottom: 40px; }
.my-10 { margin-top: 40px; margin-bottom: 40px; }
.mr-1 { margin-inline-end: 4px; }  /* in RTL "right" = end */
.ml-1 { margin-inline-start: 4px; }
.-mt-0\.5 { margin-top: -2px; }

/* ── Width ──────────────────────────────────────────────────────── */
.w-2 { width: 8px; } .w-6 { width: 24px; } .w-7 { width: 28px; } .w-8 { width: 32px; }
.w-9 { width: 36px; } .w-10 { width: 40px; } .w-12 { width: 48px; } .w-14 { width: 56px; }
.w-16 { width: 64px; } .w-20 { width: 80px; } .w-32 { width: 128px; }
.w-64 { width: 256px; } .w-72 { width: 288px; }
.w-full { width: 100%; } .w-auto { width: auto; }
.w-px { width: 1px; }
.w-2\/5 { width: 40%; }
.w-3\/5 { width: 60%; }
.min-w-0 { min-width: 0; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-\[1440px\] { max-width: 1440px; }

/* ── Height ─────────────────────────────────────────────────────── */
.h-2 { height: 8px; } .h-4 { height: 16px; } .h-7 { height: 28px; }
.h-8 { height: 32px; } .h-9 { height: 36px; } .h-10 { height: 40px; }
.h-12 { height: 48px; } .h-14 { height: 56px; } .h-16 { height: 64px; }
.h-px { height: 1px; } .h-auto { height: auto; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }

/* ── Position ───────────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.bottom-0 { bottom: 0; }
.bottom-8 { bottom: 32px; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.start-0 { inset-inline-start: 0; }
.start-3 { inset-inline-start: 12px; }
.end-0 { inset-inline-end: 0; }
.end-3 { inset-inline-end: 12px; }
.end-8 { inset-inline-end: 32px; }

.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-40 { z-index: 40; } .z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }

/* ── Transform ──────────────────────────────────────────────────── */
.-translate-y-1\/2 { transform: translateY(-50%); }
[dir="rtl"] .-translate-y-1\/2 { transform: translateY(-50%); }
.translate-x-0 { transform: translateX(0); }

/* ── Overflow ───────────────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }

/* ── Border ─────────────────────────────────────────────────────── */
.border-0 { border-width: 0; }
.border { border-width: 1px; border-style: solid; border-color: var(--tw-outline-variant); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--tw-outline-variant); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--tw-outline-variant); }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: var(--tw-outline-variant); }
.border-s { border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: var(--tw-outline-variant); }
.border-s-4 { border-inline-start-width: 4px; border-inline-start-style: solid; border-inline-start-color: var(--tw-primary-fixed-dim); }
.border-e { border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: var(--tw-outline-variant); }
.border-transparent { border-color: transparent !important; }

.border-outline-variant { border-color: var(--tw-outline-variant) !important; }
.border-outline-variant\/40 { border-color: rgba(186,204,177,0.40) !important; }
.border-outline-variant\/60 { border-color: rgba(186,204,177,0.60) !important; }
.border-white\/10 { border-color: rgba(255,255,255,0.10) !important; }
.border-tertiary\/30 { border-color: rgba(93,95,95,0.30) !important; }
.border-error\/20 { border-color: rgba(186,26,26,0.20) !important; }
.border-error\/30 { border-color: rgba(186,26,26,0.30) !important; }
.border-info\/30 { border-color: rgba(59,130,246,0.30) !important; }
.border-warning\/30 { border-color: rgba(245,158,11,0.30) !important; }
.border-success\/30 { border-color: rgba(16,185,129,0.30) !important; }
.border-primary-container { border-color: var(--tw-primary-container) !important; }
.border-primary-fixed-dim { border-color: var(--tw-primary-fixed-dim) !important; }
.border-primary { border-color: var(--tw-primary) !important; }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.125rem; }
.rounded-md { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.25rem; }
.rounded-xl { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 0.75rem; }
.rounded-3xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ── Background ─────────────────────────────────────────────────── */
.bg-transparent { background-color: transparent; }
.bg-black { background-color: #000; }
.bg-white { background-color: #fff; }
.bg-white\/5 { background-color: rgba(255,255,255,0.05) !important; }
.bg-white\/10 { background-color: rgba(255,255,255,0.10); }
.bg-surface { background-color: var(--tw-surface); }
.bg-surface\/40 { background-color: rgba(249,249,248,0.40); }
.bg-surface\/80 { background-color: rgba(249,249,248,0.80); }
.bg-surface\/90 { background-color: rgba(249,249,248,0.90); }
.bg-surface-container-low { background-color: var(--tw-surface-container-low); }
.bg-surface-container { background-color: var(--tw-surface-container); }
.bg-surface-container-high { background-color: var(--tw-surface-container-high); }
.bg-primary { background-color: var(--tw-primary); }
.bg-primary\/5 { background-color: rgba(0,110,6,0.05) !important; }
.bg-primary\/10 { background-color: rgba(0,110,6,0.10) !important; }
.bg-primary-container { background-color: var(--tw-primary-container); }
.bg-tertiary-container { background-color: var(--tw-tertiary-container); }
.bg-success-container { background-color: var(--tw-success-container); }
.bg-warning-container { background-color: var(--tw-warning-container); }
.bg-error-container { background-color: var(--tw-error-container); }
.bg-info-container { background-color: var(--tw-info-container); }
.text-on-warning-container { color: var(--tw-on-warning-container); }
.border-warning { border-color: var(--tw-warning) !important; }
.border-warning\/30 { border-color: rgba(245,158,11,0.30) !important; }
.bg-\[\#0A0A0A\] { background-color: #0A0A0A; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-from, transparent), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent)); }
.from-transparent { --tw-gradient-from: transparent; }
.via-primary-container { --tw-gradient-via: var(--tw-primary-container); }
.to-transparent { --tw-gradient-to: transparent; }

/* ── Text colors ────────────────────────────────────────────────── */
.text-white { color: #fff; }
.text-black { color: #000; }
.text-white\/60 { color: rgba(255,255,255,0.60); }
.text-white\/70 { color: rgba(255,255,255,0.70); }
.text-on-surface { color: var(--tw-on-surface); }
.text-on-surface-variant { color: var(--tw-on-surface-variant); }
.text-on-primary { color: var(--tw-on-primary); }
.text-on-tertiary-container { color: var(--tw-on-tertiary-container); }
.text-on-success-container { color: var(--tw-on-success-container); }
.text-on-warning-container { color: var(--tw-on-warning-container); }
.text-on-error-container { color: var(--tw-on-error-container); }
.text-on-info-container { color: var(--tw-on-info-container); }
.text-secondary { color: var(--tw-secondary); }
.text-primary { color: var(--tw-primary); }
.text-primary-container { color: var(--tw-primary-container); }

/* ── Text sizing (matches Tailwind config alias names) ──────────── */
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.text-\[11px\] { font-size: 11px; line-height: 16px; }
.text-\[12px\] { font-size: 12px; line-height: 16px; }
.text-\[16px\] { font-size: 16px; line-height: 24px; }
.text-\[18px\] { font-size: 18px; line-height: 24px; }
.text-\[20px\] { font-size: 20px; line-height: 24px; }
.text-\[28px\] { font-size: 28px; line-height: 36px; }
.text-xs { font-size: 12px; line-height: 16px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-base { font-size: 16px; line-height: 24px; }
.text-lg { font-size: 18px; line-height: 28px; }
.text-xl { font-size: 20px; line-height: 28px; }
.text-2xl { font-size: 24px; line-height: 32px; }
/* SDCA token aliases (also in aisar-app.css; safe to repeat) */
.text-label-mono   { font-size: 12px; line-height: 16px; letter-spacing: 0.05em; font-weight: 600; }
.text-label-caps   { font-size: 11px; line-height: 16px; letter-spacing: 0.05em; font-weight: 600; }
.text-body-sm      { font-size: 14px; line-height: 20px; font-weight: 400; }
.text-body-md      { font-size: 16px; line-height: 24px; font-weight: 400; }
.text-body-base    { font-size: 16px; line-height: 24px; font-weight: 400; }
.text-body-lg      { font-size: 17px; line-height: 28px; font-weight: 400; }
.text-title-sm     { font-size: 18px; line-height: 24px; font-weight: 600; }
.text-title-md     { font-size: 18px; line-height: 24px; font-weight: 600; }
.text-headline-md  { font-size: 32px; line-height: 40px; letter-spacing: -0.01em; font-weight: 600; }
.text-headline-lg  { font-size: 32px; line-height: 40px; letter-spacing: -0.01em; font-weight: 600; }
.text-headline-xl  { font-size: 48px; line-height: 56px; letter-spacing: -0.02em; font-weight: 700; }
.text-display-md   { font-size: 32px; line-height: 40px; letter-spacing: -0.01em; font-weight: 600; }
.text-display-lg   { font-size: 48px; line-height: 56px; letter-spacing: -0.02em; font-weight: 700; }

/* ── Font weight / family / style ───────────────────────────────── */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ── Line height / letter spacing ───────────────────────────────── */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* ── Text alignment ─────────────────────────────────────────────── */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-start { text-align: start; }
.text-end { text-align: end; }

/* ── Pointer / cursor ───────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }
.select-none { user-select: none; }

/* ── Shadows ────────────────────────────────────────────────────── */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.06); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.08); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.10); }
.shadow-2xl { box-shadow: 0 25px 50px rgba(0,0,0,0.20); }
.shadow-glow { box-shadow: 0 0 15px rgba(50,255,50,0.30); }
.shadow-glass { box-shadow: 0 4px 30px rgba(0,0,0,0.05); }
.shadow-soft { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.shadow-primary\/5 { box-shadow: 0 20px 25px rgba(0,110,6,0.05); }

/* ── Backdrop filter ────────────────────────────────────────────── */
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

/* ── Opacity ────────────────────────────────────────────────────── */
.opacity-0 { opacity: 0; } .opacity-60 { opacity: 0.6; } .opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; } .opacity-100 { opacity: 1; }

/* ── Transitions ────────────────────────────────────────────────── */
.transition-all { transition: all 300ms ease; }
.transition-colors { transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease; }
.transition-transform { transition: transform 200ms ease; }
.transition-opacity { transition: opacity 200ms ease; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* ── Hover / focus / disabled ───────────────────────────────────── */
.hover\:bg-primary\/5:hover { background-color: rgba(0,110,6,0.05) !important; }
.hover\:bg-primary\/10:hover { background-color: rgba(0,110,6,0.10) !important; }
.hover\:bg-primary:hover { background-color: var(--tw-primary) !important; }
.hover\:text-primary:hover { color: var(--tw-primary) !important; }
.hover\:text-on-surface:hover { color: var(--tw-on-surface) !important; }
.hover\:shadow-glow:hover { box-shadow: 0 0 15px rgba(50,255,50,0.30); }
.hover\:scale-110:hover { transform: scale(1.10); }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:underline:hover { text-decoration: underline; }

.focus\:outline-none:focus { outline: none; }
.focus\:border-primary-fixed-dim:focus { border-color: var(--tw-primary-fixed-dim) !important; }
.focus\:\!border-transparent:focus { border-color: transparent !important; }
.focus\:\!ring-1:focus { box-shadow: 0 0 0 1px var(--tw-primary-fixed-dim); }
.focus\:\!ring-primary-fixed-dim\/30:focus { box-shadow: 0 0 0 3px rgba(0,230,26,0.30); }

.disabled\:opacity-60:disabled { opacity: 0.6; }

/* ── Other utilities used in templates ──────────────────────────── */
.leading-tight { line-height: 1.25; }
.appearance-none { appearance: none; -webkit-appearance: none; }
.list-none { list-style: none; }
.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { word-break: break-word; }
.break-all { word-break: break-all; }

.invert { filter: invert(1); }
.brightness-0 { filter: brightness(0) saturate(100%) invert(1); }
.contrast-200 { filter: contrast(2); }
/* When applied together for white logo: */
.invert.brightness-0 { filter: brightness(0) invert(1); }
.invert.brightness-0.contrast-200 { filter: brightness(0) invert(1) contrast(2); }

/* ── Responsive prefixes — md (768px+) ──────────────────────────── */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:inline-flex { display: inline-flex; }
  .md\:block { display: block; }
  .md\:inline-block { display: inline-block; }
  .md\:hidden { display: none; }
  .md\:grid { display: grid; }
  .md\:flex-row { flex-direction: row; }
  .md\:flex-col { flex-direction: column; }
  .md\:w-2\/5 { width: 40%; }
  .md\:w-3\/5 { width: 60%; }
  .md\:w-1\/2 { width: 50%; }
  .md\:w-64 { width: 256px; }
  .md\:start-64 { inset-inline-start: 256px; }
  .md\:p-12 { padding: 48px; }
  .md\:p-10 { padding: 40px; }
  .md\:px-8 { padding-left: 32px; padding-right: 32px; }
  .md\:py-10 { padding-top: 40px; padding-bottom: 40px; }
  .md\:my-0 { margin-top: 0; margin-bottom: 0; }
}

/* ── Responsive prefixes — sm (640px+) ──────────────────────────── */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:inline-flex { display: inline-flex; }
  .sm\:hidden { display: none; }
}

/* ── Responsive prefixes — lg (1024px+) ─────────────────────────── */
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Grid utilities ─────────────────────────────────────────────── */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── RTL adjustments: gradient direction reverses ───────────────── */
[dir="rtl"] .bg-gradient-to-r { background-image: linear-gradient(to left, var(--tw-gradient-from, transparent), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent)); }

/* ── Direction-aware utilities ─────────────────────────────────── */

/* Breadcrumb / "back" arrow — always points toward parent (start side).
 * Material Symbols `arrow_forward` is `→` (right-pointing).
 *   - RTL: right = start side, so unflipped already means "back". ✓
 *   - LTR: right = end side, wrong direction. Flip horizontally so it points to left = "back". ✓
 * Apply `.breadcrumb-arrow` to any inline arrow icon in a breadcrumb / back link. */
.breadcrumb-arrow { transition: transform 200ms ease; }
[dir="ltr"] .breadcrumb-arrow { transform: scaleX(-1); }

/* Same helper for "forward / next" arrows that always point AWAY from start
 * (used on Continue buttons, "see all →" links). Material `arrow_forward`
 * stays right-pointing → in LTR (= forward), needs flip in RTL (forward
 * direction reverses). Apply `.forward-arrow` to those icons. */
.forward-arrow { transition: transform 200ms ease; }
[dir="rtl"] .forward-arrow { transform: scaleX(-1); }

/* flex-row that mirrors direction: physical row in LTR, reversed in RTL.
 * Use when you want "icon then text" to appear in reading order in both
 * languages. Today many SDCA pages use `flex-row-reverse` which physically
 * reverses regardless of dir; `dir-flex-row` adapts automatically. */
.dir-flex-row { display: flex; flex-direction: row; }
[dir="rtl"] .dir-flex-row { flex-direction: row-reverse; }

/* The reverse: physical row in RTL, reversed in LTR. */
.dir-flex-row-reverse { display: flex; flex-direction: row-reverse; }
[dir="ltr"] .dir-flex-row-reverse { flex-direction: row; }

/* ── Missing utilities discovered during integration ───────────── */
.ps-3 { padding-inline-start: 12px; }
.ps-4 { padding-inline-start: 16px; }
.pe-3 { padding-inline-end: 12px; }
@media (min-width: 768px) {
  .md\:ps-64 { padding-inline-start: 256px; }
  .md\:gap-3 { gap: 12px; }
  .md\:ps-0 { padding-inline-start: 0; }
}

/* `!important` variants (Tailwind ! prefix) used in app-shell active-link */
.\!text-on-surface { color: var(--tw-on-surface) !important; }
.\!bg-primary\/5 { background-color: rgba(0,110,6,0.05) !important; }
.\!opacity-100 { opacity: 1 !important; }
.\!border-transparent { border-color: transparent !important; }

/* Floating ring effect for inputs */
.ring-1 { box-shadow: 0 0 0 1px var(--tw-primary-fixed-dim); }
.ring-2 { box-shadow: 0 0 0 2px var(--tw-primary-fixed-dim); }

/* Filter compound classes — combine cleanly via single property */
.invert.brightness-0 { filter: brightness(0) invert(1) !important; }
.invert.brightness-0.contrast-200 { filter: brightness(0) invert(1) contrast(2) !important; }

/* Common utilities likely used in dashboards */
.tabular { font-variant-numeric: tabular-nums; }
.empty-state { padding: 24px 0; text-align: center; color: var(--tw-secondary); }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { margin: 0 0 16px; color: var(--tw-secondary); }

.stat-card .label { font-size: 12px; color: var(--tw-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--tw-on-surface); }
