/* ==========================================================================
   Demos Archive - Course Catalog & Material Library
   Full Remake: Modern Telegram Mini App / Mobile UI Design System
   ========================================================================== */

:root {
  /* Horus University (HUE) - Egyptian Midnight Navy */
  --bg: #070d1a;
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #102140 0%, #070d1a 75%);
  --bg-card: #0e1a31;
  --bg-card-hover: #152749;
  --bg-subtle: #091224;
  --fg: #f8fafc;
  --fg-muted: #94a3b8;
  --fg-subtle: #64748b;
  --line: rgba(245, 158, 11, 0.15);
  --line-strong: rgba(245, 158, 11, 0.32);

  /* HUE Imperial Gold Tokens */
  --hue-gold: #f59e0b;
  --hue-gold-light: #fbbf24;
  --hue-gold-dark: #b45309;
  --hue-gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --hue-gold-glow: 0 4px 24px rgba(245, 158, 11, 0.35);
  --hue-gold-soft: rgba(245, 158, 11, 0.14);

  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --accent-fg: #070d1a;

  /* Functional Category Colors */
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.16);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.16);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.16);
  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.16);
  --lec: #0ea5e9;
  --lec-soft: rgba(14, 165, 233, 0.16);
  --book: #6366f1;
  --book-soft: rgba(99, 102, 241, 0.16);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --nav-height: 66px;
  --topbar-height: 58px;
}

html[data-scheme="light"] {

  --muted: var(--fg-muted);
  --text-main: var(--fg);
  --radius-md: 10px;
  --topbar-height: 56px;
  --nav-height: 64px;

  /* Horus University (HUE) Light Mode - High Contrast & Clean */
  --bg: #f8fafc;
  --bg-gradient: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-subtle: #f1f5f9;
  --fg: #0f172a;
  --fg-muted: #334155;
  --fg-subtle: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --hue-gold: #d97706;
  --hue-gold-light: #f59e0b;
  --hue-gold-dark: #b45309;
  --hue-gold-gradient: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  --hue-gold-glow: 0 4px 18px rgba(217, 119, 6, 0.22);
  --hue-gold-soft: rgba(217, 119, 6, 0.12);

  --accent: #d97706;
  --accent-soft: rgba(217, 119, 6, 0.12);
  --accent-fg: #ffffff;

  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --rose: #e11d48;
  --rose-soft: rgba(225, 29, 72, 0.12);
  --purple: #9333ea;
  --purple-soft: rgba(147, 51, 234, 0.12);
  --lec: #0284c7;
  --lec-soft: rgba(2, 132, 199, 0.12);
  --book: #4f46e5;
  --book-soft: rgba(79, 70, 229, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Horus University Egyptian Midnight Navy Dark Mode */
html[data-scheme="dark"] {

  --muted: var(--fg-muted);
  --text-main: var(--fg);
  --radius-md: 10px;
  --topbar-height: 56px;
  --nav-height: 64px;

  --bg: #070d1a;
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #102140 0%, #070d1a 75%);
  --bg-card: #0e1a31;
  --bg-card-hover: #152749;
  --bg-subtle: #091224;
  --fg: #f8fafc;
  --fg-muted: #94a3b8;
  --fg-subtle: #64748b;
  --line: rgba(245, 158, 11, 0.15);
  --line-strong: rgba(245, 158, 11, 0.32);

  --hue-gold: #f59e0b;
  --hue-gold-light: #fbbf24;
  --hue-gold-dark: #b45309;
  --hue-gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --hue-gold-glow: 0 4px 24px rgba(245, 158, 11, 0.35);
  --hue-gold-soft: rgba(245, 158, 11, 0.14);

  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --accent-fg: #070d1a;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="auto"] {
  unicode-bidi: plaintext;
  text-align: start;
}

/* Global Content Wrapper */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--topbar-height) + env(safe-area-inset-top, 0px) + 16px) 16px calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
  min-height: 100vh;
}

/* ==========================================================================
   Fixed Header Topbar (Fully Opaque to prevent bleed-through)
   ========================================================================== */
.app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--topbar-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg-card);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.15s ease;
}

.icon-btn.active, .icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.admin-badge {
  color: var(--warn);
}

/* ==========================================================================
   Bottom Navigation Dock
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-card);
  border-top: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--fg-subtle);
  padding: 6px 0;
  transition: all 0.15s ease;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active .nav-icon {
  transform: translateY(-1px);
}

/* ==========================================================================
   Common Card & Banner Styles
   ========================================================================== */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.hero-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(30, 41, 59, 0.9)), var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.45;
}

/* Breadcrumb Bar */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-subtle);
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

.crumb-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  text-decoration: none;
}

.crumb-separator {
  color: var(--fg-subtle);
  opacity: 0.6;
}

.crumb-current {
  color: var(--fg-muted);
}

/* Page Intro Header */
.page-intro-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.5rem;
}

.page-icon-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-intro-text {
  flex: 1;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.page-desc {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Section Headers & Counters
   ========================================================================== */
.section-block {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--fg);
}

.section-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 0.85rem;
}

.badge-counter {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--line);
}

/* ==========================================================================
   Folder & Course Row Cards (List Style)
   ========================================================================== */
.folder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.folder-row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.folder-row-card:active {
  transform: scale(0.985);
  background: var(--bg-card-hover);
}

.folder-left-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.folder-content {
  flex: 1;
  min-width: 0;
}

.folder-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.3rem;
}

.code-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--accent);
  border: 1px solid var(--line-strong);
  letter-spacing: 0.03em;
}

.count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.count-active {
  background: var(--ok-soft);
  color: var(--ok);
}

.count-zero {
  background: var(--bg-subtle);
  color: var(--fg-subtle);
}

