/* ==========================================================================
   OMOS — Modul Setup Project & Master Konfigurasi Tambang (Isolated Data Plane)
   Design System: Industrial Mining Command Center (Taste Skill Refined)
   Palette: Obsidian Dark Slate + Heavy Equipment Amber & Telemetry Emerald
   ========================================================================== */

:root {
  /* Core Canvas & Surfaces */
  --sp-void: #090e17;
  --sp-surface-panel: #0d1522;
  --sp-surface-card: #111b2b;
  --sp-surface-card-hover: #162438;
  
  /* Hairline Precision Borders */
  --sp-hairline: #223246;
  --sp-hairline-strong: #334862;
  --sp-hairline-focus: rgba(242, 169, 59, 0.45);
  
  /* Semantic Accent Hierarchy */
  --sp-accent-amber: #f2a93b;        /* Mining / Equipment Action */
  --sp-accent-gold: #ffc467;         /* KTT Leadership / Highlight */
  --sp-accent-emerald: #10b981;      /* Operational Ready / Save Status */
  --sp-accent-cyan: #38bdf8;         /* Canvas Hierarchy / Telemetry Trace */
  --sp-accent-indigo: #818cf8;       /* Superintendent Management */
  --sp-accent-crimson: #e11d48;      /* Destructive Action / Warning */
  
  /* Typography Tokens */
  --sp-text-main: #f1f5f9;
  --sp-text-muted: #94a3b8;
  --sp-text-subtle: #64748b;
}

/* Base Wrapper */
.setup-project-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 56px;
  color: var(--sp-text-main);
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  user-select: text;
}

.setup-project-wrap * {
  box-sizing: border-box;
}

/* ==========================================================================
   1. TOP TELEMETRY HEADER CARD (COMMAND CENTER DOCK)
   ========================================================================== */
.sp-header {
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease;
}

.sp-header:hover {
  border-color: var(--sp-hairline-strong);
}

.sp-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sp-header__logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(242, 169, 59, 0.45);
  background: var(--sp-void);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.sp-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-header__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-header__title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 800;
  color: var(--sp-text-main);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-header__badge {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--sp-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sp-header__sub {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: var(--sp-text-muted);
  font-weight: 500;
}

.sp-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-site-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  color: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.sp-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sp-accent-emerald);
  box-shadow: 0 0 8px var(--sp-accent-emerald);
  animation: sp-pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes sp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 4px var(--sp-accent-emerald)); }
  50% { opacity: 0.35; transform: scale(0.85); filter: drop-shadow(0 0 1px var(--sp-accent-emerald)); }
}

.sp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  background: linear-gradient(135deg, #f2a93b 0%, #e0921f 100%);
  color: #1a1205;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(242, 169, 59, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-btn-primary:hover {
  background: linear-gradient(135deg, #ffc467 0%, #f2a93b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242, 169, 59, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.sp-btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(242, 169, 59, 0.25);
}

.sp-btn-primary:focus-visible,
.sp-btn-secondary:focus-visible,
.sp-btn-danger:focus-visible,
.sp-tab-btn:focus-visible,
.sp-subnav-btn:focus-visible,
.sp-hud-btn:focus-visible,
.sp-dept-filter-btn:focus-visible {
  outline: 2px solid var(--sp-accent-amber);
  outline-offset: 2px;
}

/* ==========================================================================
   2. TOP TABS NAVIGATION DOCK (SEGMENTED CAPSULE)
   ========================================================================== */
.sp-tabs-nav {
  display: flex;
  gap: 4px;
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 12px;
  padding: 5px;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.sp-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sp-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sp-tab-btn:hover {
  color: #ffffff;
  background: var(--sp-surface-card-hover);
}

.sp-tab-btn.is-active {
  color: var(--sp-text-main);
  background: rgba(242, 169, 59, 0.12);
  border-color: rgba(242, 169, 59, 0.4);
  box-shadow: inset 3px 0 0 var(--sp-accent-amber), 0 2px 8px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.sp-badge-tab {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  padding: 2px 7px;
  border-radius: 5px;
  background: #1c2b40;
  color: var(--sp-text-muted);
  font-weight: 600;
}

.sp-tab-btn.is-active .sp-badge-tab {
  background: rgba(242, 169, 59, 0.22);
  color: var(--sp-accent-gold);
}

/* ==========================================================================
   3. TAB CONTENTS LAYOUT & GLASS PANELS
   ========================================================================== */
.sp-tab-pane {
  display: none;
  animation: sp-pane-fade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sp-pane-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sp-tab-pane.is-active {
  display: block;
}

.sp-grid-2 {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 18px;
}

@media (max-width: 960px) {
  .sp-grid-2 {
    grid-template-columns: 1fr;
  }
}

.sp-card {
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.sp-card:hover {
  border-color: var(--sp-hairline-strong);
}

.sp-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sp-hairline);
}

.sp-card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sp-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

/* Form inputs & controls */
.sp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .sp-form-row {
    grid-template-columns: 1fr;
  }
}

.sp-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sp-text-muted);
  letter-spacing: 0.01em;
}

.sp-label span {
  color: var(--sp-accent-amber);
}

