/**
 * Novda LMS — Ultra-Modern Typography & Interface Design System (2026 Edition)
 * Gold-standard SaaS typography: Plus Jakarta Sans + Inter + Outfit.
 * Dynamic typographic rhythm, optical tracking, tabular figures, micro-labels.
 */

:root {
  --n-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --n-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --n-font-accent: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --n-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* ==========================================================================
   1. Universal Base Typography & Antialiasing
   ========================================================================== */
html, body {
  font-family: var(--n-font-sans) !important;
  color: var(--n-ink, #0F172A);
  line-height: 1.55;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.n-shell, .n-main, .n-content {
  font-family: var(--n-font-sans) !important;
}

/* ==========================================================================
   2. Headings Scale & Optical Kerning
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.n-page-title,
.n-drawer-title,
.n-logo-word,
.n-fin-title,
.n-section-title,
.n-hero-h1,
.n-hero-title,
.n-bento-title {
  font-family: var(--n-font-display) !important;
  font-weight: 750 !important;
  color: var(--n-ink, #0B1B13);
  line-height: 1.25;
  letter-spacing: -0.03em !important;
}

h1, .n-h1 {
  font-size: 26px;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
}

h2, .n-h2 {
  font-size: 20px;
  font-weight: 750 !important;
  letter-spacing: -0.03em !important;
}

h3, .n-h3 {
  font-size: 17px;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

h4, .n-h4 {
  font-size: 15px;
  font-weight: 650 !important;
  letter-spacing: -0.02em !important;
}

/* Subtitles & Descriptions */
.n-page-header p,
.n-fin-subtitle,
.n-card-sub,
.n-section-sub,
.n-lead-desc {
  font-family: var(--n-font-sans);
  color: var(--n-ink-soft, #475569);
  font-size: 13.5px;
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   3. Numerical & KPI Typography (Tabular Figures)
   ========================================================================== */
.n-stat-value,
.n-bento-stat-value,
[data-counter],
.n-fin-kpi-val,
.n-fin-kpi-value,
.n-num,
.n-kpi-num,
.n-traffic-kpi-val {
  font-family: var(--n-font-display) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "cv05" 1 !important;
}

.n-stat-label {
  font-family: var(--n-font-sans) !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  color: var(--n-ink-soft, #475569) !important;
  letter-spacing: -0.01em !important;
}

.n-stat-sub {
  font-family: var(--n-font-sans) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--n-green, #059669) !important;
  letter-spacing: -0.01em !important;
}

/* ==========================================================================
   4. Micro-labels & Eyebrows
   ========================================================================== */
.n-eyebrow,
.n-fin-kpi-lbl,
.n-fin-kpi-hint,
.n-table-head,
.n-micro-lbl {
  font-family: var(--n-font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--n-ink-soft, #64748B);
}

/* ==========================================================================
   5. Interactive Form Controls & Buttons
   ========================================================================== */
label,
.n-field-block label,
.form-label {
  font-family: var(--n-font-sans) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: -0.012em !important;
  color: var(--n-ink, #1E293B) !important;
  margin-bottom: 6px;
}

input, select, textarea {
  font-family: var(--n-font-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
}

input::placeholder, textarea::placeholder {
  font-family: var(--n-font-sans);
  font-weight: 450;
  color: var(--n-ink-faint, #94A3B8);
}

button,
.n-btn,
.n-primary-btn,
.n-dash-btn,
.n-fin-btn,
.n-fin-preset-btn,
.n-drawer-save,
.n-drawer-cancel {
  font-family: var(--n-font-display) !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em !important;
}

/* ==========================================================================
   6. Navigation & Sidebar Items
   ========================================================================== */
.n-nav-item {
  font-family: var(--n-font-display) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
}

.n-nav-item.active {
  font-weight: 750 !important;
}

.n-landing-menu a {
  font-family: var(--n-font-display) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
}

/* ==========================================================================
   7. Tables, Badges & Chips
   ========================================================================== */
table th, .n-table th {
  font-family: var(--n-font-sans) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--n-ink-soft, #64748B) !important;
}

table td, .n-table td {
  font-family: var(--n-font-sans) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
}

.n-badge, .n-chip, .n-fin-badge {
  font-family: var(--n-font-sans) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

/* ==========================================================================
   8. Gradient Text & Modern Accent Classes
   ========================================================================== */
.n-text-gradient {
  background: linear-gradient(135deg, #0F172A 0%, #064E3B 55%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.n-text-gradient-emerald {
  background: linear-gradient(135deg, #064E3B 0%, #059669 50%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   9. Dedicated Visitor Analytics Cards & Bar Chart Styling
   ========================================================================== */
.n-traffic-section {
  margin-top: 24px;
  margin-bottom: 24px;
}

.n-traffic-card {
  background: #FFFFFF;
  border: 1px solid var(--n-border, #E2E8F0);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.n-traffic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.n-traffic-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.n-traffic-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
  color: var(--n-green, #059669);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.n-traffic-title {
  font-family: var(--n-font-display);
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 3px;
  color: var(--n-ink, #0B1B13);
  letter-spacing: -0.025em;
}

.n-traffic-subtitle {
  font-size: 13px;
  color: var(--n-ink-soft, #64748B);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.n-traffic-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.n-traffic-kpi-item {
  background: #F8FAFC;
  border: 1.5px solid #F1F5F9;
  border-radius: 14px;
  padding: 16px 18px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.n-traffic-kpi-item:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

.n-traffic-kpi-item.accent-emerald {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.n-traffic-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.n-traffic-kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--n-ink-soft, #64748B);
}

.n-traffic-kpi-icon {
  font-size: 16px;
  color: var(--n-green, #059669);
}

.n-traffic-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--n-ink, #0B1B13);
  margin-bottom: 6px;
  line-height: 1.1;
}

.n-traffic-kpi-sub {
  font-size: 12px;
  color: var(--n-ink-soft, #64748B);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 14-day CSS Bar Chart */
.n-traffic-chart-container {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 22px;
}

.n-traffic-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--n-ink, #0F172A);
}

.n-traffic-bars-track {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 130px;
  padding-bottom: 26px;
  position: relative;
  border-bottom: 1.5px dashed #CBD5E1;
}

.n-traffic-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  group: pointer;
}

.n-traffic-bar-fill {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  border-radius: 6px 6px 2px 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 6px;
}

.n-traffic-bar-col:hover .n-traffic-bar-fill {
  background: linear-gradient(180deg, #34D399 0%, #10B981 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transform: scaleY(1.05);
}

.n-traffic-bar-col.is-today .n-traffic-bar-fill {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.n-traffic-bar-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: all 0.18s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.n-traffic-bar-col:hover .n-traffic-bar-tip {
  opacity: 1;
  transform: translateY(0);
}

.n-traffic-bar-lbl {
  position: absolute;
  bottom: -24px;
  font-size: 11px;
  font-weight: 650;
  color: var(--n-ink-soft, #64748B);
  white-space: nowrap;
}

.n-traffic-bar-col.is-today .n-traffic-bar-lbl {
  color: #D97706;
  font-weight: 800;
}

/* Devices Breakdown footer */
.n-traffic-devices-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}

.n-traffic-dev-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--n-ink, #0F172A);
}

.n-traffic-dev-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--n-ink-soft, #475569);
  font-size: 14px;
}

/* ==========================================================================
   10. Component-Specific Typography Refinement
   ========================================================================== */

/* Topbar & User Profile */
.n-topbar-left .n-page-title {
  font-family: var(--n-font-display) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
}

.n-user-name {
  font-family: var(--n-font-display) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  color: var(--n-ink, #0F172A) !important;
}

.n-user-role {
  font-family: var(--n-font-sans) !important;
  font-size: 11.5px !important;
  font-weight: 550 !important;
  color: var(--n-ink-soft, #64748B) !important;
}

/* Stat Cards (Grid at top of Admin & Teacher Dashboards) */
.n-stat-card {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.n-stat-card .n-stat-value {
  font-size: 26px !important;
  line-height: 1.15 !important;
}

/* Cards & Section Containers */
.n-card {
  border-radius: 16px !important;
  border: 1px solid var(--n-border, #E2E8F0) !important;
}

.n-card .title, .n-card-title {
  font-family: var(--n-font-display) !important;
  font-size: 16.5px !important;
  font-weight: 750 !important;
  letter-spacing: -0.025em !important;
  color: var(--n-ink, #0B1B13) !important;
}

.n-card .desc, .n-card-desc {
  font-family: var(--n-font-sans) !important;
  font-size: 13px !important;
  color: var(--n-ink-soft, #64748B) !important;
  line-height: 1.5 !important;
}

/* Data Tables */
.n-table, table {
  font-variant-numeric: tabular-nums;
}

.n-table th, table th {
  padding: 12px 16px !important;
  background: #F8FAFC !important;
  border-bottom: 1.5px solid #E2E8F0 !important;
}

.n-table td, table td {
  padding: 13px 16px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  vertical-align: middle !important;
}

/* Modals, Drawers & Popups */
.n-drawer-title, .modal-title {
  font-family: var(--n-font-display) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: var(--n-ink, #0B1B13) !important;
}

/* Form Helper & Error Messages */
.help-text, .form-text, .n-help-text {
  font-family: var(--n-font-sans) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--n-ink-soft, #64748B) !important;
  margin-top: 4px !important;
}

.errorlist, .text-danger, .invalid-feedback {
  font-family: var(--n-font-sans) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #DC2626 !important;
}

/* Quiz & Student Portal */
.quiz-question-title, .n-question-text {
  font-family: var(--n-font-display) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.02em !important;
}

.quiz-option-label, .n-choice-label {
  font-family: var(--n-font-sans) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

.quiz-timer-box {
  font-family: var(--n-font-display) !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.02em !important;
}

