/* Variables */
:root {

  /* Button (light theme) */
  --button-bg: rgba(128, 128, 128, 0.15);
  --button-bg-hover: #fae9e1;
  --button-border: rgba(60, 60, 70, 0.1);
  --button-border-hover: #c0c0c0;
  --button-text: #222;
  --button-text-hover: rgba(0, 0, 0, 0.8);
  --button-danger-bg: rgba(245, 179, 53, 0.2);
  --button-neutral-bg: #f0f0f0;

  /* Text */
  --text-muted: #666;
  --sidebar-title: #333;
}

/* Dark theme overrides */
.dark {

  /* Buttons */
  --button-bg: rgba(60, 60, 70, 0.6);
  --button-bg-hover: rgba(80, 80, 90, 0.8);
  --button-border: rgba(60, 60, 70, 0.1);
  --button-border-hover: rgba(60, 60, 70, 0.3);
  --button-text: #e0e0e0;
  --button-danger-bg: rgba(220, 53, 69, 0.25);
  --button-neutral-bg: rgba(90, 90, 100, 0.5);

  /* Text */
  --text-muted: #a0a0a0;
  --sidebar-title: #f0f0f0;
}

/* Hide default Chainlit elements */

/* Built with Chainlit text in the footer */
.watermark,

/* Readme button in the header */
#readme-button,

/* Placeholder text in the input box */
#chat-input::before,

/* Thread share link */
#share-thread,

/* User nav button when in iframe */
body.in-iframe #user-nav-button {

  display: none !important;
}


/*******************************
 * Chat Messages
 *******************************/

/* Message spacing */
.ai-message .message-content {
  margin-bottom: 0.5rem !important;
}

/* Assistant message avatar */
.ai-message>.inline-block>span {
  width: 2.5rem !important;
  height: 1.5rem !important;
}

/* Hide copy-to-clipboard buttons on assistant messages */
.ai-message button:has(.lucide-copy),
.ai-message button[aria-label*="Copy"],
.ai-message button[data-testid="copy-button"] {
  display: none !important;
}

/* Feedback button styling */
.positive-feedback-off,
.positive-feedback-on,
.negative-feedback-off,
.negative-feedback-on,
button:has(.lucide-message-circle) {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.15rem 0.25rem !important;
  font-size: 0.75em !important;
  margin: 0 0.15rem !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
  opacity: 0.5 !important;
}

.positive-feedback-off::after,
.positive-feedback-on::after,
.negative-feedback-off::after,
.negative-feedback-on::after,
button:has(.lucide-message-circle)::after {
  display: none !important;
}

.positive-feedback-on {
  color: #22c55e !important;
}

.negative-feedback-on {
  color: #ef4444 !important;
}

button:has(.lucide-message-circle):hover {
  background-color: transparent !important;
}

/* Message links styling */
.message-link {
  /* border-radius: 10px; */
  /* color: #bf202c !important; */
  /* text-decoration: none !important; */
  /* line-height: 1.3 !important; */
  padding: 0.1rem 1rem !important;
  /* background-color: rgba(255, 242, 0, 0.3) !important; */
  /* border: 2px solid #bf202c !important; */
  /* font-family: "Inter", sans-serif !important; */
  /* font-weight: normal !important; */
  /* margin-left: 0 !important; */
  /* margin-right: 0 !important; */
}

/*******************************
 * Global Button Styles
 *******************************/

/* === Base Button Styles === */
button {
  color: var(--button-text) !important;
  position: relative;
  background-color: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 0.5rem !important;
  box-shadow: none !important;
  margin: 0 0.4rem !important;
}

button::after {
  display: none !important;
}

button:hover,
button[data-active="true"] {
  background-color: var(--button-bg-hover) !important;
  border-color: var(--button-border-hover) !important;
  color: var(--button-text-hover) !important;
}

/* === Special buttons ===*/

/* Sidebar rail button */
button[data-sidebar="rail"] {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  min-width: auto !important;
  right: initial !important;
  transform: initial !important;

  &::after {
    display: none !important;
  }
}

/* Threads list container */
div[data-sidebar="content"] {
  background-color: #ffffff !important;
  border-radius: 0.75rem !important;
  margin: 0.5rem !important;
  padding: 0.25rem 0 !important;
}

/* Sidebar thread button */
button[data-sidebar="menu-button"] {
  box-shadow: none !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border-radius: 0 !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  background-color: transparent !important;
}

button[data-sidebar="menu-button"]::after {
  display: none !important;
}

button[data-sidebar="menu-button"]:hover {
  background-color: rgba(0, 0, 0, 0.04) !important;
  border-left: 3px solid #f5b335 !important;
}

