/* MediCollab RMIK - Modern Design System */
:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0d9488;
  --secondary-light: #ccfbf1;
  --dark: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #6366f1;
  --info-light: #e0e7ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.app-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1360px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--dark);
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0284c7, #0d9488);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.725rem;
  color: var(--slate-500);
  font-weight: 500;
}

/* Navigation Tabs */
.nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--slate-100);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 1;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--slate-600);
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--dark);
  background: rgba(0, 0, 0, 0.04);
}

.nav-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Navigation Dropdown Component */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: pointer;
  border: none;
  background: transparent;
  user-select: none;
}

.nav-dropdown-toggle .dropdown-caret {
  display: inline-block;
  font-size: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 0.25rem;
  opacity: 0.7;
}

.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  background: #ffffff;
  border-radius: 16px;
  padding: 0.6rem;
  box-shadow: 0 16px 40px -6px rgba(15, 23, 42, 0.16), 0 8px 16px -6px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-header {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  padding: 0.45rem 0.65rem 0.2rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0.35rem 0;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  color: #334155;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-item:hover {
  background: #f8fafc;
  color: #0284c7;
  transform: translateX(2px);
}

.nav-dropdown-item .item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #f1f5f9;
  flex-shrink: 0;
  transition: background 0.15s;
}

.nav-dropdown-item:hover .item-icon {
  background: #e0f2fe;
}

.nav-dropdown-item .item-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.nav-dropdown-item .item-title {
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  font-size: 0.85rem;
}

.nav-dropdown-item:hover .item-title {
  color: #0284c7;
}

.nav-dropdown-item .item-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
  line-height: 1.2;
}

.nav-dropdown-item.featured {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

.nav-dropdown-item.featured:hover {
  background: linear-gradient(135deg, #dcfce7 0%, #bae6fd 100%);
  border-color: #7dd3fc;
}

/* User & Collaboration Switcher */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-badge {
  background: var(--primary-light);
  color: var(--primary-hover);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #bae6fd;
}

.user-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
}

.user-selector label {
  color: var(--slate-500);
  font-size: 0.75rem;
  font-weight: 600;
}

.user-selector select {
  border: none;
  background: transparent;
  font-weight: 700;
  color: var(--dark);
  font-size: 0.825rem;
  cursor: pointer;
  outline: none;
}

/* Main Container */
.main-content {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
  flex: 1;
  box-sizing: border-box;
}

/* View Sections */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* Hero / Welcome Banner */
.hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0d9488 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 750px;
  line-height: 1.6;
}

/* Guest Action Cards (3 Dimensi Konten Utama: Berkas & Tim, Daftar Kapten, Masuk Kelompok) */
.guest-action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
  margin: 1.75rem 0 1.25rem 0;
  width: 100%;
  box-sizing: border-box;
}

.guest-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: white;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.guest-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
}

.guest-card .gc-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  line-height: 1;
}

.guest-card .gc-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.guest-card .gc-desc {
  font-size: 0.825rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.guest-card .gc-footer {
  margin-top: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
}

.guest-card.card-kapten {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.4) 0%, rgba(14, 165, 233, 0.2) 100%);
  border-color: #38bdf8;
}

.guest-card.card-kapten:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.55) 0%, rgba(14, 165, 233, 0.3) 100%);
  border-color: #7dd3fc;
}

.guest-card.card-login {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.18) 100%);
  border-color: #6ee7b7;
}

.guest-card.card-login:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45) 0%, rgba(5, 150, 105, 0.28) 100%);
  border-color: #a7f3d0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-top: 0.25rem;
}

/* Card Components */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-100);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
  background: var(--slate-100);
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.btn-secondary:hover {
  background: var(--slate-200);
  color: var(--dark);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.775rem;
}

/* Floating Collaborative Toolbar */
.form-sticky-bar {
  position: sticky;
  top: 65px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-status-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.timer-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.3s ease;
}

