/* ============================================================
   LPK BEAUTY — REPORT FORM
   Version: 2.1 (fix sub-competency title + placeholder)
   ============================================================ */

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.breadcrumb-link {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   CARD TITLE FIX — HITAM PUTIH
   ============================================================ */
.card .card-title {
  color: var(--text-primary) !important;
}
.card .card-title svg {
  color: var(--text-secondary) !important;
  flex-shrink: 0;
}

/* Optional/Required badge di card title */
.optional-badge,
.required-badge {
  font-weight: 400 !important;
  font-size: 11px !important;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  display: inline-block;
  text-transform: none;
  letter-spacing: 0;
}
.optional-badge {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.required-badge {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

/* ============================================================
   TRAINEE INFO BOX
   ============================================================ */
.trainee-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  margin-top: 12px;
}
.trainee-info-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.trainee-info-body { flex: 1; min-width: 0; }
.trainee-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 2px;
}
.trainee-info-meta { font-size: 12px; color: var(--text-secondary); }
.trainee-info-fase {
  padding: 4px 10px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  padding: 24px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-subtle);
}
.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.upload-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: var(--radius-full);
  background: var(--bg-body);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.upload-zone-icon svg { width: 20px; height: 20px; }
.upload-zone p {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.upload-zone-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.upload-preview:empty { display: none; }
.upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.upload-preview-remove:hover { background: var(--danger); }
.upload-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   UPLOAD PROGRESS BAR
   ============================================================ */
.upload-progress-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius);
}
.upload-progress-box.hidden { display: none; }

.upload-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.upload-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--info);
}
.upload-progress-count {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--info);
  padding: 2px 8px;
  background: var(--bg-body);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-full);
}
.upload-progress-bar {
  height: 6px;
  background: var(--bg-body);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}
.upload-progress-fill {
  height: 100%;
  background: var(--info);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  min-width: 2px;
}
.upload-progress-files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}
.upload-progress-file {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 8px;
  background: var(--bg-body);
  border-radius: var(--radius-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   ASSESSMENT LIST
   ============================================================ */
.assessment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.assessment-row {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: all var(--transition-fast);
}
.assessment-row:hover { border-color: var(--border-strong); }

.assessment-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.assessment-row-select { flex: 1; min-width: 0; }
.assessment-row-select select {
  width: 100%;
  padding: 8px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  cursor: pointer;
}
.assessment-row-select select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.assessment-row-select input {
  width: 100%;
}

.assessment-row-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger-border);
  background: var(--bg-body);
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  transition: all var(--transition-fast);
}
.assessment-row-remove:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}
.assessment-row-remove svg {
  width: 14px;
  height: 14px;
}

.assessment-row-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.assessment-row-score {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}
.assessment-row-score::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
}
.assessment-row-score:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.assessment-row-notes {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}
.assessment-row-notes::placeholder { color: var(--text-muted); }
.assessment-row-notes:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ============================================================
   GRADE BADGE
   ============================================================ */
.assessment-row-grade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.grade-A { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.grade-B { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.grade-C { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.grade-D { background: #FED7AA;           color: #9A3412;         border: 1px solid #FDBA74; }
.grade-E { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }

/* ============================================================
   SUB-COMPETENCY BOX — FIX WARNA!
   ============================================================ */
.sub-competency-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
}

/* FIX: Title "Penilaian Kompetensi Materi" harus gelap */
.sub-competency-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #5C4A2F !important; /* accent-text gelap */
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-border);
}
.sub-competency-title svg {
  color: #5C4A2F !important;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.sub-competency-row {
  padding: 8px 0;
  border-bottom: 1px dashed var(--accent-border);
}
.sub-competency-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* FIX: Nama materi harus gelap */
.sub-competency-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1C1917 !important; /* text-primary */
  margin-bottom: 6px;
}

.sub-competency-input {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

/* Auto-score summary */
.auto-score-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-body);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.auto-score-label {
  font-weight: 600;
  color: #5C4A2F !important;
}
.auto-score-value {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 15px;
  font-weight: 800;
  color: #1C1917 !important;
}

