/* styles.css - Modern Responsive Design System for SBO BPS 2025 */
:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #0f2757;
  --bps-navy: #0b1f3a;
  --bps-blue: #0284c7;
  --bps-teal: #0d9488;
  --bps-orange: #f59e0b;
  --bps-gold: #fbbf24;
  --bps-red: #ef4444;
  --bps-green: #10b981;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #38bdf8;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header Styles */
.app-header {
  background: linear-gradient(135deg, #0b1f3a 0%, #173663 100%);
  color: white;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 20px rgba(11, 31, 58, 0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-badge {
  background: white;
  border-radius: var(--radius-md);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.brand-logo-badge svg {
  width: 28px;
  height: 28px;
}

.brand-title-wrap h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand-tag {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 600;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: #38bdf8;
  color: #0b1f3a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-nip {
  font-size: 0.7rem;
  color: #94a3b8;
}

.btn-header {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 6px 8px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.35);
  color: white;
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

/* LOGIN VIEW */
.login-wrapper {
  min-height: calc(82vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
}

.login-card-header {
  background: linear-gradient(135deg, #0b1f3a 0%, #1e3a8a 100%);
  color: white;
  padding: 2.2rem 2rem 1.8rem;
  text-align: center;
}

.login-icon-wrap {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 2px solid rgba(56, 189, 248, 0.4);
}

.login-icon-wrap svg {
  width: 30px;
  height: 30px;
  color: #38bdf8;
}

.login-card-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-card-header p {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.login-card-body {
  padding: 1.8rem 1.5rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.nip-input-wrap {
  position: relative;
}

.nip-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  font-family: monospace;
}

.nip-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.nip-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.detected-pegawai {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.25s ease-in;
}

.detected-avatar {
  width: 34px;
  height: 34px;
  background: #16a34a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.detected-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #14532d;
}

.detected-status {
  font-size: 0.75rem;
  color: #15803d;
}

.quick-select-btn {
  background: none;
  border: none;
  color: var(--bps-blue);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 0;
  text-decoration: underline;
}

.quick-select-btn:hover {
  color: var(--primary-700);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  filter: brightness(1.05);
}

.btn-primary:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.login-hint {
  margin-top: 1.2rem;
  background: var(--bg-card-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  border-left: 3px solid var(--bps-blue);
}

/* SURVEY VIEW */
.survey-header-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.progress-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.progress-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.progress-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bps-blue);
}

.progress-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.questions-nav-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.questions-nav-strip::-webkit-scrollbar {
  height: 4px;
}
.questions-nav-strip::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.nav-tab-btn {
  flex: 1;
  min-width: 86px;
  padding: 0.55rem 0.5rem;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-tab-btn:hover {
  background: #e2e8f0;
}

.nav-tab-btn.active {
  background: #eff6ff;
  border-color: var(--primary-600);
  color: var(--primary-700);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.nav-tab-btn.completed {
  border-color: #10b981;
  background: #f0fdf4;
  color: #15803d;
}

.tab-status-chip {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.tab-status-chip.done {
  background: #dcfce7;
  color: #166534;
}

.tab-status-chip.incomplete {
  background: #fef3c7;
  color: #92400e;
}

/* Question Content Card */
.question-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.question-top-bar {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.question-badge-pill {
  background: #0b1f3a;
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.selection-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}

.selection-counter-badge.incomplete {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.selection-counter-badge.valid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.question-body {
  padding: 1.5rem;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.definition-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  color: #0369a1;
}

.definition-box-header {
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.definition-box ul {
  padding-left: 1.2rem;
  line-height: 1.45;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.option-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  min-height: 48px;
}

.option-card:hover {
  border-color: var(--primary-500);
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.option-card.selected {
  border-color: var(--bps-blue);
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

.option-card.disabled-hover {
  opacity: 0.6;
  cursor: not-allowed;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: var(--transition);
  background: white;
}

.option-card.selected .custom-checkbox {
  background: var(--bps-blue);
  border-color: var(--bps-blue);
  color: white;
}

.custom-checkbox svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  stroke-width: 3;
}

.option-card.selected .custom-checkbox svg {
  opacity: 1;
}

.option-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

.option-card.selected .option-text {
  font-weight: 600;
  color: #0369a1;
}

/* Survey Navigation Footer */
.survey-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-secondary {
  background: white;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-subtle);
  border-color: #cbd5e1;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-next {
  min-width: 140px;
}

.btn-submit {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.warning {
  background: #78350f;
  border-left: 4px solid #f59e0b;
}

.toast.error {
  background: #7f1d1d;
  border-left: 4px solid #ef4444;
}

.toast.success {
  background: #14532d;
  border-left: 4px solid #22c55e;
}

/* RESULTS VIEW */
.results-container {
  animation: fadeIn 0.3s ease;
}

.score-hero-card {
  background: linear-gradient(135deg, #0b1f3a 0%, #1e3a8a 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-xl);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.score-hero-bg-accent {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.score-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.score-hero-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.score-hero-info p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.score-metric-cluster {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.score-dual-cluster {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.score-card-metric {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 170px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.score-card-metric:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.score-card-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.score-metric-berakhlak::before {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.score-metric-budaya::before {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.score-card-metric-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.score-card-metric-header .metric-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.score-card-metric .score-big-number {
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1;
}

.score-metric-berakhlak .score-big-number {
  color: #38bdf8;
  text-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

.score-metric-budaya .score-big-number {
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
}

.score-card-metric .score-subtext {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 0.35rem;
}

.score-circle-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-big-number {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: #38bdf8;
  text-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.score-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 0.3rem;
  font-weight: 700;
}

.stat-pills-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.stat-pill strong {
  color: #38bdf8;
  margin-left: 0.25rem;
}

/* Results Actions & Legend */
.results-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.results-actions-left {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.results-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.legend-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.legend-both {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.legend-berakhlak {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.legend-budaya {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.legend-pengecoh {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.legend-correct {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.legend-incorrect {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.legend-missed {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* 5 Budaya Dimension Cards */
.culture-breakdown-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.section-heading-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-heading-wrap h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.culture-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.culture-score-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.culture-score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: white;
}

.culture-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.culture-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  min-height: 2.3rem;
}

.culture-card-count {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.culture-card-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* UNIFIED REVIEW CARDS & TABLE */
.review-section {
  margin-bottom: 2rem;
}

.review-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.review-item-header {
  padding: 1rem 1.4rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.review-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.q-badge {
  background: #0b1f3a;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.review-header-score-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.review-header-score-pill.perfect {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.review-header-score-pill.warning {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Filter bar integrated into question review */
.review-filter-bar {
  padding: 0.75rem 1.4rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  overflow-x: auto;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.filter-chip {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip:hover {
  background: #e2e8f0;
}

.filter-chip.active {
  background: #0b1f3a;
  color: white;
  border-color: #0b1f3a;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.unified-analysis-table {
  width: 100%;
  border-collapse: collapse;
}

.unified-analysis-table th,
.unified-analysis-table td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.84rem;
  vertical-align: middle;
}

.unified-analysis-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Row states */
.row-correct {
  background: #f0fdf4 !important;
}

.row-incorrect {
  background: #fef2f2 !important;
}

.row-missed {
  background: #fffbeb !important;
}

.row-avoided {
  background: #ffffff;
}

.row-unselected {
  background: #ffffff;
}

/* Badges & Pills */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.correct {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-badge.incorrect {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-badge.missed {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-badge.avoided {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.status-badge.neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.pill-point {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pill-point.point-both {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pill-point.point-berakhlak {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.pill-point.point-budaya {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pill-point.point-zero {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pill-not-chosen {
  color: #94a3b8;
  font-size: 0.75rem;
}

.pill-key {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pill-key-extra {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pill-not-key {
  color: #94a3b8;
  font-size: 0.75rem;
}

.dim-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.dim-budaya {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.dim-berakhlak {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.dim-neutral {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Padanan Perilaku per Nilai */
.padanan-row {
  margin-bottom: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.padanan-row:last-child {
  margin-bottom: 0;
}

.padanan-type-badge {
  display: inline-flex;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.15rem;
}

.padanan-type-badge.badge-berakhlak {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.padanan-type-badge.badge-budaya {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.padanan-val {
  font-size: 0.82rem;
  color: #1e293b;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 4px;
  border-left: 3px solid var(--bps-blue);
  display: block;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.45;
}

.padanan-pengecoh {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.8rem;
  display: inline-block;
  padding: 2px 6px;
  background: #f8fafc;
  border-radius: 4px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 1.1rem 1.4rem;
  background: #0b1f3a;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: white;
}

.modal-body {
  padding: 1.4rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 0.9rem 1.4rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Pegawai Selector Grid */
.search-pegawai-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 1rem;
  font-size: 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  outline: none;
}

.search-pegawai-input:focus {
  border-color: var(--primary-600);
}

.pegawai-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
}

.pegawai-chip-card {
  padding: 0.75rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.pegawai-chip-card:hover {
  background: #eff6ff;
  border-color: var(--primary-500);
  transform: translateY(-1px);
}

.pegawai-chip-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pegawai-chip-nip {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* ========================================================
   RESPONSIVE MEDIA QUERIES (Mobile, Tablet, Desktop)
   ======================================================== */

/* Tablet & Mobile Screens (< 768px) */
@media (max-width: 768px) {
  .app-header {
    padding: 0.75rem 1rem;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand-title-wrap h1 {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    display: none;
  }

  .user-badge {
    padding: 3px 8px;
  }

  .user-name {
    max-width: 110px;
  }

  .main-content {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }

  .login-card-header {
    padding: 1.8rem 1.25rem 1.4rem;
  }

  .login-card-body {
    padding: 1.4rem 1.1rem;
  }

  .survey-header-card {
    padding: 1rem;
  }

  .question-body {
    padding: 1.1rem;
  }

  .question-text {
    font-size: 1.02rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .score-hero-card {
    padding: 1.5rem;
  }

  .score-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .score-metric-cluster {
    width: 100%;
    justify-content: center;
  }

  .score-big-number {
    font-size: 2.8rem;
  }

  .culture-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-item-header {
    padding: 0.85rem 1rem;
  }

  .review-filter-bar {
    padding: 0.6rem 1rem;
  }

  .results-actions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .results-actions-left {
    width: 100%;
  }

  .results-actions-left button {
    flex: 1;
  }

  /* Responsif: Kolom jadi Baris pada Layar Tablet & Mobile (< 768px) */
  .unified-analysis-table thead {
    display: none;
  }

  .unified-analysis-table,
  .unified-analysis-table tbody,
  .unified-analysis-table tr,
  .unified-analysis-table td {
    display: block;
    width: 100%;
  }

  .unified-analysis-table tr {
    margin-bottom: 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
  }

  .unified-analysis-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.85rem;
  }

  .unified-analysis-table td:last-child {
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding-top: 0.6rem;
  }

  .unified-analysis-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }

  .unified-analysis-table td.col-option-name {
    display: block;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 0.6rem;
    margin-bottom: 0.35rem;
    font-size: 1rem;
    color: var(--bps-navy);
  }

  .unified-analysis-table td.col-option-name::before {
    display: none;
  }

  .survey-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .survey-footer button {
    width: 100%;
  }

  .survey-footer > div {
    width: 100%;
    flex-direction: column;
  }
}

/* Small Smartphone Screens (< 480px) */
@media (max-width: 480px) {
  .brand-section {
    width: 100%;
    justify-content: space-between;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .btn-header {
    font-size: 0.72rem;
    padding: 5px 8px;
  }

  .culture-cards-grid {
    grid-template-columns: 1fr;
  }

  .stat-pills-row {
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
  }

  .stat-pill {
    width: 100%;
    text-align: center;
  }

  .nav-tab-btn {
    min-width: 72px;
    padding: 0.4rem 0.3rem;
    font-size: 0.72rem;
  }

  .modal-dialog {
    max-height: 94vh;
  }

  .modal-header, .modal-body, .modal-footer {
    padding: 0.85rem 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Print Styles */
@media print {
  .app-header, .survey-footer, .btn-header, .toast-container, .review-filter-bar, .results-actions-bar {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .score-hero-card {
    background: #0b1f3a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
