/* Hamburger menu styles */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
  margin-right: var(--space-12);
}
.hamburger-menu span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 4px 0;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Show hamburger on desktop */
@media (min-width: 901px) {
  .hamburger-menu {
    display: flex;
  }
  
  /* Hide logout text on desktop, show only icon */
  #logout-btn .header-btn-text {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 80vw;
    max-width: 340px;
    position: fixed;
    top: 56px;
    left: -100vw;
    z-index: 150;
    height: calc(100vh - 56px);
    transition: left var(--duration-normal) var(--ease-standard);
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
  }
  .sidebar.active {
    left: 0;
  }
  .main-content {
    width: 100%;
    margin-left: 0;
  }
  .hamburger-menu {
    display: flex;
  }
  .header-actions button:not(#hamburger-menu) {
    display: none;
  }
  .mobile-header-actions {
    display: grid;
  }
  
  /* Hide text on mobile */
  .header-btn-text {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: flex;
  }
}

@media (min-width: 901px) {
  .hamburger-menu {
    display: flex !important;
  }
  .sidebar {
    position: relative;
    left: 0 !important;
    width: 320px;
    box-shadow: none;
  }
}
:root {
  /* Colors */
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);

  --tag-bg: var(--color-secondary);
  --tag-active-bg: var(--color-primary);
  --tag-active-text: var(--color-btn-primary-text);
  --color-select-caret: rgba(19, 52, 59, 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* AI Text Generation Styles */
  .ai-generating-text {
    color: #000000 !important; /* Negro temporal para visibilidad durante generación */
    background-color: rgba(227, 242, 253, 0.8) !important;
    transition: color 0.3s ease, background-color 0.3s ease;
  }

  .ai-generated-text {
    color: var(--color-text) !important; /* Volver al color normal del texto */
    background-color: transparent !important;
    transition: color 0.5s ease, background-color 0.5s ease;
  }

  /* Animación sutil para texto en generación */
  @keyframes ai-pulse {
    0%, 100% { 
      background-color: rgba(227, 242, 253, 0.8);
    }
    50% { 
      background-color: rgba(227, 242, 253, 0.4);
    }
  }

  .ai-generating-text {
    animation: ai-pulse 2s infinite;
  }

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: rgba(31, 33, 33, 1);
    --color-surface: rgba(38, 40, 40, 1);
    --color-text: rgba(245, 245, 245, 1);
    --color-text-secondary: rgba(167, 169, 169, 0.7);
    --color-primary: rgba(50, 184, 198, 1);
    --color-primary-hover: rgba(45, 166, 178, 1);
    --color-primary-active: rgba(41, 150, 161, 1);
    --color-secondary: rgba(119, 124, 124, 0.15);
    --color-secondary-hover: rgba(119, 124, 124, 0.25);
    --color-secondary-active: rgba(119, 124, 124, 0.3);
    --color-border: rgba(119, 124, 124, 0.3);
    --color-error: rgba(255, 84, 89, 1);
    --color-success: rgba(50, 184, 198, 1);
    --color-warning: rgba(230, 129, 97, 1);
    --color-warning-bg: rgba(41, 31, 24, 1);
    --color-warning-border: rgba(62, 47, 36, 1);
    --color-warning-text: rgba(230, 129, 97, 1);
    --color-info: rgba(167, 169, 169, 1);
    --color-focus-ring: rgba(50, 184, 198, 0.4);
    --color-btn-primary-text: rgba(19, 52, 59, 1);
    --color-card-border: rgba(119, 124, 124, 0.2);
    --color-card-border-inner: rgba(119, 124, 124, 0.15);
    --tag-bg: var(--color-secondary);
    --tag-active-bg: var(--color-primary);
    --tag-active-text: var(--color-btn-primary-text);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(119, 124, 124, 0.2);
    --color-border-secondary: rgba(119, 124, 124, 0.2);
    --color-select-caret: rgba(245, 245, 245, 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: 50, 184, 198;
    --color-error-rgb: 255, 84, 89;
    --color-warning-rgb: 230, 129, 97;
    --color-info-rgb: 167, 169, 169;
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  --color-background: rgba(31, 33, 33, 1);
  --color-surface: rgba(38, 40, 40, 1);
  --color-text: rgba(245, 245, 245, 1);
  --color-text-secondary: rgba(167, 169, 169, 0.7);
  --color-primary: rgba(50, 184, 198, 1);
  --color-primary-hover: rgba(45, 166, 178, 1);
  --color-primary-active: rgba(41, 150, 161, 1);
  --color-secondary: rgba(119, 124, 124, 0.15);
  --color-secondary-hover: rgba(119, 124, 124, 0.25);
  --color-secondary-active: rgba(119, 124, 124, 0.3);
  --color-border: rgba(119, 124, 124, 0.3);
  --color-error: rgba(255, 84, 89, 1);
  --color-success: rgba(50, 184, 198, 1);
  --color-warning: rgba(230, 129, 97, 1);
  --color-warning-bg: rgba(41, 31, 24, 1);
  --color-warning-border: rgba(62, 47, 36, 1);
  --color-warning-text: rgba(230, 129, 97, 1);
  --color-info: rgba(167, 169, 169, 1);
  --color-focus-ring: rgba(50, 184, 198, 0.4);
  --color-btn-primary-text: rgba(19, 52, 59, 1);
  --color-card-border: rgba(119, 124, 124, 0.15);
  --color-card-border-inner: rgba(119, 124, 124, 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --color-border-secondary: rgba(119, 124, 124, 0.2);
  --color-select-caret: rgba(245, 245, 245, 0.8);
  --tag-bg: var(--color-secondary);
  --tag-active-bg: var(--color-primary);
  --tag-active-text: var(--color-btn-primary-text);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for dark mode */
  --color-success-rgb: 50, 184, 198;
  --color-error-rgb: 255, 84, 89;
  --color-warning-rgb: 230, 129, 97;
  --color-info-rgb: 167, 169, 169;
}

[data-color-scheme="light"] {
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);
  --tag-bg: var(--color-secondary);
  --tag-active-bg: var(--color-primary);
  --tag-active-text: var(--color-btn-primary-text);

  /* RGB versions for light mode */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

/* App Header Styles */
.app-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-12) var(--space-20);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.app-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

/* Container for header buttons when on mobile */
.mobile-header-actions {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: var(--space-8);
  padding: var(--space-8) var(--space-16);
  border-bottom: 1px solid var(--color-border);
}

.mobile-header-actions .btn {
  width: 40px;
  height: 40px;
  padding: 0;
}

.mobile-header-actions .header-btn-text {
  display: none;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

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

.btn--primary:active {
  background: var(--color-primary-active);
}

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

.btn--secondary:hover {
  background: var(--color-secondary-hover);
}

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--purple {
  background: #8b5cf6;
  color: white;
  border: none;
}

.btn--purple:hover {
  background: #7c3aed;
}

.btn--purple:active {
  background: #6d28d9;
}

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

.btn--outline:hover {
  background: var(--color-secondary);
}

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

.btn--error:hover {
  background: rgba(var(--color-error-rgb), 0.9);
}

.btn--error:active {
  background: var(--color-error);
  opacity: 0.9;
}

.btn--success {
  background: var(--color-success);
  color: white;
  border: none;
}

.btn--success:hover {
  background: rgba(var(--color-success-rgb), 0.9);
}

.btn--success:active {
  background: rgba(var(--color-success-rgb), 0.8);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

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

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

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

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

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

/* Hide editor when no note selected */
.editor-container.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
    format('woff2');
}

/* App-specific styles */
.app-container {
    display: flex;
    height: calc(100vh - 56px); /* Subtract header height */
    background-color: var(--color-background);
}

/* Sidebar styles */
.sidebar {
    width: 320px;
    background-color: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: var(--space-20) var(--space-16) var(--space-12);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.sidebar-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--color-text);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-actions {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.notes-action-btn {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.search-container {
    padding: var(--space-16);
    position: relative;
}

.search-container .form-control {
    padding-left: var(--space-32);
}

.search-icon {
    position: absolute;
    left: var(--space-24);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* View mode toggle */
.view-mode-toggle {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    padding: 0 var(--space-16);
}

.view-mode-btn {
    flex: 1;
    font-size: var(--font-size-xs);
    padding: var(--space-6) var(--space-8);
    transition: all var(--duration-fast) var(--ease-standard);
}

.view-mode-btn.active {
    background-color: var(--color-primary);
    color: var(--color-btn-primary-text);
    border-color: var(--color-primary);
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8);
}

/* Folder tree styles */
.folder-tree {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8);
}

.folder-item {
    display: flex;
    align-items: center;
    padding: var(--space-8) var(--space-12);
    margin-bottom: var(--space-4);
    cursor: pointer;
    border-radius: var(--radius-base);
    transition: all var(--duration-fast) var(--ease-standard);
    user-select: none;
}

.folder-item:hover {
    background-color: var(--color-secondary);
}

.folder-item.expanded {
    background-color: var(--color-secondary-soft);
}

.folder-toggle {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-8);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-standard);
}

.folder-toggle.expanded {
    transform: rotate(90deg);
}

.folder-icon {
    margin-right: var(--space-8);
    color: var(--color-warning);
    font-size: var(--font-size-sm);
}

.folder-name {
    flex: 1;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.folder-actions {
    display: none;
    gap: var(--space-4);
    margin-left: var(--space-8);
}

.folder-item:hover .folder-actions {
    display: flex;
}

.folder-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    transition: all var(--duration-fast) var(--ease-standard);
}

.folder-action-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text);
}

