*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 200px;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --green: #22c55e;
  --green-dark: #16a34a;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --text: #111827;
  --border: #e5e7eb;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ── DARK MODE ── */
body.dark-mode {
  --gray-50: #0d1117;
  --gray-100: #161b22;
  --gray-200: #21262d;
  --gray-300: #30363d;
  --gray-400: #484f58;
  --gray-500: #6e7681;
  --gray-600: #8b949e;
  --gray-700: #c9d1d9;
  --gray-800: #e6edf3;
  --gray-900: #f6f8fa;
  --white: #21262d;
  --text: #f6f8fa;
  --border: #30363d;
  background: #0d1117;
  color: #c9d1d9;
}

body.dark-mode .sidebar,
body.dark-mode .topbar,
body.dark-mode .section-card,
body.dark-mode .models-panel,
body.dark-mode .panel-card,
body.dark-mode .welcome-card,
body.dark-mode .search-box,
body.dark-mode input,
body.dark-mode button,
body.dark-mode .tab-bar .tab,
body.dark-mode .dataset-card,
body.dark-mode .dataset-card-body,
body.dark-mode .explore-search,
body.dark-mode .sort-btn {
  background: var(--white) !important;
  color: var(--gray-700) !important;
}

body.dark-mode .tab-bar .tab.active {
  border-bottom-color: var(--primary) !important;
}

body.dark-mode .dataset-card-body {
  background: var(--white) !important;
}

body.dark-mode .card-name,
body.dark-mode .card-author,
body.dark-mode .card-desc,
body.dark-mode .card-stats,
body.dark-mode .section-label {
  color: var(--gray-700) !important;
}

body.dark-mode .section-label-sub {
  color: var(--gray-600) !important;
}

body.dark-mode .card-tags .tag {
  background: var(--gray-100) !important;
  color: var(--gray-700) !important;
}

body.dark-mode .progress-bar {
  background: var(--gray-100) !important;
}

body.dark-mode .progress-labels {
  color: var(--gray-600) !important;
}

body.dark-mode input::placeholder {
  color: var(--gray-600) !important;
}

body.dark-mode .btn {
  background: var(--gray-100) !important;
  color: var(--gray-700) !important;
}

body.dark-mode .btn-primary {
  background: var(--primary) !important;
  color: white !important;
}

body.dark-mode .btn-new {
  background: var(--gray-100) !important;
  color: var(--gray-700) !important;
}

body.dark-mode .view-btns {
  border-color: var(--border) !important;
}

body.dark-mode .view-btn {
  background: var(--gray-100) !important;
  color: var(--gray-700) !important;
}

body.dark-mode .view-btn.active {
  background: var(--primary) !important;
  color: white !important;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 13.5px;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.service-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 10px 10px 6px;
  border-bottom: 1px solid var(--border);
}

.service-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}

.service-tab:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-300);
}

.service-tab.active {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}

.logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}

.logo-icon svg { width:16px; height:16px; fill:white; }

.sidebar-search {
  margin: 10px 10px 6px;
  position: relative;
}
.sidebar-search input {
  width: 100%;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 10px 6px 28px;
  font-size: 12.5px;
  color: var(--gray-700);
  outline: none;
  font-family: inherit;
  transition: border-color .15s;
}
.sidebar-search input:focus { border-color: var(--gray-300); background: white; }
.sidebar-search input::placeholder { color: var(--gray-400); }
.sidebar-search .search-icon {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400);
}

.sidebar-nav { flex: 1; padding: 4px 0; }

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: 0;
  transition: background .12s, color .12s;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin: 1px 0;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-800); }
.nav-item.active { color: var(--gray-900); font-weight: 600; background: var(--gray-100); border-left-color: var(--primary); }
.nav-item svg { width:15px; height:15px; flex-shrink:0; }

.sidebar-section {
  padding: 12px 14px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.project-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  cursor: pointer;
  color: var(--gray-600);
  font-size: 13px;
  border-radius: 0;
  transition: background .1s, color .1s;
  position: relative;
}
.project-item:hover { background: var(--gray-100); color: var(--gray-900); }
.project-item.active { 
  background: #eef2ff;
  color: var(--gray-900);
  font-weight: 500;
  box-shadow: inset 3px 0 0 var(--primary);
}
body.dark-mode .project-item.active {
  background: rgba(99, 102, 241, 0.09);
  color: var(--gray-100);
  box-shadow: inset 3px 0 0 var(--primary);
}

