/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e17;
  --bg2: #111827;
  --bg3: #1a2235;
  --surface: #1e2d40;
  --surface2: #243347;
  --border: #2a3a50;
  --accent: #00d4aa;
  --accent2: #0099ff;
  --accent3: #a78bfa;
  --text: #e8edf5;
  --text-muted: #7a8fa8;
  --text-dim: #4a5f78;
  --danger: #ff4d6d;
  --warn: #f59e0b;
  --success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --sidebar-w: 220px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==================== PAGE ROUTING ==================== */
.page { display: none; }
.page.active { display: block; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #00b896; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,170,0.3); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { color: var(--accent); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn-ai {
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  color: #fff;
}
.btn-ai:hover { opacity: 0.9; transform: translateY(-1px); }

/* ==================== HOMEPAGE ==================== */
#page-home { min-height: 100vh; }

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42,58,80,0.5);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color var(--transition); }
.nav-link:hover { color: var(--accent); }

/* Hero */
.hero {
  padding: 100px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: 50px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -2px;
}
.hero-title em { color: var(--accent); font-style: italic; }

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 60px; }

/* Canvas mock */
.hero-visual { max-width: 800px; margin: 0 auto; }
.hero-canvas-mock {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.mock-toolbar {
  background: var(--bg3);
  padding: 12px 20px;
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}
.mock-tool {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: default;
  font-family: var(--font-mono);
}
.mock-tool.active { background: rgba(0,212,170,0.15); color: var(--accent); }
.mock-image-area {
  height: 300px;
  background: linear-gradient(135deg, #0f1923 0%, #162232 50%, #0f1923 100%);
  position: relative;
  overflow: hidden;
}
.mock-image-area::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(0,100,80,0.15) 0%, transparent 60%);
}
.mock-annotation {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 4px;
  animation: fadeInAnn 1s ease forwards;
}
.mock-annotation.highlight { border-color: var(--accent2); background: rgba(0,153,255,0.1); }
.ann-label {
  position: absolute;
  top: -24px;
  left: 0;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.mock-annotation.highlight .ann-label { background: var(--accent2); color: #fff; }
.mock-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--warn);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
}

@keyframes fadeInAnn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Features */
.features, .how-it-works {
  padding: 80px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}

.features h2, .how-it-works h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 48px;
  letter-spacing: -1px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,212,170,0.1);
}
.feature-icon { font-size: 28px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; font-weight: 600; }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* How it works */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 150px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.step-arrow { color: var(--accent); font-size: 24px; padding: 0 12px; flex-shrink: 0; }
.step-num {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 8px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

/* CTA */
.cta-section {
  text-align: center;
  padding: 80px 60px;
  background: linear-gradient(180deg, transparent, rgba(0,212,170,0.04));
  border-top: 1px solid var(--border);
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.cta-section p { color: var(--text-muted); margin-bottom: 32px; }

.home-footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}
.footer-logo { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; }
.footer-logo span { color: var(--accent); }

/* ==================== AUTH ==================== */
.auth-page {
  display: flex !important;
  min-height: 100vh;
}

.auth-left {
  width: 45%;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(0,212,170,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,153,255,0.06) 0%, transparent 50%);
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text);
}
.auth-brand span { color: var(--accent); }

.auth-quote {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
  padding: 40px 0;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-box {
  width: 100%;
  max-width: 400px;
}
.auth-box h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.form-group input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-dim); }

.form-error {
  background: rgba(255,77,109,0.1);
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.form-error.hidden { display: none; }

.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 20px;
}
.auth-switch a { color: var(--accent); cursor: pointer; text-decoration: underline; }

.demo-hint {
  margin-top: 20px;
  padding: 12px 14px;
  background: rgba(0,212,170,0.06);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.demo-hint code { font-family: var(--font-mono); color: var(--accent); }

/* ==================== DASHBOARD ==================== */
#page-dashboard {
  display: flex;
  min-height: 100vh;
}
#page-dashboard.active { display: flex; }

.dashboard-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 0;
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-logo span { color: var(--accent); }

.sidebar-nav { flex: 1; padding: 0 10px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: rgba(0,212,170,0.12); color: var(--accent); }
.nav-icon { font-size: 16px; flex-shrink: 0; }

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #000;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-dim); }
.logout-btn {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 16px; padding: 4px;
  transition: color var(--transition);
}
.logout-btn:hover { color: var(--danger); }