.folder-children {
    margin-left: var(--space-24);
    border-left: 1px solid var(--color-border-secondary);
    padding-left: var(--space-12);
}

.folder-note-item {
    display: flex;
    align-items: center;
    padding: var(--space-8) var(--space-12);
    margin-bottom: var(--space-4);
    cursor: pointer;
    border-radius: var(--radius-base);
    transition: all var(--duration-fast) var(--ease-standard);
    border: 1px solid transparent;
    position: relative;
}

.folder-note-item:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-border);
}

.folder-note-item.active {
    background-color: var(--color-primary);
    color: var(--color-btn-primary-text);
    border-color: var(--color-primary);
}

.folder-note-icon {
    margin-right: var(--space-8);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
}

.folder-note-item.active .folder-note-icon {
    color: var(--color-btn-primary-text);
}

.folder-note-title {
    flex: 1;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-note-actions {
    display: flex;
    gap: var(--space-4);
    margin-left: var(--space-8);
    align-items: center;
}

.folder-note-item:hover .folder-note-actions {
    display: flex;
}

.folder-note-action-btn {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    transition: all var(--duration-fast) var(--ease-standard);
    flex-shrink: 0;
}

.folder-note-action-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text);
}

.folder-note-action-btn[data-action="delete"]:hover {
    background-color: var(--color-error);
    color: white;
}

.folder-note-item.active .folder-note-action-btn {
    color: var(--color-btn-primary-text);
}

.folder-note-item.active .folder-note-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-btn-primary-text);
}

.folder-note-item.active .folder-note-action-btn[data-action="delete"]:hover {
    background-color: var(--color-error);
    color: white;
}

.empty-folder {
    padding: var(--space-16);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-style: italic;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8);
}

.note-item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-16);
    margin-bottom: var(--space-8);
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    border: 1px solid transparent;
    position: relative;
}

.note-item-content {
    flex: 1;
    min-width: 0;
}

.note-item-actions {
    display: none;
    margin-left: var(--space-8);
    flex-shrink: 0;
}

.note-item:hover .note-item-actions {
    display: flex;
}

.note-delete-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    transition: all var(--duration-fast) var(--ease-standard);
}

.note-delete-btn:hover {
    background-color: var(--color-error);
    color: white;
}

.note-item.active .note-delete-btn {
    color: var(--color-btn-primary-text);
}

.note-item.active .note-delete-btn:hover {
    background-color: var(--color-error);
    color: white;
}

.note-item:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-border);
}

.note-item.overwritten {
    box-shadow: 0 0 0 2px var(--color-warning);
}

.note-item.active {
    background-color: var(--color-primary);
    color: var(--color-btn-primary-text);
    border-color: var(--color-primary);
}

.note-item-title {
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-base);
}

.note-item-preview {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item.active .note-item-preview {
    color: rgba(255, 255, 255, 0.8);
}

.note-item-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-4);
}

.note-item.active .note-item-date {
    color: rgba(255, 255, 255, 0.7);
}

/* Main content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.toolbar {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-16) var(--space-20);
    display: flex;
    gap: var(--space-32);
    overflow-x: auto;
    min-width: fit-content;
}

.toolbar::-webkit-scrollbar {
    height: 3px;
}

.toolbar::-webkit-scrollbar-track {
    background: transparent;
}

.toolbar::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.3);
    border-radius: 3px;
}

.toolbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-primary-rgb), 0.5);
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    min-width: 0;
    flex-shrink: 1;
}

#transcription-section {
    flex-shrink: 0;
    min-width: fit-content;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.collapse-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 16px;
    padding: 0;
    display: none;
    cursor: pointer;
}

.collapsible.collapsed .collapse-toggle i {
    transform: rotate(180deg);
}

.toolbar-section h3 {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* New horizontal transcription controls */
.transcription-controls-horizontal {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    overflow-x: auto;
    white-space: nowrap;
    padding: var(--space-8) 0;
    min-width: fit-content;
}

.transcription-controls-horizontal::-webkit-scrollbar {
    height: 3px;
}

.transcription-controls-horizontal::-webkit-scrollbar-track {
    background: transparent;
}

.transcription-controls-horizontal::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.3);
    border-radius: 3px;
}

.transcription-controls-horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-primary-rgb), 0.5);
}

.transcription-btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    padding: var(--space-6) var(--space-12);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

/* Legacy transcription controls (remove these) */
.transcription-controls {
    display: none;
}

.transcription-grid {
    display: none;
}

.transcription-grid button {
    display: none;
}

@media (max-width: 768px) {
    /* Show text labels on buttons in mobile */
    .transcription-controls-horizontal .transcription-btn span {
        display: inline;
    }
    
    .recording-status .status-text {
        display: none;
    }
}

.recording-status {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    padding: var(--space-6) var(--space-12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-background-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.recording-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-text-secondary);
    transition: all var(--duration-fast) var(--ease-standard);
}

.recording-indicator.active {
    background-color: var(--color-error);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Legacy AI Controls (for sidebar if still used elsewhere) */
.sidebar .ai-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.sidebar .ai-controls .btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    padding: var(--space-6) var(--space-12);
}

.sidebar .ai-controls .keep-original-label {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    margin-bottom: 0;
}

.ai-icon {
    font-size: var(--font-size-sm);
}

/* Undo button specific styling */
#undo-ai-btn {
    border-color: var(--color-border-secondary);
    color: var(--color-text-secondary);
    transition: all var(--duration-fast) var(--ease-standard);
}

#undo-ai-btn:not(:disabled):hover {
    border-color: var(--color-warning);
    color: var(--color-warning);
    background-color: rgba(var(--color-warning-rgb), 0.05);
}

#undo-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#undo-ai-btn:disabled:hover {
    border-color: var(--color-border-secondary);
    color: var(--color-text-secondary);
    background-color: transparent;
}

.ai-btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    white-space: nowrap;
}

.ai-icon {
    font-size: var(--font-size-sm);
}

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

/* Editor styles */
.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-header {
    padding: var(--space-16) var(--space-20);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

/* Align note title and actions on a single line */
#note-header .section-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-8);
}

#note-header .section-header .editor-actions {
    justify-self: center;
}

.note-title {
    flex: 1;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    border: none;
    background: transparent;
    color: var(--color-text);
}

.note-title:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

.editor-actions {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.audio-row {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-top: 0;
}

.audio-select {
    width: 200px;
    flex: 0 0 auto;
    height: 40px;
}

.audio-player {
    width: 100%;
    margin-top: var(--space-8);
    flex: 0 0 100%;
    height: 32px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    accent-color: var(--color-primary);
}

.formatting-toolbar {
    padding: var(--space-12) var(--space-20);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

/* AI Enhancement Toolbar */
.ai-enhancement-toolbar {
    padding: var(--space-12) var(--space-20);
    border-bottom: 1px solid var(--color-border);
    background-color: rgba(var(--color-primary-rgb), 0.02);
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
}

.ai-enhancement-toolbar::-webkit-scrollbar {
    height: 3px;
}

.ai-enhancement-toolbar::-webkit-scrollbar-track {
    background: transparent;
}

.ai-enhancement-toolbar::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.3);
    border-radius: 3px;
}