.project-item .delete-btn {
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin-left: 8px;
  color: white;
  font-size: 12px; line-height: 1; font-weight: 700;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .12s, transform .12s, background .12s, color .12s, border-color .12s;
  cursor: pointer;
  flex-shrink: 0;
  background: #ef4444; border: 1px solid rgba(0,0,0,0.06);
}
.project-item:hover .delete-btn {
  opacity: 1;
  transform: translateX(0);
  color: white;
  background: #ef4444;
  border-color: rgba(0,0,0,0.06);
}
.project-item .delete-btn:hover { background: #dc2626; }

.project-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white; flex-shrink:0;
}

.project-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-badge {
  font-size: 10px; color: var(--gray-400); margin-left: 2px;
}

.section-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  margin: 4px 6px;
  cursor: pointer;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 13.5px;
  border-radius: 6px;
  transition: background .15s;
}
.section-toggle:hover { background: var(--gray-100); }
body.dark-mode .section-toggle:hover { background: var(--gray-700); }

/* + button hidden by default, appears on hover */
.sec-add-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0 2px;
  line-height: 1;
  border-radius: 4px;
  opacity: 0;
  pointer-events: auto;
  transition: opacity .15s, color .15s, background .15s;
}
.section-toggle:hover .sec-add-btn {
  opacity: 1;
}
.sec-add-btn:hover { color: var(--gray-700); background: var(--gray-200); }
body.dark-mode .sec-add-btn:hover { color: var(--gray-200); background: var(--gray-600); }

/* chevron rotates when expanded */
.section-toggle.expanded .chevron-icon { transform: rotate(90deg) !important; }

.section-toggle.active {
  color: var(--gray-900);
  font-weight: 600;
  background: var(--gray-100);
}
.section-toggle.active > span:first-child {
  color: var(--primary-dark, #4f46e5);
}
body.dark-mode .section-toggle.active {
  background: var(--gray-100);
  color: var(--gray-900);
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 8px 0;
}

.sidebar-bottom .nav-item { font-size: 13px; }

.user-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  transition: background .12s;
}
.user-row:hover { background: var(--gray-50); }
.user-row.active { background: #eef2ff; box-shadow: inset 3px 0 0 var(--primary); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; flex-shrink:0;
}
.user-info { flex:1; overflow:hidden; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--gray-800); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-email { font-size: 11px; color: var(--gray-400); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── MAIN ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--gray-800); }
.breadcrumb .sep { color: var(--gray-300); }
.breadcrumb .current { color: var(--gray-800); font-weight: 500; }

.topbar-right {
  display: flex; align-items: center; gap: 12px;
}
.credits-badge {
  font-size: 12.5px; font-weight: 600; color: var(--gray-700);
  background: var(--gray-100); padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--border);
}
.icon-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; cursor: pointer; color: var(--gray-500);
  transition: background .12s;
  position: relative;
  border: none;
  background: transparent;
}
.icon-btn:hover { background: var(--gray-100); color: var(--gray-700); }
.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.icon-btn svg { width:16px; height:16px; }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1.5px solid white;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px;
}

/* ── PROJECT HEADER ── */
.project-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px;
}
.project-title-row {
  display: flex; align-items: center; gap: 12px;
}
.project-icon-lg {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: white;
}
.project-name-big {
  font-size: 22px; font-weight: 700; color: var(--gray-900);
}
.project-lock { color: var(--gray-400); margin-left: 4px; }
.project-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 5px;
  font-size: 12.5px; color: var(--gray-500);
}
.project-meta span { display: flex; align-items: center; gap: 4px; }
.project-meta svg { width:13px; height:13px; }
.project-meta a { color: var(--blue); text-decoration: none; }
.project-meta a:hover { text-decoration: underline; }