.sp-input,
.sp-select,
.sp-textarea {
  width: 100%;
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  color: var(--sp-text-main);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sp-input::placeholder,
.sp-textarea::placeholder {
  color: #607188;
}

.sp-input:focus,
.sp-select:focus,
.sp-textarea:focus {
  border-color: var(--sp-accent-amber);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sp-input[type="number"] {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.sp-textarea {
  resize: vertical;
  min-height: 72px;
}

.sp-file-upload-box,
.sp-upload-zone {
  border: 2px dashed var(--sp-hairline-strong);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: var(--sp-void);
  transition: all 0.18s ease;
}

.sp-file-upload-box:hover,
.sp-upload-zone:hover {
  border-color: var(--sp-accent-amber);
  background: rgba(242, 169, 59, 0.05);
}

/* Live Kop Surat Preview (Holographic Preview) */
.sp-preview-paper {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-family: 'Times New Roman', Times, serif;
  position: relative;
  overflow: hidden;
  user-select: text;
}

.sp-preview-paper__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 38px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.04);
  letter-spacing: 0.15em;
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.sp-kop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  gap: 14px;
}

.sp-kop-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.sp-kop-text {
  flex: 1;
  text-align: center;
}

.sp-kop-company {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.sp-kop-site {
  font-size: 11px;
  font-weight: 700;
  margin: 2px 0 0 0;
  color: #334155;
}

.sp-kop-iup {
  font-size: 9.5px;
  font-family: 'Courier New', Courier, monospace;
  margin: 3px 0 0 0;
  color: #475569;
}

.sp-kop-address {
  font-size: 9px;
  margin: 2px 0 0 0;
  color: #64748b;
  font-style: italic;
}

/* ==========================================================================
   4. TAB 2: OPERASIONAL & SHIFT (TACTILE COCKPIT BUTTONS)
   ========================================================================== */
.sp-tz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sp-tz-card {
  padding: 14px;
  border-radius: 11px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sp-tz-card:hover {
  border-color: rgba(242, 169, 59, 0.5);
  transform: translateY(-1px);
}

.sp-tz-card.is-active {
  border: 2px solid var(--sp-accent-amber);
  background: rgba(242, 169, 59, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sp-tz-card__title {
  font-size: 13.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sp-tz-card.is-active .sp-tz-card__title {
  color: var(--sp-accent-gold);
}

.sp-tz-card__sub {
  font-size: 11px;
  color: var(--sp-text-muted);
}

/* Shift Count Selector */
.sp-shift-count-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sp-shift-count-btn {
  padding: 14px;
  border-radius: 11px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-shift-count-btn:hover {
  border-color: rgba(242, 169, 59, 0.5);
  transform: translateY(-1px);
}

.sp-shift-count-btn.is-active {
  border: 2px solid var(--sp-accent-amber);
  background: rgba(242, 169, 59, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sp-shift-count-btn__num {
  font-size: 16px;
  font-weight: 900;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  color: #f8fafc;
}

.sp-shift-count-btn.is-active .sp-shift-count-btn__num {
  color: var(--sp-accent-gold);
}

.sp-shift-count-btn__sub {
  font-size: 11px;
  color: var(--sp-text-muted);
}

/* ==========================================================================
   5. TAB 3: MASTER PIT & AREA (TOPOGRAPHICAL CONTOUR)
   ========================================================================== */
.sp-pit-card {
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.sp-pit-card:hover {
  border-color: var(--sp-hairline-strong);
}

.sp-pit-card__head {
  background: var(--sp-void);
  padding: 13px 20px;
  border-bottom: 1px solid var(--sp-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-pit-sub-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.sp-sub-area-item {
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.sp-sub-area-item:hover {
  border-color: rgba(242, 169, 59, 0.4);
}

/* ==========================================================================
   6. TAB 4: STRUKTUR ORGANISASI & DOM INFINITE CANVAS (MATRIX DOT GRID)
   ========================================================================== */
.sp-subnav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sp-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sp-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-subnav-btn:hover {
  color: #ffffff;
  background: var(--sp-surface-card-hover);
}

.sp-subnav-btn.is-active {
  background: var(--sp-accent-amber);
  color: #1a1205;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(242, 169, 59, 0.35);
  font-weight: 800;
}

.sp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sp-search-box {
  position: relative;
  width: 270px;
}

.sp-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border-radius: 9px;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  color: var(--sp-text-main);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.sp-search-input:focus {
  border-color: var(--sp-accent-amber);
  box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.2);
}

.sp-search-icon {
  position: absolute;
  left: 10px;
  top: 9px;
  color: #64748b;
  pointer-events: none;
}

.sp-clear-search {
  position: absolute;
  right: 10px;
  top: 7px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

.sp-dept-filter-group {
  display: flex;
  align-items: center;
  background: var(--sp-void);
  border: 1px solid var(--sp-hairline);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  max-width: 560px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.sp-dept-filter-group::-webkit-scrollbar {
  height: 4px;
}

.sp-dept-filter-group::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.sp-dept-filter-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.sp-dept-filter-btn.is-active {
  background: rgba(242, 169, 59, 0.15);
  color: var(--sp-accent-gold);
  font-weight: 700;
}

/* DOM Infinite Canvas Workspace (Matrix Dot Grid) */
.grid-infinite-canvas {
  background-color: #0b1524;
  background-image:
    radial-gradient(rgba(145, 161, 181, 0.16) 1.2px, transparent 1.2px),
    radial-gradient(circle at center, rgba(6, 182, 212, 0.04) 0%, transparent 75%);
  background-size: 22px 22px, 100% 100%;
}

#infiniteViewport {
  width: 100%;
  height: 660px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--sp-hairline);
  box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.65);
  cursor: grab;
  user-select: none;
}

#infiniteViewport.is-panning {
  cursor: grabbing !important;
}

#worldContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  pointer-events: none;
}

#svgConnectors {
  position: absolute;
  top: -4000px;
  left: -4000px;
  width: 8000px;
  height: 8000px;
  pointer-events: auto;
  z-index: 10;
  overflow: visible;
}

#cardsLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: auto;
  z-index: 20;
}

/* Card Hierarchy Nodes */
.org-card {
  position: absolute;
  width: 260px;
  border-radius: 12px;
  background: #111e31;
  border: 1px solid #364b66;
  color: #f1f5f9;
  padding: 13px 15px;
  box-shadow: 0 10px 25px -4px rgba(4, 11, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.2s ease;
}

.org-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 169, 59, 0.7);
  box-shadow: 0 14px 30px -4px rgba(4, 11, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.org-card.selected {
  border-color: var(--sp-accent-amber) !important;
  box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.3), 0 14px 36px rgba(4, 11, 20, 0.6) !important;
}

.org-card.highlight-search {
  animation: sp-pulse-ring 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  border-color: var(--sp-accent-amber) !important;
}

@keyframes sp-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8); }
  70% { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.org-card.dimmed {
  opacity: 0.2;
  filter: grayscale(0.8);
  pointer-events: none;
}

.org-card.drop-target-valid {
  border-color: var(--sp-accent-emerald) !important;
  background: rgba(16, 185, 129, 0.2) !important;
  transform: scale(1.04);
}

/* Crisp & Contrasting Hierarchy Connector Lines */
.connector-path {
  fill: none;
  stroke: #4d94d4;
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.45));
}

/* Floating HUD Controls */
.sp-hud-stats {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 40;
  background: #111e31;
  border: 1px solid var(--sp-hairline);
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.sp-hud-controls {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 40;
  background: #111e31;
  border: 1px solid var(--sp-hairline);
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.sp-hud-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #1c2b40;
  border: 1px solid var(--sp-hairline);
  color: #cbd5e1;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sp-hud-btn:hover {
  background: #253750;
  color: #ffffff;
  border-color: var(--sp-accent-amber);
}

/* FLOATING INSPECTOR DRAWER (3 FIELD: DEPARTEMEN, NAMA JABATAN, ATASAN LANGSUNG) */
.sp-inspector-drawer {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 40;
  width: 320px;
  background: #111e31;
  border: 1px solid rgba(242, 169, 59, 0.35);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 16px rgba(242, 169, 59, 0.1);
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: sp-drawer-slide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sp-drawer-slide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.sp-inspector-drawer.is-open {
  display: flex;
}

.sp-inspector-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sp-hairline);
}

.sp-drawer-badge {
  font-size: 10px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(242, 169, 59, 0.12);
  color: var(--sp-accent-amber);
  border: 1px solid rgba(242, 169, 59, 0.3);
  font-weight: 700;
  text-transform: uppercase;
}

.sp-drawer-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0 0 0;
  letter-spacing: -0.01em;
}

.sp-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #1c2b40;
  border: 1px solid var(--sp-hairline);
  color: var(--sp-text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.sp-close-btn:hover {
  background: #253750;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   7. SUB-TAB 3: CUSTOM MASTER (INLINE ADD-ROW)
   ========================================================================== */
.sp-inline-add-row {
  border-left: 3px solid var(--sp-accent-amber);
  transition: all 0.2s ease;
}

/* Toast Feedback */
.sp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #163d32;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(54, 185, 135, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(16, 185, 129, 0.25);
  font-weight: 700;
  font-size: 13px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-toast.is-show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   8. Custom In-App Modal Dialog System (Obsidian Glass Box)
   ========================================================================== */
.sp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 13, 24, 0.82);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: sp-fade-in 0.18s ease;
}

@keyframes sp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sp-modal-box {
  background: var(--sp-surface-panel);
  border: 1px solid var(--sp-hairline-strong);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: sp-scale-up 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sp-scale-up {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.sp-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sp-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--sp-text-main);
  letter-spacing: -0.01em;
}

.sp-modal-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--sp-text-muted);
  line-height: 1.45;
}

.sp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--sp-hairline);
}

