/*
 * Nexa UI — mobile-first CSS framework
 *
 * Breakpoints (min-width):
 *   sm  ≥ 576px
 *   md  ≥ 768px
 *   lg  ≥ 992px
 *   xl  ≥ 1200px
 */

/* ── Tokens ────────────────────────────────────────────── */

:root {
  color-scheme: light;

  /* Typography */
  --m-font:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --m-font-size-xs:   0.75rem;
  --m-font-size-sm:   0.875rem;
  --m-font-size-base: 1rem;
  --m-font-size-lg:   1.125rem;
  --m-font-size-xl:   1.25rem;

  /* Colors */
  --m-bg:             #f4f6f8;
  --m-surface:        #ffffff;
  --m-surface-soft:   #eef4f2;
  --m-surface-muted:  #f8fafc;
  --m-text:           #18212b;
  --m-text-muted:     #617080;
  --m-border:         #cbd6e0;

  --m-primary:        #0f766e;
  --m-primary-hover:  #115e59;
  --m-primary-soft:   #d9f3ef;
  --m-secondary:      #3f4f9f;

  --m-danger:         #b42318;
  --m-danger-hover:   #8f1d14;
  --m-danger-soft:    #fee4e2;
  --m-success:        #067647;
  --m-success-soft:   #dcfae6;
  --m-warning:        #b54708;
  --m-warning-soft:   #fef0c7;
  --m-info:           #175cd3;
  --m-info-soft:      #dbeafe;
  --m-focus:          #9ee8df;

  /* Spacing (4-point scale) */
  --m-space-1:  4px;
  --m-space-2:  8px;
  --m-space-3:  12px;
  --m-space-4:  16px;
  --m-space-5:  20px;
  --m-space-6:  24px;
  --m-space-8:  32px;
  --m-space-10: 40px;
  --m-space-12: 48px;

  /* Radius */
  --m-radius:    8px;
  --m-radius-sm: 4px;
  --m-radius-lg: 16px;
  --m-radius-xl: 24px;

  /* Shadows */
  --m-shadow-1: 0 1px 2px rgb(15 23 42 / 0.08);
  --m-shadow-2: 0 8px 24px rgb(15 23 42 / 0.12);
  --m-shadow-3: 0 16px 40px rgb(15 23 42 / 0.16);

  /* Z-index layers */
  --m-z-dropdown:    30;
  --m-z-drawer:      40;
  --m-z-dialog:      50;
  --m-z-toast:       60;
  --m-z-tooltip:     70;
  --m-z-appbar:      20;
  --m-z-bottomnav:   20;

  /* Safe areas (notch / Dynamic Island support) */
  --m-safe-top:    env(safe-area-inset-top, 0px);
  --m-safe-bottom: env(safe-area-inset-bottom, 0px);
  --m-safe-left:   env(safe-area-inset-left, 0px);
  --m-safe-right:  env(safe-area-inset-right, 0px);

  /* Mobile shell heights */
  --m-appbar-height:    56px;
  --m-bottomnav-height: 56px;
}

/* ── Dark mode ─────────────────────────────────────────── */

/*
 * Dark tokens — applied by system preference OR by [data-theme="dark"].
 * [data-theme="light"] forces light even when the system is dark.
 * useTheme() in nexa.js manages the attribute and localStorage.
 */

:root,
[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --m-bg:            #0f172a;
    --m-surface:       #1e293b;
    --m-surface-soft:  #162032;
    --m-surface-muted: #172032;
    --m-text:          #f1f5f9;
    --m-text-muted:    #94a3b8;
    --m-border:        #334155;

    --m-primary:       #2dd4bf;
    --m-primary-hover: #5eead4;
    --m-primary-soft:  #134e4a;

    --m-danger:        #f87171;
    --m-danger-hover:  #fca5a5;
    --m-danger-soft:   #450a0a;
    --m-success:       #4ade80;
    --m-success-soft:  #052e16;
    --m-warning:       #fbbf24;
    --m-warning-soft:  #431407;
    --m-info:          #60a5fa;
    --m-info-soft:     #0c1a3a;
    --m-focus:         #2dd4bf;

    --m-shadow-1: 0 1px 2px rgb(0 0 0 / 0.24);
    --m-shadow-2: 0 8px 24px rgb(0 0 0 / 0.32);
    --m-shadow-3: 0 16px 40px rgb(0 0 0 / 0.40);
  }
}

[data-theme="dark"] {
  color-scheme: dark;

  --m-bg:            #0f172a;
  --m-surface:       #1e293b;
  --m-surface-soft:  #162032;
  --m-surface-muted: #172032;
  --m-text:          #f1f5f9;
  --m-text-muted:    #94a3b8;
  --m-border:        #334155;

  --m-primary:       #2dd4bf;
  --m-primary-hover: #5eead4;
  --m-primary-soft:  #134e4a;

  --m-danger:        #f87171;
  --m-danger-hover:  #fca5a5;
  --m-danger-soft:   #450a0a;
  --m-success:       #4ade80;
  --m-success-soft:  #052e16;
  --m-warning:       #fbbf24;
  --m-warning-soft:  #431407;
  --m-info:          #60a5fa;
  --m-info-soft:     #0c1a3a;
  --m-focus:         #2dd4bf;

  --m-shadow-1: 0 1px 2px rgb(0 0 0 / 0.24);
  --m-shadow-2: 0 8px 24px rgb(0 0 0 / 0.32);
  --m-shadow-3: 0 16px 40px rgb(0 0 0 / 0.40);
}

[data-theme="light"] {
  color-scheme: light;

  --m-bg:             #f4f6f8;
  --m-surface:        #ffffff;
  --m-surface-soft:   #eef4f2;
  --m-surface-muted:  #f8fafc;
  --m-text:           #18212b;
  --m-text-muted:     #617080;
  --m-border:         #cbd6e0;

  --m-primary:        #0f766e;
  --m-primary-hover:  #115e59;
  --m-primary-soft:   #d9f3ef;

  --m-danger:         #b42318;
  --m-danger-hover:   #8f1d14;
  --m-danger-soft:    #fee4e2;
  --m-success:        #067647;
  --m-success-soft:   #dcfae6;
  --m-warning:        #b54708;
  --m-warning-soft:   #fef0c7;
  --m-info:           #175cd3;
  --m-info-soft:      #dbeafe;
  --m-focus:          #9ee8df;

  --m-shadow-1: 0 1px 2px rgb(15 23 42 / 0.08);
  --m-shadow-2: 0 8px 24px rgb(15 23 42 / 0.12);
  --m-shadow-3: 0 16px 40px rgb(15 23 42 / 0.16);
}

/* ── Reset ─────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font);
  font-size: var(--m-font-size-base);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* ── App wrapper ───────────────────────────────────────── */

.m-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--m-bg);
  color: var(--m-text);
}

/* ── Container ─────────────────────────────────────────── */

.m-container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--m-space-4);
}

@media (min-width: 576px) {
  .m-container { max-width: 540px; }
}

@media (min-width: 768px) {
  .m-container { max-width: 720px; }
}

@media (min-width: 992px) {
  .m-container { max-width: 960px; }
}