.header-actions {
  display: flex; align-items: center; gap: 8px;
}
.btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; font-family: inherit; transition: all .15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: white; border: 1px solid var(--border);
  color: var(--gray-500); border-radius: var(--radius-sm); cursor: pointer;
}
.btn-icon:hover { background: var(--gray-50); color: var(--gray-700); }
.btn-icon svg { width:14px; height:14px; }
.btn-danger { background: white; border: 1px solid var(--border); color: var(--red); }
.btn-danger:hover { background: #fef2f2; }

/* ── TOOLBAR ── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 13px; color: var(--gray-500);
  cursor: text; min-width: 200px;
}
.search-box input {
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 13px; color: var(--gray-700);
  width: 100%;
}
.search-box input::placeholder { color: var(--gray-400); }
.sort-btn {
  display: flex; align-items: center; gap: 5px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 13px; color: var(--gray-600); cursor: pointer;
  font-family: inherit;
}
.sort-btn:hover { background: var(--gray-50); }
.sort-btn svg { width:13px; height:13px; }

.view-btns {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.view-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: white; color: var(--gray-400); border: none;
  transition: all .12s;
}
.view-btn:hover { background: var(--gray-50); color: var(--gray-600); }
.view-btn.active { background: var(--gray-100); color: var(--gray-700); }
.view-btn svg { width: 14px; height: 14px; }

/* ── HOME CONTENT ── */
.home-header {
  margin-bottom: 20px;
}
.home-title { font-size: 22px; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.home-title svg { width:22px; height:22px; }
.home-sub { font-size: 13.5px; color: var(--gray-500); margin-top: 4px; }

.welcome-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 16px;
}
.welcome-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: white; flex-shrink:0;
}
.welcome-name { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.welcome-plan {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px;
  background: var(--gray-100); color: var(--gray-600); margin-left: 6px;
}
.welcome-email { font-size: 12.5px; color: var(--gray-400); margin-top: 3px; }

.stats-row {
  display: flex; gap: 0; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px;
}
.stat-item {
  flex:1; display: flex; align-items: center; gap: 10px;
  padding: 0 20px 0 0;
  border-right: 1px solid var(--border);
  margin-right: 20px;
}
.stat-item:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.stat-icon { color: var(--gray-400); }
.stat-icon svg { width: 16px; height: 16px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }

.grid-3 { display: grid; grid-template-columns: 1fr 1fr 340px; gap: 16px; }

.panel-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  display: flex; align-items: center; gap: 7px;
}
.panel-title svg { width:15px; height:15px; color: var(--gray-500); }
.btn-new {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm); font-family: inherit;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.btn-new:hover { background: var(--primary-dark); }
.btn-new svg { width:12px; height:12px; }

.panel-body { padding: 12px; }
.panel-desc { font-size: 12.5px; color: var(--gray-400); padding: 4px 0 12px; }

.dataset-drop {
  border: 1.5px dashed var(--gray-200); border-radius: var(--radius-sm);
  padding: 28px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: all .15s; margin-bottom: 10px;
  background: var(--gray-50);
}
.dataset-drop:hover { border-color: var(--primary); background: #eef2ff; }
.dataset-drop svg { width:22px; height:22px; color: var(--gray-400); }
.dataset-drop-main { font-size: 13px; font-weight: 500; color: var(--gray-600); }
.dataset-drop-sub { font-size: 11.5px; color: var(--gray-400); }

.dataset-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .1s; margin-bottom: 4px;
}
.dataset-item:hover { background: var(--gray-50); }
.dataset-thumb {
  width: 52px; height: 38px; border-radius: 5px; overflow: hidden;
  background: var(--gray-200); flex-shrink:0; position:relative;
}
.dataset-thumb-inner {
  width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
}
.thumb-block { border-radius: 0; }
.dataset-item-name { font-size: 13px; font-weight: 500; color: var(--gray-800); }
.dataset-item-meta {
  font-size: 11.5px; color: var(--gray-400); margin-top: 2px;
  display: flex; gap: 8px;
}
.dataset-item-meta span { display: flex; align-items: center; gap: 3px; }
.view-all {
  font-size: 12.5px; color: var(--blue); cursor: pointer; padding: 4px 0;
  display: flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.view-all:hover { text-decoration: underline; }

.project-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.project-list-item:last-child { border-bottom: none; }
.project-list-item:hover { background: var(--gray-50); }
.proj-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink:0; }
.proj-name { font-size: 13px; font-weight: 500; color: var(--gray-800); display: flex; align-items: center; gap: 5px; }
.proj-name svg { width:12px; height:12px; color: var(--gray-400); }
.proj-meta { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; display: flex; gap: 8px; }
.proj-meta span { display: flex; align-items: center; gap: 3px; }

/* STORAGE */
.storage-bar-wrap { padding: 12px 16px; }
.storage-label { font-size: 12.5px; color: var(--gray-500); margin-bottom: 8px; }
.storage-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.storage-bar-inner { height: 100%; border-radius: 3px; }
.storage-legend { display: flex; gap: 12px; }
.storage-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--gray-500); }
.storage-dot { width: 8px; height: 8px; border-radius: 50%; }

