/* --- Custom Variables & Theme Tokens (Aligned with ISB Brand Guidelines) --- */
:root {
  /* Brand Primary & Accent Colours */
  --primary: #192890;         /* Legacy Blue */
  --primary-hover: #111D6B;   /* Legacy Blue Dark */
  --innovation-blue: #245BFF; /* Innovation Blue */
  --accent: #80edd9;          /* Future Green (Secondary accent) */
  --accent-hover: #6cdbc7;    /* Future Green Hover */
  --accent-light: #e6fcf8;    /* Future Green Pale Light */
  --accent-text: #192890;     /* High-Contrast Legacy Blue for text highlights */
  --maroon: #8B1A2F;          /* Academic Burgundy */
  --maroon-light: #FCE8EB;    /* Pale Burgundy */
  
  /* Brand Gray Palette */
  --gray-charcoal: #2e3b42;   /* Workhorse Gray */
  --gray-slate: #5d6f7a;
  --gray-muted: #95a9b4;
  --gray-light: #e6ebee;
  --gray-pale: #f4f8fa;
  
  /* Light Theme Configurations */
  --bg-app: #f4f8fa;          /* Gray-Pale background */
  --bg-sidebar: #192890;      /* Legacy Blue sidebar background */
  --bg-viewport: #f4f8fa;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-bubble-ai: #FFFFFF;
  --bg-bubble-user: #192890;  /* Legacy Blue user bubble */
  
  --border-color: #e6ebee;    /* Gray-Light border */
  --border-focus: #245BFF;    /* Innovation Blue border focus */
  
  --text-main: #2e3b42;       /* Workhorse Charcoal */
  --text-muted: #5d6f7a;      /* Slate Gray */
  --text-inverse: #FFFFFF;
  --text-gold: #192890;       /* Legacy Blue for primary highlights */
  
  --shadow-sm: 0 2px 8px rgba(25, 40, 144, 0.04);
  --shadow-md: 0 8px 24px rgba(25, 40, 144, 0.06);
  --shadow-lg: 0 16px 40px rgba(25, 40, 144, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --font-title: 'Reckless', 'Playfair Display', Georgia, Cambria, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 270px;
}

/* --- Dark Theme Variables --- */
body.dark-theme {
  --bg-app: #0A0D14;          /* Deep Obsidian Blue */
  --bg-sidebar: #05070A;
  --bg-viewport: #0A0D14;
  --bg-card: #121620;         /* Slate Tile */
  --bg-input: #0A0D14;
  --bg-bubble-ai: #1E2330;
  --bg-bubble-user: #245BFF;  /* Innovation Blue user bubble */
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #245BFF;
  
  --text-main: #E2E8F0;       /* Light Slate text */
  --text-muted: #95A9B4;      /* Light Gray-Muted text */
  --text-inverse: #0A0D14;
  --text-gold: #80edd9;       /* Future Green accent */
  --accent-text: #80edd9;     /* Perfect contrast on dark background */
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* --- Basic Resets --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(10, 34, 64, 0.15);
  border-radius: 4px;
}
body.dark-theme ::-webkit-scrollbar-thumb {
  background: rgba(240, 246, 252, 0.15);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --- Application Layout Grid --- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* --- Sidebar Styling --- */
.app-sidebar {
  background-color: var(--bg-sidebar);
  color: var(--sidebar-text, #E2E8F0);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  z-index: 100;
  padding: 24px 16px;
  transition: var(--transition-smooth);
}

.sidebar-header {
  padding-bottom: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  display: flex;
  gap: 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.brand-isb {
  color: #FFFFFF;
}

.brand-clte {
  color: var(--accent);
}

.app-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.app-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

.sidebar-nav {
  flex-grow: 1;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.nav-item.active {
  background-color: var(--accent);
  color: #051426;
  font-weight: 600;
}

.nav-item.active .nav-icon {
  fill: #051426;
}

.nav-icon {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.7);
  transition: var(--transition-smooth);
}

.nav-item:hover .nav-icon {
  fill: #FFFFFF;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

/* --- App Viewport --- */
.app-viewport {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* --- Header Action Bar --- */
.app-header {
  min-height: 72px;
  height: auto;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  transition: var(--transition-smooth);
}

.view-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition-smooth);
}
body.dark-theme .view-title {
  color: #FFFFFF;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  position: relative;
  width: 280px;
}

.header-search input {
  width: 100%;
  padding: 8px 36px 8px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-main);
  outline: none;
  font-size: 13.5px;
  transition: var(--transition-smooth);
}

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.search-btn-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  pointer-events: none;
}

/* Global Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  padding: 8px 0;
}

.search-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.search-item:hover {
  background-color: rgba(197, 160, 89, 0.08);
}

.search-item .item-stage {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 2px;
}

.search-item .item-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Theme Toggle Button */
.theme-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-btn:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
}
body.dark-theme .theme-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--text-main);
}

