/* ============================================================
   Fasching Calendar Reimagined — Apple/Anthropic warm minimalism
   ============================================================ */

:root {
  /* SURFACES — warm-toned near-white */
  --bg:           oklch(0.985 0.003 80);
  --bg-elevated:  oklch(0.995 0.002 80);
  --bg-sunken:    oklch(0.97 0.004 80);
  --surface:      #ffffff;
  --hairline:     oklch(0.92 0.004 80);
  --hairline-strong: oklch(0.86 0.005 80);

  /* TEXT */
  --text:         oklch(0.16 0.008 60);
  --text-quiet:   oklch(0.42 0.006 60);
  --text-muted:   oklch(0.58 0.005 60);
  --text-faint:   oklch(0.72 0.004 60);

  /* HEALTH PALETTE — restrained, used as text & thin signal */
  --h-strong:     oklch(0.55 0.13 155);
  --h-strong-bg:  oklch(0.55 0.13 155 / 0.10);
  --h-healthy:    oklch(0.55 0.008 80);
  --h-healthy-bg: oklch(0.55 0.008 80 / 0.10);
  --h-low:        oklch(0.62 0.14 50);
  --h-low-bg:     oklch(0.62 0.14 50 / 0.10);
  --h-critical:   oklch(0.55 0.18 25);
  --h-critical-bg:oklch(0.55 0.18 25 / 0.10);
  --h-soldout:    oklch(0.55 0.12 230);
  --h-soldout-bg: oklch(0.55 0.12 230 / 0.10);

  /* SHADOWS */
  --shadow-xs:  0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-sm:  0 1px 3px oklch(0 0 0 / 0.05), 0 1px 2px oklch(0 0 0 / 0.03);
  --shadow-md:  0 4px 12px oklch(0 0 0 / 0.06), 0 2px 4px oklch(0 0 0 / 0.04);
  --shadow-lg:  0 12px 32px oklch(0 0 0 / 0.08), 0 4px 8px oklch(0 0 0 / 0.04);

  /* RADII */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* MOTION */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.26, 0.64, 1);

  /* TYPE */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, monospace;
}

.dark, [data-theme="dark"] {
  --bg:           oklch(0.155 0.005 70);
  --bg-elevated:  oklch(0.185 0.005 70);
  --bg-sunken:    oklch(0.125 0.005 70);
  --surface:      oklch(0.205 0.005 70);
  --hairline:     oklch(0.27 0.005 70);
  --hairline-strong: oklch(0.34 0.006 70);

  --text:         oklch(0.965 0.003 80);
  --text-quiet:   oklch(0.72 0.005 80);
  --text-muted:   oklch(0.58 0.004 80);
  --text-faint:   oklch(0.42 0.004 80);

  --h-strong:     oklch(0.78 0.15 155);
  --h-strong-bg:  oklch(0.78 0.15 155 / 0.16);
  --h-healthy:    oklch(0.78 0.008 80);
  --h-healthy-bg: oklch(0.78 0.008 80 / 0.12);
  --h-low:        oklch(0.78 0.15 60);
  --h-low-bg:     oklch(0.78 0.15 60 / 0.16);
  --h-critical:   oklch(0.72 0.18 25);
  --h-critical-bg:oklch(0.72 0.18 25 / 0.18);
  --h-soldout:    oklch(0.78 0.13 230);
  --h-soldout-bg: oklch(0.78 0.13 230 / 0.16);

  --shadow-xs:  0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-sm:  0 2px 6px oklch(0 0 0 / 0.30);
  --shadow-md:  0 6px 18px oklch(0 0 0 / 0.40), 0 2px 4px oklch(0 0 0 / 0.25);
  --shadow-lg:  0 16px 48px oklch(0 0 0 / 0.50), 0 6px 12px oklch(0 0 0 / 0.30);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
/* Typography is scoped to the V2 shell (.fc-app) rather than the global body so
   this stylesheet can be loaded app-wide (render-blocking, no FOUC) without
   restyling the V1 app's body. All V2 content lives inside .fc-app and inherits
   from here. */
.fc-app {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss03";
  letter-spacing: -0.005em;
}
/* Fade the logged-in shell in after the login "Djup" animation, so the app
   (and its kalender loading state) appears with a smooth fade instead of a hard
   blink. Scoped to `.fresh-login` (set by loginSuccessAnimation just before the
   app mounts, cleared shortly after) so it only runs on login, not every load. */
@keyframes fcAppIn { from { opacity: 0; } to { opacity: 1; } }
.fresh-login .fc-app { animation: fcAppIn 460ms var(--ease, ease) both; }
/* The shell fades in first while showing the kalender loading state (a fixed
   overlay loader); the real page content then mounts a beat later, once its data
   has loaded. Fade that content in too — keyed on the same `.fresh-login` flag,
   which is held until after the data-load gap — so the kalender (or whichever
   page lands after login) eases in instead of hard-cutting over the loader.
   Targets the direct children of the content column (e.g. kalender's topbar and
   its `.fc-page` grid) so the whole page fades in as one, not piecemeal. */
.fresh-login .fc-main > * { animation: fcAppIn 460ms var(--ease, ease) both; }
@media (prefers-reduced-motion: reduce) {
  .fresh-login .fc-app,
  .fresh-login .fc-main > * { animation: none; }
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
input { font: inherit; color: inherit; background: none; border: 0; }
input:focus { outline: 0; }
/* Scoped to .fc-app so the global table reset doesn't reflow V1 tables. */
.fc-app table { border-collapse: collapse; width: 100%; }

.tabular { font-variant-numeric: tabular-nums; }

/* ============================================================
   APP SHELL
   ============================================================ */
.fc-app {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.fc-sidebar {
  width: 224px;
  background: var(--bg-sunken);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
  gap: 4px;
  transition: width 280ms var(--ease);
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
  overflow-y: auto;
}
.fc-sidebar.is-collapsed { width: 54px; padding-left: 8px; padding-right: 8px; }

.fc-sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 14px;
}
.fc-sidebar-head-right { margin-left: auto; display: flex; gap: 2px; }
.fc-wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex; align-items: center; gap: 7px;
}
.fc-wm-dot {
  width: 7px; height: 7px;
  background: var(--h-critical);
  border-radius: 50%;
  display: inline-block;
}
.fc-wm-logo {
  height: 15px;
  width: auto;
  display: block;
}
/* Logo artwork is solid black — invert it in dark mode so it reads as the
   light wordmark, matching --text in both themes. */
.dark .fc-wm-logo,
[data-theme="dark"] .fc-wm-logo {
  filter: invert(1);
}

.fc-icon-btn {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-quiet);
  transition: background 120ms, color 120ms;
}
.fc-icon-btn:hover { background: var(--hairline); color: var(--text); }

