/* ============================================================
   Worldesk BackOffice — design system (hand-authored, no build step)
   Tokens are theme-aware via [data-theme] on <html>; MudBlazor handles
   components, this layer adds the bespoke Worldesk look + utilities.
   Admin reskin: violet-leaning active accents + indigo-tinted app mesh.
   ============================================================ */

:root {
  --m-bg: #f3f6fc;
  --m-bg-elev: #ffffff;
  --m-surface: #ffffff;
  --m-surface-2: #f6f8fd;
  --m-surface-3: #eef2fa;
  --m-border: #e6ebf4;
  --m-border-strong: #d4dbe9;
  --m-text: #0f1729;
  --m-text-2: #36415c;
  --m-muted: #6a7691;
  --m-brand: #2f76f6;
  --m-brand-2: #7c5cff;
  --m-brand-soft: rgba(47, 118, 246, 0.10);
  --m-brand-2-soft: rgba(124, 92, 255, 0.12);
  --m-success: #16a34a;
  --m-success-soft: rgba(22, 163, 74, 0.12);
  --m-danger: #ef4444;
  --m-danger-soft: rgba(239, 68, 68, 0.12);
  --m-warning: #f59e0b;
  --m-warning-soft: rgba(245, 158, 11, 0.14);
  --m-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 22px -14px rgba(16, 32, 80, .20);
  --m-shadow-lg: 0 1px 2px rgba(16, 24, 40, .05), 0 22px 46px -24px rgba(16, 32, 80, .34);
  /* Harmonized corner radii — slightly rounded, production-grade fintech feel */
  --m-radius: 14px;
  --m-radius-sm: 10px;
  --m-radius-lg: 18px;
  /* Faint brand mesh so the light canvas doesn't read as flat white. Admin gets a
     subtle indigo/violet tint to visually distinguish it from the customer app. */
  --m-app-mesh:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, .06) 0, transparent 40%),
    radial-gradient(at 100% 0%, rgba(124, 92, 255, .07) 0, transparent 38%),
    radial-gradient(at 50% 100%, rgba(47, 118, 246, .04) 0, transparent 42%);
}

[data-theme='dark'] {
  --m-bg: #080b15;
  --m-bg-elev: #0f1424;
  --m-surface: #131a2c;
  --m-surface-2: #182035;
  --m-surface-3: #1f2942;
  --m-border: #242e49;
  --m-border-strong: #303c5d;
  --m-text: #e9eef8;
  --m-text-2: #c2ccdf;
  --m-muted: #9fb0cc;
  --m-brand-soft: rgba(47, 118, 246, 0.16);
  --m-brand-2-soft: rgba(124, 92, 255, 0.18);
  --m-success-soft: rgba(62, 207, 142, 0.15);
  --m-danger-soft: rgba(239, 68, 68, 0.16);
  --m-warning-soft: rgba(245, 158, 11, 0.16);
  --m-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .7);
  --m-shadow-lg: 0 1px 2px rgba(0, 0, 0, .35), 0 30px 60px -28px rgba(0, 0, 0, .8);
  --m-app-mesh:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, .15) 0, transparent 44%),
    radial-gradient(at 100% 0%, rgba(124, 92, 255, .16) 0, transparent 42%),
    radial-gradient(at 50% 100%, rgba(47, 118, 246, .10) 0, transparent 46%);
}

html, body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Nunito Sans', Inter, system-ui, -apple-system, sans-serif;
  background-color: var(--m-bg);
  color: var(--m-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
h1:focus { outline: none; }

a { color: inherit; text-decoration: none; }

/* ---------- App background ---------- */
.m-app-bg {
  min-height: 100vh;
  background-color: var(--m-bg);
  background-image: var(--m-app-mesh);
  background-attachment: fixed;
}

/* ============================================================
   Surfaces
   ============================================================ */
.m-card {
  background-color: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  box-shadow: var(--m-shadow);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease, border-color .28s ease;
}
.m-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--m-shadow-lg);
  border-color: color-mix(in srgb, var(--m-brand-2) 45%, var(--m-border));
}

.m-glass {
  background-color: color-mix(in srgb, var(--m-surface) 78%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--m-border);
}

.m-surface-2 { background-color: var(--m-surface-2); }
.m-surface-3 { background-color: var(--m-surface-3); }

/* ============================================================
   Brand bits
   ============================================================ */