.sp-btn-secondary {
  padding: 8px 16px;
  border-radius: 9px;
  background: #1c2b40;
  border: 1px solid var(--sp-hairline);
  color: var(--sp-text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sp-btn-secondary:hover {
  background: #253750;
  color: #ffffff;
  border-color: var(--sp-hairline-strong);
}

.sp-btn-danger {
  padding: 8px 16px;
  border-radius: 9px;
  background: #b84f58;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(184, 79, 88, 0.35);
  transition: all 0.15s ease;
}

.sp-btn-danger:hover {
  background: #d3606a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(211, 96, 106, 0.45);
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS & ACCESSIBILITY
   ========================================================================== */
@media (max-width: 640px) {
  .setup-project-wrap { padding: 12px 12px 36px; }
  .sp-header { padding: 12px; }
  .sp-header__right { width: 100%; justify-content: space-between; }
  .sp-site-pill { max-width: calc(100vw - 148px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-card { padding: 16px; }
  #infiniteViewport { height: 540px; }
  .sp-inspector-drawer { top: auto; right: 10px; bottom: 10px; width: min(320px, calc(100% - 20px)); }
}

@media (prefers-reduced-motion: reduce) {
  .sp-tab-pane,
  .sp-modal-overlay,
  .sp-modal-box,
  .sp-inspector-drawer,
  .org-card,
  .sp-btn-primary,
  .sp-btn-danger,
  .sp-pulse-dot {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   10. MASTER DATA: STATUS, SHIFT BERVERSI, PIT, BAGAN (Fase 1)
   ========================================================================== */
.sp-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(242, 169, 59, 0.14);
  color: var(--sp-accent-amber);
  border: 1px solid rgba(242, 169, 59, 0.35);
}

.sp-status-badge.is-active {
  background: rgba(16, 185, 129, 0.14);
  color: var(--sp-accent-emerald);
  border-color: rgba(16, 185, 129, 0.35);
}

.sp-banner {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--sp-hairline-strong);
  background: var(--sp-surface-card);
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sp-hint {
  font-size: 11px;
  color: var(--sp-text-subtle);
  line-height: 1.4;
}

.sp-tab-btn.is-dirty::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sp-accent-amber);
  margin-left: 6px;
}

button.sp-tz-card {
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
}

.sp-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 8px;
}

.sp-time-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--sp-text-muted);
}

.sp-mono-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #1e293b;
  color: #cbd5e1;
  font-family: 'IBM Plex Mono', monospace;
}

.sp-pit-card.is-inactive,
.org-card.is-inactive {
  opacity: 0.55;
}

.sp-flow-tree,
.sp-flow-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.sp-flow-tree ul {
  padding-top: 18px;
  border-top: 1px solid var(--sp-hairline-strong);
  margin-top: 18px;
}

.sp-flow-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sp-flow-node {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--sp-hairline-strong);
  background: #020617;
  text-align: center;
  min-width: 150px;
  max-width: 220px;
}

.sp-flow-node__dept {
  font-size: 9px;
  color: var(--sp-accent-amber);
  font-weight: 700;
  text-transform: uppercase;
}

.sp-flow-node__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-text-main);
}

@media (max-width: 640px) {
  .sp-time-grid { grid-template-columns: 1fr; }
}

button.sp-tz-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#spBtnAddCustomDept {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  border: 1px solid #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
}

#spBtnAddCustomDept:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5) !important;
  color: #ffffff !important;
}

/* Canvas Susun Hierarki: identitas jabatan baca-saja, jabatan dikelola di tab Master */
.sp-readonly-field {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--sp-hairline-strong);
  background: rgba(2, 6, 23, 0.6);
  color: var(--sp-text-main);
  font-size: 13px;
}

.sp-canvas-empty {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(420px, 90%);
  height: fit-content;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
  border-radius: 14px;
  border: 1px solid var(--sp-hairline-strong);
  background: var(--sp-surface-card);
  color: var(--sp-text-muted);
  font-size: 13px;
}

.sp-canvas-empty[hidden] {
  display: none;
}

.sp-canvas-empty strong {
  color: var(--sp-text-main);
  font-size: 15px;
}

.sp-master-highlight {
  background: rgba(56, 189, 248, 0.14);
  transition: background 0.3s ease;
}


/* ==========================================================================
   11. TEMA "NEON CONTROL ROOM" (gaya LaunchDarkly, refero.design) — 22 Okt 2026
   Berlaku untuk seluruh Setup Project KECUALI canvas Susun Hierarki
   (#subtab-hierarki), yang tetap memakai gaya di atas.
   Aturan: kanvas charcoal, satu-satunya aksen violet-biru, sudut pil,
   elevasi lewat glow (bukan bayangan), angka/kode memakai mono.
   ========================================================================== */
.setup-project-wrap.sp-ld {
  --ld-ink: #0e0e0e;
  --ld-carbon: #191919;
  --ld-well: #111111;
  --ld-smoke: #2c2c2c;
  --ld-graphite: #414042;
  --ld-steel: #58595b;
  --ld-slate: #6d6e71;
  --ld-fog: #a7a9ac;
  --ld-ash: #d1d3d4;
  --ld-paper: #ffffff;
  --ld-voltage: #405bff;
  --ld-signal: #7084ff;
  --ld-grad: linear-gradient(179deg, #405bff 1.06%, #7084ff 123.42%);
  --ld-glow: 0 0 0 1px rgba(112, 132, 255, 0.35), 0 0 28px rgba(64, 91, 255, 0.22);
  --ld-hair: rgba(255, 255, 255, 0.09);
  --ld-danger: #f0717d;
  --ld-display: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --ld-mono: 'IBM Plex Mono', ui-monospace, monospace;

  position: relative;
  isolation: isolate;
  overflow: clip;
  gap: 24px;
  padding: 28px 28px 64px;
  background: var(--ld-ink);
  border-radius: 28px;
  color: var(--ld-paper);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px;
}
/* Cahaya ambien violet di pojok kanan atas */
.setup-project-wrap.sp-ld::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 620px;
  height: 620px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(64, 91, 255, 0.2), rgba(112, 132, 255, 0.06) 55%, transparent 75%);
}