.fc-sidebar-bell { padding: 0 2px 10px; }
.fc-bell-btn {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text);
  position: relative;
  transition: background 120ms;
}
.fc-bell-btn:hover { background: var(--hairline); }
.fc-bell-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--h-critical);
  color: white;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}
.is-collapsed .fc-bell-btn { padding-left: 0; padding-right: 0; justify-content: center; }
.is-collapsed .fc-bell-badge { position: absolute; top: -2px; right: -2px; }

.fc-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-bottom: 8px; }
.fc-nav-section { display: flex; flex-direction: column; gap: 1px; padding-bottom: 6px; }
.fc-nav-title {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 12px 8px 4px;
}
.fc-nav-divider {
  height: 1px;
  background: var(--hairline);
  margin: 10px 4px;
}
.fc-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-quiet);
  transition: background 120ms var(--ease), color 120ms var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}
.fc-nav-item:hover { background: var(--hairline); color: var(--text); }
.fc-nav-item.is-active {
  background: var(--text);
  color: var(--bg);
}
.is-collapsed .fc-nav-item { padding-left: 0; padding-right: 0; justify-content: center; }

.fc-sidebar-foot { border-top: 1px solid var(--hairline); padding-top: 8px; }
.fc-user {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px;
  border-radius: 8px;
}
.fc-user:hover { background: var(--hairline); }
.fc-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fc-user-meta { text-align: left; line-height: 1.2; overflow: hidden; }
.fc-user-name { font-size: 12px; font-weight: 500; color: var(--text); }
.fc-user-role { font-size: 10.5px; color: var(--text-muted); }

/* ============================================================
   TOPBAR
   ============================================================ */
.fc-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fc-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 32px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.fc-topbar-left  { display: flex; align-items: center; gap: 10px; }
.fc-topbar-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.fc-topbar-center { display: flex; align-items: center; gap: 8px; justify-self: center; }

.fc-view-toggle {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 2px;
  background: var(--bg-elevated);
}
.fc-view-btn {
  width: 28px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  transition: background 120ms, color 120ms;
}
.fc-view-btn:hover { color: var(--text); }
.fc-view-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.fc-festival-pill {
  position: relative;
  display: inline-flex;
}
.fc-festival-trigger,
.fc-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  white-space: nowrap;
}
.fc-festival-trigger:hover,
.fc-dropdown-trigger:hover {
  border-color: var(--hairline-strong);
  background: var(--surface);
}
.fc-festival-trigger.is-open,
.fc-dropdown-trigger.is-open {
  border-color: var(--text-muted);
  background: var(--surface);
}
.fc-festival-trigger svg,
.fc-dropdown-trigger svg { color: var(--text-muted); }

.fc-dropdown { position: relative; display: inline-flex; }
.fc-festival-menu,
.fc-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border-radius: 7px;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 12px 40px oklch(0 0 0 / 0.14);
  z-index: 50;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: fc-festival-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.fc-dropdown-menu-right { left: auto; right: 0; }
@keyframes fc-festival-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.fc-festival-item,
.fc-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 100ms;
  white-space: nowrap;
}
.fc-festival-item:hover,
.fc-dropdown-item:hover { background: var(--bg-elevated); }
.fc-festival-item.is-active,
.fc-dropdown-item.is-active { background: var(--hairline); }
.fc-festival-item svg,
.fc-dropdown-item svg { color: var(--text); }

.fc-month-title-wrap { position: relative; display: inline-flex; }
.fc-month-title {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 10px;
  user-select: none;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: background 100ms;
}
.fc-month-title:hover { background: var(--hairline); color: var(--text); }
.fc-month-title.is-open { background: var(--hairline); }