/* Main content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.section { display: none; }
.section.active { display: block; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.section-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.5px;
}
.section-desc { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ==================== DATASET LIBRARY ==================== */
.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.dataset-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.dataset-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,212,170,0.1);
}
.dataset-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}
.dataset-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--bg3), var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-dim);
}
.dataset-info { padding: 14px; }
.dataset-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.dataset-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.dataset-actions { display: flex; gap: 8px; }
.dataset-actions .btn { padding: 6px 12px; font-size: 12px; }

/* ==================== WORKSPACES ==================== */
.workspaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.workspace-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.workspace-card:hover { border-color: var(--accent2); }
.workspace-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.workspace-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0,153,255,0.2), rgba(167,139,250,0.2));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.workspace-name { font-size: 15px; font-weight: 600; }
.workspace-role { font-size: 11px; color: var(--text-muted); }

.participants {
  display: flex;
  align-items: center;
  gap: -8px;
  margin-bottom: 16px;
}
.participant-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-left: -8px;
  background: var(--surface2);
  color: var(--text-muted);
}
.participant-avatar:first-child { margin-left: 0; }
.workspace-activity {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.5;
}
.activity-line { margin-bottom: 4px; }
.activity-line:last-child { margin-bottom: 0; }
.activity-line .user { color: var(--accent); }
.workspace-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.ws-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0,153,255,0.1);
  color: var(--accent2);
  font-family: var(--font-mono);
}

/* ==================== LABELING TOOL ==================== */
.labeling-layout {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  gap: 16px;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.tool-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-y: auto;
}

.tool-group { margin-bottom: 20px; }
.tool-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.tool-btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  text-align: left;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn.active { background: rgba(0,212,170,0.1); border-color: var(--accent); color: var(--accent); }

.label-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
}
.label-input:focus { border-color: var(--accent); }
.color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.color-row input[type=color] {
  width: 32px; height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg3);
  cursor: pointer;
}

.image-selector-list .img-sel-item {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.img-sel-item:hover { background: var(--bg3); color: var(--text); }
.img-sel-item.active { background: rgba(0,212,170,0.1); border-color: var(--accent); color: var(--accent); }

/* Canvas */
.canvas-wrapper {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#annotation-canvas {
  display: block;
  cursor: crosshair;
  max-width: 100%;
  max-height: 100%;
}

.canvas-hint {
  position: absolute;
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  padding: 20px;
}

/* Annotations panel */
.annotations-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-y: auto;
}
.panel-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#ann-count {
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.ann-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.ann-item:hover { border-color: var(--accent); }
.ann-item.selected { border-color: var(--accent); background: rgba(0,212,170,0.08); }
.ann-item-label { font-weight: 600; margin-bottom: 2px; }
.ann-item-type { color: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
.ann-item-color {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
}
.ann-delete {
  float: right;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
}
.ann-delete:hover { color: var(--danger); background: rgba(255,77,109,0.1); }

/* Export actions */
.labeling-actions { display: flex; gap: 8px; }

/* ==================== ACTIVITY LOGS ==================== */
.logs-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.log-item:last-child { border-bottom: none; }
.log-item:hover { background: var(--bg3); border-radius: var(--radius-sm); }

.log-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.log-icon.upload { background: rgba(0,212,170,0.1); }
.log-icon.annotate { background: rgba(0,153,255,0.1); }
.log-icon.workspace { background: rgba(167,139,250,0.1); }
.log-icon.login { background: rgba(245,158,11,0.1); }

.log-content { flex: 1; }
.log-text { font-size: 13px; line-height: 1.5; }
.log-text .log-user { color: var(--accent); font-weight: 600; }
.log-time { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); margin-top: 2px; }

.logs-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-size: 14px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 480px;
  max-width: calc(100vw - 40px);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h3 { font-family: var(--font-display); font-size: 20px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px 24px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .btn-full { margin-top: 8px; }

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  z-index: 2000;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}
.toast.hidden { display: none; }
.toast.error { border-color: var(--danger); }

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

/* ==================== UTILITIES ==================== */
.hidden { display: none !important; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .home-nav { padding: 16px 24px; }
  .hero { padding: 60px 24px 40px; }
  .features, .how-it-works { padding: 60px 24px; }
  .cta-section { padding: 60px 24px; }
  .auth-left { display: none; }
  .auth-right { padding: 24px; }
  .labeling-layout { grid-template-columns: 1fr; grid-template-rows: auto 400px auto; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .sidebar { width: 60px; }
  .sidebar-logo, .user-info, .user-name, .nav-item span:not(.nav-icon) { display: none; }
  .nav-item { justify-content: center; }
}
