/* ============================================================
   San IT Lab — Admin & Student Panel Styles
   Modern dashboard layout that complements site.css
   ============================================================ */

:root {
  --panel-bg: #050a0e;
  --panel-side: #0c1218;
  --panel-card: #0f1820;
  --panel-card-hover: #122230;
  --panel-border: rgba(15, 169, 150, 0.18);
  --panel-border-strong: rgba(15, 169, 150, 0.45);
  --panel-text: #e8f0ee;
  --panel-muted: #8aa8a3;
  --panel-dim: #4a7a72;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #3b82f6;
}

body.panel {
  background: var(--panel-bg);
  color: var(--panel-text);
  font-family: var(--font-bn-ui, 'Noto Sans Bengali', sans-serif), var(--font-body), system-ui, sans-serif;
  min-height: 100vh;
  margin: 0;
}

/* ===== LAYOUT ===== */
/*
 * Use block + fixed sidebar + margin-left on main (not CSS Grid + fixed).
 * Grid track sizing with out-of-flow fixed children can collapse the main column
 * in some browsers — content ends up with 0 width or off-screen (blank panel).
 */
body.panel .panel-shell {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--panel-side);
  border-right: 1px solid var(--panel-border);
  padding: 20px 14px;
  position: fixed;
  width: var(--sidebar-w);
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 200;
  box-sizing: border-box;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 18px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.sidebar-brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 0.95rem;
  color: var(--text);
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: var(--panel-muted);
  margin-top: 2px;
}

.sidebar-group {
  margin-bottom: 18px;
}

.sidebar-group-label {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--panel-dim);
  padding: 6px 14px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 2px 0;
  border-radius: 9px;
  color: var(--panel-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: var(--font-head);
  font-weight: 500;
  transition: all 0.15s;
}

.sidebar-link:hover {
  background: rgba(15, 169, 150, 0.06);
  color: var(--text);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(15, 169, 150, 0.18), rgba(196, 31, 90, 0.12));
  color: var(--teal);
  border: 1px solid var(--panel-border);
}

.sidebar-link-icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-link-badge {
  margin-left: auto;
  background: var(--pink);
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

/* ===== TOPBAR ===== */
.panel-main {
  margin-left: var(--sidebar-w);
  min-width: 0;
  width: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  position: relative;
  z-index: 2;
}

.topbar {
  height: var(--topbar-h);
  background: rgba(7, 11, 15, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(15, 169, 150, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-size: 0.85rem;
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.topbar-logout {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--panel-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-head);
  transition: all 0.2s;
}

.topbar-logout:hover {
  color: var(--pink);
  border-color: var(--pink);
}

/* ===== CONTENT AREA ===== */
.panel-content {
  padding: 28px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--panel-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--panel-border-strong);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}

/* ===== STAT GRID ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat {
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(15, 169, 150, 0.08), transparent 60%);
  pointer-events: none;
}

.stat-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--panel-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--teal);
  line-height: 1;
}

.stat.pink .stat-value { color: var(--pink); }
.stat.warning .stat-value { color: var(--warning); }
.stat.info .stat-value { color: var(--info); }
.stat-foot {
  font-size: 0.75rem;
  color: var(--panel-muted);
  margin-top: 8px;
}

/* ===== TABLE ===== */
.tbl-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 169, 150, 0.45) transparent;
}

.tbl-scroll::-webkit-scrollbar {
  height: 6px;
}

.tbl-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 169, 150, 0.4);
  border-radius: 999px;
}

.tbl-scroll .tbl {
  width: 100%;
  min-width: 640px;
}

.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.88rem;
}

.tbl thead th {
  background: rgba(15, 169, 150, 0.06);
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-border);
}

.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--panel-text);
}

.tbl tbody tr:hover {
  background: rgba(15, 169, 150, 0.04);
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

.tbl .actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: white; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(15, 169, 150, 0.35); }
.btn-pink { background: linear-gradient(135deg, var(--pink), var(--pink-dark)); color: white; }
.btn-pink:hover { box-shadow: 0 8px 20px rgba(196, 31, 90, 0.35); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--panel-border-strong);
  color: var(--teal);
}
.btn-outline:hover { background: rgba(15, 169, 150, 0.08); }
.btn-ghost {
  background: rgba(15, 169, 150, 0.06);
  color: var(--panel-muted);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { color: var(--text); }
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
}
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}