/* ============================================================
   SEGMENTED FULL WIDTH
   ============================================================ */
.segmented-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  width: 100%;
  gap: 4px;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segmented-dynamic button {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  text-align: center;
  min-height: 44px;
}
.segmented-dynamic button:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
  color: var(--text-primary);
}
.segmented-dynamic button.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   PERFORMANCE PREVIEW
   ============================================================ */
.performance-preview {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--info);
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.performance-preview.hidden { display: none; }
.performance-preview svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.performance-preview strong {
  font-weight: 700;
  color: var(--info);
}

/* ============================================================
   DROPOUT WARNING
   ============================================================ */
.dropout-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--danger);
  line-height: 1.5;
}
.dropout-warning.hidden { display: none; }
.dropout-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   EMPTY INLINE
   ============================================================ */
.empty-inline {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
}
.empty-inline-title {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ============================================================
   SUBMIT BAR
   ============================================================ */
.submit-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--bg-body);
  padding-bottom: 20px;
  z-index: 10;
  margin-left: calc(-1 * var(--space-6));
  margin-right: calc(-1 * var(--space-6));
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ============================================================
   HIDDEN
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .trainee-info-box { flex-wrap: wrap; gap: 10px; }
  .trainee-info-fase { width: 100%; text-align: center; }
  .assessment-row-body { grid-template-columns: 100px 1fr; }
  .sub-competency-input { grid-template-columns: 100px 1fr; }

  .segmented-full {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .segmented-dynamic button {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .submit-bar {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    padding-top: 12px;
    padding-bottom: 16px;
  }
  .submit-bar .btn { flex: 1; }
}

@media (max-width: 480px) {
  .assessment-row-body { grid-template-columns: 1fr; }
  .sub-competency-input { grid-template-columns: 1fr; }
}
/* ============================================================
   DECISION SECTION
   ============================================================ */
.card-decision {
  border: 1px dashed var(--accent-border);
  background: var(--accent-subtle);
}

.card-decision .card-header {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: none;
  user-select: none;
}

.card-decision .card-title {
  color: var(--accent-text) !important;
}

.card-decision .card-title svg {
  color: var(--accent) !important;
}

#decisionBody {
  padding-top: 4px;
}

.decision-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--warning);
  line-height: 1.5;
}

.decision-warning.hidden {
  display: none;
}

.decision-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--warning);
}
/* ============================================================
   FIX: Card Decision Title — Hitam Tegas
   ============================================================ */
.card-decision {
  border: 1px solid var(--accent-border);
  background: var(--accent-subtle);
  border-left: 4px solid var(--accent);
}

.card-decision .card-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--accent-border);
}

/* FIX UTAMA — paksa warna hitam */
.card-decision .card-header .card-title,
.card-decision .card-title,
.card .card-decision .card-title,
#decisionCard .card-title {
  color: #1C1917 !important;
  font-weight: 700 !important;
}

.card-decision .card-title svg,
#decisionCard .card-title svg {
  color: var(--accent) !important;
  stroke: var(--accent) !important;
}

/* Override ANY inline style yang mungkin ganggu */
#decisionCard .card-title,
#decisionCard .card-title span,
#decisionCard .card-title * {
  color: #1C1917 !important;
}

#decisionCard .card-title svg {
  color: var(--accent) !important;
}

#decisionCard .card-title .optional-badge,
#decisionCard .card-title .required-badge {
  color: inherit !important;
}

/* Decision body */
#decisionBody {
  padding-top: 4px;
}

.decision-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--warning);
  line-height: 1.5;
}

.decision-warning.hidden {
  display: none;
}

.decision-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--warning) !important;
  stroke: var(--warning) !important;
}

/* ============================================================
   HINT: Section number styling
   ============================================================ */
.card-title {
  color: var(--text-primary) !important;
}

/* Optional / Required badges */
.optional-badge,
.required-badge {
  font-weight: 500 !important;
  font-size: 11px !important;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  display: inline-block;
  text-transform: none;
  letter-spacing: 0;
}

.optional-badge {
  color: var(--text-muted) !important;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.required-badge {
  color: var(--warning) !important;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
