/* ============================================================
   IdeaVault — Premium Light Mode Design System
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --primary:       #4f46e5;
  --primary-dark:  #3730a3;
  --primary-light: #eef2ff;
  --primary-mid:   #818cf8;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --success:       #10b981;
  --success-light: #d1fae5;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --warning:       #f59e0b;

  /* Neutrals */
  --bg:            #f8f7ff;
  --surface:       #ffffff;
  --surface-2:     #f3f4f6;
  --border:        #e5e7eb;
  --border-light:  #f0f0f5;
  --text-primary:  #111827;
  --text-secondary:#6b7280;
  --text-muted:    #9ca3af;

  /* Sidebar */
  --sidebar-w:     260px;
  --sidebar-bg:    #ffffff;
  --sidebar-border:#e8e8f0;

  /* Motion */
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --fast:          150ms;
  --normal:        250ms;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(79,70,229,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-card:   0 2px 8px rgba(79,70,229,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-mid); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--normal) var(--ease), min-width var(--normal) var(--ease), width var(--normal) var(--ease);
}
.sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  min-width: 0;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

.industry-filter-list { display: flex; flex-direction: column; gap: 1px; }
.industry-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.industry-filter-item:hover { background: var(--primary-light); color: var(--primary); }
.industry-filter-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.industry-filter-item .count-pill {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}
.industry-filter-item.active .count-pill {
  background: var(--primary);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}
.idea-count-badge {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.idea-count-badge #totalIdeasCount {
  font-weight: 700;
  color: var(--primary);
}

/* Toggle close btn — visible on mobile */
#sidebarToggleClose { display: none; }

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.layout-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248,247,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.topbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 14px;
  flex: 1;
  max-width: 460px;
  transition: border-color var(--fast);
  color: var(--text-muted);
}
.topbar-search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
  color: var(--primary);
}
.topbar-search-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text-primary);
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.topbar-search-wrap input::placeholder { color: var(--text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  padding: 9px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); border-color: #d1d5db; }

.btn-danger {
  padding: 9px 18px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.btn-danger:hover { background: #dc2626; }

.icon-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-primary); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { flex: 1; padding: 32px 28px; }
.view { animation: fadeSlide 0.25s var(--ease) both; }
.view.hidden { display: none !important; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

.date-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: all var(--normal) var(--ease);
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-total .stat-icon  { background: var(--primary-light); color: var(--primary); }
.stat-new .stat-icon    { background: #fce7f3; color: #db2777; }
.stat-developing .stat-icon { background: #ede9fe; color: #7c3aed; }
.stat-validated .stat-icon  { background: var(--success-light); color: var(--success); }
.stat-starred .stat-icon    { background: var(--accent-light); color: var(--accent); }
.stat-industries .stat-icon { background: #e0f2fe; color: #0284c7; }
.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.view-all-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--fast);
}
.view-all-link:hover { opacity: 0.7; }

/* ============================================================
   IDEAS GRID
   ============================================================ */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.ideas-grid.list-mode {
  grid-template-columns: 1fr;
}

/* ============================================================
   IDEA CARD
   ============================================================ */
.idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all var(--normal) var(--ease);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.idea-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-mid));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--normal) var(--ease);
}
.idea-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-mid);
}
.idea-card:hover::before { transform: scaleX(1); }

.idea-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.idea-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}
.star-btn {
  flex-shrink: 0;
  color: var(--text-muted);
  background: transparent !important;
  border: none;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--fast);
  display: flex; align-items: center;
}
.star-btn:hover { color: var(--accent) !important; }
.star-btn.starred { color: var(--accent) !important; }
.star-btn.starred svg { fill: var(--accent); }

.idea-industry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
}
.idea-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.idea-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  gap: 8px;
}
.idea-date { font-size: 11px; color: var(--text-muted); }
.idea-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.status-badge.raw      { background: #f3f4f6; color: #6b7280; }
.status-badge.researching { background: #ede9fe; color: #7c3aed; }
.status-badge.validating  { background: var(--accent-light); color: #b45309; }
.status-badge.in-progress { background: var(--success-light); color: #065f46; }
.status-badge.on-hold     { background: var(--danger-light); color: #991b1b; }

/* List mode card */
.ideas-grid.list-mode .idea-card {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  padding: 16px 20px;
}
.ideas-grid.list-mode .idea-card::before { width: 3px; height: auto; top: 0; left: 0; right: auto; bottom: 0; transform: scaleY(0); transform-origin: top; }
.ideas-grid.list-mode .idea-card:hover::before { transform: scaleY(1); }
.ideas-grid.list-mode .idea-card-header { flex: 1; flex-direction: column; gap: 4px; }
.ideas-grid.list-mode .idea-card-desc { display: none; }
.ideas-grid.list-mode .idea-card-footer { border: none; padding: 0; margin: 0; }

/* ============================================================
   INDUSTRY BREAKDOWN
   ============================================================ */
.industry-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.industry-breakdown-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.industry-breakdown-card:hover {
  border-color: var(--primary-mid);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.breakdown-bar-wrap { flex: 1; }
.breakdown-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.breakdown-bar-bg { background: var(--surface-2); border-radius: 100px; height: 5px; }
.breakdown-bar { background: linear-gradient(90deg, var(--primary), var(--primary-mid)); border-radius: 100px; height: 5px; transition: width 0.6s var(--ease); }
.breakdown-count { font-size: 18px; font-weight: 800; color: var(--primary); font-family: 'Outfit', sans-serif; }

/* ============================================================
   FILTERS
   ============================================================ */
.view-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

.view-toggle { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle-btn {
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--fast);
  display: flex; align-items: center;
}
.view-toggle-btn.active { background: var(--primary); color: #fff; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--text-muted); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: overlayIn 0.2s var(--ease) both;
}
.modal-overlay.hidden { display: none !important; }

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease) both;
  overflow: hidden;
}
.modal-large { max-width: 680px; }
.modal-confirm { max-width: 380px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.modal-header-actions { display: flex; gap: 4px; flex-shrink: 0; }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}

/* ============================================================
   FORM
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.required { color: var(--danger); }
.hint { color: var(--text-muted); font-weight: 400; }
.form-input {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
  width: 100%;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ============================================================
   DETAIL MODAL
   ============================================================ */
.detail-industry-badge {
  display: inline-flex;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}
.detail-body { gap: 0 !important; }
.detail-section { margin-bottom: 20px; }
.detail-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.detail-section-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.65;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
}
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border-light); }
.detail-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.hidden { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  body { flex-direction: row; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 200;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.collapsed { transform: translateX(-100%); }
  #sidebarToggleClose { display: flex; }
  .layout-wrapper { width: 100%; }
  .main-content { padding: 24px 16px; }
  .topbar { padding: 12px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row, .detail-row { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .ideas-grid { grid-template-columns: 1fr; }
  .view-controls { flex-direction: column; align-items: flex-start; }
  .page-header { flex-direction: column; }
  .modal { border-radius: 16px; }
}
