/* =============================================================================
   mycommercialista — Design system (ported from Claude Design handoff)
   Primary: yellow #F5C518 (accent) · Cool slate neutrals · Teal secondary
   Type: Plus Jakarta Sans + JetBrains Mono
   ============================================================================ */

:root {
  /* —— Brand —— */
  --yellow-50:  #FEFBEA;
  --yellow-100: #FDF3C2;
  --yellow-200: #FCE992;
  --yellow-300: #FADC5F;
  --yellow-400: #F8CE34;
  --yellow-500: #F5C518;  /* PRIMARY */
  --yellow-600: #DDAE0A;
  --yellow-700: #B08600;
  --yellow-800: #7E6100;
  --yellow-900: #4D3B00;

  /* —— Cool neutrals (slate w/ light blue bias) —— */
  --slate-0:   #FFFFFF;
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-150: #E8EEF5;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #0B1220;

  /* —— Cool secondary accent (teal) —— */
  --teal-50:  #ECFEFF;
  --teal-100: #CFFAFE;
  --teal-200: #A5F3FC;
  --teal-300: #67E8F9;
  --teal-400: #22D3EE;
  --teal-500: #06B6D4;
  --teal-600: #0891B2;
  --teal-700: #0E7C86;  /* secondary brand */
  --teal-800: #155E75;
  --teal-900: #164E63;

  /* —— Semantic —— */
  --success-50:  #ECFDF5;
  --success-100: #D1FAE5;
  --success-500: #10B981;
  --success-600: #16A34A;
  --success-700: #15803D;

  --warning-50:  #FFFBEB;
  --warning-100: #FEF3C7;
  --warning-500: #F59E0B;
  --warning-600: #D97706;
  --warning-700: #B45309;

  --danger-50:  #FEF2F2;
  --danger-100: #FEE2E2;
  --danger-500: #EF4444;
  --danger-600: #DC2626;
  --danger-700: #B91C1C;

  --info-50:  #EFF6FF;
  --info-100: #DBEAFE;
  --info-500: #3B82F6;
  --info-600: #2563EB;
  --info-700: #1D4ED8;

  /* —— Surface roles —— */
  --bg-app:        var(--slate-50);
  --bg-surface:    var(--slate-0);
  --bg-raised:     var(--slate-0);
  --bg-muted:      var(--slate-100);
  --bg-sunken:     var(--slate-150);
  --border-hair:   var(--slate-200);
  --border-strong: var(--slate-300);

  --text-primary:   var(--slate-900);
  --text-secondary: var(--slate-600);
  --text-tertiary:  var(--slate-500);
  --text-muted:     var(--slate-400);
  --text-onyellow:  var(--slate-900);
  --text-ondark:    var(--slate-0);

  /* —— Radii —— */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* —— Shadows (cool-tinted, multi-layer, Geex-ish) —— */
  --shadow-xs:   0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md:   0 2px 4px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg:   0 4px 8px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-xl:   0 8px 16px rgba(15, 23, 42, 0.06), 0 24px 48px rgba(15, 23, 42, 0.10);
  --shadow-pop:  0 10px 30px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-focus-yellow: 0 0 0 3px rgba(245, 197, 24, 0.30);
  --shadow-focus-teal:   0 0 0 3px rgba(14, 124, 134, 0.25);

  /* —— Spacing scale (4px base) —— */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* —— Typography —— */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 13px;
  --fs-md:   14px;
  --fs-lg:   16px;
  --fs-xl:   18px;
  --fs-2xl:  22px;
  --fs-3xl:  28px;
  --fs-4xl:  34px;
  --fs-5xl:  44px;

  --lh-tight: 1.2;
  --lh-snug:  1.35;
  --lh-base:  1.5;
  --lh-loose: 1.7;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;

  --letter-tight: -0.02em;
  --letter-snug:  -0.01em;
  --letter-wide:  0.04em;

  /* —— Motion —— */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  /* —— Z layers —— */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-drawer:   300;
  --z-modal:    400;
  --z-toast:    500;
  --z-debug:    900;

  /* —— Component sizing —— */
  --sidebar-w: 252px;
  --topbar-h:  64px;
}

/* —— Base reset —— */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; }