.m-gradient-text {
  background-image: linear-gradient(115deg, #2f76f6, #7c5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.m-brand-gradient { background-image: linear-gradient(135deg, #2f76f6 0%, #7c5cff 100%); }
.m-brand-gradient-soft { background-image: linear-gradient(135deg, rgba(47,118,246,.14), rgba(124,92,255,.14)); }

/* App icon — the modernized two-disc brand orb (wwwroot/favicon.svg) */
.m-logo-mark {
  display: inline-block;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: url('favicon.svg') center / cover no-repeat;
  box-shadow: 0 6px 18px -6px rgba(124, 92, 255, .55);
}

/* ---------- Native form controls (static-SSR auth pages) ---------- */
.m-input {
  width: 100%;
  height: 46px;
  padding: 0 .9rem;
  border-radius: .7rem;
  border: 1px solid var(--m-border-strong);
  background: var(--m-surface-2);
  color: var(--m-text);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.m-input::placeholder { color: var(--m-muted); }
.m-input:focus {
  border-color: var(--m-brand-2);
  box-shadow: 0 0 0 3px var(--m-brand-2-soft);
}
.m-btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: .7rem;
  background-image: linear-gradient(135deg, #2f76f6, #7c5cff);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.m-btn-primary:hover { box-shadow: 0 10px 24px -10px rgba(124,92,255,.6); transform: translateY(-1px); }
.m-btn-ghost {
  width: 100%;
  height: 46px;
  border-radius: .7rem;
  border: 1px solid var(--m-border-strong);
  background: transparent;
  color: var(--m-text);
  font-weight: 600;
  cursor: pointer;
}
.m-btn-ghost:hover { background: var(--m-surface-2); }
.m-channel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: .7rem .8rem;
  border-radius: .7rem;
  border: 1px solid var(--m-border-strong);
  background: var(--m-surface-2);
  cursor: pointer;
}
.m-channel input[type=radio] { accent-color: var(--m-brand-2); }
.m-channel:has(input:checked) { border-color: var(--m-brand-2); box-shadow: 0 0 0 2px var(--m-brand-2-soft); }

/* ---------- Pills / status chips ---------- */
.m-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .62rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700; line-height: 1;
  letter-spacing: .01em;
}
.m-pill .m-dot { width: .42rem; height: .42rem; border-radius: 999px; background: currentColor; }
.m-pill-success { color: var(--m-success); background: var(--m-success-soft); }
.m-pill-danger  { color: var(--m-danger);  background: var(--m-danger-soft); }
.m-pill-warning { color: var(--m-warning); background: var(--m-warning-soft); }
.m-pill-brand   { color: var(--m-brand);   background: var(--m-brand-soft); }
.m-pill-violet  { color: var(--m-brand-2); background: var(--m-brand-2-soft); }
.m-pill-muted   { color: var(--m-muted);   background: var(--m-surface-3); }

/* ============================================================
   Typography helpers
   ============================================================ */
.m-muted { color: var(--m-muted); }
.m-text-2 { color: var(--m-text-2); }
.m-eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .68rem;
  font-weight: 700;
  color: var(--m-muted);
}
.m-stat-value {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.m-tabular { font-variant-numeric: tabular-nums; }

/* ============================================================
   Sidebar / nav (MudNavMenu restyle)
   ============================================================ */
.m-nav .mud-nav-link {
  border-radius: .7rem;
  margin: 2px 10px;
  padding-top: .55rem; padding-bottom: .55rem;
  color: var(--m-text-2);
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease;
}
.m-nav .mud-nav-link:hover { background-color: var(--m-surface-3); color: var(--m-text); }
.m-nav .mud-nav-link.active {
  background-image: linear-gradient(135deg, rgba(47,118,246,.12), rgba(124,92,255,.30));
  color: var(--m-brand-2) !important;
  font-weight: 700;
}
.m-nav .mud-nav-link.active .mud-icon-root { color: var(--m-brand-2) !important; }
.m-nav .mud-nav-group .mud-nav-link { font-weight: 700; }
.m-nav-group-label {
  padding: 14px 22px 6px;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--m-muted);
}

/* Collapsed (mini) sidebar: each link is a centered fixed square so the icon AND its active
   highlight sit dead-centre in the rail, aligned under the logo. */
.m-nav-collapsed .mud-nav-link {
  justify-content: center;
  width: 44px; height: 44px; min-width: 44px;
  padding: 0;
  margin: 4px auto;
}
/* Zero every residual icon margin so the glyph is truly centered (MudBlazor leaves a right
   margin meant for the now-absent label, which otherwise shifts the icon left of center). */
.m-nav-collapsed .mud-nav-link .mud-nav-link-icon,
.m-nav-collapsed .mud-nav-link .mud-nav-link-icon-default,
.m-nav-collapsed .mud-nav-link .mud-icon-root { margin: 0 !important; }
/* Each collapsed link is wrapped in a MudTooltip whose activator is display:inline-block, so it
   shrinks to the icon and hugs the left edge — the link's `margin:auto` then has no room to centre.
   Make the wrapper span the rail and centre the link square within it. */
.m-nav-collapsed .mud-tooltip-root.mud-tooltip-inline {
  display: flex;
  width: 100%;
  justify-content: center;
}
.m-nav-rule { height: 1px; background: var(--m-border); margin: 10px 18px; }

/* ============================================================
   Mini table niceties
   ============================================================ */
.m-table-row { transition: background-color .15s ease; }
.m-table-row:hover { background-color: var(--m-surface-2); }

.m-avatar-stack { display: inline-flex; }
.m-avatar-stack > * { margin-left: -10px; border: 2px solid var(--m-surface); }
.m-avatar-stack > *:first-child { margin-left: 0; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes m-fade-in-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes m-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-shimmer { 100% { transform: translateX(100%); } }
@keyframes m-pulse-ring { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes m-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes m-draw { from { stroke-dashoffset: var(--m-len, 1000); } to { stroke-dashoffset: 0; } }

.m-fade-in-up { animation: m-fade-in-up .55s cubic-bezier(.22, 1, .36, 1) both; }
.m-fade-in { animation: m-fade-in .45s ease both; }

.m-stagger > * { opacity: 0; animation: m-fade-in-up .55s cubic-bezier(.22, 1, .36, 1) forwards; }
.m-stagger > *:nth-child(1) { animation-delay: .03s; }
.m-stagger > *:nth-child(2) { animation-delay: .08s; }
.m-stagger > *:nth-child(3) { animation-delay: .13s; }
.m-stagger > *:nth-child(4) { animation-delay: .18s; }
.m-stagger > *:nth-child(5) { animation-delay: .23s; }
.m-stagger > *:nth-child(6) { animation-delay: .28s; }
.m-stagger > *:nth-child(7) { animation-delay: .33s; }
.m-stagger > *:nth-child(8) { animation-delay: .38s; }
.m-stagger > *:nth-child(9) { animation-delay: .43s; }
.m-stagger > *:nth-child(10) { animation-delay: .48s; }

/* Live status dot with pulsing ring */
.m-live { position: relative; display: inline-flex; width: .6rem; height: .6rem; }
.m-live .m-live-core { width: .6rem; height: .6rem; border-radius: 999px; background: var(--m-success); }
.m-live .m-live-ring {
  position: absolute; inset: 0; border-radius: 999px; background: var(--m-success);
  animation: m-pulse-ring 1.8s cubic-bezier(.4, 0, .6, 1) infinite;
}

/* Animated line-chart path draw (set --m-len to path length) */
.m-draw-path { stroke-dasharray: var(--m-len, 1000); animation: m-draw 1.6s ease-out forwards; }

/* ---------- Skeleton ---------- */
.m-skeleton { position: relative; overflow: hidden; background: var(--m-surface-2); border-radius: .6rem; }
.m-skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--m-text) 8%, transparent), transparent);
  animation: m-shimmer 1.6s infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, .m-stagger > *, .m-fade-in-up, .m-fade-in { animation: none !important; transition: none !important; }
}