.ai-enhancement-toolbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-primary-rgb), 0.5);
}

.ai-controls-horizontal {
    display: flex;
    gap: var(--space-8);
    align-items: center;
    min-width: fit-content;
}

.ai-controls-horizontal .btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    padding: var(--space-6) var(--space-12);
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-controls-horizontal .keep-original-label {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.format-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all var(--duration-fast) var(--ease-standard);
}

.format-btn:hover {
    background-color: var(--color-secondary);
}

.format-btn.active {
    background-color: var(--color-primary);
    color: var(--color-btn-primary-text);
}

.header-text {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-family-mono);
}

.format-separator {
    width: 1px;
    height: 20px;
    background-color: var(--color-border);
    margin: 0 var(--space-4);
}

.editor-content {
    flex: 1;
    padding: var(--space-20);
    overflow-y: auto;
    position: relative;
}

.editor {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: transparent;
    resize: none;
    min-height: 300px;
}

.editor.read-only {
    background-color: var(--color-surface);
    cursor: default;
}

@media (max-width: 768px) {
    .editor {
        font-size: 16px;
    }
}

.editor:empty::before {
    content: attr(placeholder);
    color: var(--color-text-secondary);
    pointer-events: none;
}

.editor p {
    margin: 0 0 var(--space-16) 0;
}

.editor h1,
.editor h2,
.editor h3,
.editor h4,
.editor h5,
.editor h6 {
    margin: var(--space-20) 0 var(--space-12) 0;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    line-height: 1.3;
}

.editor h1 {
    font-size: 1.875rem; /* 30px */
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--space-8);
}

.editor h2 {
    font-size: 1.5rem; /* 24px */
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-4);
}

.editor h3 {
    font-size: 1.25rem; /* 20px */
}

.editor ul, .editor ol {
    margin: 0 0 var(--space-16) 0;
    padding-left: var(--space-24);
}

.editor li {
    margin-bottom: var(--space-4);
}

.editor strong {
    font-weight: var(--font-weight-semibold);
}

.editor em {
    font-style: italic;
}

.editor u {
    text-decoration: underline;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-surface);
    margin: auto;
    padding: var(--space-24);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 80%;
    max-width: 700px;
    box-shadow: var(--shadow-lg);
    position: relative;
}


/* Login screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.login-screen.hidden {
    display: none;
}

.login-box {
    text-align: center;
    background-color: var(--color-surface);
    padding: var(--space-24);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 80%;
    max-width: 400px;
}

.login-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin: 0 auto var(--space-16) auto;
}

.login-box h3 {
    margin-bottom: var(--space-32);
}

/* Align login button */
.login-box .modal-actions {
    justify-content: center;
    margin-top: var(--space-16);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: var(--space-8);
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.toggle-password:focus {
    outline: none;
}

.modal-content--wide {
    max-width: 700px;
    width: 95%;
}

.modal-content h3 {
    margin: 0 0 var(--space-16) 0;
    color: var(--color-text);
}

.modal-content p {
    margin: 0 0 var(--space-24) 0;
    color: var(--color-text-secondary);
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
  /* Add some padding to the right to account for the scrollbar */
  padding-right: var(--space-8);
  /* Negative margin to compensate for the padding */
  margin-right: calc(-1 * var(--space-8));
}

.modal-actions {
    display: flex;
    gap: var(--space-12);
    justify-content: flex-end;
}

/* Node filter modal styles */
.filter-section {
    margin-bottom: var(--space-20);
    padding: var(--space-16);
    background-color: var(--color-surface);
    border-radius: var(--radius-base);
    border: 1px solid var(--color-border);
}

.filter-section h4 {
    margin: 0 0 var(--space-12) 0;
    color: var(--color-text);
    font-size: var(--font-size-base);
    font-weight: 600;
}

.filter-section p {
    margin: 0 0 var(--space-12) 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.concept-exclusion-container,
.concept-inclusion-container {
    margin-bottom: var(--space-16);
}

.concept-exclusion-container textarea,
.concept-inclusion-container textarea {
    min-height: 100px;
    resize: vertical;
    font-family: var(--font-body);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    padding: var(--space-12);
    transition: border-color 0.2s ease;
}

.concept-exclusion-container textarea:focus,
.concept-inclusion-container textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.concept-exclusion-stats,
.concept-inclusion-stats {
    padding: var(--space-12);
    background-color: var(--color-background);
    border-radius: var(--radius-base);
    border: 1px solid var(--color-border);
}

.exclusion-count,
.inclusion-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.help-text {
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
    line-height: 1.4;
}

.help-text i {
    margin-top: 2px;
    color: var(--color-primary);
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8);
    background-color: var(--color-surface);
    border-radius: var(--radius-base);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.loading-indicator.hidden {
    display: none;
}

.concept-removal-btn {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.concept-removal-btn:hover {
    background-color: var(--color-surface);
    border-color: var(--color-primary);
}

.drop-zone {
    border: 2px dashed var(--color-border);
    padding: var(--space-24);
    text-align: center;
    border-radius: var(--radius-base);
    color: var(--color-text-secondary);
}
.drop-zone.highlight {
    border-color: var(--color-primary);
    background-color: var(--color-surface);
}

/* Model download buttons */
.model-btns {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
    margin-bottom: var(--space-16);
}

/* Processing overlay */
.processing-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.processing-overlay.active {
    display: flex;
}

.processing-content {
    background-color: var(--color-surface);
    padding: var(--space-24);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-secondary);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-content p {
    margin: 0;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* Container for streaming \<think\> content */
#processing-text {
    max-width: 80vw;
    width: 100%;
    max-height: 30vh;
    overflow-y: auto;
    padding: var(--space-8);
    box-sizing: border-box;
    white-space: pre-wrap;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-background);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: var(--space-16);
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 var(--space-8) 0;
    color: var(--color-text);
}

.empty-state p {
    margin: 0;
    max-width: 300px;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-logo {
        width: 28px;
        height: 28px;
    }
    
    .app-title {
        font-size: var(--font-size-lg);
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 56px; /* Account for header height */
        left: -100%;
        z-index: 100;
        height: calc(100vh - 56px); /* Subtract header height */
        transition: left var(--duration-normal) var(--ease-standard);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }
    
    .toolbar {
        flex-direction: column;
        gap: var(--space-16);
    }

    /* Transcription Tools responsive */
    .transcription-controls-horizontal {
        gap: var(--space-6);
        padding: var(--space-6) 0;
    }

    .transcription-btn {
        font-size: var(--font-size-xs);
        padding: var(--space-4) var(--space-8);
    }

    .recording-status {
        padding: var(--space-4) var(--space-8);
        font-size: var(--font-size-xs);
    }
    
    .ai-controls {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* AI Enhancement Toolbar responsive */
    .ai-enhancement-toolbar {
        padding: var(--space-8) var(--space-12);
    }

    .ai-controls-horizontal {
        gap: var(--space-6);
    }

    .ai-controls-horizontal .btn {
        font-size: var(--font-size-xs);
        padding: var(--space-4) var(--space-8);
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-12);
    }

    #note-header .section-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    #note-header .section-header .editor-actions {
        width: 100%;
    }
    
    .editor-actions {
        justify-content: center;
    }

    /* Hide action button text on mobile */
    #save-text,
    #download-text,
    #delete-text {
        display: none;
    }

    /* Center audio dropdown with buttons on sides */
    .audio-row {
        justify-content: center;
        width: 100%;
        margin-top: var(--space-8);
    }
    #audio-select {
        flex: 1 1 auto;
        width: auto;
        height: 40px;
    }

    .collapse-toggle {
        display: inline-flex;
    }

    .collapsible.collapsed .section-content {
        display: none;
    }
}

@media (max-width: 767px) {
    .modal {
        align-items: flex-start;
        overflow-y: auto;
        padding-top: var(--space-24);
        padding-bottom: var(--space-24);
    }

    .modal-content,
    .modal-content--wide {
        margin-top: auto;
        margin-bottom: auto;
    }
}

/* Utility classes for states */
.fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-standard);
}

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