.folder-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-pill-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.pill-lec { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.pill-sheet { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.pill-exam { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.pill-audio { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.pill-photo { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }

.folder-arrow {
  color: var(--fg-subtle);
  flex-shrink: 0;
}

/* ==========================================================================
   Curriculum Tree Grid
   ========================================================================== */
.tree-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tree-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.tree-card:active {
  transform: scale(0.985);
  background: var(--bg-card-hover);
}

.tree-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tree-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.default-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tree-sub {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* ==========================================================================
   Course Details & Hero Header
   ========================================================================== */
.course-page-wrapper {
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.course-header-card {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.course-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.main-code-badge {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.files-total-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ok-soft);
  color: var(--ok);
}

.course-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

.course-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--line);
}

.course-note-box {
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: var(--bg-subtle);
  font-size: 0.82rem;
  color: var(--fg-muted);
  border: 1px solid var(--line);
}

/* Category Filter Tabs */
.filter-tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.filter-tab-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab.on {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ==========================================================================
   Material Cards (PDF, Audio, Photo, Link)
   ========================================================================== */
.materials-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.material-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--topbar-height) + 20px);
  transition: border-color 0.15s ease;
}

.mat-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.mat-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.badge-voice { background: rgba(168, 85, 247, 0.15); color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }
.badge-photo { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); }
.badge-pdf { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }
.badge-kind-lecture { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.badge-kind-worksheet { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-kind-solution { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-kind-summary { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.file-size-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fg-subtle);
}

.material-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

/* Audio Player */
.audio-player-box {
  margin: 0.65rem 0 0.85rem;
}

.audio-player-box audio {
  width: 100%;
  height: 42px;
  border-radius: 10px;
}

/* Photo Thumbnail */
.photo-preview-wrap {
  margin: 0.6rem 0 0.85rem;
}

.shot-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-subtle);
}

/* Material Action Buttons */
.mat-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:active {
  transform: scale(0.96);
}

.btn-preview {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn-download {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}

.btn-open {
  background: var(--bg-subtle);
  color: var(--fg-muted);
}

/* PDF Preview Container & Multi-Page Continuous Scroll */
.pdfbox {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.pdf-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pdf-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-tag-pill {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
}

.pdf-page-status {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.pdf-ctrl-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-jump-btn:active {
  background: var(--accent-soft);
  color: var(--accent);
}

.pdf-close-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--rose);
  background: var(--rose-soft);
  border: 1px solid color-mix(in srgb, var(--rose) 25%, transparent);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-status {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}

/* Multi-Page Continuous Scroll Container */
.pdf-scroll-container {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.pdf-page-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pdf-page-header {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--fg-subtle);
  text-align: right;
  padding-right: 4px;
}

.pdf-canvas-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background: #ffffff;
  border: 1px solid var(--line);
}

.pdf-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}

/* ==========================================================================
   Modern Form Controls & Upload System (Submit & Admin)
   ========================================================================== */
.form-card {
  padding: 1.4rem;
}

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: var(--rose);
}

.optional-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-subtle);
  text-transform: none;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--fg-subtle);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.form-sub-action {
  margin-top: 0.4rem;
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

/* Inputs, Textareas & Selects */
.form-input, .form-textarea, .form-select {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg-subtle);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.15s ease;
  outline: none;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--fg-subtle);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-card);
}

.textarea-wrapper textarea {
  resize: vertical;
  min-height: 70px;
}

/* Custom Select Dropdown with Chevron */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
}

/* Custom File Dropzone */
.file-dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  padding: 1.6rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
  display: block !important;
  z-index: 10;
}

.dropzone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--hue-gold-gradient, linear-gradient(135deg, #f59e0b, #d97706));
  color: #070d1a;
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 6px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  transition: all 0.15s ease;
}

.primary-btn-block:disabled, .primary-btn-block.loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropzone-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.dropzone-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--fg);
}

.dropzone-types {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.dropzone-limit {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}

/* Live Selected Files List */
.selected-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0.85rem;
}

.file-preview-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
}

.file-preview-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.file-preview-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--fg-subtle);
}

/* Form Divider */
.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.5rem 0;
  color: var(--fg-subtle);
}

.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.form-divider span {
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Full Width Submit Block Button */
.primary-btn-block {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
  text-decoration: none;
}

.primary-btn-block:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Search Page Styles
   ========================================================================== */
.search-header-box {
  margin-bottom: 1.5rem;
}

.search-bar-unified {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1rem 0;
}

.search-input-inner {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-lens-icon {
  position: absolute;
  left: 14px;
  color: var(--fg-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-field {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--fg);
  background: var(--bg-card);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.8rem 2.5rem 0.8rem 42px;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.search-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  color: var(--fg-subtle);
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 4px;
}

.search-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 30%, transparent);
}

.search-submit-btn:active {
  transform: scale(0.96);
}

/* Quick Filter Chips */
.quick-tags-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.quick-tags-scroll::-webkit-scrollbar {
  display: none;
}

.quick-tags-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-chip {
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.tag-chip:active, .tag-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Results Meta Row */
.results-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-count-pill {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.results-page-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-subtle);
}

/* Pager */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--fg);
  transition: all 0.15s ease;
}

.page-nav-btn:active {
  transform: scale(0.96);
}

.page-nav-info {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg-muted);
}

/* Search Landing Info */
.search-hint-card {
  margin-top: 1rem;
}

.hint-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.hint-icon {
  color: var(--accent);
}

.hint-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.hint-bullet-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Admin Moderation Dashboard Styles
   ========================================================================== */
.admin-section {
  margin-bottom: 2rem;
}

.queue-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-card {
  padding: 1.25rem;
}

.sub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.sub-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-id-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--fg-subtle);
}

.sub-target-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg);
}

.sub-date {
  font-size: 0.74rem;
  color: var(--fg-subtle);
  white-space: nowrap;
}

.sub-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sub-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.sub-file-info, .sub-link-info {
  font-size: 0.88rem;
  color: var(--fg);
  word-break: break-word;
}

.sub-note-box {
  font-size: 0.84rem;
  color: var(--fg-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
}

.sub-preview-zone {
  margin: 0.5rem 0;
}

.sub-shot-preview {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.sub-actions-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.action-inline-form {
  display: inline-flex;
}

.reject-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.reject-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
}

.btn-approve {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

.btn-reject {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 40%, transparent);
}

/* ==========================================================================
   Telegram Auth & Centered States
   ========================================================================== */
.auth-center-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - var(--topbar-height));
}

.auth-card {
  max-width: 440px;
  text-align: center;
  padding: 2.2rem 1.6rem;
}

.auth-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.auth-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

/* Action Footer Box */
.action-footer-box {
  margin-top: 1.5rem;
  text-align: center;
}

/* Empty States */
.empty-state-card {
  text-align: center;
  padding: 2.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--fg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.empty-desc {
  font-size: 0.86rem;
  color: var(--fg-muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.45;
}

/* Upload Bottom Button */
.upload-footer-bar {
  margin-top: 2rem;
  text-align: center;
}

.upload-btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.96rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.15s ease;
}

.upload-btn-large:active {
  transform: scale(0.98);
}

/* Alert Boxes */
.alert-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.alert-error { background: var(--rose-soft); color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 25%, transparent); }
.alert-success { background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-info { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }

/* Responsive adjustments */
@media (min-width: 600px) {
  .folder-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   ACADEMIC STUDY TREE & STUDENT TERM PLANNER STYLES
   ========================================================================== */

/* Touch & tap responsiveness for native mobile feel */
button, a, .folder-row-card, .course-tree-card, .filter-tab, .tree-filter-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active, .action-btn:active, .btn-action-focus:active, .btn-action-done:active {
  transform: scale(0.96);
  transition: transform 0.08s ease;
}

/* Department Color Chips & Badges */
.dept-dme, .dept-chip.dept-dme { color: #2dd4bf; background: rgba(45, 212, 191, 0.12); border-color: rgba(45, 212, 191, 0.3); }
.dept-met, .dept-chip.dept-met { color: #c084fc; background: rgba(192, 132, 252, 0.12); border-color: rgba(192, 132, 252, 0.3); }
.dept-ece, .dept-chip.dept-ece { color: #60a5fa; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
.dept-epe, .dept-chip.dept-epe { color: #fb923c; background: rgba(251, 146, 60, 0.12); border-color: rgba(251, 146, 60, 0.3); }
.dept-mpe, .dept-chip.dept-mpe { color: #fb7185; background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.3); }
.dept-cse, .dept-chip.dept-cse { color: #818cf8; background: rgba(129, 140, 248, 0.12); border-color: rgba(129, 140, 248, 0.3); }
.dept-bas, .dept-chip.dept-bas { color: #34d399; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.dept-hum, .dept-chip.dept-hum { color: #94a3b8; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.3); }

/* Tree Hero Card */
.tree-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.tree-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hero-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--fg-muted);
  font-size: 13px;
  text-decoration: none;
}
.hero-ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--fg);
}
.tree-hero-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--fg);
}
.tree-hero-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0 0 18px 0;
}

/* Student Stats Strip */
.student-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: var(--radius);
}
.stat-icon {
  font-size: 20px;
}
.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}
.stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-focus { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.08); }
.stat-focus .stat-num { color: #38bdf8; }
.stat-done { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.08); }
.stat-done .stat-num { color: #22c55e; }

/* Department Legend Bar */
.dept-legend-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.dept-legend-bar::-webkit-scrollbar { display: none; }
.legend-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-subtle);
  white-space: nowrap;
}
.legend-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.dept-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid;
  white-space: nowrap;
}

