/* 
 * Northrose Red Seal Builder Console — TicketR Premium Theme
 * Creative North Star: "The Calm Controller" (Luxury, Spacious, Serious & Refined)
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Coconat Font Declarations */
@font-face {
  font-family: 'Coconat';
  src: url('./coconat/Coconat-Regular.woff2') format('woff2'),
    url('./coconat/Coconat-Regular.woff') format('woff'),
    url('./coconat/Coconat-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Coconat';
  src: url('./coconat/Coconat-BoldExt.woff2') format('woff2'),
    url('./coconat/Coconat-BoldExt.woff') format('woff'),
    url('./coconat/Coconat-BoldExt.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  /* TicketR Color Palette */
  --bg-color: #f1f5f9;
  /* Crisp Gallery Ash */
  --panel-bg: #ffffff;
  /* Clean Paper White */
  --sidebar-bg: #ffffff;
  /* Clean Paper White Sidebar */
  --border-color: #e2e8f0;
  /* Soft Slate Border */

  --text-primary: #0f172a;
  /* Deep Midnight Slate */
  --text-secondary: #64748b;
  /* Muted Slate Text */
  --text-muted: #94a3b8;
  /* Ambient Light Slate */

  --primary-color: #740011;
  /* Luxurious Cherry Red Brand Color */
  --primary-hover: #900015;
  /* Rich Cherry Red Interactive Hover */

  /* TicketR Semantic Priority & Badges States */
  --priority-green: #059669;
  --priority-green-bg: #ecfdf5;
  --priority-green-border: #a7f3d0;
  --priority-green-text: #065f46;

  --priority-yellow: #d97706;
  --priority-yellow-bg: #fffbeb;
  --priority-yellow-border: #fde68a;
  --priority-yellow-text: #92400e;

  --priority-orange: #ea580c;
  --priority-orange-bg: #ffedd5;
  --priority-orange-border: #fed7aa;
  --priority-orange-text: #7c2d12;

  --priority-red: #dc2626;
  --priority-red-bg: #fef2f2;
  --priority-red-border: #fecaca;
  --priority-red-text: #991b1b;

  /* Typography Stacks */
  --font-display: 'Coconat', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Poppins', 'Inter', sans-serif;

  /* Ambient Shadows Lift Vocabulary */
  --shadow-low: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-medium: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
  --shadow-high: 0 10px 25px -5px rgba(15, 23, 42, 0.08);

  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets & Atmosphere */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  min-height: 100%;
  overflow-y: auto !important;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: auto !important;
  min-height: 100dvh;
  width: 100%;
  overflow: visible !important;
}

/* Headings: Coconat Restraint Rule (Normal weight, no artificial bolding) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.2;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

/* 
 * 1. Top Header Navigation (Clean Paper White)
 */
.app-header {
  width: 100%;
  background-color: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-low);
  z-index: 10;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-low);
  padding: 8px;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.logo-container:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

.brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Minimal Premium SVG Icon utility styles */
.tab-icon-svg {
  stroke: currentColor;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-icon-svg {
  stroke: currentColor;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.success-icon-svg {
  stroke: var(--priority-green);
  flex-shrink: 0;
}

.banner-sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.main-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--primary-color);
  font-weight: normal;
}

.main-title span {
  font-style: italic;
  border-bottom: 2px solid var(--border-color);
}

/* Curation Wizard form */
.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

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

.form-row {
  display: flex;
  gap: 1.25rem;
}

.col-6 {
  flex: 1;
}

/* Label typography rules */
label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Interactive Inputs */
input,
textarea,
select {
  background-color: var(--bg-color);
  /* Recessed canvas background color */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  box-shadow: var(--shadow-low);
  transition: var(--transition-smooth);
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px var(--primary-color), var(--shadow-low);
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.1rem;
}

/* Major Work Activities lists */
.mwa-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.4rem;
  scrollbar-width: thin;
}