.slide-in {
    animation: slideIn var(--duration-normal) var(--ease-standard);
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Animación shake para feedback visual */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Configuration modal styles */
.config-section {
    margin-bottom: var(--space-20);
}

.config-group-title {
    margin: var(--space-12) 0 var(--space-4) 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.config-section h4,
.config-section h5 {
    margin: 0 0 var(--space-8) 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.config-section small {
    display: block;
    margin-top: var(--space-4);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.model-config {
    margin-bottom: var(--space-12);
}

.api-key-group {
    margin-bottom: var(--space-12);
}

.form-label {
    display: block;
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

/* Advanced configuration styles */
.advanced-config {
    background: var(--color-background-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-16);
    border: 1px solid var(--color-border-secondary);
}

.config-row {
    display: flex;
    gap: var(--space-16);
    margin-bottom: var(--space-16);
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-col {
    flex: 1;
}

.range-control {
    width: 100%;
    height: 6px;
    margin: var(--space-8) 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border);
    border-radius: var(--radius-full);
    outline: none;
    transition: background var(--duration-fast) var(--ease-standard);
}

.range-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-fast) var(--ease-standard);
}

.range-control::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.range-control::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-fast) var(--ease-standard);
}

.range-control::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.range-value {
    display: inline-block;
    min-width: 3rem;
    text-align: center;
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    background: var(--color-background);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-left: var(--space-8);
}

@media (max-width: 640px) {
    .config-row {
        flex-direction: column;
        gap: var(--space-12);
    }
    
    .range-value {
        margin-left: 0;
        margin-top: var(--space-4);
    }
}

/* Estilos para configuración de estilos de mejora */
.modal-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-20);
    line-height: var(--line-height-normal);
}

.styles-config-container {
    max-height: 60vh;
    overflow-y: auto;
}

.styles-grid {
    display: grid;
    gap: var(--space-16);
}

.style-config-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-12);
    padding: var(--space-16);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: all var(--duration-fast) var(--ease-standard);
    position: relative;
}

.style-config-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.style-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: var(--space-2);
}

.style-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.style-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    transition: background-color var(--duration-fast) var(--ease-standard);
    border-radius: var(--radius-full);
}

.style-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform var(--duration-fast) var(--ease-standard);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.style-toggle input:checked + .style-toggle-slider {
    background-color: var(--color-primary);
}

.style-toggle input:checked + .style-toggle-slider:before {
    transform: translateX(20px);
}

.style-info {
    flex: 1;
    min-width: 0;
}

.style-header {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-6);
}

.style-icon {
    font-size: var(--font-size-lg);
    line-height: 1;
}

.style-name {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    font-size: var(--font-size-base);
    margin: 0;
}

.style-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-8);
}

.style-prompt {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-12);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: var(--line-height-normal);
    max-height: 100px;
    overflow-y: auto;
}

.style-config-item.disabled {
    opacity: 0.6;
}

.style-config-item.disabled .style-info {
    opacity: 0.7;
}

/* Estilos para el modal de configuración de estilos mejorado */
.add-style-form {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-20);
    margin-bottom: var(--space-24);
}

.add-style-form h4 {
    margin: 0 0 var(--space-16) 0;
    color: var(--color-text);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-16);
    margin-bottom: var(--space-16);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-16);
}

.styles-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-24) 0;
    position: relative;
}

.styles-divider::before {
    content: "Estilos Existentes";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-surface);
    padding: 0 var(--space-16);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

/* Improved styles for existing styles grid items */
.style-config-item {
    position: relative;
}

.style-config-item.custom-style .style-header {
    padding-right: var(--space-32);
}

.delete-style-btn {
    position: absolute;
    top: var(--space-16);
    right: var(--space-16);
    width: 24px;
    height: 24px;
    border: none;
    background: var(--color-error);
    color: white;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    transition: all var(--duration-fast) var(--ease-standard);
    opacity: 0.8;
}

.delete-style-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.style-config-item.custom-style {
    border-left: 3px solid var(--color-primary);
}

@media (max-width: 640px) {
    .modal-content--wide {
        width: 98%;
        max-width: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    
    .add-style-form {
        padding: var(--space-16);
    }
}

/* Extra mobile responsive improvements */
@media (max-width: 480px) {
    .modal-content,
    .modal-content--wide {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: var(--space-12) var(--space-8);
        overflow-y: auto;
        box-sizing: border-box;
    }
    .modal-actions {
        flex-direction: column;
        gap: var(--space-8);
        width: 100%;
    }
    .modal-content h3 {
        font-size: var(--font-size-lg);
    }
    .modal-content p,
    .modal-description {
        font-size: var(--font-size-sm);
    }
    .form-control,
    select,
    textarea,
    input[type="text"] {
        font-size: var(--font-size-base);
        min-height: 44px;
        padding: var(--space-8);
    }
    .btn,
    button {
        font-size: var(--font-size-base);
        min-height: 44px;
        padding: var(--space-8) var(--space-16);
    }
    .add-style-form {
        padding: var(--space-8);
    }
    .styles-config-container {
        max-height: 60vh;
    }
    .styles-grid {
        gap: var(--space-8);
    }
    .style-config-item {
        flex-direction: column;
        gap: var(--space-8);
        padding: var(--space-8);
    }
    .delete-style-btn {
        top: var(--space-8);
        right: var(--space-8);
    }
}

@media (max-width: 375px) {
    .modal-content,
    .modal-content--wide {
        padding: var(--space-4);
    }
    .btn,
    button {
        font-size: var(--font-size-sm);
        min-height: 38px;
        padding: var(--space-4) var(--space-8);
    }
    .form-control,
    select,
    textarea,
    input[type="text"] {
        font-size: var(--font-size-sm);
        min-height: 38px;
        padding: var(--space-4);
    }
}

/* Checkbox styling for transcription options */
.checkbox-group {
    margin: var(--space-8) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    margin-bottom: var(--space-8);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    position: relative;
    transition: all var(--duration-fast) var(--ease-standard);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid var(--color-btn-primary-text);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-standard);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.checkbox-label:hover .checkmark {
    border-color: var(--color-primary);
}

/* Help text styling */
.help-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin: var(--space-4) 0;
}

/* Model selector styling improvements */
.model-config select {
    background-size: 16px;
    background-position: right var(--space-12) center;
}

.model-config textarea {
    min-height: 60px;
    resize: vertical;
    font-family: var(--font-family-base);
}

/* Streaming indicator for real-time feedback */
.streaming-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    margin-left: var(--space-8);
    animation: pulse 1.5s infinite;
}

@keyframes streaming-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.streaming-indicator.active {
    animation: streaming-pulse 1.5s infinite;
}

/* Streaming transcription text styling */
.streaming-transcription {
    background: linear-gradient(90deg, #e8f5e8 0%, #f0f9f0 100%);
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 3px solid var(--color-success);
    font-style: italic;
    opacity: 0.9;
    animation: streaming-glow 2s ease-in-out infinite;
}

@keyframes streaming-glow {
    0% { box-shadow: 0 0 0 rgba(76, 175, 80, 0.2); }
    50% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.4); }
    100% { box-shadow: 0 0 0 rgba(76, 175, 80, 0.2); }
}

/* Tag system */
.tag-filter-bar {
    display: none;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-8) var(--space-16);
    border-bottom: 1px solid var(--color-border);
}

.tag-badge {
    padding: 2px var(--space-8);
    border-radius: 999px;
    background: var(--tag-bg, var(--color-secondary));
    color: var(--color-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.remove-tag {
    margin-left: 4px;
    cursor: pointer;
}

.tag-badge.active {
    background: var(--tag-active-bg, var(--color-primary));
    color: var(--tag-active-text, var(--color-btn-primary-text));
}

.note-tags {
    padding: var(--space-8) var(--space-20);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.current-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
}

.tag-input {
    border: none;
    outline: none;
    min-width: 80px;
    padding: 2px var(--space-8);
    font-size: var(--font-size-sm);
}

.available-tags-section {
    border-top: 1px solid var(--color-border-light, rgba(0,0,0,0.1));
    padding-top: var(--space-8);
}

.available-tags-container {
    max-height: 60px;
    overflow: hidden;
}

.available-tags-scroll {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    padding-bottom: var(--space-4);
}

.available-tags-scroll::-webkit-scrollbar {
    height: 4px;
}

.available-tags-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.available-tags-scroll::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.available-tags-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

.available-tag-badge {
    padding: 2px var(--space-8);
    border-radius: 999px;
    background: var(--color-secondary-light, var(--color-secondary));
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.1));
    transition: all 0.2s ease;
}