button[data-sidebar="menu-button"][data-active="true"] {
  background-color: #fae9e1 !important;
  border-left: 3px solid #f5b335 !important;
}

/* Allow thread names in sidebar to wrap */
button[data-sidebar="menu-button"] span.truncate {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  display: flex !important;
  flex-direction: column !important;
}

button[data-sidebar="menu-button"] {
  height: auto !important;
  min-height: 2rem !important;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

/* Thread name: profile name (first line) */
.thread-profile-name {
  display: block !important;
  font-weight: 500 !important;
}

/* Thread name: topic (second line, smaller and grey) */
.thread-topic {
  display: block !important;
  font-size: 0.8em !important;
  color: #777 !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}

.dark .thread-topic {
  color: #999 !important;
}

/* Thread options button (three dots) */
#thread-options {
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
}

/* Settings popin dropdown */
button[role="combobox"] {
  /* background: none !important; */
  /* border-width: 1px !important; */
  margin: 0 !important;
}

/* Profiles dropdown menu */
#chat-profiles {
  margin-left: 0.5rem !important;
}

/* New chat button */
#new-chat-button {
  margin-right: 1.5rem !important;
}

/* === Button Variants === */

/* Danger buttons */
button.danger {
  background-color: var(--button-danger-bg) !important;
}

/* === Sidebar Button Styles === */

/* Sidebar action buttons - positioning */
aside button {
  background-color: #ffffff !important;
}

aside button:hover,
aside button[data-active="true"] {
  background-color: #fae9e1 !important;
  border-color: #c0c0c0 !important;
}

aside #reset-button,
aside #show-facts-button,
aside #exit-button,
aside #ai-respond-button {
  zoom: 0.75 !important;
  position: absolute;
  bottom: 1rem;
}

aside #reset-button {
  right: 5.5rem;
}

aside #exit-button {
  right: 1.4rem;
}

aside #show-facts-button {
  right: 12.4rem;
}

aside #ai-respond-button {
  right: 21.5rem;
}

/* === Special Button Behaviors === */

/* Copy to clipboard buttons are already hidden above */

/* =====================================
 * Global interaction lock during AI play
 * Disables all button elements while the AI is "playing",
 * except the control button itself (#ai-respond-button).
 * ===================================== */
.ai-playing button {
  pointer-events: none !important;
}

.ai-playing button#ai-respond-button {
  pointer-events: auto !important;
}

/* Explicitly disable sidebar menu buttons during AI play */
.ai-playing button[data-sidebar="menu-button"] {
  pointer-events: none !important;
}


/*******************************
 * Language Switcher
 *
 * Displays language selection buttons (EN, ES) at the top right of the sidebar.
 *
 * Implementation Notes:
 * - Uses fixed positioning to overlay at top right of sidebar
 * - Scaled down to 75% size via zoom property
 * - Inherits button styles from global button definitions
 * - Component source: /app/public/elements/LanguageSwitcher.jsx
 * - Backend action: /app/actions/language.py (change_language)
 *
 * Related Files:
 * - Translation files: /app/.chainlit/translations/*.json
 * - UI config: /app/ui.toml (element: language_switcher)
 *******************************/

/* Base Container Styles */
#language-switcher {
  display: flex !important;
  gap: 0.2rem !important;
  /* Space between buttons */
}

/* Button Styles */
#language-switcher button {
  font-family: Arial, sans-serif !important;
  font-weight: 400 !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0.75rem !important;
}

/* Header Positioning - next to chat profiles */
#header #language-switcher {
  display: flex !important;
  align-items: center !important;
  margin-left: 0.5rem !important;
}

/* Hide in sidebar (legacy positioning) */
aside #language-switcher {
  display: none !important;
}

/* User profile button styling - override the red background */
#header button[aria-haspopup="menu"] span.bg-primary,
#header button span span.bg-primary {
  background: rgba(128, 128, 128, 0.15) !important;
  color: transparent !important;
  position: relative !important;
}

/* Hide the letter in user button */
#header button[aria-haspopup="menu"] span span.bg-primary {
  font-size: 0 !important;
}

/* Add user icon to profile button */
#header button[aria-haspopup="menu"] span span.bg-primary::before {
  content: "👤" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 16px !important;
  color: rgba(0, 0, 0, 0.75) !important;
}

/* Dark theme user icon */
.dark #header button[aria-haspopup="menu"] span span.bg-primary::before {
  color: rgba(255, 255, 255, 0.85) !important;
}

/*******************************
 * Admin Launcher - Header Integration
 *******************************/

/* Hide launcher until it's moved into the header */
#admin-launcher {
  display: none !important;
}

