/* Custom CSS */
@import url("extra.css");

:root {
  --primary-color: #10b981; /* Emerald 500 */
  --primary-hover: #059669; /* Emerald 600 */
  --bg-color: #f3f4f6; /* Gray 100 */
  --panel-bg: #ffffff;
  --text-main: #1f2937; /* Gray 800 */
  --text-secondary: #6b7280; /* Gray 500 */
  --border-color: #e5e7eb; /* Gray 200 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  height: 60px;
  background-color: var(--panel-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

nav {
  display: flex;
  gap: 5px;
}

.nav-item {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--bg-color);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Main Content Views */
main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#view-plots {
  display: block; 
}

.view-container.active {
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Map */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Sidebar / Plot List */
.sidebar {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 20px;
  width: 266px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  height: calc(100% - 40px);
}

.sidebar-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sidebar-title h2 {
  font-size: 1rem;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-main);
}

.btn-primary {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

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

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary-color);
  background-color: white;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

/* Plot List */
.plot-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.plot-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  position: relative;
}

.plot-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.plot-item.selected {
  border-color: var(--primary-color);
  background-color: #ecfdf5;
}

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

.plot-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-growing { background-color: var(--primary-color); }
.status-harvested { background-color: #f59e0b; }
.status-idle { background-color: #9ca3af; }

.plot-actions {
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  gap: 3px;
}

.plot-item:hover .plot-actions {
  opacity: 1;
}

.action-btn-sm {
  padding: 2px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
}

.action-btn-sm:hover {
  background-color: rgba(0,0,0,0.05);
  color: var(--text-main);
}

.action-btn-sm.delete:hover {
  color: #ef4444;
  background-color: #fee2e2;
}

.plot-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plot-detail-row {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  margin-bottom: 2px;
}

/* Stats Footer */
.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  background-color: #f9fafb;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: white;
  border-radius: 16px;
  width: 500px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
  overflow: hidden;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

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

.modal-body {
  padding: 20px;
}

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

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.modal-footer {
  padding: 15px 20px;
  background-color: #f9fafb;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  padding: 8px 16px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Legend */
.legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  z-index: 400;
  font-size: 0.75rem;
}

.legend-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* Seed View Layout */
.seed-layout {
  display: flex;
  height: 100%;
  background: white;
}

/* New Category Sidebar */
.seed-category-sidebar {
  width: 250px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.category-tree {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.category-group {
  margin-bottom: 5px;
}

.category-header {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.category-header:hover {
    color: var(--text-main);
}

.species-list {
  list-style: none;
  margin-top: 2px;
}

.species-item {
   padding: 8px 12px 8px 20px;
   font-size: 0.9rem;
   cursor: pointer;
   border-radius: 6px;
   color: var(--text-main);
   transition: background 0.2s;
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 1px;
 }
 
 .species-item:hover {
   background-color: #e2e8f0;
 }
 
 .species-item.active {
   background-color: #ecfdf5;
   color: var(--primary-color);
   font-weight: 600;
 }
 
 .count-badge {
     font-size: 0.75rem;
     background: #e2e8f0;
     color: var(--text-secondary);
     padding: 1px 6px;
     border-radius: 10px;
     min-width: 20px;
     text-align: center;
 }
 
 .species-item.active .count-badge {
     background: #d1fae5;
     color: var(--primary-color);
 }

 .category-item {
     padding: 8px 12px;
     margin-bottom: 4px;
     border-radius: 8px;
     cursor: pointer;
     font-size: 13px;
     color: var(--text-secondary);
     display: flex;
     align-items: center;
     gap: 8px;
     transition: all 0.2s;
 }
 
 .category-item:hover {
     background-color: #f3f4f6;
     color: var(--text-main);
 }
 
 .category-item.active {
     background-color: #ecfdf5;
     color: var(--primary-color);
     font-weight: 600;
 }
 
 .category-icon {
     display: flex;
     align-items: center;
     justify-content: center;
     opacity: 0.6;
 }
 
 .category-item.active .category-icon {
     opacity: 1;
 }
 
 .category-name {
     flex: 1;
 }
 
 .category-item .count {
     font-size: 11px;
     background: #f3f4f6;
     padding: 2px 6px;
     border-radius: 10px;
     color: #6b7280;
 }
 
 .category-item.active .count {
     background: rgba(16, 185, 129, 0.1);
     color: var(--primary-color);
 }

.seed-sidebar {
  width: 200px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: #181616;
}

.seed-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.seed-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
}

.seed-item:hover {
  background-color: #f9fafb;
}

.seed-item.active {
  background-color: #ecfdf5;
  border-left: 3px solid var(--primary-color);
}

.seed-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.seed-tags-preview {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.seed-detail {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  background-color: #fcfcfc;
}

.seed-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.seed-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.seed-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag-chip {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-key {
  color: var(--text-secondary);
  font-weight: 500;
}

.tag-val {
  font-weight: 600;
  color: var(--primary-color);
}

.file-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  color: var(--primary-color);
}

.empty-state {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-dropzone:hover {
  border-color: var(--primary-color);
  background-color: #ecfdf5;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.file-name {
  color: var(--text-main);
  font-weight: 600;
  margin-top: 5px;
}

/* Breeding Plans */
.plan-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* Graph Container */
#seed-graph-container {
  flex: 1;
  height: 100%;
  position: relative;
  display: none;
  background-color: #f9fafb;
}

#seed-graph-container.active {
  display: block;
}

#seed-graph {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}



/* Breeding Plans */
.plan-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* Graph Container */
#seed-graph-container {
  flex: 1;
  height: 100%;
  position: relative;
  display: none;
  background-color: #f9fafb;
}

#seed-graph-container.active {
  display: block;
}

#seed-graph {
  width: 100%;
  height: 100%;
}

/* Genetics Viz */
.genetics-viz {
  margin-bottom: 15px;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.seq-strip {
  display: flex;
  height: 20px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.bp {
  flex: 1;
}
.bp-A { background-color: #10b981; } /* Green */
.bp-T { background-color: #ef4444; } /* Red */
.bp-C { background-color: #3b82f6; } /* Blue */
.bp-G { background-color: #f59e0b; } /* Yellow */

.stats-row {
  display: flex;
  gap: 15px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Navigation Active State - Moved to top */
/* .nav-item.active {
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
} */

nav a {
    text-decoration: none;
    color: inherit;
}

/* Phenotype Card */
.phenotype-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 1px solid var(--border-color);
}

.ph-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ph-stats {
  display: flex;
  justify-content: space-between;
  background: #f9fafb;
  padding: 10px;
  border-radius: 8px;
}

.ph-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
}

.ph-stat label {
  color: #999;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.ph-stat span {
  font-weight: 600;
  color: #374151;
}

.ph-notes {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

/* Phenotype Layout */
.ph-sidebar {
  width: 350px;
  background: white;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ph-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.ph-detail {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background-color: #f9fafb;
}

.ph-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
  margin-bottom: 5px;
}

.ph-item:hover {
  background-color: #f3f4f6;
}

.ph-item.active {
  background-color: #ecfdf5; /* Emerald-50 */
  border: 1px solid var(--primary-color);
}

/* New: History Sidebar */
.ph-history {
  width: 320px;
  background: white;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.history-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.history-item {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 6px;
  margin-bottom: 4px;
  position: relative;
  padding-left: 20px;
}

.history-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d1d5db;
}

.history-item:hover {
  background-color: #f9fafb;
}

.history-item.active {
  background-color: #ecfdf5;
}

.history-item.active::before {
  background-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.history-main {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.history-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
}

/* Detail Record View */
.record-detail-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.record-header {
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-body {
  padding: 20px;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.record-stat-box {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.record-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.record-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.record-images {
  margin-top: 20px;
}

.record-images h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.record-img {
  width: 100%;
  aspect-ratio: 1;
  background-color: #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.8rem;
  overflow: hidden;
  position: relative;
}

.record-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge */
.badge {
  background: #e5e7eb;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th, .data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background-color: #f9fafb;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: #6b7280;
}

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

.data-table tr.highlight {
  background-color: #fef3c7 !important; /* Amber-100 */
  transition: background-color 0.3s;
}

.plot-tabs {
  display: flex;
  gap: 5px;
  background: #e5e7eb;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.plot-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #6b7280;
  transition: all 0.2s;
}

.plot-tab:hover {
  background: rgba(255,255,255,0.5);
}

.plot-tab.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Custom Searchable Dropdown */
.custom-select-container {
  position: relative;
}

.custom-select-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow);
  display: none;
  margin-top: 4px;
}

.custom-select-dropdown.show {
  display: block;
}

.custom-select-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.custom-select-option:hover {
  background-color: #f3f4f6;
}

.custom-select-option.selected {
  background-color: #ecfdf5;
  color: var(--primary-color);
}

/* Multi-select Tags */
.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.tag-chip {
  background: #e5e7eb;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-remove {
  cursor: pointer;
  color: #6b7280;
  font-weight: bold;
}

.tag-remove:hover {
  color: #ef4444;
}

/* Plot Detail Panel */
.plot-detail-panel {
  position: relative;
  width: 0;
  background-color: var(--panel-bg);
  border-left: 1px solid transparent;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  height: 100%;
}

.plot-detail-panel .item-title {
  height: 30px;
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  padding-top: 5px;
}

.plot-detail-panel .update-time-label{
  color: #999;
  font-size: 8px;
}


.plot-detail-panel.open {
  width: 270px;
  border-left-color: var(--border-color);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  width: 270px;
}

.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-content {
  width: 100%;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 16px;
  overflow-x: auto;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tab-btn {
  padding: 10px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn.active {
  font-weight: bold;
  color: #181616;
  border-bottom: 2px solid #181616;
}

.tab-content {
  display: none;
  padding: 0 16px 16px;
}

.tab-content.active {
  display: block;
}

/* Timeline */
.timeline {
  position: relative;
  border-left: 2px solid #e5e7eb;
  padding-left: 16px;
  margin-top: 10px;
}

.timeline-item {
  position: relative;
  padding-left: 16px;
  padding-bottom: 16px;
  border-left: 2px solid var(--border-color);
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--primary-color);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 0.85rem;
  color: var(--text-main);
  background: #f9fafb;
  padding: 10px;
  border-radius: 8px;
  margin-top: 4px;
}

/* Data Lists */
.data-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.data-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.info-box {
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* Icon Button Small */
.icon-btn-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  transition: all 0.2s;
}

.icon-btn-sm:hover {
  background-color: #fee2e2;
  color: #ef4444;
}