.available-tag-badge:hover {
    background: var(--color-primary-light, var(--color-primary));
    color: var(--color-btn-primary-text);
    transform: translateY(-1px);
}

/* Upload warning styles */
.upload-warning {
    background: var(--color-warning-bg, #fff3cd);
    border: 1px solid var(--color-warning-border, #ffecb5);
    border-radius: var(--radius-base);
    padding: var(--space-12);
    margin: var(--space-16) 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-8);
    color: var(--color-warning-text, #856404) !important;
}

.upload-warning i {
    color: var(--color-warning, #856404);
    margin-top: 2px;
}

.upload-warning strong {
    color: var(--color-warning-text, #856404) !important;
}

.upload-warning p {
    margin: 0;
    color: var(--color-warning-text, #856404) !important;
    font-size: var(--font-size-sm);
}

/* Upload progress styles */
.upload-progress-section {
    margin-top: var(--space-24);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
}

.upload-progress-section h4 {
    margin: 0 0 var(--space-16) 0;
    color: var(--color-text);
    font-size: var(--font-size-base);
}

.file-upload-item {
    margin-bottom: var(--space-12);
    padding: var(--space-12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    background: var(--color-surface);
}

.file-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

.file-upload-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.file-upload-size {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
}

.file-upload-status {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    margin-left: auto;
}

.file-upload-status.success {
    color: var(--color-success);
}

.file-upload-status.error {
    color: var(--color-error);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: var(--space-4);
}

.progress-bar {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar.complete {
    background-color: var(--color-success);
}

.progress-bar.error {
    background-color: var(--color-error);
}

.progress-percentage {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-4);
    text-align: right;
}

.upload-complete-message {
    background-color: rgba(33, 128, 141, 0.1);
    border: 1px solid rgba(33, 128, 141, 0.3);
    border-radius: var(--radius-base);
    padding: var(--space-12);
    margin-top: var(--space-16);
    text-align: center;
}

.upload-complete-message .message-icon {
    color: var(--color-success);
    margin-right: var(--space-8);
}

.upload-complete-message .message-text {
    color: var(--color-text);
    font-weight: 600;
}

/* Marker showing where transcriptions will be inserted */
.insertion-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 50;
}

/* Floating record button shown only on mobile */
#mobile-record-fab {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1100;
    pointer-events: auto;
    touch-action: manipulation;
}

#mobile-record-fab.btn--error {
    background-color: var(--color-error);
}

@media (max-width: 768px) {
    #mobile-record-fab {
        display: flex;
    }
}

/* Floating tools button and menu on mobile */
#mobile-tools-fab {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    left: calc(50% + 72px);
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1100;
    pointer-events: auto;
    touch-action: manipulation;
}

#mobile-tools-menu {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    left: calc(50% + 72px);
    transform: translateX(-50%);
    flex-direction: column;
    gap: 8px;
    z-index: 1100;
    display: none;
}


#mobile-tools-menu:not(.hidden) {
    display: flex;
}

#mobile-tools-menu button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

@media (max-width: 768px) {
    #mobile-tools-fab {
        display: flex;
    }
}

/* SenseVoice specific styling */
#sensevoice-options {
    background-color: rgba(var(--color-primary-rgb), 0.05);
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-16);
    margin-top: var(--space-8);
}

#sensevoice-options .form-label {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: var(--space-12);
}

#sensevoice-options .checkbox-group {
    gap: var(--space-12);
}

#sensevoice-options .checkbox-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.sensevoice-feature-highlight {
    background: linear-gradient(135deg, 
        rgba(var(--color-primary-rgb), 0.1), 
        rgba(var(--color-secondary-rgb), 0.1));
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-12);
    margin: var(--space-8) 0;
}

.sensevoice-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Notification enhancements for SenseVoice features */
.notification.notification--info {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    border-left: 4px solid var(--color-primary);
}

.notification.notification--sensevoice {
    background: linear-gradient(135deg, 
        rgba(var(--color-primary-rgb), 0.1), 
        rgba(var(--color-secondary-rgb), 0.1));
    border-left: 4px solid var(--color-primary);
    color: var(--color-primary);
}

/* Advanced model download button styling */
.model-download-advanced {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.model-download-advanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.model-download-advanced small {
    opacity: 0.9;
}

/* Language selection enhancement for SenseVoice */
.sensevoice-language-note {
    background-color: rgba(var(--color-info-rgb), 0.1);
    border: 1px solid rgba(var(--color-info-rgb), 0.3);
    border-radius: var(--radius-sm);
    padding: var(--space-8);
    margin-top: var(--space-8);
    font-size: var(--font-size-xs);
    color: var(--color-info);
}

/* Emotion and event detection indicators */
.emotion-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    background-color: rgba(var(--color-success-rgb), 0.1);
    color: var(--color-success);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    margin: var(--space-4) var(--space-2);
}

.event-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    background-color: rgba(var(--color-warning-rgb), 0.1);
    color: var(--color-warning);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    margin: var(--space-4) var(--space-2);
}

/* Downloaded models list */
.downloaded-models {
    margin-top: var(--space-24);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
}

.model-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--color-border);
}

.model-item:last-child {
    border-bottom: none;
}

.model-name {
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

/* User modal */
.tab-buttons {
    display: flex;
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}
.tab-content {
    margin-top: var(--space-8);
}

.provider-select label {
    display: inline-block;
    margin-right: var(--space-8);
}

.provider-group {
    margin: var(--space-8) 0;
}

.user-item {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-8) 0;
}

.user-item:last-child {
    border-bottom: none;
}

/* Desktop sidebar toggle */
.sidebar.desktop-hidden {
    display: none;
}

/* Custom prompt sidebar */
.prompt-sidebar {
    width: 320px;
    background-color: var(--color-surface);
    border-left: 1px solid var(--color-border);
    display: none;
    flex-direction: column;
    padding: var(--space-16);
}

.prompt-sidebar.active {
    display: flex;
}

.prompt-sidebar textarea {
    width: 100%;
    resize: vertical;
}

.prompt-sidebar button {
    margin-top: var(--space-16);
}

/* Chat sidebar */
.chat-sidebar {
    width: 320px;
    min-width: 220px;
    resize: horizontal;
    overflow: auto;
    background-color: var(--color-surface);
    border-left: 1px solid var(--color-border);
    display: none;
    flex-direction: column;
    position: relative;
}

.chat-sidebar.active {
    display: flex;
}

.chat-resizer {
    width: 5px;
    cursor: col-resize;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background-color: var(--color-border);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    padding: var(--space-16);
    border-bottom: 1px solid var(--color-border);
}


.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--space-16);
}

.chat-message {
    margin-bottom: var(--space-8);
    padding: var(--space-8);
    border-radius: 8px;
    word-break: break-word;
    max-width: 80%;
    color: #000;
}

.chat-message.user {
    background-color: #e0e0e0;
    align-self: flex-end;
}

.chat-message.assistant {
    background-color: #d1eaff;
    align-self: flex-start;
}

.chat-message.system {
    background-color: #f5f5f5;
    align-self: center;
    font-style: italic;
}

.chat-input {
    display: flex;
    padding: var(--space-16);
    border-top: 1px solid var(--color-border);
}


.chat-input textarea {
    flex: 1;
    height: 60px;
    resize: vertical;
    padding: var(--space-8);
}

.chat-input button {
    margin-left: var(--space-8);
}

/* Graph modal */
.graph-container {
    overflow: auto;
    max-height: 60vh;
    margin-bottom: var(--space-16);
    position: relative;
}

#graph-pan-zoom {
    transform-origin: 0 0;
    cursor: grab;
}

#graph-pan-zoom.grabbing {
    cursor: grabbing;
}

#graph-pan-zoom svg {
    width: 100%;
    height: auto;
}

/* Ensure graph text is visible in all themes */
#graph-container svg text {
    fill: var(--color-text);
}

.graph-text-output {
    max-height: 40vh;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-12);
    margin-bottom: var(--space-16);
    white-space: pre-wrap;
    color: var(--color-text);
}

/* Larger modal for graph view */
#graph-modal .modal-content--wide {
    max-width: 1000px;
}