.mwa-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  background: #ffffff;
  /* Contrast panel card background */
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.mwa-item label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.mwa-item input {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  background: var(--bg-color);
  /* Recessed nested inputs */
}

/* Tactile Buttons (Slate Primary & Secondary) */
.primary-btn {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-low);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  transition: var(--transition-smooth);
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-high);
}

.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  color: var(--primary-color);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-low);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secondary-btn:hover {
  background-color: #f8fafc;
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-high);
}

.secondary-btn:active {
  transform: translateY(0);
}

/* Loader Widget */
.loader {
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 50%;
  border-top: 2px solid var(--primary-color);
  width: 14px;
  height: 14px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.primary-btn .loader {
  border-top-color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.toast-container {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.app-toast {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-high);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.75rem 0.9rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast.success {
  border-color: var(--priority-green-border);
  color: var(--priority-green-text);
}

.app-toast.error {
  border-color: var(--priority-red-border);
  color: var(--priority-red-text);
}

.app-toast.info {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.app-toast.dismiss {
  opacity: 0;
  transform: translateY(8px);
}

/* 
 * 2. Main Console Viewport (Crisp Gallery Ash Canvas)
 */
.console-viewport {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
  overflow: visible !important;
  padding-bottom: 8rem !important;
  /* Reachable bottom padding */
}

/* Dynamic Tab Switchers (Tactile Light Toggle) */
.console-tabs {
  display: flex;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.4rem;
  border-radius: 10px;
  margin-bottom: 0.25rem;
  box-shadow: var(--shadow-low);
  width: fit-content;
}

.console-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.console-tab-btn:hover {
  color: var(--primary-color);
  background: rgba(15, 23, 42, 0.02);
}

.console-tab-btn.active {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: var(--shadow-low);
}

/* View switching hooks */
.tab-content-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  padding-bottom: 4rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spacious Surface Panels */
.card-panel {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.25rem;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
}

.card-panel:hover {
  box-shadow: var(--shadow-high);
}

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

.panel-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: normal;
}

.panel-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Calm Progress/Status Rail */
.status-rail {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-low);
  width: 100%;
}

.status-rail-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  transition: var(--transition-smooth);
}

.status-rail-indicator-dot.generating,
.status-rail-indicator-dot.validating,
.status-rail-indicator-dot.repairing,
.status-rail-indicator-dot.building {
  background-color: var(--priority-yellow);
  box-shadow: 0 0 6px var(--priority-yellow);
  animation: pulse-indicator 1.5s infinite;
}

.status-rail-indicator-dot.completed {
  background-color: var(--priority-green);
}

.status-rail-indicator-dot.failed {
  background-color: var(--priority-red);
}

.status-rail-indicator-dot.idle {
  background-color: var(--text-muted);
}

.status-rail-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.status-rail-value {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.status-rail-value.status-generating {
  color: var(--priority-yellow-text);
}

.status-rail-value.status-validating,
.status-rail-value.status-building {
  color: var(--primary-color);
}

.status-rail-value.status-repairing,
.status-rail-value.status-failed {
  color: var(--priority-red-text);
}

.status-rail-value.status-completed {
  color: var(--priority-green-text);
}

@keyframes pulse-indicator {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* 
 * 3. Logging Terminal (Tactile High-Contrast Slate Container)
 */
.terminal-panel {
  background: #0f172a;
  /* Deep Midnight Slate terminal body */
  border: 1px solid #1e293b;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-high);
}

.terminal-header {
  background: #1e293b;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #334155;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red {
  background-color: var(--priority-red);
}

.terminal-dot.yellow {
  background-color: var(--priority-yellow);
}

.terminal-dot.green {
  background-color: var(--priority-green);
}

.terminal-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-left: 0.5rem;
  flex: 1;
}

.terminal-clear {
  background: transparent;
  border: 1px solid #475569;
  border-radius: 4px;
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.terminal-clear:hover {
  background: #334155;
  color: #ffffff;
  border-color: #64748b;
}

.terminal-body {
  flex: 1;
  padding: 1.5rem;
  max-height: 360px !important;
  overflow-y: auto !important;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #34d399;
  /* soft emerald console text */
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.system-message {
  color: #94a3b8;
  font-style: italic;
}

/* 
 * 4. Moodle SCORM Packaging & Actions Grid
 */
.export-panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.25rem;
}

.export-telemetry-box {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.export-target-chip {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
}

.export-target-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.export-target-details strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

.validation-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.export-options-row {
  margin-bottom: 1.75rem;
}

.option-title {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.export-buttons-row {
  display: flex;
  gap: 1.25rem;
}

.export-buttons-row button {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.85rem 1.2rem;
}

/* Fully Rounded Badges */
.badge {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  /* fully rounded badges */
  border-width: 1px;
  border-style: solid;
  width: fit-content;
}

.status-badge {
  background-color: var(--priority-green-bg);
  color: var(--priority-green-text);
  border-color: var(--priority-green-border);
}

#qa-validation-val {
  background-color: var(--priority-green-bg);
  color: var(--priority-green-text);
  border-color: var(--priority-green-border);
}

#qa-validation-val[style*="color: rgb(239, 68, 68)"],
#qa-validation-val[style*="color: rgb(248, 113, 113)"],
#qa-validation-val.failed {
  background-color: var(--priority-red-bg) !important;
  color: var(--priority-red-text) !important;
  border-color: var(--priority-red-border) !important;
}

/* Clickable Download Container */
#download-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--priority-green-bg);
  border: 1px solid var(--priority-green-border);
  padding: 1.25rem;
  border-radius: 8px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-icon {
  font-size: 1.6rem;
  color: var(--priority-green);
}

.download-info {
  display: flex;
  flex-direction: column;
}

.zip-name-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--priority-green-text);
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.zip-name-label:hover {
  color: var(--primary-color);
}

.zip-path-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Right side: Pedagogical warnings Suggestions panel */
.suggestions-card-panel {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  max-height: 280px;
}

.suggestions-card-panel .sub-panel-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.suggestions-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scrollbar-width: thin;
}

.suggestions-list .system-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 
 * 5. Preview & Edit Tab (Library Table & Workbench Split)
 */
.library-card-panel {
  margin-bottom: 2rem;
}

.library-grid-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: var(--shadow-low);
}

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

