/* Lê+ V19.19.30 — refinamento visual aditivo da aba Meus Alunos no tablet */
@media (min-width:600px) and (max-width:1366px){
  #students .card{
    padding:16px!important;
    background:#f4f7fb!important;
    border:1px solid #e2e9f2!important;
    border-radius:20px!important;
    overflow:hidden!important;
  }

  #studentsTable,
  #studentsTable table,
  #studentsTable tbody{width:100%!important;max-width:100%!important}
  #studentsTable table{display:block!important}
  #studentsTable thead{display:none!important}
  #studentsTable tbody{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
    align-items:stretch!important;
  }

  #studentsTable tr{
    display:grid!important;
    grid-template-columns:86px minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-rows:auto auto auto auto auto auto!important;
    column-gap:14px!important;
    row-gap:9px!important;
    align-content:start!important;
    min-width:0!important;
    width:100%!important;
    padding:17px!important;
    border:1px solid #dce5f0!important;
    border-radius:20px!important;
    background:#fff!important;
    box-shadow:0 6px 20px rgba(23,61,104,.08)!important;
    overflow:hidden!important;
  }
  #studentsTable tr:hover{
    transform:translateY(-1px)!important;
    border-color:#c4d5e7!important;
    box-shadow:0 9px 25px rgba(23,61,104,.12)!important;
  }

  #studentsTable td{
    min-width:0!important;
    width:auto!important;
    display:block!important;
    padding:0!important;
    border:0!important;
    color:#1f3550!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  /* Foto */
  #studentsTable td:nth-child(1){
    grid-column:1!important;
    grid-row:1/6!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    padding-top:2px!important;
  }
  #studentsTable .avatar,
  #studentsTable td:first-child img,
  #studentsTable .avatar-fallback{
    width:76px!important;
    height:76px!important;
    min-width:76px!important;
    border-radius:18px!important;
    object-fit:cover!important;
    border:3px solid #fff!important;
    box-shadow:0 3px 13px rgba(27,62,102,.17)!important;
    background:#e9eff6!important;
  }
  #studentsTable .avatar-fallback{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    font-size:0!important;
    color:transparent!important;
  }
  #studentsTable .avatar-fallback::before{
    content:''!important;
    width:42px!important;
    height:42px!important;
    display:block!important;
    background-repeat:no-repeat!important;
    background-position:center!important;
    background-size:contain!important;
    opacity:.72!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='22' r='13' fill='%23657b91'/%3E%3Cpath d='M10 56c2-14 11-22 22-22s20 8 22 22' fill='%23657b91'/%3E%3C/svg%3E")!important;
  }

  /* Nome */
  #studentsTable td:nth-child(2){
    grid-column:2/4!important;
    grid-row:1!important;
    padding:1px 0 10px!important;
    border-bottom:1px solid #edf1f6!important;
    font-size:18px!important;
    line-height:1.15!important;
    text-transform:uppercase!important;
    letter-spacing:.02em!important;
    color:#173d68!important;
  }
  #studentsTable td:nth-child(2) b{font-weight:850!important}
  #studentsTable td:nth-child(2) .small{
    display:block!important;
    margin-top:4px!important;
    font-size:11px!important;
    line-height:1.2!important;
    color:#8492a2!important;
    text-transform:none!important;
    letter-spacing:0!important;
  }

  /* Campos: rótulo acima, valor abaixo */
  #studentsTable td:nth-child(n+3):nth-child(-n+8){
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:3px!important;
    min-height:43px!important;
    padding:7px 9px!important;
    border:1px solid #edf2f7!important;
    border-radius:10px!important;
    background:#f8fafc!important;
    font-size:13px!important;
    line-height:1.25!important;
    font-weight:700!important;
    color:#263d57!important;
  }
  #studentsTable td:nth-child(n+3):nth-child(-n+8)::before{
    display:block!important;
    color:#7d8da0!important;
    font-size:9px!important;
    line-height:1!important;
    font-weight:800!important;
    letter-spacing:.075em!important;
    text-transform:uppercase!important;
  }
  #studentsTable td:nth-child(3){grid-column:2!important;grid-row:2!important}
  #studentsTable td:nth-child(4){grid-column:3!important;grid-row:2!important}
  #studentsTable td:nth-child(5){grid-column:2!important;grid-row:3!important}
  #studentsTable td:nth-child(8){grid-column:3!important;grid-row:3!important}
  #studentsTable td:nth-child(6){grid-column:2/4!important;grid-row:4!important}
  #studentsTable td:nth-child(7){grid-column:2/4!important;grid-row:5!important}
  #studentsTable td:nth-child(3)::before{content:'Série'!important}
  #studentsTable td:nth-child(4)::before{content:'Turma'!important}
  #studentsTable td:nth-child(5)::before{content:'Sala'!important}
  #studentsTable td:nth-child(6)::before{content:'Professor'!important}
  #studentsTable td:nth-child(7)::before{content:'Escola'!important}
  #studentsTable td:nth-child(8)::before{content:'Avaliações'!important}

  /* Ações */
  #studentsTable td:nth-child(9){
    grid-column:1/4!important;
    grid-row:6!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    margin-top:3px!important;
    padding-top:12px!important;
    border-top:1px solid #e9eff5!important;
  }
  #studentsTable td:nth-child(9) .btn{
    width:100%!important;
    min-width:0!important;
    min-height:40px!important;
    padding:9px 8px!important;
    border-radius:11px!important;
    font-size:12px!important;
    font-weight:750!important;
    justify-content:center!important;
  }
}

@media (max-width:599px){
  #studentsTable tbody{grid-template-columns:1fr!important}
  #studentsTable .avatar-fallback{font-size:0!important;color:transparent!important}
  #studentsTable .avatar-fallback::before{
    content:'👤'!important;
    font-size:28px!important;
    color:#657b91!important;
  }
}