.fc-mypicker {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 16px 40px oklch(0 0 0 / 0.16);
  z-index: 50;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fc-mypicker-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fc-mypicker-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.fc-mypicker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.fc-mypicker-year {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  flex: 1;
  text-align: center;
}
.fc-mypicker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.fc-mypicker-cell {
  position: relative;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 100ms, color 100ms;
  font-family: inherit;
}
.fc-mypicker-cell:hover { background: var(--bg-elevated); }
.fc-mypicker-cell.is-today {
  color: var(--text);
  font-weight: 600;
}
.fc-mypicker-cell.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(-50%);
}
.fc-mypicker-cell.is-active {
  background: var(--text);
  color: var(--surface);
}
.fc-mypicker-cell.is-active.is-today::after { background: var(--surface); }
.fc-mypicker-foot {
  border-top: 1px solid var(--hairline);
  margin: 0 -10px -10px;
  padding: 6px 10px;
  display: flex;
  justify-content: flex-end;
}
.fc-mypicker-today {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: background 100ms, color 100ms;
}
.fc-mypicker-today:hover { background: var(--bg-elevated); color: var(--text); }
.fc-month-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fc-month-year {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fc-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  min-width: 240px;
  transition: border-color 120ms, background 120ms;
}
.fc-search:focus-within {
  border-color: var(--hairline-strong);
  background: var(--surface);
  color: var(--text);
}
.fc-search input {
  flex: 1;
  font-size: 12.5px;
  color: var(--text);
}
.fc-search input::placeholder { color: var(--text-faint); }
.fc-search-clear { color: var(--text-muted); display: inline-flex; }
.fc-search-clear:hover { color: var(--text); }

.fc-primary-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: opacity 120ms;
}
.fc-primary-btn:hover { opacity: 0.88; }

/* ============================================================
   PAGE CONTAINER
   ============================================================ */
.fc-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 32px 32px;
  gap: 22px;
  min-width: 0;
}
.fc-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.fc-page-grid.no-rail { grid-template-columns: 1fr; }

/* ============================================================
   KPI STRIP
   ============================================================ */
.fc-kpi { color: var(--text); }
.fc-kpi-eyebrow {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* SINGLE — giant hero */
.fc-kpi-single {
  padding: 26px 28px 24px;
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
}
.fc-kpi-hero {
  display: flex; align-items: center; gap: 24px;
  margin-top: 4px;
}
.fc-kpi-number {
  font-size: 88px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.fc-kpi-suffix {
  font-size: 32px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: -8px;
  align-self: flex-end;
  padding-bottom: 14px;
}
.fc-kpi-spark { color: var(--text-quiet); margin-left: auto; }
.fc-kpi-context {
  margin-top: 14px;
  display: flex; gap: 16px;
  font-size: 12.5px;
  color: var(--text-quiet);
}

/* LINKED — 4 cells */
.fc-kpi-linked {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.fc-kpi-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--hairline);
}
.fc-kpi-cell:last-child { border-right: 0; }
.fc-kpi-cell-value {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  color: var(--text);
}
.fc-kpi-cell-spark { color: var(--text-faint); margin-top: 4px; }

/* MULTI — compact row */
.fc-kpi-multi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.fc-kpi-row-cell {
  padding: 10px 14px;
  background: var(--bg-elevated);
}
.fc-kpi-row-label {
  font-size: 11px;
  color: var(--text-muted);
}
.fc-kpi-row-value {
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 2px;
}

/* ============================================================
   MONTH GRID
   ============================================================ */
.fc-month {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  /* Fill the calendar swap so the grid stretches to the bottom of the page.
     flex:1 only grows into spare space; no min-height:0 so a tall (6-row)
     month is never shrunk/clipped on short viewports. */
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fc-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
}
.fc-weekday {
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.fc-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  /* Grow to fill .fc-month below the weekday row; rows (1fr) stretch the cells. */
  flex: 1;
}
.fc-cell {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 8px 10px 10px;
  display: flex; flex-direction: column;
  gap: 6px;
  min-height: 130px;
  background: var(--surface);
  position: relative;
  transition: background 120ms;
}
.fc-cell:nth-child(7n) { border-right: 0; }
.fc-cell.is-outside { background: var(--bg-sunken); }
.fc-cell.is-outside .fc-cell-day { color: var(--text-faint); }
.fc-cell.fc-cell-empty {
  background: color-mix(in oklch, var(--hairline) 35%, var(--bg-sunken));
  pointer-events: none;
}
.fc-cell.is-today { background: var(--bg-elevated); }

.fc-cell-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 18px;
  position: relative;
}
.fc-cell-day {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-quiet);
  font-variant-numeric: tabular-nums;
}
.fc-cell-today-pill {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

/* Multi-event day pager — chrome-less.
   Day number stays anchored left; today-pill (if present) stays anchored right.
   The pager itself is transparent; only the chevron buttons + position
   indicator carry visual weight. */
.fc-cell-pager {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0;
  pointer-events: auto;
  background: transparent;
}
.fc-cell-pager-btn {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 120ms, color 120ms, opacity 120ms, transform 80ms;
}
.fc-cell-pager-btn:hover { background: var(--hairline); color: var(--text); }
.fc-cell-pager-btn:active { transform: scale(0.92); }
.fc-cell-pager-btn:disabled { opacity: 0.3; cursor: default; }
.fc-cell-pager-btn:disabled:hover { background: transparent; }
.fc-cell-pager-pos {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  min-width: 26px;
  text-align: center;
  user-select: none;
  padding: 0 2px;
}

/* Bump the cell-head room so the larger pager doesn't crowd the day number */
.fc-cell-head:has(.fc-cell-pager) {
  min-height: 24px;
}
.fc-cell-closed {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-top: 4px;
}

/* Empty in-month days are clickable to open the day actions popup. */
.fc-cell.is-empty-clickable { cursor: pointer; }
.fc-cell.is-empty-clickable:hover {
  background: color-mix(in oklch, var(--text) 3%, transparent);
}
.fc-cell-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 28px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 120ms var(--ease), color 120ms var(--ease);
}
.fc-cell.is-empty-clickable:hover .fc-cell-add { opacity: 1; }

