/* css/teacher.css */

/* ════════════════════════════════════════════════
   TEACHER THEME OVERRIDES
   ════════════════════════════════════════════════ */

/* Blue header */
.dash-header-teacher {
  background: linear-gradient(135deg, #1565C0, #2196F3) !important;
  border-bottom: none !important;
}

.dash-header-teacher .dash-logo      { color: #fff; }
.dash-header-teacher .dash-username  { color: rgba(255,255,255,0.85); }
.dash-header-teacher .logout-btn     { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.25); }
.dash-header-teacher .logout-btn:hover { background: rgba(255,255,255,0.25); }
.dash-header-teacher .avatar-placeholder { background: rgba(255,255,255,0.25); color: #fff; }

.dash-role-badge {
  background: rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 11px; font-weight: 700;
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

/* Blue bottom nav */
.bottom-nav-teacher {
  background: linear-gradient(135deg, #1565C0, #2196F3) !important;
  border-top: none !important;
}

.bottom-nav-teacher .bn-item-teacher { color: rgba(255,255,255,0.65); }
.bottom-nav-teacher .bn-item-teacher.active { color: #fff; }

.bottom-nav-teacher .bn-item-teacher.active .bn-icon { color: #fff; }
.bottom-nav-teacher .bn-item-teacher .bn-label { color: inherit; }

/* Pill highlight for teacher nav */
.bottom-nav-teacher .bn-item-teacher.active::before {
  background: rgba(255,255,255,0.2);
}

/* ════════════════════════════════════════════════
   TEACHER HOME TAB
   ════════════════════════════════════════════════ */
.th-page {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.th-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 96px;
}

.th-page-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800;
  margin-bottom: 16px;
}

/* ── Header gradient card ── */
.th-header-card {
  background: linear-gradient(135deg, #1565C0, #2196F3);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(21,101,192,0.4);
}

.th-header-top {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}

.th-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  overflow: hidden; flex-shrink: 0;
}

.th-avatar img { width: 100%; height: 100%; object-fit: cover; }

.th-greeting-sub  { font-size: 12px; color: rgba(255,255,255,0.65); font-weight: 300; }
.th-greeting-name { font-size: 16px; color: #fff; font-weight: 500; }

.th-header-title {
  font-size: 24px; font-weight: 700;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.th-header-sub { font-size: 13px; color: rgba(255,255,255,0.65); }

/* ── Action cards ── */
.th-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }

.th-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
}

.th-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); }

.th-card-icon-wrap {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.th-card-body { flex: 1; min-width: 0; }

.th-card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 2px; }
.th-card-sub   { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.th-card-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 100px;
  padding: 2px 8px;
}

.th-card-arrow {
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ── Performance overview ── */
.th-perf-section { margin-bottom: 22px; }

.th-section-title {
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 800;
  margin-bottom: 12px;
}

.th-perf-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.th-perf-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}

.th-perf-label { font-size: 15px; font-weight: 600; }

.th-perf-pct {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  font-size: 13px; font-weight: 700;
  border-radius: 100px;
  padding: 4px 12px;
}

.th-perf-bar-wrap {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.th-perf-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 4px;
  transition: width 0.5s;
}

/* ── Class list ── */
.th-class-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.th-class-row {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 14px 0;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s;
}

.th-class-row:hover { background: rgba(255,255,255,0.08); }

.th-class-stripe {
  width: 4px; min-height: 44px;
  margin-right: 14px;
  border-radius: 0 2px 2px 0;
  flex-shrink: 0;
}

.th-class-info { flex: 1; }
.th-class-name  { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.th-class-count { font-size: 12px; color: var(--muted); }

/* ── Task list ── */
.th-task-list { display: flex; flex-direction: column; gap: 10px; }

.th-task-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.th-task-row:hover { background: rgba(255,255,255,0.08); }

.th-task-icon  { font-size: 20px; flex-shrink: 0; }
.th-task-info  { flex: 1; }
.th-task-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.th-task-sub   { font-size: 12px; color: var(--muted); }

/* ════════════════════════════════════════════════
   TEACHER TUTOR TAB (Admin management)
   ════════════════════════════════════════════════ */
.tt-stat-bar {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.tt-stat { flex: 1; text-align: center; }

.tt-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 800;
  margin-bottom: 3px;
}

.tt-stat-green { color: #22c55e; }
.tt-stat-red   { color: #ef4444; }
.tt-stat-label { font-size: 12px; color: var(--muted); }

.tt-stat-divider { width: 1px; background: var(--border); height: 40px; }

/* Subtabs */
.tt-subtabs {
  display: flex; gap: 8px;
  margin-bottom: 16px;
}

.tt-subtab {
  flex: 1;
  padding: 10px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Sans', sans-serif;
}

.tt-subtab.active {
  background: rgba(33,150,243,0.15);
  border-color: rgba(33,150,243,0.4);
  color: #60a5fa;
}

/* Application card */
.tt-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.tt-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.tt-card-header:hover { background: rgba(255,255,255,0.04); }

.tt-card-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(33,150,243,0.15);
  color: #60a5fa;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}

.tt-card-info  { flex: 1; min-width: 0; }
.tt-card-name  { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-card-email { font-size: 12px; color: var(--muted); }

.tt-status-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
}

.tt-expand-icon {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* Card body (expanded) */
.tt-card-body {
  border-top: 1px solid var(--border);
  padding: 16px;
}

.tt-detail-section { margin-bottom: 14px; }

.tt-detail-label {
  font-size: 12px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.tt-detail-text { font-size: 14px; line-height: 1.5; }

.tt-rate { font-weight: 700; color: #60a5fa; }

.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.tt-chip {
  background: rgba(33,150,243,0.12);
  color: #60a5fa;
  font-size: 12px; font-weight: 600;
  border-radius: 100px;
  padding: 4px 12px;
}

.tt-muted { font-size: 13px; color: var(--muted); }

/* Action buttons */
.tt-actions {
  display: flex; gap: 10px;
  margin-top: 16px;
}

.tt-btn {
  flex: 1;
  height: 44px;
  border: none; border-radius: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}

.tt-btn:hover { opacity: 0.85; }

.tt-btn-approve { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }
.tt-btn-reject  { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; }

/* Rejection reason box */
.tt-rejection-box {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}

/* ════════════════════════════════════════════════
   ATTENDANCE PAGES
   ════════════════════════════════════════════════ */
.att-tab {
  display: flex; flex-direction: column;
  min-height: 100%;
  padding: 18px 16px 96px;
  gap: 16px;
}

.att-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.att-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.4px;
}

.att-sub {
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.att-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.att-summary-card,
.att-session-card,
.att-card,
.att-request-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 18px;
  overflow: hidden;
}

.att-summary-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.att-create-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
}

.att-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.att-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}

.att-form-group input {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 12px 14px;
  font-size: 13px;
}

.att-form-group input::placeholder {
  color: rgba(255,255,255,0.4);
}

.att-create-btn {
  width: fit-content;
  padding: 12px 22px;
}

.att-summary-item {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
}

.att-summary-label {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.att-summary-value {
  font-size: 18px;
  font-weight: 800;
}

.att-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.att-filter-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.att-filter-btn.active {
  background: #fff;
  color: #091c42;
  border-color: rgba(255,255,255,0.24);
}

.att-list {
  display: flex; flex-direction: column; gap: 12px;
}

.att-card-row,
.att-session-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

.att-card-title,
.att-session-title {
  font-size: 15px; font-weight: 700;
}

.att-card-meta,
.att-session-meta,
.att-sheet-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

.att-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.att-status-present { background: rgba(34,197,94,0.18); color: #22c55e; }
.att-status-late    { background: rgba(251,191,36,0.18); color: #f59e0b; }
.att-status-absent  { background: rgba(239,68,68,0.18); color: #ef4444; }

.att-card-note {
  margin-top: 12px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.5;
}

.att-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 16px;
  text-align: center;
  color: rgba(255,255,255,0.78);
}

.att-empty-small { padding: 20px 16px; }
.att-empty-icon { font-size: 36px; }
.att-empty-title { font-size: 15px; font-weight: 700; }
.att-empty-sub { font-size: 13px; color: rgba(255,255,255,0.65); }

.att-section { display: flex; flex-direction: column; gap: 10px; }
.att-section-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; }

.att-session-card {
  padding: 16px;
}

.att-session-button {
  border: none;
  border-radius: 999px;
  background: #4b7bff;
  color: #fff;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.att-session-button.disabled {
  background: #666;
  cursor: not-allowed;
}

.att-session-note {
  margin-top: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}

.att-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.att-sheet-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.att-sheet {
  width: min(700px, 100%);
  max-height: min(90vh, 900px);
  background: rgba(10,14,28,0.95);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.att-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 14px;
}

.att-sheet-title { font-size: 20px; font-weight: 800; }
.att-sheet-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
}

.att-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 22px;
}

.att-sheet-instructions {
  color: rgba(255,255,255,0.72);
  margin-bottom: 18px;
  font-size: 13px;
}

.att-student-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.att-student-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.att-student-info {
  min-width: 0;
}

.att-student-name { font-size: 15px; font-weight: 700; }
.att-student-email { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 4px; }

.att-status-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.att-status-action {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.04);
  font-weight: 700;
  cursor: pointer;
}

.att-status-action.selected {
  background: #4b7bff;
  border-color: #4b7bff;
  color: #fff;
}

.att-status-display {
  margin-bottom: 12px;
}

.att-note-display {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  margin-top: 8px;
}

.att-note-input {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 12px 14px;
  font-size: 13px;
  resize: vertical;
}

.att-note-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.att-submit-btn {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 16px;
  background: #4b7bff;
  color: #fff;
  font-weight: 700;
  padding: 16px;
  cursor: pointer;
  font-size: 14px;
}

.att-create-btn {
  width: auto;
}

.att-request-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 16px;
}

.att-request-actions,
.att-request-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.att-request-action {
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.att-request-action.accept {
  background: #22c55e;
}

.att-request-action.decline {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

.att-request-status {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.att-request-status.pending {
  background: rgba(59,130,246,0.18);
  color: #3b82f6;
}

.att-request-status.approved {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
}

.att-request-status.declined {
  background: rgba(239,68,68,0.18);
  color: #ef4444;
}

.att-join-btn {
  background: #0ea5e9;
}

.toast-success {
  background: #22c55e;
}

/* ── Email Autocomplete ── */
.att-email-input-wrapper {
  position: relative;
  width: 100%;
}

.att-email-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.att-email-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.att-email-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.att-email-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(30,30,40,0.98);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
}

.att-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.att-suggestion-item:last-child {
  border-bottom: none;
}

.att-suggestion-item:hover {
  background: rgba(59,130,246,0.15);
}

.att-suggestion-email {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.att-suggestion-name {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .th-header-title { font-size: 20px; }
  .tt-subtab       { font-size: 11px; padding: 8px 4px; }
}