.resource-list { padding: 0 16px 8px; }
.resource-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 12.5px;
}
.resource-row:last-child { border-bottom: none; }
.resource-name { color: var(--gray-600); display: flex; align-items: center; gap: 6px; }
.resource-name svg { width:12px; height:12px; color: var(--gray-400); }
.resource-val { color: var(--gray-700); font-weight: 500; }
.resource-limit { color: var(--gray-400); font-weight: 400; }

.largest-items { padding: 8px 16px 12px; }
.largest-title { font-size: 11.5px; font-weight: 600; color: var(--gray-400); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.largest-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0;
  font-size: 12.5px;
}
.largest-name { color: var(--blue); cursor: pointer; display: flex; align-items: center; gap: 5px; }
.largest-name svg { width:12px; height:12px; }
.largest-size { color: var(--gray-500); }

/* ── EXPLORE ── */
.explore-header { margin-bottom: 20px; }
.explore-title { font-size: 22px; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.explore-title svg { width:20px; height:20px; }
.explore-sub { font-size: 13.5px; color: var(--gray-500); margin-top: 4px; }

.tab-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.tab {
  padding: 8px 16px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--gray-900); border-bottom-color: var(--gray-900); }
.tab svg { width:14px; height:14px; }

.explore-toolbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.section-label { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.section-label-sub { font-size: 12.5px; color: var(--gray-400); margin-top: 2px; }
.explore-search {
  display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px; min-width: 260px;
}
.explore-search input {
  border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 13px; color: var(--gray-700); flex: 1;
}
.explore-search input::placeholder { color: var(--gray-400); }
.sort-controls {
  display: flex; align-items: center; gap: 8px;
}

.dataset-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.dataset-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.dataset-card:hover { box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.dataset-card-img {
  height: 120px; background: var(--gray-100);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
  position: relative; overflow: hidden;
}
.card-img-block { background: var(--gray-300); }
.card-img-count {
  position: absolute; bottom: 6px; right: 8px;
  background: rgba(0,0,0,.55); color: white; border-radius: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 6px;
  display: flex; align-items: center; gap: 3px;
}
.card-img-count svg { width:11px; height:11px; }
.dataset-card-body { padding: 11px 12px; }
.card-name-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px;
}
.card-name { font-size: 13.5px; font-weight: 600; color: var(--gray-900); }
.card-type-badge {
  font-size: 10.5px; font-weight: 500; padding: 2px 7px; border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
}
.badge-detect { background: #eff6ff; color: #2563eb; }
.badge-classify { background: #fdf4ff; color: #9333ea; }
.badge-segment { background: #f0fdf4; color: #16a34a; }
.badge-obb { background: #fff7ed; color: #c2410c; }
.card-type-badge svg { width:10px; height:10px; }
.card-author {
  font-size: 12px; color: var(--gray-400); display: flex; align-items: center; gap: 5px; margin-bottom: 8px;
}
.author-avatar {
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: white;
}
.card-desc { font-size: 12px; color: var(--gray-500); line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-stats {
  display: flex; gap: 10px; font-size: 11.5px; color: var(--gray-400); margin-bottom: 8px; flex-wrap: wrap;
}
.card-stats span { display: flex; align-items: center; gap: 3px; }
.card-stats svg { width:11px; height:11px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px; padding: 2px 6px; background: var(--gray-100); border-radius: 4px;
  color: var(--gray-500); cursor: pointer;
}
.tag:hover { background: var(--gray-200); }

.progress-bar {
  height: 3px; background: var(--gray-200); border-radius: 2px; margin-top: 10px; overflow: hidden;
  display: flex; gap: 2px;
}
.progress-seg { height: 100%; border-radius: 2px; }
.progress-labels {
  display: flex; gap: 8px; margin-top: 5px;
}
.prog-label { font-size: 10.5px; color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
.prog-dot { width:6px; height:6px; border-radius:50%; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ACTIVE NAV page logic */
.sidebar-menu button { all: unset; display: flex; align-items: center; gap: 8px; width:100%; }
/* Indent and vertical line for project list */
.project-list-indent {
  position: relative;
  margin-left: 8px;
  padding-left: 10px;
}
.project-list-indent:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--gray-200);
  border-radius: 1px;
  z-index: 0;
}
.project-item-indent {
  padding-left: 14px;
  position: relative;
  z-index: 1;
}