/* Day actions popup (empty-date click → Planera konsert / Markera som stängt). */
.fc-daypop-backdrop { position: fixed; inset: 0; z-index: 60; }
.fc-daypop {
  position: fixed;
  z-index: 61;
  min-width: 216px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: fc-daypop-in 160ms var(--ease);
}
@keyframes fc-daypop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.fc-daypop-head {
  padding: 6px 8px 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fc-daypop-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  transition: background 120ms var(--ease);
}
.fc-daypop-item:hover { background: color-mix(in oklch, var(--text) 5%, transparent); }
.fc-daypop-item svg { color: var(--text-muted); flex-shrink: 0; }

.fc-cell-events { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.fc-event {
  width: 100%;
  text-align: left;
  border-radius: 0;
  padding: 3px 0;
  background: transparent;
  border: 0;
  position: relative;
}

/* SAFE variant event */
/* SAFE variant event — bare, content distributed top/bottom */
.fc-event-safe {
  padding-left: 8px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-self: stretch;
  justify-content: space-between;
  min-height: 0;
}
.fc-event-safe::before {
  content: "";
  position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px;
  border-radius: 1px;
  background: var(--text);
}
.fc-event-safe.fc-h-strong-strip::before   { background: var(--h-strong); }
.fc-event-safe.fc-h-healthy-strip::before  { background: var(--h-healthy); }
.fc-event-safe.fc-h-low-strip::before      { background: var(--h-low); }
.fc-event-safe.fc-h-critical-strip::before { background: var(--h-critical); }
.fc-event-safe.fc-h-soldout-strip::before  { background: var(--h-soldout); }
.fc-event-safe .fc-event-artist {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}
.fc-event-safe .fc-event-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.fc-event-safe .fc-event-venue { text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5px; }
.fc-event-safe .fc-event-sold { color: var(--text); font-weight: 500; }

/* CONFIDENT variant event — bare, no container; bottom row pinned to cell base */
.fc-event-confident {
  padding: 3px 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-self: stretch;
  justify-content: space-between;
  min-height: 0;
  height: 100%;
}
.fc-event-confident .fc-event-bottom { margin-top: auto; padding-top: 6px; }
.fc-event-confident .fc-event-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.fc-event-confident .fc-event-artist {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(15px * 1.25 * 2);
}
.fc-event-confident .fc-event-bottom {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 4px;
}
.fc-event-confident .fc-event-venue {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fc-event-confident .fc-event-fill {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.fc-event-confident .fc-event-fill-pct {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 1px;
}
.fc-event-confident .fc-event-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.fc-event-bar {
  margin-top: 6px;
  height: 2px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.fc-event-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--text);
}

/* Card style modifiers — no-ops now that events are bare */
.fc-event.cs-flat,
.fc-event.cs-border,
.fc-event.cs-shadow,
.fc-event.cs-glass {
  box-shadow: none;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

/* DENSITIES */
.density-dense .fc-cell { padding: 6px 7px 7px; min-height: 110px; gap: 4px; }
.density-dense .fc-event { padding: 2px 0; }
.density-dense .fc-event-confident .fc-event-fill { font-size: 13px; }
.density-dense .fc-event-safe .fc-event-artist { font-size: 11.5px; }

.density-bloomberg .fc-cell { padding: 4px 5px 5px; min-height: 90px; gap: 3px; }
.density-bloomberg .fc-event { padding: 1px 0; }
.density-bloomberg .fc-event-confident .fc-event-fill { font-size: 12px; }
.density-bloomberg .fc-event-confident .fc-event-bottom { margin-top: 2px; }
.density-bloomberg .fc-event-bar { display: none; }
.density-bloomberg .fc-event-safe .fc-event-artist { font-size: 11px; -webkit-line-clamp: 1; }
.density-bloomberg .fc-event-safe .fc-event-meta { display: none; }
.density-bloomberg .fc-cell-day { font-size: 11px; }
.density-bloomberg .fc-weekday { padding: 5px 8px; font-size: 9.5px; }

/* HEALTH UTILITY CLASSES */
.fc-h-strong-text   { color: var(--h-strong); }
.fc-h-healthy-text  { color: var(--h-healthy); }
.fc-h-low-text      { color: var(--h-low); }
.fc-h-critical-text { color: var(--h-critical); }
.fc-h-soldout-text  { color: var(--h-soldout); }

.fc-h-strong-bg   { background: var(--h-strong); }
.fc-h-healthy-bg  { background: var(--h-healthy); }
.fc-h-low-bg      { background: var(--h-low); }
.fc-h-critical-bg { background: var(--h-critical); }
.fc-h-soldout-bg  { background: var(--h-soldout); }

.fc-h-strong-dot, .fc-h-healthy-dot, .fc-h-low-dot,
.fc-h-critical-dot, .fc-h-soldout-dot { border-radius: 50%; flex-shrink: 0; }

.fc-h-strong-chip   { background: var(--h-strong-bg);   color: var(--h-strong); }
.fc-h-healthy-chip  { background: var(--h-healthy-bg);  color: var(--text); }
.fc-h-low-chip      { background: var(--h-low-bg);      color: var(--h-low); }
.fc-h-critical-chip { background: var(--h-critical-bg); color: var(--h-critical); }
.fc-h-soldout-chip  { background: var(--h-soldout-bg);  color: var(--h-soldout); }

/* ============================================================
   HORIZON (BOLD VARIANT)
   ============================================================ */
.fc-horizon {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 14px 0 14px 14px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 6px;
  overflow: hidden;
}
.fc-horizon-y-axis {
  display: grid;
  grid-template-rows: 88px auto auto auto;
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 4px 0 0;
  font-variant-numeric: tabular-nums;
  align-items: start;
  border-right: 1px dashed var(--hairline);
}
.fc-horizon-y-axis > span { padding-right: 6px; text-align: right; }
.fc-horizon-y-axis > span:nth-child(1) { padding-top: 0; }
.fc-horizon-y-axis > span:nth-child(2) { padding-top: 30px; }
.fc-horizon-y-axis > span:nth-child(3) { padding-top: 30px; }

.fc-horizon-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 14px;
  color: var(--text-quiet);
}
.fc-horizon-chart {
  display: block;
  min-width: 100%;
  margin-bottom: 4px;
}

.fc-horizon-track {
  display: grid;
  grid-auto-columns: 56px;
  grid-auto-flow: column;
  align-items: stretch;
  gap: 0;
  height: 320px;
  border-top: 1px solid var(--hairline);
  padding-top: 8px;
}
.fc-horizon-day {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--hairline);
  padding: 0 4px;
  position: relative;
}
.fc-horizon-day.is-week-start { border-left: 1px solid var(--hairline-strong); }
.fc-horizon-day.is-today::before {
  content: "";
  position: absolute; inset: -8px 0 0 0;
  border-left: 1px solid var(--text);
  pointer-events: none;
}
.fc-horizon-day-head {
  display: flex; align-items: baseline; gap: 4px;
  padding: 4px 0 6px;
  font-size: 10px;
  color: var(--text-muted);
  position: relative;
}
.fc-horizon-day-wk { text-transform: uppercase; letter-spacing: 0.08em; }
.fc-horizon-day-num {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.fc-horizon-day-mo {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--h-critical);
  position: absolute;
  top: -10px;
  left: 0;
}
.fc-horizon-day.is-today .fc-horizon-day-num { color: var(--text); }
.fc-horizon-day.is-today .fc-horizon-day-wk::after {
  content: "•";
  margin-left: 3px;
  color: var(--h-critical);
}

.fc-horizon-day-tiles {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 2px 0;
  align-items: stretch;
}
.fc-horizon-tile {
  width: 100%;
  min-height: 10px;
  border-radius: 3px;
  opacity: 0.92;
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 3px 5px;
  overflow: hidden;
  transition: opacity 120ms, transform 160ms var(--ease), filter 120ms;
  filter: saturate(0.9);
}
.fc-horizon-tile:hover { opacity: 1; transform: scaleX(1.04); z-index: 2; box-shadow: var(--shadow-sm); filter: saturate(1.1); }
.fc-horizon-tile-label {
  font-size: 9.5px;
  font-weight: 500;
  color: oklch(0 0 0 / 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
  letter-spacing: -0.005em;
}
.fc-horizon-tile-pct {
  font-size: 11px;
  font-weight: 600;
  color: oklch(0 0 0 / 0.7);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  align-self: flex-end;
}
.dark .fc-horizon-tile-label { color: oklch(1 0 0 / 0.88); }
.dark .fc-horizon-tile-pct   { color: oklch(1 0 0 / 0.78); }
.fc-horizon-tile-pct-sym { font-size: 9px; font-weight: 500; opacity: 0.7; margin-left: 1px; }
.fc-horizon-closed {
  font-size: 18px;
  color: var(--text-faint);
  text-align: center;
}
.fc-horizon-day-foot {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 0 2px;
  border-top: 1px dashed var(--hairline);
  font-variant-numeric: tabular-nums;
  min-height: 18px;
}

/* ============================================================
   LIST VIEW
   ============================================================ */
.fc-list-view {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fc-table {
  width: 100%;
  font-size: 12.5px;
}
.fc-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
  cursor: pointer;
  user-select: none;
}
.fc-table th.num { text-align: right; }
.fc-table th .fc-th-inner { display: inline-flex; align-items: center; gap: 4px; }
.fc-table th.is-sorted { color: var(--text); }
.fc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text);
}
.fc-table td.num { text-align: right; }
.fc-table tbody tr.fc-tr-row { cursor: pointer; transition: background 100ms; }
.fc-table tbody tr.fc-tr-row:hover { background: var(--bg-elevated); }
.fc-table tbody tr:last-child td { border-bottom: 0; }
.fc-td-quiet { color: var(--text-muted); }
.fc-td-date { display: flex; align-items: baseline; gap: 6px; }
.fc-td-day {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text);
}
.fc-td-mo { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

.fc-meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--hairline);
  color: var(--text);
}
.fc-meta-chip-quiet { background: transparent; color: var(--text-muted); border: 1px solid var(--hairline); }
.fc-meta-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ============================================================
   RIGHT RAIL (CONFIDENT)
   ============================================================ */