/* ============================================================
   Tailwind-style utility layer (hand-authored subset, real TW names)
   Lets markup read like Tailwind without the Node/PostCSS build.
   ============================================================ */

/* 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 */
.flex-row { flex-direction: row; } .flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; } .flex-nowrap { flex-wrap: nowrap; }
.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; }
.flex-1 { flex: 1 1 0%; } .flex-auto { flex: 1 1 auto; } .flex-none { flex: none; }
.grow { flex-grow: 1; } .grow-0 { flex-grow: 0; } .shrink-0 { flex-shrink: 0; } .min-w-0 { min-width: 0; }

/* grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, 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-full { grid-column: 1 / -1; }
.place-items-center { place-items: center; }

/* gap */
.gap-0 { gap: 0; } .gap-1 { gap: .25rem; } .gap-1\.5 { gap: .375rem; } .gap-2 { gap: .5rem; }
.gap-2\.5 { gap: .625rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
.gap-x-2 { column-gap: .5rem; } .gap-x-4 { column-gap: 1rem; } .gap-y-2 { row-gap: .5rem; } .gap-y-4 { row-gap: 1rem; }

/* padding / margin */
.p-0 { padding: 0; } .p-1 { padding: .25rem; } .p-2 { padding: .5rem; } .p-3 { padding: .75rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.px-1 { padding-left: .25rem; padding-right: .25rem; } .px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; } .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; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; } .py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; } .py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; } .py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.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; }
.pt-1 { padding-top: .25rem; } .pt-2 { padding-top: .5rem; } .pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: .5rem; } .pb-4 { padding-bottom: 1rem; }
.m-0 { margin: 0; } .mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.ml-1 { margin-left: .25rem; } .ml-2 { margin-left: .5rem; } .ml-auto { margin-left: auto; }
.mr-1 { margin-right: .25rem; } .mr-2 { margin-right: .5rem; }
.-mt-1 { margin-top: -.25rem; }