@media (min-width: 1200px) {
  .m-container { max-width: 1140px; }
}

.m-container-fluid {
  width: 100%;
  padding-inline: var(--m-space-4);
}

/* ── Grid (12 colunas) ─────────────────────────────────── */

.m-row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: calc(var(--m-space-3) * -1);
}

.m-row > * {
  padding-inline: var(--m-space-3);
}

/* Gutter variants */
.m-row-gap-0 { gap: 0; margin-inline: 0; }
.m-row-gap-0 > * { padding-inline: 0; }
.m-row-gap-2 { margin-inline: calc(var(--m-space-2) * -1); }
.m-row-gap-2 > * { padding-inline: var(--m-space-2); }
.m-row-gap-4 { margin-inline: calc(var(--m-space-4) * -1); }
.m-row-gap-4 > * { padding-inline: var(--m-space-4); }

/* Base columns (mobile, sem breakpoint) */
.m-col    { flex: 1 0 0%; }
.m-col-auto { flex: 0 0 auto; width: auto; }

.m-col-1  { flex: 0 0 auto; width: 8.3333%; }
.m-col-2  { flex: 0 0 auto; width: 16.6667%; }
.m-col-3  { flex: 0 0 auto; width: 25%; }
.m-col-4  { flex: 0 0 auto; width: 33.3333%; }
.m-col-5  { flex: 0 0 auto; width: 41.6667%; }
.m-col-6  { flex: 0 0 auto; width: 50%; }
.m-col-7  { flex: 0 0 auto; width: 58.3333%; }
.m-col-8  { flex: 0 0 auto; width: 66.6667%; }
.m-col-9  { flex: 0 0 auto; width: 75%; }
.m-col-10 { flex: 0 0 auto; width: 83.3333%; }
.m-col-11 { flex: 0 0 auto; width: 91.6667%; }
.m-col-12 { flex: 0 0 auto; width: 100%; }

/* sm ≥ 576px */
@media (min-width: 576px) {
  .m-col-sm    { flex: 1 0 0%; }
  .m-col-sm-auto { flex: 0 0 auto; width: auto; }
  .m-col-sm-1  { flex: 0 0 auto; width: 8.3333%; }
  .m-col-sm-2  { flex: 0 0 auto; width: 16.6667%; }
  .m-col-sm-3  { flex: 0 0 auto; width: 25%; }
  .m-col-sm-4  { flex: 0 0 auto; width: 33.3333%; }
  .m-col-sm-5  { flex: 0 0 auto; width: 41.6667%; }
  .m-col-sm-6  { flex: 0 0 auto; width: 50%; }
  .m-col-sm-7  { flex: 0 0 auto; width: 58.3333%; }
  .m-col-sm-8  { flex: 0 0 auto; width: 66.6667%; }
  .m-col-sm-9  { flex: 0 0 auto; width: 75%; }
  .m-col-sm-10 { flex: 0 0 auto; width: 83.3333%; }
  .m-col-sm-11 { flex: 0 0 auto; width: 91.6667%; }
  .m-col-sm-12 { flex: 0 0 auto; width: 100%; }
}