/* Display in the header, adjacent to the language switcher */
#header #admin-launcher {
  display: flex !important;
  align-items: center !important;
  margin-left: 0.2rem !important;
}

/* Icon button styling */
#header #admin-launcher .admin-launcher__button {
  min-height: 2.25rem !important;
  min-width: 2.25rem !important;
  padding: 0 !important;
  margin: 0 0.4rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Icon sizing */
#header #admin-launcher .admin-launcher__button svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

/*******************************
 * Feedback Button - Header Integration
 *******************************/

/* Hide feedback button until it's moved into the header */
#feedback-button {
  display: none !important;
}

/* Display in the header, adjacent to admin-launcher or language-switcher */
#header #feedback-button {
  display: flex !important;
  align-items: center !important;
  margin-left: 0.2rem !important;
}

/* Button styling with orange accent */
#header #feedback-button .feedback-button__button {
  min-height: 2.25rem !important;
  padding: 0 0.75rem !important;
  margin: 0 0.4rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  background-color: rgba(249, 115, 22, 0.15) !important;
  border: 1px solid rgba(249, 115, 22, 0.5) !important;
  color: rgb(194, 65, 12) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border-radius: 2rem !important;
  backdrop-filter: blur(2px) saturate(180%);
  box-shadow: 0 1px 8px rgba(31, 38, 135, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3) !important;
}

#header #feedback-button .feedback-button__button:hover {
  background-color: rgba(249, 115, 22, 0.25) !important;
  border: 1px solid rgba(249, 115, 22, 0.7) !important;
}

/* Dark theme adjustments */
.dark #header #feedback-button .feedback-button__button {
  background-color: rgba(249, 115, 22, 0.2) !important;
  border: 1px solid rgba(249, 115, 22, 0.4) !important;
  color: rgb(251, 146, 60) !important;
}

.dark #header #feedback-button .feedback-button__button:hover {
  background-color: rgba(249, 115, 22, 0.3) !important;
  border: 1px solid rgba(249, 115, 22, 0.6) !important;
}

/* Icon sizing */
#header #feedback-button .feedback-button__button svg {
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0 !important;
}

/*******************************
 * Sidebar Section Cards
 *******************************/

.sidebar-section {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 1rem;
  padding-bottom: 0.75rem;
}

.sidebar-section > *:not(.sidebar-section-header) {
  margin-left: 0.75rem !important;
  margin-right: 0.75rem !important;
}

.sidebar-section-header {
  background-color: #253149 !important;
  border-radius: 0 !important;
  padding: 0.5rem 0.75rem !important;
  align-items: center !important;
}

.sidebar-section-header h2 {
  color: #ffffff !important;
}

.sidebar-section-header svg {
  color: #f5b335 !important;
}