/* sizing */
.w-full { width: 100%; } .w-auto { width: auto; } .w-fit { width: fit-content; } .w-0 { width: 0; }
.w-8 { width: 2rem; } .w-9 { width: 2.25rem; } .w-10 { width: 2.5rem; } .w-11 { width: 2.75rem; } .w-12 { width: 3rem; }
.max-w-xs { max-width: 20rem; } .max-w-sm { max-width: 24rem; } .max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; } .max-w-xl { max-width: 36rem; } .max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; } .max-w-7xl { max-width: 80rem; }
.h-full { height: 100%; } .h-screen { height: 100vh; } .h-1 { height: .25rem; } .h-1\.5 { height: .375rem; }
.h-2 { height: .5rem; } .h-8 { height: 2rem; } .h-9 { height: 2.25rem; } .h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; } .h-12 { height: 3rem; } .min-h-screen { min-height: 100vh; }

/* position */
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; } .sticky { position: sticky; }
.inset-0 { inset: 0; } .top-0 { top: 0; } .right-0 { right: 0; } .bottom-0 { bottom: 0; } .left-0 { left: 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; }

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

/* typography */
.text-xs { font-size: .75rem; line-height: 1.1rem; } .text-sm { font-size: .875rem; line-height: 1.35rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; } .text-lg { font-size: 1.125rem; line-height: 1.7rem; }
.text-xl { font-size: 1.25rem; line-height: 1.8rem; } .text-2xl { font-size: 1.6rem; line-height: 2rem; }
.text-3xl { font-size: 2rem; line-height: 2.4rem; } .text-4xl { font-size: 2.6rem; line-height: 3rem; }
.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; }
.leading-none { line-height: 1; } .leading-tight { line-height: 1.2; } .leading-snug { line-height: 1.4; }
.tracking-tight { letter-spacing: -.02em; } .tracking-wide { letter-spacing: .04em; } .tracking-widest { letter-spacing: .12em; }
.text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; }
.uppercase { text-transform: uppercase; } .capitalize { text-transform: capitalize; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; } .tabular-nums { font-variant-numeric: tabular-nums; }

