/* Import Montserrat font for brand styling */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Sleek Minimal Navbar - Black & White Theme */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  backdrop-filter: blur(10px);
  /*border-bottom: 1px solid #e0e0e0;*/
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #d0d0d0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #000000, #666666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 1px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.navbar-brand:hover {
  background: linear-gradient(135deg, #333333, #888888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-right: 32px;
}

.navbar-nav a {
  color: #666666;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 0.75rem;
}

.navbar-nav a:hover {
  color: #000000;
}

.navbar-nav a.active {
  color: #000000;
  font-weight: 600;
}

/* Ensure logo image and brand text are the same visual height and centered */
.navbar-brand .nav-image {
  height: 28px;
  width: auto;
  display: block;
}

.navbar-brand span {
  font-size: 24px;
  line-height: 28px;
  display: block;
}

/* Responsive navbar */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  
  .navbar-brand {
    margin-left: 16px;
    font-size: 20px;
  }
  .navbar-brand .nav-image {
    height: 20px;
  }
  .navbar-brand span {
    font-size: 20px;
    line-height: 22px;
  }
  
  .navbar-nav {
    gap: 16px;
    margin-right: 16px;
  }
  
  .navbar-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Add top padding to body when navbar is present */
body.has-navbar {
  padding-top: 3rem;
}

/* Authentication Styles - Only for login page */
body.login-page {
  background: #000000 !important;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.auth-container {
  margin: 0 auto;
  text-align: center;
  background: #000000;
  padding: 40px 30px;
  border-radius: 12px;
}

.auth-container h1 {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: #888888;
  font-size: 14px;
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #888888;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: #000000;
}

.tab-btn:hover:not(.active) {
  color: #cccccc;
}

.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.form-group input::placeholder {
  color: #888888;
}

.full-width {
  width: 100%;
}