.fc-rail {
  display: flex; flex-direction: column; gap: 14px;
  position: sticky;
  top: 78px;
}
.fc-rail-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 14px 16px 12px;
}
.fc-rail-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.fc-rail-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.fc-rail-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fc-rail-item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  transition: background 100ms;
}
.fc-rail-item:hover { background: var(--bg-elevated); margin-inline: -10px; padding-inline: 10px; border-radius: var(--r-sm); }
.fc-rail-item:first-child { border-top: 0; }
.fc-rail-artist { font-size: 12.5px; font-weight: 500; color: var(--text); letter-spacing: -0.005em; }
.fc-rail-meta { font-size: 10.5px; color: var(--text-muted); }
.fc-rail-pct {
  font-size: 14px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  text-align: right;
}
.fc-rail-when {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   SWAP TRANSITIONS — 5 modes
   ============================================================ */
.fc-swap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform-origin: center top;
  will-change: transform, opacity, filter, clip-path;
}
/* Calendar/list/horizon swap fills the page height so the month grid (which
   sets flex:1 on .fc-month) can stretch to the bottom. */
.fc-swap.is-calendar {
  flex: 1;
}

/* 1) FADE RISE — calm Apple Notes feel */
.fc-swap.is-fade {
  animation: tx-fade 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tx-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 2) SPATIAL ZOOM — expand from click origin (iOS app-launch) */
