/* ==========================================================
   QUẢN TRỊ DỰ ÁN ĐẦU TƯ — TRẠM ĐIỀU PHỐI NGHIÊN CỨU & SOẠN NỘI DUNG NHÓM 4
   Phong cách thiết kế: Cyber Academic Glassmorphism & Executive Research Desk
   Font: Plus Jakarta Sans | Theme: Obsidian Dark Space & Clean Slate Light
   ========================================================== */

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Brand Palette (Light) */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-glow: rgba(79, 70, 229, 0.25);
  
  --cyan: #06B6D4;
  --cyan-hover: #0891B2;
  --cyan-light: #ECFEFF;
  
  --emerald: #10B981;
  --emerald-hover: #059669;
  --emerald-light: #ECFDF5;
  
  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  
  --rose: #F43F5E;
  --rose-light: #FFF1F2;
  
  --purple: #8B5CF6;
  --purple-light: #F5F3FF;

  /* Surfaces & Backgrounds (Light) */
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  --bg-alt: #F1F5F9;
  --bg-subtle: #F8FAFC;
  --bg-input: #FFFFFF;
  
  /* Text Colors */
  --text-heading: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-on-primary: #FFFFFF;
  
  /* Borders */
  --border-subtle: #E2E8F0;
  --border-focus: #6366F1;
  --border-glass: rgba(226, 232, 240, 0.85);
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.1), 0 8px 12px -3px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================
   DARK THEME (Deep Obsidian Cyberpunk)
   ========================================================== */
body.dark-theme {
  --bg-page: #0B0F19;
  --bg-card: #111827;
  --bg-card-glass: rgba(17, 24, 39, 0.82);
  --bg-alt: #1F2937;
  --bg-subtle: #151D2E;
  --bg-input: #1A2333;
  
  --text-heading: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-focus: #818CF8;
  
  --primary-light: rgba(99, 102, 241, 0.16);
  --cyan-light: rgba(6, 182, 212, 0.16);
  --emerald-light: rgba(16, 185, 129, 0.16);
  --amber-light: rgba(245, 158, 11, 0.16);
  --rose-light: rgba(244, 63, 94, 0.16);
  --purple-light: rgba(139, 92, 246, 0.16);
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 20px 35px -5px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.3);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Canvas & Mesh */
.cyber-bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-mesh {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 45%);
  filter: blur(80px);
  opacity: 0.85;
}

#cyber-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  letter-spacing: -0.5px;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: 0.3px;
}

.brand-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-separator {
  opacity: 0.5;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-glass {
  background: var(--bg-alt);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
}
.btn-glass:hover {
  background: var(--bg-card);
  color: var(--text-heading);
  border-color: var(--border-focus);
}

.btn-vault {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
body.dark-theme .btn-vault {
  color: #22d3ee;
}
.btn-vault:hover {
  background: rgba(6, 182, 212, 0.22);
  transform: translateY(-1px);
}

.btn-law {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
body.dark-theme .btn-law {
  color: #34d399;
}
.btn-law:hover {
  background: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

/* Main Content Layout */
.main-content {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

/* Hero Showcase */
.hero-showcase {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 0.65rem;
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  max-width: 950px;
  margin-bottom: 1.35rem;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-alt);
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* Progress Tracker Bar */
.global-progress-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.35rem;
}

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

.progress-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.progress-stats {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.4s ease;
}

/* Filter & Control Section */
.filter-section {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.filter-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.3px;
}

.filter-inputs-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  min-width: 270px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.52rem 0.9rem 0.52rem 2.2rem;
  font-family: inherit;
  font-size: 0.84rem;
  color: var(--text-heading);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-smooth);
}
.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-select {
  padding: 0.52rem 1.8rem 0.52rem 0.85rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-heading);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.form-select:focus {
  border-color: var(--border-focus);
}

/* Member Filter Row */
.member-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.member-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  background: var(--bg-alt);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.member-pill-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-heading);
  transform: translateY(-1px);
}

.member-pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.member-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
}

/* View Mode Toolbar */
.view-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.view-nav-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card-glass);
  backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.view-btn:hover {
  color: var(--text-heading);
}

.view-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.results-count-badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================
   MISSION CARDS GRID (VIEW 1)
   ========================================================== */
.missions-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mission-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.mission-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.35);
}

/* Card Header */
.card-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.member-identity-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.member-avatar-lg {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.member-details {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.role-tag.badge-leader {
  background: rgba(79, 70, 229, 0.18);
  color: #818cf8;
  border: 1px solid rgba(79, 70, 229, 0.3);
}
.role-tag.badge-member {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.member-subinfo {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-scope-wrap {
  text-align: right;
}

.section-badge {
  display: inline-block;
  background: var(--cyan-light);
  color: #0891b2;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 0.3rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
body.dark-theme .section-badge {
  color: #22d3ee;
}

.teacher-slide-ref {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mission-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1.35rem;
  line-height: 1.4;
}

/* 4-Tier Operational Blocks */
.tiers-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.tier-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  position: relative;
}

.tier-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

/* Tier 1: Teacher Original */
.tier-teacher {
  border-left: 4px solid var(--amber);
}
.tier-teacher .tier-title {
  color: #d97706;
}
body.dark-theme .tier-teacher .tier-title {
  color: #fbbf24;
}

.teacher-points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.teacher-points-list li {
  font-size: 0.86rem;
  color: var(--text-body);
  position: relative;
  padding-left: 1.3rem;
}

.teacher-points-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 800;
}

/* Tier 2: Research Focus */
.tier-research {
  border-left: 4px solid var(--cyan);
}
.tier-research .tier-title {
  color: #0891b2;
}
body.dark-theme .tier-research .tier-title {
  color: #22d3ee;
}

.research-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 768px) {
  .research-meta-grid {
    grid-template-columns: 1fr;
  }
}

.research-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.meta-val {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-heading);
}

.keywords-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.keyword-pill {
  font-size: 0.76rem;
  background: var(--bg-alt);
  color: var(--text-body);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: monospace;
}

.must-clarify-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px dashed rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  font-size: 0.83rem;
  color: var(--text-body);
}

