/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 70px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(168,85,247,0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(124,58,237,0.10), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.auth-page::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(168,85,247,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 100%);
}
.auth-page .container { position: relative; z-index: 1; width: 100%; }
.auth-shell {
  max-width: 1080px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  align-items: stretch; border: 1px solid var(--card-border);
  border-radius: 28px; overflow: hidden; background: rgba(22,22,31,0.72);
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  backdrop-filter: blur(14px);
}
.auth-panel {
  min-height: 100%; padding: 40px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 48px;
  background:
    linear-gradient(135deg, rgba(168,85,247,0.18), rgba(124,58,237,0.07)),
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.08), transparent 42%);
  border-inline-end: 1px solid rgba(168,85,247,0.16);
}
.auth-brand {
  display: inline-flex; align-items: center; gap: 12px; width: fit-content;
  color: var(--white); text-decoration: none; font-weight: 800;
}
.auth-brand img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168,85,247,0.5));
}
.auth-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  color: var(--accent); background: rgba(168,85,247,0.11);
  border: 1px solid rgba(168,85,247,0.28);
  font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.auth-panel h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.25;
  color: var(--white); margin: 0 0 14px;
}
.auth-panel p { color: var(--text-muted); margin: 0; line-height: 1.9; max-width: 430px; }
.auth-highlights { display: grid; gap: 12px; }
.auth-highlights div {
  display: flex; align-items: center; gap: 12px;
  color: var(--text); font-weight: 700; font-size: 14px;
}
.auth-highlights i {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(255,255,255,0.07);
  color: var(--accent);
}
.auth-card {
  width: 100%; margin: 0; background: rgba(10,10,15,0.42);
  border: 0; border-radius: 0; padding: 44px;
}
.auth-icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
  background: var(--gradient); display: grid; place-items: center;
  font-size: 25px; color: #fff; box-shadow: 0 14px 34px rgba(168,85,247,.28);
}
.auth-card h1 { text-align: center; font-size: 28px; margin: 0 0 8px; color: var(--white); }
.auth-sub { text-align: center; color: var(--text-muted); margin: 0 0 28px; }
.auth-form { display: grid; gap: 16px; }
.auth-field label, .auth-form > div > label {
  display: block; margin-bottom: 8px; font-weight: 700;
  font-size: 14px; color: var(--white);
}
.auth-input-wrap { position: relative; }
.auth-input-wrap i {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  color: var(--accent); font-size: 15px; pointer-events: none;
}
.auth-form input {
  width: 100%; min-height: 50px; padding: 13px 46px 13px 16px;
  background: rgba(255,255,255,.045); border: 1.5px solid rgba(168,85,247,.18);
  border-radius: 14px; color: #fff; font-family: inherit; font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-form input::placeholder { color: rgba(232,232,240,0.36); }
.auth-form input:focus {
  outline: none; border-color: var(--accent); background: rgba(255,255,255,.065);
  box-shadow: 0 0 0 4px rgba(168,85,247,.11);
}
.auth-check {
  display: flex; gap: 10px; align-items: center; width: fit-content;
  font-size: 14px; color: var(--text); margin-top: 2px; cursor: pointer;
}
.auth-check input {
  width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent);
}
.auth-btn {
  width: 100%; min-height: 52px; padding: 14px; border: none; border-radius: 14px;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 15px;
  cursor: pointer; font-family: inherit; transition: transform .2s, box-shadow .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(168,85,247,.3); }
.auth-btn.small { padding: 9px 18px; width: auto; display: inline-block; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--text-muted); font-size: 14px; }
.auth-foot a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { color: #c084fc; }
.auth-alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.auth-alert.danger { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* ===== STUDENT SHELL ===== */
.student-shell {
  max-width: 1400px; margin: 0 auto;
  padding: 110px 20px 40px;
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
}
.student-side {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 22px; align-self: start;
  position: sticky; top: 100px;
}
.student-side-header {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 16px; border-bottom: 1px solid rgba(168,85,247,.1);
  margin-bottom: 14px;
}
.student-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient); display: grid; place-items: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.student-side-header strong { display: block; color: var(--white); font-size: 14px; }
.student-side-header small { color: var(--text-muted); font-size: 12px; }
.student-nav { display: grid; gap: 4px; }
.student-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 10px; color: var(--text); font-weight: 500;
  font-size: 14px; transition: all .2s; position: relative;
}
.student-nav a:hover { background: rgba(168,85,247,.08); color: var(--white); }
.student-nav a.active { background: var(--gradient); color: #fff; }
.student-nav a i { width: 18px; }
.side-badge, .side-pill {
  margin-inline-start: auto; background: #ef4444; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700;
}

.student-main { min-width: 0; }
.student-page-head { margin-bottom: 22px; }
.student-page-head h1 { color: var(--white); font-size: 26px; margin: 0 0 6px; }
.student-page-head p { color: var(--text-muted); margin: 0; }

.student-alert.success {
  background: rgba(16,185,129,.12); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3); padding: 12px 16px;
  border-radius: 10px; margin-bottom: 18px;
}