.fc-swap.is-spatial {
  animation: tx-spatial 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
}
@keyframes tx-spatial {
  0%   { opacity: 0; transform: scale(0.62); filter: blur(8px); }
  40%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* 3) CINEMA SLIDE — horizontal slide, asymmetric in/out */
.fc-swap.is-cinema.is-detail {
  animation: tx-cinema-in 480ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
.fc-swap.is-cinema.is-calendar {
  animation: tx-cinema-back 480ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes tx-cinema-in {
  from { opacity: 0; transform: translateX(64px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes tx-cinema-back {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 4) REVEAL WIPE — clip-path curtain from top, with shimmer */
.fc-swap.is-wipe {
  animation: tx-wipe 620ms cubic-bezier(0.65, 0, 0.35, 1) both;
  position: relative;
}
@keyframes tx-wipe {
  0%   { clip-path: inset(0 0 100% 0); opacity: 0.8; }
  60%  { opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}
.fc-swap.is-wipe::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--text), transparent);
  opacity: 0.4;
  pointer-events: none;
  animation: tx-wipe-line 620ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
@keyframes tx-wipe-line {
  0%   { top: 0; opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

/* 5) DEPTH STACK — 3D push: scale + blur + opacity (Vision Pro feel) */
.fc-swap.is-depth {
  animation: tx-depth 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
  perspective: 1200px;
  transform-origin: center 30%;
}
@keyframes tx-depth {
  0%   { opacity: 0; transform: perspective(1200px) translateZ(-160px) rotateX(6deg); filter: blur(16px); }
  50%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: perspective(1200px) translateZ(0) rotateX(0deg); filter: blur(0); }
}

/* ============================================================
   SHOW DETAIL PAGE
   ============================================================ */
.fc-show-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.fc-show-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.fc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-quiet);
  transition: background 120ms, color 120ms;
}
.fc-back-btn:hover { background: var(--hairline); color: var(--text); }
.fc-crumb-sep { color: var(--text-faint); }
.fc-crumb-current { color: var(--text); font-weight: 500; }

.fc-show-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 28px 0 26px;
  border-bottom: 1px solid var(--hairline);
}
.fc-show-hero-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fc-show-date-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.fc-show-weekday { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.fc-show-day {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}
.fc-show-month { text-transform: uppercase; letter-spacing: 0.06em; }
.fc-show-year { font-variant-numeric: tabular-nums; }
.fc-show-when {
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 500;
}
.fc-show-artist {
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}
.fc-show-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }

.fc-show-hero-right { display: flex; align-items: center; }
.fc-show-hero-stat { text-align: right; }
.fc-show-hero-label {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.fc-show-hero-value {
  font-size: 96px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.fc-show-hero-suffix {
  font-size: 36px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}
.fc-show-hero-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.fc-show-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: -2px;
}
.fc-show-tabs .fc-tab { padding: 10px 14px; font-size: 13px; }

.fc-show-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 4px;
}

.fc-stat-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fc-show-page .fc-stat { padding: 16px 18px; }
.fc-show-page .fc-stat-value { font-size: 24px; }
.fc-show-page .fc-overview-fillbar { margin-top: 0; }
.fc-show-page .fc-overview-fillbar-head span:last-child { font-size: 14px; }
.fc-show-page .fc-fillbar { height: 6px; }

.fc-show-page .fc-forecast { margin: 0; }
.fc-show-page .fc-forecast-svg { max-height: 360px; }
.fc-drawer-scrim {
  position: fixed; inset: 0;
  background: oklch(0 0 0 / 0.16);
  z-index: 100;
  animation: scrimIn 200ms var(--ease);
}
.dark .fc-drawer-scrim { background: oklch(0 0 0 / 0.4); }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.fc-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 520px;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--hairline);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: drawerIn 360ms var(--ease);
}
@keyframes drawerIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.fc-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--hairline);
}
.fc-drawer-date { display: flex; align-items: baseline; gap: 8px; }
.fc-drawer-weekday {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.fc-drawer-day {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.fc-drawer-month {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fc-drawer-when {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 8px;
}

.fc-drawer-hero { padding: 18px 24px 16px; border-bottom: 1px solid var(--hairline); }
.fc-drawer-artist {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 10px;
}
.fc-drawer-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }

.fc-drawer-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.fc-tab {
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms, border-color 120ms;
}
.fc-tab:hover { color: var(--text); }
.fc-tab.is-active { color: var(--text); border-bottom-color: var(--text); }

.fc-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }

.fc-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.fc-stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fc-stat {
  background: var(--bg-elevated);
  padding: 12px 14px;
}
.fc-stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.fc-stat-value {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  color: var(--text);
}
.fc-stat-caption { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.fc-overview-fillbar { margin-top: 18px; }
.fc-overview-fillbar-head {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 6px;
}
.fc-overview-fillbar-head span:last-child {
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.fc-fillbar {
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.fc-fillbar-fill { height: 100%; transition: width 480ms var(--ease); }
.fc-overview-fillbar-foot {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--text-faint);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.fc-overview-summary { margin-top: 18px; }
.fc-callout {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  line-height: 1.45;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  color: var(--text);
}
.fc-h-strong-callout   { border-color: var(--h-strong-bg);   background: var(--h-strong-bg); }
.fc-h-low-callout      { border-color: var(--h-low-bg);      background: var(--h-low-bg); }
.fc-h-critical-callout { border-color: var(--h-critical-bg); background: var(--h-critical-bg); }
.fc-h-soldout-callout  { border-color: var(--h-soldout-bg);  background: var(--h-soldout-bg); }
.fc-callout svg { flex-shrink: 0; margin-top: 1px; }

.fc-sales-tab { display: flex; flex-direction: column; gap: 16px; }
.fc-sales-tab .fc-table th, .fc-sales-tab .fc-table td { padding-left: 0; padding-right: 0; }
.fc-sales-tab .fc-table { background: transparent; border-radius: 0; }
.fc-sales-tab .fc-table th { background: transparent; padding-top: 6px; padding-bottom: 6px; }
.fc-sales-tab .fc-table td { padding-top: 8px; padding-bottom: 8px; }

.fc-actions-tab { display: flex; flex-direction: column; gap: 8px; }
.fc-action {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr 16px;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  transition: background 120ms, border-color 120ms;
}
.fc-action:hover { border-color: var(--hairline-strong); background: var(--surface); }
.fc-action.is-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.fc-action.is-primary:hover { opacity: 0.92; }
.fc-action-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--hairline);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.fc-action.is-primary .fc-action-icon { background: oklch(0 0 0 / 0.1); color: var(--bg); }
.fc-action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-action-title { font-size: 13px; font-weight: 500; letter-spacing: -0.005em; }
.fc-action-body { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.fc-action.is-primary .fc-action-body { color: oklch(1 0 0 / 0.65); }
.fc-action-arrow { color: var(--text-faint); }

/* ============================================================
   FORECAST CHART
   ============================================================ */
.fc-forecast {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px 20px 14px;
  margin: 16px 0;
}
.fc-forecast-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 14px;
}
.fc-forecast-eyebrow {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.fc-forecast-title {
  font-size: 14.5px;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-top: 3px;
  font-weight: 400;
}
.fc-forecast-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 11px; color: var(--text-muted);
}
.fc-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.fc-legend-swatch { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.fc-sw-observed { background: var(--text); }
.fc-sw-median { background: var(--h-strong); }
.fc-sw-band   { background: var(--h-strong); opacity: 0.18; }

.fc-forecast-svg { display: block; color: var(--text); }
.fc-grid-line { stroke: var(--hairline); stroke-width: 1; }
.fc-grid-label { fill: var(--text-faint); font-size: 9px; font-family: var(--font-sans); }
.fc-cap-line { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 2 3; }
.fc-cap-label { fill: var(--text-muted); font-size: 9px; font-family: var(--font-sans); }
.fc-today-line { stroke: var(--text-quiet); stroke-width: 1; stroke-dasharray: 2 3; }
.fc-today-label { fill: var(--text-quiet); font-size: 9px; font-family: var(--font-sans); }

.fc-band-outer  { fill: var(--h-strong); opacity: 0.10; }
.fc-band-inner  { fill: var(--h-strong); opacity: 0.18; }
.fc-band-single { fill: var(--h-strong); opacity: 0.16; }
.fc-band-faint  { fill: var(--h-strong); opacity: 0.08; }

.fc-line { fill: none; stroke-width: 1.5; }
.fc-line-observed { stroke: var(--text); }
.fc-line-bridge   { stroke: var(--h-strong); stroke-dasharray: 3 3; }
.fc-line-median   { stroke: var(--h-strong); stroke-width: 1.75; }
.fc-line-median.is-scenario { stroke-width: 2; }
.fc-end-dot { fill: var(--h-strong); stroke: var(--bg); stroke-width: 1.5; }

.fc-scenario-controls {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 8px;
}
.fc-scenario-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fc-scenario-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 4px;
}
.fc-scenario-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--text-quiet);
  transition: border-color 120ms, background 120ms, color 120ms;
}
.fc-scenario-chip:hover { color: var(--text); }
.fc-scenario-chip.is-active {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-elevated);
}
.fc-scenario-slider { flex: 1; min-width: 140px; accent-color: var(--text); }
.fc-scenario-value {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 44px;
  text-align: right;
}

