/*
 * Portal Guru v190 — daftar siswa ringkas dengan preview detail.
 * Data dan aksi tetap memakai komponen React yang sudah ada.
 */

.portal-student-list-v190 {
  display: flex !important;
  width: 100% !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1px solid #e7efecca !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(18, 74, 59, 0.06) !important;
}

.portal-student-name-row-v190 {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 56px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 18px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition:
    background-color 0.18s ease,
    color 0.18s ease !important;
}

.portal-student-name-row-v190:last-child {
  border-bottom: 0 !important;
}

.portal-student-name-row-v190:hover,
.portal-student-name-row-v190:focus-visible {
  border-color: #edf2f0 !important;
  background: #f0faf7 !important;
  box-shadow: none !important;
  transform: none !important;
}

.portal-student-name-row-v190:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(5, 150, 105, 0.42) !important;
  outline-offset: -2px !important;
}

.portal-student-name-row-v190 > *:not(.portal-student-row-identity-v188),
.portal-student-name-row-v190 .portal-student-row-actions-v188 {
  display: none !important;
}

.portal-student-name-row-v190 .portal-student-row-identity-v188 {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.portal-student-name-row-v190
  .portal-student-row-identity-v188
  > :first-child {
  display: none !important;
}

.portal-student-name-row-v190
  .portal-student-row-identity-v188
  > :last-child {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.portal-student-name-row-v190 .portal-student-row-identity-v188 h3 {
  display: block !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: #334155 !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.portal-student-name-row-v190:hover .portal-student-row-identity-v188 h3,
.portal-student-name-row-v190:focus-visible .portal-student-row-identity-v188 h3 {
  color: #047857 !important;
}

.portal-student-name-row-v190 .portal-student-row-identity-v188 p {
  display: none !important;
}

body.portal-student-preview-open-v190 {
  overflow: hidden !important;
}

.portal-student-preview-v190[hidden] {
  display: none !important;
}

.portal-student-preview-v190 {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.48);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.portal-student-preview-card-v190 {
  box-sizing: border-box;
  width: min(100%, 470px);
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  animation: portalStudentPreviewInV190 0.22s ease both;
}

.portal-student-preview-header-v190 {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #edf2f0;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.portal-student-preview-heading-v190 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.portal-student-preview-avatar-v190 {
  display: grid;
  width: 46px;
  min-width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #047857;
  background: #dff8ef;
  font-size: 17px;
  font-weight: 800;
}

.portal-student-preview-eyebrow-v190 {
  display: block;
  margin-bottom: 2px;
  color: #07966e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.portal-student-preview-heading-v190 h2 {
  margin: 0;
  overflow: hidden;
  color: #1e293b;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-student-preview-close-v190 {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #64748b;
  background: #f1f5f4;
  font: 500 24px/1 Arial, sans-serif;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.portal-student-preview-close-v190:hover {
  color: #dc2626;
  background: #fef2f2;
}

.portal-student-preview-details-v190 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 20px 22px 10px;
}

.portal-student-preview-details-v190 > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #edf2f0;
  border-radius: 16px;
  background: #f8fbfa;
}

.portal-student-preview-detail-wide-v190 {
  grid-column: 1 / -1;
}

.portal-student-preview-details-v190 dt {
  margin: 0 0 5px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.portal-student-preview-details-v190 dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
}

.portal-student-preview-utility-v190 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 22px 17px;
}

.portal-student-preview-utility-v190 button {
  padding: 5px 0;
  border: 0;
  color: #b45309;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.portal-student-preview-utility-v190 button[data-student-qr] {
  color: #047857;
}

.portal-student-preview-utility-v190 button[data-student-delete] {
  color: #dc2626;
}

.portal-student-preview-footer-v190 {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid #edf2f0;
}

.portal-student-preview-footer-v190 button {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease;
}

.portal-student-preview-footer-v190 button:hover {
  transform: translateY(-1px);
}

.portal-student-preview-cancel-v190 {
  color: #64748b;
  background: #f1f5f4;
}

.portal-student-preview-edit-v190 {
  color: #fff;
  background: #07966e;
  box-shadow: 0 9px 20px rgba(7, 150, 110, 0.2);
}

.portal-student-preview-edit-v190:hover {
  background: #047857;
}

.portal-student-preview-v190 button:focus-visible {
  outline: 2px solid rgba(5, 150, 105, 0.48);
  outline-offset: 2px;
}

.portal-student-preview-v190 button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@keyframes portalStudentPreviewInV190 {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 767px) {
  .portal-student-list-v190 {
    border-radius: 17px !important;
  }

  .portal-student-name-row-v190 {
    min-height: 54px !important;
    padding: 0 14px !important;
  }

  .portal-student-name-row-v190 .portal-student-row-identity-v188 h3 {
    font-size: 13.5px !important;
  }

  .portal-student-preview-v190 {
    align-items: flex-end;
    padding: 12px;
  }

  .portal-student-preview-card-v190 {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 24px;
  }

  .portal-student-preview-header-v190 {
    padding: 18px 18px 15px;
  }

  .portal-student-preview-details-v190 {
    padding: 16px 18px 8px;
  }

  .portal-student-preview-utility-v190 {
    padding: 4px 18px 14px;
  }

  .portal-student-preview-footer-v190 {
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 370px) {
  .portal-student-preview-details-v190 {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-student-preview-detail-wide-v190 {
    grid-column: auto;
  }

  .portal-student-preview-footer-v190 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-student-name-row-v190,
  .portal-student-preview-card-v190,
  .portal-student-preview-v190 button {
    animation: none !important;
    transition: none !important;
  }
}