.library-table th {
  background-color: #f8fafc;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.library-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.library-table tbody tr {
  transition: var(--transition-smooth);
}

.library-table tbody tr:hover {
  background-color: rgba(15, 23, 42, 0.015);
}

.library-trade-name {
  font-weight: 600;
  color: var(--primary-color);
  display: block;
}

.library-trade-id {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.2rem;
}

.library-kebab-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.library-actions-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.library-buttons-row {
  display: flex;
  gap: 0.5rem;
}

.library-buttons-row .secondary-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  margin: 0;
}

.library-latest-export {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--priority-green);
  margin-top: 0.25rem;
}

.library-latest-export a {
  color: var(--priority-green-text);
  text-decoration: underline;
  transition: var(--transition-smooth);
}

.library-latest-export a:hover {
  color: var(--primary-hover);
}

.library-no-export {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Badge Priority State Colors override */
.badge.passed {
  background-color: var(--priority-green-bg);
  color: var(--priority-green-text);
  border-color: var(--priority-green-border);
}

.badge.failed {
  background-color: var(--priority-red-bg);
  color: var(--priority-red-text);
  border-color: var(--priority-red-border);
}

.badge.warning {
  background-color: var(--priority-yellow-bg);
  color: var(--priority-yellow-text);
  border-color: var(--priority-yellow-border);
}

/* Side-by-Side curation workbench layout */
.preview-edit-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

.editor-column {
  width: 100%;
}

.preview-column {
  width: 100%;
}

.editor-workbench-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1.5rem;
}

.editor-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.editor-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

#editor-save-indicator {
  font-size: 0.7rem;
  background-color: var(--priority-green-bg);
  border: 1px solid var(--priority-green-border);
  color: var(--priority-green-text);
  padding: 0.3rem 0.8rem;
}