/* + and pencil icons inside headers */
.sidebar-section-header .text-muted-foreground {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-section-header .text-muted-foreground:hover {
  color: #ffffff !important;
}

/*******************************
 * Right Sidebar
 *******************************/

/* Sidebar container */
aside>div {
  background: #f0f2f5 !important;
  border: 0 !important;
  position: relative !important;
  padding-top: 3rem !important;
  /* Extra top padding for language switcher overlay */
}

/* Dark theme sidebar container */
.dark aside>div {
  background: #1a1f2e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Dark theme threads container */
.dark div[data-sidebar="content"] {
  background-color: #252b3b !important;
}

/* Dark theme thread buttons */
.dark button[data-sidebar="menu-button"] {
  color: #e0e0e0 !important;
}

.dark button[data-sidebar="menu-button"]:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

.dark button[data-sidebar="menu-button"][data-active="true"] {
  background-color: rgba(245, 179, 53, 0.15) !important;
}

/* Dark theme sidebar section cards */
.dark .sidebar-section {
  background: #252b3b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark .sidebar-section p,
.dark .sidebar-section span,
.dark .sidebar-section .text-gray-600,
.dark .sidebar-section .text-gray-500 {
  color: #c0c8d8 !important;
}

.dark .sidebar-section .text-gray-400 {
  color: #8090a8 !important;
}

.dark .sidebar-section .bg-gray-50 {
  background-color: #1a1f2e !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark theme sidebar buttons */
.dark aside button {
  background-color: #252b3b !important;
  color: #e0e0e0 !important;
}

.dark aside button:hover,
.dark aside button[data-active="true"] {
  background-color: rgba(245, 179, 53, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Sidebar background image - removed for rebranding */

/* Ensure sidebar content appears above background */
aside>div>* {
  position: relative;
  z-index: 1;
}

/* Sidebar icon color */
aside .icon {
  /* color: #bf202c; */
}

/* Sidebar title styling */
#side-view-title {
  background-image: none !important;
  color: var(--sidebar-title) !important;
  font-family: "Inter", sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: bold !important;
  line-height: 1.2 !important;
  margin-left: 2rem !important;
  margin-bottom: 1rem !important;
  padding-left: 1rem !important;
}

/* Dark theme title filter */
.dark #side-view-title {
  filter: brightness(1.2) !important;
}

/* Hide sidebar close button */
#side-view-title>button {
  display: none !important;
}

/* Sidebar content area */
#side-view-content {
  padding-bottom: 2.3rem 0 !important;
}

/*******************************
 * Action Cards
 *******************************/

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.action-card {
  background: #fae9e1;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: none;
  border: 2px solid #f5b335;
  transition: transform 0.3s ease;
  margin: 20px auto;
  max-width: 300px;
}

.action-card:hover {
  transform: translateY(-3px);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 15px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  font-family: "Inter", sans-serif !important;
}

.card-description {
  font-size: 14px;
  color: #59789d;
  margin-bottom: 20px;
}

.card-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: block !important;
  transition: background 0.2s;
  background-color: #f5b335 !important;
  color: #253149 !important;
  border: none !important;
  margin: 0 auto !important;
  min-width: 140px;
  font-family: "Inter", sans-serif !important;
}

.card-btn:hover {
  background-color: #e5a320 !important;
  color: #253149 !important;
}

/* Dark theme welcome cards */
.dark .action-card {
  background: #252b3b;
  border-color: #f5b335;
}

.dark .card-title {
  color: #e0e0e0;
}

.dark .card-description {
  color: #a0aec0;
}

/*******************************
 * Executive Debrief Styling
 *******************************/

.debrief-report {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin: 20px 0;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* H1 - Executive Report */
.debrief-report h1 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* H2 - Main section headers */
.debrief-report h2 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin: 20px 0 12px 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #f5b335 !important;
}

/* H3 - Subsection headers */
.debrief-report h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin: 15px 0 10px 0 !important;
}

/* Paragraphs */
.debrief-report p {
  color: #4a5568 !important;
  line-height: 1.6 !important;
  margin: 10px 0 !important;
}

.debrief-report ul {
  margin: 12px 0 !important;
  padding-left: 20px !important;
}

.debrief-report ul > li {
  color: #4a5568 !important;
  line-height: 1.6 !important;
  margin: 8px 0 !important;
}

/* Dark theme debrief report */
.dark .debrief-report {
  background: #252b3b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.dark .debrief-report h1 {
  color: #e0e0e0 !important;
}

.dark .debrief-report h2 {
  color: #e0e0e0 !important;
}

.dark .debrief-report h3 {
  color: #c0c8d8 !important;
}

.dark .debrief-report p {
  color: #a0aec0 !important;
}

.dark .debrief-report ul > li {
  color: #a0aec0 !important;
}

#side-view-content>.inline-custom {
  flex: 0 1 auto !important;
}


/* Debrief section styling */
aside .debrief {
  background-color: #fff !important;
  position: relative;

  .dark & {
    background-color: #000 !important;
    color: #fff !important;
  }
}

aside .debrief button {
  background-color: #fff !important;
  border: 0 !important;
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 1;
}

/*******************************
 * Step Display Styling
 *******************************/

/* Position step display within the title area */
.step-display {
  position: absolute !important;
  top: -30px !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  padding-left: 2rem !important;
}

/* Step display text color */
.step-display .text-muted-foreground {
  color: var(--text-muted) !important;
}

/* Make the content area relative so step display can position relative to it */
#side-view-content {
  position: relative !important;
}

/*******************************
 * Slider Styling
 *******************************/

/* Slider track (unfilled portion) - override bg-secondary */
[data-radix-collection-item] + span,
span.bg-secondary[class*="rounded-full"][class*="h-2"] {
  background-color: #cccccc !important;
}

/* Slider range (filled portion) - override bg-primary */
span.bg-primary[class*="absolute"][class*="h-full"] {
  background-color: #888888 !important;
}

/* Slider thumb (handle) - override border-primary */
span[class*="rounded-full"][class*="h-5"][class*="w-5"][class*="border-2"] {
  border-color: #666666 !important;
  background-color: #ffffff !important;
}

/* Slider thumb hover/focus state */
span[class*="rounded-full"][class*="h-5"][class*="w-5"][class*="border-2"]:hover,
span[class*="rounded-full"][class*="h-5"][class*="w-5"][class*="border-2"]:focus {
  border-color: #555555 !important;
}

/*******************************
 * Switch/Toggle Button Styling
 *******************************/