/* Auth button styling */
.auth-form .primary {
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.auth-form .primary:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* Status message styles */
.status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.status.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Profile menu styles */
.profile-menu {
  position: relative;
  display: inline-block;
}

/* Profile button - FORCE override all conflicting styles */
.navbar .navbar-nav li .profile-menu button,
.navbar .navbar-nav li .profile-menu button.primary,
.navbar .navbar-nav li .profile-menu button.auth-button,
button.profile-menu,
.navbar button[onclick*="toggleProfileMenu"] {
  color: #666666 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  transition: color 0.2s ease !important;
  padding: 0px 12px !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  transform: none !important;
  display: inline !important;
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  min-height: auto !important;
  max-width: none !important;
  max-height: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.navbar .navbar-nav li .profile-menu button:hover,
.navbar .navbar-nav li .profile-menu button.primary:hover,
.navbar .navbar-nav li .profile-menu button.auth-button:hover,
button.profile-menu:hover,
.navbar button[onclick*="toggleProfileMenu"]:hover {
  color: #000000 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  transform: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 0;
  width: max-content;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: right;
  align-items: right;
}

.profile-menu:hover .profile-dropdown,
.profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.profile-info {
  padding: 0 16px 0px 16px;
}

.profile-email {
  color: #666666;
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

.profile-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
}

.profile-item {
  width: 100%;
  color: #666666;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  text-align: right;
  align-items: right;
}

.profile-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #000000;
}

/* Form select styles */
select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

select option {
  background: #000000;
  color: #ffffff;
  padding: 8px 12px;
}

select:invalid {
  color: #888888;
}

/* Search Page Styles */
/* Palisade title styling */
.palisade-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 2rem;
  background: linear-gradient(135deg, #000000, #666666) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-size: 48px !important;
  text-align: center !important;
  margin: 0 0 20px 0 !important;
  letter-spacing: -0.02em !important;
  font-display: swap;
}

:root { 
  --bg0:#ffffff; 
  --bg1:#f8f9fa; 
  --text:#1a1a1a; 
  --muted:#6b7280; 
  --panel:#ffffff; 
  --outline:#e5e7eb; 
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body { 
  margin:0; 
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Segoe UI, Roboto, Helvetica, Arial, sans-serif; 
  color: var(--text); 
  background: #ffffff;
}

.container { 
  height: 100%; 
  display: flex; 
  flex-direction: column; 
}

.shell { 
  width: 100%; 
  padding: 24px; 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.search-wrap { 
  position: relative; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  transition: all .35s ease; 
  padding-top: 12vh; 
}

.search-wrap.compact { 
  justify-content: flex-start; 
  margin-top: -13vh; 
}

.search { 
  width: min(780px, 90vw); 
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: #6b7280;
  font-size: 16px;
  z-index: 1;
}

.search input { 
  width: 100%; 
  padding: 14px 18px; 
  border-radius: 14px; 
  border: 1px solid #e5e7eb; 
  outline: none; 
  background: white; 
  color: #111; 
  font-size: 16px; 
  box-shadow: 0 4px 20px rgba(0,0,0,.1); 
  transition: all 0.2s ease;
}

.search input:focus {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.search-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.search-tag {
  background: #f3f4f6;
  color: #374151;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

.main-filters { 
  margin-top: 20px; 
}

.filter-row { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 16px; 
}

.filter-field { 
  display: flex; 
  flex-direction: column; 
}

.filter-field .filter-label { 
  color: var(--text); 
  font-size: 13px; 
  font-weight: 500; 
  margin-bottom: 6px; 
}

.filter-field .filter-input { 
  padding: 8px 12px; 
  border: 1px solid #e5e7eb; 
  border-radius: 8px; 
  background: #ffffff; 
  color: var(--text); 
  font-size: 14px; 
  outline: none; 
  transition: all 0.2s; 
}

.filter-field .filter-input:focus { 
  border-color: #3b82f6; 
  background: #ffffff; 
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-field .filter-input::placeholder { 
  color: #9ca3af; 
}

.dropdown-container { 
  position: relative; 
}

.dropdown-input { 
  padding-right: 30px; 
}

.dropdown-arrow { 
  position: absolute; 
  right: 8px; 
  top: 50%; 
  transform: translateY(-50%); 
  color: #6b7280; 
  font-size: 10px; 
  pointer-events: none; 
  transition: transform 0.2s; 
}

.dropdown-container.active .dropdown-arrow { 
  transform: translateY(-50%) rotate(180deg); 
}

.dropdown-menu { 
  position: absolute; 
  top: 100%; 
  left: 0; 
  right: 0; 
  background: #ffffff; 
  border: 1px solid #e5e7eb; 
  border-radius: 8px; 
  max-height: 200px; 
  overflow-y: auto; 
  z-index: 1000; 
  display: none; 
  margin-top: 2px; 
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.dropdown-menu.show { 
  display: block; 
}

.dropdown-item { 
  padding: 8px 12px; 
  cursor: pointer; 
  color: var(--text); 
  font-size: 14px; 
  border-bottom: 1px solid #f3f4f6; 
}

.dropdown-item:hover { 
  background: #f8f9fa; 
}

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

.dropdown-item.highlighted { 
  background: #e5e7eb; 
}

.content { 
  display: none; 
  margin-top: 8px; 
  min-height: 0; 
  flex: 1; 
}

.content.show { 
  display: flex; 
}

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

.filters { 
  background: var(--panel); 
  border: 1px solid var(--outline); 
  border-radius: 12px; 
  overflow: hidden; 
}

.filters-header { 
  padding: 10px 12px; 
  color: var(--muted); 
  border-bottom: 1px solid var(--outline); 
  font-size: 12px; 
  letter-spacing: .04em; 
  text-transform: uppercase; 
}

.filter-group { 
  padding: 12px; 
  border-bottom: 1px solid #1a1a1a; 
}

.filter-group:last-child { 
  border-bottom: none; 
}

.filter-label { 
  color: var(--text); 
  font-size: 13px; 
  font-weight: 500; 
  margin-bottom: 6px; 
  display: block; 
}

.filter-input { 
  width: 100%; 
  padding: 6px 8px; 
  border: 1px solid var(--outline); 
  border-radius: 6px; 
  background: var(--bg1); 
  color: var(--text); 
  font-size: 13px; 
  outline: none; 
}

.filter-input:focus { 
  border-color: rgba(255,255,255,.3); 
}

.results { 
  background: #ffffff; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  overflow: hidden; 
  min-height: 0; 
  flex: 0 0 40%; 
  min-width: 200px; 
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.results-header { 
  padding: 0.75rem 2rem; 
  color: var(--muted); 
  border-bottom: 1px solid #e5e7eb; 
  font-size: 12px; 
  letter-spacing: .04em; 
  text-transform: uppercase; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  position: relative; 
  z-index: 10; 
  background: #f8f9fa;
}

.results-columns {
  display: flex;
  gap: 20px;
  flex: 1;
  justify-content: flex-end;
  margin-right: 20px;
}

.column-header {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-toggle { 
  background: var(--bg1); 
  border: 1px solid var(--outline); 
  color: var(--text); 
  padding: 6px 12px; 
  border-radius: 6px; 
  font-size: 11px; 
  cursor: pointer; 
  transition: all 0.2s; 
  font-weight: 500; 
  position: relative; 
  z-index: 20; 
  flex-shrink: 0; 
}

.sort-toggle:hover { 
  background: var(--outline); 
  color: var(--text); 
}

.sort-toggle.active { 
  background: var(--text); 
  color: var(--bg0); 
  border-color: var(--text); 
}

.list { 
  max-height: 100%; 
  overflow: auto; 
}

.resizer { 
  width: 4px; 
  background: transparent; 
  cursor: col-resize; 
  flex-shrink: 0; 
  transition: background-color 0.2s; 
}

.resizer:hover { 
  background: rgba(255,255,255,.2); 
}

.resizer.resizing { 
  background: rgba(255,255,255,.4); 
}

.search-result-item { 
  padding: 20px; 
  border-bottom: 1px solid #e5e7eb; 
  cursor: pointer; 
  transition: all 0.2s ease;
}

.search-result-item:hover { 
  background: #f8f9fa; 
}

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

.result-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.result-main {
  flex: 1;
}

.result-title { 
  font-weight: 600; 
  color: var(--text); 
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.result-meta { 
  color: var(--muted); 
  font-size: 14px; 
  margin-bottom: 12px; 
  opacity: 0.8; 
}

.result-snippet {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.percentage-match {
  background: #f3f4f6;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
}

.document-item { 
  border-bottom: 1px solid #e5e7eb; 
}

.document-header { 
  padding: 12px 14px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
}

.document-header:hover { 
  background: #f8f9fa; 
}

.document-title { 
  font-weight: 600; 
  color: var(--text); 
  font-size: 14px;
}

.document-meta { 
  color: var(--muted); 
  font-size: 11px; 
  margin-top: 4px; 
  opacity: 0.8; 
}

.expand-icon { 
  color: var(--muted); 
  font-size: 12px; 
  transition: transform 0.2s; 
}

.expand-icon.expanded { 
  transform: rotate(90deg); 
}

.pages-list { 
  display: none; 
  background: #f8f9fa; 
}

.pages-list.expanded { 
  display: block; 
}

.page-item { 
  padding: 8px 14px 8px 28px; 
  border-bottom: 1px solid #e5e7eb; 
  cursor: pointer; 
}

.page-item:hover { 
  background: #f1f5f9; 
}

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

.page-title { 
  font-size: 13px; 
  color: var(--text); 
}

.page-snippet { 
  color: var(--muted); 
  font-size: 11px; 
  margin-top: 2px; 
  line-height: 1.3; 
}

.page-snippet.expanded { 
  max-height: none !important; 
  overflow: visible !important; 
}

.page-snippet.collapsed { 
  max-height: 2.6em; 
  overflow: hidden; 
}

.expand-snippet { 
  background: none; 
  border: none; 
  color: var(--muted); 
  font-size: 10px; 
  cursor: pointer; 
  padding: 2px 4px; 
  margin-top: 4px; 
  border-radius: 3px; 
  transition: all 0.2s; 
}

.expand-snippet:hover { 
  background: var(--outline); 
  color: var(--text); 
}

.preview { 
  background: #ffffff; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  overflow: hidden; 
  min-height: 0; 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  position: relative; 
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.frame { 
  width: 100%; 
  height: 100%; 
  border: 0; 
  background: #111111; 
  display: block; 
}

.preview-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  background: var(--bg1);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  min-width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.zoom-btn:active {
  background: var(--text);
  color: var(--bg0);
}

.zoom-level {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  min-width: 40px;
  text-align: center;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  background: var(--bg1);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  min-width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: var(--bg2);
  border-color: var(--text);
}

.page-btn:active {
  background: var(--text);
  color: var(--bg0);
}

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

.page-btn:disabled:hover {
  background: var(--bg1);
  border-color: var(--outline);
}

.page-info {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  min-width: 80px;
  text-align: center;
}

.pdf-container {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 5px 20px 10px 20px;
  background: #ffffff;
  min-height: 200px;
}

.pdf-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  background: white;
}

.pdf-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  height: 100%;
  width: 100%;
}

/* Search Page Responsive Styles */
@media (max-width: 1200px) { 
  .results { 
    flex: 0 0 45%; 
  } 
}

@media (max-width: 900px) { 
  .content.show { 
    flex-direction: column; 
  }
  .results { 
    flex: 0 0 auto; 
    height: 40vh; 
  }
  .resizer { 
    width: 100%; 
    height: 4px; 
    cursor: row-resize; 
  }
  .preview { 
    flex: 1; 
    height: 60vh; 
  }
}

@media (max-width: 768px) { 
  .filter-row { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }
  .search { 
    width: 95vw; 
  }
}

@media (max-width: 480px) { 
  .filter-row { 
    grid-template-columns: 1fr; 
    gap: 10px; 
  }
}

/* Settings Page Styles */
.settings-container {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 0px;
  padding: 20px 20px;
  background: #ffffff;
  min-height: calc(100vh - 60px);
}

.settings-header {
  text-align: center;
  margin-bottom: 40px;
}

.settings-header h1 {
  color: #1a1a1a;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
}

.settings-header p {
  color: #6b7280;
  font-size: 16px;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Button Styles */
.btn-primary {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-small {
  padding: 6px 12px;
  font-size: 14px !important;
  margin-right: 8px;
  margin-bottom: 4px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-small:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-danger {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.btn-danger:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Users Table */
.users-table-container {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.users-table th,
.users-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.users-table th {
  background: #f8f9fa;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.users-table td {
  color: #374151;
  font-size: 14px;
}

.users-table tr:hover {
  background: #f8f9fa;
}

.users-table .loading,
.users-table .error,
.users-table .empty {
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

/* Role and Status Badges */
.role-badge,
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.role-admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.role-user {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.status-active {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.status-inactive {
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

/* Access Controls */
.access-controls,
.system-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.control-group:last-child {
  border-bottom: none;
}

.control-label {
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

.control-select,
.control-input {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 120px;
}

.control-select:focus,
.control-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.2s;
  border-radius: 24px;
}

.toggle-label:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.toggle-input:checked + .toggle-label {
  background-color: #3b82f6;
}

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

/* Settings Actions */
.settings-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #374151;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
}

/* Form Groups in Modal */
.modal .form-group {
  margin-bottom: 20px;
}

.modal .form-group label {
  display: block;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal .form-group input,
.modal .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  font-size: 14px;
  transition: all 0.2s ease;
}

.modal .form-group input:focus,
.modal .form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal .form-group input::placeholder {
  color: #9ca3af;
}

/* Report Generation Page Styles */
.report-container {
  display: flex;
  height: calc(100vh - 120px);
  gap: 0;
  background: var(--bg0);
}

.report-sidebar {
  width: 320px;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.report-sidebar.collapsed {
  width: 60px;
  border: 1px solid var(--outline);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  transition: width 0.3s ease;
  position: relative;
}

.report-sidebar.collapsed .sidebar-section {
  display: none;
}

.report-sidebar.collapsed .sidebar-section:first-child {
  display: block;
  position: absolute;
  top: 16px;
  left: 12px;
  right: 12px;
  padding: 0;
  height: auto;
}

.report-sidebar.collapsed .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: 100%;
}

.report-sidebar.collapsed .sidebar-title {
  display: none;
}

.report-sidebar.collapsed .module-list {
  display: none;
}

.report-sidebar.collapsed .action-btn {
  width: 36px;
  height: 36px;
  font-size: 16px;
  margin: 0;
  flex-shrink: 0;
}

.report-main {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-left: none;
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-container.fullscreen .report-sidebar {
  display: none;
}

.report-container.fullscreen .report-main {
  border-radius: 12px;
  border: 1px solid var(--outline);
}

/* Sidebar Sections */
.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-section:last-child {
  border-bottom: none;
}

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

.sidebar-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Module List */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--bg1);
  border: 1px solid var(--outline);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.module-item:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.module-info {
  flex: 1;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.module-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.module-tag {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-summary {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.tag-analysis {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.tag-statistics {
  background: rgba(168, 85, 247, 0.2);
  color: #a78bfa;
}

.tag-generation {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.tag-damages {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.module-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

/* Tool List */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tool-btn {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg1);
  border: 1px solid var(--outline);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.tool-btn:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Settings List */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-item {
  display: flex;
  flex-direction: column;
}

.setting-label {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 3px;
}

.setting-input,
.setting-select {
  padding: 6px 8px;
  background: var(--bg1);
  border: 1px solid var(--outline);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.setting-input:focus,
.setting-select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--outline);
}

.setting-input::placeholder {
  color: var(--muted);
}

/* Selected Patents Section */
.selected-patents-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.patents-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.patent-actions {
  display: flex;
  gap: 4px;
}

.patents-header span {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.patent-action-btn {
  background: var(--bg1);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.patent-action-btn:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
}

.patent-action-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.patent-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

.patents-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.no-patents {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 12px 8px;
  font-style: italic;
}

.patent-item {
  background: var(--bg1);
  border: 1px solid var(--outline);
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.patent-item:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
}

.patent-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.patent-number {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}

.patent-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.patent-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.patent-title {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.patent-meta {
  color: var(--muted);
  font-size: 9px;
  opacity: 0.8;
}

/* Document Header */
.document-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 32px;
  border-bottom: 1px solid var(--outline);
  background: var(--panel);
}

.document-title-section {
  flex: 1;
}

.document-title-section .document-title {
  color: var(--text);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.document-meta {
  color: var(--muted);
  font-size: 14px;
}

.document-actions {
  display: flex;
  gap: 8px;
  margin-left: 20px;
  align-items: center;
}

/* Download Button Styles */
.download-btn {
  background: var(--bg1);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 32px;
  height: 28px;
  justify-content: center;
}

.download-btn:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.download-btn:active {
  background: var(--text);
  color: var(--bg0);
  border-color: var(--text);
}

/* Preview Actions */
.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-actions .download-btn {
  padding: 8px 16px;
  font-size: 13px;
  height: 32px;
  min-width: auto;
}

.action-btn {
  width: 36px;
  height: 36px;
  background: var(--bg1);
  border: 1px solid var(--outline);
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Patent Action Buttons */
.patent-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.patent-selection {
  display: flex;
  align-items: center;
  gap: 8px;
}

.patent-selection input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.selection-indicator {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.selection-indicator.added {
  color: #10b981;
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.patent-actions .action-btn {
  width: auto;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.patent-actions .action-btn.primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.patent-actions .action-btn.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.patent-actions .action-btn.secondary {
  background: var(--bg1);
  border-color: var(--outline);
  color: var(--text);
}

.patent-actions .action-btn.secondary:hover {
  background: var(--outline);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-icon {
  font-size: 12px;
}

/* Patent Details Inline Display */
.patent-details {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--outline);
  border-radius: 8px;
  animation: slideDown 0.3s ease;
}

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

.details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.details-section h4 {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--outline);
}

.details-section p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.description-content p {
  margin-bottom: 8px;
}

.description-content p:last-child {
  margin-bottom: 0;
}

.claims-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.claim-item {
  padding: 8px;
  background: var(--bg1);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.info-item {
  font-size: 13px;
  line-height: 1.4;
}

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

/* Document Content */
  .document-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Report Editor Toolbar Styling */
.ql-toolbar {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 8px !important;
}

.ql-toolbar .ql-stroke {
  stroke: #374151 !important;
}

.ql-toolbar .ql-fill {
  fill: #374151 !important;
}

.ql-toolbar .ql-picker-label {
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  background: #ffffff !important;
}

.ql-toolbar .ql-picker-label:hover {
  background: #f3f4f6 !important;
  border-color: #9ca3af !important;
}

.ql-toolbar .ql-picker-options {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.ql-toolbar .ql-picker-item {
  color: #374151 !important;
  padding: 4px 8px !important;
}

.ql-toolbar .ql-picker-item:hover {
  background: #f3f4f6 !important;
}

.ql-toolbar button {
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  margin: 0 2px !important;
  padding: 4px !important;
}

.ql-toolbar button:hover {
  background: #f3f4f6 !important;
  border-color: #9ca3af !important;
}

.ql-toolbar button.ql-active {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

.ql-toolbar button.ql-active .ql-stroke {
  stroke: #ffffff !important;
}

.ql-toolbar button.ql-active .ql-fill {
  fill: #ffffff !important;
}

.ql-toolbar .ql-color-picker,
.ql-toolbar .ql-background {
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  background: #ffffff !important;
}

.ql-toolbar .ql-color-picker .ql-picker-label,
.ql-toolbar .ql-background .ql-picker-label {
  border: none !important;
  padding: 2px !important;
}

.report-editor {
  flex: 1;
  background: white;
  margin: 0;
  border: none;
  border-radius: 0;
  min-height: 600px;
}

/* Report Editor Customization */
.ql-toolbar {
  background: var(--bg1);
  border: none;
  border-bottom: 1px solid var(--outline);
  padding: 12px 16px;
}

.ql-container {
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.ql-editor {
  padding: 32px;
  min-height: calc(100vh - 200px);
  color: #333;
}

.ql-editor h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 24px 0 16px 0;
  color: #222;
}

.ql-editor h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 20px 0 12px 0;
  color: #333;
}

.ql-editor h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  color: #444;
}

.ql-editor p {
  margin: 8px 0;
  line-height: 1.6;
}

.ql-editor ul, .ql-editor ol {
  margin: 8px 0;
  padding-left: 24px;
}

.ql-editor li {
  margin: 4px 0;
}

.ql-editor blockquote {
  border-left: 4px solid #ddd;
  margin: 16px 0;
  padding-left: 16px;
  color: #666;
  font-style: italic;
}

.ql-editor code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
}

.ql-editor pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12px 0;
}

.ql-editor pre code {
  background: none;
  padding: 0;
}

/* Notifications */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  background: #10b981;
  border: 1px solid #059669;
}

.notification-error {
  background: #ef4444;
  border: 1px solid #dc2626;
}

.notification-info {
  background: #3b82f6;
  border: 1px solid #2563eb;
}

.notification-warning {
  background: #f59e0b;
  border: 1px solid #d97706;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .report-sidebar {
    width: 280px;
  }
}

@media (max-width: 900px) {
  .report-container {
    flex-direction: column;
    height: auto;
  }
  
  .report-sidebar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 50vh;
  }
  
  .report-sidebar.collapsed {
    width: 100%;
    height: 60px;
    max-height: 60px;
    border-radius: 12px 12px 0 0;
  }
  
  .report-sidebar.collapsed .sidebar-section:first-child {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    height: auto;
  }
  
  .report-sidebar.collapsed .sidebar-header {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  
  .report-sidebar.collapsed .sidebar-title {
    display: none;
  }
  
  .report-main {
    border-radius: 0 0 12px 12px;
    border-left: 1px solid var(--outline);
    min-height: 50vh;
  }
  
  .document-header {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .document-actions {
    margin-left: 0;
    align-self: flex-end;
  }
}

@media (max-width: 600px) {
  .document-header {
    padding: 16px;
  }
  
  .document-title {
    font-size: 24px;
  }
  
  .ql-editor {
    padding: 20px;
  }
  
  .sidebar-section {
    padding: 12px;
  }
}

/* Infringement Analysis Styles */
.infringement-analysis-section {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  position: relative;
}

.infringement-analysis-section h2 {
  color: #1f2937;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 10px;
}

/* Infringement editing styles */
.infringement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.infringement-actions {
  display: flex;
  gap: 8px;
}

.edit-infringement-btn,
.save-infringement-btn,
.cancel-infringement-btn {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-infringement-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.save-infringement-btn {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.save-infringement-btn:hover {
  background: #059669;
  border-color: #059669;
}

.cancel-infringement-btn {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.cancel-infringement-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Editable elements */
.editable-text,
.editable-stat,
.editable-summary {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.editable-text:hover,
.editable-stat:hover,
.editable-summary:hover {
  background: #f3f4f6;
  border: 1px dashed #9ca3af;
}

.editable-text.editing,
.editable-stat.editing,
.editable-summary.editing {
  background: #ffffff;
  border: 2px solid #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.editable-text.modified,
.editable-stat.modified,
.editable-summary.modified {
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

/* Edit input styles */
.edit-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
  padding: 0;
  margin: 0;
}

.edit-input.text-input {
  min-width: 200px;
}

.edit-input.stat-input {
  min-width: 80px;
  text-align: center;
}

.edit-input.summary-input {
  min-width: 300px;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Editing mode styles */
.infringement-analysis-section.editing-mode {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.infringement-analysis-section.editing-mode .editable-text,
.infringement-analysis-section.editing-mode .editable-stat,
.infringement-analysis-section.editing-mode .editable-summary {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.infringement-analysis-section.editing-mode .editable-text:hover,
.infringement-analysis-section.editing-mode .editable-stat:hover,
.infringement-analysis-section.editing-mode .editable-summary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.infringement-summary {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.infringement-summary h3 {
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  font-weight: 500;
  color: #6b7280;
  font-size: 14px;
}

.stat-value {
  font-weight: 600;
  color: #1f2937;
  font-size: 16px;
}

.stat-value.confirmed {
  color: #dc2626;
}

.summary-text {
  background: #ffffff;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.summary-text pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.infringement-chart h3 {
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 25px;
}


.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.confirmed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-badge.likely {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.status-badge.unlikely {
  background: #f0f9ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.status-badge.no_evidence {
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.confidence-score {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.element-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.element-content.single-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.claim-element-section,
.evidence-section {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 10px;
}

.claim-element-section {
  background: #f8fafc;
}

.evidence-section {
  background: #ffffff;
}

.claim-element-section h5,
.evidence-section h5 {
  margin: 0 0 15px 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.claim-text {
  background: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.detail-item strong {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item {
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
}

.evidence-item {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 15px;
  overflow: hidden;
  background: #ffffff;
}

.evidence-header {
  background: #f8fafc;
  padding: 10px 15px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.evidence-source {
  font-weight: 600;
  color: #1f2937;
  font-size: 13px;
}

.evidence-company {
  font-size: 12px;
  color: #6b7280;
}

.evidence-content {
  padding: 15px;
}

.evidence-image {
  margin-bottom: 15px;
  text-align: center;
}

.evidence-img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.evidence-text {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.text-snippet {
  background: #f8fafc;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.text-snippet strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-snippet blockquote {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  font-style: italic;
  border-left: 3px solid #3b82f6;
  padding-left: 12px;
}

.evidence-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 12px;
  color: #1f2937;
  font-weight: 600;
}

.detail-value.high {
  color: #dc2626;
}

.detail-value.medium {
  color: #d97706;
}

.detail-value.low {
  color: #6b7280;
}

.ai-verification {
  background: #f0f9ff;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  margin-top: 15px;
}

.ai-verification h6 {
  margin: 0 0 10px 0;
  color: #1e40af;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verification-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.verification-badge {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.verification-badge.confirmed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.verification-badge.likely {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.verification-badge.unlikely {
  background: #f0f9ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.verification-badge.no_evidence {
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.verification-confidence {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.verification-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verification-description,
.features-found,
.technical-details,
.reasoning {
  background: #ffffff;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.verification-description strong,
.features-found strong,
.technical-details strong,
.reasoning strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verification-description p,
.technical-details p,
.reasoning p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
}

.features-found ul {
  margin: 0;
  padding-left: 20px;
}

.features-found li {
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  margin-bottom: 4px;
}

.no-evidence {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

/* Infringement chart container */
.infringement-chart-rendered {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* Responsive design for infringement analysis */
@media (max-width: 768px) {
  .element-content.single-column {
    gap: 15px;
  }
  
  .claim-element-section,
  .evidence-section {
    padding: 15px;
    margin-bottom: 8px;
  }
  
  .summary-stats {
    grid-template-columns: 1fr;
  }
  
  
  .evidence-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* ===== NEW INFRINGEMENT ANALYSIS MODULE STYLES ===== */

/* Infringement Analysis Module Styles */
.infringement-analysis-module {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.module-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.module-actions {
    display: flex;
    gap: 8px;
}

.module-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.module-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.module-content {
    padding: 20px;
}

/* Analysis Configuration */
.analysis-config {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
}

.config-section {
    margin-bottom: 16px;
}

.config-section label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
}

.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

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

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
}

/* Charts Container */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.infringement-chart {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.chart-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
}

.chart-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.chart-controls {
    display: flex;
    gap: 4px;
}

.btn-icon {
    padding: 4px 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.btn-icon:hover {
    background: #e5e7eb;
}

.chart-content {
    padding: 16px;
}

.claim-element-section, .evidence-section, .analysis-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.claim-element-section:last-child, .evidence-section:last-child, .analysis-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.element-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
}

.element-text-container {
    margin-top: 8px;
}

.element-text {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.evidence-controls, .analysis-controls {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
}

.btn-small:hover {
    background: #f9fafb;
}

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

.evidence-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.evidence-title {
    font-weight: 500;
    color: #111827;
}

.evidence-content {
    font-size: 14px;
    color: #6b7280;
}

.evidence-source {
    margin-bottom: 8px;
}

.source-label {
    font-weight: 500;
    color: #374151;
}

.evidence-text {
    margin-bottom: 8px;
    line-height: 1.5;
}

.evidence-metadata {
    font-size: 12px;
    color: #9ca3af;
}

.analysis-result {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
}

.analysis-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.status-indicator {
    font-size: 16px;
}

.status-indicator.pending {
    color: #f59e0b;
}

.status-indicator.completed {
    color: #10b981;
}

.status-indicator.error {
    color: #ef4444;
}

.analysis-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-type, .confidence-score {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.type-label, .score-label {
    font-weight: 500;
    color: #374151;
}

.type-value, .score-value {
    color: #6b7280;
}

.reasoning {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reasoning-label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.reasoning-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Loading and Error States */
.loading-state, .error-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.error-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

/* Add Chart Section */
.add-chart-section {
    text-align: center;
    padding: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin-top: 20px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.icon {
    font-size: 16px;
    font-weight: bold;
}

/* NEW DATA-DRIVEN INFRINGEMENT ANALYSIS STYLES */
.chart-selector {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-selector h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

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

.patent-charts {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.patent-charts h5 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.chart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.chart-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.chart-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-name {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.chart-type {
  font-size: 12px;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

.chart-date {
  font-size: 12px;
  color: #6b7280;
}

.chart-actions {
  display: flex;
  gap: 8px;
}

.chart-actions .btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-actions .btn-small:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.chart-actions .btn-primary {
  background: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
}

.chart-actions .btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.chart-actions .btn-secondary {
  background: #6b7280;
  color: white;
  border: 1px solid #6b7280;
}

.chart-actions .btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.chart-display {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}

.chart-placeholder {
  text-align: center;
  color: #6b7280;
  padding: 40px;
}

.chart-placeholder h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.chart-placeholder p {
  margin: 0;
  font-size: 14px;
}

.infringement-chart-display {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.chart-header h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #374151;
}

.chart-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
}

.chart-type {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 3px;
}

.chart-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.claim-elements-section,
.evidence-section,
.analysis-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
}

.claim-elements-section h5,
.evidence-section h5,
.analysis-section h5 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.claim-elements-list,
.evidence-list,
.analysis-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.claim-element,
.evidence-item,
.analysis-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 12px;
}

.element-header,
.evidence-header,
.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.element-number,
.evidence-title,
.analysis-type {
  font-weight: 600;
  color: #374151;
}

.element-type {
  font-size: 12px;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 3px;
}

.element-text,
.evidence-content,
.analysis-content {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #374151;
}

.element-actions,
.evidence-actions,
.analysis-actions {
  display: flex;
  gap: 8px;
}

.empty-section {
  text-align: center;
  color: #6b7280;
  padding: 20px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 4px;
}

.empty-section h5 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.empty-section p {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.chart-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-secondary {
  background: #6b7280;
  color: white;
  border: 1px solid #6b7280;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

/* Report Sidebar Standardized Styles */
/* Welcome message helper text */
.welcome-helper-text {
  font-size: 11px;
  color: #9ca3af;
  margin: 4px 0 0 0;
}

/* Hidden elements */
.hidden {
  display: none;
}

/* Analysis configuration sections */
.analysis-config {
  display: none;
}

.analysis-config.visible {
  display: block;
}

.analysis-session {
  display: none;
}

.analysis-session.visible {
  display: block;
}

.loading-state {
  display: none;
}

.loading-state.visible {
  display: block;
}

.error-state {
  display: none;
}

.error-state.visible {
  display: block;
}

/* JavaScript-controlled display states */
.welcome-message.hidden {
  display: none;
}

.typing-indicator.visible {
  display: flex;
}

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

.analysis-config.hidden {
  display: none;
}

.analysis-session.visible {
  display: block;
}

/* Subscription Management Styles */
.subscription-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscription-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscription-badge.free {
  background: #f3f4f6;
  color: #6b7280;
}

.subscription-badge.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.subscription-badge.enterprise {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.subscription-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.subscription-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-plan h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.subscription-plan p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.subscription-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.premium-features {
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.premium-features h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.premium-features ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.premium-features li {
  padding: 8px 0;
  color: #374151;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-features li:before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
  font-size: 16px;
}

/* Responsive Design for Subscription */
@media (max-width: 768px) {
  .subscription-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .subscription-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.subscription-badge.admin {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
}

/* Additional button styles for settings page */
.btn-info {
  background-color: #17a2b8;
  color: white;
  border: 1px solid #17a2b8;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
  border: 1px solid #ffc107;
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}