/* Fast Filter Pills */
.tree-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.tree-filter-bar::-webkit-scrollbar { display: none; }
.tree-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tree-filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--fg);
}
.tree-filter-btn.on {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.tree-filter-btn.btn-filter-focus.on {
  background: #38bdf8;
  color: #0f172a;
}
.tree-filter-btn.btn-filter-done.on {
  background: #22c55e;
  color: #ffffff;
}

/* Tree Canvas Sections */
.level-section-block {
  margin-bottom: 30px;
}
.level-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.level-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.level-badge-pill {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.level-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}
.level-count-badge {
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Semester Columns */
.semester-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.semester-column-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.semester-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.semester-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.semester-sub {
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Course Tree Cards */
.course-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.course-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.course-tree-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
}

/* Dynamic Focus & Done Card Highlight */
.course-tree-card.is-focus {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}
.course-tree-card.is-done {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.06) !important;
}

.ct-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ct-dept-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
}
.ct-code-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  font-family: monospace;
}
.ct-status-indicator {
  margin-left: auto;
}
.status-chip-focus {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}
.status-chip-done {
  font-size: 10px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}
.status-chip-focus.hidden, .status-chip-done.hidden, .btn-action-reset.hidden {
  display: none !important;
}

.ct-title-area {
  margin-bottom: 10px;
}
.ct-title-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.35;
  display: block;
  margin-bottom: 6px;
}
.ct-title-link:hover {
  color: var(--accent);
}
.ct-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--fg-muted);
}
.ct-credits {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
.ct-prereq {
  color: var(--warn);
}
.ct-files-count {
  color: var(--accent);
  font-weight: 600;
}

/* 1-Click Action Buttons */
.ct-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.btn-action-focus, .btn-action-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn-action-focus:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}
.btn-action-focus.active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
  font-weight: 700;
}

.btn-action-done:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}
.btn-action-done.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
  font-weight: 700;
}

.btn-action-reset {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-subtle);
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
}
.btn-action-reset:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: #f43f5e;
  color: #f43f5e;
}

.btn-action-files {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  text-decoration: none;
}
.btn-action-files:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Home Page Focus Banner */
.focus-notice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(30, 41, 59, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.12);
}
.focus-notice-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.focus-badge-icon {
  font-size: 20px;
}
.focus-notice-text {
  display: flex;
  flex-direction: column;
}
.focus-notice-text strong {
  font-size: 14px;
  color: #38bdf8;
}
.focus-notice-text span {
  font-size: 12px;
  color: var(--fg-muted);
}
.focus-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #38bdf8;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.tree-banner-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 24px;
}
.tb-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tb-icon {
  font-size: 28px;
}
.tb-text h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: var(--fg);
}
.tb-text p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-muted);
}
.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tb-btn:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

.hero-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.hero-tree-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
}
.hero-tree-link-pill:hover {
  background: #38bdf8;
  color: #0f172a;
}

/* Tree Switcher Pills */
.tree-switcher-pills {
  display: flex;
  gap: 10px;
  margin: 14px 0 16px 0;
  flex-wrap: wrap;
}
.ts-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}
.ts-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
}
.ts-pill.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

/* Modal Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.hidden {
  display: none !important;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.18s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 75vh;
  overflow-y: auto;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}
.form-group input, .form-group select, .field-input, .field-select {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus, .field-input:focus {
  border-color: var(--accent);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-submit {
  background: var(--accent);
  border: none;
  color: var(--accent-fg);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-action-edit-admin {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 12px;
}
.btn-action-edit-admin:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Topbar & Header Action Fixes */
.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  z-index: 1002 !important;
  position: relative !important;
  pointer-events: auto !important;
}
.icon-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg-subtle) !important;
  color: var(--fg-muted) !important;
  border: 1px solid var(--line) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  pointer-events: auto !important;
}
.icon-btn:hover {
  background: var(--bg-card-hover) !important;
  color: var(--fg) !important;
  border-color: var(--line-strong) !important;
}
.icon-btn.active {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
.icon-btn.admin-badge {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
.icon-btn.admin-badge:hover, .icon-btn.admin-badge.active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.section-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}
.section-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* ==========================================================================
   Activity Log Table & Moderator Tools
   ========================================================================== */
.activity-log-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  margin-top: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.activity-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111827;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line-strong);
}

.activity-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  vertical-align: middle;
}

.activity-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.file-name-line {
  font-weight: 600;
  color: #f1f5f9;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.75rem;
}

.log-note-chip {
  color: var(--muted);
  font-style: italic;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-link-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.course-link-chip:hover .code-pill {
  border-color: var(--accent);
  color: var(--accent);
}

.course-mini-title {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
}

.user-handle {
  color: var(--accent);
  font-size: 0.75rem;
  font-family: monospace;
}

.user-role-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.log-tg-id {
  font-size: 0.72rem;
  color: var(--muted);
}

.log-cell-time {
  white-space: nowrap;
}

.log-date {
  font-weight: 600;
  color: var(--fg);
  display: block;
}

.log-time {
  font-size: 0.72rem;
  color: var(--muted);
}

.action-btn-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-open-small, .btn-download-small, .btn-rename-small {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--fg);
  transition: all 0.15s ease;
}

.btn-open-small:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-download-small:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: #22c55e;
}

.btn-rename-small:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.search-input-mini {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line-strong);
  color: #fff;
}

/* Prerequisite glowing highlight & chip in tree view */
.ct-prereq-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--muted);
}

.ct-prereq-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ct-prereq-chip:hover {
  background: #38bdf8;
  color: #0f172a;
}

.prereq-glow {
  animation: prereqPulse 1s ease-in-out infinite alternate !important;
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6) !important;
  transform: scale(1.02);
}