/* Switch button base styling */
input[type="checkbox"],
.switch,
.toggle,
[role="switch"] {
  background-color: #cccccc !important;
  /* Grey background (unchecked) */
}

/* Switch button checked state */
input[type="checkbox"]:checked,
.switch:checked,
.toggle:checked,
[role="switch"][aria-checked="true"] {
  background-color: #28a745 !important;
  /* Green background when checked */
}

/* Switch handles - always white */
input[type="checkbox"]::before,
.switch::before,
.toggle::before,
[role="switch"]::before {
  background-color: #ffffff !important;
}

/* Switch containers */
.switch-container:has(input:checked),
.toggle-container:has(input:checked) {
  background-color: #28a745 !important;
}

.switch-container:has(input:not(:checked)),
.toggle-container:has(input:not(:checked)) {
  background-color: #cccccc !important;
}

/*******************************
 * Tablet & Small Desktop Responsiveness
 *******************************/
@media (min-width: 769px) and (max-width: 1600px) {

  /* Adjust sidebar width for smaller desktop screens */
  aside {
    /* width: 340px !important; */
  }

  /* Adjust title styling */
  #side-view-title {
    font-size: 1rem !important;
    padding-left: 1rem !important;
    margin-left: 1rem !important;
  }

  /* Responsive button adjustments - stack vertically */
  aside #reset-button,
  aside #show-facts-button,
  aside #exit-button,
  aside #ai-respond-button {
    zoom: 0.7 !important;
    right: 1rem !important;
  }

  aside #ai-respond-button {
    bottom: 9rem !important;
  }

  aside #show-facts-button {
    bottom: 6.5rem !important;
  }

  aside #reset-button {
    bottom: 4rem !important;
  }

  aside #exit-button {
    bottom: 1.5rem !important;
  }
}

/*******************************
 * Small Tablet & Large Mobile Responsiveness
 *******************************/
@media (min-width: 600px) and (max-width: 768px) {

  /* Responsive button adjustments for small tablets */
  aside #reset-button,
  aside #show-facts-button,
  aside #exit-button,
  aside #ai-respond-button {
    zoom: 0.65 !important;
    right: 1rem !important;
  }

  aside #ai-respond-button {
    bottom: 8rem !important;
  }

  aside #show-facts-button {
    bottom: 6rem !important;
  }

  aside #reset-button {
    bottom: 4rem !important;
  }

  aside #exit-button {
    bottom: 2rem !important;
  }
}

/*******************************
 * Mobile Responsiveness
 *******************************/
@media (max-width: 768px) {

  /* Mobile header button adjustments - override base styles */
  #header button:not(#readme-button),
  #language-switcher button {
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }

  /* Adjust header spacing for mobile */
  #header div:last-child {
    gap: 4px !important;
  }

  #header div:last-child>button:last-child {
    margin-right: 8px !important;
  }

  /*
     * The mobile sidebar is a div[role="dialog"], not an <aside> element.
     * These styles target the mobile sidebar specifically for a full-screen, clean look.
     */

  /* Make sidebar full screen */
  div[role="dialog"][data-state="open"] {
    width: auto !important;
    height: 100% !important;
    left: 10% !important;
    right: 0 !important;
    padding: 1rem !important;
    border-radius: 0 !important;
    border: none !important;
  }

  #side-view-content {
    gap: 0 !important;
  }

  /* Align title to the left and add space below */
  div[role="dialog"][data-state="open"] #side-view-title {
    padding-left: 3.7rem !important;
    margin-left: 0 !important;
    text-align: left !important;
    margin-bottom: 1rem !important;
  }

  /* Remove backgrounds and borders from all content blocks */
  div[role="dialog"][data-state="open"] .bg-card {
    padding: 0.5rem !important;
  }

  div[role="dialog"][data-state="open"] .debrief {
    background-color: #FFF !important;
    box-shadow: none !important;
    padding: 0.4rem !important;
  }

  /* Clean up inner padding and margins for a seamless look */
  div[role="dialog"][data-state="open"] .bg-card>div[class*="p-"] {
    padding: 0 !important;
  }

  div[role="dialog"][data-state="open"] .space-y-4 {
    margin-top: 0 !important;
  }

  div[role="dialog"][data-state="open"] .mt-8 {
    margin-top: 1.5rem !important;
  }

  /* Hide unnecessary elements on mobile */
  button[data-state="closed"] svg[width="24"][height="24"],
  #new-progress-check-button,
  div[role="dialog"][data-state="open"] #ai-respond-button,
  div[role="dialog"][data-state="open"] #show-facts-button,
  div[role="dialog"][data-state="open"] #send-test-email-button {
    display: none !important;
  }

  /* Position remaining buttons at the bottom of the screen */
  div[role="dialog"][data-state="open"] #exit-button,
  div[role="dialog"][data-state="open"] #reset-button {
    position: fixed;
    bottom: 1.5rem;
    zoom: 0.9;
  }

  div[role="dialog"][data-state="open"] #exit-button {
    right: 1.5rem;
  }

  div[role="dialog"][data-state="open"] #reset-button {
    right: 6rem;
  }
}