/* md ≥ 768px */
@media (min-width: 768px) {
  .m-col-md    { flex: 1 0 0%; }
  .m-col-md-auto { flex: 0 0 auto; width: auto; }
  .m-col-md-1  { flex: 0 0 auto; width: 8.3333%; }
  .m-col-md-2  { flex: 0 0 auto; width: 16.6667%; }
  .m-col-md-3  { flex: 0 0 auto; width: 25%; }
  .m-col-md-4  { flex: 0 0 auto; width: 33.3333%; }
  .m-col-md-5  { flex: 0 0 auto; width: 41.6667%; }
  .m-col-md-6  { flex: 0 0 auto; width: 50%; }
  .m-col-md-7  { flex: 0 0 auto; width: 58.3333%; }
  .m-col-md-8  { flex: 0 0 auto; width: 66.6667%; }
  .m-col-md-9  { flex: 0 0 auto; width: 75%; }
  .m-col-md-10 { flex: 0 0 auto; width: 83.3333%; }
  .m-col-md-11 { flex: 0 0 auto; width: 91.6667%; }
  .m-col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* lg ≥ 992px */
@media (min-width: 992px) {
  .m-col-lg    { flex: 1 0 0%; }
  .m-col-lg-auto { flex: 0 0 auto; width: auto; }
  .m-col-lg-1  { flex: 0 0 auto; width: 8.3333%; }
  .m-col-lg-2  { flex: 0 0 auto; width: 16.6667%; }
  .m-col-lg-3  { flex: 0 0 auto; width: 25%; }
  .m-col-lg-4  { flex: 0 0 auto; width: 33.3333%; }
  .m-col-lg-5  { flex: 0 0 auto; width: 41.6667%; }
  .m-col-lg-6  { flex: 0 0 auto; width: 50%; }
  .m-col-lg-7  { flex: 0 0 auto; width: 58.3333%; }
  .m-col-lg-8  { flex: 0 0 auto; width: 66.6667%; }
  .m-col-lg-9  { flex: 0 0 auto; width: 75%; }
  .m-col-lg-10 { flex: 0 0 auto; width: 83.3333%; }
  .m-col-lg-11 { flex: 0 0 auto; width: 91.6667%; }
  .m-col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* xl ≥ 1200px */
@media (min-width: 1200px) {
  .m-col-xl    { flex: 1 0 0%; }
  .m-col-xl-auto { flex: 0 0 auto; width: auto; }
  .m-col-xl-1  { flex: 0 0 auto; width: 8.3333%; }
  .m-col-xl-2  { flex: 0 0 auto; width: 16.6667%; }
  .m-col-xl-3  { flex: 0 0 auto; width: 25%; }
  .m-col-xl-4  { flex: 0 0 auto; width: 33.3333%; }
  .m-col-xl-5  { flex: 0 0 auto; width: 41.6667%; }
  .m-col-xl-6  { flex: 0 0 auto; width: 50%; }
  .m-col-xl-7  { flex: 0 0 auto; width: 58.3333%; }
  .m-col-xl-8  { flex: 0 0 auto; width: 66.6667%; }
  .m-col-xl-9  { flex: 0 0 auto; width: 75%; }
  .m-col-xl-10 { flex: 0 0 auto; width: 83.3333%; }
  .m-col-xl-11 { flex: 0 0 auto; width: 91.6667%; }
  .m-col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* ── Display utilities ─────────────────────────────────── */

.m-d-none   { display: none !important; }
.m-d-block  { display: block !important; }
.m-d-flex   { display: flex !important; }
.m-d-grid   { display: grid !important; }
.m-d-inline { display: inline !important; }
.m-d-inline-flex  { display: inline-flex !important; }
.m-d-inline-block { display: inline-block !important; }

@media (min-width: 576px) {
  .m-d-sm-none         { display: none !important; }
  .m-d-sm-block        { display: block !important; }
  .m-d-sm-flex         { display: flex !important; }
  .m-d-sm-grid         { display: grid !important; }
  .m-d-sm-inline       { display: inline !important; }
  .m-d-sm-inline-flex  { display: inline-flex !important; }
  .m-d-sm-inline-block { display: inline-block !important; }
}

@media (min-width: 768px) {
  .m-d-md-none         { display: none !important; }
  .m-d-md-block        { display: block !important; }
  .m-d-md-flex         { display: flex !important; }
  .m-d-md-grid         { display: grid !important; }
  .m-d-md-inline       { display: inline !important; }
  .m-d-md-inline-flex  { display: inline-flex !important; }
  .m-d-md-inline-block { display: inline-block !important; }
}

@media (min-width: 992px) {
  .m-d-lg-none         { display: none !important; }
  .m-d-lg-block        { display: block !important; }
  .m-d-lg-flex         { display: flex !important; }
  .m-d-lg-grid         { display: grid !important; }
  .m-d-lg-inline       { display: inline !important; }
  .m-d-lg-inline-flex  { display: inline-flex !important; }
  .m-d-lg-inline-block { display: inline-block !important; }
}

/* ── Flex utilities ────────────────────────────────────── */

.m-flex-row    { flex-direction: row !important; }
.m-flex-column { flex-direction: column !important; }
.m-flex-wrap   { flex-wrap: wrap !important; }
.m-flex-nowrap { flex-wrap: nowrap !important; }
.m-flex-grow   { flex-grow: 1 !important; }
.m-flex-shrink-0 { flex-shrink: 0 !important; }

.m-justify-start   { justify-content: flex-start !important; }
.m-justify-end     { justify-content: flex-end !important; }
.m-justify-center  { justify-content: center !important; }
.m-justify-between { justify-content: space-between !important; }
.m-justify-around  { justify-content: space-around !important; }

.m-align-start    { align-items: flex-start !important; }
.m-align-end      { align-items: flex-end !important; }
.m-align-center   { align-items: center !important; }
.m-align-baseline { align-items: baseline !important; }
.m-align-stretch  { align-items: stretch !important; }

/* ── Spacing utilities ─────────────────────────────────── */

/* Margin */
.m-m-0  { margin: 0 !important; }
.m-m-1  { margin: var(--m-space-1) !important; }
.m-m-2  { margin: var(--m-space-2) !important; }
.m-m-3  { margin: var(--m-space-3) !important; }
.m-m-4  { margin: var(--m-space-4) !important; }
.m-m-5  { margin: var(--m-space-5) !important; }
.m-m-6  { margin: var(--m-space-6) !important; }
.m-m-8  { margin: var(--m-space-8) !important; }
.m-m-auto { margin: auto !important; }

.m-mx-auto { margin-inline: auto !important; }
.m-mt-0 { margin-top: 0 !important; }
.m-mt-1 { margin-top: var(--m-space-1) !important; }
.m-mt-2 { margin-top: var(--m-space-2) !important; }
.m-mt-3 { margin-top: var(--m-space-3) !important; }
.m-mt-4 { margin-top: var(--m-space-4) !important; }
.m-mt-5 { margin-top: var(--m-space-5) !important; }
.m-mt-6 { margin-top: var(--m-space-6) !important; }
.m-mt-8 { margin-top: var(--m-space-8) !important; }

.m-mb-0 { margin-bottom: 0 !important; }
.m-mb-1 { margin-bottom: var(--m-space-1) !important; }
.m-mb-2 { margin-bottom: var(--m-space-2) !important; }
.m-mb-3 { margin-bottom: var(--m-space-3) !important; }
.m-mb-4 { margin-bottom: var(--m-space-4) !important; }
.m-mb-5 { margin-bottom: var(--m-space-5) !important; }
.m-mb-6 { margin-bottom: var(--m-space-6) !important; }
.m-mb-8 { margin-bottom: var(--m-space-8) !important; }

.m-ms-0 { margin-inline-start: 0 !important; }
.m-ms-1 { margin-inline-start: var(--m-space-1) !important; }
.m-ms-2 { margin-inline-start: var(--m-space-2) !important; }
.m-ms-3 { margin-inline-start: var(--m-space-3) !important; }
.m-ms-4 { margin-inline-start: var(--m-space-4) !important; }
.m-ms-auto { margin-inline-start: auto !important; }

.m-me-0 { margin-inline-end: 0 !important; }
.m-me-1 { margin-inline-end: var(--m-space-1) !important; }
.m-me-2 { margin-inline-end: var(--m-space-2) !important; }
.m-me-3 { margin-inline-end: var(--m-space-3) !important; }
.m-me-4 { margin-inline-end: var(--m-space-4) !important; }
.m-me-auto { margin-inline-end: auto !important; }

/* Padding */
.m-p-0  { padding: 0 !important; }
.m-p-1  { padding: var(--m-space-1) !important; }
.m-p-2  { padding: var(--m-space-2) !important; }
.m-p-3  { padding: var(--m-space-3) !important; }
.m-p-4  { padding: var(--m-space-4) !important; }
.m-p-5  { padding: var(--m-space-5) !important; }
.m-p-6  { padding: var(--m-space-6) !important; }
.m-p-8  { padding: var(--m-space-8) !important; }

.m-px-0 { padding-inline: 0 !important; }
.m-px-1 { padding-inline: var(--m-space-1) !important; }
.m-px-2 { padding-inline: var(--m-space-2) !important; }
.m-px-3 { padding-inline: var(--m-space-3) !important; }
.m-px-4 { padding-inline: var(--m-space-4) !important; }
.m-px-5 { padding-inline: var(--m-space-5) !important; }
.m-px-6 { padding-inline: var(--m-space-6) !important; }

.m-py-0 { padding-block: 0 !important; }
.m-py-1 { padding-block: var(--m-space-1) !important; }
.m-py-2 { padding-block: var(--m-space-2) !important; }
.m-py-3 { padding-block: var(--m-space-3) !important; }
.m-py-4 { padding-block: var(--m-space-4) !important; }
.m-py-5 { padding-block: var(--m-space-5) !important; }
.m-py-6 { padding-block: var(--m-space-6) !important; }

/* Gap */
.m-gap-0 { gap: 0 !important; }
.m-gap-1 { gap: var(--m-space-1) !important; }
.m-gap-2 { gap: var(--m-space-2) !important; }
.m-gap-3 { gap: var(--m-space-3) !important; }
.m-gap-4 { gap: var(--m-space-4) !important; }
.m-gap-5 { gap: var(--m-space-5) !important; }
.m-gap-6 { gap: var(--m-space-6) !important; }
.m-gap-8 { gap: var(--m-space-8) !important; }

/* ── Text utilities ─────────────────────────────────────── */

.m-text-start  { text-align: start !important; }
.m-text-center { text-align: center !important; }
.m-text-end    { text-align: end !important; }

@media (min-width: 576px) {
  .m-text-sm-start  { text-align: start !important; }
  .m-text-sm-center { text-align: center !important; }
  .m-text-sm-end    { text-align: end !important; }
}

@media (min-width: 768px) {
  .m-text-md-start  { text-align: start !important; }
  .m-text-md-center { text-align: center !important; }
  .m-text-md-end    { text-align: end !important; }
}

.m-text-xs   { font-size: var(--m-font-size-xs) !important; }
.m-text-sm   { font-size: var(--m-font-size-sm) !important; }
.m-text-base { font-size: var(--m-font-size-base) !important; }
.m-text-lg   { font-size: var(--m-font-size-lg) !important; }
.m-text-xl   { font-size: var(--m-font-size-xl) !important; }

.m-text-muted   { color: var(--m-text-muted) !important; }
.m-text-primary { color: var(--m-primary) !important; }
.m-text-danger  { color: var(--m-danger) !important; }
.m-text-success { color: var(--m-success) !important; }

.m-fw-normal { font-weight: 400 !important; }
.m-fw-medium { font-weight: 500 !important; }
.m-fw-bold   { font-weight: 700 !important; }
.m-fw-black  { font-weight: 900 !important; }

.m-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Width / height utilities ──────────────────────────── */

.m-w-full  { width: 100% !important; }
.m-w-auto  { width: auto !important; }
.m-h-full  { height: 100% !important; }
.m-min-w-0 { min-width: 0 !important; }

/* ── Misc layout ───────────────────────────────────────── */

.m-stack {
  display: grid;
  gap: var(--m-space-4);
}

.m-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--m-space-3);
}

.m-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-space-4);
}

