@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --primary-light: #fff1f2;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fef3c7;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-card: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', Calibri, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  padding: 36px 16px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 20px 20px;
}

.form-container {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* Header Banner - SolusiPrint Dominan Kuning-Emas Gradasi Merah-Hitam */
.header-banner {
  background: radial-gradient(circle at 85% 15%, rgba(254, 240, 138, 0.45) 0%, transparent 55%),
              linear-gradient(115deg, #180509 0%, #7f1d1d 10%, #dc2626 22%, #ea580c 35%, #f59e0b 50%, #facc15 72%, #fde047 100%);
  color: #ffffff;
  padding: 36px 28px 30px;
  text-align: center;
  position: relative;
}

.header-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #f59e0b 0%, #facc15 50%, #fef08a 100%);
}

.brand-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.brand-logo-wrap img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); /* Logo putih tajam berkontras tinggi */
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.4);
  padding: 5px 14px;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.brand-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.header-banner h1 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.header-banner p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.96);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* Form Styles */
form {
  padding: 30px 28px;
}

@media (max-width: 540px) {
  form {
    padding: 24px 18px;
  }
  .header-banner {
    padding: 28px 18px 24px;
  }
}

.form-section {
  margin-bottom: 28px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 24px;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 18px;
  padding-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecdd3;
}

.section-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-group label span.req {
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

/* Upload Avatar Preview */
.photo-upload-container {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.photo-preview-box {
  width: 82px;
  height: 104px;
  border-radius: 8px;
  border: 2px dashed #cbd5e1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-preview-box span {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px;
  line-height: 1.3;
}

.upload-instruction {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-upload:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(211, 47, 47, 0.3);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #b71c1c 0%, #991b1b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(211, 47, 47, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

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

/* Success Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.success-icon {
  width: 68px;
  height: 68px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  margin: 0 auto 16px;
  border: 3px solid #bbf7d0;
}

.modal-box h2 {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.5;
}

.peserta-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  margin-bottom: 20px;
}

.peserta-card div {
  margin-bottom: 6px;
}

.peserta-card div:last-child {
  margin-bottom: 0;
}

.btn-open-absen {
  display: block;
  width: 100%;
  padding: 13px;
  background: #16a34a;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  transition: background 0.2s;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn-open-absen:hover {
  background: #15803d;
}

/* Portal Switcher Tabs */
.portal-nav-bar {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border);
}

.portal-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-nav-btn.active {
  background: #0f172a;
  color: #f59e0b;
  border-color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

/* Container width adaptive */
.form-container.wide-mode {
  max-width: 960px;
  transition: max-width 0.3s ease;
}

/* Daftar Hadir Styling */
.daftar-hadir-content {
  padding: 24px 28px 40px;
}

@media (max-width: 600px) {
  .daftar-hadir-content {
    padding: 16px 14px 30px;
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.filter-group {
  flex: 1;
  min-width: 140px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stat-card .num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-card .lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
}

.stat-card.c-total .num { color: #0f172a; }
.stat-card.c-hadir .num { color: #16a34a; }
.stat-card.c-istirahat .num { color: #d97706; }
.stat-card.c-pulang .num { color: #2563eb; }
.stat-card.c-cuti .num { color: #9333ea; }
.stat-card.c-belum .num { color: #94a3b8; }

/* Table Kehadiran */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

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

.kehadiran-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}

.kehadiran-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.peserta-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.peserta-cell.clickable-profile {
  cursor: pointer;
  padding: 6px 10px;
  margin: -6px -10px;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.peserta-cell.clickable-profile:hover {
  background: #fef9c3;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25);
}

.peserta-cell.clickable-profile:hover .peserta-nama {
  color: #854d0e;
}

.peserta-cell.clickable-profile:hover .peserta-avatar {
  box-shadow: 0 0 0 2px #ca8a04;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 1px 7px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.2s;
}

.peserta-cell.clickable-profile:hover .profile-tag {
  background: #0f172a;
  color: #facc15;
  border-color: #0f172a;
}

.peserta-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.peserta-nama {
  font-weight: 700;
  color: #0f172a;
}

.peserta-instansi {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* Badges Kehadiran */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill-hadir { background: #dcfce7; color: #15803d; }
.pill-istirahat { background: #fef3c7; color: #b45309; }
.pill-pulang { background: #dbeafe; color: #1d4ed8; }
.pill-cuti { background: #f3e8ff; color: #7e22ce; }
.pill-belum { background: #f1f5f9; color: #64748b; }

.btn-action-refresh {
  padding: 10px 16px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-action-refresh:hover {
  background: #1e293b;
}

/* Tombol PDF & Dokumen */
.btn-pdf-doc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  transition: 0.15s;
}
.btn-pdf-doc:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modul Penilaian & E-Sertifikat */
.penilaian-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
}
.range-group {
  margin-bottom: 16px;
}
.range-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.range-val {
  color: #d32f2f;
  font-size: 14px;
}
.slider-custom {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  accent-color: #d32f2f;
}
.grade-summary-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}
.grade-avg-num {
  font-size: 28px;
  font-weight: 800;
  color: #b45309;
}
.grade-badge-txt {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  font-size: 12px;
  margin-top: 4px;
}

/* Modul Pengumuman */
.announcement-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.2s;
}
.announcement-card.type-penting {
  border-left: 4px solid #e11d48;
}
.announcement-card.type-tugas {
  border-left: 4px solid #f59e0b;
}
.announcement-card.type-info {
  border-left: 4px solid #3b82f6;
}
.announcement-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.announcement-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  margin-bottom: 8px;
}
.announcement-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-line;
}

/* Badge & Tombol Status Verifikasi Guru Pembimbing */
.badge-status-guru {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-guru-verified {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-guru-unverified {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #f59e0b;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
}

.badge-guru-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.btn-resend-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  white-space: nowrap;
}

.btn-resend-small:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0284c7;
  transform: translateY(-1px);
}

.pembimbing-wa-link {
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.pembimbing-wa-link:hover {
  color: #15803d;
  text-decoration: underline;
}

/* Card & Table Khusus View Guru Pembimbing */
.guru-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.guru-pill-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.guru-pill-filter.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}



