/* ─────────────────────────────────────────────────────────────────────────────
   App Shell — shared dashboard chrome (Material Design 3)

   Reusable header / brand / button / title / snackbar primitives that give the
   ecosystem landing pages (mt, expense, present) the same identity as Slides.
   Lifted verbatim from slides/css/main.css so they are pixel-identical.

   MD3 tokens (--md-*) come from /css/shared.css and resolve in BOTH light and
   dark schemes. Classes are namespaced `shell-` to coexist with Tailwind.
───────────────────────────────────────────────────────────────────────────── */

/* ── Sticky, blurred top bar ── */
.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--md-surface) 80%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--md-outline-variant);
}
.shell-header-left,
.shell-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ── Brand logo (SPCY ◇ / App) ── */
.shell-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--md-on-surface);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 12px 8px 8px;
  border-radius: var(--md-shape-full);
  transition: background var(--md-duration-s) var(--md-easing-standard);
}
.shell-logo:hover { background: var(--md-surface-container-high); }
.shell-logo svg { opacity: 0.95; flex-shrink: 0; }
.shell-logo .shell-logo-sep { opacity: 0.4; }

/* ── Round tonal icon button (back / stat / theme / lang) ── */
.shell-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  color: var(--md-on-surface-variant);
  border: none;
  border-radius: var(--md-shape-full);
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--md-duration-s) var(--md-easing-standard);
}
.shell-icon-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--md-duration-s) var(--md-easing-standard);
}
.shell-icon-btn:hover { color: var(--md-on-surface); }
.shell-icon-btn:hover::after { opacity: 0.08; }
.shell-icon-btn:active::after { opacity: 0.12; }
.shell-icon-btn .material-symbols-outlined { font-size: 22px; }

/* ── MD3 filled button (primary action / extended FAB) ── */
.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--md-shape-lg);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow var(--md-duration-m) var(--md-easing-standard),
              filter var(--md-duration-s) var(--md-easing-standard);
}
.shell-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--md-duration-s) var(--md-easing-standard);
}
.shell-btn:hover::after { opacity: 0.08; }
.shell-btn:active::after { opacity: 0.12; }
.shell-btn:active { transform: scale(0.99); }
.shell-btn .material-symbols-outlined { font-size: 20px; }

.shell-btn-filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
}
.shell-btn-filled:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.22);
}
/* Compact variant for header-placed actions */
.shell-btn-sm { height: 40px; padding: 0 18px; font-size: 13px; }

/* ── Page title with brand-gradient accent word ── */
.shell-title {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-on-surface);
  margin: 0;
}
.shell-title-accent {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── MD3 snackbar (toast) ── */
.shell-snackbar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--md-surface-container-highest);
  border: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface);
  padding: 14px 22px;
  border-radius: var(--md-shape-xs);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform var(--md-duration-m) var(--md-easing-enter),
              opacity var(--md-duration-m);
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.shell-snackbar.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.shell-snackbar.error { color: #ffb4ab; border-color: rgba(255, 180, 171, 0.4); }