.m-center {
  display: grid;
  place-items: center;
}

.m-section {
  display: grid;
  gap: var(--m-space-4);
}

/* Legacy grid helpers (kept for compatibility) */
.m-grid-2,
.m-grid-3,
.m-grid-4 {
  display: grid;
  gap: var(--m-space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .m-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .m-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .m-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .m-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Typography ────────────────────────────────────────── */

.m-eyebrow {
  margin: 0 0 var(--m-space-4);
  color: var(--m-text-muted);
  font-size: var(--m-font-size-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m-title-xl {
  margin: 0;
  font-size: clamp(2rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.m-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
}

.m-body {
  margin: var(--m-space-5) 0 0;
  color: var(--m-text-muted);
  font-size: var(--m-font-size-base);
  line-height: 1.6;
}

.m-body-on-primary { color: #c9f4ee; }

/* ── Page layout (legacy) ──────────────────────────────── */

.m-page {
  width: min(960px, calc(100% - var(--m-space-8)));
  margin: 0 auto;
  padding-block: var(--m-space-6);
}

@media (min-width: 768px) {
  .m-page {
    padding-block: var(--m-space-8);
  }
}

/* ── Card ──────────────────────────────────────────────── */

.m-card {
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-1);
}

.m-card-padded {
  padding: var(--m-space-4);
}

/* ── Form ──────────────────────────────────────────────── */

.m-form-field {
  display: grid;
  gap: var(--m-space-2);
  min-width: 0;
}

.m-form-row {
  display: grid;
  gap: var(--m-space-3);
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .m-form-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.m-label {
  display: inline-flex;
  align-items: center;
  gap: var(--m-space-1);
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  font-weight: 800;
}

.m-required { color: var(--m-danger); }

.m-help,
.m-error {
  margin: 0;
  font-size: var(--m-font-size-xs);
  line-height: 1.4;
}

.m-help  { color: var(--m-text-muted); }
.m-error { color: var(--m-danger); font-weight: 700; }

.m-field {
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  color: var(--m-text);
}

textarea.m-field {
  min-height: 112px;
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

.m-field::placeholder { color: var(--m-text-muted); }

.m-field:focus {
  border-color: var(--m-primary);
  outline: 3px solid var(--m-focus);
  outline-offset: 0;
}

.m-field-error,
.m-field-error:focus {
  border-color: var(--m-danger);
}

.m-checkbox {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.m-checkbox input {
  width: 20px;
  aspect-ratio: 1;
  accent-color: var(--m-primary);
}

.m-checkbox span { overflow-wrap: anywhere; }

.m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--m-space-2);
  justify-content: flex-end;
}

/* ── Button ────────────────────────────────────────────── */

.m-button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--m-space-4);
  border: 1px solid transparent;
  border-radius: var(--m-radius);
  background: transparent;
  color: var(--m-primary);
  font-size: var(--m-font-size-sm);
  font-weight: 800;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.m-button:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 2px;
}

.m-button:hover { background: var(--m-primary-soft); }

.m-button-contained {
  border-color: var(--m-primary);
  background: var(--m-primary);
  color: #ffffff;
}

.m-button-contained:hover {
  border-color: var(--m-primary-hover);
  background: var(--m-primary-hover);
}

.m-button-tonal {
  border-color: var(--m-primary-soft);
  background: var(--m-primary-soft);
  color: var(--m-primary-hover);
}

.m-button-tonal:hover {
  filter: brightness(0.94);
}

.m-button-danger {
  border-color: var(--m-danger);
  background: var(--m-danger);
  color: #ffffff;
}

.m-button-danger:hover {
  border-color: var(--m-danger-hover);
  background: var(--m-danger-hover);
}

.m-button-full { width: 100%; }

.m-icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

/* ── Chip ──────────────────────────────────────────────── */

.m-chip {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  font-weight: 700;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.m-chip:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 2px;
}

.m-chip-active {
  border-color: var(--m-primary);
  background: var(--m-primary);
  color: #ffffff;
}

/* ── Badge ─────────────────────────────────────────────── */

.m-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--m-primary-soft);
  color: var(--m-primary-hover);
  font-size: var(--m-font-size-xs);
  font-weight: 800;
}

/* ── Alert ─────────────────────────────────────────────── */

.m-alert {
  display: grid;
  gap: var(--m-space-1);
  padding: var(--m-space-4);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
}

.m-alert-title { font-size: var(--m-font-size-sm); }

.m-alert-body {
  color: var(--m-text-muted);
  line-height: 1.5;
}

.m-alert-info    { border-color: #93c5fd; background: var(--m-info-soft);    color: var(--m-info); }
.m-alert-success { border-color: #75e0a7; background: var(--m-success-soft); color: var(--m-success); }
.m-alert-warning { border-color: #fdb022; background: var(--m-warning-soft); color: var(--m-warning); }
.m-alert-danger  { border-color: #fda29b; background: var(--m-danger-soft);  color: var(--m-danger); }

/* ── List ──────────────────────────────────────────────── */

.m-list {
  display: grid;
  gap: var(--m-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.m-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--m-space-3);
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-1);
}

.m-list-item-muted {
  background: var(--m-surface-muted);
  color: var(--m-text-muted);
}

/* ── Status / empty ────────────────────────────────────── */

.m-status {
  margin: 0;
  color: var(--m-text-muted);
  font-size: var(--m-font-size-sm);
}

.m-empty-state {
  display: grid;
  justify-items: center;
  gap: var(--m-space-3);
  padding: var(--m-space-8);
  text-align: center;
}

.m-empty-state-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--m-primary-soft);
  color: var(--m-primary);
  font-weight: 900;
}

.m-empty-state h2,
.m-empty-state p { margin: 0; }

.m-empty-state h2 { font-size: var(--m-font-size-lg); }

.m-empty-state p,
.m-empty-state-body {
  max-width: 46ch;
  color: var(--m-text-muted);
  line-height: 1.5;
}

.m-empty-state-action { margin-top: var(--m-space-1); }

/* ── Tabs ──────────────────────────────────────────────── */

.m-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--m-space-1);
  padding: var(--m-space-1);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface-muted);
}