@keyframes prereqPulse {
  0% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
  100% { box-shadow: 0 0 25px rgba(56, 189, 248, 0.9); }
}

.semester-credits-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
/* ==========================================================================
   UI Visual Design & Organization Enhancements
   ========================================================================== */

/* Department Color Palette System */
:root {
  --dept-dme: #10b981;
  --dept-dme-bg: rgba(16, 185, 129, 0.14);
  --dept-met: #0ea5e9;
  --dept-met-bg: rgba(14, 165, 233, 0.14);
  --dept-ece: #f59e0b;
  --dept-ece-bg: rgba(245, 158, 11, 0.14);
  --dept-epe: #a855f7;
  --dept-epe-bg: rgba(168, 85, 247, 0.14);
  --dept-mpe: #f97316;
  --dept-mpe-bg: rgba(249, 115, 22, 0.14);
  --dept-bas: #f43f5e;
  --dept-bas-bg: rgba(244, 63, 94, 0.14);
  --dept-hum: #14b8a6;
  --dept-hum-bg: rgba(20, 184, 166, 0.14);
  --dept-cse: #06b6d4;
  --dept-cse-bg: rgba(6, 182, 212, 0.14);
}

/* Department Icon Badges */
.dept-icon-dme { background: var(--dept-dme-bg) !important; color: var(--dept-dme) !important; }
.dept-icon-met { background: var(--dept-met-bg) !important; color: var(--dept-met) !important; }
.dept-icon-ece { background: var(--dept-ece-bg) !important; color: var(--dept-ece) !important; }
.dept-icon-epe { background: var(--dept-epe-bg) !important; color: var(--dept-epe) !important; }
.dept-icon-mpe { background: var(--dept-mpe-bg) !important; color: var(--dept-mpe) !important; }
.dept-icon-bas { background: var(--dept-bas-bg) !important; color: var(--dept-bas) !important; }
.dept-icon-hum { background: var(--dept-hum-bg) !important; color: var(--dept-hum) !important; }
.dept-icon-cse { background: var(--dept-cse-bg) !important; color: var(--dept-cse) !important; }

/* Department Accent Borders on Cards */
.folder-row-card.dept-accent-dme { border-left: 3.5px solid var(--dept-dme); }
.folder-row-card.dept-accent-met { border-left: 3.5px solid var(--dept-met); }
.folder-row-card.dept-accent-ece { border-left: 3.5px solid var(--dept-ece); }
.folder-row-card.dept-accent-epe { border-left: 3.5px solid var(--dept-epe); }
.folder-row-card.dept-accent-mpe { border-left: 3.5px solid var(--dept-mpe); }
.folder-row-card.dept-accent-bas { border-left: 3.5px solid var(--dept-bas); }
.folder-row-card.dept-accent-hum { border-left: 3.5px solid var(--dept-hum); }
.folder-row-card.dept-accent-cse { border-left: 3.5px solid var(--dept-cse); }

/* Folder Card Micro-Interactions & Styling */
.folder-row-card {
  position: relative;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.folder-row-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  border-color: var(--line-strong);
}

.folder-row-card:active {
  transform: scale(0.985);
}

/* Category Filter Tabs Bar */
.filter-tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-tab-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.filter-tab.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

/* Material Card Refinements */
.material-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.15rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.material-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Distinct Kind Badges on Material Cards */
.badge-kind-lecture {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.badge-kind-worksheet {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

.badge-kind-solution {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.badge-kind-summary {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
}

.badge-kind-section {
  background: rgba(20, 184, 166, 0.15) !important;
  color: #2dd4bf !important;
  border: 1px solid rgba(45, 212, 191, 0.3) !important;
}

.badge-kind-photo {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.3) !important;
}

.badge-kind-voice {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #fb923c !important;
  border: 1px solid rgba(251, 146, 60, 0.3) !important;
}

/* Action Buttons inside Material Cards */
.mat-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-preview {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-preview:hover {
  background: #38bdf8;
  color: #0f172a;
}

.btn-open {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  border-color: var(--line);
}

.btn-open:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line-strong);
}

.btn-download {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.btn-download:hover {
  background: #22c55e;
  color: #0f172a;
}

.btn-admin-rename {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-admin-rename:hover {
  background: #f59e0b;
  color: #0f172a;
}

/* Home Search Box */
.home-search-bar {
  margin: 1rem 0 1.25rem 0;
}

.home-search-bar .search-input-inner {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-search-bar .search-input-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.home-search-bar .search-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 0.88rem;
  padding: 8px 10px;
}

.home-search-bar .search-field::placeholder {
  color: var(--muted);
}

/* Bottom Navigation High-Contrast Touch Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  min-width: 54px;
}

.nav-item .nav-icon {
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.nav-item:hover {
  color: var(--fg);
}

.nav-item.active {
  color: #38bdf8;
}

.nav-item.active .nav-icon {
  transform: translateY(-1px);
}

/* Modal Backdrops & Cards */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #1e293b;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #fff;
}


.badge-kind-exam {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.3) !important;
}

.badge-kind-textbook {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
}


/* ==========================================================================
   Horus University (HUE) Design System Enhancements
   ========================================================================== */

/* Topbar Styling */
.app-topbar {
  background: rgba(10, 20, 38, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.22) !important;
}

.brand-title {
  color: #fbbf24 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  color: #94a3b8 !important;
  font-size: 0.76rem !important;
}

.brand-logo {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2) !important;
  border-radius: 10px !important;
}

/* Bottom Navigation Bar with Gold Active Glow */
.bottom-nav {
  background: rgba(8, 16, 32, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.bottom-nav .nav-item.active {
  color: #fbbf24 !important;
}

.bottom-nav .nav-item.active .nav-icon {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
  border-radius: 12px !important;
  transform: translateY(-2px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Student Profile Card (Screen 02) */
.student-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.student-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
}

.student-text-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--fg);
}

.student-text-dept {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.theme-toggle-switch {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line-strong);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  justify-content: space-between;
}

/* HUE Golden "My Term Focus" Banner (Screen 02) */
.hue-gold-banner {
  background: linear-gradient(135deg, #b45309 0%, #78350f 50%, #451a03 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.35) !important;
  border-radius: var(--radius-lg) !important;
  padding: 16px 18px !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}

.hue-gold-banner::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: 0.6;
}

.hue-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hue-banner-title {
  color: #fff !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hue-banner-subtitle {
  color: #fef08a !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  margin-top: 2px;
}

.hue-banner-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f59e0b;
  color: #451a03 !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.hue-banner-edit-btn:active {
  transform: scale(0.96);
}

/* 4-Stat Metric Pill Row (Screen 02) */
.hue-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.hue-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.hue-stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fbbf24;
}