/* Tier 3: Action Toolkit */
.tier-toolkit {
  border-left: 4px solid var(--primary);
  background: rgba(79, 70, 229, 0.04);
}
.tier-toolkit .tier-title {
  color: var(--primary);
}

.toolkit-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-tool {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-smooth);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-tool-search {
  background: var(--bg-card);
  color: var(--text-heading);
  border: 1px solid var(--border-subtle);
}
.btn-tool-search:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.btn-tool-prompt {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-tool-prompt:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-tool-outline {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
body.dark-theme .btn-tool-outline {
  color: #34d399;
}
.btn-tool-outline:hover {
  background: rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-tool-case {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
body.dark-theme .btn-tool-case {
  color: #a78bfa;
}
.btn-tool-case:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

/* Tier 4: Output Outline Template */
.tier-outline {
  border-left: 4px solid var(--emerald);
}
.tier-outline .tier-title {
  color: #059669;
}
body.dark-theme .tier-outline .tier-title {
  color: #34d399;
}

.outline-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.outline-item {
  font-size: 0.85rem;
  color: var(--text-body);
  background: var(--bg-alt);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Bottom Card Action Bar (Status & Note) */
.card-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-subtle);
}

.status-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.status-select {
  padding: 0.38rem 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-alt);
  color: var(--text-heading);
  cursor: pointer;
  outline: none;
}
.status-select[data-status="done"] {
  border-color: var(--emerald);
  color: var(--emerald);
}
.status-select[data-status="drafting"] {
  border-color: var(--amber);
  color: var(--amber);
}

.quick-note-wrap {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-note-input {
  width: 100%;
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-heading);
  outline: none;
}
.quick-note-input:focus {
  border-color: var(--border-focus);
}

/* ==========================================================
   MATRIX TABLE VIEW (VIEW 2)
   ========================================================== */
.matrix-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

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

.matrix-table th {
  padding: 0.85rem 1rem;
  font-weight: 800;
  color: var(--text-heading);
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
}

.matrix-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.matrix-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.status-todo {
  background: var(--bg-alt);
  color: var(--text-muted);
}
.status-badge.status-researching {
  background: var(--cyan-light);
  color: #0891b2;
}
.status-badge.status-drafting {
  background: var(--amber-light);
  color: #d97706;
}
.status-badge.status-done {
  background: var(--emerald-light);
  color: #059669;
}

/* ==========================================================
   QC GUIDE VIEW (VIEW 3)
   ========================================================== */
.qc-guide-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.5rem;
  box-shadow: var(--shadow-md);
}

.qc-guide-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
}

.qc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.35rem;
  margin-bottom: 2rem;
}

.qc-item-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.qc-item-header {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.qc-item-desc {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .modal-window {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
}

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

.modal-body {
  padding: 1.5rem 1.6rem;
  font-size: 0.9rem;
  color: var(--text-body);
}

.code-prompt-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-heading);
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 1.2rem;
}

.modal-footer {
  padding: 1rem 1.6rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  background: var(--text-heading);
  color: var(--bg-page);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.app-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.app-footer strong {
  color: var(--text-heading);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-showcase {
    padding: 1.75rem 1.5rem;
  }
  .hero-title {
    font-size: 1.45rem;
  }
  .mission-card {
    padding: 1.35rem 1.25rem;
  }
  .header-actions .btn span:not(:first-child) {
    display: none;
  }
}

/* ==========================================================
   3-STEP STUDENT WORKFLOW BANNER (DỄ HIỂU NHẤT CHO THÀNH VIÊN)
   ========================================================== */
.guide-steps-banner {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.6rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.guide-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
}

.step-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  position: relative;
  transition: var(--transition-smooth);
}
.step-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.step-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* Big Download Button */
.btn-tool-download {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-weight: 800;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}
.btn-tool-download:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* AI Assistant Callout / Tooltip */
.ai-assistant-hint {
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  font-size: 0.8rem;
  color: var(--text-body);
  margin-top: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

/* ==========================================================
   SUBMISSION ZONE (NỘP FILE WORD TRỰC TIẾP TRÊN WEB)
   ========================================================== */
.tier-submission {
  border-left: 4px solid var(--emerald);
  background: rgba(16, 185, 129, 0.04);
}
.tier-submission .tier-title {
  color: #059669;
}
body.dark-theme .tier-submission .tier-title {
  color: #34d399;
}

.submission-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-alt);
  transition: var(--transition-smooth);
  position: relative;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}
.upload-main-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
}
.upload-sub-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Submitted File Card */
.submitted-file-card {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.submitted-file-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.submitted-file-icon {
  font-size: 1.4rem;
}

.submitted-file-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-heading);
}

.submitted-file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.submitted-file-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docs-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.docs-link-input {
  flex: 1;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-heading);
  outline: none;
}
.docs-link-input:focus {
  border-color: var(--border-focus);
}

/* A4 Sheet Preview Mockup */
.a4-preview-sheet {
  background: #ffffff;
  color: #1f2937;
  padding: 2.5rem 2.8rem;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  max-width: 680px;
  margin: 0 auto;
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.6;
}

.a4-preview-sheet h1, .a4-preview-sheet h2, .a4-preview-sheet h3 {
  font-family: 'Times New Roman', Times, serif;
}