/* --- View Container --- */
.view-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.app-view {
  display: none;
  animation: viewFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.app-view.active-view {
  display: block;
}

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

/* --- Universal Component Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--text-gold);
}
body.dark-theme .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
}

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

.btn:not(.btn-outline):not(.btn-text) {
  background-color: var(--accent);
  color: #051426;
}

.btn:not(.btn-outline):not(.btn-text):hover {
  background-color: var(--accent-hover);
}

.full-width-btn {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-intro-text {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 800px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   ROUTE-SPECIFIC INTERFACE LAYER BLOCKS
   ========================================================================== */

/* --- 1. ASK / CHAT SYSTEM PANEL --- */
.chat-dashboard {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 680px;
  margin: auto;
  padding: 40px 20px;
}

.welcome-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
body.dark-theme .welcome-icon-wrapper {
  background-color: rgba(197, 160, 89, 0.15);
}

.welcome-ai-icon {
  width: 32px;
  height: 32px;
  fill: var(--accent);
}

.chat-welcome h3 {
  font-family: var(--font-title);
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--primary);
}
body.dark-theme .chat-welcome h3 {
  color: #FFFFFF;
}

.chat-welcome p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 32px;
}

.welcome-prompts h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.prompt-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.prompt-pill {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.prompt-pill:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--primary);
  transform: translateY(-1px);
}
body.dark-theme .prompt-pill:hover {
  background-color: rgba(197, 160, 89, 0.1);
  color: #FFFFFF;
}

.persistent-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.persistent-suggestions::-webkit-scrollbar {
  height: 4px;
}

.persistent-suggestions::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.persistent-suggestions .prompt-pill {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
}

/* Chat Messages Scroll area */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-bubble-container {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-bubble-container.user {
  align-self: flex-end;
}

.chat-bubble-container.ai {
  align-self: flex-start;
}

.bubble-sender {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-bubble-container.user .bubble-sender {
  align-self: flex-end;
}

.chat-bubble {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.chat-bubble-container.user .chat-bubble {
  background-color: var(--bg-bubble-user);
  color: var(--text-inverse);
  border-bottom-right-radius: 2px;
}
body.dark-theme .chat-bubble-container.user .chat-bubble {
  color: #051426;
}

.chat-bubble-container.ai .chat-bubble {
  background-color: var(--bg-bubble-ai);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}

/* Citations inside bubbles */
.citation-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.citation-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background-color: var(--accent-light);
  color: var(--text-gold);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}
body.dark-theme .citation-tag {
  background-color: rgba(197, 160, 89, 0.15);
}

.citation-tag:hover {
  border-color: var(--accent);
  background-color: var(--accent);
  color: #051426;
}

/* Related assets mapping list */
.related-assets-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-assets-row h5 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inline-asset-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  font-size: 12.5px;
  transition: var(--transition-smooth);
}

.inline-asset-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-card);
}

.inline-asset-icon {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

/* Chat Thinking Loader bubble */
.chat-thinking {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px 12px;
}

.thinking-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: thinkingBounce 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinkingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Message text list formats */
.chat-bubble ul, .chat-bubble ol {
  padding-left: 20px;
  margin: 10px 0;
}

.chat-bubble li {
  margin-bottom: 6px;
}

.chat-bubble p {
  margin-bottom: 8px;
}
.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.chat-bubble th, .chat-bubble td {
  border: 1px solid var(--border-color);
  padding: 8px;
  text-align: left;
}

.chat-bubble th {
  background-color: rgba(197, 160, 89, 0.08);
  font-weight: 600;
}

.chat-bubble blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}