/* —— Typography utilities —— */
.t-display { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); letter-spacing: var(--letter-tight); line-height: var(--lh-tight); }
.t-h1 { font-size: var(--fs-3xl); font-weight: var(--fw-bold); letter-spacing: var(--letter-tight); line-height: var(--lh-tight); }
.t-h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--letter-snug); line-height: var(--lh-snug); }
.t-h3 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--letter-snug); line-height: var(--lh-snug); }
.t-h4 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.t-body { font-size: var(--fs-base); font-weight: var(--fw-regular); }
.t-md   { font-size: var(--fs-md); }
.t-sm   { font-size: var(--fs-sm); }
.t-xs   { font-size: var(--fs-xs); }
.t-eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--letter-wide); text-transform: uppercase; color: var(--text-tertiary); }
.t-mono { font-family: var(--font-mono); letter-spacing: 0; font-feature-settings: "tnum" 1, "zero" 1; }
.t-tnum { font-variant-numeric: tabular-nums; }
.t-muted { color: var(--text-tertiary); }
.t-sec { color: var(--text-secondary); }

/* —— Scrollbar (subtle) —— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-300); background-clip: padding-box; }

/* —— Selection —— */
::selection { background: var(--yellow-200); color: var(--slate-900); }

/* —— Focus —— */
/* <FocusOnNavigate Selector="h1"> sposta il focus sull'h1 (tabindex=-1) a ogni
   navigazione: senza questo reset il browser disegna un riquadro sul titolo.
   Manteniamo invece il focus ring sugli elementi realmente interattivi. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* =============================================================================
   App shell — Sidebar + Topbar
   ============================================================================ */
.mc-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--bg-app);
}

.mc-sidebar {
  background: #fff;
  border-right: 1px solid var(--slate-150);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.mc-sidebar__brand {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--slate-100);
}
.mc-sidebar__studio {
  padding: 14px 16px;
  margin: 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-150);
  border-radius: var(--radius-md);
}
.mc-sidebar__studio-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.mc-sidebar__studio-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.mc-sidebar__studio-name .mud-icon-root { color: var(--yellow-600); font-size: 16px; }

.mc-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}
.mc-sidebar__section { margin-bottom: 18px; }
.mc-sidebar__section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 10px 6px;
}

.mc-navlink {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0;
  color: var(--slate-600);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-align: left;
  position: relative;
  text-decoration: none;
}
.mc-navlink:hover { background: var(--slate-50); color: var(--slate-900); }
.mc-navlink .mud-icon-root { font-size: 18px; flex-shrink: 0; }
.mc-navlink__label { flex: 1; }
.mc-navlink__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
}
.mc-navlink.is-active {
  background: var(--slate-900);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.mc-navlink.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--yellow-500);
  border-radius: 0 3px 3px 0;
}
.mc-navlink.is-active .mc-navlink__badge {
  background: var(--yellow-500);
  color: var(--slate-900);
}
.mc-navlink.is-active .mud-icon-root { color: var(--yellow-500); }