/* Concept graph */
/* Fullscreen modal for concept graph */
.modal-content--fullscreen {
    width: 95vw;
    height: 90vh;
    max-width: none;
    max-height: none;
    margin: 2.5vh auto;
    display: flex;
    flex-direction: column;
}

/* Concept graph layout */
.concept-graph-layout {
    display: flex;
    flex: 1;
    gap: var(--space-16);
    min-height: 0; /* Important for flex child to shrink */
    height: 100%;
    overflow: hidden;
}

.concept-graph-left-sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    overflow-y: auto;
    height: 100%;
    flex-shrink: 0;
}

.concept-graph-main {
    flex: 1;
    min-width: 0; /* Important for flex child to shrink */
    height: 100%;
    overflow: hidden;
}

.concept-graph-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    overflow-y: auto;
    height: 100%;
    flex-shrink: 0;
    /* Ensure content is not cut off */
    padding-bottom: var(--space-16);
}

.concept-graph-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.concept-graph-container svg {
    width: 100%;
    height: 100%;
}

/* AI Generated Node Styles */
.concept-graph-container svg circle.ai-node {
    stroke: #8b5cf6 !important;
    stroke-width: 3px !important;
    fill: #e5e7ff !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0px 2px 4px rgba(139, 92, 246, 0.3));
}

.concept-graph-container svg circle.ai-node:hover {
    stroke: #7c3aed !important;
    stroke-width: 4px !important;
    fill: #ddd6fe !important;
    filter: drop-shadow(0px 3px 6px rgba(139, 92, 246, 0.5));
}

/* AI Node labels styling */
.concept-graph-container svg text.ai-node-label {
    font-weight: 700 !important;
    fill: #6b46c1 !important;
    font-size: 14px !important;
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.8);
}

/* AI Generated connection lines */
.concept-graph-container svg line.ai-connection {
    stroke: #8b5cf6 !important;
    stroke-width: 2.5px !important;
    stroke-opacity: 0.8 !important;
    stroke-dasharray: 5,3 !important;
}

/* Dark theme adjustments */
[data-color-scheme="dark"] .concept-graph-container svg circle.ai-node {
    fill: #4c1d95 !important;
    stroke: #a78bfa !important;
}

[data-color-scheme="dark"] .concept-graph-container svg circle.ai-node:hover {
    fill: #581c87 !important;
    stroke: #8b5cf6 !important;
}

[data-color-scheme="dark"] .concept-graph-container svg text.ai-node-label {
    fill: #c4b5fd !important;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
}

[data-color-scheme="dark"] .concept-graph-container svg line.ai-connection {
    stroke: #a78bfa !important;
}

.graph-controls-bottom {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-12) var(--space-16);
    display: flex;
    gap: var(--space-20);
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 10;
    flex-wrap: wrap;
    justify-content: center;
}

@media (prefers-color-scheme: dark) {
    .graph-controls-bottom {
        background: rgba(38, 40, 40, 0.95);
        border-color: var(--color-border);
    }
}

[data-color-scheme="dark"] .graph-controls-bottom {
    background: rgba(38, 40, 40, 0.95);
    border-color: var(--color-border);
}

.slider-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    min-width: 120px;
}

.slider-control label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
}

.slider-control input[type="range"] {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: var(--color-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-control input[type="range"]::-webkit-slider-track {
    background: var(--color-border);
    height: 4px;
    border-radius: 2px;
}

.slider-control input[type="range"]::-moz-range-track {
    background: var(--color-border);
    height: 4px;
    border-radius: 2px;
    border: none;
}

.no-graph-data {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
    padding: var(--space-16);
}

/* Info panels */
.analysis-controls,
.graph-info-panel,
.node-info-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-16);
}

/* Analysis controls stay fixed size */
.analysis-controls {
    flex-shrink: 0;
}

/* Scope controls styling */
.scope-controls {
    display: block;
    margin-bottom: var(--space-8);
}

.scope-controls select {
    width: 100%;
}

.refresh-btn {
    padding: var(--space-4) var(--space-8) !important;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.refresh-btn i {
    font-size: 14px;
}

/* Tag selection container */
.tag-selection-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-12);
    margin-bottom: var(--space-16);
}

.tag-selection-container h5 {
    margin: 0 0 var(--space-8) 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.tag-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-height: 200px;
    overflow-y: auto;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.tag-checkbox-item:hover {
    background: var(--color-background);
}

.tag-checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.tag-checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text);
    flex: 1;
    padding: var(--space-2) var(--space-4);
    background: var(--color-background);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.tag-checkbox-item input[type="checkbox"]:checked + label {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.no-tags-message {
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
    padding: var(--space-12);
    margin: 0;
}

/* Graph info panel should expand to show all content */
.graph-info-panel {
    flex: 2;
    min-height: 400px; /* Increased to ensure all sections are visible */
    overflow-y: visible;
    height: auto; /* Allow natural height expansion */
}

/* Node info panel gets reasonable space */
.node-info-panel {
    flex: 1;
    min-height: 200px;
    overflow-y: visible;
}

.analysis-controls h4,
.graph-info-panel h4,
.node-info-panel h4 {
    margin: 0 0 var(--space-12) 0;
    color: var(--color-text);
    font-size: var(--font-size-md);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-8);
}

.analysis-controls {
    margin-bottom: var(--space-16);
}

.analysis-controls select {
    width: 100%;
    margin-bottom: var(--space-8);
}

.analysis-controls button {
    width: 100%;
    margin-bottom: var(--space-8);
}

.ai-reprocess-btn {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
    margin-top: var(--space-8);
}

.ai-reprocess-btn:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.ai-reprocess-btn:disabled {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    cursor: not-allowed;
}

.ai-reprocess-btn.processing {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
}

.ai-reprocess-btn.processing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* AI Suggestions Button */
.ai-suggestions-btn {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
    margin-top: 4px !important;
}

.ai-suggestions-btn:hover {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

.ai-suggestions-btn:disabled {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    cursor: not-allowed;
}

/* AI Suggestions Floating Window */
.ai-suggestions-window {
    position: fixed;
    top: 20%;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
}

.ai-suggestions-window.hidden {
    display: none;
}

.ai-suggestions-window.minimized .ai-suggestions-content {
    display: none;
}

.ai-suggestions-window.minimized {
    height: auto;
    resize: none;
}

.ai-suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-12) var(--space-16);
    background: var(--color-primary);
    color: white;
    cursor: move;
    user-select: none;
}

.ai-suggestions-title {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-weight: 600;
    font-size: 0.9rem;
}

.ai-suggestions-controls {
    display: flex;
    gap: var(--space-4);
}

.ai-suggestions-controls .btn--icon {
    background: transparent;
    border: none;
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
}

.ai-suggestions-controls .btn--icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-suggestions-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.suggestions-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-12) var(--space-16);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.suggestion-counter {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.suggestion-content {
    flex: 1;
    padding: var(--space-16);
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.suggestion-loading {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    color: var(--color-text-secondary);
    justify-content: center;
    padding: var(--space-24);
}

.suggestion-text {
    white-space: pre-wrap;
}

.suggestion-concept {
    background: var(--color-primary);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
}

.suggestion-input-area {
    border-top: 1px solid var(--color-border);
    padding: var(--space-12) var(--space-16);
    background: var(--color-surface);
}

.suggestion-input-container {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

.suggestion-input-container .form-control {
    flex: 1;
    font-size: 0.85rem;
}

.suggestion-input-container .btn {
    padding: var(--space-8) var(--space-12);
    font-size: 0.8rem;
}

/* Streaming text animation */
.suggestion-streaming {
    border-right: 2px solid var(--color-primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--color-primary); }
    51%, 100% { border-color: transparent; }
}

/* Thinking indicator */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    color: var(--color-text-secondary);
    font-style: italic;
    padding: var(--space-16);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

.thinking-indicator i {
    color: var(--color-primary);
}

/* Suggestion content styling */
.suggestion-item {
    margin-bottom: var(--space-16);
}

.suggestion-title {
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-8);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--space-4);
}

.suggestion-question {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-12);
    padding: var(--space-8);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

.suggestion-text {
    line-height: 1.7;
}