/*******************************
 * Splash Screen Styles
 *******************************/

/* Splash screen container */
#ci-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s ease-out;
}

/* Hide splash screen when disabled globally */
body.splash-disabled #ci-splash-screen {
  display: none !important;
}

/* Dark mode splash background */
.dark #ci-splash-screen {
  background: #1a1a1a;
}

/* Fade out animation */
#ci-splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Splash content container */
.splash-content {
  text-align: center;
  animation: fadeInScale 0.8s ease-out;
}

/* Splash logo */
.splash-logo {
  width: 200px;
  height: auto;
  margin: 0 auto 2rem auto;
  display: block;
  animation: pulse 2s infinite;
}

/* Splash title */
.splash-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2rem;
  animation: slideUp 0.6s ease-out 0.3s both;
}

/* Dark mode title color */
.dark .splash-title {
  color: #f0f0f0;
}

/* Loading dots container */
.splash-loader {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Loading dots */
.splash-loader span {
  width: 10px;
  height: 10px;
  background: #f5b335;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

/* Dark mode loading dots */
.dark .splash-loader span {
  background: #f5c366;
}

/* Stagger the bounce animation */
.splash-loader span:nth-child(1) {
  animation-delay: -0.32s;
}

.splash-loader span:nth-child(2) {
  animation-delay: -0.16s;
}

.splash-loader span:nth-child(3) {
  animation-delay: 0s;
}

/* Splash screen animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hide "Listening" element (text + canvas) in header during STT recording */
/* Excludes the user nav container which also matches the base selector */
#header .flex.items-center.gap-1:has(.text-muted-foreground):not(:has(#user-nav-button)) {
  display: none !important;
}

/* Pulsating animation for voice recording indicator */
@keyframes voice-recording-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/*******************************
 * Voice Button Icon Replacement
 * Replace VoiceLines with Lucide Mic icon
 * Replace X with Lucide Check icon
 * Uses CSS mask technique for currentColor support
 *******************************/

/* === Start Recording: Replace VoiceLines with Mic === */

/* Hide the original VoiceLines SVG paths */
button:has(svg path[d^="M9.5 4C8.67157"]) svg {
  visibility: hidden !important;
}

/* Position button for pseudo-element */
button:has(svg path[d^="M9.5 4C8.67157"]) {
  position: relative !important;
}

/* Add Mic icon via ::before with mask for currentColor */
button:has(svg path[d^="M9.5 4C8.67157"])::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Crect x='9' y='2' width='6' height='13' rx='3'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Crect x='9' y='2' width='6' height='13' rx='3'/%3E%3C/svg%3E") !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  pointer-events: none !important;
}

/* === Stop Recording: Replace X with Check (or X in Live mode) === */
/* Scoped to #message-composer to avoid affecting other X icons */
/* When live mode is enabled (.live-mode-enabled class), show X icon instead of Check */

/* Hide the original X SVG */
#message-composer button:has(svg.lucide-x) svg,
#message-composer button:has(svg path[d^="M18 6"]) svg {
  visibility: hidden !important;
}

/* Position button for pseudo-element */
#message-composer button:has(svg.lucide-x),
#message-composer button:has(svg path[d^="M18 6"]) {
  position: relative !important;
}

/* Default: Check icon (non-live mode) */
#message-composer button:has(svg.lucide-x)::before,
#message-composer button:has(svg path[d^="M18 6"])::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  pointer-events: none !important;
}

/* Live mode: X icon (cancel/stop without sending) */
#message-composer.live-mode-enabled button:has(svg.lucide-x)::before,
#message-composer.live-mode-enabled button:has(svg path[d^="M18 6"])::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") !important;
}

/* === Recording State: Pulsating Red Ring === */
#message-composer button:has(svg.lucide-x)::after,
#message-composer button:has(svg path[d^="M18 6"])::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  background-color: transparent !important;
  border-radius: 50% !important;
  outline: 3px solid #dc2626 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  z-index: -1 !important;
  animation: voice-recording-pulse 2s ease-in-out infinite !important;
  pointer-events: none !important;
}

/*******************************
 * Voice Recording UI Collapse
 * Hide text input elements when recording
 * Animated transitions for smooth UX
 *******************************/

