/* ============================================================
   Pusat Informasi & Alur Proses Aplikasi — SIGMA Rubber Nursery
   Styles: 100% Scoped under .ic-root
   ============================================================ */

.ic-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  background-color: #f8fafc;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.ic-root *,
.ic-root *::before,
.ic-root *::after {
  box-sizing: inherit;
}

/* 1. Header & Konteks Sesi */
.ic-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ic-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ic-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ic-brand-icon {
  width: 32px;
  height: 32px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ic-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ic-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.ic-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ic-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.ic-session-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: ic-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ic-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.2); }
}

.ic-role-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.ic-role-selector-label {
  font-size: 0.76rem;
  color: #475569;
  font-weight: 600;
}

.ic-role-select {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #0f172a;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.ic-role-select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* 2. Bilah Tab 5 Pilar Informasi */
.ic-nav-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.ic-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease-in-out;
}

.ic-tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.ic-tab-btn.is-active {
  color: #116834;
  border-bottom-color: #116834;
  background: #f0fdf4;
}

.ic-tab-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.ic-tab-btn.is-active .ic-tab-badge {
  background: #dcfce7;
  color: #166534;
}

/* 3. Konten Utama */
.ic-body {
  padding: 20px;
}

/* Pilar 1: Kartu Metrik Ringkasan */
.ic-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ic-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: transform 0.15s ease;
}

.ic-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.ic-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ic-metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ic-metric-icon {
  font-size: 1.1rem;
}

.ic-metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.ic-metric-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* Progress / Kematangan Alur */
.ic-card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.ic-section-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ic-progress-bar-wrap {
  height: 12px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  margin: 12px 0;
}

.ic-progress-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.ic-progress-segment.explicit { background: #10b981; }
.ic-progress-segment.sequential { background: #f59e0b; }
.ic-progress-segment.noflow { background: #94a3b8; }

.ic-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: #475569;
}

.ic-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ic-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* Pilar 2: Kartu Persona & Peran */
.ic-role-banner {
  background: linear-gradient(135deg, #116834 0%, #0d5328 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ic-role-banner-left h2 {
  font-size: 1.3rem;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.ic-role-banner-left p {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.9;
}

.ic-role-banner-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Pilar 3: Peta Modul & Alur */
.ic-flow-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .ic-flow-layout {
    grid-template-columns: 1fr;
  }
}

.ic-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  max-height: 750px;
  overflow-y: auto;
}

.ic-mod-item {
  margin-bottom: 8px;
}

.ic-mod-header-btn {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ic-mod-header-btn:hover {
  background: #f1f5f9;
}

.ic-feat-list {
  padding: 4px 0 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ic-feat-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.1s ease;
}

.ic-feat-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ic-feat-btn.is-active {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
  border-left: 3px solid #10b981;
}

.ic-main-view {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  min-height: 500px;
}

.ic-view-head {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.ic-view-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ic-view-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.ic-status-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
}

.ic-status-pill.explicit {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ic-status-pill.sequential {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ic-status-pill.noflow {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Alert Boxes & Honest Placeholders */
.ic-alert-box {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.ic-alert-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.ic-alert-warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.ic-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ic-diagram-canvas {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0 24px 0;
  overflow-x: auto;
  text-align: center;
  min-height: 150px;
}

/* Tabel Data Responsif */
.ic-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
}

.ic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.ic-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.ic-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: top;
}

.ic-table tr:hover td {
  background: #f8fafc;
}

.ic-badge-sm {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

.ic-badge-role { background: #e0f2fe; color: #0369a1; }
.ic-badge-route { background: #fef3c7; color: #92400e; font-family: monospace; }
.ic-badge-confirmed { background: #dcfce7; color: #166534; }
