/* Extensi ERP — Director Workspace tokens */

:root {
  /* surfaces */
  --paper: oklch(0.985 0.004 75);
  --paper-2: oklch(0.975 0.006 75);
  --paper-3: oklch(0.965 0.008 75);
  --hairline: oklch(0.92 0.005 75);
  --hairline-strong: oklch(0.86 0.006 75);

  /* ink */
  --ink-950: #0A0F1C;
  --ink-900: #0F172A;
  --ink-800: #172033;
  --ink-700: #1E293B;
  --ink-500: #475569;
  --ink-400: #64748B;
  --ink-300: #94A3B8;
  --ink-200: #CBD5E1;

  /* brand */
  --blue-700: #1E3A8A;
  --blue-600: #1E40AF;
  --blue-500: #2563EB;
  --blue-400: #3B82F6;
  --blue-300: #60A5FA;

  /* accent */
  --orange-600: #C2410C;
  --orange-500: #E25822;
  --orange-400: #F97316;
  --orange-300: #F59E6B;

  /* status */
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --warn: #D97706;
  --warn-bg: #FEF3C7;
  --ok: #059669;
  --ok-bg: #D1FAE5;
  --info: #0369A1;

  /* shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.06);
  --shadow-glow-blue: 0 8px 24px rgba(30, 64, 175, 0.16), 0 2px 6px rgba(30, 64, 175, 0.08);
  --shadow-glow-orange: 0 8px 24px rgba(226, 88, 34, 0.18), 0 2px 6px rgba(226, 88, 34, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: 'Geist', 'Inter', -apple-system, sans-serif;
  font-feature-settings: 'ss01', 'ss03', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: contextual;
}

.serif {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-feature-settings: 'tnum', 'zero';
}

.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* canvas */
.workspace {
  width: 1440px;
  min-height: 900px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

/* ambient texture — barely-there grid */
.workspace::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.93 0.005 75) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.93 0.005 75) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 80%);
}

/* ====== TOP BAR ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(30, 64, 175, 0.04),
    0 1px 0 rgba(15, 23, 42, 0.02);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--ink-900) 0%, var(--blue-600) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 2px 6px rgba(30,64,175,0.32);
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255,255,255,0.92);
  border-radius: 3px;
  border-bottom-color: var(--orange-500);
  border-right-color: var(--orange-500);
  transform: rotate(0deg);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-400);
  font-size: 13px;
  font-weight: 500;
}
.breadcrumb .sep { color: var(--ink-200); }
.breadcrumb .current { color: var(--ink-900); font-weight: 600; }

.search {
  flex: 1;
  max-width: 480px;
  height: 36px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  color: var(--ink-400);
  font-size: 13px;
  cursor: text;
  transition: all 160ms;
}
.search:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: var(--hairline);
}
.search .kbd {
  margin-left: auto;
  display: flex;
  gap: 3px;
}
.kbd-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255,255,255,0.9);
  color: var(--ink-500);
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 1.5px;
  border-radius: 4px;
  padding: 1px 5px;
  min-width: 18px;
  text-align: center;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-500);
  cursor: pointer;
  position: relative;
  transition: all 160ms;
}
.icon-btn:hover { background: rgba(15,23,42,0.05); color: var(--ink-900); }
.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--orange-500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--paper), 0 2px 4px rgba(226,88,34,0.4);
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366F1 0%, #1E40AF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(30,64,175,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
  cursor: pointer;
  position: relative;
}
.avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--paper);
}

/* ====== HERO ====== */
.hero {
  position: relative;
  height: 180px;
  margin: 16px 24px 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: white;
  isolation: isolate;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 15% 20%, rgba(30, 64, 175, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 400px 280px at 90% 110%, rgba(226, 88, 34, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 500px 200px at 60% -20%, rgba(99, 102, 241, 0.30) 0%, transparent 60%);
  z-index: 0;
}
.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.6 0 0 0 0 0.7 0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 1;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 50%, black 0%, transparent 70%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 36px;
  gap: 32px;
}

.hero-greeting {
  flex: 0 0 auto;
}
.hero-greeting .small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-greeting h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: white;
}
.hero-greeting h1 .name {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(180deg, #fff 0%, #C7D2FE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 4px;
}
.hero-greeting .date {
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  font-variant-numeric: tabular-nums;
}

.hero-divider {
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.18), transparent);
}

.hero-objects {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-objects .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.hero-objects .value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hero-objects .value .unit {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0;
}

.hero-weather {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.weather-card {
  width: 152px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.weather-card .city {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.weather-card .city .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}
.weather-card .temp {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}
.weather-card .cond {
  font-size: 10.5px;
  color: rgba(255,255,255,0.55);
}
.weather-card .spark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  width: 100%;
}

/* ====== KPI ====== */
.kpi-grid {
  margin: 16px 24px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kpi {
  height: 140px;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  padding: 16px 18px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms;
  box-shadow: var(--shadow-xs);
  isolation: isolate;
}
.kpi:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-blue);
  border-color: oklch(0.86 0.02 250);
}
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}
.kpi-head .ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  border: 1px solid var(--hairline);
}
.kpi-value {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-950);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpi-value .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-400);
  letter-spacing: 0;
}
.kpi-delta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-delta.up { color: var(--ok); }
.kpi-delta.up-orange { color: var(--orange-500); }
.kpi-delta.warn { color: var(--warn); }
.kpi-delta.danger { color: var(--danger); }