.mc-sidebar__footer {
  padding: 12px;
  border-top: 1px solid var(--slate-100);
}
.mc-sidebar__plan {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.mc-sidebar__plan::after {
  content: '';
  position: absolute;
  width: 60px; height: 60px;
  background: var(--yellow-500);
  border-radius: 50%;
  top: -20px; right: -20px;
  opacity: 0.18;
}
.mc-sidebar__plan-title {
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.mc-sidebar__plan-meta {
  font-size: 11px;
  color: var(--slate-300);
  margin-top: 2px;
}

.mc-main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.mc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(8px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid transparent;
  gap: 16px;
}
.mc-topbar__left { flex: 1; min-width: 0; }
.mc-topbar__titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.mc-topbar__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--letter-tight);
  line-height: 1.15;
  margin: 0;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mc-topbar__subtitle {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mc-topbar__right { display: flex; align-items: center; gap: 10px; }
.mc-topbar__bell {
  width: 40px; height: 40px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
  cursor: pointer;
  position: relative;
  transition: all var(--dur-fast) var(--ease-out);
}
.mc-topbar__bell:hover { border-color: var(--slate-300); color: var(--slate-900); }
.mc-topbar__bell-dot {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--yellow-500);
  color: var(--slate-900);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 999px;
  border: 2px solid var(--bg-app);
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mc-topbar__divider { width: 1px; height: 24px; background: var(--slate-200); margin: 0 4px; }
.mc-topbar__user {
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.mc-topbar__user:hover { background: var(--slate-100); }
.mc-topbar__user-info { text-align: left; line-height: 1.2; }
.mc-topbar__user-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.mc-topbar__user-role { font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }
.mc-topbar__avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--teal-700);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.mc-logout-btn {
  background: #fff;
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-xs);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.mc-logout-btn:hover { border-color: var(--slate-300); background: var(--slate-50); }

.mc-content { flex: 1; padding: 8px 32px 48px; min-width: 0; }

/* —— Logo —— */
.mc-logo { display: inline-flex; align-items: center; gap: 10px; }
.mc-logo__mark {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--slate-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 32px; height: 32px;
}
.mc-logo__mark-yellow {
  position: absolute;
  width: 70%; height: 70%;
  background: var(--yellow-500);
  border-radius: 50%;
  bottom: -25%;
  right: -25%;
}
.mc-logo__mark-dot {
  position: absolute;
  width: 18%; height: 18%;
  background: var(--slate-0);
  border-radius: 50%;
  top: 22%;
  left: 22%;
}
.mc-logo__wordmark { line-height: 1; }
.mc-logo__name { font-weight: 800; letter-spacing: -0.025em; font-size: 15px; }
.mc-logo__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* —— Badge —— */
.mc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  padding: 4px 10px;
  font-size: var(--fs-sm);
}
.mc-badge--neutral  { background: var(--slate-100); color: var(--slate-700); }
.mc-badge--info     { background: var(--info-50);    color: var(--info-700); }
.mc-badge--success  { background: var(--success-50); color: var(--success-700); }
.mc-badge--warning  { background: var(--warning-50); color: var(--warning-700); }
.mc-badge--danger   { background: var(--danger-50);  color: var(--danger-700); }
.mc-badge--teal     { background: var(--teal-50);    color: var(--teal-700); }
.mc-badge--yellow   { background: var(--yellow-100); color: var(--yellow-800); }

/* —— Utility layout —— */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.space-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--slate-150); }

/* —— Responsive shell —— */
@media (max-width: 1280px) {
  .mc-topbar__title { font-size: var(--fs-2xl); }
}
@media (max-width: 1100px) {
  .mc-topbar { padding: 14px 20px; }
  .mc-content { padding: 8px 20px 48px; }
  .mc-topbar__user-info { display: none; }
}
@media (max-width: 900px) {
  .mc-app { grid-template-columns: 1fr; }
  .mc-sidebar { display: none; }
}

/* =============================================================================
   MudBlazor harmonization — map existing MudBlazor pages onto the design system
   ============================================================================ */
.mud-typography,
.mud-input-root,
.mud-button-root,
.mud-table,
.mud-chip,
.mud-tabs,
body .mud-application-layout { font-family: var(--font-sans) !important; }

.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
  font-weight: var(--fw-bold);
  letter-spacing: var(--letter-tight);
  color: var(--text-primary);
}

/* Mono for codes / fiscal identifiers */
code, kbd, samp, .mud-table td code {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

/* Paper / Card — generous radius + soft cool shadow + hairline */
.mud-paper {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-sm) !important;
  background: var(--bg-surface);
}
.mud-paper.mud-elevation-0 { box-shadow: none !important; }
.mud-card {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-sm) !important;
}

/* Buttons — pill-free, semibold, soft motion */
.mud-button-root {
  border-radius: var(--radius-md) !important;
  font-weight: var(--fw-semibold);
  text-transform: none !important;
  letter-spacing: 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.mud-button-filled.mud-button-filled-primary {
  background-color: var(--slate-900) !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.18) !important;
}
.mud-button-filled.mud-button-filled-primary:hover {
  background-color: var(--slate-800) !important;
  box-shadow: 0 4px 12px rgba(15,23,42,0.18) !important;
}
.mud-button-filled.mud-button-filled-secondary {
  background-color: var(--yellow-500) !important;
  color: var(--slate-900) !important;
}
.mud-button-filled.mud-button-filled-secondary:hover {
  background-color: var(--yellow-400) !important;
}
.mud-button-outlined {
  border-color: var(--slate-200) !important;
  color: var(--slate-800) !important;
  background: #fff !important;
}
.mud-button-outlined:hover { border-color: var(--slate-300) !important; background: var(--slate-50) !important; }