.m-tab {
  min-height: 36px;
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: calc(var(--m-radius) - 2px);
  background: transparent;
  color: var(--m-text-muted);
  font-size: var(--m-font-size-sm);
  font-weight: 800;
  touch-action: manipulation;
}

.m-tab:hover { color: var(--m-primary); }

.m-tab:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 2px;
}

.m-tab-active {
  border-color: var(--m-border);
  background: var(--m-surface);
  color: var(--m-primary);
  box-shadow: var(--m-shadow-1);
}

/* ── Progress ──────────────────────────────────────────── */

.m-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--m-primary-soft);
}

.m-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--m-primary);
  transition: width 220ms ease;
}

/* ── Spinner ───────────────────────────────────────────── */

.m-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--m-primary-soft);
  border-top-color: var(--m-primary);
  border-radius: 999px;
  animation: m-spin 800ms linear infinite;
}

@keyframes m-spin {
  to { transform: rotate(1turn); }
}

/* ── Enter animations ──────────────────────────────────────── */

@keyframes m-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes m-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes m-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes m-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes m-drawer-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes m-drawer-in-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .m-spinner { animation: none; }

  .m-dialog-backdrop,
  .m-dialog,
  .m-drawer-backdrop,
  .m-drawer-left,
  .m-drawer-right,
  .m-dropdown-menu,
  .m-toast,
  .m-bottom-sheet-backdrop,
  .m-bottom-sheet {
    animation: none;
  }
}

/* ── Table ─────────────────────────────────────────────── */

.m-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-1);
}

.m-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.m-table th,
.m-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--m-border);
  text-align: left;
  vertical-align: middle;
}

.m-table th {
  background: var(--m-surface-muted);
  color: var(--m-text-muted);
  font-size: var(--m-font-size-xs);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.m-table tbody tr:hover { background: var(--m-surface-muted); }
.m-table tbody tr:last-child td { border-bottom: 0; }
.m-table-cell-right { text-align: right; }

.m-table-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.m-table-th-sortable:hover { color: var(--m-primary); }

.m-table-th-sorted { color: var(--m-primary); }

.m-table-sort-icon {
  margin-inline-start: var(--m-space-1);
  font-size: var(--m-font-size-xs);
  opacity: 0.5;
}

.m-table-th-sorted .m-table-sort-icon { opacity: 1; }

/* ── Toast ─────────────────────────────────────────────── */

.m-toast {
  position: fixed;
  bottom: calc(var(--m-space-4) + var(--m-safe-bottom));
  right: var(--m-space-4);
  left: var(--m-space-4);
  z-index: var(--m-z-toast);
  animation: m-slide-up 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: var(--m-space-3);
  padding: var(--m-space-4);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-2);
}

@media (min-width: 576px) {
  .m-toast {
    left: auto;
    width: min(420px, calc(100vw - 32px));
  }
}

.m-toast-content {
  display: grid;
  gap: var(--m-space-1);
  min-width: 0;
}

.m-toast-content p {
  margin: 0;
  color: var(--m-text-muted);
  line-height: 1.45;
}

.m-toast-action { align-self: center; }

.m-toast-success { border-color: #75e0a7; }
.m-toast-warning { border-color: #fdb022; }
.m-toast-danger  { border-color: #fda29b; }

/* ── Dialog ────────────────────────────────────────────── */

.m-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--m-z-dialog);
  display: grid;
  place-items: end center;
  padding: 0;
  background: rgb(15 23 42 / 0.48);
  animation: m-fade-in 200ms ease both;
}

@media (min-width: 576px) {
  .m-dialog-backdrop {
    place-items: center;
    padding: var(--m-space-5);
  }
}

.m-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: calc(100dvh - var(--m-safe-top) - 24px);
  overflow: hidden;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-xl) var(--m-radius-xl) 0 0;
  background: var(--m-surface);
  box-shadow: var(--m-shadow-3);
  animation: m-sheet-in 280ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (min-width: 576px) {
  .m-dialog { animation-name: m-scale-in; animation-duration: 200ms; }
}

@media (min-width: 576px) {
  .m-dialog {
    width: min(560px, 100%);
    max-height: min(720px, calc(100dvh - 40px));
    border-radius: var(--m-radius);
  }
}

.m-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--m-space-3);
  padding: var(--m-space-4);
  border-bottom: 1px solid var(--m-border);
}

.m-dialog-header h2 {
  margin: 0;
  font-size: var(--m-font-size-lg);
}

.m-dialog-body {
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--m-space-4);
}

.m-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--m-space-2);
  justify-content: flex-end;
  padding: var(--m-space-4);
  border-top: 1px solid var(--m-border);
  background: var(--m-surface-muted);
}

/* ── Drawer ────────────────────────────────────────────── */

.m-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--m-z-drawer);
  background: rgb(15 23 42 / 0.48);
  animation: m-fade-in 200ms ease both;
}

.m-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: calc(var(--m-z-drawer) + 1);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--m-border);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-2);
}

.m-drawer-left  {
  left: 0;
  border-radius: 0 var(--m-radius) var(--m-radius) 0;
  animation: m-drawer-in-left 280ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.m-drawer-right {
  right: 0;
  border-radius: var(--m-radius) 0 0 var(--m-radius);
  animation: m-drawer-in-right 280ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.m-drawer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--m-space-3);
  padding: var(--m-space-4);
  padding-top: calc(var(--m-space-4) + var(--m-safe-top));
  border-bottom: 1px solid var(--m-border);
}

.m-drawer-header h2 {
  margin: 0;
  font-size: var(--m-font-size-lg);
}

.m-drawer-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--m-space-4);
  padding-bottom: calc(var(--m-space-4) + var(--m-safe-bottom));
}

/* ── Dropdown ──────────────────────────────────────────── */

.m-dropdown { position: relative; display: inline-block; }

.m-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  z-index: var(--m-z-dropdown);
  min-width: 180px;
  max-width: calc(100vw - var(--m-space-8));
  margin: 0;
  padding: var(--m-space-1);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-2);
  list-style: none;
  animation: m-slide-up 160ms ease both;
  transform-origin: top center;
}

.m-dropdown-menu-left  { left: 0; }
.m-dropdown-menu-right { right: 0; }

.m-dropdown-button {
  display: flex;
  align-items: center;
  gap: var(--m-space-2);
  width: 100%;
  min-height: 44px;
  padding: var(--m-space-2) var(--m-space-3);
  border: none;
  border-radius: calc(var(--m-radius) - 2px);
  background: transparent;
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  text-align: left;
  touch-action: manipulation;
}

.m-dropdown-button:hover { background: var(--m-surface-muted); }

.m-dropdown-button:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 1px;
}

.m-dropdown-button-danger { color: var(--m-danger); }
.m-dropdown-button-danger:hover { background: var(--m-danger-soft); }

.m-dropdown-divider {
  margin: var(--m-space-1) 0;
  border: none;
  border-top: 1px solid var(--m-border);
}

.m-dropdown-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* ── Tooltip ───────────────────────────────────────────── */