.kpi-spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  pointer-events: none;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--ok);
  opacity: 0.4;
  animation: pulse 1.8s ease-out infinite;
}
.pulse-dot.danger { background: var(--danger); }
.pulse-dot.danger::before { background: var(--danger); }
.pulse-dot.warn { background: var(--warn); }
.pulse-dot.warn::before { background: var(--warn); }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* expiring countdown bar */
.expiry-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--paper-2);
}
.expiry-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--warn), var(--orange-500));
  width: 70%;
  position: relative;
}
.expiry-bar .fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  bottom: -2px;
  width: 7px;
  background: var(--orange-500);
  box-shadow: 0 0 8px var(--orange-500);
  animation: pulse-bar 1.4s ease-in-out infinite;
}
@keyframes pulse-bar {
  50% { opacity: 0.5; }
}

/* ====== MAP + ALERTS ROW ====== */
.row-map {
  margin: 16px 24px 0;
  display: grid;
  grid-template-columns: 750px 1fr;
  gap: 16px;
}

.map-card {
  height: 420px;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 280px;
}

.map-canvas {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 30%, oklch(0.97 0.01 240) 0%, var(--paper-2) 60%, var(--paper) 100%);
  overflow: hidden;
}
.map-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.92 0.005 240) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.92 0.005 240) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
  pointer-events: none;
}

.chips {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 5;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.chip {
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  cursor: pointer;
  transition: all 140ms;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip.active {
  background: var(--ink-900);
  color: white;
  box-shadow: 0 1px 2px rgba(15,23,42,0.2);
}
.chip:not(.active):hover { background: var(--paper-2); color: var(--ink-900); }
.chip .count {
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  opacity: 0.7;
}

.map-legend {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  gap: 14px;
  font-size: 10.5px;
  color: var(--ink-400);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 10px;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; }

.map-coord {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--ink-300);
  letter-spacing: 0.04em;
}

/* objects sidebar */
.objects-side {
  border-left: 1px solid var(--hairline);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.objects-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.objects-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}
.objects-head .total {
  font-size: 11px;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}
.objects-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.object-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 120ms;
  position: relative;
}
.object-item:hover { background: white; }
.object-item.active {
  background: white;
  box-shadow: inset 3px 0 0 var(--blue-600);
}
.object-item .row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.object-item .name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.object-item .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--ink-300);
  font-weight: 500;
  flex-shrink: 0;
}
.object-item .row2 {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: var(--ink-400);
}
.object-item .stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.object-item .delay-pill {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}
.delay-ok { background: var(--ok-bg); color: var(--ok); }
.delay-warn { background: var(--warn-bg); color: var(--warn); }
.delay-danger { background: var(--danger-bg); color: var(--danger); }

/* ====== ALERTS ====== */
.alerts-card {
  height: 420px;
  background: linear-gradient(180deg, white 0%, var(--paper-2) 100%);
  border-radius: 14px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}
.alerts-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: radial-gradient(ellipse at top, rgba(220, 38, 38, 0.05), transparent);
  pointer-events: none;
}

.alerts-head {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}
.alerts-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.alerts-head .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 var(--danger);
  animation: pulse-glow 2s ease-out infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); }
  100% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.alerts-list {
  flex: 1;
  overflow-y: auto;
}
.alert-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 140ms;
  position: relative;
}
.alert-item:hover { background: rgba(255,255,255,0.7); }
.alert-item:last-child { border-bottom: none; }

.alert-item .sev-bar {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.alert-item.danger .sev-bar { background: var(--danger); }
.alert-item.warn .sev-bar { background: var(--warn); }
.alert-item.info .sev-bar { background: var(--blue-500); }

.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
}
.alert-item.danger .alert-icon { color: var(--danger); background: var(--danger-bg); border-color: rgba(220,38,38,0.18); }
.alert-item.warn .alert-icon { color: var(--warn); background: var(--warn-bg); border-color: rgba(217,119,6,0.18); }
.alert-item.info .alert-icon { color: var(--blue-600); background: #DBEAFE; border-color: rgba(30,64,175,0.18); }

.alert-body { flex: 1; min-width: 0; }
.alert-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.35;
}
.alert-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-400);
}
.alert-meta .src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--ink-500);
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--hairline);
}
.alert-meta .time { font-variant-numeric: tabular-nums; }

/* ====== PAYMENTS CALENDAR ====== */
.payments {
  margin: 16px 24px 24px;
  height: 200px;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 240px;
  overflow: hidden;
}

.payments-bars {
  padding: 14px 18px 14px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.payments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.payments-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}
.payments-head .legend {
  display: flex;
  gap: 14px;
  font-size: 10.5px;
  color: var(--ink-400);
}
.payments-head .legend-item { display: flex; align-items: center; gap: 5px; }
.payments-head .legend-swatch { width: 8px; height: 8px; border-radius: 2px; }

.bars-canvas {
  flex: 1;
  position: relative;
  margin-top: 8px;
}

.payments-side {
  border-left: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--paper) 0%, white 100%);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.payments-side .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.payments-side .net {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  line-height: 1;
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.payments-side .net .unit {
  font-size: 13px;
  color: var(--ink-400);
  font-weight: 500;
}
.payments-side .sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-500);
}
.payments-side .breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.bd-cell .bd-label {
  font-size: 10.5px;
  color: var(--ink-400);
}
.bd-cell .bd-val {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  margin-top: 1px;
}
.bd-cell .bd-val.in { color: var(--ok); }
.bd-cell .bd-val.out { color: var(--orange-500); }

/* fade-in on load */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.d1 { animation-delay: 60ms; }
.d2 { animation-delay: 120ms; }
.d3 { animation-delay: 180ms; }
.d4 { animation-delay: 240ms; }
.d5 { animation-delay: 300ms; }
.d6 { animation-delay: 360ms; }
