:root {
    --blue-dark:#0d2260;
    --blue-mid:#1b3a8c;
    --blue-light:#3b82f6;
    --teal:#00bcd4;

    --surface:#ffffff;
    --surface2:#f3f7fd;
    --border:#dde6f5;

    --text:#0d1b3e;
    --text-mid:#4a5578;
    --text-light:#8a96b8;

    --input-bg:#edf2fb;

    --success:#00c48c;
    --warn:#f59e0b;
    --info:#3b82f6;
    --error:#ef4444;

    --shadow:0 2px 16px rgba(27,58,140,0.09);
    --shadow-lg:0 10px 40px rgba(27,58,140,0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  background: #e4ecf7;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =============================================
   SIDEBAR — matches student dashboard exactly
   ============================================= */
.sidebar {
  width: 222px;
  flex-shrink: 0;
  background: linear-gradient(170deg, #08194d 0%, #1b3a8c 55%, #0881b0 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Diagonal texture overlay */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg,
    transparent, transparent 24px,
    rgba(255,255,255,0.022) 24px,
    rgba(255,255,255,0.022) 48px
  );
}

/* Brand / Logo — works for both .sidebar-brand and .sb-logo */
.sidebar-brand,
.sb-logo {
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
  position: relative;
}

/* Logo image box (used in employee.html) */
.logo-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SVG icon box (used in admin.html) */
.sidebar-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  overflow: hidden;
}

.sidebar-brand-icon svg { width: 24px; height: 24px; }

.sidebar-brand-text,
.sidebar-brand > div:last-child {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-text strong,
.sidebar-brand-text div:first-child,
.sidebar-brand-text .sidebar-brand-name,
.sidebar-brand > div:last-child > div:first-child {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.sidebar-brand-sub,
.sidebar-brand > div:last-child > div:last-child {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Nav Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  font-family: 'Sora', 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 3px;
  transition: background 0.2s, color 0.2s;
  user-select: none;
  position: relative;
}

.nav-item > div:first-child,
.nav-item > span.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.nav-item:hover {
  background: rgba(255,255,255,0.09);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Active left-border indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #60a5fa;
  border-radius: 0 3px 3px 0;
}

/* Nav wrapper padding */
.sidebar > div:first-child {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
}

/* Sidebar footer / logout */
.sidebar-bottom {
  padding: 14px 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.logout-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.logout-link:hover {
  background: rgba(239,68,68,0.18);
  color: #fca5a5;
}

/* =============================================
   MAIN AREA
   ============================================= */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =============================================
   TOPBAR — matches student dashboard
   ============================================= */
.topbar {
  height: 64px;
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 60;
  transition: background 0.3s, border-color 0.3s;
  box-shadow: 0 1px 6px rgba(27,58,140,0.07);
}

.topbar h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

.topbar-right {
display:flex;
align-items:center;
gap:18px;
position:relative;
}

/* ── Notification Bell — identical to student .bell-btn ── */
.bell-wrap,
.bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: background 0.2s;
}

.bell-wrap:hover,
.bell-btn:hover { background: var(--surface2); }

.bell-wrap svg,
.bell-btn svg { width: 20px; height: 20px; }

/* Plain 9px dot — identical to student .bell-dot */
.bell-badge,
.bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--surface);
  font-size: 0;
  display: block;
}

/* ── User Chip — matches student .user-btn ── */
.user-chip-wrap {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 10px;
  transition: background 0.2s;
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

.user-chip:hover {
  background: var(--surface2);
}

.user-chip span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ── Avatar — same gradient as student ── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--teal));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =============================================
   PROFILE DROPDOWN — exact match to student
   ============================================= */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  min-width: 252px;
  z-index: 200;
  display: none;
  overflow: hidden;
  animation: ddIn 0.2s ease;
}

.profile-dropdown.open {
  display: block;
}

@keyframes ddIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header strip inside dropdown */
.pd-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f3f7fd, #e8f0fb);
}