.m-tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.m-tooltip-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: var(--m-z-tooltip);
  padding: 5px 10px;
  border-radius: var(--m-radius-sm);
  background: #1e2a38;
  color: #f1f5f9;
  font-size: var(--m-font-size-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
}

.m-tooltip-wrap:hover::after,
.m-tooltip-wrap:focus-within::after { opacity: 1; }

.m-tooltip-top::after    { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
.m-tooltip-bottom::after { top: calc(100% + 6px);    left: 50%; transform: translateX(-50%); }
.m-tooltip-left::after   { right: calc(100% + 6px);  top: 50%;  transform: translateY(-50%); }
.m-tooltip-right::after  { left: calc(100% + 6px);   top: 50%;  transform: translateY(-50%); }

/* ── Pagination ────────────────────────────────────────── */

.m-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--m-space-1);
}

.m-pagination-item {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--m-space-2);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  font-weight: 700;
  touch-action: manipulation;
}

.m-pagination-item:hover:not(:disabled) {
  border-color: var(--m-primary);
  color: var(--m-primary);
}

.m-pagination-item-active {
  border-color: var(--m-primary);
  background: var(--m-primary);
  color: #ffffff;
}

.m-pagination-item-active:hover:not(:disabled) {
  border-color: var(--m-primary-hover);
  background: var(--m-primary-hover);
}

.m-pagination-ellipsis {
  padding: 0 var(--m-space-2);
  color: var(--m-text-muted);
  font-size: var(--m-font-size-sm);
}

/* ── Switch ────────────────────────────────────────────── */

.m-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--m-space-3);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.m-switch-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.m-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.m-switch-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--m-border);
  flex-shrink: 0;
  transition: background 150ms ease;
}

.m-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--m-shadow-1);
  transition: transform 150ms ease;
}

.m-switch-input:checked + .m-switch-track {
  background: var(--m-primary);
}

.m-switch-input:checked + .m-switch-track::after {
  transform: translateX(20px);
}

.m-switch-input:focus-visible + .m-switch-track {
  outline: 3px solid var(--m-focus);
  outline-offset: 2px;
}

.m-switch-label {
  font-size: var(--m-font-size-sm);
  font-weight: 700;
  color: var(--m-text);
}

/* ── Collapse ──────────────────────────────────────────── */

.m-collapse {
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  overflow: hidden;
}

.m-collapse-header {
  display: flex;
  align-items: center;
  gap: var(--m-space-2);
  width: 100%;
  min-height: 48px;
  padding: var(--m-space-3) var(--m-space-4);
  border: none;
  background: transparent;
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.m-collapse-header:hover { background: var(--m-surface-muted); }

.m-collapse-header:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: -3px;
}

.m-collapse-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--m-text-muted);
}

.m-collapse-chevron::after {
  content: "▾";
  font-size: 14px;
  display: inline-block;
  transform: rotate(-90deg);
  transition: transform 200ms ease;
}

.m-collapse-open .m-collapse-chevron::after {
  transform: rotate(0deg);
}

.m-collapse-title {
  flex: 1;
  min-width: 0;
}

.m-collapse-badge { flex-shrink: 0; }

.m-collapse-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--m-space-1);
  margin-inline-start: auto;
}

.m-collapse-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}

.m-collapse-open .m-collapse-body-wrap {
  grid-template-rows: 1fr;
}

.m-collapse-body-inner { overflow: hidden; }

.m-collapse-body {
  border-top: 1px solid var(--m-border);
  padding: var(--m-space-4);
}

/* ── Navbar ────────────────────────────────────────────── */

.m-navbar {
  display: flex;
  align-items: center;
  gap: var(--m-space-4);
  min-height: 60px;
  padding: 0 var(--m-space-4);
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
  box-shadow: var(--m-shadow-1);
}

@media (min-width: 768px) {
  .m-navbar { padding: 0 var(--m-space-6); }
}

.m-navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--m-space-3);
  flex-shrink: 0;
}

.m-navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--m-space-1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.m-navbar-link {
  display: inline-flex;
  align-items: center;
  gap: var(--m-space-2);
  min-height: 36px;
  padding: 0 var(--m-space-3);
  border-radius: var(--m-radius);
  color: var(--m-text-muted);
  font-size: var(--m-font-size-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease;
}

.m-navbar-link:hover {
  color: var(--m-text);
  background: var(--m-surface-muted);
}

.m-navbar-link-active {
  color: var(--m-primary);
  background: var(--m-primary-soft);
}

.m-navbar-link-icon { font-size: 1rem; }

.m-navbar-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--m-space-2);
  flex-shrink: 0;
}

/* ── Combobox ──────────────────────────────────────────── */

.m-combobox { position: relative; }

.m-combobox-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-space-2);
  cursor: pointer;
  text-align: left;
}

.m-combobox-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-combobox-placeholder { color: var(--m-text-muted); }

.m-combobox-chevron {
  color: var(--m-text-muted);
  flex-shrink: 0;
  font-size: 12px;
}

.m-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: var(--m-z-dropdown);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-2);
  overflow: hidden;
  animation: m-slide-up 160ms ease both;
}

.m-combobox-search-wrap {
  padding: var(--m-space-2);
  border-bottom: 1px solid var(--m-border);
}

.m-combobox-search {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-sm);
  background: var(--m-bg);
  color: var(--m-text);
  font: inherit;
  font-size: var(--m-font-size-sm);
}

.m-combobox-search:focus {
  border-color: var(--m-primary);
  outline: 2px solid var(--m-focus);
  outline-offset: 0;
}

.m-combobox-list {
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: var(--m-space-1);
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.m-combobox-option {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: var(--m-space-2) var(--m-space-3);
  border-radius: calc(var(--m-radius) - 2px);
  font-size: var(--m-font-size-sm);
  cursor: pointer;
}

.m-combobox-option:hover { background: var(--m-surface-muted); }

.m-combobox-option-selected {
  background: var(--m-primary-soft);
  color: var(--m-primary);
  font-weight: 700;
}

.m-combobox-empty {
  padding: var(--m-space-4);
  text-align: center;
  color: var(--m-text-muted);
  font-size: var(--m-font-size-sm);
  list-style: none;
}

/* ── ContextMenu ───────────────────────────────────────── */

.m-context-menu {
  position: fixed;
  z-index: var(--m-z-dropdown);
  min-width: 160px;
  max-width: 240px;
  margin: 0;
  padding: var(--m-space-1);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
  box-shadow: var(--m-shadow-2);
  list-style: none;
  animation: m-scale-in 140ms ease both;
  transform-origin: top left;
}

.m-context-menu-item { list-style: none; }

.m-context-menu-button {
  display: flex;
  align-items: center;
  gap: var(--m-space-2);
  width: 100%;
  min-height: 36px;
  padding: var(--m-space-2) var(--m-space-3);
  border: none;
  border-radius: calc(var(--m-radius) - 2px);
  background: transparent;
  color: var(--m-text);
  font-size: var(--m-font-size-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.m-context-menu-button:hover { background: var(--m-surface-muted); }

.m-context-menu-button:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 1px;
}

.m-context-menu-button-danger { color: var(--m-danger); }
.m-context-menu-button-danger:hover { background: var(--m-danger-soft); }

.m-context-menu-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.m-context-menu-divider {
  margin: var(--m-space-1) 0;
  border: none;
  border-top: 1px solid var(--m-border);
}

/* ── FileDropZone ──────────────────────────────────────── */

.m-file-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--m-space-3);
  min-height: 140px;
  padding: var(--m-space-6);
  border: 2px dashed var(--m-border);
  border-radius: var(--m-radius-lg);
  background: var(--m-surface);
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.m-file-dropzone:hover {
  border-color: var(--m-primary);
  background: var(--m-primary-soft);
}

.m-file-dropzone-disabled {
  opacity: 0.56;
  cursor: not-allowed;
  pointer-events: none;
}

.m-file-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.m-file-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--m-space-2);
  pointer-events: none;
}