.countdown-badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
}

@keyframes timerAlertPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.timer-pulse {
  animation: timerAlertPulse 1.2s infinite ease-in-out !important;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.completeness-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-bar-container {
  width: 140px;
  height: 10px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #10b981);
  width: 0%;
  transition: width 0.3s ease;
}

.autosave-text {
  font-size: 0.775rem;
  color: var(--slate-500);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Form Styles */
.form-section {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--slate-100);
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
}

.section-editor-tag {
  font-size: 0.75rem;
  color: var(--slate-500);
  background: var(--slate-100);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.section-comp-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.form-group.col-span-full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-tag {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background-color: var(--white);
  color: var(--dark);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* Medical Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

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

.med-table th {
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
}

.med-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: middle;
}

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

.med-table input, .med-table select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  outline: none;
}

.med-table input:focus {
  border-color: var(--primary);
}

/* Reference Split Modal / Drawer */
.reference-modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 95vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  flex-direction: column;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate-50);
}

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

.case-doc-preview {
  background: #fdfdfd;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.case-doc-preview h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--slate-300);
}

.case-doc-preview h4:first-child {
  margin-top: 0;
}

/* Modal Overlay */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

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

/* Scoring & Evaluation Report Styles */
.score-hero {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.score-big {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-predicate {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.5rem;
  backdrop-filter: blur(4px);
}

.score-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.score-metric-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border-top: 4px solid var(--primary);
}

.score-metric-card.accent-green { border-top-color: var(--success); }
.score-metric-card.accent-amber { border-top-color: var(--warning); }
.score-metric-card.accent-indigo { border-top-color: var(--info); }

.score-metric-title {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark);
  margin-top: 0.25rem;
}

.score-metric-desc {
  font-size: 0.775rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

/* Audit Trail & Collaboration Table */
.audit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.audit-chip.captain {
  background: #fef3c7;
  color: #92400e;
}

.audit-chip.member {
  background: var(--primary-light);
  color: var(--primary-hover);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--dark);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.3s ease-out;
}

.toast.success { background: #065f46; border-left: 4px solid #10b981; }
.toast.error { background: #881337; border-left: 4px solid #f43f5e; }
.toast.info { background: #1e1b4b; border-left: 4px solid #6366f1; }

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

/* Print Styles for Medical Record & Grade Report */
@media print {
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .app-header, .form-sticky-bar, .nav-tabs, .btn, .modal-backdrop, .reference-modal, .toast-container, .no-print {
    display: none !important;
  }

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

  .card, .form-section {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
    margin-bottom: 1rem;
    padding: 1rem;
  }

  .print-only-header {
    display: block !important;
    text-align: center;
    border-bottom: 2px solid black;
    padding-bottom: 10px;
    margin-bottom: 15px;
  }
}

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

/* Responsive Viewport Alignment: Mencegah Nav & Tombol Melesat Keluar */
@media (max-width: 1280px) {
  .header-container {
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }
  .nav-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .brand-text h1 {
    font-size: 1.05rem;
  }
  .brand-text span {
    font-size: 0.7rem;
  }
}

@media (max-width: 1080px) {
  .header-container {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .nav-tabs {
    flex-wrap: wrap;
    border-radius: 14px;
    padding: 0.3rem;
  }
  .nav-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.775rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .brand {
    justify-content: center;
  }
  .nav-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    border-radius: 12px;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .form-sticky-bar {
    top: 0;
  }
}

/* Leaderboard Clickable & Prodi Badge */
.team-leaderboard-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, color 0.15s ease;
}
.team-leaderboard-link:hover .team-name-title {
  color: var(--primary) !important;
  text-decoration: underline;
}
.badge-prodi {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-prodi.keperawatan {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.badge-prodi.fisioterapi {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}
.badge-prodi.rmik {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* Team Detail Modal Tabs */
.tdm-tab-btn {
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.tdm-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