.badge.teal { background: rgba(15, 169, 150, 0.1); color: var(--teal); border-color: rgba(15, 169, 150, 0.3); }
.badge.pink { background: rgba(196, 31, 90, 0.1); color: var(--pink); border-color: rgba(196, 31, 90, 0.3); }
.badge.green { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.badge.yellow { background: rgba(245, 158, 11, 0.1); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }
.badge.red { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.badge.gray { background: rgba(138, 168, 163, 0.08); color: var(--panel-muted); border-color: rgba(138, 168, 163, 0.2); }
.badge.blue { background: rgba(59, 130, 246, 0.1); color: var(--info); border-color: rgba(59, 130, 246, 0.3); }

/* ===== FORMS ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-grid .col-12 { grid-column: span 2; }

.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.form-row .helper {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--panel-muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--panel-text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-row input {
  width: auto;
  accent-color: var(--teal);
}

.form-control {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-bn);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--teal);
}

textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.5; }

.form-control[type="checkbox"] {
  width: auto;
  vertical-align: middle;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.85rem;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230FA996' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ===== ALERT ===== */
.alert {
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert.success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert.info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert ul { margin: 0; padding-left: 20px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-top: 20px;
  padding: 0;
  flex-wrap: wrap;
}

.pagination .page-item .page-link,
.pagination li a, .pagination li span {
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--panel-card);
  color: var(--panel-muted);
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid var(--panel-border);
}

.pagination li a:hover {
  background: rgba(15, 169, 150, 0.08);
  color: var(--teal);
}

.pagination li.active span,
.pagination .page-item.active .page-link {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.pagination li.disabled span {
  opacity: 0.4;
}

/* ===== EMPTY ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--panel-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }

/* ===== AUTH ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.auth-back-home {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 28, 46, 0.92);
  border: 1px solid rgba(15, 169, 150, 0.28);
  color: var(--teal);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-head);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.auth-back-home:hover {
  color: #fff;
  border-color: var(--teal);
  transform: translateX(-2px);
}

.auth-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  text-align: center;
  margin: 0 0 6px;
  color: var(--text);
}

.auth-subtitle {
  text-align: center;
  color: var(--panel-muted);
  font-size: 0.88rem;
  margin: 0 0 28px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-remember input {
  width: auto;
}

.auth-remember label {
  margin: 0;
  color: var(--panel-muted);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
  font-weight: 400;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--panel-border-strong);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.auth-logo img { width: 64px; height: 64px; border-radius: 14px; }
.auth-logo-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--teal);
}

.auth-foot {
  text-align: center;
  color: var(--panel-muted);
  font-size: 0.85rem;
  margin-top: 18px;
}

.auth-foot a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar.open { transform: translateX(0); }
  /* Drawer: sidebar overlays; main is full width */
  .panel-main {
    margin-left: 0;
    width: 100%;
  }
  .topbar { padding: 0 16px; }
  .panel-content { padding: 16px; }
  .card > .tbl-scroll {
    width: calc(100% + 44px);
    max-width: calc(100% + 44px);
    margin-left: -22px;
    margin-right: -22px;
    padding-left: 22px;
    padding-right: 22px;
    box-sizing: border-box;
  }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .col-12 { grid-column: span 1; }
  .menu-toggle { display: inline-flex !important; }
  .topbar-user-info { display: none; }
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--teal);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Bangla-first typography (uses Google stack from layout + site.css :root) */
body.panel .sidebar-brand-name,
body.panel .topbar-title,
body.panel .page-title,
body.panel .card-title,
body.panel .auth-logo-name {
  font-family: var(--font-bn-display, 'Baloo Da 2', sans-serif), var(--font-head), sans-serif;
}

body.panel .sidebar-link,
body.panel .sidebar-group-label,
body.panel .page-subtitle,
body.panel .btn,
body.panel .form-control,
body.panel .tbl,
body.panel .pagination,
body.panel .alert,
body.panel .badge,
body.panel .empty-state-title,
body.panel .empty-state,
body.panel label,
body.panel .form-row label {
  font-family: var(--font-bn-ui, 'Noto Sans Bengali', sans-serif), var(--font-body), sans-serif;
}

body.panel textarea,
body.panel input,
body.panel select {
  font-family: var(--font-bn-ui, 'Noto Sans Bengali', sans-serif), var(--font-body), sans-serif;
}

body.panel .auth-foot,
body.panel .auth-foot a,
body.panel .auth-card p,
body.panel .auth-card label {
  font-family: var(--font-bn-ui, 'Noto Sans Bengali', sans-serif), var(--font-body), sans-serif;
}

/* Payment milestones — horizontal timeline (left → right) */
.payment-milestones-block .card-head {
  padding: 0 0 12px;
  margin: 0;
}

.payment-timeline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.payment-milestone {
  flex: 0 0 260px;
  min-width: 220px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding-right: 10px;
}

.payment-milestone__rail {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
  min-height: 18px;
}

.payment-milestone__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 169, 150, 0.15);
  flex-shrink: 0;
}