/* Inputs — yellow focus ring */
.mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: var(--radius-md); border-color: var(--slate-200); }
.mud-input.mud-input-outlined.mud-focused .mud-input-outlined-border {
  border-color: var(--yellow-500) !important;
  border-width: 1px !important;
  box-shadow: var(--shadow-focus-yellow);
}
.mud-input-label.mud-input-label-inputcontrol { color: var(--slate-600); }

/* Tables — uppercase cool headers, hairline rows */
.mud-table { border-radius: var(--radius-xl) !important; }
.mud-table-root thead th,
.mud-table-head .mud-table-cell {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs) !important;
  font-weight: var(--fw-semibold) !important;
  color: var(--slate-500) !important;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-150);
}
.mud-table-root tbody .mud-table-row { border-bottom: 1px solid var(--slate-100); }
.mud-table-root tbody .mud-table-row:hover { background: var(--slate-50) !important; }
.mud-table-cell { font-size: var(--fs-md); }

/* Chips — pill, soft semantic tints */
.mud-chip { border-radius: var(--radius-pill) !important; font-weight: var(--fw-medium); }
.mud-chip.mud-chip-filled.mud-chip-color-info     { background: var(--info-50);    color: var(--info-700); }
.mud-chip.mud-chip-filled.mud-chip-color-success  { background: var(--success-50); color: var(--success-700); }
.mud-chip.mud-chip-filled.mud-chip-color-warning  { background: var(--warning-50); color: var(--warning-700); }
.mud-chip.mud-chip-filled.mud-chip-color-error    { background: var(--danger-50);  color: var(--danger-700); }
.mud-chip.mud-chip-filled.mud-chip-color-default  { background: var(--slate-100);  color: var(--slate-700); }

/* Tabs */
.mud-tab.mud-tab-active { color: var(--slate-900) !important; }
.mud-tabs-tabbar-slider { background: var(--yellow-500) !important; }

/* Links / primary text accents */
.mud-link-primary { color: var(--teal-700) !important; }

/* Dialogs */
.mud-dialog { border-radius: var(--radius-xl) !important; box-shadow: var(--shadow-xl) !important; }

/* Remove the page-content max-width container gutter look; the shell handles padding */
.mc-content .mud-container { padding: 0 !important; max-width: 100% !important; }

/* =============================================================================
   Auth pages — Login / MFA / Recupero password (ported from Claude Design handoff)
   Split-screen: form a sinistra (chiaro), pannello brand a destra (scuro).
   Variante centered (default): card centrata su sfondo neutro.
   ============================================================================ */

.mc-auth {
  min-height: 100vh;
  background: var(--bg-app);
  display: flex;
  position: relative;
  overflow: hidden;
}

.mc-auth--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mc-auth__pane {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 40px 56px;
  position: relative;
}

.mc-auth__pane--form {
  background: var(--bg-surface);
  justify-content: space-between;
}

.mc-auth__pane--brand {
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 197, 24, 0.18), transparent 55%),
    radial-gradient(circle at 15% 85%, rgba(14, 124, 134, 0.22), transparent 50%),
    linear-gradient(160deg, #0F172A 0%, #0B1220 100%);
  color: #fff;
  justify-content: space-between;
  overflow: hidden;
}

.mc-auth--centered {
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.10), transparent 50%),
    var(--bg-app);
}
.mc-auth--centered .mc-auth__pane--brand { display: none; }
.mc-auth--centered .mc-auth__pane--form {
  background: transparent;
  padding: 0;
  min-height: auto;
  max-width: 440px;
  width: 100%;
}
.mc-auth--centered .mc-auth__form-wrap {
  background: #fff;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-2xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
}

.mc-auth__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mc-auth__studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  border-radius: var(--radius-pill);
  background: var(--slate-50);
  border: 1px solid var(--slate-150);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}
.mc-auth__studio-pill svg { color: var(--yellow-600); }
.mc-auth__studio-pill strong { color: var(--text-primary); font-weight: var(--fw-semibold); }

