/* =========================================================
   pages/edit-student.css
   ---------------------------------------------------------
   Edit student page styles.
   ========================================================= */

/* =========================================================
   16) EDIT STUDENT PAGE 
   --------------------------------------------------------- */
   
.nn-editstu .nn-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}

.nn-editstu .nn-field{
  min-width:0;
}

.nn-editstu .nn-field label{
  display:block;
  font-weight:700;
  margin:0 0 4px;
}

.nn-editstu input,
.nn-editstu textarea,
.nn-editstu select{
  width:100%;
  max-width:100%;
  min-width:0;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:6px;
  box-sizing:border-box;
}

.nn-editstu input[type="date"]{
  appearance:none;
  -webkit-appearance:none;
  min-height:46px;
}

.nn-editstu .nn-field--full{
  grid-column:1 / -1;
}

.nn-editstu .nn-photo-preview img{
  border:1px solid rgba(0,0,0,.08);
}

@media(max-width:900px){
  .nn-editstu .nn-form-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   STUDENT EDITOR V2
   Sectioned, iPad-first profile workspace.
   ========================================================= */

.nn-student-editor-v2 {
  --nn-edit-ink: #17212b;
  --nn-edit-muted: #64748b;
  --nn-edit-line: #e2e8f0;
  --nn-edit-soft: #f7f9fa;
  --nn-edit-teal: #0f9fa8;
  display: grid;
  gap: 18px;
  width: min(100%, 1180px);
  margin: 0 auto;
  color: var(--nn-edit-ink);
}

.nn-student-editor-v2 *,
.nn-student-editor-v2 *::before,
.nn-student-editor-v2 *::after { box-sizing: border-box; }

.nn-editstu__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 4px 0 2px; }
.nn-editstu__header h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); line-height: 1.05; }
.nn-editstu__header p:not(.nn-section-kicker) { margin: 6px 0 0; color: var(--nn-edit-muted); }
.nn-editstu__header .btn { border-radius: 5px; }