/* Workbench Code selector Tabs */
.file-editor-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
}

.file-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.file-tab-btn:hover {
  background: rgba(15, 23, 42, 0.02);
  color: var(--primary-color);
}

.file-tab-btn.active {
  background-color: var(--bg-color);
  border-color: var(--border-color);
  color: var(--primary-color);
  font-weight: 600;
}

/* Monospaced Raw Textarea container */
.monospaced-textarea-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  background-color: var(--bg-color);
  /* Deepen soft contrast to match recessed canvas background */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: var(--transition-smooth);
  margin-bottom: 1.25rem;
}

.monospaced-textarea-container:focus-within {
  border-color: var(--primary-color);
  background-color: #ffffff;
  /* Brighten to pure white on active focus */
  box-shadow: 0 0 0 1px var(--primary-color), inset 0 1px 3px rgba(15, 23, 42, 0.03);
}

.monospaced-editor-box {
  flex: 1;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  resize: none;
  padding: 1.25rem;
  color: var(--text-primary);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  outline: none;
}

#editor-textarea {
  height: 480px !important;
  resize: vertical;
}

/* Workbench actions footer */
.editor-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.editor-actions-bar .primary-btn {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.75rem 1.35rem;
}

.selective-regen-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
}

.regen-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-select {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-color);
  /* Recessed canvas background color */
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  width: fit-content;
  box-shadow: var(--shadow-low);
  transition: var(--transition-smooth);
}

.premium-select:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  /* Brighten to pure white on active focus */
  box-shadow: 0 0 0 1px var(--primary-color);
}

#quiz-module-id-select {
  width: 65px;
}

/* Preview column container styling */
.preview-iframe-card {
  display: flex;
  flex-direction: column;
  min-height: 950px;
  padding: 2.25rem;
}

.preview-iframe-card .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}

.preview-iframe-card .secondary-btn {
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
}

.iframe-preview-container {
  height: 850px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: #0f1013;
  /* Isolated dark background for sandboxed preview */
  box-shadow: var(--shadow-medium);
}

.iframe-preview-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 
 * 6. Advanced Details Tab
 */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 2rem;
}

.telemetry-metadata-card {
  padding: 2.25rem;
}

.sub-panel-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: normal;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.editor-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}

.stats-label {
  color: var(--text-secondary);
}

.stats-item strong {
  color: var(--primary-color);
  font-weight: 600;
}

#provenance-val {
  text-transform: uppercase;
}

#qa-timestamp-val {
  font-family: monospace;
  font-size: 0.78rem;
}

.build-version-item {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  border-bottom: none;
}

.system-build-version {
  color: var(--priority-green);
  font-size: 0.78rem;
  font-family: monospace;
}

.raw-validation-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.raw-validation-card .monospaced-textarea-container {
  flex: 1;
  margin-bottom: 0;
}

#raw-validation-report {
  max-height: 360px !important;
  overflow-y: auto !important;
  color: var(--priority-red-text);
  /* validation errors in priority rose coloring */
  background-color: var(--priority-red-bg);
}

#raw-validation-report[value*="SUCCESS"],
#raw-validation-report[value*="passed"],
#raw-validation-report:not([placeholder]) {
  color: var(--priority-green-text);
  background-color: var(--priority-green-bg);
}

/* Warnings auditing cards */
.warning-audit-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 380px;
  overflow: hidden;
}

.warnings-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}

.audit-warning-card {
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  animation: slideIn 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-width: 1px;
  border-style: solid;
}

.audit-warning-card.level-warning {
  background-color: var(--priority-red-bg);
  border-color: var(--priority-red-border);
  color: var(--priority-red-text);
}

.audit-warning-card.level-info {
  background-color: var(--priority-yellow-bg);
  border-color: var(--priority-yellow-border);
  color: var(--priority-yellow-text);
}