.payment-milestone__line {
  flex: 1;
  height: 2px;
  min-width: 20px;
  margin-left: 6px;
  background: var(--panel-border);
}

.payment-milestone--void .payment-milestone__dot {
  background: var(--panel-muted);
  box-shadow: none;
  opacity: 0.6;
}

.payment-milestone--void .payment-milestone__body {
  opacity: 0.65;
}

.payment-milestone__body {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.payment-milestone__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.payment-milestone__amount {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--teal);
}

.payment-milestone__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--panel-muted);
  margin-bottom: 4px;
}

.payment-milestone__ref,
.payment-milestone__note,
.payment-milestone__rec {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.5;
  word-break: break-word;
}

.payment-milestone__note {
  font-family: var(--font-bn);
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .pay-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .payment-milestone {
    flex: 0 0 min(280px, 88vw);
    min-width: 240px;
  }
}

/* Service project workspace */
.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.project-meta-item {
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.project-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--panel-muted);
  font-family: var(--font-head);
}

.project-meta-value {
  font-weight: 700;
  margin-top: 4px;
  font-size: 0.9rem;
}

.project-block {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.project-block-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 8px;
}

.project-block-body {
  font-family: var(--font-bn);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.project-add-entry {
  margin-bottom: 8px;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
}

.project-add-entry summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--teal);
  font-size: 0.92rem;
}

.project-entry-milestone--internal .project-entry-body {
  border-style: dashed;
  opacity: 0.92;
}

.project-entry-dot {
  background: var(--blue, #3b82f6);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.project-entry-text {
  white-space: pre-wrap;
}

.project-entry-img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  margin-top: 8px;
  object-fit: cover;
  border: 1px solid var(--panel-border);
}

.project-entry-file {
  margin-top: 8px;
}

.entry-type-btn.active {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(15, 169, 150, 0.08);
}

/* Student batch / group */
.group-message {
  padding: 14px 0;
  border-bottom: 1px solid var(--panel-border);
}

.group-message:last-child {
  border-bottom: none;
}

.group-message--pinned {
  background: rgba(15, 169, 150, 0.06);
  margin: 0 -16px;
  padding: 14px 16px;
  border-radius: 10px;
  border-bottom: none;
  margin-bottom: 10px;
}

.group-message__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.group-message__body {
  font-family: var(--font-bn);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.group-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.group-member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
}

.group-member-item:last-child {
  border-bottom: none;
}

.group-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.group-attach-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-attach-thumb {
  max-width: 120px;
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

/* Notifications */
.notif-bell-wrap {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.notif-bell-btn:hover {
  border-color: var(--teal);
}

.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.notif-bell-badge--hidden {
  display: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 92vw);
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  z-index: 200;
  overflow: hidden;
}

.notif-dropdown__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.9rem;
}

.notif-dropdown__list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-dropdown__foot {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  color: var(--teal);
  text-decoration: none;
  border-top: 1px solid var(--panel-border);
}

.notif-item {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--panel-border);
}

.notif-item:hover {
  background: var(--bg2);
}

.notif-item--unread {
  background: rgba(15, 169, 150, 0.06);
  border-left: 3px solid var(--teal);
}

.notif-item__title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.notif-item__msg {
  font-size: 0.8rem;
  color: var(--panel-muted);
  line-height: 1.4;
}

.notif-item__time {
  font-size: 0.72rem;
  color: var(--panel-muted);
  margin-top: 4px;
}

.notif-empty,
.notif-loading {
  padding: 24px;
  text-align: center;
  color: var(--panel-muted);
  font-size: 0.88rem;
}

.notif-list-row {
  display: block;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
  text-decoration: none;
  color: inherit;
}

.notif-list-row--unread {
  background: rgba(15, 169, 150, 0.05);
}