.chat-bubble code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  background-color: var(--bg-app);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--accent);
}

.chat-bubble pre {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 12px 0;
}

.chat-bubble pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--text-main);
}

/* Input typing box */
.chat-input-area {
  padding: 20px 32px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.input-wrapper {
  display: flex;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  align-items: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.input-wrapper textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 6px 0;
  max-height: 120px;
}

.send-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.send-btn:hover {
  background-color: var(--accent-light);
}
body.dark-theme .send-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.send-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  transform: rotate(0deg);
}

.chat-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* --- 2. DO / GUIDED MODES PANEL --- */
.do-dashboard {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.do-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.do-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.do-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.do-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.do-card-icon {
  width: 28px;
  height: 28px;
  fill: var(--accent);
}

.do-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
body.dark-theme .do-card h3 {
  color: #FFFFFF;
}

.do-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 24px;
  flex-grow: 1;
  line-height: 1.6;
}

.do-action-btn {
  align-self: flex-start;
}

/* Active Workflow panel */
.workflow-active-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: workflowOpen 0.4s ease-out;
}

@keyframes workflowOpen {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.workflow-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(10, 34, 64, 0.02);
}
body.dark-theme .workflow-header-bar {
  background-color: rgba(255, 255, 255, 0.02);
}

.back-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.back-link-btn:hover {
  color: var(--accent);
}

.back-link-btn svg {
  fill: currentColor;
}

#workflow-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workflow-body {
  padding: 32px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Workflow steps layouts */
.workflow-wizard {
  max-width: 780px;
  margin: 0 auto;
}

.wizard-steps-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
}

.wizard-steps-timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.wizard-step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.node-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.wizard-step-node.active .node-dot {
  border-color: var(--accent);
  background-color: var(--accent);
  color: #051426;
}

.wizard-step-node.completed .node-dot {
  border-color: var(--primary);
  background-color: var(--primary);
  color: #FFFFFF;
}
body.dark-theme .wizard-step-node.completed .node-dot {
  border-color: var(--accent);
  background-color: var(--accent);
  color: #051426;
}

.node-label {
  font-size: 11px;
  margin-top: 8px;
  font-weight: 500;
  color: var(--text-muted);
}

.wizard-step-node.active .node-label {
  color: var(--text-main);
  font-weight: 600;
}

.wizard-pane-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.wizard-pane-card h4 {
  font-family: var(--font-body);
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--primary);
}
body.dark-theme .wizard-pane-card h4 {
  color: #FFFFFF;
}

.wizard-pane-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.wizard-buttons {
  display: flex;
  justify-content: space-between;
}

/* Form fields inside workflows */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* --- 3. USE / INTERACTIVE TOOLS LAYOUTS --- */
.use-dashboard {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-selectors {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.tool-tab-btn {
  background: transparent;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition-smooth);
}

.tool-tab-btn:hover {
  color: var(--primary);
}
body.dark-theme .tool-tab-btn:hover {
  color: #FFFFFF;
}

.tool-tab-btn.active {
  color: var(--accent-text);
  font-weight: 600;
}

.tool-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
}

.tool-content-panels {
  flex-grow: 1;
  position: relative;
}

.tool-panel {
  display: none;
  height: 100%;
  animation: panelFade 0.3s ease;
}

.tool-panel.active-panel {
  display: block;
}

@keyframes panelFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* TOOL: Pedagogical Fit Checklist layout */
.checklist-tool-layout {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.checklist-questions-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.checklist-progress-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.checklist-header h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-text);
}

.questions-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.checklist-question-box {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.checklist-question-box h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
}
body.dark-theme .checklist-question-box h3 {
  color: #FFFFFF;
}

.checklist-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.checklist-option-btns {
  display: flex;
  gap: 12px;
}

.btn-choice {
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-main);
  padding: 10px 24px;
  transition: var(--transition-smooth);
}

.btn-choice:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
  color: var(--text-gold);
}
body.dark-theme .btn-choice:hover {
  background-color: rgba(197, 160, 89, 0.1);
  color: #FFFFFF;
}