.nn-editstu__layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.nn-editstu__form { display: grid; gap: 14px; min-width: 0; }
.nn-editstu__section,
.nn-editstu__metadata,
.nn-editstu__danger { border: 1px solid var(--nn-edit-line); border-radius: 6px; background: #fff; box-shadow: none; }
.nn-editstu__section { padding: 20px 22px; }
.nn-editstu__sectionHead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.nn-editstu__sectionHead > span { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border: 1px solid #b9c5cf; border-radius: 4px; color: #475569; font-size: .7rem; font-weight: 800; }
.nn-editstu__sectionHead h2 { margin: 1px 0 0; color: var(--nn-edit-ink); font-size: 1.08rem; }
.nn-editstu__sectionHead p { margin: 4px 0 0; color: var(--nn-edit-muted); font-size: .78rem; line-height: 1.45; }

.nn-student-editor-v2 .nn-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.nn-student-editor-v2 .nn-field { display: grid; align-content: start; gap: 6px; }
.nn-student-editor-v2 .nn-field label,
.nn-editstu__feature label { margin: 0; color: #334155; font-size: .78rem; font-weight: 750; }
.nn-student-editor-v2 input,
.nn-student-editor-v2 textarea,
.nn-student-editor-v2 select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: var(--nn-edit-ink);
  font: inherit;
}
.nn-student-editor-v2 textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.nn-student-editor-v2 input:focus,
.nn-student-editor-v2 textarea:focus,
.nn-student-editor-v2 select:focus { outline: 2px solid rgba(15, 159, 168, .18); border-color: var(--nn-edit-teal); }
.nn-student-editor-v2 .nn-field small { color: var(--nn-edit-muted); font-size: .72rem; }
.nn-readonly-field { display: flex; align-items: center; min-height: 42px; padding: 9px 11px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; color: #475569; font-size: .86rem; }

.nn-editstu__parentList { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nn-editstu__parentList > div { display: grid; min-width: 180px; padding: 10px 12px; border-left: 2px solid var(--nn-edit-teal); background: var(--nn-edit-soft); }
.nn-editstu__parentList strong { font-size: .84rem; }
.nn-editstu__parentList a:not(.btn) { margin-top: 2px; overflow-wrap: anywhere; font-size: .75rem; }
.nn-editstu__parentList p { margin: 0; color: var(--nn-edit-muted); font-size: .84rem; }
.nn-editstu__parentList .btn { margin-left: auto; border-radius: 5px; }

.nn-editstu__featureGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nn-editstu__feature { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 14px; border: 1px solid #e4e9ed; border-radius: 5px; background: #fafbfc; }
.nn-editstu__feature p { min-height: 2.7em; margin: 0; color: var(--nn-edit-muted); font-size: .75rem; line-height: 1.4; }
.nn-editstu__feature small { color: var(--nn-edit-muted); font-size: .7rem; }
.nn-editstu__section--private { border-left: 3px solid #64748b; background: #f8fafc; }
.nn-editstu__section--private textarea { background: #fff; }
.nn-editstu__check { display: flex !important; align-items: center; gap: 8px; width: fit-content; font-weight: 600 !important; }
.nn-editstu__check input { width: auto; min-height: 0; }
.nn-student-editor-v2 .nn-photo-preview { display: block; width: min(100%, 320px); margin-bottom: 4px; }
.nn-student-editor-v2 .nn-photo-preview img { display: block; width: 100%; max-height: 210px; object-fit: cover; border: 1px solid var(--nn-edit-line); border-radius: 5px; }

.nn-editstu__metadata { position: sticky; top: 20px; padding: 18px; }
.nn-editstu__metadata h2 { margin: 0 0 14px; font-size: .95rem; }
.nn-editstu__metadata dl { display: grid; margin: 0; }
.nn-editstu__metadata dl div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.nn-editstu__metadata dl div:last-child { border-bottom: 0; }
.nn-editstu__metadata dt { color: var(--nn-edit-muted); font-size: .73rem; }
.nn-editstu__metadata dd { margin: 0; text-align: right; font-size: .78rem; font-weight: 800; }

.nn-editstu__savebar { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; gap: 9px; padding: 12px 0; background: linear-gradient(to bottom, rgba(247, 249, 250, 0), #f7f9fa 28%); }
.nn-editstu__savebar .btn { min-width: 120px; justify-content: center; border-radius: 5px; }
.nn-editstu__danger { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-color: #e6c9c7; }
.nn-editstu__danger h2 { margin: 0; font-size: 1rem; }
.nn-editstu__danger p:not(.nn-section-kicker) { margin: 5px 0 0; color: var(--nn-edit-muted); font-size: .8rem; }
.nn-editstu__danger .nn-editstu__archive { border-color: #b9534d; background: #fff; color: #9b302a; }

@media (max-width: 900px) {
  .nn-editstu__layout { grid-template-columns: minmax(0, 1fr) 220px; }
  .nn-student-editor-v2 .nn-form-grid,
  .nn-editstu__featureGrid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nn-student-editor-v2 { gap: 12px; }
  .nn-editstu__header { align-items: flex-start; }
  .nn-editstu__header .btn { flex: 0 0 auto; }
  .nn-editstu__layout { display: flex; flex-direction: column; }
  .nn-editstu__metadata { position: static; order: -1; width: 100%; }
  .nn-editstu__metadata dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .nn-editstu__metadata dl div { display: grid; gap: 3px; padding: 11px; border: 1px solid #e7ebef; border-radius: 5px; background: #f8fafc; }
  .nn-editstu__metadata dd { text-align: left; }
  .nn-editstu__section { padding: 17px; }
  .nn-editstu__parentList { display: grid; }
  .nn-editstu__parentList .btn { width: 100%; margin: 0; justify-content: center; }
  .nn-editstu__savebar { position: static; display: grid; grid-template-columns: 1fr; padding: 0; background: none; }
  .nn-editstu__savebar .btn--primary { order: -1; }
  .nn-editstu__danger { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .nn-editstu__header { display: grid; }
  .nn-editstu__header .btn { width: 100%; justify-content: center; }
  .nn-editstu__metadata dl { grid-template-columns: 1fr; }
}
