/* Modular CSS slice extracted from style.css (715-1435) */
.sidebar-action-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-action-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #f1f5f9;
}

.sidebar-action-btn:hover .squircle-icon-box,
.sidebar-action-btn:hover .nav-action-icon {
  transform: scale(1.05);
}

.sidebar-action-btn.active-portal,
.sidebar-action-btn.active {
  background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
  color: var(--text-main);
  border-color: #e2e8f0;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.nav-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-action-btn:hover .nav-action-icon,
.sidebar-action-btn.active-portal .nav-action-icon {
  color: var(--text-main);
}

.nav-action-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.command-hint-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--fast-transition);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.command-hint-badge:hover {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.command-hint-label {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbd-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* --- MAIN STUDIO CANVAS --- */
.studio-canvas {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas-bg);
}

/* Top Studio App Bar */
.studio-topbar {
  height: 56px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 2000;
}

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

.btn-sidebar-toggle {
  display: none;
  font-size: 1.2rem;
  color: var(--text-main);
  padding: 0.25rem;
  border-radius: var(--radius-xs);
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.breadcrumb-trail #bc-school {
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.breadcrumb-sep {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.breadcrumb-active {
  color: #1d4ed8;
  font-weight: 700;
  background: #eff6ff;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid #bfdbfe;
}

/* Spotlight Search Trigger in Topbar */
.spotlight-trigger-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 280px;
  transition: var(--fast-transition);
}

.spotlight-trigger-box:hover {
  border-color: var(--border-strong);
  background: #ffffff;
  color: var(--text-main);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Executive Topbar Utilities Popover (Streamlined B2B) */
.topbar-utilities-wrapper {
  position: relative;
}

.topbar-utilities-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  padding: 0.4rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: fadeInDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-util-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.topbar-util-item:hover {
  background: #f8fafc;
}

.util-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.util-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.util-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.util-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- MAIN WORKSPACE CONTAINER --- */
.workspace-container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 1.5rem 4rem 1.5rem;
  position: relative;
  z-index: 100;
}

/* Archived Year Warning Alert Banner */
.archived-year-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  color: #92400e;
}

.archived-alert-content { font-size: 0.82rem; line-height: 1.45; }
/* --- CLASSROOM CONTEXT HERO (Active Class & Subject Context Hub) --- */
.classroom-context-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: var(--fast-transition);
}

.context-hero-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.context-hero-school-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-chip-icon {
  font-size: 0.85rem;
}

.hero-chip-divider {
  color: var(--text-dim, #94a3b8);
}

.context-hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-subject-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full, 999px);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-class-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.hero-student-count-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: var(--surface-subtle, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full, 999px);
}

.context-hero-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.context-hero-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-hero-action {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs, 6px);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--fast-transition);
}

/* --- BENTO HUD METRIC CARDS (Luminous SaaS KPI Edition) --- */
.bento-hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.bento-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.07), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

.bento-card:hover .squircle-icon-box,
.bento-card:hover .bento-icon {
  transform: scale(1.08);
}

.bento-card:nth-child(1) .bento-icon {
  background: var(--squircle-indigo-bg);
  color: var(--squircle-indigo-fg);
  border: 1px solid var(--squircle-indigo-border);
}

.bento-card:nth-child(2) .bento-icon {
  background: var(--squircle-emerald-bg);
  color: var(--squircle-emerald-fg);
  border: 1px solid var(--squircle-emerald-border);
}
.bento-card:nth-child(2) .bento-val {
  color: var(--squircle-emerald-fg);
}

.bento-card:nth-child(3) .bento-icon {
  background: var(--squircle-amber-bg);
  color: var(--squircle-amber-fg);
  border: 1px solid var(--squircle-amber-border);
}

.bento-card:nth-child(4) .bento-icon {
  background: var(--squircle-sky-bg);
  color: var(--squircle-sky-fg);
  border: 1px solid var(--squircle-sky-border);
}

.bento-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bento-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-feature-settings: 'tnum';
  margin-top: 0.1rem;
}

.bento-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.bento-subtext strong {
  color: var(--text-main);
  font-weight: 600;
}

/* --- EXAM HUB PRO: TRUNG TÂM QUẢN LÝ BÀI KIỂM TRA CẢ NĂM HỌC --- */
.exam-hub-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
  transition: var(--fast-transition);
}

/* Exam Hub Header */
.exam-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.exam-hub-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.exam-hub-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exam-hub-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Search Box */
.exam-hub-search-box {
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  gap: 0.5rem;
  flex: 1;
  max-width: 380px;
  min-width: 220px;
  transition: var(--fast-transition);
}

.exam-hub-search-box:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.exam-hub-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.exam-hub-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.82rem;
  color: var(--text-main);
  width: 100%;
}

.exam-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 0.8rem;
  line-height: 1;
}

.exam-search-clear:hover {
  color: var(--text-main);
}

/* View Switcher */
.exam-hub-view-modes {
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  gap: 0.2rem;
}

.btn-hub-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--fast-transition);
}

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

.btn-hub-view.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Filter Ribbon */
.exam-hub-filter-ribbon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
  scrollbar-width: none;
}

.exam-hub-filter-ribbon::-webkit-scrollbar {
  display: none;
}

.filter-pill-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.filter-pill-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  flex-shrink: 0;
}

.hub-filter-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--surface-subtle);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--fast-transition);
}

.hub-filter-pill:hover {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.hub-filter-pill.active {
  background: #ecfeff;
  border-color: rgba(0, 197, 223, 0.5);
  color: #082850;
  font-weight: 750;
  box-shadow: 0 1px 4px rgba(0, 197, 223, 0.18);
}

/* Exam Hub Body & View Modes */
.exam-hub-body {
  min-height: 80px;
  margin-bottom: 0.5rem;
}