.notif-list-row__title {
  font-weight: 700;
  margin-bottom: 4px;
}

.notif-list-row__msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.notif-list-row__time {
  font-size: 0.75rem;
  color: var(--panel-muted);
  margin-top: 6px;
}

.support-reply {
  padding: 14px 0;
  border-bottom: 1px solid var(--panel-border);
}

.support-reply--staff {
  background: rgba(15, 169, 150, 0.04);
  margin: 0 -16px;
  padding: 14px 16px;
  border-radius: 8px;
}

.support-reply--internal {
  border: 1px dashed var(--panel-border);
  opacity: 0.9;
}

.support-reply__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--panel-muted);
}

.support-reply__head strong {
  color: var(--text);
}

.support-reply__body {
  white-space: pre-wrap;
  line-height: 1.7;
  font-family: var(--font-bn);
}

.support-reply__body .chat-bubble__link {
  color: var(--teal, #0fa996);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.chat-admin-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.chat-admin-thread .chat-msg {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  border-left-width: 3px;
}

.chat-admin-thread .chat-msg--user {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
  border-left-color: #3b82f6;
}

.chat-admin-thread .chat-msg--user .support-reply__head strong {
  color: #60a5fa;
}

.chat-admin-thread .chat-msg--admin {
  background: rgba(15, 169, 150, 0.12);
  border-color: rgba(15, 169, 150, 0.32);
  border-left-color: #0fa996;
}

.chat-admin-thread .chat-msg--admin .support-reply__head strong {
  color: #0fa996;
}

.chat-admin-thread .chat-msg--assistant {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  border-left-color: #94a3b8;
}

.chat-admin-thread .chat-msg--assistant .support-reply__head strong {
  color: #94a3b8;
}

.chat-admin-thread .support-reply__head {
  margin-bottom: 6px;
}

.chat-admin-thread .support-reply {
  padding: 0;
  margin: 0;
  border-bottom: none;
}

.chat-admin-reply-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--panel-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-message-edit summary::-webkit-details-marker {
  display: none;
}

.group-message-edit[open] summary {
  margin-bottom: 4px;
}

.profile-dl { margin: 0; }
.profile-dl dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--panel-muted);
  margin-top: 10px;
}
.profile-dl dd {
  margin: 4px 0 0;
  font-family: var(--font-bn);
}
.profile-dl dt:first-child { margin-top: 0; }

/* ===== Finance category list ===== */
.fin-cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fin-cat-item {
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.fin-cat-item:hover {
  border-color: var(--panel-border-strong);
  background: var(--panel-card-hover);
}

.fin-cat-item--off {
  opacity: 0.72;
}

.fin-cat-item__main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.fin-cat-item__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 169, 150, 0.22), rgba(15, 169, 150, 0.06));
  border: 1px solid var(--panel-border);
}

.fin-cat-item__body {
  flex: 1;
  min-width: 0;
}

.fin-cat-item__name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--panel-text);
  line-height: 1.3;
}

.fin-cat-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--panel-muted);
}

.fin-cat-item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fin-cat-item__meta strong {
  color: var(--teal, #0fa996);
  font-weight: 600;
}

.fin-cat-item__status {
  flex-shrink: 0;
}

.fin-cat-item__edit {
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.15);
}

.fin-cat-item__edit summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--panel-muted);
  user-select: none;
  transition: color 0.15s;
}

.fin-cat-item__edit summary::-webkit-details-marker {
  display: none;
}

.fin-cat-item__edit summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s;
}

.fin-cat-item__edit[open] summary::before {
  transform: rotate(90deg);
}

.fin-cat-item__edit summary:hover {
  color: var(--teal, #0fa996);
}

.fin-cat-item__edit-form {
  padding: 0 18px 16px;
  display: grid;
  grid-template-columns: 1fr 72px 72px auto auto;
  gap: 10px;
  align-items: end;
}

.fin-cat-item__edit-form .form-label {
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.fin-cat-item__edit-form .form-group {
  margin: 0;
}

.fin-cat-item__edit-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

@media (max-width: 900px) {
  .fin-cat-item__edit-form {
    grid-template-columns: 1fr 1fr;
  }
  .fin-cat-item__edit-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {
  .fin-cat-item__main {
    flex-wrap: wrap;
  }
  .fin-cat-item__status {
    width: 100%;
    padding-left: 68px;
  }
  .fin-cat-item__edit-form {
    grid-template-columns: 1fr;
  }
}