.warning-card-header {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

/* 
 * 7. Visual Curation Editor Panel Layout & Controls 
 */
.visual-editor-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.visual-editor-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
}

.visual-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.visual-tab-btn:hover {
  color: var(--primary-color);
  background: rgba(15, 23, 42, 0.02);
}

.visual-tab-btn.active {
  background: rgba(116, 0, 17, 0.06);
  color: var(--primary-color);
  font-weight: 600;
}

.visual-sub-view {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
}

.visual-split-layout {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.visual-sidebar-list {
  width: 240px;
  flex-shrink: 0;
  border: none;
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 0;
  background: transparent;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.25rem 0.5rem 0;
  gap: 0.35rem;
  scrollbar-width: thin;
}

.visual-sidebar-list-container {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.visual-sidebar-list-container .visual-sidebar-list {
  width: 100%;
}

.visual-list-item {
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visual-list-item:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.visual-list-item.active {
  background: rgba(116, 0, 17, 0.05);
  border-color: rgba(116, 0, 17, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.visual-form-panel {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  padding: 0 0 0 1.25rem;
  background: transparent;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
}

.visual-form-section {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.visual-form-section h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.v-video-row {
  display: flex;
  gap: 0.75rem;
}

.v-option-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.v-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
}

.v-option-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.visual-form-panel input, 
.visual-form-panel textarea, 
.visual-form-panel select {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  width: 100%;
}

.visual-form-panel input:focus, 
.visual-form-panel textarea:focus, 
.visual-form-panel select:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px var(--primary-color);
}

.diagram-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.75rem;
}

.diagram-preview-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.diagram-preview-heading span {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
}

.diagram-preview-heading small {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.diagram-preview-box {
  min-height: 180px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-align: center;
}

.diagram-preview-box.is-error {
  background: var(--priority-red-bg);
  border-color: var(--priority-red-border);
  color: var(--priority-red-text);
}

.diagram-preview-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

/* Spacious layout grids for Create Manual & Export views */
.create-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

.export-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

.export-column-left,
.export-column-right {
  display: flex;
  flex-direction: column;
}

/* Clickable Warning Cards Hover States */
.audit-warning-card {
  cursor: pointer;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.audit-warning-card:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-medium);
}

.audit-warning-card.level-warning:hover {
  background-color: #fff1f2 !important; /* Slightly brighter red/rose tint */
}

.audit-warning-card.level-info:hover {
  background-color: #fefbeb !important; /* Slightly brighter amber/yellow tint */
}

/* Subtle Curation Highlight Class */
.field-highlight {
  outline: 2px solid var(--primary-color) !important;
  box-shadow: 0 0 10px rgba(116, 0, 17, 0.45) !important;
  background-color: rgba(116, 0, 17, 0.02) !important;
  transition: outline 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

/* Login Screen Atmosphere & Layout */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  padding: 2.5rem;
  box-sizing: border-box;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.login-logo-container {
  width: 56px;
  height: 56px;
  padding: 6px;
  margin: 0;
}

.login-brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.login-brand-info .banner-sub {
  margin-bottom: 0;
}

.login-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

/* Floating Sticky Circular Logout Button */
.floating-logout-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #ffffff;
  height: 48px;
  width: 48px;
  border-radius: 24px;
  padding: 0 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(116, 0, 17, 0.2), var(--shadow-medium);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.25s ease,
              background-color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  overflow: hidden;
  white-space: nowrap;
}

.floating-logout-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.floating-logout-btn .btn-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.floating-logout-btn:hover {
  width: 120px;
  color: #ffffff;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(144, 0, 21, 0.3), var(--shadow-high);
}

.floating-logout-btn:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

.floating-logout-btn:focus-within {
  width: 120px;
  color: #ffffff;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(144, 0, 21, 0.3), var(--shadow-high);
}

.floating-logout-btn:hover .btn-text,
.floating-logout-btn:focus-within .btn-text {
  opacity: 1;
}

.floating-logout-btn:hover svg,
.floating-logout-btn:focus-within svg {
  transform: translateX(-2px);
}

/* Source Choice Switcher Tabs */
.source-toggle-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  gap: 0.25rem;
}
.source-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}
.source-tab-btn:hover {
  color: var(--primary-color);
}
.source-tab-btn.active {
  background: #ffffff;
  color: var(--primary-color);
  box-shadow: var(--shadow-low);
}

.source-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.source-preview-container {
  background: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  max-height: 250px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  color: var(--text-primary);
}

.source-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: fit-content;
}