.suggestion-text h1, .suggestion-text h2, .suggestion-text h3, 
.suggestion-text h4, .suggestion-text h5, .suggestion-text h6 {
    color: var(--color-primary);
    margin-top: var(--space-16);
    margin-bottom: var(--space-8);
}

.suggestion-text p {
    margin-bottom: var(--space-12);
}

.suggestion-text ul, .suggestion-text ol {
    margin-bottom: var(--space-12);
    padding-left: var(--space-20);
}

.suggestion-text li {
    margin-bottom: var(--space-4);
}

.suggestion-text strong {
    color: var(--color-text);
    font-weight: 600;
}

.suggestion-text em {
    color: var(--color-text-secondary);
    font-style: italic;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    padding: var(--space-8);
    margin-top: var(--space-8);
    font-size: 0.85rem;
}

.map-insights {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.5;
}

.insight-item {
    margin-bottom: var(--space-16);
    padding: var(--space-12);
    background: var(--color-background);
    border-radius: var(--radius-sm);
    /* Ensure each insight item is fully visible */
    flex-shrink: 0;
    width: 100%;
}

.insight-label {
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: var(--space-6);
    font-size: 0.9rem;
}

.insight-value {
    color: var(--color-text-secondary);
    font-family: var(--font-family-mono);
    font-size: 0.8rem;
    background: var(--color-background);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.insight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.insight-tag {
    background: var(--color-primary);
    color: white;
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.insight-tag:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.insight-tag--secondary {
    background: #6c5ce7; /* Purple color for bridging concepts */
}

.insight-tag--warning {
    background: #f39c12;
}

/* Node details panel */
.node-details {
    font-size: 0.85rem;
    line-height: 1.5;
}

.no-selection {
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
    padding: var(--space-16);
}

.node-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-12);
    padding: var(--space-8);
    background: var(--color-background);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.node-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.node-metric:last-child {
    border-bottom: none;
}

.node-metric-label {
    font-weight: 500;
    color: var(--color-text);
}

.node-metric-value {
    font-family: var(--font-family-mono);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    background: var(--color-background);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-sm);
    font-weight: 600;
    min-width: fit-content;
    text-align: right;
}

.connected-nodes {
    margin-top: var(--space-12);
}

.connected-nodes h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-8);
}

.connected-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.connected-node {
    background: var(--color-background);
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.connected-node:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Level-based styling for multi-level connections */
.level-group {
    margin-bottom: var(--space-12);
}

.level-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    padding-left: var(--space-2);
    border-left: 3px solid var(--color-border);
}

.connected-node.level-1 {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.connected-node.level-1:hover {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
}

.connected-node.level-2 {
    background: #f3e5f5;
    border-color: #9c27b0;
    color: #7b1fa2;
}

.connected-node.level-2:hover {
    background: #9c27b0;
    color: white;
    border-color: #8e24aa;
}

.connected-node.level-3 {
    background: #fff8e1;
    border-color: #ff9800;
    color: #e65100;
}

.connected-node.level-3:hover {
    background: #ff9800;
    color: white;
    border-color: #f57c00;
}

/* Dark theme adjustments for level styles */
[data-color-scheme="dark"] .connected-node.level-1 {
    background: rgba(33, 150, 243, 0.2);
    border-color: #42a5f5;
    color: #90caf9;
}

[data-color-scheme="dark"] .connected-node.level-2 {
    background: rgba(156, 39, 176, 0.2);
    border-color: #ab47bc;
    color: #ce93d8;
}

[data-color-scheme="dark"] .connected-node.level-3 {
    background: rgba(255, 152, 0, 0.2);
    border-color: #ffa726;
    color: #ffcc02;
}

[data-color-scheme="dark"] .level-title {
    color: var(--color-text-tertiary);
    border-left-color: var(--color-border-subtle);
}

.graph-controls {
    font-size: 12px;
}

.graph-controls button {
    font-size: 11px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.graph-controls button:hover {
    background-color: #e9ecef !important;
}

/* Node and link styling improvements */
.concept-graph-container .nodes circle {
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.concept-graph-container .links line {
    transition: all 0.3s ease;
}

.concept-graph-container .labels text {
    font-family: var(--font-family-ui);
    user-select: none;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content--fullscreen {
        width: 98vw;
        height: 95vh;
        margin: 1vh auto;
    }
    
    .concept-graph-layout {
        flex-direction: column;
    }
    
    .concept-graph-left-sidebar {
        width: auto;
        order: 1;
    }
    
    .concept-graph-main {
        order: 2;
    }
    
    .concept-graph-sidebar {
        width: auto;
        flex-direction: row;
        overflow-x: auto;
        order: 3;
    }
    
    .graph-controls-bottom {
        position: static;
        transform: none;
        margin-top: 10px;
        flex-direction: column;
        gap: var(--space-12);
    }
    
    .slider-control {
        min-width: 80px;
    }
    
    .slider-control input[type="range"] {
        width: 80px;
    }
    
    .graph-info-panel,
    .node-info-panel {
        min-width: 250px;
        /* Ensure content is fully visible on mobile */
        min-height: 350px;
        max-height: none;
    }
}

.map-insights {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left-width: 3px;
    border-left-color: var(--color-primary);
    border-radius: var(--radius-sm);
    padding: var(--space-16);
    margin-top: var(--space-12);
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
    padding-bottom: var(--space-16);
    /* Ensure full content is visible */
    height: auto;
    overflow: visible;
}

/* Smaller dropdown for graph type */
#graph-type-select {
    width: 150px;
    font-size: var(--font-size-sm);
    padding: var(--space-4) var(--space-8);
}

#regenerate-graph-btn {
    margin-left: var(--space-8);
}

/* Left aligned controls in graph modal */
.graph-options {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    margin-right: auto;
}

.graph-options .checkbox-group {
    margin: 0;
}

/* Audio files list */
#audio-file-list {
    list-style: none;
    padding: 0;
    margin-bottom: var(--space-16);
}

#audio-file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

/* Buttons wrapper for audio files
   ensures spacing between download and delete icons
   see renderAudioFiles in app.js

   Example markup:
     <span class="file-actions">
         <button>...</button>
         <button>...</button>
     </span>
*/

.file-actions {
    display: flex;
    gap: var(--space-8);
}

/* Study Modal Styles */
.study-setup {
    margin-bottom: var(--space-24);
}

.study-setup .form-group {
    margin-bottom: var(--space-16);
}

/* Study options styles */
.study-options {
    text-align: center;
    padding: var(--space-24);
}

.study-options h4 {
    margin-bottom: var(--space-24);
    color: var(--color-text);
    font-size: 1.3rem;
}

.study-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    max-width: 400px;
    margin: 0 auto;
}

.btn--large {
    padding: var(--space-16) var(--space-24);
    font-size: 1.1rem;
    border-radius: var(--radius-12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-12);
    min-height: 60px;
    transition: all var(--duration-standard) var(--ease-standard);
}

.btn--large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn--large i {
    font-size: 1.3rem;
}

.quiz-interface, .flashcards-interface {
    padding: var(--space-20);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-8);
    background: var(--color-surface);
}

.quiz-progress, .flashcard-progress {
    text-align: center;
    margin-bottom: var(--space-20);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.quiz-question {
    margin-bottom: var(--space-24);
}

.quiz-question h4 {
    margin-bottom: var(--space-16);
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.4;
}

.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.quiz-answer {
    padding: var(--space-12) var(--space-16);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-8);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
}

.quiz-answer:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.quiz-answer.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.quiz-answer.correct {
    border-color: var(--color-success);
    background: var(--color-success-light);
}

.quiz-answer.incorrect {
    border-color: var(--color-error);
    background: var(--color-error-light);
}

.answer-feedback {
    margin-top: var(--space-16);
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-6);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.answer-feedback.correct {
    background: var(--color-success-light);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.answer-feedback.incorrect {
    background: var(--color-error-light);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.answer-feedback i {
    font-size: 1.1rem;
}

.score-display {
    text-align: center;
    margin: var(--space-20) 0;
}

.score-section {
    margin-bottom: var(--space-16);
}

.score-section.total-score {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
    margin-top: var(--space-16);
}

.score-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-main {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: var(--space-8);
}

.total-score .score-main {
    font-size: 2rem;
    color: var(--color-success);
}

.score-percentage {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

.quiz-results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    justify-content: center;
    margin-top: var(--space-20);
}

.quiz-results-actions button {
    min-width: 120px;
}

.quiz-actions, .flashcard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-20);
}

