/* ============================================================
   Student Directory Table Styles & Enhanced UI
   ============================================================ */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: center;
}

.custom-table th {
  background: #16232F;
  color: #ffffff;
  padding: 12px 10px;
  font-weight: 600;
}

.custom-table td {
  padding: 10px 8px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

.custom-table tr:nth-child(even) {
  background: #f8fafc;
}

.student-search-box {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  margin-bottom: 18px;
  outline: none;
  font-size: 0.9rem;
}

.student-search-box:focus {
  border-color: #0284c7;
}

.directory-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.directory-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.directory-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #16232f;
  outline: none;
  transition: all 0.2s ease;
}

.directory-search-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.search-svg-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.directory-count-badge {
  background: #eff6ff;
  color: #0284c7;
  border: 1px solid #bfdbfe;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Student Cards Grid */
.students-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 540px;
  overflow-y: auto;
  padding: 4px 2px;
}

.student-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(16, 36, 56, 0.03);
  transition: all 0.2s ease;
}

.student-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 16px rgba(2, 132, 199, 0.08);
}

.student-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.student-meta {
  flex: 1;
  min-width: 0;
}

.student-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #16232f;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-card-roll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.card-use-btn {
  background: #eff6ff;
  color: #0284c7;
  border: 1px solid #bfdbfe;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.card-use-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

.copy-mini-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  transition: color 0.15s;
}

.copy-mini-btn:hover {
  color: #0284c7;
}

@media (max-width: 480px) {
  .students-card-grid {
    grid-template-columns: 1fr;
  }
}
/* Student Directory Card Grid & Responsive Fix */
.student-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.student-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .student-card {
    padding: 12px;
  }
}