/* ThatsMyTrademark.com - Modern CSS Styles */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html {
  height: 100%;
}

footer {
  margin-top: auto;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .main-content {
    padding: 1rem 0;
  }
}

/* Header */
.header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: relative;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.version-info {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--background-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

/* Mobile Burger Menu */
.mobile-menu-toggle {
  display: none;
}

/* Mobile responsive breakpoints */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block !important;
  }
  
  .desktop-auth {
    display: none !important;
  }
}

.burger-btn {
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.burger-line {
  width: 24px;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.burger-btn.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-btn.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-btn.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

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

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.mobile-menu.show {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

.mobile-menu-content {
  padding: 1.5rem 2rem;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Desktop Auth Buttons */
.desktop-auth {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
}

.btn-primary:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
  color: white !important;
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--background-color);
  transform: translateY(-1px);
}

.btn-google {
  background: #4285f4;
  color: white;
}

.btn-google:hover {
  background: #3367d6;
}

.btn-microsoft {
  background: #0078d4;
  color: white;
}

.btn-microsoft:hover {
  background: #106ebe;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Search Section - Simple and effective centering */
.search-section {
  width: 100% !important;
  display: block !important;
}

.search-form {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
}

/* Override any conflicting styles */
.search-section * {
  box-sizing: border-box !important;
}

/* Simple centering approach */
.search-section > div {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.search-section > div > div {
  width: 100% !important;
  max-width: 1600px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Force the search form container to take full width but respect max-width */
.search-section > div > div > div {
  width: 100% !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
  display: block !important;
  position: static !important;
  left: auto !important;
  transform: none !important;
}

/* Ensure flags display properly */
select option {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}


/* Responsive layout for search row (now four columns) */
@media (max-width: 1200px) {
  .search-form div[style*="grid-template-columns: 1fr 1fr 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  .search-form div[style*="grid-template-columns: 1fr 1fr 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Mobile dropdown and input fixes */
  .search-form select,
  .search-form input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 0.75rem !important;
  }
  
  .search-form button {
    width: 100% !important;
    margin-top: 0.5rem !important;
  }
  
  /* Ensure proper spacing on mobile */
  .search-form div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  /* Fix search input width and icon positioning on mobile */
  .search-form input[type="text"] {
    width: 100% !important;
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
  }
  
  .search-form div[style*="position: relative"] {
    width: 100% !important;
  }
  
  .search-form div[style*="position: absolute; left: 1rem"] {
    left: 0.75rem !important;
    z-index: 10 !important;
  }
}

  /* Tablet responsive design */
@media (max-width: 1024px) and (min-width: 769px) {
  .search-form div[style*="grid-template-columns: 1fr 1fr 1fr 2fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
  
  .search-form div[style*="grid-template-columns: 1fr 1fr 1fr 2fr"] > div:last-child {
    grid-column: 1 / -1 !important;
  }
}

/* Force horizontal layout for the 5 search controls on desktop */
@media (min-width: 992px) {
  .search-form .row.g-3.align-items-center {
    display: grid !important;
    grid-template-columns: 2fr 2fr 2fr 2fr 4fr !important; /* country, type, mark type, classes, search */
    gap: 1.5rem !important;
    align-items: center !important;
  }
  .search-form .row.g-3.align-items-center > [class^="col-"] {
    width: 100% !important;
  }
}

/* Enhanced search box styling */
.search-form div[style*="background: linear-gradient(135deg, #f8fafc, #e2e8f0)"]:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-2px) !important;
}

.search-form input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.search-form button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
    position: relative;
  }
  
  /* Show mobile burger menu */
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Hide desktop auth buttons */
  .desktop-auth {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block !important;
    order: 2;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 0 0 1rem 1rem;
    gap: 0;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  .auth-buttons {
    order: 3;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    display: none;
  }
  
  .auth-buttons.active {
    display: flex;
  }
  
  .auth-buttons button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.75rem;
  }
  
  .logo {
    font-size: 1.25rem !important;
  }
}

/* General mobile improvements */
@media (max-width: 480px) {
  .search-section {
    padding: 2rem 1rem !important;
  }
  
  .search-section > div > div > div {
    padding: 1.5rem !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  .search-form select,
  .search-form input {
    font-size: 16px !important;
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
    width: 100% !important;
  }
  
  /* Ensure search form takes full width */
  .search-form {
    width: 100% !important;
  }
  
  .search-form > div {
    width: 100% !important;
  }
  
  .search-form div[style*="display: flex"] {
    width: 100% !important;
  }
}

/* Comprehensive responsive design */
@media (max-width: 1400px) {
  .search-section > div {
    padding: 0 1rem !important;
  }
}

@media (max-width: 768px) {
  /* Hero section responsive */
  .hero h1 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero p {
    font-size: 1rem !important;
    margin-bottom: 2rem !important;
  }
  
  .hero-buttons {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: center !important;
  }
  
  .hero-buttons .btn {
    width: 100% !important;
    max-width: 300px !important;
    padding: 1rem 2rem !important;
  }
  
  /* Search section responsive */
  .search-section h2 {
    font-size: 2rem !important;
  }
  
  .search-section p {
    font-size: 1rem !important;
  }
  
  /* Countries section responsive */
  .search-section > div > div {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .hero {
    padding: 2rem 1rem !important;
  }
  
  .hero h1 {
    font-size: 1.75rem !important;
  }
  
  .search-section h2 {
    font-size: 1.75rem !important;
  }
  
  .search-section > div > div > div {
    padding: 1rem !important;
  }
  
  .hero-buttons .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
}

.search-input {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background: var(--surface-color);
}

/* Results Section */
.results-section {
  width: 100%;
  margin-top:0px;
  margin-bottom:0px;
}

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

.results-count {
  color: var(--text-secondary);
}

.result-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.result-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.result-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.result-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.result-description {
  margin-bottom: 1rem;
}

.result-details {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--background-color);
  color: var(--text-secondary);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.result-address,
.result-representative {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.result-address i,
.result-representative i {
  width: 16px;
  text-align: center;
  margin-right: 0.5rem;
}

.result-actions {
  display: flex;
  gap: 1rem;
}

/* Loading and States */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

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

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface-color);
  padding: 0rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
    max-width: 400px;
}

.toast-success {
    border-left-color: #10b981;
    color: #065f46;
}

.toast-success i {
    color: #10b981;
    font-size: 1.25rem;
}

.toast-error {
    border-left-color: #ef4444;
    color: #991b1b;
}

.toast-error i {
    color: #ef4444;
    font-size: 1.25rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-filters {
    justify-content: center;
  }
  
  .results-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .result-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  /* Mobile-specific search results layout - now using custom cards instead of Tabulator */
}

/* Results Table Styles */
.table-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-wrapper {
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
  width: 100%;
}

/* Tabulator overrides to match site look */
/* Results table wrapper width fix */
#resultsContainer {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#resultsTableWrapper {
  width: 100% !important;
  background: white !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#resultsTableWrapper .tabulator {
  width: inherit !important;
  border: none !important;
  background: white !important;
  min-width: 0 !important;
}

#resultsTableWrapper .tabulator-tableHolder {
  width: 100% !important;
  min-width: 0 !important;
}

#resultsTableWrapper .tabulator-table {
  width: 100% !important;
  min-width: 0 !important;
}

