/* ============================================================
   PORTAL EVALUASI ACARA — STYLESHEET
   3-Phase Adaptive Lifecycle: Pra-Eval, Hari-H Eval, Pasca-Eval
   ============================================================ */

:root {
  --bg-main: #0c0e14;
  --bg-card: rgba(22, 27, 38, 0.85);
  --bg-card-hover: rgba(30, 37, 51, 0.95);
  --bg-glass: rgba(18, 22, 32, 0.75);
  --bg-input: #121620;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #6366f1;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gold: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --badge-kritis-bg: rgba(244, 63, 94, 0.15);
  --badge-kritis-text: #fda4af;
  --badge-kritis-border: rgba(244, 63, 94, 0.35);

  --badge-sedang-bg: rgba(245, 158, 11, 0.15);
  --badge-sedang-text: #fcd34d;
  --badge-sedang-border: rgba(245, 158, 11, 0.35);

  --badge-rendah-bg: rgba(16, 185, 129, 0.15);
  --badge-rendah-text: #6ee7b7;
  --badge-rendah-border: rgba(16, 185, 129, 0.35);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #f1f5f9;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-focus: #4f46e5;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  
  --badge-kritis-bg: #fee2e2;
  --badge-kritis-text: #991b1b;
  --badge-kritis-border: #fca5a5;

  --badge-sedang-bg: #fef3c7;
  --badge-sedang-text: #92400e;
  --badge-sedang-border: #fde68a;

  --badge-rendah-bg: #d1fae5;
  --badge-rendah-text: #065f46;
  --badge-rendah-border: #a7f3d0;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(244, 63, 94, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* App Header */
.eval-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

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

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Public Phase Badge (Read-Only) */
.public-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.public-phase-badge.phase-hari_h {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.public-phase-badge.phase-pasca_eval {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.pulse-dot-small {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot-anim 1.5s infinite;
}

/* Phase Selector Pill Group (BPH Only) */
.phase-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 6px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.phase-selector-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 6px;
}

.phase-pills-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.phase-pill-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.phase-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.phase-pill-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.phase-pill-btn#pill-phase-hari_h.active {
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.phase-pill-btn#pill-phase-pasca_eval.active {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
}

.btn-icon-only:hover {
  background: var(--bg-card-hover);
}

/* User Role Chip */
.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
}

.user-role-badge.role-bph {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.user-role-badge.role-guest {
  background: rgba(156, 163, 175, 0.1);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* Main Layout */
.main-wrapper {
  max-width: 1750px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Dynamic Phase Hero Banner */
.phase-hero-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.phase-hero-banner.phase-hari_h {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.08));
  border-color: rgba(239, 68, 68, 0.35);
}

.phase-hero-banner.phase-pasca_eval {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border-color: rgba(16, 185, 129, 0.35);
}

.phase-hero-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #fff;
  letter-spacing: 0.06em;
}

.phase-hero-banner.phase-hari_h .phase-hero-badge {
  background: #ef4444;
}

.phase-hero-banner.phase-pasca_eval .phase-hero-badge {
  background: #10b981;
}

.phase-hero-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.phase-hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 900px;
}

/* Division Submission Progress Cards (Pra-Eval Phase) */
.division-progress-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-subheading-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-subheading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-subheading-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.division-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.division-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.division-progress-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.div-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.div-card-icon {
  font-size: 20px;
}

.div-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.div-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.div-status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.div-status-chip.filled {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.div-status-chip.empty {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Video Player Hero */
.hero-eval-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

@media (min-width: 1024px) {
  .hero-eval-section {
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
  }
}

.video-player-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-frame-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.video-frame-wrapper iframe,
.video-frame-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 4px;
}

.live-playback-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-full);
  color: #f87171;
  font-weight: 700;
  font-size: 11px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-dot-anim 1.5s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

.event-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.event-headline-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-status-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.event-title-main {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}

.event-subtitle-main {
  font-size: 13px;
  color: var(--text-secondary);
}

.layperson-notice-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #a5b4fc;
}

.notice-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.quick-guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.quick-guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.quick-guide-list li::before {
  content: "✦";
  color: var(--accent-gold);
  font-size: 11px;
  margin-top: 1px;
}

/* Stats */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Controls */
.eval-controls-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.division-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.division-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}

.division-tabs-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.div-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.div-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.div-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.div-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

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

.search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

.view-toggle-wrap {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-toggle-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Table */
.table-view-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table-responsive-wrapper {
  overflow-x: auto;
  width: 100%;
}

.eval-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.eval-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.eval-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.eval-table tr:last-child td {
  border-bottom: none;
}

.eval-table tr {
  transition: background-color 0.2s ease;
}

.eval-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.eval-table tr.active-playing-row {
  background-color: rgba(99, 102, 241, 0.12) !important;
  border-left: 4px solid var(--accent-primary);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.1);
}