.m-file-dropzone-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--m-primary-soft);
  color: var(--m-primary);
  font-size: 20px;
  font-weight: 700;
}

.m-file-dropzone-label {
  margin: 0;
  font-size: var(--m-font-size-sm);
  font-weight: 700;
  color: var(--m-text);
}

.m-file-dropzone-hint {
  margin: 0;
  font-size: var(--m-font-size-xs);
  color: var(--m-text-muted);
}

.m-file-dropzone-progress {
  width: 100%;
  pointer-events: none;
}

/* ── CodeEditor ────────────────────────────────────────── */

.m-code-editor {
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  overflow: hidden;
  background: var(--m-surface);
}

.m-dialog-header-draggable {
  cursor: grab;
}

.m-dialog-header-draggable:active {
  cursor: grabbing;
}

.m-code-editor-fallback {
  min-height: 200px;
  height: 200px;
  padding: var(--m-space-3) var(--m-space-4);
  resize: vertical;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: var(--m-font-size-sm);
  line-height: 1.6;
}

.m-code-editor .CodeMirror,
.m-code-editor .CodeMirror-scroll {
  height: 100%;
  min-height: 200px;
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
  font-size: var(--m-font-size-sm);
}

/* ── ToastStack ────────────────────────────────────────── */

.m-toast-stack {
  position: fixed;
  bottom: calc(var(--m-space-4) + var(--m-safe-bottom));
  right: var(--m-space-4);
  left: var(--m-space-4);
  z-index: var(--m-z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--m-space-2);
  pointer-events: none;
}

.m-toast-stack > * {
  position: static;
  bottom: auto;
  right: auto;
  left: auto;
  pointer-events: auto;
}

@media (min-width: 576px) {
  .m-toast-stack {
    left: auto;
    width: min(420px, calc(100vw - 32px));
  }
}

/* ── Dialog size variants ──────────────────────────────── */

@media (min-width: 576px) {
  .m-dialog-sm   { width: min(400px, 100%); }
  .m-dialog-lg   { width: min(720px, 100%); max-height: min(80dvh, 100%); }
  .m-dialog-xl   { width: min(900px, 100%); max-height: min(85dvh, 100%); }
  .m-dialog-full {
    width: calc(100% - var(--m-space-8));
    max-height: calc(100dvh - var(--m-space-8));
  }
}

/* ── App shell (desktop) ───────────────────────────────── */

.m-app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--m-bg);
}

@media (min-width: 992px) {
  .m-app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

.m-sidebar {
  display: none;
  align-content: start;
  gap: var(--m-space-5);
  padding: var(--m-space-5);
  border-right: 1px solid var(--m-border);
  background: var(--m-surface);
}

@media (min-width: 992px) {
  .m-sidebar { display: grid; }
}

.m-topbar {
  position: sticky;
  top: 0;
  z-index: var(--m-z-appbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-space-4);
  min-height: 64px;
  padding: 0 var(--m-space-4);
  padding-top: var(--m-safe-top);
  border-bottom: 1px solid var(--m-border);
  background: rgb(var(--m-surface) / 0.92);
  backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .m-topbar { padding-inline: var(--m-space-6); }
}

.m-content {
  min-width: 0;
  padding: var(--m-space-4);
}

@media (min-width: 768px) {
  .m-content { padding: var(--m-space-6); }
}

/* ── Mobile App Bar ────────────────────────────────────── */

.m-app-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--m-z-appbar);
  display: flex;
  align-items: center;
  gap: var(--m-space-2);
  height: calc(var(--m-appbar-height) + var(--m-safe-top));
  padding-top: var(--m-safe-top);
  padding-inline: var(--m-space-2);
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
  box-shadow: var(--m-shadow-1);
}

.m-app-bar-title {
  flex: 1;
  margin: 0;
  font-size: var(--m-font-size-lg);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-app-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--m-space-1);
  flex-shrink: 0;
}

/* Offset content below app bar */
.m-app-bar-offset {
  height: calc(var(--m-appbar-height) + var(--m-safe-top));
}

/* ── Bottom Navigation ─────────────────────────────────── */

.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--m-z-bottomnav);
  display: flex;
  background: var(--m-surface);
  border-top: 1px solid var(--m-border);
  box-shadow: 0 -2px 8px rgb(15 23 42 / 0.06);
  padding-bottom: var(--m-safe-bottom);
}

.m-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--m-bottomnav-height);
  padding: 8px var(--m-space-1);
  border: none;
  background: transparent;
  color: var(--m-text-muted);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
  cursor: pointer;
  transition: color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.m-bottom-nav-item:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: -3px;
}

.m-bottom-nav-item-active {
  color: var(--m-primary);
}

.m-bottom-nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  transition: background 150ms ease;
}

.m-bottom-nav-item-active .m-bottom-nav-icon {
  background: var(--m-primary-soft);
}

.m-bottom-nav-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--m-danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Offset content above bottom nav */
.m-bottom-nav-offset {
  height: calc(var(--m-bottomnav-height) + var(--m-safe-bottom));
}

/* ── Bottom Sheet ──────────────────────────────────────── */

.m-bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--m-z-drawer);
  background: rgb(15 23 42 / 0.48);
  animation: m-fade-in 200ms ease both;
}

.m-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--m-z-drawer) + 1);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(92dvh - var(--m-safe-top));
  overflow: hidden;
  background: var(--m-surface);
  border-radius: var(--m-radius-xl) var(--m-radius-xl) 0 0;
  box-shadow: var(--m-shadow-3);
  padding-bottom: var(--m-safe-bottom);
  animation: m-sheet-in 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (min-width: 768px) {
  .m-bottom-sheet {
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 100%);
    border-radius: var(--m-radius-xl);
    bottom: var(--m-space-6);
    animation-name: m-scale-in;
    animation-duration: 220ms;
  }
}

.m-bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding-top: var(--m-space-3);
  padding-bottom: var(--m-space-2);
  cursor: grab;
}

.m-bottom-sheet-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--m-border);
}

.m-bottom-sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--m-space-3);
  padding: var(--m-space-2) var(--m-space-4) var(--m-space-4);
}

.m-bottom-sheet-header h2 {
  margin: 0;
  font-size: var(--m-font-size-lg);
}

.m-bottom-sheet-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--m-space-4) var(--m-space-4);
}

/* ── FAB (Floating Action Button) ──────────────────────── */

