/* ==========================================================================
   NCLI 2026 Modern UI System — Student Portal & LMS Modern Layer
   File: css/modern/student.css
   ========================================================================== */

/* ===== 1. STUDENT LOGIN MODERNIZATION ===== */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
}

.login-info {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  position: relative;
}

.login-info h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.login-info p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.login-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.login-feature:hover {
  transform: translateY(-2px);
}

.lf-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.lf-icon.green { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.lf-icon.orange { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.lf-icon.purple { background-color: rgba(124, 58, 237, 0.1); color: #7c3aed; }

.login-feature h4 {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.login-feature p {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

.login-help {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary-subtle);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  color: var(--color-primary);
}

.login-help i {
  font-size: 18px;
  flex-shrink: 0;
}

/* Login Form Box */
.login-form-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.login-logo img {
  height: 44px;
  width: auto;
}

.logo-sub {
  font-size: 11px;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.1em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.login-form-box h3 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: 4px;
}

.form-sub {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

/* Input Icon Wrap */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap i.fa-solid {
  position: absolute;
  left: 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease-standard);
}

.input-icon-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  z-index: 5;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.toggle-pass i {
  position: static !important;
  color: inherit !important;
  font-size: 14px;
}

.toggle-pass:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.toggle-pass:hover {
  color: var(--color-primary);
}

.login-footer-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--space-4);
  line-height: 1.5;
}

.login-footer-note i {
  color: var(--color-primary);
  margin-top: 2px;
}

/* ===== 2. STUDENT DASHBOARD MODERNIZATION ===== */
.student-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.sib-avatar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-muted);
  cursor: pointer;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.sib-details h2 {
  margin: 0 0 4px 0;
  font-size: 1.35rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
}

.sib-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.status-badge {
  padding: 3px 10px;
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  font-size: 12px;
}

.logout-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  background-color: var(--color-surface);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-standard);
}

.logout-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Learning Hub Containers */
.learning-hub {
  margin: var(--space-6) 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.learning-hub-head {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, hsl(221, 83%, 30%), hsl(221, 83%, 53%));
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

.learning-hub-head h2 {
  font-size: 1.25rem;
  margin: 0;
  color: #fff;
  font-weight: var(--font-weight-bold);
}

.learning-hub-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.learning-body {
  padding: var(--space-5);
}

.learning-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background-color: var(--color-surface-muted);
}

.learning-card.current {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-subtle);
}

.learning-label {
  display: block;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.learning-card strong {
  display: block;
  color: var(--color-text);
}

.learning-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  margin-top: 6px;
}

.learning-status.good { background-color: var(--color-success-bg); color: var(--color-success); }
.learning-status.warn { background-color: var(--color-warning-bg); color: var(--color-warning); }
.learning-status.bad { background-color: var(--color-danger-bg); color: var(--color-danger); }

/* Learning Current — 3-column top row */
.learning-current {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.learning-current .learning-card.current {
  border-left: 4px solid var(--color-primary);
}

/* Learning Columns — 3-column for completed / catch-up / upcoming */
.learning-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.learning-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
}

.learning-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all 0.15s ease;
}

.learning-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(16, 96, 208, 0.08);
}

.learning-item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.learning-item small {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.learning-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.learning-item-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border);
}