/* ---------- Hero ---------- */
.sp-ld .sp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 32px;
  padding: 24px 4px 8px;
  background: none;
  border: 0;
  box-shadow: none;
  min-height: 0;
}
.sp-ld .sp-hero:hover { border-color: transparent; }
.sp-ld .sp-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--ld-fog);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sp-ld .sp-eyebrow strong { color: var(--ld-paper); font-weight: 500; }
.sp-ld .sp-header__logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ld-paper);
  border: 0;
  box-shadow: 0 0 18px rgba(64, 91, 255, 0.45);
  flex: none;
}
.sp-ld .sp-header__logo img { width: 100%; height: 100%; object-fit: contain; }
.sp-ld .sp-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ld-signal);
  box-shadow: 0 0 10px var(--ld-signal);
  flex: none;
}
.sp-ld .sp-header__title {
  display: block;
  margin: 0;
  font-family: var(--ld-display);
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ld-paper);
}
.sp-ld .sp-hero__accent {
  background: var(--ld-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sp-ld .sp-header__sub {
  margin: 18px 0 0;
  max-width: 600px;
  color: var(--ld-ash);
  font-size: 16px;
  line-height: 1.55;
}

/* Status: pil bergaris violet; Aktif = terisi gradien */
.sp-ld .sp-status-badge {
  background: transparent;
  color: var(--ld-signal);
  border: 1px solid var(--ld-voltage);
  border-radius: 30px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.sp-ld .sp-status-badge.is-active {
  background: var(--ld-grad);
  color: var(--ld-paper);
  border-color: transparent;
  box-shadow: 0 0 14px rgba(64, 91, 255, 0.5);
}

/* Panel kesiapan aktivasi */
.sp-ld .sp-ready {
  background: var(--ld-carbon);
  border: 1px solid var(--ld-hair);
  border-radius: 30px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sp-ld .sp-ready__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sp-ld .sp-ready__head strong { font-size: 15px; font-weight: 500; }
.sp-ld .sp-ready__head span { color: var(--ld-fog); font-size: 12px; font-family: var(--ld-mono); }
.sp-ld .sp-ready__meter { height: 6px; border-radius: 6px; background: var(--ld-smoke); overflow: hidden; }
.sp-ld .sp-ready__meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ld-grad);
  box-shadow: 0 0 12px rgba(112, 132, 255, 0.7);
  transition: width 0.4s ease;
}
.sp-ld .sp-ready__list,
.sp-ld .sp-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.sp-ld .sp-checklist { margin-top: 18px; }
.sp-ld .sp-ready__list li,
.sp-ld .sp-checklist li { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--ld-paper); }
.sp-ld .sp-ready__list li.is-todo { color: var(--ld-fog); }
.sp-ld .sp-ready__list li em { font-style: normal; color: var(--ld-slate); font-size: 11px; margin-left: auto; }
.sp-ld .sp-ck {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 11px;
  background: rgba(64, 91, 255, 0.16);
  border: 1px solid var(--ld-voltage);
  color: var(--ld-signal);
}
.sp-ld .is-todo .sp-ck { background: transparent; border: 1px dashed var(--ld-steel); }
.sp-ld .sp-ready .sp-btn-primary { width: 100%; justify-content: center; }

/* Banner status → catatan violet */
.sp-ld .sp-banner,
.sp-ld .sp-note {
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(112, 132, 255, 0.35);
  background: rgba(64, 91, 255, 0.07);
  border-radius: 18px;
  padding: 13px 16px;
  color: var(--ld-ash);
  font-size: 13px;
  line-height: 1.55;
}
.sp-ld .sp-note { display: flex; }
.sp-ld .sp-note b { color: var(--ld-paper); font-weight: 500; }
.sp-ld .sp-note__ic { color: var(--ld-signal); font-family: var(--ld-mono); flex: none; }

/* ---------- Kontrol tab tersegmen ---------- */
.sp-ld .sp-tabs-nav {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  background: var(--ld-carbon);
  border: 1px solid var(--ld-hair);
  border-radius: 30px;
}
.sp-ld .sp-tabs-nav { scrollbar-width: none; }
.sp-ld .sp-tabs-nav::-webkit-scrollbar { display: none; }
.sp-ld .sp-tab-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 0;
  border-radius: 30px;
  background: transparent;
  color: var(--ld-ash);
  font: 500 14px/1 'IBM Plex Sans', sans-serif;
  white-space: nowrap;
  box-shadow: none;
}
.sp-ld .sp-tab-btn:hover { color: var(--ld-paper); background: transparent; }
.sp-ld .sp-tab-btn.is-active {
  background: #232323;
  color: var(--ld-paper);
  box-shadow: inset 0 0 0 1px var(--ld-hair);
  border: 0;
}
.sp-ld .sp-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex: none; }
.sp-ld .sp-tab-btn.is-active .sp-tab-dot { background: var(--ld-voltage); box-shadow: 0 0 8px var(--ld-voltage); }
.sp-ld .sp-tab-num { font-family: var(--ld-mono); font-size: 12px; color: var(--ld-slate); }
.sp-ld .sp-badge-tab,
.sp-ld .sp-tab-btn.is-active .sp-badge-tab {
  font-family: var(--ld-mono);
  font-size: 11px;
  color: var(--ld-fog);
  background: transparent;
  border: 1px solid var(--ld-graphite);
  border-radius: 20px;
  padding: 2px 8px;
}
.sp-ld .sp-tab-btn.is-dirty::after { background: var(--ld-signal); box-shadow: 0 0 8px var(--ld-signal); }

/* ---------- Kartu ---------- */
.sp-ld .sp-grid-2 { gap: 20px; }
.sp-ld .sp-card {
  background: var(--ld-carbon);
  border: 1px solid var(--ld-hair);
  border-radius: 30px;
  padding: 28px 30px;
  box-shadow: none;
  gap: 18px;
}
.sp-ld .sp-card:hover { border-color: var(--ld-hair); }
.sp-ld .sp-card__head { align-items: flex-start; gap: 16px; padding: 0; border: 0; margin: 0 0 4px; }
.sp-ld .sp-card__title {
  margin: 0;
  font-family: var(--ld-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ld-paper);
  text-transform: none;
}
.sp-ld .sp-card__desc { margin: 6px 0 0; color: var(--ld-fog); font-size: 13px; line-height: 1.5; max-width: 560px; }
.sp-ld .sp-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 4px 18px; }
.sp-ld .sp-section-title { margin: 0; font-family: var(--ld-display); font-size: 26px; font-weight: 500; letter-spacing: -0.015em; color: var(--ld-paper); }
.sp-ld .sp-divided { padding-top: 18px; border-top: 1px solid var(--ld-smoke); }
.sp-ld .sp-muted-text { color: var(--ld-fog); font-size: 13px; }
.sp-ld .sp-empty { padding: 28px; text-align: center; color: var(--ld-fog); font-size: 14px; border: 1px dashed var(--ld-steel); border-radius: 24px; }

