.header img {
  float: left;
  width: 60px;
  height: 80px;
}

.header h1 {
  position: relative;
  top: 18px;
  left: 10px;
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; 
  padding: 1em; 
  background-color: #f8f9fa;
  line-height: 1.6;
}

.page-header {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.page-title {
  margin: 0;
  color: #2c3e50;
  font-size: 1.75rem;
  font-weight: 600;
}

.controls-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1.5rem 0;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 250px;
}

.search-input {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
}

.clear-search-btn {
  padding: 0.5rem 1rem;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.clear-search-btn:hover {
  background: #7f8c8d;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.toggle-btn:hover {
  background: #2980b9;
}

.tree-view-btn {
  padding: 0.5rem 1rem;
  background: #27ae60;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-block;
  margin-left: 0.5rem;
}

.tree-view-btn:hover {
  background: #219a52;
  text-decoration: none;
  color: white;
}

.view-mode {
  font-weight: 600;
  color: #7f8c8d;
  font-size: 14px;
  margin-left: 0.5rem;
}

.batch-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.new-list-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.new-list-btn:hover {
  background: #2980b9;
}

.save-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.save-btn:hover:not(:disabled) {
  background: #229954;
}

.save-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}

.discard-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.list-row.is-editing {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

.list-name-input,
.slug-input,
.description-input {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
}

.list-name-input:focus,
.slug-input:focus,
.description-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.description-input {
  min-height: 60px;
}

.description-text {
  color: #5d6d7e;
  font-size: 0.875rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.description-cell {
  max-width: 200px;
  word-wrap: break-word;
}

.slug-input {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

.edit-list-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.edit-list-btn:hover {
  background: #2980b9;
}

.cancel-edit-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cancel-edit-btn:hover {
  background: #c0392b;
}

/* Note: Modal styles now handled by create-list-modal web component */

.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

table { 
  width: 100%; 
  border-collapse: collapse; 
}

th, td { 
  padding: 1rem 0.75rem; 
  text-align: left; 
  border-bottom: 1px solid #e1e8ed;
}

th { 
  background-color: #f8f9fa; 
  font-weight: 600;
  color: #2c3e50;
  user-select: none;
}

th[data-sort] {
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s;
}

th[data-sort]:hover {
  background-color: #e9ecef;
}

th.sorted-asc::after {
  content: " ↑";
  color: #3498db;
}

th.sorted-desc::after {
  content: " ↓";
  color: #3498db;
}

.list-row {
  transition: background-color 0.2s;
}

.list-row:hover {
  background-color: #f8f9fa;
}

.list-info strong {
  color: #2c3e50;
  font-weight: 600;
}

.item-count {
  display: block;
  font-size: 0.75rem;
  color: #7f8c8d;
  margin-top: 0.25rem;
}

.edit-link {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #27ae60;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.edit-link:hover {
  background: #229954;
}

.slug-cell code {
  background: #f1f3f4;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

.usage-tag {
  display: inline-block;
  background: #ecf0f1;
  color: #2c3e50;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  margin: 0.125rem;
}

.more-count {
  color: #7f8c8d;
  font-size: 0.75rem;
  font-style: italic;
}

.empty-value {
  color: #bdc3c7;
  font-style: italic;
}

.relative-date {
  font-weight: 600;
  color: #2c3e50;
}

.exact-date, .exact-time {
  font-size: 0.75rem;
  color: #7f8c8d;
}

.deleteButton {
  padding: 0.25rem 0.75rem;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.deleteButton:hover {
  background: #c0392b;
}

.deleteButton:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.loading-cell, .empty-cell {
  text-align: center;
  padding: 2rem;
  color: #7f8c8d;
  font-style: italic;
}

/* User level specific styling */
body:not(.basic-features) .basic-title {
  display: none;
}

body.basic-features .organizer-title {
  display: none;
}

body:not(.basic-features) .basic-description {
  display: none;
}

body.basic-features .organizer-description {
  display: none;
}

body:not(.basic-features) .basic-text {
  display: none;
}

body.basic-features .organizer-text {
  display: none;
}

/* Lists view for basic users */
.basic-features .personal-page-section {
  background: #e8f5e8;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.basic-features .personal-page-section h3 {
  margin: 0 0 0.5rem 0;
  color: #2E7D32;
  font-size: 1.1rem;
  font-weight: 600;
}

.basic-features .lists-section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.basic-features .lists-section h3 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.basic-features .table-container {
  border: none;
  box-shadow: none;
}

/* Hide technical columns for basic users */
.basic-features .table-container th:nth-child(4), /* Slug */
.basic-features .table-container td:nth-child(4),
.basic-features .table-container th:nth-child(5), /* Used In Lists */
.basic-features .table-container td:nth-child(5) {
  display: none;
}

/* Moderation Status Styles for List-Level */
.list-row.moderated {
  position: relative;
}

.list-row.moderated.hidden {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

.list-row.moderated.removed {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
}

.moderation-status-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 10;
}

.moderation-status-indicator.hidden {
  background-color: #ffc107;
  color: #856404;
}

.moderation-status-indicator.removed {
  background-color: #dc3545;
  color: white;
}

.list-row.moderated .list-name-link {
  opacity: 0.7;
}

.list-row.moderated.removed .list-name-link {
  text-decoration: line-through;
}

.list-row.moderated input {
  opacity: 0.7;
  cursor: not-allowed;
}

.list-row.moderated.removed input {
  background-color: #f5f5f5;
  text-decoration: line-through;
}

.list-row.moderated .actions-cell a,
.list-row.moderated .actions-cell button {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .controls-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    min-width: auto;
  }
  
  table {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: 0.5rem;
  }
}