.m-fab {
  position: fixed;
  bottom: calc(var(--m-space-5) + var(--m-safe-bottom));
  right: calc(var(--m-space-5) + var(--m-safe-right));
  z-index: calc(var(--m-z-bottomnav) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--m-space-2);
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--m-primary);
  color: #ffffff;
  box-shadow: var(--m-shadow-2);
  font-size: var(--m-font-size-xl);
  font-weight: 800;
  touch-action: manipulation;
  cursor: pointer;
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.m-fab:hover {
  background: var(--m-primary-hover);
  box-shadow: var(--m-shadow-3);
}

.m-fab:active {
  transform: scale(0.94);
}

.m-fab:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 3px;
}

/* Extended FAB (with label) */
.m-fab-extended {
  width: auto;
  padding: 0 var(--m-space-5);
  border-radius: 999px;
  font-size: var(--m-font-size-sm);
}

/* FAB with bottom nav — shift up */
.m-fab-above-nav {
  bottom: calc(var(--m-bottomnav-height) + var(--m-safe-bottom) + var(--m-space-4));
}

/* ── Brand ─────────────────────────────────────────────── */

.m-brand {
  display: flex;
  align-items: center;
  gap: var(--m-space-3);
}

.m-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: var(--m-radius);
  background: var(--m-surface);
  flex-shrink: 0;
}

.m-brand-mark img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.m-brand .m-eyebrow { margin: 0; }

/* ── Drag & Drop ───────────────────────────────────────── */

.m-draggable {
  cursor: grab;
  touch-action: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.m-draggable:active { cursor: grabbing; }

.m-dragging {
  opacity: 0.48;
  transform: scale(0.98);
}

.m-dropzone {
  border-color: var(--m-border);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.m-dropzone-active {
  border-color: var(--m-primary);
  background: var(--m-primary-soft);
  box-shadow: var(--m-shadow-2);
}

/* ── Board ─────────────────────────────────────────────── */

.m-responsive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--m-space-4);
  align-items: start;
}

@media (min-width: 768px) {
  .m-responsive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.m-board-column {
  display: grid;
  gap: var(--m-space-3);
  min-height: 220px;
  padding: 14px;
}

@media (min-width: 768px) {
  .m-board-column { min-height: 360px; }
}

.m-board-column-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--m-space-3);
  align-items: start;
}

.m-board-column-header h2,
.m-board-column-header p,
.m-board-card p { margin: 0; }

.m-board-column-header h2 {
  font-size: var(--m-font-size-lg);
  line-height: 1.2;
}

.m-board-column-header p {
  margin-top: var(--m-space-1);
  color: var(--m-text-muted);
  font-size: 0.9rem;
}

.m-board-card { grid-template-columns: 1fr; align-items: stretch; }
.m-board-card p { overflow-wrap: anywhere; line-height: 1.45; }

/* ── SwipeableListItem ─────────────────────────────────── */

.m-swipeable {
  position: relative;
  overflow: hidden;
  border-radius: var(--m-radius);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.m-swipeable-track {
  position: relative;
  z-index: 1;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.m-swipeable-swiping {
  transition: none;
}

.m-swipeable-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  z-index: 0;
}

.m-swipeable-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
  border: none;
  background: var(--m-danger);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 150ms ease;
}

.m-swipeable-action:hover { filter: brightness(1.1); }
.m-swipeable-action:active { filter: brightness(0.9); }

.m-swipeable-action-success { background: var(--m-success); }
.m-swipeable-action-warning { background: var(--m-warning); }
.m-swipeable-action-info    { background: var(--m-info); }

@media (prefers-reduced-motion: reduce) {
  .m-swipeable-track { transition: none; }
}

/* ── Tabs ────────────────────────────────────────────────────────────────────── */

.m-tabs { display: flex; flex-direction: column; }

.m-tabs-list {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--m-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.m-tabs-list::-webkit-scrollbar { display: none; }

.m-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--m-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}

.m-tab:hover:not(:disabled)     { color: var(--m-text); }
.m-tab-active                   { color: var(--m-primary); border-bottom-color: var(--m-primary); }
.m-tab-disabled                 { opacity: 0.45; cursor: not-allowed; }
.m-tab-icon                     { line-height: 1; }

/* pills variant */
.m-tabs-pills .m-tabs-list      { border-bottom: none; gap: 4px; padding: 4px; background: var(--m-surface); border-radius: var(--m-radius-lg); width: fit-content; }
.m-tabs-pills .m-tab            { border-bottom: none; border-radius: var(--m-radius); }
.m-tabs-pills .m-tab-active     { background: var(--m-primary); color: #fff; }

.m-tab-panel { padding: var(--m-space-4) 0; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */

.m-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.m-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: none;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  font: inherit;
  font-size: 0.875rem;
  color: var(--m-text);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.m-page-btn:hover:not(:disabled) { background: var(--m-surface-raised); border-color: var(--m-primary); }
.m-page-btn:disabled              { opacity: 0.4; cursor: not-allowed; }
.m-page-btn-active                { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 700; }
.m-page-ellipsis                  { display: inline-flex; align-items: center; padding: 0 4px; color: var(--m-text-muted); }

/* ── Stepper ─────────────────────────────────────────────────────────────────── */

.m-stepper {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 0;
}

.m-stepper-horizontal { flex-direction: row; align-items: flex-start; }
.m-stepper-vertical   { flex-direction: column; }

.m-step {
  display: flex;
  align-items: flex-start;
  position: relative;
  flex: 1;
  min-width: 0;
}

.m-stepper-horizontal .m-step { flex-direction: column; align-items: center; text-align: center; }
.m-stepper-vertical   .m-step { flex-direction: row;    gap: 12px; padding-bottom: 24px; }

.m-step-indicator {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem; font-weight: 700;
  border: 2px solid var(--m-border);
  background: var(--m-surface);
  color: var(--m-text-muted);
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.m-step-done    .m-step-indicator { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.m-step-current .m-step-indicator { border-color: var(--m-primary); color: var(--m-primary); }

.m-step-check  { font-size: 1rem; }
.m-step-number { }

.m-step-content { display: flex; flex-direction: column; gap: 2px; padding: var(--m-space-2) 0 0; }
.m-stepper-vertical .m-step-content { padding: 4px 0 0; }

.m-step-label { font-size: 0.875rem; font-weight: 600; color: var(--m-text); }
.m-step-desc  { font-size: 0.75rem; color: var(--m-text-muted); }

.m-step-done    .m-step-label { color: var(--m-text-muted); }
.m-step-current .m-step-label { color: var(--m-primary); }

/* Connecting line */
.m-step-line {
  flex: 1;
  background: var(--m-border);
  transition: background 200ms ease;
}

.m-stepper-horizontal .m-step-line { height: 2px; align-self: flex-start; margin-top: 15px; }
.m-stepper-vertical   .m-step-line {
  display: none; /* drawn via ::before on the indicator column */
}

.m-stepper-vertical .m-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px; top: 36px; bottom: 0;
  width: 2px;
  background: var(--m-border);
}

.m-stepper-vertical .m-step-done::before { background: var(--m-primary); }