/* === Base Transitions for Smooth Animation === */

#message-composer {
  transition: min-height 0.3s ease, padding 0.3s ease,
              width 0.4s ease, margin 0.4s ease !important;
}

/* Textarea container */
#message-composer > div:first-child {
  transition: height 0.3s ease, max-height 0.3s ease, opacity 0.2s ease,
              margin 0.3s ease, padding 0.3s ease !important;
  overflow: hidden !important;
}

/* Settings button */
#chat-settings-open-modal {
  transition: opacity 0.2s ease, width 0.3s ease,
              margin 0.3s ease, padding 0.3s ease !important;
  overflow: hidden !important;
}

/* Submit button */
#chat-submit {
  transition: opacity 0.2s ease, width 0.3s ease,
              margin 0.3s ease, padding 0.3s ease !important;
  overflow: hidden !important;
}

/* === Recording State: Collapse UI === */
/* Detect recording via X/Check icon in voice button */

/* Shrink composer and center it */
#message-composer:has(button svg.lucide-x),
#message-composer:has(button svg path[d^="M18 6"]) {
  min-height: auto !important;
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0.35rem 0.5rem !important;
  gap: 0 !important;
}

/* Center the button row when recording */
#message-composer:has(button svg.lucide-x) > div:last-child,
#message-composer:has(button svg path[d^="M18 6"]) > div:last-child {
  justify-content: center !important;
}

/* Collapse textarea container */
#message-composer:has(button svg.lucide-x) > div:first-child,
#message-composer:has(button svg path[d^="M18 6"]) > div:first-child {
  height: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Hide settings button */
#message-composer:has(button svg.lucide-x) #chat-settings-open-modal,
#message-composer:has(button svg path[d^="M18 6"]) #chat-settings-open-modal {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Hide submit button */
#message-composer:has(button svg.lucide-x) #chat-submit,
#message-composer:has(button svg path[d^="M18 6"]) #chat-submit {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/*******************************
 * Custom Page Navigation
 *******************************/

/* Nav bar — sits between sidebar header and thread list */
#ci-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.125rem;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Nav item buttons */
.ci-nav-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: hsl(var(--sidebar-foreground) / 0.6);
  transition: background-color 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1;
}

.ci-nav-item:hover {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
}

.ci-nav-item[data-active="true"] {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 600;
}

.ci-nav-icon {
  display: flex;
  align-items: center;
}

.ci-nav-label {
  white-space: nowrap;
}

/* Custom page container — overlays center chat pane.
   Lives on document.body (outside React tree) for stability.
   Positioned to fill the area right of the sidebar. */
#ci-custom-page {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 2rem;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  z-index: 40;
}

/* Prevent flex children from shrinking — let container scroll */
#ci-custom-page > * {
  flex-shrink: 0;
}

#ci-custom-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

#ci-custom-page > p,
#ci-custom-page .dashboard-subtitle {
  color: hsl(var(--foreground) / 0.5);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.ci-page-loading {
  color: hsl(var(--foreground) / 0.4);
  font-style: italic;
  padding: 2rem;
}

.ci-page-error {
  color: hsl(var(--destructive));
  padding: 2rem;
}

/* ================================
   Tools Page — Profile Cards
   ================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 820px;
  width: 100%;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.tool-card:hover {
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.08);
  transform: translateY(-1px);
}

.tool-card:active {
  transform: translateY(0);
}

.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0.6rem;
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
}

.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.25rem 0 0;
}

.tool-card p {
  font-size: 0.82rem;
  color: hsl(var(--foreground) / 0.5);
  margin: 0;
  line-height: 1.4;
}

/* ================================
   Dashboard — My Journey
   ================================ */

.dashboard-stats {
  display: flex;
  gap: 1rem;
  max-width: 820px;
  width: 100%;
  margin-bottom: 1.25rem;
}