.col-num { width: 45px; font-weight: 700; color: var(--text-muted); text-align: center; }
.col-divisi { width: 170px; }
.col-fase { width: 95px; }
.col-masalah { min-width: 300px; }
.col-penyebab { min-width: 300px; }
.col-solusi { min-width: 300px; }
.col-urgensi { width: 100px; }
.col-timestamp { width: 120px; }
.col-status { width: 115px; }

/* Click to edit & Inline Row Actions */
.eval-table tr.can-edit-row {
  cursor: pointer;
}

.eval-table tr.can-edit-row:hover td.col-masalah .problem-text,
.eval-table tr.can-edit-row:hover td.col-penyebab .rootcause-text {
  color: #a5b4fc;
}

.row-inline-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.eval-table tr:hover .row-inline-controls {
  opacity: 1;
}

.btn-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-inline-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
}

.btn-inline-pill.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
}

.live-setup-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px dashed rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.divisions-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.division-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  transition: all 0.15s ease;
}

.division-checkbox-item:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
}

.division-checkbox-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.division-tags-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.division-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  white-space: nowrap;
}

.target-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 3px;
  width: fit-content;
}

.reported-by-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #ffffff !important;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
}

.role-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  min-height: 20px;
}

.role-chip-btn {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.role-chip-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.role-chip-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.6);
}

.btn-tag-live-ts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-tag-live-ts:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.55);
}

.timestamp-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-quick-ts-action {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.15s ease;
}

.btn-quick-ts-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-quick-ts-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.phase-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.problem-text {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.rootcause-text {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 12.5px;
}

.rootcause-badge-inline {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-radius: 4px;
  margin-right: 4px;
  text-transform: uppercase;
}

.solution-text-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.btn-quick-edit-solution {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-quick-edit-solution:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-add-solution-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  color: #10b981;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-solution-quick:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  transform: translateY(-1px);
}

.solution-text {
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 12.5px;
}

.solution-badge-inline {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 4px;
  margin-right: 4px;
  text-transform: uppercase;
}

.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.severity-kritis {
  background: var(--badge-kritis-bg);
  color: var(--badge-kritis-text);
  border: 1px solid var(--badge-kritis-border);
}

.severity-sedang {
  background: var(--badge-sedang-bg);
  color: var(--badge-sedang-text);
  border: 1px solid var(--badge-sedang-border);
}

.severity-rendah {
  background: var(--badge-rendah-bg);
  color: var(--badge-rendah-text);
  border: 1px solid var(--badge-rendah-border);
}

.timestamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.timestamp-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: scale(1.04);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.status-selesai {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-sedang_dibahas {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  animation: pulse-border 2s infinite;
}

.status-belum_dibahas {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-status-toggle.is-pending {
  background: rgba(156, 163, 175, 0.12);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-status-toggle.is-pending:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
  transform: scale(1.02);
}

.btn-status-toggle.is-done {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-status-toggle.is-done:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.02);
}

@keyframes pulse-border {
  0% { border-color: rgba(99, 102, 241, 0.3); }
  50% { border-color: rgba(99, 102, 241, 0.8); }
  100% { border-color: rgba(99, 102, 241, 0.3); }
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-action-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-action-icon.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
}

/* Card Grid */
.card-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.eval-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.eval-card-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.eval-card-item.active-playing-row {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-section-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.card-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.empty-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  font-size: 48px;
  opacity: 0.8;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 400px;
}

/* Sticky PIP */
.sticky-pip-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  z-index: 999;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-pip-player.active {
  display: flex;
}

@keyframes slide-up {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.pip-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pip-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.pip-video-wrap iframe,
.pip-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s ease;
}

.modal-backdrop.active {
  display: flex;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scale-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@keyframes scale-in {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label .req {
  color: var(--accent-rose);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-anim 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: #064e3b;
  color: #a7f3d0;
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
  background: #4c0519;
  color: #fecdd3;
}

@keyframes toast-anim {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mode Presentasi */
body.mode-presentasi {
  background: #06080d;
}

body.mode-presentasi .eval-header {
  background: #0b0f19;
}

body.mode-presentasi .problem-text {
  font-size: 15px;
  font-weight: 700;
}

body.mode-presentasi .rootcause-text {
  font-size: 14px;
}

/* Print Mode */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .eval-header,
  .phase-hero-banner,
  .division-progress-section,
  .hero-eval-section,
  .eval-controls-section,
  .sticky-pip-player,
  .modal-backdrop,
  .toast-container,
  .col-aksi,
  .btn,
  .btn-icon-only {
    display: none !important;
  }

  .main-wrapper {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .print-official-header {
    display: block !important;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  .eval-table {
    border: 1px solid #000;
    page-break-inside: auto;
  }

  .eval-table th {
    background: #e2e8f0 !important;
    color: #000 !important;
    border: 1px solid #000;
  }

  .eval-table td {
    border: 1px solid #000;
    color: #000 !important;
    page-break-inside: avoid;
  }

  .severity-badge,
  .division-tag-pill,
  .phase-pill,
  .timestamp-btn {
    border: 1px solid #666 !important;
    color: #000 !important;
    background: transparent !important;
  }
}

.print-official-header {
  display: none;
}