/* colors — text */
.text-brand { color: var(--m-brand); } .text-violet { color: var(--m-brand-2); } .text-success { color: var(--m-success); }
.text-danger { color: var(--m-danger); } .text-warning { color: var(--m-warning); }
.text-muted { color: var(--m-muted); } .text-default { color: var(--m-text); } .text-2 { color: var(--m-text-2); }
.text-white { color: #fff; }

/* colors — bg */
.bg-surface { background-color: var(--m-surface); } .bg-surface-2 { background-color: var(--m-surface-2); }
.bg-surface-3 { background-color: var(--m-surface-3); } .bg-transparent { background-color: transparent; }
.bg-brand { background-color: var(--m-brand); } .bg-brand-soft { background-color: var(--m-brand-soft); }
.bg-violet-soft { background-color: var(--m-brand-2-soft); }
.bg-success-soft { background-color: var(--m-success-soft); } .bg-danger-soft { background-color: var(--m-danger-soft); }
.bg-warning-soft { background-color: var(--m-warning-soft); } .bg-white { background-color: #fff; }

/* borders & radius */
.border { border: 1px solid var(--m-border); } .border-0 { border: 0; }
.border-t { border-top: 1px solid var(--m-border); } .border-b { border-bottom: 1px solid var(--m-border); }
.border-strong { border-color: var(--m-border-strong); }
.rounded { border-radius: .375rem; } .rounded-md { border-radius: .5rem; } .rounded-lg { border-radius: .7rem; }
.rounded-xl { border-radius: .9rem; } .rounded-2xl { border-radius: var(--m-radius); } .rounded-3xl { border-radius: 1.6rem; }
.rounded-full { border-radius: 999px; }

/* effects */
.shadow { box-shadow: var(--m-shadow); } .shadow-lg { box-shadow: var(--m-shadow-lg); } .shadow-none { box-shadow: none; }
.opacity-0 { opacity: 0; } .opacity-60 { opacity: .6; } .opacity-70 { opacity: .7; } .opacity-100 { opacity: 1; }

/* transitions & transforms */
.transition { transition: all .25s ease; }
.transition-transform { transition: transform .25s cubic-bezier(.22,1,.36,1); }
.duration-200 { transition-duration: .2s; } .duration-300 { transition-duration: .3s; }
.ease-out { transition-timing-function: cubic-bezier(.22,1,.36,1); }

/* misc */
.cursor-pointer { cursor: pointer; } .select-none { user-select: none; }
.object-cover { object-fit: cover; }

/* hover variants (explicit — no preprocessor) */
.hover\:bg-surface-2:hover { background-color: var(--m-surface-2); }
.hover\:bg-surface-3:hover { background-color: var(--m-surface-3); }
.hover\:text-brand:hover { color: var(--m-brand); }
.hover\:-translate-y-0\.5:hover { transform: translateY(-2px); }
.hover\:shadow-lg:hover { box-shadow: var(--m-shadow-lg); }

/* semantic helpers */
.text-up { color: var(--m-success); } .text-down { color: var(--m-danger); }

/* responsive (md ≥ 768px, lg ≥ 1100px) */
@media (max-width: 767px) {
  .grid-cols-2.sm\:grid-cols-1, .grid-cols-3.sm\:grid-cols-1, .grid-cols-4.sm\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  /* display toggles — restore the flow type at md+ (pairs with base `hidden`) */
  .md\:flex { display: flex; }
  .md\:inline-flex { display: inline-flex; }
  .md\:inline { display: inline; }
  .md\:grid { display: grid; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }

  .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\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1100px) {
  .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\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ============================================================
   Scrollbars
   ============================================================ */
* { scrollbar-width: thin; scrollbar-color: var(--m-border-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--m-border-strong); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #9aa6c0; }
*::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Blazor framework bits
   ============================================================ */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

#blazor-error-ui {
  background: #131a2c; color: #e9eef8;
  bottom: 0; left: 0; width: 100%;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
  display: none; padding: .8rem 1.4rem; position: fixed; z-index: 1100;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .75rem; }

.blazor-error-boundary {
  background: #b32121; padding: 1rem 1rem 1rem 3.7rem; color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* MudBlazor font alignment */
.mud-typography, .mud-input-root, .mud-button-root, .mud-nav-link, .mud-table {
  font-family: 'Plus Jakarta Sans', 'Nunito Sans', Inter, system-ui, sans-serif;
}

/* Global navigation progress bar (top of viewport). Driven by NavProgressState:
   appears on navigation and stays until the destination page's data finishes loading. */
.m-navprogress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 3000;
  overflow: hidden;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.m-navprogress.is-active { opacity: 1; }
.m-navprogress::before {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 45%;
  left: -45%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, rgba(47, 118, 246, 0), var(--m-brand) 45%, var(--m-brand-2));
  box-shadow: 0 0 8px rgba(124, 92, 255, 0.5);
}
.m-navprogress.is-active::before {
  animation: m-navprogress-slide 1.05s ease-in-out infinite;
}
@keyframes m-navprogress-slide {
  0%   { left: -45%; }
  100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .m-navprogress.is-active::before { animation: none; left: 0; width: 100%; opacity: .6; }
}