.pd-avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-mid), var(--teal)) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pd-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.pd-email {
  font-size: 11.5px;
  color: var(--text-mid);
  display: block;
  margin-top: 2px;
}

.pd-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 7px;
}

.pd-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  padding: 5px 16px 3px;
}

.pd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pd-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.pd-icon { font-size: 15px; width: 20px; flex-shrink: 0; }

/* Toggle row inside dropdown */
.pd-item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px 9px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  transition: background 0.15s;
}

.pd-item-toggle:hover { background: var(--surface2); }

.pd-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 21px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 15px;
  width: 15px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.toggle-switch input:checked + .toggle-slider { background: var(--blue-mid); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(17px); }

/* Logout item in dropdown */
.pd-logout {
  color: var(--error) !important;
  font-weight: 600;
}

.pd-logout:hover {
  background: #fff0f0 !important;
  color: var(--error) !important;
}

/* =============================================
   CONTENT
   ============================================= */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =============================================
   STAT CARDS
   ============================================= */
.stats-row {
  display: flex;
  gap: 16px;
}

.stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-label { color: #888; font-size: 12px; margin-bottom: 4px; font-weight: 500; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); }
.chart-svg  { flex-shrink: 0; opacity: 0.9; }

/* =============================================
   PANELS
   ============================================= */
.panels {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.table-panel {
  flex: 1.6;
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

.page-title{
font-size:20px;
font-weight:700;
color:#0f172a;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-mid);
  outline: none;
  transition: border-color 0.2s;
}

.filter-select:focus { border-color: var(--blue-light); }

.table-wrap {
  overflow-y: auto;
  flex: 1;
}

table    { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--surface2); }

th {
  padding: 9px 10px;
  text-align: left;
  color: var(--text-mid);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

tbody tr:hover    { background: var(--surface2); }
tbody tr.selected { background: #e8f0fb; }

.td-title { font-weight: 700; color: var(--text); }

.update-btn-row {
  margin-top: 12px;
  text-align: right;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
}

.badge-high       { background: #ffe4e4; color: #c0392b; }
.badge-medium     { background: #fff3cd; color: #9a6700; }
.badge-low        { background: #e3f9e5; color: #1e7e34; }
.badge-overdue    { background: #ffe4e4; color: #c0392b; }
.badge-inprogress { background: #e0f2fe; color: #0369a1; }
.badge-assigned   { background: #dce8ff; color: #1a3c8f; }
.badge-Resolved  { background: #e3f9e5; color: #1e7e34; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(13,34,96,0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(13,34,96,0.38);
}

.btn-send {
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: transform 0.15s;
}

.btn-send:hover { transform: translateY(-1px); }

/* =============================================
   DETAILS PANEL
   ============================================= */
.details-panel {
  width: 290px;
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-ticket-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text);
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

.detail-table       { width: 100%; font-size: 13px; margin-bottom: 12px; }
.detail-table td    { padding: 5px 0; vertical-align: middle; }
.detail-table td:first-child { color: #888; width: 75px; }

.update-status-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.status-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--surface);
  outline: none;
  margin-bottom: 12px;
  color: var(--text-mid);
  cursor: pointer;
  transition: border-color 0.2s;
}

.status-select:focus { border-color: var(--blue-light); }


/* ── Fix details panel layout ── */
.details-panel,
#assignPanel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  overflow: hidden;
}

/* ── Fix chat area to take remaining space ── */
#chatArea {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}

/* ── Fix reply box always at bottom ── */
.reply-box {
  flex-shrink: 0;
  padding: 10px 0 0;
  border-top: 1.5px solid #e2e8f0;
  background: #fff;
  margin-top: auto;
}



/* Chat area */
.chat-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  min-height: 200px;
  max-height: 320px;
  margin-bottom: 12px;
  scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar { width: 4px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Chat row */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: msgPop 0.22s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes msgPop {
  from { opacity:0; transform:translateY(8px) scale(.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Avatar circle */
.chat-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.av-s { background: linear-gradient(135deg, #1b3a8c, #00bcd4); }
.av-a { background: linear-gradient(135deg, #ef4444, #f97316); }
.av-e { background: linear-gradient(135deg, #00c48c, #0ea5e9); }


.chat-msg        { display: flex; flex-direction: column; gap: 4px; }
.chat-msg-header { display: flex; align-items: center; gap: 8px; }
.chat-sender     { font-weight: 700; font-size: 13px; color: var(--text); }
.chat-time       { color: var(--text-light); font-size: 11px; }

.chat-bubble {
  margin-left: 36px;
  background: var(--surface2);
  border-radius: 0 10px 10px 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.5;
}


/* Bubble wrapper */
.chat-bub-wrap {
  display: flex;
  flex-direction: column;
  max-width: 68%;
  gap: 3px;
}

/* Meta (name + time) */
.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.meta-right {
  flex-direction: row-reverse;
}

.chat-sender {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.chat-time {
  font-size: 10px;
  color: #94a3b8;
}

/* Bubble */
.chat-bubble {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Employee — right side, blue gradient */
.bubble-emp {
  background: linear-gradient(135deg, #1b3a8c, #2563eb);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

/* Student — left side, white */
.bubble-student {
  background: #ffffff;
  color: #0d1b3e;
  border-radius: 18px 18px 18px 4px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Admin — left side, purple tint */
.bubble-admin {
  background: #faf5ff;
  color: #4c1d95;
  border-radius: 18px 18px 18px 4px;
  border: 1.5px solid #ddd6fe;
  box-shadow: 0 2px 6px rgba(124,58,237,0.08);
}

/* File link inside bubble */
.chat-file-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.2);
  color: inherit;
  transition: opacity 0.15s;
}

.chat-file-link:hover { opacity: 0.8; }

/* Empty chat state */
.chat-empty-emp {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

/* Reply box */
.reply-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 0;
  border-top: 1.5px solid #e2e8f0;
}

.reply-input {
  flex: 1;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #0d1b3e;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reply-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  background: #fff;
}

.reply-input::placeholder { color: #94a3b8; }

.btn-send {
  height: 40px;
  padding: 0 18px;
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(13,34,96,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13,34,96,0.4);
}

.btn-send:active { transform: scale(0.97); }


/* Right side — employee messages */
.row-right {
  flex-direction: row-reverse;
}

/* Left side — student/admin messages */
.row-left {
  flex-direction: row;
}


.reply-box   { display: flex; gap: 8px; align-items: center; }

.reply-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  outline: none;
  color: var(--text);
  background: var(--input-bg);
  transition: border-color 0.2s;
}

.reply-input:focus { border-color: var(--blue-light); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* =============================================
   DARK MODE
   ============================================= */
body.dark {
  background: #0b1120;
}

body.dark .topbar      { background: #121c34; border-color: #1f2f50; }
body.dark .topbar h2   { color: #e4ecf7; }
body.dark .user-chip span { color: #e4ecf7; }
body.dark .stat-card   { background: #121c34; }
body.dark .stat-label  { color: #8a96b8; }
body.dark .stat-value  { color: #e4ecf7; }
body.dark .table-panel,
body.dark .details-panel { background: #121c34; }
body.dark .panel-title  { color: #e4ecf7; }
body.dark thead tr      { background: #0b1120; }
body.dark th            { color: #8a96b8; border-bottom-color: #1f2f50; }
body.dark td            { color: #c5ccdd; border-bottom-color: #1f2f50; }
body.dark tbody tr:hover   { background: #1a2848; }
body.dark tbody tr.selected { background: #1d3060; }
body.dark .filter-select   { background: #0b1120; border-color: #1f2f50; color: #c5ccdd; }
body.dark .status-select   { background: #0b1120; border-color: #1f2f50; color: #c5ccdd; }
body.dark .profile-dropdown { background: #121c34; }
body.dark .pd-header       { background: #1a2848; }
body.dark .pd-name         { color: #e4ecf7; }
body.dark .pd-divider      { background: #1f2f50; }
body.dark .pd-item         { color: #8a96b8; }
body.dark .pd-item:hover   { background: #192540; color: #e4ecf7; }
body.dark .pd-item-toggle  { color: #8a96b8; }
body.dark .pd-item-toggle:hover { background: #192540; }
body.dark .chat-bubble     { background: #192540; color: #c5ccdd; }
body.dark .reply-input     { background: #192540; border-color: #1f2f50; color: #e4ecf7; }

/* =============================================
   MODAL OVERLAY + SHARED MODAL STRUCTURE
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.52);
  backdrop-filter: blur(5px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.18s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* shared overlay for profile & settings */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.overlay.show {
  display: flex;
  animation: oIn 0.2s ease;
}

@keyframes oIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes mIn   { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* =============================================
   VIEW PROFILE MODAL — matches student exactly
   ============================================= */
.vp-modal {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  animation: mIn 0.3s cubic-bezier(.22,1,.36,1);
}

.vp-hero {
  background: linear-gradient(130deg, #08194d 0%, #1b3a8c 55%, #0881b0 100%);
  padding: 32px 24px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.vp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 18px,
    rgba(255,255,255,0.03) 18px, rgba(255,255,255,0.03) 36px
  );
}

.vp-x {
  position: absolute;
  top: 13px;
  right: 14px;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.vp-x:hover { background: rgba(255,255,255,0.28); }

.vp-av {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #3b82f6);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.42);
  z-index: 1;
}

.vp-name  { color: #fff; font-size: 18px; font-weight: 800; z-index: 1; }
.vp-email { color: rgba(255,255,255,0.6); font-size: 12px; z-index: 1; }

.vp-body { padding: 20px 22px 24px; }

.vp-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.vp-row:last-child { border-bottom: none; }

.vp-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}

.vp-lbl { font-size: 10.5px; color: var(--text-mid); font-weight: 600; margin-bottom: 2px; }
.vp-val { font-size: 13.5px; color: var(--text); font-weight: 700; }

/* =============================================
   ACCOUNT SETTINGS MODAL — matches student
   ============================================= */
.as-modal {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  width: 100%;
  max-width: 470px;
  max-height: 88vh;
  overflow-y: auto;
  animation: mIn 0.3s cubic-bezier(.22,1,.36,1);
}

.as-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 3;
}

.as-title { font-size: 17px; font-weight: 800; color: var(--text); }

.as-body { padding: 18px 22px 26px; }

.as-grp {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 18px 0 10px;
}

.as-grp:first-child { margin-top: 0; }

.as-item {
  background: var(--surface2);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.as-ihead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
}

.as-ihead:hover { background: var(--border); }

.as-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ico-b { background: #dbeafe; }
.ico-g { background: #d1fae5; }
.ico-p { background: #f3e8ff; }
.ico-o { background: #fff7ed; }

.as-iinfo { flex: 1; }
.as-ititle { font-size: 14px; font-weight: 700; color: var(--text); }
.as-idesc  { font-size: 11.5px; color: var(--text-mid); margin-top: 2px; }

.as-arr {
  color: var(--text-light);
  font-size: 16px;
  transition: transform 0.25s;
}

.as-item.open .as-arr { transform: rotate(90deg); }

.as-form {
  display: none;
  padding: 0 15px 16px;
  border-top: 1px solid var(--border);
}

.as-form.open {
  display: block;
  animation: fadeUp 0.22s ease;
  padding-top: 14px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.af { margin-bottom: 11px; }

.af label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 5px;
}

.af input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.af input:focus { border-color: var(--blue-light); }

.af-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(13,34,96,0.28);
  transition: transform 0.15s;
}

.af-btn:hover { transform: translateY(-1px); }

.ep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.ep-row:last-child { border-bottom: none; }
.ep-lbl { font-size: 13px; color: var(--text-mid); font-weight: 500; }

.ep-tog {
  width: 37px;
  height: 21px;
  border-radius: 11px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s;
}

.ep-tog.on { background: var(--blue-mid); }

.ep-tog::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ep-tog.on::after { transform: translateX(16px); }

/* close button shared */
.x-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.x-btn:hover { background: var(--surface2); }

/* =============================================
   ASSIGN MODAL
   ============================================= */
.modal-card {
  width: 600px;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  animation: mIn 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.assign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}

.assign-title { font-size: 16px; font-weight: 700; color: var(--text); }

.assign-x {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.assign-x:hover { background: var(--surface2); color: var(--text); }

.assign-body { padding: 20px 24px 24px; }
.assign-cols { display: flex; gap: 12px; }

.assign-col {
  flex: 1;
  background: var(--surface2);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.assign-col-title {
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  letter-spacing: 0.05em;
  text-align: center;
}

.assign-option {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-mid);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-align: center;
}

.assign-option:last-child { border-bottom: none; }
.assign-option:hover      { background: #e8f0fb; color: #1b3a8c; }
.assign-option.selected   { background: #dbeafe; color: #1b3a8c; font-weight: 700; }

.assign-ok-btn {
  background: linear-gradient(135deg, #0d2260, #1b3a8c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: 0 4px 14px rgba(13,34,96,0.28);
}

.assign-ok-btn:hover { opacity: 0.88; }
/* ══════════════════════════════════════════════════════
   NOTIFICATION PANEL — employee.css additions
   Add this block at the END of employee.css
   ══════════════════════════════════════════════════════ */

/* Bell animation when new notification arrives */
@keyframes bellPing {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-18deg); }
  40%  { transform: rotate(18deg); }
  60%  { transform: rotate(-10deg); }
  80%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}
.bell-ping svg { animation: bellPing 0.6s ease; }

/* Notification panel container */
.notif-panel-wrap {
  position: relative;
}

#notifPanel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 480px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(27,58,140,0.14);
  z-index: 9999;
  overflow: hidden;
  flex-direction: column;
}

#notifPanel.open {
  display: flex;
}

/* Panel header */
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #f3f7fd, #e8f0fb);
  flex-shrink: 0;
}

.notif-panel-title {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0d1b3e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-unread-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 99px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.notif-mark-all {
  font-size: 11px;
  font-weight: 600;
  color: #1b3a8c;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.notif-mark-all:hover { background: rgba(27,58,140,0.08); }

/* Scrollable list */
#notifList {
  overflow-y: auto;
  flex: 1;
}

#notifList::-webkit-scrollbar { width: 4px; }
#notifList::-webkit-scrollbar-track { background: transparent; }
#notifList::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Individual notification item */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
  position: relative;
}

.notif-item:hover { background: #f5f8ff; }
.notif-item:last-child { border-bottom: none; }

.notif-unread { background: #f0f5ff; }
.notif-read   { background: #fff; }

.notif-icon-wrap {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-body-wrap { flex: 1; min-width: 0; }

.notif-title-txt {
  font-size: 13px;
  font-weight: 700;
  color: #0d1b3e;
  line-height: 1.3;
  margin-bottom: 3px;
}

.notif-msg-txt {
  font-size: 12px;
  color: #4a5578;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time-txt {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Blue dot for unread */
.notif-dot-indicator {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}


/* Notification read/unread states */
.notif-item.notif-unread {
  background: #f0f5ff;
  border-left: 3px solid #3b82f6;
}

.notif-item.notif-read {
  background: #fff;
  border-left: 3px solid transparent;
  opacity: 0.7;
}

.notif-item.notif-unread .notif-title-txt {
  color: #0d1b3e;
  font-weight: 700;
}

.notif-item.notif-read .notif-title-txt {
  color: #64748b;
  font-weight: 500;
}

/* employee dashboard notification */
.bell-wrap{
position:relative;
cursor:pointer;
margin-right:15px;
}

.notif-panel{
position:absolute;
top:60px;
right:120px;
width:340px;
background:#fff;
border-radius:12px;
box-shadow:0 10px 30px rgba(0,0,0,0.15);
display:none;
flex-direction:column;
max-height:420px;
overflow:hidden;
z-index:999;
}

.notif-panel.open{
display:flex;
}

.notif-header{
display:flex;
justify-content:space-between;
align-items:center;
padding:12px 14px;
font-size:14px;
font-weight:600;
border-bottom:1px solid #eee;
}

.notif-list{
overflow-y:auto;
max-height:350px;
}

.notif-item{
display:flex;
gap:10px;
padding:12px;
border-bottom:1px solid #f1f1f1;
cursor:pointer;
}

.notif-item:hover{
background:#f7f9fc;
}

.notif-title-txt{
font-weight:600;
font-size:13px;
}

.notif-msg-txt{
font-size:12px;
color:#6b7280;
margin-top:2px;
}

.notif-time-txt{
font-size:11px;
color:#9ca3af;
margin-top:4px;
}



.bell-icon{
width:20px;
height:20px;
color:#64748b;
cursor:pointer;
}

.bell-wrap{
position:relative;
cursor:pointer;
}

.bell-dot{
position:absolute;
top:-2px;
right:-2px;
width:7px;
height:7px;
background:#ef4444;
border-radius:50%;
}

.user-chip{
display:flex;
align-items:center;
gap:8px;
cursor:pointer;
}

.avatar-img{
width:34px;
height:34px;
border-radius:50%;
object-fit:cover;
}

.user-name{
font-weight:600;
font-size:14px;
color:#0f172a;
}

.dropdown-arrow{
font-size:12px;
color:#64748b;
}



/* Notification bell */
.bell-wrap{
position:relative;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
width:36px;
height:36px;
border-radius:50%;
transition:background 0.2s;
}

.bell-wrap:hover{
background:#f3f7fd;
}

.bell-icon{
width:20px;
height:20px;
color:#64748b;
}

/* red dot */
.bell-dot{
position:absolute;
top:6px;
right:6px;
width:8px;
height:8px;
background:#ef4444;
border-radius:50%;
}

/* notification panel */
.notif-panel{
position:absolute;
top:55px;
right:80px;
width:340px;
background:#fff;
border-radius:12px;
box-shadow:0 10px 30px rgba(0,0,0,0.15);
display:none;
flex-direction:column;
max-height:420px;
overflow:hidden;
z-index:999;
}

.notif-panel.open{
display:flex;
}

.notif-header{
display:flex;
justify-content:space-between;
align-items:center;
padding:12px 14px;
font-size:14px;
font-weight:600;
border-bottom:1px solid #eee;
}

.notif-header button{
border:none;
background:none;
font-size:12px;
color:#1b3a8c;
cursor:pointer;
font-weight:600;
}

.notif-list{
overflow-y:auto;
max-height:360px;
}

/* notification item */
.notif-item{
display:flex;
flex-direction:column;
gap:3px;
padding:12px;
border-bottom:1px solid #f1f1f1;
cursor:pointer;
}

.notif-item:hover{
background:#f7f9fc;
}

.notif-title-txt{
font-weight:600;
font-size:13px;
color:#0f172a;
}

.notif-msg-txt{
font-size:12px;
color:#6b7280;
}

.notif-time-txt{
font-size:11px;
color:#9ca3af;
}


.notif-header button{
border:none;
background:#f1f5f9;
padding:4px 8px;
border-radius:6px;
font-size:11px;
cursor:pointer;
}

.notif-header button:hover{
background:#e2e8f0;
}




/* ADD these badge colors: */
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-assigned   { background: #dbeafe; color: #1e40af; }
.badge-inprogress { background: #e0e7ff; color: #3730a3; }
.badge-overdue    { background: #fee2e2; color: #991b1b; }
.badge-resolved   { background: #d1fae5; color: #065f46; }
.badge-high       { background: #fee2e2; color: #991b1b; }
.badge-medium     { background: #fef3c7; color: #92400e; }
.badge-low        { background: #d1fae5; color: #065f46; }

.typing-indicator{

height:24px;

font-size:13px;

color:#6b7280;

font-style:italic;

padding:4px 10px;

transition:.2s;
}

.last-seen{

font-size:12px;

color:#6b7280;

margin-top:4px;

font-style:italic;
}