.hue-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Course Card Upgrades (Screen 02) */
.folder-row-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.folder-row-card:hover, .folder-row-card:active {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

.status-pill-in-progress {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

/* Category Chips on Course Cards (Screen 02 exact colors) */
.tag-chip.tag-lec {
  background: rgba(14, 165, 233, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.tag-chip.tag-sheet {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

.tag-chip.tag-exam {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.tag-chip.tag-audio {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
}

.tag-chip.tag-photo {
  background: rgba(244, 63, 94, 0.16) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.3) !important;
}

/* Tree Page Golden Controls (Screen 03) */
.tree-switch-gold {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
}

.tree-switch-btn.active {
  background: var(--hue-gold-gradient) !important;
  color: #451a03 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

/* Semester Credits Progress Bar (Screen 03) */
.credits-progress-wrap {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
}

.credits-progress-bar-bg {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 8px;
  overflow: hidden;
}

.credits-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--hue-gold-gradient);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}


/* =====================================================================
   HUE Card & Category Chips Layout (Screen 02 Polish)
   ===================================================================== */
.folder-row-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin-bottom: 10px !important;
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.folder-row-card:hover, .folder-row-card:active {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.folder-left-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.folder-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.folder-meta-top {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 4px !important;
  flex-wrap: wrap !important;
}

.folder-name {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  margin: 2px 0 6px 0 !important;
  color: var(--text-main) !important;
  letter-spacing: -0.2px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.folder-tags-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px 6px !important;
  margin-top: 6px !important;
  width: 100% !important;
}

.tag-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  padding: 3.5px 7.5px !important;
  border-radius: 999px !important;
  letter-spacing: 0.03em !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.tag-chip.tag-lec {
  background: rgba(14, 165, 233, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.tag-chip.tag-sheet {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

.tag-chip.tag-exam {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

.tag-chip.tag-audio {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
}

.tag-chip.tag-photo {
  background: rgba(244, 63, 94, 0.16) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.35) !important;
}

.tag-chip.tag-empty {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #64748b !important;
  border: 1px dashed rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
}

.folder-arrow {
  flex-shrink: 0 !important;
  margin-left: 4px !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.status-pill-in-progress {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2.5px 8px !important;
  border-radius: 999px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* =====================================================================
   HORUS UNIVERSITY (HUE) UI/UX VISUAL POLISH SUITE
   ===================================================================== */

/* 1. Global Touch Targets, Smooth Transitions & Safe Area Insets */
:root {
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)) !important;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  background: rgba(7, 13, 26, 0.96) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-top: 1px solid rgba(245, 158, 11, 0.22) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  z-index: 999 !important;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45) !important;
}

html[data-scheme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
}

.bottom-nav .nav-item {
  flex: 1 !important;
  min-height: 48px !important;
  min-width: 48px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 6px 0 !important;
  text-decoration: none !important;
  color: var(--fg-subtle) !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.bottom-nav .nav-item .nav-icon {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.bottom-nav .nav-item .nav-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  transition: color 0.2s var(--ease-smooth) !important;
}

.bottom-nav .nav-item.active {
  color: #fbbf24 !important;
}

html[data-scheme="light"] .bottom-nav .nav-item.active {
  color: #d97706 !important;
}

.bottom-nav .nav-item.active .nav-icon {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
  border-radius: 12px !important;
  transform: translateY(-2px) !important;
}

/* Page Wrap with Safe Area Padding */
.page-wrap {
  padding-top: calc(var(--topbar-height) + env(safe-area-inset-top, 0px) + 16px) !important;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 36px) !important;
  padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
}

.app-topbar {
  height: calc(var(--topbar-height) + env(safe-area-inset-top, 0px)) !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
}

/* Header icon buttons touch targets */
.icon-btn {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.icon-btn:active, .icon-btn:hover {
  transform: translateY(-1px);
}

/* 2. Category Chips & Badges Exact Horus Palette */
/* Lecture: Sky Blue #38bdf8 */
.tag-chip.tag-lec,
.mat-icon-badge.badge-kind-lecture,
.mini-pill.pill-lec,
.mini-pill.pill-lecture {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

/* Sheet: Emerald #34d399 */
.tag-chip.tag-sheet,
.mat-icon-badge.badge-kind-worksheet,
.mat-icon-badge.badge-kind-solution,
.mini-pill.pill-worksheet,
.mini-pill.pill-solution {
  background: rgba(52, 211, 153, 0.16) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

/* Exam: Imperial Gold #fbbf24 */
.tag-chip.tag-exam,
.mat-icon-badge.badge-kind-exam,
.mat-icon-badge.badge-kind-summary,
.mini-pill.pill-exam,
.mini-pill.pill-summary {
  background: rgba(251, 191, 36, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

/* Audio: Purple #c084fc */
.tag-chip.tag-audio,
.mat-icon-badge.badge-voice,
.mini-pill.pill-voice,
.mini-pill.pill-audio {
  background: rgba(192, 132, 252, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
}

/* Photo: Rose #fb7185 */
.tag-chip.tag-photo,
.mat-icon-badge.badge-photo,
.mini-pill.pill-photo {
  background: rgba(251, 113, 133, 0.16) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.35) !important;
}

/* Category Filter Tabs with >= 44px Touch Targets */
.filter-tab {
  min-height: 44px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 999px !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.filter-tab:hover {
  background: var(--bg-card-hover) !important;
  color: var(--fg) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.filter-tab.on {
  background: var(--hue-gold-gradient) !important;
  color: #070d1a !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 3px 14px rgba(245, 158, 11, 0.38) !important;
  font-weight: 800 !important;
  transform: translateY(-1px);
}

/* Tree Filter Chips with >= 44px Touch Targets */
.tree-filter-btn {
  min-height: 44px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.tree-filter-btn:hover {
  background: var(--bg-card-hover) !important;
  color: var(--fg) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.tree-filter-btn.on {
  background: var(--hue-gold-gradient) !important;
  color: #070d1a !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 3px 14px rgba(245, 158, 11, 0.38) !important;
  font-weight: 800 !important;
  transform: translateY(-1px);
}

.tree-filter-btn.btn-filter-focus.on {
  background: #38bdf8 !important;
  color: #070d1a !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 3px 14px rgba(56, 189, 248, 0.4) !important;
}

.tree-filter-btn.btn-filter-done.on {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.4) !important;
}

/* Quick Search Tags */
.quick-tags-scroll .tag-chip {
  min-height: 40px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.quick-tags-scroll .tag-chip.tag-active,
.quick-tags-scroll .tag-chip:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
}

/* 3. Action Buttons Touch Targets & Visual Polish */
.action-btn,
.btn-preview,
.btn-download,
.btn-open,
.btn-admin-rename,
.btn-approve,
.btn-reject {
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.action-btn:active,
.btn-preview:active,
.btn-download:active,
.btn-open:active {
  transform: scale(0.97);
}

.btn-preview {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.btn-preview:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.28) !important;
}

.btn-download {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

.btn-download:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.28) !important;
}

.btn-open {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
  border: 1px solid var(--line) !important;
}

.btn-open:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

/* Primary blocks (submit, retry, etc.) */
.primary-btn-block {
  min-height: 48px !important;
  padding: 0 20px !important;
  border-radius: 14px !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  background: var(--hue-gold-gradient) !important;
  color: #070d1a !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.primary-btn-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.48) !important;
}

/* Search input & button */
.search-bar-unified {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.search-input-inner {
  flex: 1;
  display: flex;
  align-items: center;
  background: #0e1a31;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  transition: all 0.2s var(--ease-smooth);
}

.search-input-inner:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.search-field {
  min-height: 44px !important;
  background: transparent !important;
  border: none !important;
  color: var(--fg) !important;
  font-size: 0.92rem !important;
  outline: none !important;
  width: 100% !important;
}

.search-submit-btn {
  min-height: 44px !important;
  padding: 0 20px !important;
  border-radius: 14px !important;
  background: var(--hue-gold-gradient) !important;
  color: #070d1a !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.search-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

/* PDF Viewer Controls Touch Targets */
.pdf-jump-btn {
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  background: #0e1a31 !important;
  border: 1px solid var(--line) !important;
  color: #f8fafc !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.pdf-jump-btn:active, .pdf-jump-btn:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

.pdf-close-pill {
  min-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: rgba(244, 63, 94, 0.16) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.35) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.pdf-close-pill:hover {
  background: rgba(244, 63, 94, 0.26) !important;
}

/* 4. Modals - Backdrop Blur & Imperial Gold Accents */
.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(4, 8, 18, 0.84) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
  transition: opacity 0.25s var(--ease-smooth) !important;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: 100% !important;
  max-width: 520px !important;
  background: #0e1a31 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15) !important;
  padding: 1.6rem !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  animation: modalScaleIn 0.25s var(--ease-smooth) !important;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.85rem !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18) !important;
}

.modal-header h3, .modal-title {
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

.modal-close, .modal-close-btn {
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--line) !important;
  border-radius: 50% !important;
  color: var(--fg-muted) !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.modal-close:hover, .modal-close-btn:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.modal-card input[type="text"],
.modal-card input[type="number"],
.modal-card select,
.modal-card textarea {
  width: 100% !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: #070d1a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  font-size: 0.95rem !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.modal-card input:focus,
.modal-card select:focus,
.modal-card textarea:focus {
  outline: none !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35) !important;
}

.modal-actions, .modal-actions-row {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 1.5rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid rgba(245, 158, 11, 0.12) !important;
}

.modal-card .btn-cancel, .modal-card .btn-ghost {
  min-height: 44px !important;
  padding: 0 20px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--line) !important;
  color: var(--fg-muted) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.modal-card .btn-cancel:hover, .modal-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.modal-card .btn-submit, .modal-card .btn-primary-submit {
  min-height: 44px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  color: #070d1a !important;
  font-weight: 850 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.38) !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.modal-card .btn-submit:hover, .modal-card .btn-primary-submit:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5) !important;
}

/* 5. Stylish Empty State Cards */
.empty-state-card {
  background: #0e1a31 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  border-radius: 20px !important;
  padding: 2.2rem 1.6rem !important;
  text-align: center !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35) !important;
  margin: 1.5rem 0 !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

html[data-scheme="light"] .empty-state-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

.empty-icon-box {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 1.25rem auto !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2) !important;
}

.empty-title {
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  margin-bottom: 0.5rem !important;
  letter-spacing: -0.2px !important;
}

html[data-scheme="light"] .empty-title {
  color: #0f172a !important;
}

.empty-desc {
  font-size: 0.92rem !important;
  color: #94a3b8 !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  line-height: 1.55 !important;
}

html[data-scheme="light"] .empty-desc {
  color: #64748b !important;
}

/* Subtle Active Card Glow */
.folder-row-card {
  border-radius: 16px !important;
  margin-bottom: 12px !important;
  transition: transform 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth) !important;
}

.folder-row-card:hover, .folder-row-card:active {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.22) !important;
  transform: translateY(-1px) !important;
}

/* Material Stack Card Refinements */
.material-card {
  background: #0e1a31 !important;
  border: 1px solid rgba(245, 158, 11, 0.16) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  transition: border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth) !important;
}

.material-card:hover {
  border-color: rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

/* Plan Action Buttons in Tree View */
.btn-action-focus, .btn-action-done, .btn-action-reset {
  min-height: 38px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-smooth) !important;
}

.btn-action-focus.active {
  background: #38bdf8 !important;
  color: #070d1a !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.btn-action-done.active {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}



/* Responsive Topbar Branding Fix (Prevent HUE truncation) */
.app-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 12px !important;
  gap: 8px !important;
}

.topbar-left {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.brand-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  text-decoration: none !important;
}

.brand-logo {
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
}

.brand-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.brand-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.brand-subtitle {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

.topbar-right .icon-btn,
.topbar-right .theme-toggle-switch-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ==========================================================================
   PERFECT MOBILE PILL & BRAND HEADER ENHANCEMENTS (NO-WRAP & SPECIFICITY FIX)
   ========================================================================== */
.app-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 12px !important;
  min-height: 54px !important;
  gap: 8px !important;
}

.topbar-left {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.brand-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  min-width: 0 !important;
}

.brand-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.brand-title {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
}

.brand-subtitle {
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.topbar-right .icon-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border-radius: 10px !important;
}

/* Strictly enforce non-breaking for ALL badges and tags */
.tag-chip,
.mini-pill,
.code-pill,
.count-pill,
.dept-chip,
.status-pill-in-progress,
.badge-counter {
  white-space: nowrap !important;
  word-break: keep-all !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.folder-tags-row,
.folder-pill-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px 6px !important;
  margin-top: 6px !important;
  width: 100% !important;
}

/* Category colors with maximum specificity override */
html[data-scheme][lang] body .tag-chip.tag-lec,
html[data-scheme][lang] body .mini-pill.pill-lec,
.tag-chip.tag-lec {
  background: rgba(14, 165, 233, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

html[data-scheme][lang] body .tag-chip.tag-sheet,
html[data-scheme][lang] body .mini-pill.pill-sheet,
.tag-chip.tag-sheet {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

html[data-scheme][lang] body .tag-chip.tag-exam,
html[data-scheme][lang] body .mini-pill.pill-exam,
.tag-chip.tag-exam {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

html[data-scheme][lang] body .tag-chip.tag-audio,
html[data-scheme][lang] body .mini-pill.pill-audio,
.tag-chip.tag-audio {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
}

html[data-scheme][lang] body .tag-chip.tag-photo,
html[data-scheme][lang] body .mini-pill.pill-photo,
.tag-chip.tag-photo {
  background: rgba(244, 63, 94, 0.16) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.35) !important;
}

html[data-scheme][lang] body .tag-chip.tag-empty,
.tag-chip.tag-empty {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #64748b !important;
  border: 1px dashed rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   HORUS UNIVERSITY UNIFIED COMPONENT SUITE (PERFECT CSS SYSTEM)
   ========================================================================== */

/* Universal Layout & Safe Areas */
body {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  overflow-x: hidden !important;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.page-wrap,
.browse-page-wrap,
.search-page-wrap,
.submit-page-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 16px;
  box-sizing: border-box;
}

/* Page Intro Headers */
.page-intro-header {
  margin-bottom: 1.25rem;
}

.page-eyebrow,
.eyebrow {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--hue-gold, #fbbf24) !important;
  margin-bottom: 4px !important;
}

.page-title {
  font-size: 1.65rem !important;
  font-weight: 850 !important;
  color: var(--fg) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  margin: 0 0 6px 0 !important;
}

.page-desc {
  font-size: 0.88rem !important;
  color: var(--fg-muted) !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

/* Back Link Button */
.rc-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  color: var(--fg-muted) !important;
  text-decoration: none !important;
  margin-bottom: 14px !important;
  padding: 6px 12px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  transition: all 0.15s ease !important;
  min-height: 38px !important;
}

.rc-back:hover, .rc-back:active {
  color: var(--hue-gold, #fbbf24) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

/* Stat Lines & Tabs */
.rc-statline {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  font-size: 0.82rem !important;
  color: var(--fg-muted) !important;
  margin-bottom: 14px !important;
}

.rc-statline span b {
  color: var(--fg) !important;
}

.rc-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
  margin-bottom: 16px !important;
  -webkit-overflow-scrolling: touch;
}

.rc-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  background: var(--bg-card) !important;
  color: var(--fg-muted) !important;
  border: 1px solid var(--line) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  min-height: 42px !important;
  transition: all 0.15s ease !important;
}

.rc-tab.on, .rc-tab.active {
  background: var(--hue-gold-gradient, linear-gradient(135deg, #fbbf24 0%, #d97706 100%)) !important;
  color: #451a03 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3) !important;
}

.rc-tab-count {
  font-size: 0.72rem !important;
  padding: 2px 6px !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.rc-tab-pane {
  display: none !important;
}

.rc-tab-pane.on, .rc-tab-pane.active {
  display: block !important;
}

/* ==========================================================================
   MATERIAL CARD & RC-FILE COMPONENT (COURSE PAGE)
   ========================================================================== */
.materials-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.material-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius, 14px) !important;
  padding: 12px 14px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.material-card:hover {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.rc-file {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
}

@media (max-width: 580px) {
  .rc-file {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px 12px !important;
  }
  .rc-file-actions {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin-top: 4px !important;
  }
}

.rc-file-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  color: var(--hue-gold, #fbbf24) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}

/* Specific icon colors by type */
.mat-type-pdf .rc-file-icon {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.mat-type-photo .rc-file-icon {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
  border-color: rgba(251, 113, 133, 0.3) !important;
}

.mat-type-voice .rc-file-icon {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.3) !important;
}

.rc-file-text {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.rc-file-kind {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--hue-gold, #fbbf24) !important;
}

.mat-type-pdf .rc-file-kind { color: #38bdf8 !important; }
.mat-type-photo .rc-file-kind { color: #fb7185 !important; }
.mat-type-voice .rc-file-kind { color: #c084fc !important; }

.rc-file-name {
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  color: var(--fg) !important;
  text-decoration: none !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  transition: color 0.15s ease !important;
}

.rc-file-name:hover, .rc-file-name:active {
  color: var(--hue-gold, #fbbf24) !important;
}

.rc-file-meta {
  font-size: 0.78rem !important;
  color: var(--fg-muted) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.rc-file-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.rc-fbtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 0.82rem !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  color: var(--hue-gold, #fbbf24) !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.rc-fbtn.ghost {
  background: var(--bg-subtle, rgba(255, 255, 255, 0.05)) !important;
  border-color: var(--line) !important;
  color: var(--fg-muted) !important;
}

.rc-fbtn:hover, .rc-fbtn:active {
  background: var(--hue-gold-gradient, linear-gradient(135deg, #fbbf24 0%, #d97706 100%)) !important;
  color: #451a03 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35) !important;
}

/* PDF Preview Embedded Container */
.pdfbox {
  margin-top: 10px !important;
  background: var(--bg-subtle) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.pdfbox[hidden], .pdfbox.hidden {
  display: none !important;
}

/* ==========================================================================
   CURRICULUM TREE PAGE (.tree-canvas & .course-tree-card)
   ========================================================================== */
.tree-canvas {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.level-section-block {
  margin-bottom: 8px !important;
}

.rc-level {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius, 14px) !important;
  overflow: hidden !important;
}

.rc-level summary {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  cursor: pointer !important;
  user-select: none !important;
  font-weight: 700 !important;
  background: rgba(245, 158, 11, 0.04) !important;
  border-bottom: 1px solid transparent !important;
}

.rc-level[open] summary {
  border-bottom-color: var(--line) !important;
}

.rc-level-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
}

.rc-level-title b {
  font-size: 1rem !important;
  color: var(--fg) !important;
}

.rc-level-title small {
  font-size: 0.76rem !important;
  color: var(--fg-muted) !important;
}

.rc-terms {
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.course-tree-card {
  background: var(--bg-subtle, rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  transition: all 0.15s ease !important;
}

.course-tree-card:hover {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.course-tree-card.is-focus {
  border-color: var(--hue-gold, #fbbf24) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.course-tree-card.is-done {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.06) !important;
}

.tree-filter-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  background: var(--bg-card) !important;
  color: var(--fg-muted) !important;
  border: 1px solid var(--line) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}

.tree-filter-btn.on, .tree-filter-btn:active {
  background: var(--hue-gold-gradient, linear-gradient(135deg, #fbbf24 0%, #d97706 100%)) !important;
  color: #451a03 !important;
  border-color: #f59e0b !important;
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.modal-backdrop.hidden, .modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-lg, 18px) !important;
  padding: 24px !important;
  width: 100% !important;
  max-width: 500px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
  box-sizing: border-box !important;
}

/* Utility Hidden */
.hidden, [hidden] {
  display: none !important;
}

/* ==========================================================================
   GUARANTEED ZERO-OVERLAP GRID & EMOJI POLISH
   ========================================================================== */

/* Grid layout strictly isolates folder icon, text content, and arrow */
.folder-row-card {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 20px !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  margin-bottom: 12px !important;
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.folder-row-card:hover, .folder-row-card:active {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.22) !important;
  transform: translateY(-1px) !important;
}

.folder-left-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 1.35rem !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.folder-left-icon.dept-icon-dme {
  background: rgba(45, 212, 191, 0.14) !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}

.folder-left-icon.dept-icon-met {
  background: rgba(192, 132, 252, 0.14) !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
}

.folder-left-icon.dept-icon-ece {
  background: rgba(96, 165, 250, 0.14) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

.folder-left-icon.dept-icon-epe {
  background: rgba(251, 146, 60, 0.14) !important;
  border-color: rgba(251, 146, 60, 0.35) !important;
}

.folder-content {
  min-width: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
}

.folder-meta-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  margin-bottom: 2px !important;
  width: 100% !important;
}

.folder-meta-left {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.status-pill-in-progress {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  white-space: nowrap !important;
  margin-left: 0 !important;
  flex-shrink: 0 !important;
}

.folder-name {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  margin: 1px 0 5px 0 !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}

.folder-tags-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px 6px !important;
  width: 100% !important;
}

.tag-chip,
.mini-pill,
.code-pill,
.count-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0 !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  padding: 3.5px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
}

/* Stat Row Grid Anti-Overlap */
.hue-stats-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
}

@media (max-width: 400px) {
  .hue-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

.hue-stat-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 10px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  box-shadow: var(--shadow-sm) !important;
}

.hue-stat-icon {
  font-size: 1.15rem !important;
  margin-bottom: 3px !important;
  line-height: 1 !important;
}

.hue-stat-num {
  font-size: 1.15rem !important;
  font-weight: 850 !important;
  color: #fbbf24 !important;
  line-height: 1.2 !important;
}

.hue-stat-label {
  font-size: 0.7rem !important;
  font-weight: 650 !important;
  color: var(--fg-muted) !important;
  margin-top: 1px !important;
}

/* Bottom Nav Labels With Emojis */
.bottom-nav .nav-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  margin-top: 3px !important;
}


/* ==========================================================================
   EXTENDED ANTI-OVERLAP MEDIA QUERIES FOR ALL SCREENS
   ========================================================================== */

/* Tree Course Cards: Stack buttons under info on mobile so nothing ever collides */
@media (max-width: 600px) {
  .course-tree-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .ct-actions-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    border-top: 1px solid var(--line) !important;
    padding-top: 8px !important;
  }
  .ct-title-area {
    margin-bottom: 0 !important;
    width: 100% !important;
  }
}

/* Category Filter Tabs: Smooth swipe scrolling, no wrap overflow */
.filter-tab-bar, .quick-tags-scroll {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 8px !important;
  padding: 4px 2px 10px 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.filter-tab-bar::-webkit-scrollbar, .quick-tags-scroll::-webkit-scrollbar {
  display: none !important;
}

.filter-tab {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Back Link Clean Alignment */
.rc-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.88rem !important;
  font-weight: 650 !important;
  color: var(--hue-gold, #fbbf24) !important;
  text-decoration: none !important;
  margin-bottom: 14px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  width: fit-content !important;
  transition: all 0.15s ease !important;
}

.rc-back:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  transform: translateX(-2px) !important;
}

/* Material card download & preview button wrap protection */
.rc-file-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.rc-fbtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Settings Row Anti-Overlap */
.settings-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-row-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}


/* ==========================================================================
   SCREENSHOT-VERIFIED FIXES (TOPBAR CLEARANCE, HEADERS, SEARCH & TREE CHIPS)
   ========================================================================== */

/* 1. Generous Topbar & Nav Clearance - Never cut off headers */
:root {
  --topbar-height: 64px !important;
  --nav-height: 64px !important;
}

.page-wrap {
  padding-top: calc(76px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 32px) !important;
  box-sizing: border-box !important;
}

.submit-page-wrap,
.search-page-wrap,
.browse-page-wrap {
  padding-top: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 2. Page Intro Header: Clean vertical stack (Eyebrow -> Title -> Description) */
.page-intro-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  margin-bottom: 1.25rem !important;
  width: 100% !important;
}

.page-intro-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  width: 100% !important;
}

.page-eyebrow,
.eyebrow {
  display: block !important;
  margin-bottom: 2px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--hue-gold, #fbbf24) !important;
}

.page-title {
  display: block !important;
  font-size: 1.6rem !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  margin: 0 0 4px 0 !important;
  color: var(--fg, #f8fafc) !important;
}

.page-desc {
  display: block !important;
  font-size: 0.88rem !important;
  color: var(--fg-muted, #94a3b8) !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* 3. Search Bar: Clean non-overlapping lens icon + input + button */
.search-bar-unified {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 1rem 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.search-input-inner {
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  background: #0e1a31 !important;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12)) !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 46px !important;
  box-sizing: border-box !important;
}

.search-input-inner:focus-within {
  border-color: var(--hue-gold, #fbbf24) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
}

.search-lens-icon {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 10px !important;
  flex-shrink: 0 !important;
  color: var(--fg-muted, #94a3b8) !important;
}

.search-field {
  flex: 1 1 auto !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  padding: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  color: var(--fg, #f8fafc) !important;
  font-size: 0.95rem !important;
  box-sizing: border-box !important;
}

.search-submit-btn {
  flex-shrink: 0 !important;
  background: var(--hue-gold-gradient, linear-gradient(135deg, #fbbf24 0%, #d97706 100%)) !important;
  color: #070d1a !important;
  font-weight: 750 !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 0 20px !important;
  height: 46px !important;
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

/* 4. Tree Search Box (#treeSearchBox) */
.rf-searchbox {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #0e1a31 !important;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12)) !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  height: 46px !important;
  margin: 12px 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.rf-searchbox:focus-within {
  border-color: var(--hue-gold, #fbbf24) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
}

.rf-searchbox svg {
  flex-shrink: 0 !important;
  color: var(--fg-muted, #94a3b8) !important;
}

.rf-searchbox input {
  flex: 1 1 auto !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--fg, #f8fafc) !important;
  font-size: 0.92rem !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  width: 100% !important;
}

.rf-searchbox input::placeholder {
  color: var(--fg-muted, #94a3b8) !important;
  opacity: 0.75 !important;
}

/* 5. Tree Filter Chips: Sleek horizontal swipeable ribbon (no multi-line wrap mess) */
.rf-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 8px !important;
  padding: 4px 2px 14px 2px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.rf-chips::-webkit-scrollbar {
  display: none !important;
}

.rf-chips .tree-filter-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 0.8rem !important;
  border-radius: 999px !important;
}


/* ==========================================================================
   PROMINENT TREE ADMIN "ADD COURSE" BUTTON & GENERAL INLINE BTN POLISH
   ========================================================================== */

.tree-admin-action-bar {
  margin: 14px 0 18px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-tree-add-course {
  width: 100% !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%) !important;
  border: 1.5px dashed rgba(245, 158, 11, 0.5) !important;
  border-radius: 14px !important;
  color: var(--hue-gold, #fbbf24) !important;
  font-size: 0.94rem !important;
  font-weight: 750 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 12px rgba(245, 158, 11, 0.12) !important;
  padding: 0 18px !important;
  box-sizing: border-box !important;
}

.btn-tree-add-course:hover,
.btn-tree-add-course:active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.18) 100%) !important;
  border: 1.5px solid var(--hue-gold, #fbbf24) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3) !important;
  color: #fff !important;
}

.btn-tree-add-course svg {
  flex-shrink: 0 !important;
  color: var(--hue-gold, #fbbf24) !important;
  transition: transform 0.2s ease !important;
}

.btn-tree-add-course:hover svg {
  transform: scale(1.1) rotate(90deg) !important;
  color: #fff !important;
}

/* Polished .rc-inline-btn everywhere else (e.g. Edit Course Details) */
.rc-inline-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: var(--hue-gold, #fbbf24) !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.rc-inline-btn:hover,
.rc-inline-btn:active {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: var(--hue-gold, #fbbf24) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
  transform: translateY(-1px) !important;
}