.stat-card {
  flex: 1;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: hsl(var(--primary));
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: hsl(var(--foreground) / 0.5);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Collapsible dashboard cards */
.dashboard-card {
  max-width: 820px;
  width: 100%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.dashboard-card summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 0.9rem;
}

.dashboard-card summary .spine-icon {
  margin-top: 0;
}

.dashboard-card summary::-webkit-details-marker {
  display: none;
}

.dashboard-card summary::after {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid hsl(var(--foreground) / 0.4);
  border-bottom: 2px solid hsl(var(--foreground) / 0.4);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.dashboard-card[open] summary::after {
  transform: rotate(45deg);
}

.card-title {
  font-weight: 600;
}

/* Unified journey section title — overrides global .card-title inside dashboard */
#ci-custom-page .journey-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: hsl(var(--foreground) / 0.75);
  font-family: inherit !important;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}

.card-preview {
  color: hsl(var(--foreground) / 0.4);
  font-size: 0.82rem;
  margin-left: auto;
  margin-right: 0.5rem;
}

/* Facts list */
.facts-list {
  padding: 0 1.25rem 1rem;
  margin: 0;
  list-style: none;
}

.facts-list li {
  padding: 0.5rem 0;
  border-top: 1px solid hsl(var(--border) / 0.5);
  font-size: 0.85rem;
  line-height: 1.45;
}

.facts-more {
  padding: 0 1.25rem 1rem;
  font-size: 0.8rem;
  color: hsl(var(--foreground) / 0.4);
  margin: 0;
}

/* Tools usage list */
.tools-usage-list {
  padding: 0 1.25rem 1rem;
}

.tool-usage {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-top: 1px solid hsl(var(--border) / 0.5);
  font-size: 0.85rem;
}

.tool-name {
  font-weight: 500;
}

.tool-count {
  color: hsl(var(--foreground) / 0.4);
}

/* Sessions list */
.sessions-list {
  padding: 0 1.25rem 0.5rem;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid hsl(var(--border) / 0.5);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s;
  cursor: pointer;
}

.session-row:hover {
  background: hsl(var(--accent) / 0.5);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.session-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-profile {
  font-size: 0.75rem;
  color: hsl(var(--foreground) / 0.4);
}

.session-date {
  font-size: 0.75rem;
  color: hsl(var(--foreground) / 0.4);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* Action block — progress + CTA combined */
.journey-action-block {
  max-width: 820px;
  width: 100%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
}

.journey-action-block .action-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: hsl(var(--foreground) / 0.7);
  margin: 0 0 1.25rem;
}

/* CTA button — !important overrides global button reset (transparent bg, border, margin) */
#ci-custom-page .journey-cta {
  display: inline-block;
  margin: 0.75rem 0 0 0 !important;
  padding: 0.7rem 1.75rem;
  background: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

#ci-custom-page .journey-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

#ci-custom-page .journey-cta:active {
  transform: translateY(0);
}

#ci-custom-page .journey-cta-continue {
  background: hsl(var(--primary) / 0.12) !important;
  color: hsl(var(--primary)) !important;
  border: 1px solid hsl(var(--primary) / 0.3) !important;
}

/* Progress bar */
.journey-progress {
  max-width: 820px;
  width: 100%;
  margin-bottom: 1.5rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.progress-label {
  font-size: 0.82rem;
  color: hsl(var(--foreground) / 0.6);
}

.progress-pct {
  font-size: 0.82rem;
  font-weight: 600;
  color: hsl(var(--primary));
}

.progress-track {
  width: 100%;
  height: 6px;
  background: hsl(var(--border));
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: hsl(var(--primary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Spine — gap + commitment always visible */
.journey-spine {
  max-width: 820px;
  width: 100%;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spine-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
}

.spine-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: hsl(var(--primary));
  margin-top: 1px;
}

.spine-icon svg {
  width: 18px;
  height: 18px;
}

.spine-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.spine-text {
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Next session callout */
.next-session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: hsl(var(--primary) / 0.06);
  border-radius: 0.5rem;
}

.next-session-label {
  font-size: 0.78rem;
  color: hsl(var(--foreground) / 0.5);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.next-session-date {
  font-size: 0.88rem;
  font-weight: 500;
  color: hsl(var(--primary));
}

/* Static card (non-collapsible) */
.dashboard-card-static {
  max-width: 820px;
  width: 100%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.card-static-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem 0;
}

.card-static-header .spine-icon {
  margin-top: 0;
}

/* Session entries in expanded session history */
.session-entry {
  padding: 0.75rem 0;
  border-top: 1px solid hsl(var(--border) / 0.5);
}

.session-row-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-row-num {
  font-weight: 600;
  font-size: 0.85rem;
}

.session-row-type {
  font-size: 0.75rem;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
}

.session-row-date {
  font-size: 0.75rem;
  color: hsl(var(--foreground) / 0.4);
  margin-left: auto;
}

.session-topics {
  margin: 0.35rem 0 0.25rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.session-topics li {
  font-size: 0.82rem;
  line-height: 1.4;
  color: hsl(var(--foreground) / 0.75);
}

.session-read-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: hsl(var(--primary));
  text-decoration: none;
}

.session-read-link:hover {
  text-decoration: underline;
}

/* Empty state */
.dashboard-empty {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 400px;
}

.dashboard-empty h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dashboard-empty p {
  font-size: 0.9rem;
  color: hsl(var(--foreground) / 0.5);
  margin: 0.25rem 0;
}
