.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

:root{
  /* Core tokens — keep in sync with MudBlazor palette above */
  --fs-primary: #198754;
  --fs-primary-dark: #146c43;
  --fs-secondary: #0d6efd;
  --fs-bg: #f4f6f8;
  --fs-surface: #ffffff;
  --fs-text: #111827;
  --fs-muted: #6b7280;
  --fs-border: #e5e7eb;
  --fs-radius: 8px;
  --fs-shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --fs-shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --fs-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-base-size: 16px;
}

/* Base typography */
html { font-size: var(--fs-base-size); }
body {
  font-family: var(--fs-font-family);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fs-text);
  background-color: var(--fs-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings for any non-Mud headings/CSS usage */
h1 { font-size: 2.25rem; font-weight: 600; margin: 0.5rem 0; }
h2 { font-size: 1.75rem; font-weight: 600; margin: 0.5rem 0; }
h3 { font-size: 1.375rem; font-weight: 600; margin: 0.5rem 0; }
h4 { font-size: 1.125rem; font-weight: 600; margin: 0.5rem 0; }
h5 { font-size: 1rem; font-weight: 600; margin: 0.5rem 0; }
h6 { font-size: 0.95rem; font-weight: 600; margin: 0.5rem 0; }

/* Improve code color and small UI elements */
code { color: var(--fs-secondary); background: rgba(13,110,253,0.05); padding: 0.125rem 0.25rem; border-radius: 4px; }

/* Use tokens in bespoke components */
.blazor-error-boundary {
  background: linear-gradient(90deg, rgba(179,33,33,0.08), rgba(179,33,33,0.05));
  padding: 1rem 1rem 1rem 3.7rem;
  color: #fff;
  background-color: #b32121;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.fs-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fs-page-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fs-text);
}

/* ── Stat card ───────────────────────────────────────────────────────────── */
.fs-stat-card {
  background: var(--fs-surface);
  border-radius: var(--fs-radius);
  padding: 1.25rem 1rem;
  box-shadow: var(--fs-shadow-sm);
  border: 1px solid var(--fs-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: box-shadow 0.15s ease;
}
.fs-stat-card:hover { box-shadow: var(--fs-shadow-md); }
.fs-stat-card .fs-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.fs-stat-card .fs-stat-label {
  font-size: 0.75rem;
  color: var(--fs-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── Stat card top-accent variants ──────────────────────────────────────── */
.fs-stat-card--primary   { border-top: 3px solid var(--mud-palette-primary)  !important; }
.fs-stat-card--info      { border-top: 3px solid var(--mud-palette-info)     !important; }
.fs-stat-card--success   { border-top: 3px solid var(--mud-palette-success)  !important; }
.fs-stat-card--warning   { border-top: 3px solid var(--mud-palette-warning)  !important; }
.fs-stat-card--error     { border-top: 3px solid var(--mud-palette-error)    !important; }

/* ── Quick-action card ───────────────────────────────────────────────────── */
.fs-quick-card {
  background: var(--fs-surface);
  border-radius: var(--fs-radius);
  padding: 1.25rem 1rem;
  box-shadow: var(--fs-shadow-sm);
  border: 1px solid var(--fs-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.fs-quick-card:hover {
  box-shadow: var(--fs-shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.fs-quick-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fs-text);
}
.fs-quick-card-desc {
  font-size: 0.72rem;
  color: var(--fs-muted);
}

/* ── Dashboard greeting ──────────────────────────────────────────────────── */
.fs-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fs-text);
}
.fs-greeting-sub {
  font-size: 0.85rem;
  color: var(--fs-muted);
  margin-top: 0.2rem;
}

/* ── Work item card accent border ───────────────────────────────────────── */
.fs-card-accent {
  border-left: 4px solid var(--fs-border) !important;
}
.fs-card-accent--pending  { border-left-color: #fbbf24 !important; }
.fs-card-accent--complete { border-left-color: var(--fs-primary) !important; }
.fs-card-accent--error    { border-left-color: var(--mud-palette-error) !important; }

/* ── Auth layout ─────────────────────────────────────────────────────────── */
.fs-auth-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 40%, #eff6ff 100%);
  padding: 1rem;
}
.fs-auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 12px !important;
  box-shadow: var(--fs-shadow-md) !important;
}
.fs-auth-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--fs-muted);
  text-align: center;
}

/* ── Nav drawer branding ─────────────────────────────────────────────────── */
.fs-drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.5rem;
}
.fs-nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.75rem 1rem 0.25rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #198754;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


/* ── Session timeout warning overlay ──────────────────────────────────────── */

.fs-session-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
    animation: fs-session-fade-in 0.2s ease;
}

.fs-session-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-warning-darken);
}

@keyframes fs-session-fade-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
