.teacher-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.teacher-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.teacher-title h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.teacher-title .sub {
  margin-top: 6px;
  color: rgba(0,0,0,0.62);
  font-size: 14px;
}

.teacher-actions {
  display: flex;
  gap: 10px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search input {
  width: 340px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  outline: none;
  font-size: 14px;
  background: rgba(255,255,255,0.9);
}

.search input:focus {
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 0 0 4px rgba(169,208,231,0.35);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th {
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.75);
  background: rgba(0,0,0,0.02);
}

.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
  font-size: 14px;
}

.data-table tr:hover td {
  background: rgba(169,208,231,0.10);
}

.empty-td {
  text-align: center;
  color: rgba(0,0,0,0.55);
  padding: 18px 10px !important;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form {
  margin: 10px 0 16px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.02);
}

.form-row {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: end;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: rgba(0,0,0,0.7);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  outline: none;
  font-size: 14px;
  background: #fff;
}

.field input:focus,
.field select:focus {
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 0 0 4px rgba(169,208,231,0.35);
}

.btn-col {
  display: flex;
  flex-direction: column;
}

.pill-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.02);
}

.pill-subject {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(169,208,231,0.18);
}

.btn-shadow {
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.btn-shadow:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #0b6cff;
  color: #fff;
}

.btn-ghost {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.78);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
}

.btn-small {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.btn-link {
  background: rgba(169,208,231,0.25);
  border: 1px solid rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.8);
}

.btn-danger {
  background: rgba(255, 40, 40, 0.08);
  border: 1px solid rgba(255, 40, 40, 0.18);
  color: #c40000;
}

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999999;
}

.modal-card{
  width: min(980px, 95vw);
  max-height: 85vh;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #dbe5f2;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e6eef8;
}

.modal-title{
  font-size: 18px;
  font-weight: 800;
  color: #1b2a44;
}

.modal-sub{
  font-size: 12px;
  color: #5b6b86;
  margin-top: 2px;
}

.btn-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe5f2;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.modal-body{
  padding: 16px 18px 18px;
  overflow: auto;
  max-height: calc(85vh - 64px);
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}


.modal {
  width: min(1100px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 16px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-sub {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(0,0,0,0.62);
}

.modal-close {
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 900;
}

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
}

.modal-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.hint {
  font-size: 13px;
  color: rgba(0,0,0,0.6);
}

@media (max-width: 900px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .search input {
    width: 100%;
  }
  .toolbar, .modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal-box{
  width: min(1100px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title{
  font-size: 18px;
  font-weight: 800;
}

.modal-sub{
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
}

.modal-toolbar{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.modal-toolbar input{
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  outline: none;
}

.student-form{
  border: 1px solid #e6edf7;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f9fbff;
}

.student-form .form-row{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.student-form label{
  font-size: 12px;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  opacity: 0.8;
}

.student-form input,
.student-form select{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  outline: none;
}

.form-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.table-wrap{
  overflow: auto;
  border: 1px solid #e6edf7;
  border-radius: 14px;
}

.data-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.data-table th,
.data-table td{
  padding: 12px 10px;
  border-bottom: 1px solid #eef3fb;
  text-align: left;
  font-size: 14px;
}

.data-table thead th{
  background: #f4f8ff;
  font-weight: 800;
}

.empty-td{
  text-align: center;
  opacity: 0.7;
  padding: 18px;
}