.fc-forecast-mode-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  margin-bottom: 12px;
}
.fc-mode-chip {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
}
.fc-mode-chip.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.fc-forecast-summary {
  display: flex; gap: 24px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.fc-forecast-summary-value {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-top: 3px;
}

/* ============================================================
   TWEAKS PANEL OVERRIDES (works with starter)
   ============================================================ */
.tweaks-host { z-index: 999; }

/* ============================================================
   MOBILE SHELL — sidebar becomes an off-canvas drawer
   ============================================================ */
/* Hidden on desktop; the drawer chrome only matters on narrow screens. */
.fc-mobile-bar { display: none; }
.fc-scrim { display: none; }
.fc-sidebar-close { display: none !important; }

@media (max-width: 860px) {
  /* Single column: the sidebar is lifted out of flow and overlaid. */
  .fc-app { grid-template-columns: 1fr; }

  .fc-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hairline);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .fc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 264px !important;        /* full drawer even if desktop-collapsed */
    padding: 14px 10px 12px !important;
    transform: translateX(-100%);
    transition: transform 260ms var(--ease);
    z-index: 50;
    box-shadow: var(--shadow-lg, 0 8px 40px rgba(0,0,0,0.25));
  }
  .fc-sidebar.is-mobile-open { transform: translateX(0); }

  /* The desktop collapse toggle is meaningless inside the drawer; hide it and
     show the close (✕) instead. */
  .fc-sidebar-head > .fc-icon-btn:first-child { display: none; }
  .fc-sidebar-close { display: inline-flex !important; margin-left: auto; }

  .fc-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms var(--ease);
    z-index: 40;
  }
  .fc-app.is-mobile-open .fc-scrim { opacity: 1; pointer-events: auto; }

  /* Keep the in-page content from forcing horizontal scroll on phones. */
  .fc-topbar { padding: 14px 16px 12px; }

  /* Global safety net: wide tables become horizontally scrollable blocks on
     phones instead of pushing the whole layout sideways. Scoped to the table
     itself (not .fc-main) so it doesn't turn the page column into a scroll
     container and break the sticky tab/header bars. */
  .fc-app .fc-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fc-app .fc-table thead, .fc-app .fc-table tbody, .fc-app .fc-table tr { white-space: nowrap; }
}