/* ---------- Form (di luar canvas) ---------- */
.sp-ld .sp-label:not(#subtab-hierarki *) {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ld-fog);
}
.sp-ld .req { color: var(--ld-signal); }
.sp-ld .sp-form-group:not(#subtab-hierarki *) { gap: 8px; }
.sp-ld .sp-input:not(#subtab-hierarki *),
.sp-ld .sp-select:not(#subtab-hierarki *),
.sp-ld .sp-textarea:not(#subtab-hierarki *) {
  /* !important: style.css memaksa input terang secara global */
  background: var(--ld-well) !important;
  border: 1px solid var(--ld-steel) !important;
  border-radius: 10px;
  color: var(--ld-paper) !important;
  font-size: 14px;
  padding: 12px 14px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sp-ld .sp-input:not(#subtab-hierarki *)::placeholder { color: var(--ld-slate); }
.sp-ld .sp-input:not(#subtab-hierarki *):focus,
.sp-ld .sp-select:not(#subtab-hierarki *):focus,
.sp-ld .sp-textarea:not(#subtab-hierarki *):focus { outline: none; border-color: var(--ld-signal) !important; box-shadow: var(--ld-glow); }
.sp-ld .sp-input--mono,
.sp-ld input[type="time"].sp-input,
.sp-ld input[type="date"].sp-input { font-family: var(--ld-mono); color-scheme: dark; }
.sp-ld .sp-hint { font-size: 12px; color: var(--ld-slate); line-height: 1.5; }

/* ---------- Tombol (di luar canvas) ---------- */
.sp-ld .sp-btn-primary:not(#subtab-hierarki *),
.sp-modal-box .sp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #405bff;
  color: #ffffff;
  border: 0;
  border-radius: 30px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.sp-ld .sp-btn-primary:not(#subtab-hierarki *):hover,
.sp-modal-box .sp-btn-primary:hover { background: #405bff; box-shadow: 0 0 24px rgba(64, 91, 255, 0.55); transform: none; }
.sp-ld .sp-btn-primary:not(#subtab-hierarki *):active { transform: translateY(1px); }
.sp-ld #spBtnAddCustomDept,
.sp-ld #spBtnAddCustomDept:hover { background: #405bff; color: #ffffff; border: 0; }
.sp-ld #spBtnAddCustomDept:hover { box-shadow: 0 0 24px rgba(64, 91, 255, 0.55); }
.sp-ld .sp-btn-secondary,
.sp-ld .sp-subnav-btn:not(#subtab-hierarki *),
.sp-modal-box .sp-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #191919;
  color: #d1d3d4;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.sp-ld .sp-btn-secondary:hover,
.sp-ld .sp-subnav-btn:not(#subtab-hierarki *):hover,
.sp-modal-box .sp-btn-secondary:hover { color: #ffffff; border-color: #58595b; background: #202020; }
.sp-ld .sp-subnav-btn.is-active:not(#subtab-hierarki *) {
  color: #ffffff;
  border-color: #405bff;
  background: rgba(64, 91, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(112, 132, 255, 0.35), 0 0 22px rgba(64, 91, 255, 0.2);
}
/* Aksi hapus: netral, merah redup hanya saat diarahkan (aksen utama tetap violet) */
.sp-ld .sp-btn-danger,
.sp-ld .sp-btn-del-dept,
.sp-modal-box .sp-btn-danger {
  background: transparent;
  color: #a7a9ac;
  border: 1px solid #414042;
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}
.sp-ld .sp-btn-danger:hover,
.sp-ld .sp-btn-del-dept:hover,
.sp-modal-box .sp-btn-danger:hover { color: #f0717d; border-color: rgba(240, 113, 125, 0.55); background: rgba(240, 113, 125, 0.06); }
.sp-modal-box .sp-btn-danger { color: #f0717d; border-color: rgba(240, 113, 125, 0.55); }

.sp-ld .sp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ld-voltage);
  color: var(--ld-signal);
  border-radius: 30px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sp-ld .sp-tag--dim { border-color: var(--ld-graphite); color: var(--ld-fog); }
.sp-ld .sp-mono-chip:not(#subtab-hierarki *) {
  font-family: var(--ld-mono);
  font-size: 11px;
  color: var(--ld-signal);
  background: transparent;
  border: 1px solid rgba(112, 132, 255, 0.4);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ---------- Profil: logo & kop laporan (panel putih) ---------- */
.sp-ld .sp-upload-zone--row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 18px;
  text-align: left;
  border: 1px dashed var(--ld-steel);
  border-radius: 22px;
  background: transparent;
  cursor: pointer;
}
.sp-ld .sp-upload-zone--row:hover { border-color: var(--ld-signal); box-shadow: var(--ld-glow); }
.sp-ld .sp-logo-preview-box {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--ld-paper);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.sp-ld .sp-logo-preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sp-ld .sp-upload-zone__text { display: grid; gap: 3px; }
.sp-ld .sp-upload-zone__text strong { font-weight: 500; font-size: 14px; color: var(--ld-paper); }
.sp-ld .sp-upload-zone__text span { color: var(--ld-slate); font-size: 12px; }
.sp-ld .sp-kop-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  color: #111111;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 30px 60px -32px rgba(64, 91, 255, 0.5);
}
.sp-ld .sp-kop-card__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sp-ld .sp-kop-card__logo { width: 50px; height: 50px; border-radius: 12px; background: #eef0ff; display: grid; place-items: center; overflow: hidden; flex: none; }
.sp-ld .sp-kop-card__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sp-ld .sp-kop-card__company { font-weight: 600; font-size: 15px; color: #111111; }
.sp-ld .sp-kop-card__site { font-size: 12px; color: #555555; margin-top: 2px; }
.sp-ld .sp-kop-card__doc { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: #405bff; margin-top: 8px; }
.sp-ld .sp-kop-card__meta { font-family: var(--ld-mono); font-size: 11px; color: #444444; text-align: right; line-height: 1.7; white-space: nowrap; }
.sp-ld .sp-kop-card__meta strong { color: #111111; font-weight: 500; }

/* ---------- Shift ---------- */
.sp-ld .sp-tz-grid,
.sp-ld .sp-shift-count-grid { gap: 10px; }
.sp-ld .sp-tz-card,
.sp-ld .sp-shift-count-btn {
  position: relative;
  background: var(--ld-well);
  border: 1px solid var(--ld-graphite);
  border-radius: 20px;
  padding: 15px 16px;
  color: var(--ld-paper);
  box-shadow: none;
  text-align: left;
}
.sp-ld .sp-tz-card:hover,
.sp-ld .sp-shift-count-btn:hover { border-color: var(--ld-steel); background: var(--ld-well); }
.sp-ld .sp-tz-card.is-active,
.sp-ld .sp-shift-count-btn.is-active {
  border-color: var(--ld-voltage);
  box-shadow: var(--ld-glow);
  background: linear-gradient(180deg, rgba(64, 91, 255, 0.11), rgba(64, 91, 255, 0) 70%), var(--ld-well);
}
.sp-ld .sp-tz-card.is-active::after,
.sp-ld .sp-shift-count-btn.is-active::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ld-signal);
  box-shadow: 0 0 10px var(--ld-signal);
}
.sp-ld .sp-tz-card__title,
.sp-ld .sp-tz-card.is-active .sp-tz-card__title,
.sp-ld .sp-shift-count-btn__num,
.sp-ld .sp-shift-count-btn.is-active .sp-shift-count-btn__num { color: var(--ld-paper); font-size: 15px; font-weight: 500; }
.sp-ld .sp-tz-card__title span { display: none; }
.sp-ld .sp-tz-card__sub,
.sp-ld .sp-shift-count-btn__sub { color: var(--ld-fog); font-size: 12px; margin-top: 4px; }

.sp-ld .sp-shift-timeline {
  position: relative;
  height: 60px;
  margin-top: 6px;
  border-radius: 16px;
  background: var(--ld-well);
  border: 1px solid var(--ld-graphite);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.sp-ld .sp-tl-seg {
  position: absolute;
  top: 9px;
  bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid var(--ld-well);
}
.sp-ld .sp-tl-seg.is-primary { background: var(--ld-grad); color: var(--ld-paper); box-shadow: 0 0 22px rgba(64, 91, 255, 0.4); }
.sp-ld .sp-tl-seg.is-secondary { background: rgba(112, 132, 255, 0.16); color: var(--ld-ash); outline: 1px solid rgba(112, 132, 255, 0.5); outline-offset: -3px; }
.sp-ld .sp-tl-time { font-family: var(--ld-mono); font-weight: 400; opacity: 0.8; }
.sp-ld .sp-tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ld-paper); box-shadow: 0 0 12px var(--ld-paper); }
.sp-ld .sp-shift-ticks { display: flex; justify-content: space-between; font-family: var(--ld-mono); font-size: 11px; color: var(--ld-slate); margin-top: -8px; }

.sp-ld .sp-shift-rows { display: flex; flex-direction: column; border-top: 1px solid var(--ld-smoke); container-type: inline-size; }
.sp-ld .sp-shift-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--ld-smoke);
}
.sp-ld .sp-shift-row__num { font-family: var(--ld-mono); color: var(--ld-slate); font-size: 13px; padding-bottom: 13px; }
.sp-ld .sp-time-field { gap: 6px; color: var(--ld-fog); }
.sp-ld .sp-shift-duration { font-family: var(--ld-mono); font-size: 12px; color: var(--ld-fog); text-align: right; padding-bottom: 13px; }

.sp-ld .sp-code { background: var(--ld-well); border: 1px solid var(--ld-hair); border-radius: 16px; overflow: hidden; }
.sp-ld .sp-code__head { display: flex; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--ld-smoke); font-size: 12px; color: var(--ld-fog); font-family: var(--ld-mono); }
.sp-ld .sp-code__head .is-on { color: var(--ld-paper); }
.sp-ld .sp-code pre { margin: 0; padding: 14px 16px; font: 400 13px/1.65 var(--ld-mono); color: var(--ld-ash); overflow-x: auto; }
.sp-ld .sp-code__kw { color: var(--ld-signal); }
.sp-ld .sp-code__st { color: var(--ld-paper); }
.sp-ld .sp-code__cm { color: var(--ld-slate); }
.sp-ld #spUpcomingVersions ul { color: var(--ld-ash); }

/* ---------- Master Pit ---------- */
.sp-ld .sp-pit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.sp-ld .sp-pit-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ld-carbon);
  border: 1px solid var(--ld-hair);
  border-radius: 30px;
  padding: 26px;
  margin: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sp-ld .sp-pit-card:hover { border-color: rgba(112, 132, 255, 0.45); box-shadow: 0 0 28px rgba(64, 91, 255, 0.16); }
.sp-ld .sp-pit-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; }
.sp-ld .sp-pit-card__code { font-family: var(--ld-mono); font-size: 30px; font-weight: 500; letter-spacing: 0.02em; color: var(--ld-paper); line-height: 1.1; word-break: break-word; }
.sp-ld .sp-pit-card__name { margin-top: -8px; font-size: 15px; color: var(--ld-ash); }
.sp-ld .sp-pit-card__meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--ld-smoke); }
.sp-ld .sp-pit-card__meta dt { color: var(--ld-slate); }
.sp-ld .sp-pit-card__meta dd { margin: 0; text-align: right; color: var(--ld-ash); font-family: var(--ld-mono); font-size: 12px; }
.sp-ld .sp-pit-card__actions { display: flex; gap: 8px; margin-top: auto; }
.sp-ld .sp-pit-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 26px;
  text-align: center;
  background: transparent;
  border: 1px dashed var(--ld-steel);
  border-radius: 30px;
  color: var(--ld-fog);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sp-ld .sp-pit-add:hover { border-color: var(--ld-signal); box-shadow: 0 0 28px rgba(64, 91, 255, 0.16); }
.sp-ld .sp-pit-add strong { color: var(--ld-paper); font-weight: 500; font-size: 15px; }
.sp-ld .sp-pit-add__plus {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--ld-voltage);
  color: var(--ld-signal);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 6px;
  box-shadow: 0 0 20px rgba(64, 91, 255, 0.3);
}

/* ---------- Struktur organisasi: subnav, bagan, master ---------- */
.sp-ld .sp-subnav-bar { background: transparent; border: 0; padding: 0; box-shadow: none; gap: 12px; }
.sp-ld .sp-flow-card { overflow-x: auto; }
.sp-ld .sp-flow-container { min-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 16px; }
.sp-ld .sp-flow-tree ul { border-top: 1px solid rgba(112, 132, 255, 0.5); }
.sp-ld .sp-flow-node { background: var(--ld-well); border: 1px solid var(--ld-graphite); border-radius: 18px; padding: 12px 16px; }
.sp-ld .sp-flow-node__dept { font-family: var(--ld-mono); color: var(--ld-signal); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; }
.sp-ld .sp-flow-node__title { font-weight: 500; font-size: 13px; color: var(--ld-paper); margin-top: 2px; }

.sp-ld #spCustomDeptTableContainer { display: flex; flex-direction: column; gap: 16px; }
.sp-ld .sp-dept-card { padding: 22px 26px; gap: 8px; }
.sp-ld .sp-dept-card .sp-card__head { align-items: center; flex-wrap: wrap; justify-content: space-between; }
.sp-ld .sp-dept-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sp-ld .sp-dept-head__name { font-family: var(--ld-display); font-size: 18px; font-weight: 500; color: var(--ld-paper); }
.sp-ld .sp-dept-head__desc { color: var(--ld-fog); font-size: 12px; }
.sp-ld .sp-master-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px solid var(--ld-smoke);
}
.sp-ld .sp-master-row__title { font-size: 14px; font-weight: 500; color: var(--ld-paper); }
.sp-ld .sp-master-row__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-ld .sp-master-row__actions .sp-btn-primary,
.sp-ld .sp-master-row__actions .sp-subnav-btn,
.sp-ld .sp-inline-add-row .sp-btn-primary,
.sp-ld .sp-inline-add-row .sp-subnav-btn { padding: 7px 13px; font-size: 12px; }
.sp-ld .sp-master-row .sp-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--ld-graphite);
  color: var(--ld-fog);
  font-size: 11px;
}
.sp-ld .sp-master-row .sp-close-btn:hover { color: var(--ld-danger); border-color: rgba(240, 113, 125, 0.55); }
.sp-ld .sp-inline-add-row { padding: 12px 0; border-top: 1px solid var(--ld-smoke); background: transparent; }
.sp-ld .sp-inline-add-row__inner { display: flex; align-items: center; gap: 8px; }
.sp-ld .sp-inline-add-row__inner .sp-input { flex: 1; border-color: var(--ld-signal) !important; box-shadow: var(--ld-glow); }
.sp-ld .sp-empty-dept-msg { padding: 16px 4px 4px; color: var(--ld-fog); font-size: 13px; border-top: 1px solid var(--ld-smoke); }
.sp-ld .sp-master-highlight { box-shadow: inset 3px 0 0 var(--ld-signal); background: rgba(64, 91, 255, 0.08); }

/* ---------- Modal & toast (dipasang di <body>) ---------- */
.sp-modal-overlay { background: rgba(5, 5, 8, 0.72); backdrop-filter: blur(6px); }
.sp-modal-box {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 0 0 1px rgba(112, 132, 255, 0.18), 0 0 60px rgba(64, 91, 255, 0.18);
  color: #ffffff;
}
.sp-modal-title { font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif; font-size: 20px; font-weight: 500; color: #ffffff; }
.sp-modal-sub,
.sp-modal-message { color: #a7a9ac; font-size: 13px; line-height: 1.55; margin: 0; }
.sp-modal-box .sp-label { font-size: 11px; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: #a7a9ac; }
.sp-modal-box .sp-input,
.sp-modal-box .sp-select { background: #111111 !important; border: 1px solid #58595b !important; border-radius: 10px; color: #ffffff !important; padding: 12px 14px; font-size: 14px; }
.sp-modal-box .sp-input:focus,
.sp-modal-box .sp-select:focus { outline: none; border-color: #7084ff !important; box-shadow: 0 0 0 1px rgba(112, 132, 255, 0.35), 0 0 28px rgba(64, 91, 255, 0.22); }
.sp-modal-box .sp-close-btn { border-radius: 50%; }
.sp-toast {
  background: #191919;
  color: #ffffff;
  border: 1px solid rgba(112, 132, 255, 0.45);
  border-radius: 60px;
  box-shadow: 0 0 32px rgba(64, 91, 255, 0.3);
}
.sp-toast.is-error { border-color: rgba(240, 113, 125, 0.6); box-shadow: 0 0 32px rgba(240, 113, 125, 0.22); }
.sp-toast__ic {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  background: rgba(64, 91, 255, 0.2);
  color: #7084ff;
  flex: none;
}
.sp-toast.is-error .sp-toast__ic { background: rgba(240, 113, 125, 0.18); color: #f0717d; }

/* ---------- Info aktivasi, riwayat perubahan, pemakaian Pit ---------- */
.sp-ld .sp-ready__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--ld-smoke); font-size: 12px; }
.sp-ld .sp-ready__meta[hidden] { display: none; }
.sp-ld .sp-ready__meta dt { color: var(--ld-slate); }
.sp-ld .sp-ready__meta dd { margin: 0; color: var(--ld-ash); font-family: var(--ld-mono); text-align: right; }
.sp-ld .sp-ready .sp-ready__audit { justify-content: center; width: 100%; }
.sp-modal-box.sp-modal-box--wide { width: min(640px, 94vw); max-width: none; }
.sp-audit-body { max-height: min(60vh, 560px); overflow-y: auto; margin-top: 6px; }
.sp-audit-list { list-style: none; margin: 0; padding: 0; }
.sp-audit-item { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 2px; border-top: 1px solid #2c2c2c; }
.sp-audit-item:first-child { border-top: 0; }
.sp-audit-item__time { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #a7a9ac; }
.sp-audit-item__text { display: grid; gap: 2px; }
.sp-audit-item__text strong { font-weight: 500; font-size: 14px; color: #ffffff; }
.sp-audit-item__text span { font-size: 12px; color: #6d6e71; }
.sp-ld .sp-pit-card__refs { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-ld .sp-pit-card__note { align-self: center; font-size: 12px; color: var(--ld-slate); }
@media (max-width: 560px) {
  .sp-audit-item { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Bagan: mode Jabatan + Karyawan ---------- */
.sp-ld .sp-flow-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sp-ld .sp-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--ld-carbon); border: 1px solid var(--ld-hair); border-radius: 30px; }
.sp-ld .sp-seg__btn { border: 0; background: transparent; color: var(--ld-ash); font: 500 13px/1 'IBM Plex Sans', sans-serif; padding: 9px 16px; border-radius: 30px; cursor: pointer; }
.sp-ld .sp-seg__btn:hover { color: var(--ld-paper); }
.sp-ld .sp-seg__btn.is-active { background: #232323; color: var(--ld-paper); box-shadow: inset 0 0 0 1px var(--ld-hair), 0 0 0 1px rgba(64, 91, 255, 0.35); }
.sp-ld .sp-flow-node--people { min-width: 190px; max-width: 220px; text-align: left; }
.sp-ld .sp-flow-node--people .sp-flow-node__dept,
.sp-ld .sp-flow-node--people .sp-flow-node__title { text-align: center; }
.sp-ld .sp-flow-count { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--ld-smoke); font-family: var(--ld-mono); font-size: 11px; color: var(--ld-fog); }
/* 1 kolom, tinggi maksimal 5 nama; sisanya di-scroll */
.sp-ld .sp-flow-holders { display: block; margin: 6px 0 0; padding: 0 2px 0 0; max-height: calc(5 * 26px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.sp-ld .sp-flow-holder {
  display: block;
  width: 100%;
  height: 24px;
  margin-bottom: 2px;
  border: 0;
  background: transparent;
  color: var(--ld-ash);
  font: 400 12px/24px 'IBM Plex Sans', sans-serif;
  text-align: left;
  padding: 0 6px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-ld .sp-flow-holder:hover,
.sp-ld .sp-flow-holder:focus-visible { background: rgba(64, 91, 255, 0.14); color: var(--ld-paper); outline: none; }
.sp-ld .sp-flow-vacant {
  margin-top: 10px;
  padding: 6px 0 2px;
  border-top: 1px dashed var(--ld-steel);
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ld-slate);
}

/* ---------- Preview export struktur organisasi (dipasang di <body>) ---------- */
.sp-orgx {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  background: #0b0b0d;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.sp-orgx__stage { overflow: auto; padding: 24px; background: #2a2b2e; }
.sp-orgx__zoom { transform-origin: 0 0; margin: 0 auto; }
.sp-orgx__panel { display: flex; flex-direction: column; gap: 18px; padding: 26px 22px; background: #191919; border-left: 1px solid rgba(255, 255, 255, 0.09); color: #ffffff; overflow-y: auto; }
.sp-orgx__panel h3 { margin: 0; font: 500 20px/1.2 'Space Grotesk', 'IBM Plex Sans', sans-serif; }
.sp-orgx__panel p { margin: -8px 0 0; color: #a7a9ac; font-size: 13px; }
.sp-orgx__field { display: grid; gap: 8px; }
.sp-orgx__field > span { font-size: 11px; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: #a7a9ac; }
.sp-orgx__field small { color: #6d6e71; font-size: 12px; line-height: 1.45; }
.sp-orgx__field select { background: #111111; color: #ffffff; border: 1px solid #58595b; border-radius: 10px; padding: 11px 12px; font-size: 14px; }
.sp-orgx__row { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-orgx__btn { background: #191919; color: #d1d3d4; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 30px; padding: 8px 14px; font: 500 13px/1 'IBM Plex Sans', sans-serif; cursor: pointer; }
.sp-orgx__btn:hover { color: #ffffff; border-color: #58595b; }
.sp-orgx__btn.is-on { color: #ffffff; border-color: #405bff; box-shadow: 0 0 0 1px rgba(112, 132, 255, 0.35); }
.sp-orgx__actions { margin-top: auto; display: grid; gap: 10px; }
.sp-orgx__primary { background: #405bff; color: #ffffff; border: 0; border-radius: 30px; padding: 12px 18px; font: 500 14px/1 'IBM Plex Sans', sans-serif; cursor: pointer; }
.sp-orgx__primary:hover { box-shadow: 0 0 24px rgba(64, 91, 255, 0.55); }
.sp-orgx__primary:disabled { opacity: 0.6; cursor: progress; }
.sp-orgx .sp-orgx-box { cursor: pointer; }
.sp-orgx .sp-orgx-box:hover { outline: 2px dashed #7084ff; outline-offset: 3px; }
.sp-orgx-offscreen { position: fixed; left: 0; top: 0; z-index: -2147483647; pointer-events: none; }
@media (max-width: 760px) {
  .sp-orgx { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .sp-orgx__panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.09); max-height: 45vh; }
}

/* Lembar export: putih resmi, siap cetak */
.sp-orgx-sheet {
  display: inline-block;
  min-width: 900px;
  background: #ffffff;
  color: #111111;
  padding: 36px 40px 28px;
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  box-sizing: border-box;
}
.sp-orgx-kop { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 2px solid #111111; }
.sp-orgx-kop__logo { width: 64px; height: 64px; object-fit: contain; }
.sp-orgx-kop__company { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.sp-orgx-kop__addr { margin-top: 4px; font-size: 12px; color: #555555; max-width: 520px; line-height: 1.45; }
.sp-orgx-kop__title { text-align: right; font-size: 18px; font-weight: 700; color: #405bff; }
.sp-orgx-kop__title span { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: #444444; }
.sp-orgx-tree { padding: 30px 0 10px; }
.sp-orgx-tree ul { display: flex; justify-content: center; margin: 0; padding: 22px 0 0; list-style: none; position: relative; }
.sp-orgx-tree > ul { padding-top: 0; }
.sp-orgx-tree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 7px 0; list-style: none; }
.sp-orgx-tree li::before,
.sp-orgx-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 1.5px solid #9aa6f5; }
.sp-orgx-tree li::after { right: auto; left: 50%; border-left: 1.5px solid #9aa6f5; }
.sp-orgx-tree li:only-child { padding-top: 22px; }
.sp-orgx-tree li:only-child::before { display: none; }
.sp-orgx-tree li:only-child::after { border-top: 0; }
.sp-orgx-tree li:first-child::before,
.sp-orgx-tree li:last-child::after { border: 0 none; }
.sp-orgx-tree li:last-child::before { border-right: 1.5px solid #9aa6f5; border-radius: 0 6px 0 0; }
.sp-orgx-tree li:first-child::after { border-radius: 6px 0 0 0; }
.sp-orgx-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1.5px solid #9aa6f5; }
/* Akar tanpa garis ke atas */
.sp-orgx-tree > ul > li { padding-top: 0; }
.sp-orgx-tree > ul > li::before,
.sp-orgx-tree > ul > li::after { display: none; }
.sp-orgx-box { width: 190px; box-sizing: border-box; border: 1.5px solid #c9cff8; border-radius: 12px; background: #ffffff; padding: 10px 12px; text-align: left; }
.sp-orgx-box__head { text-align: center; padding-bottom: 7px; border-bottom: 1px solid #e3e6fb; }
.sp-orgx-box__dept { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.08em; color: #405bff; text-transform: uppercase; }
.sp-orgx-box__title { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: #111111; }
.sp-orgx-names { margin: 7px 0 0; font-size: 11px; line-height: 1.55; color: #222222; }
.sp-orgx-name { display: flex; gap: 5px; }
.sp-orgx-name span { min-width: 16px; color: #8a8a8a; text-align: right; }
.sp-orgx-count { margin-top: 8px; text-align: center; font-size: 12px; font-weight: 600; color: #333333; }
.sp-orgx-vacant { margin-top: 8px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #9a9a9a; }
.sp-orgx-empty { text-align: center; color: #777777; }
.sp-orgx-foot { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid #dddddd; font-size: 11px; color: #555555; }

/* ---------- Responsif ---------- */
@media (max-width: 1080px) {
  .sp-ld .sp-hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .setup-project-wrap.sp-ld { padding: 18px 16px 48px; border-radius: 22px; }
  .sp-ld .sp-card { padding: 22px 18px; border-radius: 24px; }
  .sp-ld .sp-kop-card { flex-direction: column; align-items: flex-start; }
  .sp-ld .sp-kop-card__meta { text-align: left; }
}
/* Baris shift menyesuaikan lebar kartunya, bukan lebar layar */
@container (max-width: 600px) {
  .sp-ld .sp-shift-row { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr); }
  .sp-ld .sp-shift-row__num { grid-row: 1 / span 3; align-self: start; padding: 30px 0 0; }
  .sp-ld .sp-shift-row__name { grid-column: 2 / -1; }
  .sp-ld .sp-shift-duration { grid-column: 2 / -1; text-align: left; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-ld .sp-ready__meter i { transition: none; }
}
