.modal--detail .detail-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(14, 165, 233, 0.06);
  animation: pop 0.22s cubic-bezier(.2,.9,.3,1.2);
  display: flex;
  flex-direction: column;
}
.modal--detail .corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--cyan-deep);
  pointer-events: none;
  z-index: 3;
}
.modal--detail .corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.modal--detail .corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.modal--detail .corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.modal--detail .corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px dashed var(--line);
  position: relative;
  z-index: 2;
  background: rgba(247, 250, 252, 0.7);
  backdrop-filter: blur(6px);
}
.detail-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--cyan-deep);
  text-transform: uppercase;
}
.detail-actions { display: flex; gap: 8px; }
.topbar-btn {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.topbar-btn:hover { color: #fff; background: var(--cyan-deep); border-color: var(--cyan-deep); }
.topbar-btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.topbar-btn svg { width: 15px; height: 15px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  overflow-y: auto;
  flex: 1;
}

.detail-photo {
  position: relative;
  background: linear-gradient(180deg, #E6F1FA, #D2E3F2);
  border-right: 1px dashed var(--line);
  min-height: 360px;
  overflow: hidden;
}
.detail-photo .class-badge {
  top: 16px; left: 16px;
  font-size: 12px;
}
.detail-photo .card-code {
  bottom: 16px; left: 16px;
  font-size: 11.5px;
}
.photo-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-frame .initials {
  font-family: var(--display);
  font-weight: 800;
  font-size: 110px;
  color: var(--cyan-deep);
  letter-spacing: 0.04em;
  text-shadow: 0 4px 30px rgba(14, 165, 233, 0.35);
}
.detail-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 34, 64, 0.20) 0%, transparent 25%, transparent 65%, rgba(11, 34, 64, 0.35) 100%);
  pointer-events: none;
}

.detail-body {
  padding: 28px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.detail-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 4px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--ink) 0%, var(--cyan-deep) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.detail-rows { display: flex; flex-direction: column; gap: 10px; }
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .ico {
  width: 18px; height: 18px;
  color: var(--cyan-deep);
  flex-shrink: 0;
  margin-top: 2px;
}
.detail-row.is-loc .ico { color: var(--amber-deep); }
.detail-row .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.detail-row .val { color: var(--ink); font-size: 15px; line-height: 1.4; word-break: break-word; }

.detail-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.15s;
}
.contact-pill:hover {
  border-color: var(--cyan-deep);
  color: #fff;
  background: var(--cyan-deep);
  transform: translateY(-1px);
}
.contact-pill svg { width: 15px; height: 15px; color: var(--cyan-deep); flex-shrink: 0; }
.contact-pill:hover svg { color: #fff; }

.detail-bio {
  margin-top: 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--cyan);
  background: rgba(14, 165, 233, 0.06);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.detail-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-photo { min-height: 280px; border-right: none; border-bottom: 1px dashed var(--line); }
  .detail-body { padding: 22px 20px; }
  .photo-frame .initials { font-size: 80px; }
}