.li-link {
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}
.li-link:hover { opacity: 0.75; }
.li-notes     { color: #1060D0; }
.li-video     { color: #dc2626; }
.li-assignment { color: #059669; }

/* Learning Material Buttons */
.lm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.lm-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.lm-btn-notes      { background: #1060D0; }
.lm-btn-notes:hover { background: #1d4ed8; }
.lm-btn-assignment { background: #059669; }
.lm-btn-assignment:hover { background: #047857; }
.lm-btn-video      { background: #dc2626; }
.lm-btn-video:hover { background: #b91c1c; }

/* Dashboard section title helpers */
.section-divider {
  margin: var(--space-6) 0 0;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 3. RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
  }
  .learning-current {
    grid-template-columns: 1fr;
  }
  .learning-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-features {
    grid-template-columns: 1fr;
  }
  .student-info-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== 4. STUDY NOTES & PROTECTED VIEWER ===== */
.note-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(16, 96, 208, 0.15) !important;
  background: rgba(16, 96, 208, 0.1) !important;
  border-color: rgba(16, 96, 208, 0.2) !important;
}
body.dark .note-item {
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: rgba(148, 163, 184, 0.1) !important;
}
body.dark .note-item:hover {
  background: rgba(16, 96, 208, 0.15) !important;
}

@media print {
  body { display: none !important; }
}

/* ==========================================================================
   5. STUDENT LEARNING HUB & COMPLETE NOTES (3 CARDS + SCROLLABLE NOTES)
   ========================================================================== */
.ncli-student-learning-hub {
  margin-bottom: 32px;
}

/* Top 3 Cards Grid */
.ncli-slh-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.ncli-topic-card {
  background: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #e2e8f0);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ncli-topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.ncli-topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 14px;
}

.ncli-topic-card.missed {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.6) 0%, var(--color-surface, #ffffff) 100%);
}
.ncli-topic-card.missed .ncli-topic-badge {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.ncli-topic-card.today {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.7) 0%, var(--color-surface, #ffffff) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.ncli-topic-card.today .ncli-topic-badge {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.ncli-topic-card.upcoming {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.6) 0%, var(--color-surface, #ffffff) 100%);
}
.ncli-topic-card.upcoming .ncli-topic-badge {
  background: #dbeafe;
  color: #1060D0;
  border: 1px solid #93c5fd;
}

.ncli-topic-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text, #0f172a);
  margin: 0 0 6px;
  line-height: 1.35;
}

.ncli-topic-desc {
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
  margin: 0 0 14px;
  line-height: 1.45;
  flex: 1;
}

.ncli-topic-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted, #94a3b8);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Complete Notes Main Container */
.ncli-slh-notes-box {
  background: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #e2e8f0);
  border-radius: 24px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
}

.ncli-slh-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--color-border-subtle, #f1f5f9);
  margin-bottom: 16px;
}

.ncli-slh-notes-title-wrap h3 {
  font-size: 19px;
  font-weight: 900;
  color: var(--color-text, #0f172a);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ncli-notes-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: #EEF4FF;
  color: #1060D0;
  padding: 3px 12px;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
}

.ncli-slh-notes-title-wrap p {
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
  margin: 0;
}

.ncli-notes-search-wrap {
  position: relative;
  min-width: 240px;
  display: block;
}

/* The 42px left padding reserves space for the absolutely-positioned search icon.
   This relies on core.css's base input rule being :where()-wrapped (0,0,1) so this
   selector (0,1,1) wins normally — don't restore the un-wrapped :not() chain there. */
.ncli-notes-search-wrap input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 9px 14px 9px 42px;
  font-size: 13px;
  background: var(--color-surface-muted, #f8fafc);
  border: 1.5px solid var(--color-border, #cbd5e1);
  border-radius: 12px;
  color: var(--color-text, #0f172a);
  outline: none;
  transition: all 0.2s ease;
}

.ncli-notes-search-wrap input:focus {
  border-color: #1060D0;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 96, 208, 0.12);
}

.ncli-notes-search-wrap i {
  position: absolute;
  z-index: 2;
  left: 12px;
  width: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .ncli-notes-search-wrap {
    width: 100%;
    min-width: 0;
  }
}

/* Scrollable Container with Custom Modern Scrollbar */
.ncli-notes-scroll-container {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 rgba(226, 232, 240, 0.6);
}

.ncli-notes-scroll-container::-webkit-scrollbar {
  width: 7px;
}

.ncli-notes-scroll-container::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.6);
  border-radius: 8px;
}

.ncli-notes-scroll-container::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 8px;
}

.ncli-notes-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Note Row Item */
.ncli-note-row {
  background: var(--color-surface-muted, #f8fafc);
  border: 1.5px solid var(--color-border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.2s ease;
}

.ncli-note-row:hover {
  background: #ffffff;
  border-color: #38bdf8;
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.08);
}

.ncli-note-info {
  flex: 1;
  min-width: 0;
}

.ncli-note-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.ncli-note-day-badge {
  font-size: 11px;
  font-weight: 800;
  background: #ede9fe;
  color: #7c3aed;
  padding: 2px 8px;
  border-radius: 6px;
}

.ncli-note-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--color-text, #0f172a);
  margin: 0;
}

.ncli-note-desc {
  font-size: 12.5px;
  color: var(--color-text-secondary, #64748b);
  margin: 0;
  line-height: 1.4;
}

.ncli-note-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ncli-btn-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1060D0, #1d4ed8);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 96, 208, 0.25);
  transition: all 0.2s ease;
}

.ncli-btn-note:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 96, 208, 0.35);
  color: #ffffff !important;
}

.ncli-btn-assignment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
  transition: all 0.2s ease;
}

.ncli-btn-assignment:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  color: #ffffff !important;
}

.ncli-btn-video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #dc2626 !important;
  border: 1px solid #fca5a5;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ncli-btn-video:hover {
  background: #dc2626;
  color: #ffffff !important;
}

/* ==========================================================================
   DARK MODE FOR STUDENT LEARNING HUB & NOTES
   ========================================================================== */
[data-theme="dark"] .ncli-topic-card,
body.dark .ncli-topic-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .ncli-topic-card.missed,
body.dark .ncli-topic-card.missed {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: linear-gradient(180deg, rgba(153, 27, 27, 0.15) 0%, #0f172a 100%) !important;
}
[data-theme="dark"] .ncli-topic-card.missed .ncli-topic-badge,
body.dark .ncli-topic-card.missed .ncli-topic-badge {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

[data-theme="dark"] .ncli-topic-card.today,
body.dark .ncli-topic-card.today {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: linear-gradient(180deg, rgba(6, 95, 70, 0.2) 0%, #0f172a 100%) !important;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.15) !important;
}
[data-theme="dark"] .ncli-topic-card.today .ncli-topic-badge,
body.dark .ncli-topic-card.today .ncli-topic-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

[data-theme="dark"] .ncli-topic-card.upcoming,
body.dark .ncli-topic-card.upcoming {
  border-color: rgba(59, 130, 246, 0.35) !important;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.2) 0%, #0f172a 100%) !important;
}
[data-theme="dark"] .ncli-topic-card.upcoming .ncli-topic-badge,
body.dark .ncli-topic-card.upcoming .ncli-topic-badge {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

[data-theme="dark"] .ncli-topic-title,
body.dark .ncli-topic-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .ncli-topic-desc,
body.dark .ncli-topic-desc {
  color: #94a3b8 !important;
}

[data-theme="dark"] .ncli-slh-notes-box,
body.dark .ncli-slh-notes-box {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .ncli-slh-notes-title-wrap h3,
body.dark .ncli-slh-notes-title-wrap h3 {
  color: #f8fafc !important;
}

[data-theme="dark"] .ncli-notes-pill,
body.dark .ncli-notes-pill {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

[data-theme="dark"] .ncli-slh-notes-title-wrap p,
body.dark .ncli-slh-notes-title-wrap p {
  color: #94a3b8 !important;
}

[data-theme="dark"] .ncli-slh-notes-header,
body.dark .ncli-slh-notes-header {
  border-bottom-color: #1e293b !important;
}

[data-theme="dark"] .ncli-notes-search-wrap input,
body.dark .ncli-notes-search-wrap input {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .ncli-notes-search-wrap input:focus,
body.dark .ncli-notes-search-wrap input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

[data-theme="dark"] .ncli-note-row,
body.dark .ncli-note-row {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .ncli-note-row:hover,
body.dark .ncli-note-row:hover {
  background: #253347 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .ncli-note-title,
body.dark .ncli-note-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .ncli-note-desc,
body.dark .ncli-note-desc {
  color: #94a3b8 !important;
}

[data-theme="dark"] .ncli-note-day-badge,
body.dark .ncli-note-day-badge {
  background: rgba(124, 58, 237, 0.25) !important;
  color: #c4b5fd !important;
}

[data-theme="dark"] .ncli-notes-scroll-container::-webkit-scrollbar-track,
body.dark .ncli-notes-scroll-container::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.8) !important;
}

/* Weekly Online Tests & Exams Styles */
.student-test-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.student-test-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.student-test-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.student-test-score-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-test-empty-lb {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

/* Dark Mode for Weekly Online Tests & Exams */
[data-theme="dark"] .student-test-card,
body.dark .student-test-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .student-test-card:hover,
body.dark .student-test-card:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .student-test-title,
body.dark .student-test-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .student-test-score-box,
body.dark .student-test-score-box {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .student-test-empty-lb,
body.dark .student-test-empty-lb {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .dash-card,
body.dark .dash-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

@media (max-width: 992px) {
  .ncli-slh-top-grid {
    grid-template-columns: 1fr;
  }
  .ncli-note-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .ncli-note-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ===== FEE BALANCE WARNING POPUP & ALERT BANNER ===== */
.ncli-fee-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.05);
}
.ncli-fee-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ncli-fee-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ncli-fee-alert-left strong {
  display: block;
  font-size: 14px;
  color: #991b1b;
  font-weight: 700;
}
.ncli-fee-alert-left span {
  font-size: 12.5px;
  color: #475569;
}
.ncli-fee-alert-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.ncli-fee-alert-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Modal Overlay */
.ncli-fee-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ncli-fee-modal-overlay.ncli-modal-visible {
  opacity: 1;
  visibility: visible;
}

/* Modal Card */
.ncli-fee-modal-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.15);
  overflow: hidden;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}
.ncli-fee-modal-overlay.ncli-modal-visible .ncli-fee-modal-card {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.ncli-fee-modal-header {
  background: linear-gradient(135deg, #b91c1c, #dc2626, #ea580c);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ncli-fee-badge-pulse {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: ncliFeePulseAlert 2s infinite;
  flex-shrink: 0;
}
@keyframes ncliFeePulseAlert {
  0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.ncli-fee-modal-title-group {
  flex: 1;
}
.ncli-fee-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 3px;
}
.ncli-fee-modal-title-group h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}
.ncli-fee-modal-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  flex-shrink: 0;
}
.ncli-fee-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

/* Modal Body */
.ncli-fee-modal-body {
  padding: 20px 22px;
}
.ncli-fee-student-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 16px;
}
.ncli-fee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1060D0;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.ncli-fee-student-info strong {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 700;
}
.ncli-fee-student-info span {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

/* Balance Box */
.ncli-fee-balance-box {
  background: linear-gradient(135deg, #fff1f2, #fef2f2);
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.06);
}
.ncli-fee-bal-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 2px;
}
.ncli-fee-bal-amount {
  font-size: 32px;
  font-weight: 900;
  color: #dc2626;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.ncli-fee-bal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed #fca5a5;
}
.ncli-fee-stat {
  text-align: center;
}
.ncli-fee-stat span {
  display: block;
  font-size: 10.5px;
  color: #7f1d1d;
  font-weight: 600;
}
.ncli-fee-stat strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  font-weight: 800;
}

/* Notice text */
.ncli-fee-notice-text {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #78350f;
}
.ncli-fee-notice-text p {
  margin: 0;
}

/* Modal Actions */
.ncli-fee-modal-actions {
  padding: 14px 22px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ncli-fee-btn-primary {
  background: linear-gradient(135deg, #1060D0, #1d4ed8);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 96, 208, 0.25);
  text-decoration: none;
}
.ncli-fee-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 96, 208, 0.35);
  color: #ffffff;
}
.ncli-fee-btn-secondary {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.ncli-fee-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Dark theme overrides */
[data-theme="dark"] .ncli-fee-alert-banner,
body.dark .ncli-fee-alert-banner {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
[data-theme="dark"] .ncli-fee-alert-left strong,
body.dark .ncli-fee-alert-left strong {
  color: #f87171 !important;
}
[data-theme="dark"] .ncli-fee-alert-left span,
body.dark .ncli-fee-alert-left span {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .ncli-fee-modal-card,
body.dark .ncli-fee-modal-card {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .ncli-fee-student-pill,
body.dark .ncli-fee-student-pill {
  background: #1e293b !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .ncli-fee-student-info strong,
body.dark .ncli-fee-student-info strong {
  color: #f8fafc !important;
}
[data-theme="dark"] .ncli-fee-student-info span,
body.dark .ncli-fee-student-info span {
  color: #94a3b8 !important;
}
[data-theme="dark"] .ncli-fee-balance-box,
body.dark .ncli-fee-balance-box {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
[data-theme="dark"] .ncli-fee-bal-label,
body.dark .ncli-fee-bal-label {
  color: #fca5a5 !important;
}
[data-theme="dark"] .ncli-fee-bal-amount,
body.dark .ncli-fee-bal-amount {
  color: #f87171 !important;
}
[data-theme="dark"] .ncli-fee-stat span,
body.dark .ncli-fee-stat span {
  color: #fca5a5 !important;
}
[data-theme="dark"] .ncli-fee-stat strong,
body.dark .ncli-fee-stat strong {
  color: #f8fafc !important;
}
[data-theme="dark"] .ncli-fee-notice-text,
body.dark .ncli-fee-notice-text {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}
[data-theme="dark"] .ncli-fee-modal-actions,
body.dark .ncli-fee-modal-actions {
  background: #1e293b !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .ncli-fee-btn-secondary,
body.dark .ncli-fee-btn-secondary {
  color: #94a3b8 !important;
  border-color: #475569 !important;
}
[data-theme="dark"] .ncli-fee-btn-secondary:hover,
body.dark .ncli-fee-btn-secondary:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

@media (max-width: 576px) {
  .ncli-fee-alert-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .ncli-fee-alert-btn {
    width: 100%;
    justify-content: center;
  }
  .ncli-fee-modal-card {
    max-height: 90vh;
    overflow-y: auto;
  }
  .ncli-fee-bal-amount {
    font-size: 28px;
  }
}

/* ==========================================================================
   STUDENT SUPPORT CHAT & AI SOCRATIC TUTOR MODAL & WIDGET
   ========================================================================== */
.ncli-chat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ncli-chat-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ncli-chat-card {
  width: 100%;
  max-width: 580px;
  height: 640px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(167, 139, 250, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ncli-chat-modal-overlay.active .ncli-chat-card {
  transform: translateY(0) scale(1);
}

/* Chat Header */
.ncli-chat-header {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ncli-chat-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ncli-chat-avatar-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.ncli-chat-header-text h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: -0.2px;
}

.ncli-chat-header-text span {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ncli-chat-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.ncli-chat-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.ncli-chat-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Chat Tabs */
.ncli-chat-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 6px 12px;
  gap: 8px;
}

.ncli-chat-tab-btn {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  position: relative;
}

.ncli-chat-tab-btn.active {
  background: #ffffff;
  color: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.ncli-chat-tab-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

/* Chat Panes */
.ncli-chat-pane {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #fdfdfd;
}

.ncli-chat-pane.active {
  display: flex;
}

.ncli-chat-notice-bar {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px;
  font-size: 11.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.ncli-chat-notice-bar i {
  color: #7c3aed;
  flex-shrink: 0;
}

/* Messages Stream */
.ncli-chat-stream {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.ncli-chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}

.ncli-chat-bubble.student {
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.ncli-chat-bubble.admin {
  align-self: flex-start;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ncli-chat-bubble.ai {
  align-self: flex-start;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #c4b5fd;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.08);
}

.ncli-chat-sender-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ncli-chat-bubble.admin .ncli-chat-sender-tag {
  color: #1060D0;
}

.ncli-chat-bubble.ai .ncli-chat-sender-tag {
  color: #7c3aed;
}

.ncli-chat-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.75;
  text-align: right;
}

/* Quick Suggestion Chips */
.ncli-chat-chips {
  padding: 8px 14px 4px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.ncli-chat-chips::-webkit-scrollbar {
  display: none;
}

.ncli-chip-btn {
  background: #ffffff;
  border: 1.5px solid #ddd6fe;
  color: #6d28d9;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ncli-chip-btn:hover {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}

/* Chat Input Bar */
.ncli-chat-input-bar {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ncli-chat-attach-btn {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #64748b;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ncli-chat-attach-btn:hover {
  background: #ede9fe;
  border-color: #a78bfa;
  color: #7c3aed;
  transform: scale(1.05);
}

.ncli-chat-attachment-preview {
  padding: 8px 14px;
  background: #f5f3ff;
  border-top: 1.5px solid #ddd6fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ncli-chat-preview-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #5b21b6;
  min-width: 0;
}

.ncli-chat-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.ncli-chat-preview-size {
  color: #7c3aed;
  font-size: 11px;
  opacity: 0.85;
}

.ncli-chat-preview-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.ncli-chat-preview-remove:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Chat Attachment Bubbles */
.ncli-chat-attachment-box {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  padding: 6px;
}

.ncli-chat-bubble.student .ncli-chat-attachment-box {
  background: rgba(255, 255, 255, 0.18);
}

.ncli-chat-img-link {
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.ncli-chat-img-thumb {
  max-width: 240px;
  max-height: 180px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  transition: transform 0.2s;
}

.ncli-chat-img-thumb:hover {
  transform: scale(1.02);
}

.ncli-chat-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.ncli-chat-file-ico {
  font-size: 24px;
  color: #7c3aed;
}

.ncli-chat-file-info {
  flex: 1;
  min-width: 0;
}

.ncli-chat-file-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ncli-chat-file-size {
  font-size: 10.5px;
  color: #64748b;
}

.ncli-chat-file-download {
  color: #7c3aed;
  font-size: 16px;
  padding: 4px;
  transition: transform 0.15s;
}

.ncli-chat-file-download:hover {
  transform: scale(1.2);
}

.ncli-chat-attachment-footer {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.ncli-chat-delete-file-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.ncli-chat-bubble.student .ncli-chat-delete-file-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.ncli-chat-delete-file-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

.ncli-chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s;
  background: #f8fafc;
  color: #0f172a;
}

.ncli-chat-input-bar input:focus {
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.ncli-chat-send-btn {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  flex-shrink: 0;
}

.ncli-chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.ncli-chat-send-btn:active {
  transform: scale(0.96);
}

/* Floating Chat Trigger Button */
.ncli-floating-chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ncli-floating-chat-trigger:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.45);
}

.ncli-floating-chat-trigger i {
  font-size: 16px;
}

.ncli-floating-chat-badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  animation: ncliPulseBadge 2s infinite;
}

@keyframes ncliPulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Dark Theme Support */
[data-theme="dark"] .ncli-chat-card,
body.dark .ncli-chat-card {
  background: #0f172a !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .ncli-chat-tabs,
body.dark .ncli-chat-tabs {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}

[data-theme="dark"] .ncli-chat-tab-btn,
body.dark .ncli-chat-tab-btn {
  color: #94a3b8 !important;
}

[data-theme="dark"] .ncli-chat-tab-btn.active,
body.dark .ncli-chat-tab-btn.active {
  background: #0f172a !important;
  color: #a78bfa !important;
}

[data-theme="dark"] .ncli-chat-pane,
body.dark .ncli-chat-pane {
  background: #0f172a !important;
}

[data-theme="dark"] .ncli-chat-notice-bar,
body.dark .ncli-chat-notice-bar {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .ncli-chat-stream,
body.dark .ncli-chat-stream {
  background: #090d16 !important;
}

[data-theme="dark"] .ncli-chat-bubble.admin,
body.dark .ncli-chat-bubble.admin {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .ncli-chat-bubble.ai,
body.dark .ncli-chat-bubble.ai {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(167, 139, 250, 0.3) !important;
}

[data-theme="dark"] .ncli-chat-chips,
body.dark .ncli-chat-chips {
  background: #090d16 !important;
  border-top-color: #1e293b !important;
}

[data-theme="dark"] .ncli-chip-btn,
body.dark .ncli-chip-btn {
  background: #1e293b !important;
  border-color: rgba(167, 139, 250, 0.3) !important;
  color: #c4b5fd !important;
}

[data-theme="dark"] .ncli-chip-btn:hover,
body.dark .ncli-chip-btn:hover {
  background: #7c3aed !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ncli-chat-input-bar,
body.dark .ncli-chat-input-bar {
  background: #0f172a !important;
  border-top-color: #1e293b !important;
}

[data-theme="dark"] .ncli-chat-input-bar input,
body.dark .ncli-chat-input-bar input {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .ncli-chat-input-bar input:focus,
body.dark .ncli-chat-input-bar input:focus {
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2) !important;
}

@media (max-width: 600px) {
  .ncli-chat-card {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .ncli-chat-modal-overlay {
    padding: 0;
  }
  .ncli-floating-chat-trigger span {
    display: none;
  }
  .ncli-floating-chat-trigger {
    padding: 14px;
    border-radius: 50%;
    bottom: 80px;
    right: 16px;
  }
}