.mc-auth__form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  padding: 32px 0;
}

.mc-auth__eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-700);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mc-auth__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--letter-tight);
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0 0 10px;
}

.mc-auth__subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: 1.55;
  margin: 0 0 28px;
}
.mc-auth__subtitle code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--slate-50);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
}

.mc-auth__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mc-auth__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-auth__field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}
.mc-auth__field-label a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--teal-700);
  cursor: pointer;
}
.mc-auth__field-label a:hover { color: var(--teal-800); text-decoration: underline; }

.mc-auth__input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 46px;
  transition: all var(--dur-fast) var(--ease-out);
}
.mc-auth__input:focus-within {
  border-color: var(--yellow-500);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.18);
}
.mc-auth__input.is-error {
  border-color: var(--danger-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.mc-auth__input svg { color: var(--slate-400); flex-shrink: 0; }
.mc-auth__input input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  font-size: var(--fs-md);
  color: var(--text-primary);
  height: 100%;
}
.mc-auth__input input::placeholder { color: var(--slate-400); }
.mc-auth__input button.mc-auth__input-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--slate-400);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
}
.mc-auth__input button.mc-auth__input-toggle:hover { color: var(--slate-700); }

.mc-auth__error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--danger-50);
  border: 1px solid var(--danger-100);
  color: var(--danger-700);
  font-size: var(--fs-sm);
  margin-bottom: 16px;
}
.mc-auth__error svg { flex-shrink: 0; margin-top: 1px; color: var(--danger-600); }
.mc-auth__error strong { font-weight: var(--fw-semibold); }

.mc-auth__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.mc-auth__remember input {
  width: 16px; height: 16px;
  accent-color: var(--yellow-600);
  cursor: pointer;
}

.mc-auth__submit {
  margin-top: 24px;
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--slate-900);
  color: #fff;
  border: 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 14px rgba(15,23,42,0.18);
  text-decoration: none;
}
.mc-auth__submit:hover:not(:disabled) {
  background: var(--slate-800);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15,23,42,0.22);
}
.mc-auth__submit:active:not(:disabled) { transform: translateY(0); }
.mc-auth__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.mc-auth__submit .mc-auth__submit-bolt {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--yellow-500);
  color: var(--slate-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.mc-auth__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  gap: 16px;
}
.mc-auth--centered .mc-auth__foot {
  margin-top: 28px;
  padding: 0 4px;
}
.mc-auth__foot a { color: var(--text-secondary); cursor: pointer; }
.mc-auth__foot a:hover { color: var(--text-primary); text-decoration: underline; }
.mc-auth__foot-links { display: flex; gap: 14px; }

.mc-auth__brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}
.mc-auth__brand-version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mc-auth__brand-version-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--success-500);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.25);
  animation: mc-pulse 2s var(--ease-out) infinite;
}
@keyframes mc-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0.05); }
}