.btn-choice[data-choice="yes"].active {
  background-color: #e2f0d9 !important;
  border-color: #2e5b1e !important;
  color: #2e5b1e !important;
}
.btn-choice[data-choice="no"].active {
  background-color: #fce4d6 !important;
  border-color: #843c0c !important;
  color: #843c0c !important;
}
.btn-choice[data-choice="not_sure"].active {
  background-color: #f2f2f2 !important;
  border-color: #595959 !important;
  color: #595959 !important;
}

/* Checklist review badges */
.review-ans-badge.review-badge-yes {
  background-color: #e2f0d9 !important;
  color: #2e5b1e !important;
  border: 1px solid #c8e6b9;
}
.review-ans-badge.review-badge-no {
  background-color: #fce4d6 !important;
  color: #843c0c !important;
  border: 1px solid #f8cdb2;
}
.review-ans-badge.review-badge-not_sure {
  background-color: #f2f2f2 !important;
  color: #595959 !important;
  border: 1px solid #e0e0e0;
}
.review-ans-badge.review-badge-unanswered {
  background-color: #e9ecef !important;
  color: #6c757d !important;
  border: 1px dashed #ced4da;
}

/* Results panel on the right */
.checklist-results-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.checklist-results-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.gauge-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 20px;
}

.radial-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-track {
  stroke: var(--border-color);
}

.gauge-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
body.dark-theme .score-num {
  color: #FFFFFF;
}

.score-max {
  font-size: 11px;
  color: var(--text-muted);
}

.score-band-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background-color: var(--border-color);
  color: var(--text-muted);
}

/* Band color codes */
.score-band-badge.strong { background-color: #D4EDDA; color: #155724; }
.score-band-badge.good { background-color: #CCE5FF; color: #004085; }
.score-band-badge.partial { background-color: #FFF3CD; color: #856404; }
.score-band-badge.weak { background-color: var(--maroon-light); color: var(--maroon); }

.score-message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* TOOL: Rubric Builder layout */
.rubrics-tool-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.rubrics-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rubrics-sidebar h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.rubrics-selector-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rubric-select-item {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.rubric-select-item:hover {
  border-color: var(--accent);
  background-color: var(--bg-app);
}

.rubric-select-item.active {
  border-color: var(--accent);
  background-color: var(--accent-light);
}
body.dark-theme .rubric-select-item.active {
  background-color: rgba(197, 160, 89, 0.15);
}

.rubric-select-item h5 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
body.dark-theme .rubric-select-item h5 {
  color: #FFFFFF;
}

.rubric-select-item p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.rubric-actions-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.rubrics-main-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.rubrics-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.rubrics-card-header h3 {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--primary);
}
body.dark-theme .rubrics-card-header h3 {
  color: #FFFFFF;
}

.btn-small-outline {
  font-size: 11.5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-small-outline:hover {
  border-color: var(--accent);
  color: var(--text-gold);
}

.rubric-table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.rubric-table th, .rubric-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.rubric-table tr:last-child th, .rubric-table tr:last-child td {
  border-bottom: none;
}

.rubric-table th {
  background-color: rgba(10, 34, 64, 0.02);
  font-weight: 600;
  color: var(--primary);
}
body.dark-theme .rubric-table th {
  background-color: rgba(255, 255, 255, 0.02);
  color: #FFFFFF;
}

/* Edit cells rules */
.rubric-table th[contenteditable="true"]:focus,
.rubric-table td[contenteditable="true"]:focus {
  outline: 2px solid var(--accent);
  background-color: var(--accent-light);
  color: #051426;
  border-radius: var(--radius-sm);
}

.table-instructions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #192890; /* Legacy Blue */
  background-color: #e8f0fe; /* Soft blue warning banner */
  border-left: 4px solid #245bff; /* Innovation Blue */
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

.info-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* TOOL: Reflection Form split panel */
.reflection-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

.reflection-meta-card, .reflection-prompts-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-stacked-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-stacked-list .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-stacked-list .form-group input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-main);
  box-sizing: border-box;
}

.reflection-meta-card h4, .reflection-prompts-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.ratings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.stars-selector {
  display: flex;
  gap: 6px;
}

.star-input-btn {
  background: transparent;
  border: none;
  cursor: pointer;
}

.star-icon {
  width: 20px;
  height: 20px;
  fill: var(--border-color);
  transition: var(--transition-smooth);
}

.star-icon.filled {
  fill: var(--accent);
}

.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-textarea {
  min-height: 80px;
}

.reflection-submit-box {
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

/* Dynamic Reflection Results report */
.reflection-summary-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-top: 28px;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reflection-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.reflection-result-header h3 {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--primary);
}
body.dark-theme .reflection-result-header h3 {
  color: #FFFFFF;
}

.action-btns-row {
  display: flex;
  gap: 10px;
}

.reflection-result-body {
  font-size: 14.5px;
  line-height: 1.7;
}

.reflection-result-body h4 {
  font-size: 15px;
  color: var(--primary);
  margin: 20px 0 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 4px;
}
body.dark-theme .reflection-result-body h4 {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.05);
}

.reflection-result-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* --- 4. BROWSE / PLAYBOOK ROADMAP LAYOUTS --- */
.browse-dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.stages-roadmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stage-node-item {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-node-item:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
}
body.dark-theme .stage-node-item:hover {
  background-color: rgba(197, 160, 89, 0.1);
}

.stage-node-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}
body.dark-theme .stage-node-item.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #051426;
}

