/* Financial Dashboard — auradecantism dark theme decorators */

@layer decorators {

/* ── fd-nav: Sticky top navigation for marketing ── */
.fd-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 40;
  background: color-mix(in srgb, var(--d-bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--d-border) 50%, transparent);
}

/* ── fd-hero: Marketing hero mesh backdrop ── */
.fd-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  overflow: hidden;
}

.fd-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 40%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(14, 165, 233, 0.06) 0%, transparent 50%);
  animation: fd-mesh-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes fd-mesh-drift {
  0% { opacity: 0.85; transform: scale(1) rotate(0deg); }
  100% { opacity: 1; transform: scale(1.05) rotate(0.5deg); }
}

/* ── fd-orb ── */
.fd-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(64px);
  opacity: 0.28;
}

.fd-orb-1 {
  width: 420px;
  height: 420px;
  background: var(--d-accent);
  top: -12%;
  left: -6%;
  animation: fd-orb-float 10s ease-in-out infinite alternate;
}

.fd-orb-2 {
  width: 360px;
  height: 360px;
  background: var(--d-primary);
  bottom: -8%;
  right: -6%;
  animation: fd-orb-float 12s ease-in-out infinite alternate-reverse;
}

@keyframes fd-orb-float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -20px); }
}

/* ── fd-sidebar: App shell sidebar ── */
.fd-sidebar {
  background: var(--d-surface);
  border-right: 1px solid var(--d-border);
}

.fd-sidebar [data-active="true"] {
  background: color-mix(in srgb, var(--d-accent) 12%, transparent);
  color: var(--d-accent);
}

.fd-sidebar [data-active="true"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--d-accent);
  border-radius: 0 2px 2px 0;
}

/* ── fd-card: Elevated card with hover lift ── */
.fd-card {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  box-shadow: var(--d-shadow);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.fd-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--d-shadow-md);
  border-color: color-mix(in srgb, var(--d-accent) 40%, var(--d-border));
}

/* ── fd-kpi-accent: KPI card with accent top border ── */
.fd-kpi-accent {
  position: relative;
  overflow: hidden;
}

.fd-kpi-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--d-accent), color-mix(in srgb, var(--d-accent) 60%, var(--d-primary)));
  border-radius: var(--d-radius) var(--d-radius) 0 0;
}

/* ── fd-button-accent ── */
.fd-button-accent {
  background: var(--d-accent);
  color: #fff;
  border: none;
  border-radius: var(--d-radius);
  padding: var(--d-interactive-py) var(--d-interactive-px);
  font-weight: 500;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
}

.fd-button-accent:hover {
  background: color-mix(in srgb, var(--d-accent) 85%, #fff);
  box-shadow: 0 0 24px color-mix(in srgb, var(--d-accent) 30%, transparent);
}

.fd-button-accent:focus-visible {
  outline: 2px solid var(--d-accent);
  outline-offset: 2px;
}

/* ── fd-fade-in ── */
.fd-fade-in {
  animation: fd-fade-in 0.4s ease-out both;
}

@keyframes fd-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── fd-gradient-text ── */
.fd-gradient-text {
  background: linear-gradient(135deg, var(--d-accent), var(--d-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── fd-avatar ── */
.fd-avatar {
  border-radius: var(--d-radius-full);
  background: linear-gradient(135deg, var(--d-accent), var(--d-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

/* ── fd-mono: Monospace numbers ── */
.fd-mono {
  font-family: var(--d-font-mono, ui-monospace, 'SF Mono', Menlo, monospace);
  font-variant-numeric: tabular-nums;
}

/* ── fd-gain / fd-loss: Semantic financial color ── */
.fd-gain { color: var(--d-success); }
.fd-loss { color: var(--d-error); }

/* ── fd-budget-bar: Budget progress bar ── */
.fd-budget-track {
  height: 6px;
  background: var(--d-surface-raised);
  border-radius: var(--d-radius-full);
  overflow: hidden;
  position: relative;
}

.fd-budget-fill {
  height: 100%;
  border-radius: var(--d-radius-full);
  transition: width 600ms ease-out;
  background: var(--d-success);
}

.fd-budget-fill[data-level="safe"] { background: var(--d-success); }
.fd-budget-fill[data-level="warn"] { background: var(--d-warning); }
.fd-budget-fill[data-level="over"] { background: var(--d-error); }

/* ── fd-allocation-bar: Horizontal allocation segment ── */
.fd-allocation-stack {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: var(--d-radius-full);
  overflow: hidden;
  background: var(--d-surface-raised);
}

.fd-allocation-segment {
  height: 100%;
  transition: opacity 150ms ease;
}

.fd-allocation-segment:hover {
  opacity: 0.75;
}

/* ── fd-pill: Category / status pill ── */
.fd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--d-radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--d-surface-raised);
  color: var(--d-text-muted);
  white-space: nowrap;
}

.fd-pill[data-status="posted"] {
  background: color-mix(in srgb, var(--d-info) 14%, transparent);
  color: var(--d-info);
}

.fd-pill[data-status="pending"] {
  background: color-mix(in srgb, var(--d-warning) 14%, transparent);
  color: var(--d-warning);
}

.fd-pill[data-status="cleared"] {
  background: color-mix(in srgb, var(--d-success) 14%, transparent);
  color: var(--d-success);
}

/* ── fd-sector-dot: Small colored dot for legends ── */
.fd-sector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ── fd-icon-chip: Square icon container ── */
.fd-icon-chip {
  width: 32px;
  height: 32px;
  border-radius: var(--d-radius-sm);
  background: color-mix(in srgb, var(--d-accent) 12%, transparent);
  color: var(--d-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

} /* end @layer decorators */