.source-status-badge.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.source-action-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Form Layout Container Spacing */
#ai-only-fields,
#official-source-fields,
.source-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Editable Curation Review Table Styling */
#review-sections-table td {
  padding: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

#review-sections-table input {
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  border-radius: 4px;
  background-color: var(--bg-color);
  box-shadow: none;
  width: 100%;
}

#review-sections-table input:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.section-reorder-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.section-reorder-btn:hover {
  color: var(--primary-color);
  background-color: rgba(15, 23, 42, 0.05);
}

.section-delete-btn {
  background: transparent;
  border: none;
  color: var(--priority-red);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.section-delete-btn:hover {
  background-color: var(--priority-red-bg);
}

/* Badge specific states for curation */
.badge.approved {
  background-color: var(--priority-green-bg);
  border-color: var(--priority-green-border);
  color: var(--priority-green-text);
}

.badge.drafted {
  background-color: var(--priority-yellow-bg);
  border-color: var(--priority-yellow-border);
  color: var(--priority-yellow-text);
}

/* Uploaded Visual Aids Styles */
.visual-aids-list-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.visual-aid-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.25rem;
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 8px;
  padding: 1rem;
  align-items: center;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.visual-aid-card:hover {
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  border-color: rgba(116, 0, 17, 0.15);
}

.visual-aid-thumbnail-wrap {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-aid-thumbnail {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.visual-aid-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.visual-aid-filename {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.visual-aid-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.visual-aid-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.visual-aid-input-group label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.visual-aid-input-group input {
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  border-radius: 4px;
}

.visual-aid-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

.visual-aid-btn-save {
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  background-color: var(--priority-green);
  border-color: var(--priority-green);
  color: white;
}

.visual-aid-btn-save:hover {
  background-color: var(--priority-green-text);
  border-color: var(--priority-green-text);
  color: white;
}

.visual-aid-btn-remove {
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  background-color: var(--priority-red);
  border-color: var(--priority-red);
  color: white;
}

.visual-aid-btn-remove:hover {
  background-color: var(--priority-red-text);
  border-color: var(--priority-red-text);
  color: white;
}

.upload-aid-box {
  background-color: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.upload-aid-box:hover {
  border-color: var(--primary-color);
}

/* Section Switcher Tabs & Active Panel Card for Curation Panel */
.editor-section-switcher {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.switcher-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
}

.switcher-pill:hover {
  color: var(--text-primary);
  background-color: #f1f5f9;
}

.switcher-pill.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: rgba(116, 0, 17, 0.06);
  font-weight: 600;
}

.editor-panel-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: none;
}

.editor-panel-section {
  display: none;
}

.editor-panel-section.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Ensure generous textarea height inside panel card */
.editor-panel-section textarea {
  min-height: 180px;
}

/* Delete button for library grid */
.btn-lib-delete {
  padding: 0.5rem !important;
  color: var(--primary-color) !important;
  border-color: rgba(116, 0, 17, 0.15) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-lib-delete:hover {
  color: var(--primary-hover) !important;
  border-color: var(--primary-color) !important;
  background-color: rgba(116, 0, 17, 0.05) !important;
}

/* Modal overlay styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.3); /* Soft midnight slate tint overlay */
  backdrop-filter: blur(4px); /* Premium soft blur */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.2s ease;
}

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

/* Modal card container */
.modal-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header h4 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.modal-body p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Delete confirmation button styled with cherry accent */
.confirm-delete-btn {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
}

.confirm-delete-btn:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}


