/* ==========================================================================
   AlfaNet Admin — Self-Hosted CSS (Replaces Tailwind CDN)
   Covers all utility classes used in admin.html + custom components
   ========================================================================== */

/* --- BASE RESET & BOX MODEL --- */
*, ::before, ::after { box-sizing: border-box; border: 0 solid #e2e8f0; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: Inter, Plus\ Jakarta\ Sans, system-ui, sans-serif; }
body { margin: 0; line-height: inherit; }
img, svg, video { display: block; vertical-align: middle; }
input, button, select, optgroup, textarea { font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; margin: 0; padding: 0; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: inherit; }
table { border-collapse: collapse; }
th { text-align: left; }
h1,h2,h3,h4,h5,h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* --- FONT FAMILIES --- */
.font-heading, h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', Inter, sans-serif; }

/* --- COLORS (CSS Custom Properties) --- */
:root {
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;
  --color-indigo-50:  #eef2ff;
  --color-indigo-100: #e0e7ff;
  --color-indigo-200: #c7d2fe;
  --color-indigo-300: #a5b4fc;
  --color-indigo-400: #818cf8;
  --color-indigo-500: #6366f1;
  --color-indigo-600: #4f46e5;
  --color-indigo-700: #4338ca;
  --color-indigo-900: #312e81;
  --color-indigo-950: #1e1b4b;
  --color-rose-50:  #fff1f2;
  --color-rose-100: #ffe4e6;
  --color-rose-200: #fecdd3;
  --color-rose-400: #fb7185;
  --color-rose-500: #f43f5e;
  --color-rose-600: #e11d48;
  --color-rose-950: #4c0519;
  --color-emerald-50:  #ecfdf5;
  --color-emerald-100: #d1fae5;
  --color-emerald-200: #a7f3d0;
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-emerald-700: #047857;
  --color-amber-50:  #fffbeb;
  --color-amber-100: #fef3c7;
  --color-amber-200: #fde68a;
  --color-amber-300: #fcd34d;
  --color-amber-500: #f59e0b;
  --color-amber-600: #d97706;
  --color-amber-700: #b45309;
  --color-blue-50:  #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-purple-50:  #faf5ff;
  --color-purple-500: #a855f7;
  --color-purple-600: #9333ea;
  --color-white: #ffffff;
}

/* --- LAYOUT --- */
.flex           { display: flex; }
.inline-flex    { display: inline-flex; }
.grid           { display: grid; }
.block          { display: block; }
.inline-block   { display: inline-block; }
.hidden         { display: none; }
.contents       { display: contents; }

.flex-1         { flex: 1 1 0%; }
.flex-col       { flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.flex-shrink-0  { flex-shrink: 0; }

.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.justify-start  { justify-content: flex-start; }
.justify-end    { justify-content: flex-end; }
.self-start     { align-self: flex-start; }
.self-auto      { align-self: auto; }

.gap-1    { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2    { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3    { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4    { gap: 1rem; }
.gap-5    { gap: 1.25rem; }
.gap-6    { gap: 1.5rem; }

.space-x-1   > * + * { margin-left: 0.25rem; }
.space-x-1\.5 > * + * { margin-left: 0.375rem; }
.space-x-2   > * + * { margin-left: 0.5rem; }
.space-x-2\.5 > * + * { margin-left: 0.625rem; }
.space-x-3   > * + * { margin-left: 0.75rem; }
.space-x-4   > * + * { margin-left: 1rem; }
.space-y-1   > * + * { margin-top: 0.25rem; }
.space-y-2   > * + * { margin-top: 0.5rem; }
.space-y-4   > * + * { margin-top: 1rem; }
.space-y-5   > * + * { margin-top: 1.25rem; }
.space-y-6   > * + * { margin-top: 1.5rem; }
.space-y-8   > * + * { margin-top: 2rem; }

/* Grid columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0,1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

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

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { top: 0; right: 0; bottom: 0; left: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.top-0    { top: 0; }
.top-5    { top: 1.25rem; }
.right-0  { right: 0; }
.right-5  { right: 1.25rem; }
.bottom-0 { bottom: 0; }
.left-0   { left: 0; }
.z-20  { z-index: 20; }
.z-30  { z-index: 30; }
.z-40  { z-index: 40; }
.z-50  { z-index: 50; }
.z-\[60\] { z-index: 60; }

/* --- SIZING --- */
.h-full    { height: 100%; }
.h-screen  { height: 100vh; }
.h-auto    { height: auto; }
.w-full    { width: 100%; }
.max-w-md  { max-width: 28rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-7xl { max-width: 80rem; }
.mx-4  { margin-left: 1rem; margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-1\.5 { width: 0.375rem; }
.w-2   { width: 0.5rem; }
.w-3   { width: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.w-4   { width: 1rem; }
.w-4\.5 { width: 1.125rem; }
.w-5   { width: 1.25rem; }
.w-6   { width: 1.5rem; }
.w-7   { width: 1.75rem; }
.w-8   { width: 2rem; }
.w-9   { width: 2.25rem; }
.w-10  { width: 2.5rem; }
.w-11  { width: 2.75rem; }
.w-12  { width: 3rem; }
.w-16  { width: 4rem; }
.w-20  { width: 5rem; }
.w-48  { width: 12rem; }
.w-64  { width: 16rem; }
.w-72  { width: 18rem; }
.w-96  { width: 24rem; }
.h-1\.5 { height: 0.375rem; }
.h-2   { height: 0.5rem; }
.h-3   { height: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.h-4   { height: 1rem; }
.h-5   { height: 1.25rem; }
.h-6   { height: 1.5rem; }
.h-7   { height: 1.75rem; }
.h-8   { height: 2rem; }
.h-9   { height: 2.25rem; }
.h-10  { height: 2.5rem; }
.h-11  { height: 2.75rem; }
.h-12  { height: 3rem; }
.h-16  { height: 4rem; }
.h-48  { height: 12rem; }
.h-64  { height: 16rem; }
.h-96  { height: 24rem; }
.min-w-0 { min-width: 0; }
.max-w-\[130px\] { max-width: 130px; }

/* --- SPACING (padding/margin) --- */
.p-1   { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2   { padding: 0.5rem; }
.p-3   { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4   { padding: 1rem; }
.p-5   { padding: 1.25rem; }
.p-6   { padding: 1.5rem; }
.p-8   { padding: 2rem; }
.p-0\.5 { padding: 0.125rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2  { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3  { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4  { padding-left: 1rem; padding-right: 1rem; }
.px-5  { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6  { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8  { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1  { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2  { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3  { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4  { padding-top: 1rem; padding-bottom: 1rem; }
.py-5  { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6  { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8  { padding-top: 2rem; padding-bottom: 2rem; }
.pl-3  { padding-left: 0.75rem; }
.pl-3\.5 { padding-left: 0.875rem; }
.pl-4  { padding-left: 1rem; }
.pl-9  { padding-left: 2.25rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-3  { padding-right: 0.75rem; }
.pr-3\.5 { padding-right: 0.875rem; }
.pr-4  { padding-right: 1rem; }
.pr-9  { padding-right: 2.25rem; }
.pr-10 { padding-right: 2.5rem; }
.pr-11 { padding-right: 2.75rem; }
.pt-4  { padding-top: 1rem; }
.pt-5  { padding-top: 1.25rem; }
.pb-2  { padding-bottom: 0.5rem; }
.pb-6  { padding-bottom: 1.5rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.ml-1  { margin-left: 0.25rem; }
.ml-2  { margin-left: 0.5rem; }
.ml-2\.5 { margin-left: 0.625rem; }
.ml-3  { margin-left: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1  { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2  { margin-top: 0.5rem; }
.mr-1  { margin-right: 0.25rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-2  { margin-right: 0.5rem; }
.mr-2\.5 { margin-right: 0.625rem; }
.mr-3  { margin-right: 0.75rem; }

/* --- TYPOGRAPHY --- */
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.tracking-tight  { letter-spacing: -0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }
.uppercase       { text-transform: uppercase; }
.leading-none    { line-height: 1; }
.leading-snug    { line-height: 1.375; }
.leading-tight   { line-height: 1.25; }
.whitespace-nowrap { white-space: nowrap; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-1    { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.italic          { font-style: italic; }
.text-left       { text-align: left; }
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.underline       { text-decoration: underline; }

/* Font Mono */
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* --- TEXT COLORS --- */
.text-white        { color: #ffffff; }
.text-slate-300    { color: #cbd5e1; }
.text-slate-400    { color: #94a3b8; }
.text-slate-500    { color: #64748b; }
.text-slate-600    { color: #475569; }
.text-slate-700    { color: #334155; }
.text-slate-800    { color: #1e293b; }
.text-slate-900    { color: #0f172a; }
.text-gray-300     { color: #d1d5db; }
.text-indigo-300   { color: #a5b4fc; }
.text-indigo-400   { color: #818cf8; }
.text-indigo-600   { color: #4f46e5; }
.text-indigo-700   { color: #4338ca; }
.text-rose-400     { color: #fb7185; }
.text-rose-500     { color: #f43f5e; }
.text-rose-600     { color: #e11d48; }
.text-rose-100     { color: #ffe4e6; }
.text-emerald-400  { color: #34d399; }
.text-emerald-600  { color: #059669; }
.text-emerald-700  { color: #047857; }
.text-amber-300    { color: #fcd34d; }
.text-amber-600    { color: #d97706; }
.text-amber-700    { color: #b45309; }
.text-blue-700     { color: #1d4ed8; }
.text-purple-700   { color: #6d28d9; }

/* --- BACKGROUNDS --- */
.bg-white          { background-color: #ffffff; }
.bg-slate-50       { background-color: #f8fafc; }
.bg-slate-100      { background-color: #f1f5f9; }
.bg-slate-200      { background-color: #e2e8f0; }
.bg-slate-900      { background-color: #0f172a; }
.bg-slate-950      { background-color: #020617; }
.bg-indigo-50      { background-color: #eef2ff; }
.bg-indigo-100     { background-color: #e0e7ff; }
.bg-indigo-600     { background-color: #4f46e5; }
.bg-rose-950       { background-color: #4c0519; }
.bg-emerald-50     { background-color: #ecfdf5; }
.bg-emerald-100    { background-color: #d1fae5; }
.bg-emerald-600    { background-color: #059669; }
.bg-amber-50       { background-color: #fffbeb; }
.bg-amber-100      { background-color: #fef3c7; }
.bg-amber-500\/20  { background-color: rgba(245,158,11,0.2); }
.bg-blue-50        { background-color: #eff6ff; }
.bg-purple-50      { background-color: #faf5ff; }

/* Opacity/Alpha BG utilities */
.bg-slate-900\/60  { background-color: rgba(15,23,42,0.6); }
.bg-slate-950\/40  { background-color: rgba(2,6,23,0.4); }
.bg-slate-950\/85  { background-color: rgba(2,6,23,0.85); }
.bg-white\/5       { background-color: rgba(255,255,255,0.05); }
.bg-white\/10      { background-color: rgba(255,255,255,0.1); }
.bg-white\/15      { background-color: rgba(255,255,255,0.15); }
.bg-white\/20      { background-color: rgba(255,255,255,0.2); }
.bg-white\/95      { background-color: rgba(255,255,255,0.95); }
.bg-indigo-500\/10 { background-color: rgba(99,102,241,0.1); }
.bg-indigo-500\/20 { background-color: rgba(99,102,241,0.2); }
.bg-emerald-500\/20{ background-color: rgba(16,185,129,0.2); }
.bg-rose-500\/15   { background-color: rgba(244,63,94,0.15); }
.bg-rose-500\/20   { background-color: rgba(244,63,94,0.2); }
.bg-amber-200\/80  { background-color: rgba(253,230,138,0.8); }
.bg-blue-200\/80   { background-color: rgba(191,219,254,0.8); }
.bg-emerald-200\/80{ background-color: rgba(167,243,208,0.8); }
.bg-rose-200\/80   { background-color: rgba(254,205,211,0.8); }
.bg-slate-800\/40  { background-color: rgba(30,41,59,0.4); }
.bg-slate-800\/50  { background-color: rgba(30,41,59,0.5); }

/* Background gradient */
.bg-gradient-to-r  { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-tr { background-image: linear-gradient(to top right, var(--tw-gradient-stops)); }
.from-slate-900 { --tw-gradient-from: #0f172a; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-slate-800 { --tw-gradient-from: #1e293b; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-indigo-500 { --tw-gradient-from: #6366f1; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-indigo-950 { --tw-gradient-via: #1e1b4b; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }
.via-indigo-900 { --tw-gradient-via: #312e81; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }
.to-slate-900  { --tw-gradient-to: #0f172a; }
.to-indigo-900 { --tw-gradient-to: #312e81; }
.to-purple-600 { --tw-gradient-to: #9333ea; }
.to-rose-500   { --tw-gradient-to: #f43f5e; }

/* --- BORDERS --- */
.border        { border-width: 1px; }
.border-0      { border-width: 0px; }
.border-b      { border-bottom-width: 1px; }
.border-t      { border-top-width: 1px; }
.border-l      { border-left-width: 1px; }
.border-r      { border-right-width: 1px; }
.border-l-\[3px\] { border-left-width: 3px; }
.border-transparent { border-color: transparent; }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.border-white\/15 { border-color: rgba(255,255,255,0.15); }
.border-white\/40 { border-color: rgba(255,255,255,0.4); }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-200\/80 { border-color: rgba(226,232,240,0.8); }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-700 { border-color: #334155; }
.border-slate-700\/50 { border-color: rgba(51,65,85,0.5); }
.border-slate-800 { border-color: #1e293b; }
.border-slate-800\/80 { border-color: rgba(30,41,59,0.8); }
.border-slate-900 { border-color: #0f172a; }
.border-indigo-100 { border-color: #e0e7ff; }
.border-indigo-200 { border-color: #c7d2fe; }
.border-indigo-200\/80 { border-color: rgba(199,210,254,0.8); }
.border-indigo-300 { border-color: #a5b4fc; }
.border-indigo-400\/20 { border-color: rgba(129,140,248,0.2); }
.border-indigo-500 { border-color: #6366f1; }
.border-indigo-500\/20 { border-color: rgba(99,102,241,0.2); }
.border-indigo-500\/30 { border-color: rgba(99,102,241,0.3); }
.border-indigo-600 { border-color: #4f46e5; }
.border-indigo-900\/30 { border-color: rgba(49,46,129,0.3); }
.border-rose-200  { border-color: #fecdd3; }
.border-rose-500\/30 { border-color: rgba(244,63,94,0.3); }
.border-rose-500\/40 { border-color: rgba(244,63,94,0.4); }
.border-emerald-100 { border-color: #d1fae5; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-500\/30 { border-color: rgba(16,185,129,0.3); }
.border-amber-100 { border-color: #fef3c7; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-500\/30 { border-color: rgba(245,158,11,0.3); }
.border-blue-200  { border-color: #bfdbfe; }
.border-slate-600 { border-color: #475569; }

/* --- BORDER RADIUS --- */
.rounded       { border-radius: 0.25rem; }
.rounded-lg    { border-radius: 0.5rem; }
.rounded-xl    { border-radius: 0.75rem; }
.rounded-2xl   { border-radius: 1rem; }
.rounded-3xl   { border-radius: 1.5rem; }
.rounded-full  { border-radius: 9999px; }
.rounded-\[9999px\] { border-radius: 9999px; }

/* --- SHADOWS --- */
.shadow-sm    { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-md    { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg    { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-xl    { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1),0 8px 10px -6px rgba(0,0,0,0.1); }
.shadow-2xl   { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.shadow-card  { box-shadow: 0 1px 3px 0 rgba(0,0,0,0.04),0 1px 2px -1px rgba(0,0,0,0.04); }
.shadow-card-hover { box-shadow: 0 10px 25px -5px rgba(15,23,42,0.06),0 8px 10px -6px rgba(15,23,42,0.04); }
.shadow-glow-accent { box-shadow: 0 0 20px -3px rgba(99,102,241,0.35); }
.shadow-glow-rose   { box-shadow: 0 0 20px -3px rgba(225,29,72,0.35); }
.shadow-subtle { box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.shadow-indigo-500\/20 { --tw-shadow-color: rgba(99,102,241,0.2); }
.shadow-indigo-500\/25 { --tw-shadow-color: rgba(99,102,241,0.25); }

/* --- BLUR & BACKDROP --- */
.backdrop-blur-sm  { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur-xl  { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.blur-2xl  { filter: blur(40px); }
.blur-3xl  { filter: blur(64px); }
.backdrop-blur-16  { backdrop-filter: blur(16px); }

/* --- OPACITY --- */
.opacity-0 { opacity: 0; }
.opacity-75 { opacity: 0.75; }
.pointer-events-none { pointer-events: none; }

/* --- TRANSFORMS --- */
.translate-y-2 { transform: translateY(0.5rem); }
.-translate-x-full { transform: translateX(-100%); }
.translate-x-0 { transform: translateX(0); }
.scale-\[0\.98\] { transform: scale(0.98); }
.scale-\[0\.99\] { transform: scale(0.99); }
.rotate-180 { transform: rotate(180deg); }

/* --- TRANSITIONS --- */
.transition-all      { transition-property: all; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-colors   { transition-property: color,background-color,border-color; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-opacity  { transition-property: opacity; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-transform{ transition-property: transform; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.duration-200  { transition-duration: 200ms; }
.duration-300  { transition-duration: 300ms; }
.duration-500  { transition-duration: 500ms; }
.ease-in-out   { transition-timing-function: cubic-bezier(0.4,0,0.2,1); }

/* --- CURSOR --- */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* --- SELECTION --- */
.selection\:bg-indigo-500 ::selection { background-color: #6366f1; }
.selection\:text-white   ::selection { color: #fff; }

/* --- ANTIALIASED --- */
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* --- FOCUS RING --- */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus    { box-shadow: 0 0 0 2px var(--tw-ring-color, rgba(99,102,241,0.3)); }
.focus\:ring-4:focus    { box-shadow: 0 0 0 4px var(--tw-ring-color, rgba(99,102,241,0.15)); }
.focus\:ring-indigo-500\/15:focus { --tw-ring-color: rgba(99,102,241,0.15); }
.focus\:ring-indigo-500\/20:focus { --tw-ring-color: rgba(99,102,241,0.2); }
.focus\:border-indigo-500:focus   { border-color: #6366f1; }
.focus\:bg-white:focus            { background-color: #fff; }
.focus\:bg-white:focus            { background-color: #fff; }
.outline-none { outline: none; }

/* --- HOVER STATES --- */
.hover\:bg-white\/5:hover  { background-color: rgba(255,255,255,0.05); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.2); }
.hover\:bg-slate-50:hover  { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-slate-800\/40:hover { background-color: rgba(30,41,59,0.4); }
.hover\:bg-slate-50\/80:hover  { background-color: rgba(248,250,252,0.8); }
.hover\:bg-indigo-50:hover   { background-color: #eef2ff; }
.hover\:bg-indigo-100:hover  { background-color: #e0e7ff; }
.hover\:bg-indigo-500:hover  { background-color: #6366f1; }
.hover\:bg-rose-50:hover     { background-color: #fff1f2; }
.hover\:bg-emerald-100:hover { background-color: #d1fae5; }
.hover\:bg-amber-100:hover   { background-color: #fef3c7; }
.hover\:bg-blue-100:hover    { background-color: #dbeafe; }
.hover\:bg-rose-500\/20:hover{ background-color: rgba(244,63,94,0.2); }
.hover\:bg-indigo-900:hover  { background-color: #312e81; }
.hover\:text-white:hover  { color: #fff; }
.hover\:text-slate-600:hover { color: #475569; }
.hover\:text-slate-900:hover { color: #0f172a; }
.hover\:text-indigo-700:hover { color: #4338ca; }
.hover\:text-indigo-800:hover { color: #3730a3; }
.hover\:text-rose-600:hover  { color: #e11d48; }
.hover\:border-indigo-300:hover { border-color: #a5b4fc; }
.hover\:border-indigo-500:hover { border-color: #6366f1; }
.hover\:border-rose-200:hover   { border-color: #fecdd3; }
.hover\:shadow-card-hover:hover { box-shadow: 0 10px 25px -5px rgba(15,23,42,0.06),0 8px 10px -6px rgba(15,23,42,0.04); }
.hover\:shadow-indigo-500\/25:hover { box-shadow: 0 10px 15px -3px rgba(99,102,241,0.25); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-indigo-600:hover { color: #4f46e5; }
.group:hover .group-hover\:text-indigo-400 { color: #818cf8; }
.group:hover .group-hover\:text-white { color: #fff; }
.group:hover .group-hover\:text-slate-600 { color: #475569; }

/* Active states */
.active\:scale-95:active  { transform: scale(0.95); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
.active\:scale-\[0\.99\]:active { transform: scale(0.99); }

/* --- DIVIDE UTILITIES --- */
.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }
.divide-slate-100 > * + * { border-top-color: #f1f5f9; }

/* --- CUSTOM ADMIN COMPONENTS --- */

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-sidebar {
    background: linear-gradient(180deg, #0B1120 0%, #070B14 100%);
}

/* Nav active state */
.nav-item.active-nav {
    background: linear-gradient(90deg, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0.03) 100%) !important;
    color: #FFFFFF !important;
    border-left: 3px solid #6366F1;
    font-weight: 600;
}
.nav-item.active-nav svg { color: #818CF8 !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.25s cubic-bezier(0.16,1,0.3,1) forwards; }

@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping { animation: ping 1s cubic-bezier(0,0,0.2,1) infinite; }

@keyframes pulse {
    50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 9999px; }

/* Custom input range */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { opacity: 1; }

/* --- RESPONSIVE BREAKPOINTS --- */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .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\:items-center { align-items: center; }
    .sm\:justify-between { justify-content: space-between; }
    .sm\:self-auto { align-self: auto; }
    .sm\:p-7 { padding: 1.75rem; }
    .sm\:p-8 { padding: 2rem; }
    .sm\:p-10 { padding: 2.5rem; }
    .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .sm\:inline { display: inline; }
    .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:hidden { display: none; }
    .md\:translate-x-0 { transform: translateX(0); }
    .md\:ml-72 { margin-left: 18rem; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }
    .md\:self-auto { align-self: auto; }
}

@media (min-width: 1024px) {
    .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)); }
}

@media (min-width: 1280px) {
    .xl\:flex-row { flex-direction: row; }
    .xl\:items-center { align-items: center; }
}

/* Hidden on mobile, show on md */
.md\:hidden { display: none; }
@media (min-width: 768px) {
    .md\:hidden { display: none; }
}
@media (max-width: 767.98px) {
    .hidden.md\:hidden { display: none; }
    /* Ensure hamburger/sidebar visible on mobile */
    .md\:hidden { display: flex; }
}

/* --- PRINT STYLES --- */
@media print {
    aside, header, #login-overlay, #toast-container, .no-print {
        display: none !important;
    }
    main {
        margin-left: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    #view-orders { display: block !important; }
    #view-dashboard, #view-products { display: none !important; }
    body { background: white !important; color: black !important; }
    .shadow-card, .shadow-2xl { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* --- MISC UTILITIES --- */
.object-contain { object-fit: contain; }
.object-cover   { object-fit: cover; }
.aspect-auto    { aspect-ratio: auto; }
.select-none    { user-select: none; }
.select-text    { user-select: text; }
.break-all      { word-break: break-all; }
.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; }

/* Ensure table fills correctly */
table { width: 100%; }
.w-full table { width: 100%; }

/* Ensure backdrop works */
@supports not (backdrop-filter: blur(1px)) {
    .glass-panel   { background: rgba(255,255,255,0.97); }
    .glass-sidebar { background: #0B1120; }
}