#resultsTableWrapper .tabulator-col {
  min-width: 0 !important;
}

/* General tabulator styling (but not for results table) */
.tabulator:not(#resultsTableWrapper .tabulator) {
  border: none !important;
  background: white !important;
  width: 100% !important;
}

/* Hide text overflow ellipsis on button column */
.tabulator .tabulator-cell.no-overflow {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.tabulator .tabulator-header {
  border-bottom: 2px solid var(--border-color) !important;
  background: var(--surface-color) !important;
}

.tabulator .tabulator-col {
  background: var(--surface-color) !important;
  color: var(--text-primary) !important;
  border-right: 1px solid var(--border-color) !important;
  font-weight: 600 !important;
  padding: 1rem !important;
}

.tabulator .tabulator-row {
  border-bottom: 1px solid var(--border-color) !important;
}

.tabulator .tabulator-row:hover {
  background: var(--surface-color) !important;
}

.tabulator .tabulator-cell {
  color: var(--text-primary) !important;
  font-size: 0.875rem !important;
  padding: 1rem !important;
  line-height: 1.5 !important;
}

.results-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-table th {
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.results-table td {
  padding: 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
  background-color: var(--surface-color);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table responsive design */
@media (max-width: 768px) {
  .table-wrapper {
    font-size: 0.75rem;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.5rem;
  }
  
  .results-table th:nth-child(n+4),
  .results-table td:nth-child(n+4) {
    display: none;
  }
  
  /* Mobile results section improvements */
  .results-section {
    padding: 0.5rem 0 !important;
  }
  
  .results-section > div {
    padding: 0 1rem !important;
  }
  
  .results-header {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  .results-header h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .results-count {
    font-size: 0.9rem !important;
  }
  
  /* Mobile table content improvements - side by side layout */
  .tabulator .tabulator-row .tabulator-cell:nth-child(2)::before {
    content: "Trademark:";
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: inline-block;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 8px;
    vertical-align: top;
  }
  
  .tabulator .tabulator-row .tabulator-cell:nth-child(3)::before {
    content: "Owner:";
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: inline-block;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 8px;
    vertical-align: top;
  }
  
  .tabulator .tabulator-row .tabulator-cell:nth-child(4)::before {
    content: "Status:";
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: inline-block;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 8px;
    vertical-align: top;
  }
  
  .tabulator .tabulator-row .tabulator-cell:nth-child(5)::before {
    content: "Key Date:";
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: inline-block;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 8px;
    vertical-align: top;
  }
  
  .tabulator .tabulator-row .tabulator-cell:nth-child(6)::before {
    content: "Classes:";
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: inline-block;
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 8px;
    vertical-align: top;
  }
  
  /* Fix Key Date cell alignment - it contains a div structure */
  .tabulator .tabulator-cell:nth-child(5) div {
    display: inline !important;
    vertical-align: top !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure all cell content aligns properly */
  .tabulator .tabulator-cell > * {
    display: inline !important;
    vertical-align: top !important;
    margin: 0 !important;
  }
  
  /* Fix Key Date specific styling */
  .tabulator .tabulator-cell:nth-child(5) {
    align-items: flex-start !important;
  }
  
  /* Make cells display as horizontal rows */
  .tabulator .tabulator-row .tabulator-cell {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  
  /* Ensure content flows properly */
  .tabulator .tabulator-row .tabulator-cell span {
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  /* Mobile loading and empty states */
  .loading,
  .empty-state {
    padding: 2rem 1rem !important;
    margin: 1rem 0 !important;
  }
  
  .loading .spinner {
    width: 3rem !important;
    height: 3rem !important;
  }
  
  .loading h3 {
    font-size: 1.1rem !important;
  }
  
  .loading p {
    font-size: 0.9rem !important;
  }
  
  .empty-state i {
    font-size: 3rem !important;
    margin-bottom: 1rem !important;
  }
  
  .empty-state h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .empty-state p {
    font-size: 0.9rem !important;
    margin-bottom: 0.75rem !important;
  }
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* Pagination styles */
.pagination-btn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

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

.pagination-btn:disabled:hover {
    background-color: white !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center !important;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Watchlist Styles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header h1 i {
    margin-right: 0.5rem;
}

.quick-add-form {
    margin-bottom: 0;
}

.quick-add-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.quick-add-form input {
    flex: 1;
    margin-bottom: 0;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.three-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

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

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

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Card Styles */
.card {
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Watchlist Styles */
.watchlist-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.watchlist-count {
    font-weight: 600;
    color: var(--primary-color);
}

.watchlist-limit {
    color: var(--text-secondary);
}

.watchlist-type-selector {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
}

.keyword-search-type {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
    margin-left: 0.5rem;
}

.form-help {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Watchlist Item Types */
.watchlist-item-trademark {
    border-left: 4px solid var(--primary-color);
}

.watchlist-item-keyword {
    border-left: 4px solid var(--success-color);
}

.watchlist-item-type {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.watchlist-item-type.trademark {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.watchlist-item-type.keyword {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.watchlist-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.watchlist-item-header h4 {
    margin: 0;
    flex: 1;
}

/* Collapsible Similar Trademarks */
.similar-trademarks-group {
    margin-top: 1rem;
}

.similar-trademarks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.similar-trademarks-header:hover {
    background: #e2e8f0;
}

.similar-trademarks-header i {
    transition: transform 0.3s ease;
}

.similar-trademarks-header.collapsed i {
    transform: rotate(-90deg);
}

.similar-trademarks-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.similar-trademarks-list.expanded {
    max-height: 500px;
}

.similar-trademark-mini {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    background: white;
    font-size: 0.9rem;
}

.similar-trademark-mini h5 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.similar-trademark-mini .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Search Result Selection */
.search-result-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background-color: var(--bg-light);
}

.search-result-item.selected {
    background-color: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.card h2 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.card h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.card-actions {
    margin-top: 1rem;
    text-align: center;
}

.watchlist-container,
.similar-trademarks-container,
.alerts-container {
    min-height: 400px;
}

.watchlist-item,
.similar-trademark,
.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.watchlist-item:hover,
.similar-trademark:hover,
.alert-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.watchlist-item-info,
.similar-trademark-info,
.alert-item-info {
    flex: 1;
}

.watchlist-item-info h4,
.similar-trademark-info h4,
.alert-item-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.watchlist-item-meta,
.similar-trademark-meta,
.alert-item-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notes-display {
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-color);
}

.watchlist-item-actions,
.alert-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.btn-small {
    padding: 0.5rem;
    font-size: 0.8rem;
    min-width: auto;
}

.opposition-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.similar-trademark.opposition-available {
    border-left: 4px solid #ff6b6b;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

/* 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.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Watchlist button styles removed - using standard btn-primary instead */

/* Enhanced Watchlist Table Styles */
.watchlist-table-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.watchlist-table-header > div {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

.watchlist-item {
    background: white;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.watchlist-item:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.watchlist-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    min-height: 60px;
}

.watchlist-row > div {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.watchlist-keyword {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.watchlist-type {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

.watchlist-classes,
.watchlist-status {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

.watchlist-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.toggle-matches-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.toggle-icon {
    transition: transform 0.2s ease;
}

.toggle-matches-btn.active .toggle-icon {
    transform: rotate(90deg);
}

.matches-section {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: none; /* Initially hidden */
    width: 100%;
    grid-column: 1 / -1; /* Span all columns */
}

.matches-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f1f5f9;
}

.matches-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.matches-content {
    padding: 1rem 1.5rem;
}

.matches-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.matches-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.matches-results {
    display: none;
}

.matches-table-container {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.matches-table-container table {
    width: 100%;
    border-collapse: collapse;
}

.matches-table-container th {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.matches-table-container td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.matches-table-container tr:hover {
    background: #f8fafc;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-application {
    background: #dbeafe;
    color: #1e40af;
}

.status-registered {
    background: #dcfce7;
    color: #166534;
}

.status-opposed {
    background: #fef3c7;
    color: #92400e;
}

.status-withdrawn {
    background: #fee2e2;
    color: #dc2626;
}

.status-pending {
    background: #e0e7ff;
    color: #3730a3;
}

.status-refused {
    background: #fecaca;
    color: #b91c1c;
}

.status-cancelled {
    background: #f3f4f6;
    color: #374151;
}

.status-expired {
    background: #fef2f2;
    color: #991b1b;
}

.status-suspended {
    background: #fef3c7;
    color: #92400e;
}

/* Add New Keyword Section */
.add-keyword-row {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: 2px solid var(--border-color);
}

.add-keyword-row h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-keyword-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr auto;
    gap: 0.75rem;
    align-items: end;
}

/* Responsive form - fit in one row on desktop */
@media (min-width: 1200px) {
    .add-keyword-form-grid {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr auto;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .add-keyword-form-grid {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr auto;
        gap: 0.625rem;
    }
    
    .add-keyword-form-grid input,
    .add-keyword-form-grid select,
    .add-keyword-form-grid .selector-display {
        font-size: 0.85rem !important;
        padding: 0.625rem 0.75rem !important;
    }
    
    .add-keyword-submit-btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 768px) {
    .add-keyword-form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .add-keyword-submit-btn {
        grid-column: 1 !important;
        width: 100% !important;
    }
}

.add-keyword-submit-btn:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.add-keyword-form .form-group {
    display: flex;
    flex-direction: column;
}

.add-keyword-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.add-keyword-form input,
.add-keyword-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-keyword-form input:focus,
.add-keyword-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.add-keyword-form .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.logout-btn {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.logout-btn:hover {
    background: #f8f9fa;
    color: var(--text-primary);
    border-color: #dee2e6;
}

/* Footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        padding: 0 1rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem 0;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .three-column-layout {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .three-column-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .quick-add-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .watchlist-item,
    .similar-trademark,
    .alert-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .watchlist-item-actions,
    .alert-item-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Multi-select styling */
select[multiple] {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 80px;
    max-height: 150px;
    overflow-y: auto;
}

select[multiple]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select[multiple] option {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

select[multiple] option:checked {
    background: var(--primary-color);
    color: white;
}

select[multiple] option:hover {
    background: #f8fafc;
}

/* Custom Multi-Select Dropdown */
.multiselect-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.multiselect-trigger {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.multiselect-trigger:hover {
    border-color: var(--primary-color);
}

.multiselect-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.multiselect-arrow {
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.multiselect-trigger.active .multiselect-arrow {
    transform: rotate(180deg);
}

.multiselect-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.multiselect-option {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.multiselect-option:last-child {
    border-bottom: none;
}

.multiselect-option:hover {
    background: #f8fafc;
}

.multiselect-option input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.multiselect-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.multiselect-option input[type="checkbox"]:checked + label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Selected items display */
.multiselect-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.multiselect-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.multiselect-tag-remove {
    cursor: pointer;
    font-weight: bold;
}

.multiselect-tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Select2 Custom Styling */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    min-height: 42px;
    padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    padding: 0.25rem 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0.25rem;
    color: white;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem 0.25rem 0.125rem 0;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding-right: 0.5rem;
    margin-right: 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.select2-dropdown {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
    color: white;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
    background-color: #f8f9fa;
    color: var(--text-primary);
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true]:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Custom Selector Component */
.custom-selector {
    position: relative;
    width: 100%;
}

.selector-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 42px;
}

.selector-display:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.selector-display.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selector-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 400;
    flex: 1;
}

.selector-icon {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.selector-display:hover .selector-icon {
    color: var(--primary-color);
}

.selector-display.active .selector-icon {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* Modal Styling for Selector */
#selectorModal .modal-content {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: none;
}

#selectorModal .modal-header {
    border-radius: 0.75rem 0.75rem 0 0;
}

#selectorModal .modal-body {
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Selector Options Grid */
.selector-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.selector-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selector-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.selector-option.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.selector-option input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.selector-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.3;
}

.selector-option.selected label {
    color: var(--primary-color);
    font-weight: 500;
}

/* All Classes/Statuses Special Option */
.selector-option.all-option {
    border: 2px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    font-weight: 500;
}

.selector-option.all-option label {
    color: var(--primary-color);
    font-weight: 600;
}

.selector-option.all-option:hover {
    background: rgba(59, 130, 246, 0.15);
}

/* Selection Summary */
.selection-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-summary i {
    color: var(--primary-color);
}

/* Action Buttons */
.action-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Choose All Button Styling */
.btn-success {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .selector-options {
        grid-template-columns: 1fr;
    }
    
    .selector-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    #selectorModal .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: 95%;
    }
    
    /* Trademark Details Modal - Mobile Layout */
    #trademarkDetailsModal .modal-content {
        max-width: 95%;
        width: 95%;
        margin: 0.5rem;
        padding: 0.75rem;
    }
    
    /* Make modal content single column on mobile */
    #trademarkDetailsModal .modal-content div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Alternative approach - target all grid containers in modal ONLY */
    #trademarkDetailsModal .modal-content *[style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Keep labels and values on same line for mobile modal */
    #trademarkDetailsModal .modal-content div[style*="justify-content: space-between"] {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.25rem !important;
        justify-content: space-between !important;
    }
    
    #trademarkDetailsModal .modal-content div[style*="justify-content: space-between"] span:first-child {
        flex-shrink: 0 !important;
        min-width: 80px !important;
        max-width: 80px !important;
    }
    
    #trademarkDetailsModal .modal-content div[style*="justify-content: space-between"] span:last-child {
        flex: 1 !important;
        text-align: right !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Adjust modal header for mobile */
    #trademarkDetailsModal .modal-content > div:first-child {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Adjust title size for mobile */
    #trademarkDetailsModal .modal-content > div:first-child > div:first-child {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Adjust image size for mobile */
    #trademarkDetailsModal .modal-content > div:first-child > div:last-child > div:first-child {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto !important;
    }
    
    /* Stack action buttons on mobile */
    #trademarkDetailsModal .modal-content > div:last-child {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    #trademarkDetailsModal .modal-content > div:last-child button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Keyword Row Styles */
.keyword-row {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.keyword-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.keyword-row.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.keyword-row.alert-keyword {
    border-left: 4px solid var(--warning-color);
}

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

.keyword-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.keyword-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.meta-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.type-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.matches-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.days-tag {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.classes-tag,
.status-tag {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.keyword-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.keyword-actions button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.keyword-actions button:hover {
    background: var(--background-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.alert-toggle-btn:hover {
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.alert-toggle-btn.active {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.alert-toggle-btn.active:hover {
    background: #d97706;
}

.edit-keyword-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.delete-keyword-btn:hover {
    color: var(--error-color);
    border-color: var(--error-color);
}

/* Responsive Keyword Rows */
@media (max-width: 768px) {
    .keyword-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .keyword-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .keyword-name {
        font-size: 0.95rem;
        margin-bottom: 0;
        width: 100%;
        display: block;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .keyword-meta {
        gap: 0.375rem;
        width: 100%;
    }
    
    .meta-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .keyword-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
        margin-top: 0.25rem;
    }
    
    .keyword-actions button {
        width: 40px;
        height: 40px;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .keyword-row {
        padding: 0.875rem;
    }
    
    .keyword-name {
        font-size: 0.9rem;
    }
    
    .keyword-actions button {
        width: 36px;
        height: 36px;
    }
}

/* Match Row Styles (Mobile Matches Modal) */
.match-row {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.match-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

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

.match-info {
    margin-bottom: 0.625rem;
}

.match-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-break: break-word;
    text-align: left;
    width: 100%;
    display: block;
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-align: left;
    align-items: center;
}

.match-meta span {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    line-height: 1.2;
}

.match-meta strong {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 0.25rem;
}

.match-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.match-status.registered {
    background: #dcfce7;
    color: #166534;
}

.match-status.lapsed,
.match-status.expired {
    background: #fee2e2;
    color: #991b1b;
}

.match-status.pending,
.match-status.filed {
    background: #dbeafe;
    color: #1e40af;
}

.match-status.opposed {
    background: #fef3c7;
    color: #92400e;
}

.match-status.withdrawn,
.match-status.refused {
    background: #f3f4f6;
    color: #6b7280;
}

.match-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.match-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: white;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.match-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.add-name-btn {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

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

.add-owner-btn {
    background: var(--success-color) !important;
    color: white !important;
    border-color: var(--success-color) !important;
}

.add-owner-btn:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.match-actions button:not(.add-name-btn):not(.add-owner-btn) {
    padding: 0.625rem;
    min-width: 40px;
}

.match-actions button:not(.add-name-btn):not(.add-owner-btn):hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Mobile Matches Modal Styling */
#mobileMatchesModal[style*="display: flex"],
#mobileMatchesModal.active {
    display: flex !important;
}

#mobileMatchesContent {
    padding: 0;
}

#closeMobileMatchesModal:hover {
    background: var(--background-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Responsive Match Rows */
@media (max-width: 768px) {
    #mobileMatchesModal {
        padding: 0.75rem;
    }
    
    .match-row {
        padding: 0.875rem;
        margin-bottom: 0.625rem;
    }
    
    .match-name {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .match-meta {
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .match-actions button {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    #mobileMatchesModal {
        padding: 0.5rem;
    }
    
    .match-row {
        padding: 0.75rem;
        border-radius: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .match-name {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .match-meta {
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    
    .match-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .match-actions button {
        font-size: 0.75rem;
        padding: 0.5rem 0.625rem;
    }
}

/* Desktop table fixes */
@media (min-width: 769px) {
    /* Ensure desktop table displays correctly */
    .tabulator .tabulator-row {
        height: 60px !important;
    }
    
    /* Ensure plus button is visible */
    .tabulator .add-both-btn {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure Key Date column has enough height */
    .tabulator .tabulator-cell {
        height: 60px !important;
        vertical-align: middle !important;
    }
}