.quiz-results, .flashcards-results {
    text-align: center;
    padding: var(--space-20);
    background: var(--color-surface);
    border-radius: var(--radius-8);
    margin-top: var(--space-20);
}

.quiz-results h4, .flashcards-results h4 {
    color: var(--color-primary);
    margin-bottom: var(--space-16);
}

/* Flashcard specific styles */
.flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-20);
}

.flashcard-progress {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.flashcard-global-controls {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.flashcard-global-controls .btn--icon {
    padding: var(--space-8);
    border-radius: var(--radius-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: all var(--duration-fast) var(--ease-standard);
}

.flashcard-global-controls .btn--icon:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.flashcard-global-controls .btn--icon.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    text-decoration: none;
}

.btn--icon:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.flashcard {
    position: relative;
    max-height: 350px;
    min-height: 200px;
    margin-bottom: var(--space-20);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-12);
    overflow: hidden;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
}

.flashcard-content {
    flex: 1;
    padding: var(--space-20);
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    overflow-y: auto;
}

.flashcard-question {
    flex-shrink: 0;
}

.flashcard-question h4 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-text);
    line-height: 1.4;
}

.flashcard-answer {
    flex: 1;
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
    margin-top: var(--space-16);
}

.flashcard-answer p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    margin: 0;
}

.flashcard-toggle {
    position: absolute;
    top: var(--space-12);
    right: var(--space-12);
    z-index: 10;
}

.flashcard-toggle .btn--icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: all var(--duration-fast) var(--ease-standard);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flashcard-toggle .btn--icon:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.05);
}

.flashcard-toggle .btn--icon.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.saved-items {
    max-height: 400px;
    overflow-y: auto;
}

.saved-items h4 {
    margin: var(--space-20) 0 var(--space-12) 0;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-8);
}

.saved-items h4:first-child {
    margin-top: 0;
}

.saved-list {
    margin-bottom: var(--space-24);
}

.saved-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-6);
    margin-bottom: var(--space-8);
    background: var(--color-surface);
}

.saved-item-info {
    flex-grow: 1;
}

.saved-item-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.saved-item-question {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

.saved-item-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.saved-item-actions {
    display: flex;
    gap: var(--space-8);
}

.saved-section {
    margin-bottom: var(--space-24);
}

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

.saved-section-header h4 {
    margin: 0;
    color: var(--color-text);
}

.btn--danger {
    background: var(--color-error, #dc3545);
    color: white;
    border: 1px solid var(--color-error, #dc3545);
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
}

.btn--danger:hover {
    background: var(--color-error-dark, #c82333);
    border-color: var(--color-error-dark, #c82333);
    transform: translateY(-1px);
}

.no-items {
    text-align: center;
    color: var(--color-text-secondary);
    font-style: italic;
    padding: var(--space-16);
}

/* Color variables for quiz feedback */
:root {
    --color-success: #22c55e;
    --color-success-light: rgba(34, 197, 94, 0.1);
    --color-error: #ef4444;
    --color-error-light: rgba(239, 68, 68, 0.1);
    --color-primary-light: rgba(33, 128, 141, 0.1);
}

/* Mobile responsiveness for study modal */
@media (max-width: 900px) {
    .study-choice-buttons {
        gap: var(--space-12);
    }
    
    .btn--large {
        min-height: 50px;
        font-size: 1rem;
        padding: var(--space-12) var(--space-16);
    }
    
    .quiz-answers {
        gap: var(--space-8);
    }
    
    .quiz-answer {
        padding: var(--space-10) var(--space-12);
        font-size: 0.9rem;
    }
    
    .flashcard {
        max-height: 300px;
        min-height: 180px;
    }
    
    .flashcard-content {
        padding: var(--space-16);
        gap: var(--space-12);
    }
    
    .flashcard-question h4 {
        font-size: 1.1rem;
    }
    
    .flashcard-answer p {
        font-size: 0.95rem;
    }
    
    .flashcard-toggle .btn--icon {
        width: 32px;
        height: 32px;
    }
    
    .flashcard-header {
        flex-direction: column;
        gap: var(--space-12);
        align-items: center;
    }
    
    .quiz-actions, .flashcard-actions {
        flex-direction: column;
        gap: var(--space-12);
    }
    
    .quiz-actions button, .flashcard-actions button {
        width: 100%;
    }
    
    .saved-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-8);
    }
    
    .saved-item-actions {
        justify-content: center;
    }
}

/* Study Modal Specific Styles */
#study-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: var(--space-16);
}

#study-modal.active,
#study-modal[style*="block"],
#study-modal[style*="flex"] {
    display: flex;
}

#study-modal .modal-content {
    background-color: var(--color-surface);
    padding: var(--space-32);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    position: relative;
    margin: 0;
    overflow: hidden;
}

#study-modal .modal-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    padding-right: var(--space-12);
    margin-right: calc(-1 * var(--space-12));
}

/* Responsive adjustments for study modal */
@media (max-width: 768px) {
    #study-modal .modal-content {
        width: 95%;
        max-width: none;
        padding: var(--space-20);
        max-height: 95vh;
    }
    
    #study-modal .modal-body {
        max-height: calc(95vh - 120px);
    }
}

@media (max-width: 480px) {
    #study-modal {
        padding: var(--space-8);
    }
    
    #study-modal .modal-content {
        width: 100%;
        padding: var(--space-16);
        max-height: 98vh;
    }
    
    #study-modal .modal-body {
        max-height: calc(98vh - 100px);
    }
}

.ai-table{border-collapse:collapse;margin:10px 0;width:100%;}
.ai-table th,.ai-table td{border:1px solid #ccc;padding:4px;}

/* Focus Modal Styles */
.focus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.focus-modal.active {
    display: flex;
    opacity: 1;
}

.focus-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.focus-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: var(--space-24);
    box-sizing: border-box;
}

.focus-close-btn {
    position: absolute;
    top: var(--space-16);
    right: var(--space-16);
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--color-surface);
    color: var(--color-text);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    z-index: 10001;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.focus-close-btn:hover {
    background-color: var(--color-error);
    color: white;
    transform: scale(1.05);
}

.focus-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    gap: var(--space-16);
    overflow-y: auto;
    min-height: 0;
}

.focus-editor-content {
    flex: 1;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.focus-editor {
    flex: 1;
    padding: var(--space-24);
    border: none;
    outline: none;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
    background-color: transparent;
    overflow-y: auto;
    min-height: 200px;
}

.focus-editor:empty:before {
    content: "Focus on your writing...";
    color: var(--color-text-secondary);
    font-style: italic;
}

.focus-ai-enhancement-toolbar {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-16);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    white-space: nowrap;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.focus-ai-enhancement-toolbar::-webkit-scrollbar {
    height: 3px;
}

.focus-ai-enhancement-toolbar::-webkit-scrollbar-track {
    background: transparent;
}

.focus-ai-enhancement-toolbar::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.3);
    border-radius: 3px;
}

.focus-ai-enhancement-toolbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-primary-rgb), 0.5);
}

.focus-ai-enhancement-toolbar .ai-controls-horizontal {
    display: flex;
    gap: var(--space-12);
    align-items: center;
    min-width: fit-content;
    white-space: nowrap;
}

.focus-ai-enhancement-toolbar .ai-controls-horizontal .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive design for focus modal */
@media (max-width: 768px) {
    .focus-modal-content {
        padding: var(--space-16);
    }
    
    .focus-close-btn {
        top: var(--space-12);
        right: var(--space-12);
        width: 36px;
        height: 36px;
        font-size: var(--font-size-base);
    }
    
    .focus-editor {
        padding: var(--space-16);
        font-size: var(--font-size-sm);
    }
    
    .focus-ai-enhancement-toolbar .ai-controls-horizontal {
        gap: var(--space-8);
    }
    
    .focus-ai-enhancement-toolbar .ai-controls-horizontal .btn {
        font-size: var(--font-size-xs);
        padding: var(--space-6) var(--space-8);
    }
}

/* Hide scrollbar in focus mode for cleaner look */
.focus-editor::-webkit-scrollbar {
    width: 8px;
}

.focus-editor::-webkit-scrollbar-track {
    background: transparent;
}

.focus-editor::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.focus-editor::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}