.mc-auth__brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  position: relative;
  z-index: 2;
}
.mc-auth__brand-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-400);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mc-auth__brand-eyebrow .mc-auth__brand-eyebrow-line {
  width: 24px; height: 2px;
  background: var(--yellow-500);
}
.mc-auth__brand-headline {
  font-size: 38px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 18px;
}
.mc-auth__brand-headline em {
  font-style: normal;
  background: linear-gradient(110deg, var(--yellow-400) 0%, var(--yellow-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mc-auth__brand-lede {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  margin: 0 0 32px;
  max-width: 460px;
}
.mc-auth__brand-bullets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}
.mc-auth__brand-bullet {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mc-auth__brand-bullet-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: rgba(245, 197, 24, 0.14);
  border: 1px solid rgba(245, 197, 24, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow-400);
  flex-shrink: 0;
}
.mc-auth__brand-bullet-text { flex: 1; }
.mc-auth__brand-bullet-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: #fff;
  margin-bottom: 2px;
}
.mc-auth__brand-bullet-desc {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}
.mc-auth__brand-card {
  position: absolute;
  right: -40px;
  bottom: 80px;
  width: 280px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-xl);
  padding: 18px;
  backdrop-filter: blur(8px);
  z-index: 1;
  transform: rotate(2.5deg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.mc-auth__brand-card-eyebrow {
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.mc-auth__brand-card-value {
  font-size: 32px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.mc-auth__brand-card-delta {
  font-size: var(--fs-xs);
  color: var(--success-500);
  font-weight: var(--fw-semibold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mc-auth__brand-card-rows {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-auth__brand-card-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.55);
}
.mc-auth__brand-card-row strong { color: rgba(255,255,255,0.85); font-weight: var(--fw-semibold); font-family: var(--font-mono); }
.mc-auth__brand-foot {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}
.mc-auth__brand-foot a { color: rgba(255,255,255,0.6); cursor: pointer; }
.mc-auth__brand-foot a:hover { color: #fff; }

.mc-auth__otp {
  display: flex;
  gap: 10px;
  margin: 8px 0 4px;
  justify-content: space-between;
}
.mc-auth__otp-cell {
  /* Le celle si adattano alla larghezza della card (la centered è stretta):
     flessibili fino a 52px, mai in overflow oltre il bordo. */
  flex: 1 1 0;
  min-width: 0;
  max-width: 52px;
  width: auto;
  height: 60px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: #fff;
  text-align: center;
  font-size: 24px;
  font-weight: var(--fw-bold);
  font-family: var(--font-mono);
  color: var(--text-primary);
  outline: none;
  transition: all var(--dur-fast) var(--ease-out);
  font-variant-numeric: tabular-nums;
}
.mc-auth__otp-cell:focus {
  border-color: var(--yellow-500);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.18);
}
.mc-auth__otp-cell.is-filled { border-color: var(--slate-300); background: var(--slate-50); }
.mc-auth__otp-cell.is-error {
  border-color: var(--danger-500);
  background: var(--danger-50);
  animation: mc-shake 0.4s var(--ease-out);
}
@keyframes mc-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.mc-auth__otp-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  font-size: var(--fs-sm);
}
.mc-auth__otp-resend-counter {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}
.mc-auth__otp-resend a {
  color: var(--teal-700);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.mc-auth__success-icon {
  width: 64px; height: 64px;
  border-radius: 999px;
  background: var(--success-100);
  color: var(--success-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.mc-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  transition: color var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.mc-auth__back:hover { color: var(--text-primary); }

.mc-auth__signup-cta {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: 24px;
}
.mc-auth__signup-cta a {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--yellow-500);
  text-decoration-thickness: 2px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .mc-auth--split { grid-template-columns: 1fr; }
  .mc-auth--split .mc-auth__pane--brand { display: none; }
  .mc-auth__pane { padding: 28px 24px; }
}

/* ============================================================================
   Dashboard components (handoff Claude Design — pagina Studi / Platform Admin)
   ============================================================================ */

/* Layout utilities mancanti */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.t-sec { color: var(--text-secondary); }

/* Card */
.mc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.mc-card--p-none { padding: 0; }
.mc-card--p-sm { padding: 14px; }
.mc-card--p-md { padding: 20px; }
.mc-card--p-lg { padding: 24px; }
.mc-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

/* StatCard */
.mc-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.mc-stat__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.mc-stat__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.mc-stat__icon {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mc-stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 3px 7px;
  border-radius: var(--radius-pill);
}
.mc-stat__delta--success { background: var(--success-50); color: var(--success-700); }
.mc-stat__delta--danger  { background: var(--danger-50);  color: var(--danger-700); }
.mc-stat__delta--neutral { background: var(--slate-100);  color: var(--slate-700); }
.mc-stat__value {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--letter-tight);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

/* Tabs (pill segmented) */
.mc-tabs {
  display: inline-flex;
  background: var(--slate-100);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 2px;
}
.mc-tab {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px 12px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-fast) var(--ease-out);
}
.mc-tab:hover { color: var(--slate-900); }
.mc-tab.is-active {
  background: #fff;
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}
.mc-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-200);
  color: var(--slate-700);
  border-radius: 999px;
  padding: 0 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  height: 16px;
  min-width: 16px;
}
.mc-tab.is-active .mc-tab__count { background: var(--yellow-100); color: var(--yellow-800); }

/* Table */
.mc-table-wrap {
  background: #fff;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.mc-table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  padding: 12px 18px;
  border-bottom: 1px solid var(--slate-150);
  background: var(--slate-50);
  white-space: nowrap;
}
.mc-table tbody tr {
  border-bottom: 1px solid var(--slate-100);
  transition: background var(--dur-fast) var(--ease-out);
}
.mc-table tbody tr:last-child { border-bottom: 0; }
.mc-table tbody tr:hover { background: var(--slate-50); }
.mc-table tbody tr.is-clickable { cursor: pointer; }
.mc-table tbody td { padding: 14px 18px; vertical-align: middle; color: var(--text-primary); }
.mc-table tbody td.is-muted { color: var(--text-tertiary); }
.mc-table tbody td.is-mono { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--slate-600); }
.mc-table tbody td.is-actions { text-align: right; white-space: nowrap; }
.mc-table__empty { padding: 40px 18px; text-align: center; color: var(--text-tertiary); }

/* Status pill */
.mc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.mc-status::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.mc-status--neutral { background: var(--slate-100);  color: var(--slate-600); }
.mc-status--warning { background: var(--warning-50);  color: var(--warning-700); }
.mc-status--success { background: var(--success-50);  color: var(--success-700); }
.mc-status--info    { background: var(--teal-50);     color: var(--teal-700); }
.mc-status--danger  { background: var(--danger-50);   color: var(--danger-700); }

.mc-badge--dark { background: var(--slate-900); color: #fff; }

/* Avatar quadrato per nome studio in tabella */
.mc-rowicon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--slate-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-600);
  flex-shrink: 0;
}
.mc-toolbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-100);
  flex-wrap: wrap;
}
.mc-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0 12px; height: 38px; width: 280px; max-width: 100%;
}
.mc-search:focus-within { border-color: var(--yellow-500); box-shadow: var(--shadow-focus-yellow); }
.mc-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: var(--fs-md); color: var(--text-primary); }
.mc-page-head { margin-bottom: 24px; }
.mc-page-head__title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--letter-snug); }
.mc-page-head__sub { font-size: var(--fs-md); color: var(--text-secondary); margin-top: 4px; }