/* ── Notifications panel (sidebar bell) ───────────────────────────── */
.fc-notif-scrim{ position:fixed; inset:0; background:oklch(0 0 0 / 0.18); z-index:90; animation:fcNotifFade 160ms ease; }
@keyframes fcNotifFade{ from{ opacity:0; } to{ opacity:1; } }
/* left is set inline to sit just past the sidebar (collapsed/expanded) — not overlapping it. */
.fc-notif-panel{ position:fixed; top:16px; left:234px; width:360px; max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); background:var(--surface); border:1px solid var(--hairline); border-radius:14px; box-shadow:0 1px 2px oklch(0 0 0 / 0.05), 0 16px 48px oklch(0 0 0 / 0.20); z-index:91; display:flex; flex-direction:column; overflow:hidden; animation:fcNotifIn 200ms cubic-bezier(0.22,1,0.36,1); }
@media (max-width:900px){ .fc-notif-panel{ left:12px !important; right:12px; width:auto; } }
@keyframes fcNotifIn{ from{ opacity:0; transform:translateY(-8px); } to{ opacity:1; transform:translateY(0); } }
.fc-notif-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--hairline); }
.fc-notif-head h3{ font-size:14px; font-weight:600; color:var(--text); }
.fc-notif-list{ flex:1; overflow-y:auto; padding:6px; }
.fc-notif-empty{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:44px 16px; color:var(--text-muted); font-size:12.5px; }
.fc-notif-empty svg{ color:var(--text-faint); }
.fc-notif-item{ width:100%; display:flex; align-items:flex-start; gap:11px; padding:11px 10px; border-radius:9px; text-align:left; transition:background 120ms; position:relative; }
.fc-notif-item:hover{ background:var(--bg-elevated); }
.fc-notif-item.is-unread{ background:color-mix(in oklch, var(--h-strong) 6%, transparent); }
.fc-notif-ic{ width:30px; height:30px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:var(--bg-elevated); border:1px solid var(--hairline); color:var(--text-quiet); }
.fc-notif-ic.sev-critical, .fc-notif-ic.sev-brådskande{ color:var(--h-critical); background:var(--h-critical-bg); border-color:transparent; }
.fc-notif-ic.sev-warning{ color:var(--h-low); }
.fc-notif-body{ min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.fc-notif-title{ font-size:12.5px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fc-notif-msg{ font-size:11.5px; color:var(--text-muted); line-height:1.4; }
.fc-notif-meta{ font-size:9.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.05em; margin-top:2px; }
.fc-notif-dot{ width:7px; height:7px; border-radius:50%; background:var(--h-strong); flex-shrink:0; margin-top:5px; }
.fc-notif-head .fc-icon-btn.is-on{ background:var(--hairline); color:var(--text); }
.fc-notif-actions{ display:flex; justify-content:flex-end; padding:2px 4px 6px; }
.fc-notif-markall{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:500; color:var(--text-muted); padding:5px 9px; border-radius:7px; transition:background 120ms, color 120ms; }
.fc-notif-markall:hover{ background:var(--bg-elevated); color:var(--text); }
.fc-notif-markall:disabled{ opacity:0.5; cursor:default; }
.fc-notif-settings-hint{ font-size:11.5px; color:var(--text-muted); line-height:1.45; padding:8px 10px 10px; }
.fc-notif-cat{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 10px; border-radius:9px; text-align:left; transition:background 120ms; }
.fc-notif-cat:hover{ background:var(--bg-elevated); }
.fc-notif-cat-label{ font-size:12.5px; font-weight:500; color:var(--text); }
.fc-notif-switch{ width:34px; height:20px; border-radius:999px; background:var(--hairline); flex-shrink:0; position:relative; transition:background 140ms; }
.fc-notif-switch span{ position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--surface); box-shadow:0 1px 2px oklch(0 0 0 / 0.18); transition:transform 140ms; }
.fc-notif-switch.is-on{ background:var(--text); }
.fc-notif-switch.is-on span{ transform:translateX(14px); }