.stage-num-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-text);
  margin-bottom: 4px;
}

.stage-node-item.active .stage-num-badge {
  color: var(--accent);
}
body.dark-theme .stage-node-item.active .stage-num-badge {
  color: #051426;
}

.stage-node-item.active .stage-label-text {
  font-weight: 600;
}

.stage-label-text {
  font-size: 13px;
  font-weight: 500;
}

/* Two split panels below timeline */
.library-split-layout {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.stage-content-card, .stage-assets-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.stage-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.stage-order-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--text-gold);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark-theme .stage-order-badge {
  background-color: rgba(197, 160, 89, 0.15);
}

.stage-title-group h3 {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--primary);
}
body.dark-theme .stage-title-group h3 {
  color: #FFFFFF;
}

.stage-title-group p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Accordion layout for chunks */
.chunks-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-item:hover {
  border-color: var(--accent);
}

.accordion-header {
  width: 100%;
  padding: 16px 20px;
  background-color: rgba(10, 34, 64, 0.01);
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  transition: var(--transition-smooth);
}
body.dark-theme .accordion-header {
  background-color: rgba(255, 255, 255, 0.01);
}

.accordion-header.active {
  background-color: var(--accent-light);
  color: #051426;
  font-weight: 600;
}
body.dark-theme .accordion-header.active {
  background-color: rgba(197, 160, 89, 0.15);
  color: #FFFFFF;
}

.accordion-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-type-badge {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background-color: rgba(0, 0, 0, 0.05);
}
body.dark-theme .asset-type-badge {
  background-color: rgba(255, 255, 255, 0.08);
}

.accordion-title-text {
  font-size: 14px;
}

.accordion-arrow {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  font-size: 13.5px;
  line-height: 1.6;
}

.accordion-content.open {
  display: block;
}

.accordion-content p {
  margin-bottom: 12px;
}
.accordion-content p:last-child {
  margin-bottom: 0;
}

.accordion-content ul, .accordion-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.accordion-content li {
  margin-bottom: 6px;
}

/* Accordion internal metadata tags */
.chunk-meta-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.chunk-questions-list {
  margin-top: 8px;
}

.chunk-questions-list h5 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.chunk-questions-list ul {
  list-style: none;
  padding-left: 0 !important;
  margin-top: 4px;
}

.chunk-questions-list li {
  font-size: 12px;
  color: var(--text-gold);
  font-style: italic;
  margin-bottom: 4px;
}

/* Media Cards on the right */
.stage-assets-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--accent-text);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.assets-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.assets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-media-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  transition: var(--transition-smooth);
}

.asset-media-card:hover {
  border-color: var(--accent);
}

.asset-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.asset-icon {
  width: 16px;
  height: 16px;
  fill: var(--accent);
}

.asset-details {
  flex-grow: 1;
  min-width: 0;
}