/* ============================================================================
   Campanella notifiche (topbar)
   ============================================================================ */
.mc-notif { position: relative; display: inline-flex; }
.mc-topbar__bell {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: var(--radius-md); color: var(--slate-500);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.mc-topbar__bell:hover { background: var(--slate-100); color: var(--slate-900); }
.mc-notif__badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger-500); color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.mc-notif__backdrop { position: fixed; inset: 0; z-index: var(--z-dropdown); background: transparent; }
.mc-notif__panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-width: 92vw;
  background: #fff;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  z-index: calc(var(--z-dropdown) + 1);
  overflow: hidden;
  animation: mc-fade-in var(--dur-fast) var(--ease-out);
}
.mc-notif__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--slate-100);
}
.mc-notif__head-title { font-weight: var(--fw-bold); font-size: var(--fs-md); }
.mc-notif__markall {
  border: 0; background: transparent; cursor: pointer;
  color: var(--teal-700); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.mc-notif__markall:hover { text-decoration: underline; }
.mc-notif__list { max-height: 380px; overflow-y: auto; }
.mc-notif__empty { padding: 28px 16px; text-align: center; color: var(--text-tertiary); font-size: var(--fs-sm); }
.mc-notif__item {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer;
  padding: 12px 16px; border-bottom: 1px solid var(--slate-100);
  transition: background var(--dur-fast) var(--ease-out);
}
.mc-notif__item:last-child { border-bottom: 0; }
.mc-notif__item:hover { background: var(--slate-50); }
.mc-notif__item.is-unread { background: var(--yellow-50); }
.mc-notif__item.is-unread:hover { background: var(--yellow-100); }
.mc-notif__item-title { font-weight: var(--fw-semibold); font-size: var(--fs-md); color: var(--text-primary); }
.mc-notif__item-msg { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 2px; line-height: var(--lh-snug); }
.mc-notif__item-time { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 6px; }
@keyframes mc-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ============================================================================
   Dashboard Studio / Cliente (handoff Claude Design)
   ============================================================================ */
.fade-in { animation: mc-fade-in var(--dur-base) var(--ease-out); }
.dotsep { color: var(--slate-300); padding: 0 4px; }
.mc-card--interactive { cursor: pointer; transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.mc-card--interactive:hover { box-shadow: var(--shadow-md); border-color: var(--slate-200); transform: translateY(-2px); }
.mc-stat__spark { margin-top: 8px; }
.mc-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.mc-card__title { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.mc-card__sub { font-size: var(--fs-sm); color: var(--text-tertiary); margin-top:2px; }

/* Scadenze imminenti (studio) */
.mc-scad-row { display:flex; align-items:center; gap:14px; padding:14px 20px; border-bottom:1px solid var(--slate-100); }
.mc-scad-row:last-child { border-bottom:0; }
.mc-scad-row:hover { background: var(--slate-50); }
.mc-scad-row__pill { width:46px; height:46px; border-radius:var(--radius-md); display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; }
.mc-scad-row__pill--danger  { background: var(--danger-50);  color: var(--danger-700); }
.mc-scad-row__pill--warning { background: var(--warning-50); color: var(--warning-700); }
.mc-scad-row__pill--info    { background: var(--teal-50);    color: var(--teal-700); }
.mc-scad-row__days { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height:1; }
.mc-scad-row__days-label { font-size: 9px; font-weight: var(--fw-semibold); text-transform:uppercase; letter-spacing:.06em; }

/* Timeline attività */
.mc-timeline { display:flex; flex-direction:column; }
.mc-timeline__row { display:flex; gap:12px; padding:9px 0; }
.mc-timeline__dot { width:8px; height:8px; border-radius:999px; margin-top:6px; flex-shrink:0; background:var(--slate-300); }
.mc-timeline__dot--success { background: var(--success-500); }
.mc-timeline__dot--warning { background: var(--warning-500); }
.mc-timeline__dot--info    { background: var(--teal-600); }
.mc-timeline__dot--danger  { background: var(--danger-500); }

/* Cliente — hero */
.mc-hero { position:relative; overflow:hidden; background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%); }
.mc-hero__inner { position:relative; z-index:1; }
.mc-hero .t-display { color:#fff; }
.mc-hero .t-sec { color: var(--slate-300) !important; }
.mc-hero__decor { position:absolute; inset:0; z-index:0; pointer-events:none; }
.mc-hero__bg-circle { position:absolute; right:-60px; top:-60px; width:220px; height:220px; border-radius:999px; background: radial-gradient(circle, rgba(245,197,24,.22), transparent 70%); }
.mc-hero__bg-square { position:absolute; right:60px; bottom:-80px; width:160px; height:160px; border-radius:var(--radius-2xl); background: rgba(14,124,134,.18); transform: rotate(18deg); }

/* Cliente — stato pratiche */
.mc-clstate { display:flex; align-items:center; gap:14px; padding:12px 14px; border:1px solid var(--slate-150); border-radius:var(--radius-md); }
.mc-clstate__icon { width:36px; height:36px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.mc-clstate__icon--success { background:var(--success-50); color:var(--success-600); }
.mc-clstate__icon--warning { background:var(--warning-50); color:var(--warning-700); }
.mc-clstate__icon--info    { background:var(--teal-50);    color:var(--teal-700); }
.mc-clstate__icon--danger  { background:var(--danger-50);  color:var(--danger-600); }

/* Cliente — quick action */
.mc-quick-icon { width:44px; height:44px; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; }
.mc-quick-icon--yellow { background:var(--yellow-100); color:var(--yellow-800); }
.mc-quick-icon--danger { background:var(--danger-50);  color:var(--danger-600); }
.mc-quick-icon--info   { background:var(--teal-50);    color:var(--teal-700); }
.mc-quick__cta { margin-top:14px; display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-sm); font-weight:var(--fw-semibold); color:var(--teal-700); }

/* Cliente — scadenze compatte */
.mc-cliente-scad { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--slate-100); }
.mc-cliente-scad:last-child { border-bottom:0; }
.mc-cliente-scad__pill { font-size:var(--fs-xs); font-weight:var(--fw-bold); padding:4px 8px; border-radius:var(--radius-pill); flex-shrink:0; }
.mc-cliente-scad__pill--danger  { background:var(--danger-50);  color:var(--danger-700); }
.mc-cliente-scad__pill--warning { background:var(--warning-50); color:var(--warning-700); }
.mc-cliente-scad__pill--info    { background:var(--teal-50);    color:var(--teal-700); }