.student-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 22px; margin-bottom: 20px;
}
.student-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.student-card-head h2 { color: var(--white); font-size: 18px; margin: 0; }
.link-more { color: var(--accent); font-size: 13px; font-weight: 600; }

.student-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.s-stat-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 18px; display: flex; gap: 14px; align-items: center;
}
.s-stat-card i { font-size: 32px; }
.s-stat-card .num { display: block; font-size: 24px; font-weight: 800; color: var(--white); }
.s-stat-card small { color: var(--text-muted); font-size: 12px; }

.student-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.reg-item, .reg-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
  background: rgba(168,85,247,.04); border: 1px solid rgba(168,85,247,.08);
}
.reg-item strong, .reg-row strong { color: var(--white); display: block; }
.reg-item small, .reg-row small { color: var(--text-muted); font-size: 12px; }

.reg-row-main { display: flex; gap: 14px; align-items: flex-start; flex: 1; }
.reg-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gradient); display: grid; place-items: center;
  color: #fff; flex-shrink: 0;
}
.reg-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; color: var(--text-muted); font-size: 13px; }
.reg-meta i { color: var(--accent); }
.reg-note {
  margin-top: 8px; padding: 8px 12px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2);
  border-radius: 8px; color: #fcd34d; font-size: 13px;
}
.reg-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.reg-pending { background: rgba(245,158,11,.15); color: #fcd34d; }
.reg-accepted { background: rgba(16,185,129,.15); color: #6ee7b7; }
.reg-rejected { background: rgba(239,68,68,.15); color: #fca5a5; }

.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 10px; margin-bottom: 8px;
  background: rgba(168,85,247,.03); border: 1px solid transparent;
}
.notif-item.unread {
  background: rgba(168,85,247,.08); border-color: rgba(168,85,247,.2);
}
.notif-item > i { font-size: 22px; margin-top: 2px; }
.notif-item strong { display: block; color: var(--white); margin-bottom: 4px; }
.notif-item p { margin: 0 0 4px; color: var(--text); font-size: 14px; }
.notif-item small { color: var(--text-muted); font-size: 12px; }
.notif-item .notif-action { margin-inline-start: auto; color: var(--accent); }
.notif-success { color: #6ee7b7; }
.notif-danger  { color: #fca5a5; }
.notif-warning { color: #fcd34d; }
.notif-info    { color: #93c5fd; }

.empty-mini {
  text-align: center; padding: 30px 20px; color: var(--text-muted);
}
.empty-mini i { font-size: 36px; margin-bottom: 10px; opacity: .5; }
.empty-mini p { margin: 0 0 12px; }

.suggest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.suggest-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: 12px;
  background: rgba(168,85,247,.06); border: 1px solid rgba(168,85,247,.15);
  transition: all .2s;
}
.suggest-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.suggest-card i { font-size: 24px; color: var(--accent); }
.suggest-card strong { color: var(--white); }
.suggest-card span { color: var(--text-muted); font-size: 13px; }

/* ===== CHAT ===== */
.chat-box {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  height: calc(100vh - 240px); min-height: 500px;
}
.chat-header {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid rgba(168,85,247,.1);
  background: rgba(168,85,247,.04);
}
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient); display: grid; place-items: center; color: #fff;
}
.chat-header strong { display: block; color: var(--white); }
.chat-header small { color: var(--text-muted); font-size: 12px; }
.chat-status::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #10b981; margin-inline-end: 6px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { display: flex; flex-direction: column; max-width: 75%; }
.msg.mine { align-self: flex-start; align-items: flex-start; }
.msg.other { align-self: flex-end; align-items: flex-end; }
.msg-bubble {
  padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.6; word-wrap: break-word;
  white-space: pre-wrap;
}
.msg.mine .msg-bubble {
  background: var(--gradient); color: #fff; border-bottom-right-radius: 4px;
}
.msg.other .msg-bubble {
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid rgba(168,85,247,.15); border-bottom-left-radius: 4px;
}
.msg small { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.chat-empty {
  margin: auto; text-align: center; color: var(--text-muted);
}
.chat-empty i { font-size: 48px; margin-bottom: 12px; opacity: .4; }
.chat-input {
  display: flex; gap: 10px; padding: 14px;
  border-top: 1px solid rgba(168,85,247,.1);
  background: rgba(168,85,247,.03);
}
.chat-input textarea {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(168,85,247,.15);
  color: #fff; font-family: inherit; font-size: 14px; resize: none;
  max-height: 120px;
}
.chat-input textarea:focus { outline: none; border-color: var(--accent); }
.chat-input button {
  width: 44px; height: 44px; border: none; border-radius: 12px;
  background: var(--gradient); color: #fff; cursor: pointer;
  flex-shrink: 0; transition: transform .15s;
}
.chat-input button:hover { transform: scale(1.05); }

/* ===== ADMIN CONVERSATION LIST ===== */
.conv-list { display: grid; gap: 8px; }
.conv-item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; border-radius: 12px; background: #f8fafc;
  border: 1px solid #e5e7eb; transition: all .2s;
}
.conv-item:hover { background: #f1f5f9; }
.conv-item.has-unread { background: #faf5ff; border-color: #d8b4fe; }
.conv-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #6d28d9, #1e3a8a);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.conv-info { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.conv-top strong { color: #1f2937; }
.conv-top small { color: #6b7280; font-size: 12px; }
.conv-bottom { display: flex; justify-content: space-between; gap: 10px; }
.conv-bottom span:first-child { color: #6b7280; font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-badge { background: #ef4444; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* ===== NAV ACTIONS / BELL ===== */
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-bell {
  position: relative; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 10px;
  background: rgba(168,85,247,.08); color: var(--accent);
  transition: all .2s;
}
.nav-bell:hover { background: rgba(168,85,247,.18); }
.bell-badge {
  position: absolute; top: -4px; left: -4px;
  background: #ef4444; color: #fff; font-size: 10px;
  padding: 2px 6px; border-radius: 999px; font-weight: 700;
  min-width: 18px; text-align: center;
}
.nav-user { display: flex; gap: 8px; align-items: center; }
.nav-user-link {
  display: flex; gap: 8px; align-items: center; padding: 6px 12px;
  border-radius: 10px; background: rgba(168,85,247,.08); color: var(--text);
  font-weight: 600; font-size: 14px;
}
.nav-user-link i { color: var(--accent); }
.nav-user-link:hover { background: rgba(168,85,247,.15); }
.nav-logout-form { margin: 0; }
.nav-logout-form button {
  width: 38px; height: 38px; border: none; border-radius: 10px;
  background: rgba(239,68,68,.1); color: #fca5a5; cursor: pointer;
  transition: all .2s;
}
.nav-logout-form button:hover { background: rgba(239,68,68,.2); color: #fff; }
.nav-login {
  padding: 8px 16px; border-radius: 10px;
  background: rgba(168,85,247,.08); color: var(--accent);
  font-weight: 600; font-size: 14px;
}
.nav-login:hover { background: rgba(168,85,247,.18); }

@media (max-width: 900px) {
  .auth-page { padding: 96px 0 42px; }
  .auth-shell { grid-template-columns: 1fr; border-radius: 22px; }
  .auth-panel {
    padding: 28px; gap: 26px; border-inline-end: 0;
    border-bottom: 1px solid rgba(168,85,247,0.16);
  }
  .auth-panel h2 { font-size: 1.75rem; }
  .auth-highlights { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 26px; }
  .student-shell { grid-template-columns: 1fr; padding-top: 90px; }
  .student-side { position: static; }
  .student-grid-2 { grid-template-columns: 1fr; }
  .nav-actions { display: none; }
}

@media (max-width: 560px) {
  .auth-page .container { padding: 0 14px; }
  .auth-shell { border-radius: 18px; }
  .auth-panel { padding: 22px; }
  .auth-brand img { width: 36px; height: 36px; }
  .auth-brand span { font-size: 14px; }
  .auth-panel h2 { font-size: 1.45rem; }
  .auth-panel p { font-size: 14px; }
  .auth-highlights div { font-size: 13px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 24px; }
  .auth-icon { width: 56px; height: 56px; }
  .auth-form { gap: 14px; }
}