.asset-status-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.asset-status-tag.existing { background-color: #D4EDDA; color: #155724; }
.asset-status-tag.coming_soon, .asset-status-tag.to_create {
  opacity: 0.7;
  font-style: italic;
  border: 1px dashed var(--border-color);
  background-color: transparent !important;
  color: var(--text-muted) !important;
}
.asset-status-tag.external { background-color: #E2E8F0; color: #4A5568; }

.asset-title-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.4;
  word-wrap: break-word;
}

.asset-blurb-text {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.asset-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-gold);
  text-decoration: none;
  font-weight: 600;
  margin-top: 6px;
}

.asset-link-btn:hover {
  text-decoration: underline;
}

/* --- 5. SETTINGS VIEW LAYOUT --- */
.settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.settings-card h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 6px;
}
body.dark-theme .settings-card h3 {
  color: #FFFFFF;
}

.settings-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 36px;
  margin-bottom: 36px;
}

.settings-section h4 {
  font-size: 13.5px;
  text-transform: uppercase;
  color: var(--accent-text);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.input-tip {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.input-tip a {
  color: var(--text-gold);
}

.settings-list-options {
  list-style: none;
  padding-left: 0;
}

.settings-list-options li {
  font-size: 13.5px;
  margin-bottom: 14px;
  color: var(--text-main);
  position: relative;
  padding-left: 20px;
}

.settings-list-options li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.status-msg {
  font-size: 13px;
  font-weight: 600;
  color: #155724;
  margin-left: 12px;
}

.knowledge-base-stats h4 {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background-color: var(--bg-app);
}

.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
body.dark-theme .stat-num {
  color: #FFFFFF;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   WARNING BANNERS & EMBEDDED MEDIA PLAYERS
   ========================================================================== */
.weights-warning-banner {
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.weights-warning-banner.red {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.weights-warning-banner.green {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Video Embedding structures */
.chat-video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 10px;
  overflow: hidden;
  max-width: 500px;
  box-shadow: var(--shadow-sm);
}

.chat-video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
}

.chat-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sharepoint-video-placeholder {
  background: linear-gradient(135deg, #192890 0%, #245bff 100%);
  color: #ffffff;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sharepoint-video-placeholder h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.sharepoint-video-placeholder p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.sharepoint-video-placeholder .btn-play-video {
  background: #ffffff;
  color: #192890;
  border: none;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease;
}

.sharepoint-video-placeholder .btn-play-video:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   EXPORT & PRINT STYLES
   ========================================================================== */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    overflow: visible !important;
  }
  
  .app-sidebar,
  .app-header,
  .rubrics-sidebar,
  .table-instructions,
  .reflection-split-grid,
  .reflection-result-header .action-btns-row,
  #theme-toggle-btn,
  .do-grid,
  .section-intro-text,
  .workflow-header-bar,
  .rubric-actions-box,
  .rubrics-card-header .btn,
  .weights-warning-banner {
    display: none !important;
  }
  
  .app-layout {
    display: block !important;
    height: auto !important;
    width: auto !important;
  }
  
  .app-viewport {
    height: auto !important;
  }
  
  .view-container {
    padding: 0 !important;
    overflow: visible !important;
  }
  
  /* Rubrics printing rules */
  #workflow-panel {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .rubrics-main-card,
  .reflection-summary-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
  }
  
  .rubric-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-size: 11pt !important;
    border: 1px solid #000000 !important;
  }
  
  .rubric-table th, .rubric-table td {
    border: 1px solid #000000 !important;
    padding: 8px 6px !important;
    color: #000000 !important;
    word-wrap: break-word !important;
    white-space: normal !important;
  }
  
  .rubric-table th {
    background-color: #E2E8F0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .rubric-table th:first-child, .rubric-table td:first-child {
    width: 22% !important;
    text-align: left !important;
  }

  .rubric-table th:nth-child(2), .rubric-table td:nth-child(2) {
    width: 10% !important;
    text-align: center !important;
  }

  .rubric-table th:not(:first-child):not(:nth-child(2)), 
  .rubric-table td:not(:first-child):not(:nth-child(2)) {
    width: 17% !important;
  }
}
