/* idealab — list + editor */

.ns-tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.ns-tpl-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  background: #fff;
  min-height: 70px;
}
.ns-tpl-card:hover { border-color: #6a9bc3; }
.ns-tpl-card.selected { border-color: #2c5171; box-shadow: 0 0 0 1px #2c5171 inset; background: #f0f7ff; }
.ns-tpl-card .ns-tpl-title { font-weight: 600; font-size: 13px; color: #2c5171; margin-bottom: 2px; line-height: 1.1; }
.ns-tpl-card .ns-tpl-desc { font-size: 11px; color: #777; line-height: 1.3; }


.idealab-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.idealab-toolbar input[type="search"] {
  flex: 1;
  max-width: 360px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}
.idealab-toolbar .btn-primary {
  padding: 6px 14px;
  background: #2c5171;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.idealab-app .tc-content,
.idealab-app .pibico-content {
  position:relative; z-index:2;
  flex:1; min-height:0;
  display:flex; flex-direction:column; overflow:hidden;
  padding: 3px;
}
.idealab-app .vh-card-header {
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 12px 6px; flex-shrink:0;
  border-bottom: 1px solid rgba(70,130,180,0.1);
  gap: 4px;
}
.idealab-app .vh-card-header h3 { margin:0; font-size:13px; font-weight:600; color:#2c5171; line-height:1; flex:1; }
.idealab-app .vh-card-header .icon-btn-primary {
  width:24px; height:24px; padding:0; border-radius:6px; border:0;
  background:#2c5171; color:#fff; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.idealab-app .vh-search {
  display:flex; align-items:center; gap:6px;
  margin: 3px 0; padding: 3px 8px;
  background:#f0f4f8; border-radius:6px; flex-shrink:0;
}
.idealab-app .vh-search svg { color:#9ca3af; flex-shrink:0; }
.idealab-app .vh-search input { flex:1; border:0; background:transparent; font-size:12px; color:#2c5171; outline:none; padding: 3px 0; }
.idealab-app .meet-status-select {
  margin: 3px 0; padding: 3px 8px;
  border:1px solid #d1d5db; border-radius:6px;
  font-size:11px; background:#fff; color:#2c5171; flex-shrink:0;
}

.idealab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 3px;
  overflow-y: auto;
  flex: 1; min-height:0;
}

.idealab-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.idealab-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.12); }
.idealab-card .card-thumb {
  height: 48px; border-radius: 8px;
  background: linear-gradient(135deg, #4682b4, #6a9bc3, #2c5171);
  margin-bottom: 8px;
}
.idealab-card .card-title {
  margin-bottom: 3px; font-weight: 600; font-size: 14px; line-height: 1; color: #2c5171;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idealab-card .card-desc {
  font-size: 12px; color: #777; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idealab-card .card-meta {
  font-size: 11px; color: #999; display: flex; justify-content: space-between;
}

/* ---- Editor ---- */
.idealab-editor {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  flex: 1;
  overflow: hidden;
  background: #fff;
}
.idealab-side {
  width: 380px;
  min-width: 320px;
  max-width: 480px;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafbfc;
}
.idealab-side h3 { margin: 12px 0 4px 0; font-size: 13px; color: #2c5171; text-transform: uppercase; letter-spacing: 0.5px; }
.idealab-side label { display:block; font-size: 12px; font-weight: 600; color: #444; margin-top: 6px; }
.idealab-side input[type="text"], .idealab-side textarea, .idealab-side select {
  width: 100%; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; font-family: inherit; background:#fff;
}
.idealab-side textarea { resize: vertical; min-height: 50px; }
.idealab-side .row { display:flex; gap:8px; }
.idealab-side .btn-primary,
.idealab-side .btn-secondary {
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px;
  border: 0;
}
.idealab-side .btn-primary { background: #2c5171; color: #fff; }
.idealab-side .btn-secondary { background: #e5e7eb; color: #2c5171; }
.idealab-side .btn-primary[disabled],
.idealab-side .btn-secondary[disabled] { opacity: 0.5; cursor: not-allowed; }

.idealab-canvas-wrap {
  flex: 1; position: relative; min-width: 0;
  background: #fff;
}
.idealab-canvas-wrap > div { width: 100%; height: 100%; }

.ideas-list {
  display: flex; flex-direction: column; gap: 6px;
}
.idea-item {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 8px 10px; cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.idea-item.selected { border-color: #2c5171; box-shadow: 0 0 0 1px #2c5171 inset; }
.idea-item .badge-ai { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #e0f2fe; color: #075985; }

.share-bar code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

/* presence collaborators avatars */
.presence-bar {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px; z-index: 10;
}
.presence-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff;
  font-size: 11px; color: #fff; display: inline-flex; align-items: center; justify-content: center;
}

.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid #c0c8d4; border-top-color: #2c5171;
  border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Sticky-notes board (Phase B clone of ph_idealab) ===== */
.idealab-editor-v2 { display:flex; flex-direction:column; width:100%; height:100%; flex:1; padding:8px; gap:8px; background:linear-gradient(180deg,#f8f9fa 0%,#e8e6dc 100%); font-family:'Raleway','Figtree',Arial,sans-serif; color:#2e4d6f; box-sizing:border-box; overflow:hidden; }
.il-header { display:flex; align-items:center; justify-content:space-between; padding:8px 14px; background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); gap:12px; flex-shrink:0; }
.il-header-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.il-header-center { flex:1; display:flex; align-items:center; justify-content:center; gap:10px; min-width:0; }
.il-header-center h3 { margin:0; font-size:15px; font-weight:600; color:#2e4d6f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1; }
.il-header-info { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.il-info-item { display:flex; align-items:center; gap:4px; font-size:12px; color:#6e6e6e; white-space:nowrap; line-height:1; }
.il-info-item svg { color:#4682b4; }
.il-status-badge { padding:3px 10px; border-radius:12px; font-size:11px; font-weight:600; background:#e3f2fd; color:#1565c0; white-space:nowrap; line-height:1; }
.il-status-badge.status-draft { background:#fff3e0; color:#e65100; }
.il-status-badge.status-active { background:#e8f5e9; color:#2e7d32; }
.il-status-badge.status-completed { background:#e0f2f1; color:#00695c; }
.il-status-badge.status-archived { background:#f5f5f5; color:#757575; }
.il-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:0; border-radius:8px; background:#f0f4f8; color:#4682b4; cursor:pointer; transition:background 0.15s,color 0.15s,transform 0.15s; padding:0; }
.il-icon-btn:hover { background:#4682b4; color:#fff; transform:translateY(-1px); }
.il-icon-btn.primary { background:#4682b4; color:#fff; box-shadow:0 2px 6px rgba(70,130,180,0.3); }
.il-icon-btn.primary:hover { background:#3a6d96; }
.il-icon-btn:disabled { opacity:0.5; cursor:not-allowed; }
.il-toolbar { display:flex; align-items:center; gap:12px; padding:8px 14px; background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); flex-shrink:0; }
.il-btn-add { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border:2px solid #4682b4; border-radius:8px; background:#fff; color:#4682b4; font-size:13px; font-weight:500; cursor:pointer; transition:background 0.15s,color 0.15s; line-height:1; }
.il-btn-add:hover { background:#4682b4; color:#fff; }
.il-color-picker { display:flex; gap:4px; padding:4px; background:#f0f4f8; border-radius:8px; }
.il-color-btn { width:24px; height:24px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0; transition:transform 0.15s; }
.il-color-btn:hover { transform:scale(1.15); }
.il-color-btn.active { border-color:#2e4d6f; box-shadow:0 0 0 2px #fff,0 0 0 4px #2e4d6f; }
.il-layout-select { padding:6px 10px; border:2px solid #e8e6dc; border-radius:8px; background:#fff; font-size:13px; font-weight:500; color:#2e4d6f; cursor:pointer; font-family:inherit; line-height:1; }
.il-layout-select:focus { outline:0; border-color:#4682b4; }
.il-content { flex:1; min-height:0; background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); overflow:hidden; display:flex; flex-direction:column; position:relative; }
.il-board { flex:1; min-height:0; overflow:auto; position:relative; padding:16px; padding-bottom:80px; background:linear-gradient(#eee 1px,transparent 1px),linear-gradient(90deg,#eee 1px,transparent 1px); background-size:20px 20px; border-radius:12px; }
.il-board.layout-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; background:#fafbfc; }
.il-board.layout-kanban { display:flex; gap:16px; padding:16px; background:#fafbfc; align-items:flex-start; }
.il-kanban-col { flex:0 0 280px; background:#fff; border-radius:10px; box-shadow:0 1px 4px rgba(0,0,0,0.06); padding:10px; display:flex; flex-direction:column; gap:8px; min-height:200px; }
.il-kanban-col-title { font-size:12px; font-weight:600; color:#2e4d6f; text-transform:uppercase; letter-spacing:0.5px; line-height:1; padding:4px 6px; }
.il-note { width:200px; min-height:130px; padding:10px; border-radius:10px; box-shadow:2px 2px 10px rgba(0,0,0,0.12); cursor:grab; position:absolute; display:flex; flex-direction:column; background:#FFE066; transition:box-shadow 0.15s,transform 0.15s; }
.il-note:hover { box-shadow:4px 4px 16px rgba(0,0,0,0.18); transform:translateY(-2px); }
.il-note.dragging { opacity:0.85; cursor:grabbing; z-index:1000; box-shadow:6px 6px 20px rgba(0,0,0,0.25); }
.il-board.layout-grid .il-note,.il-board.layout-kanban .il-note { position:relative; width:100%; }
.il-note-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:6px; gap:6px; }
.il-note-cat { font-size:9px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:rgba(0,0,0,0.55); background:rgba(0,0,0,0.1); padding:2px 7px; border-radius:10px; line-height:1; }
.il-note-actions { display:flex; gap:2px; opacity:0; transition:opacity 0.15s; }
.il-note:hover .il-note-actions { opacity:1; }
.il-note-btn { width:20px; height:20px; border:0; padding:0; background:rgba(0,0,0,0.1); border-radius:50%; cursor:pointer; color:rgba(0,0,0,0.6); display:inline-flex; align-items:center; justify-content:center; transition:background 0.15s,color 0.15s; }
.il-note-btn:hover { background:rgba(0,0,0,0.22); color:rgba(0,0,0,0.9); }
.il-note-btn.del:hover { background:rgba(220,53,69,0.22); color:#dc3545; }
.il-note-title { font-size:13px; font-weight:600; line-height:1.2; color:rgba(0,0,0,0.87); outline:0; word-break:break-word; margin-bottom:4px; }
.il-note-title:focus { background:rgba(255,255,255,0.4); border-radius:4px; }
.il-note-body { flex:1; font-size:12px; line-height:1.4; color:rgba(0,0,0,0.78); outline:0; word-break:break-word; min-height:24px; }
.il-note-body:focus { background:rgba(255,255,255,0.4); border-radius:4px; }
.il-note-footer { display:flex; justify-content:space-between; align-items:center; margin-top:6px; padding-top:6px; border-top:1px solid rgba(0,0,0,0.1); }
.il-vote-group { display:inline-flex; align-items:center; gap:4px; }
.il-vote-count { font-size:12px; font-weight:600; min-width:20px; text-align:center; color:rgba(0,0,0,0.65); line-height:1; }
.il-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px 20px; text-align:center; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.il-empty-state svg { color:#d1d5db; margin-bottom:12px; }
.il-empty-state p { font-size:15px; color:#9ca3af; margin:0 0 4px 0; line-height:1; }
.il-empty-hint { font-size:12px; color:#b0b0b0; margin-top:4px !important; line-height:1; }
.il-categories { position:absolute; bottom:12px; left:12px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:8px 10px; background:rgba(255,255,255,0.95); border-radius:12px; box-shadow:0 4px 16px rgba(0,0,0,0.15); backdrop-filter:blur(8px); z-index:10; }
.il-cat-label { font-size:11px; font-weight:600; color:#6e6e6e; text-transform:uppercase; letter-spacing:0.5px; line-height:1; }
.il-cat-btn { padding:4px 10px; border:1px solid #e8e6dc; background:#fff; border-radius:16px; font-size:11px; font-weight:500; color:#6e6e6e; cursor:pointer; font-family:inherit; line-height:1; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.il-cat-btn:hover { background:#f0f4f8; border-color:#4682b4; color:#4682b4; }
.il-cat-btn.active { background:#4682b4; color:#fff; border-color:#4682b4; }
.il-actions { position:absolute; bottom:12px; right:12px; display:flex; gap:6px; padding:8px 10px; background:rgba(255,255,255,0.95); border-radius:12px; box-shadow:0 4px 16px rgba(0,0,0,0.15); backdrop-filter:blur(8px); z-index:10; }
.il-actions.disabled .il-icon-btn { opacity:0.5; cursor:not-allowed; pointer-events:none; }
.il-stats { display:flex; gap:20px; padding:8px 14px; background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); flex-shrink:0; }
.il-stat-item { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#6e6e6e; line-height:1; }
.il-stat-item strong { font-size:16px; font-weight:600; color:#4682b4; line-height:1; }
.il-stat-label { font-size:11px; color:#6e6e6e; }
.il-canvas-wrap { flex:1; min-height:0; background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.il-canvas-wrap > div { width:100%; height:100%; }

/* ===== Pagination (mirrors voice/tasks pattern) ===== */
.idealab-app .vh-pagination {
  display:flex; align-items:center; justify-content:center; gap:4px;
  padding: 6px 10px; border-top: 1px solid rgba(70,130,180,0.1);
  flex-shrink: 0; background: #fafbfc;
  border-radius: 0 0 9px 9px;
}
.idealab-app .vh-pg-size,
.idealab-app .vh-pg-btn,
.idealab-app .vh-pg-input {
  height: 24px; box-sizing: border-box;
  border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; color: #2c5171;
  font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; margin: 0;
  font-family: inherit;
}
.idealab-app .vh-pg-size { cursor: pointer; padding: 0 4px; }
.idealab-app .vh-pg-btn { width: 24px; padding: 0; cursor: pointer; font-size: 14px; }
.idealab-app .vh-pg-btn:hover:not(:disabled) { background:#eaf2fa; }
.idealab-app .vh-pg-btn:disabled { opacity:0.4; cursor:default; }
.idealab-app .vh-pg-input { width: 36px; padding: 0 4px; text-align: center; }
.idealab-app .vh-pg-of { font-size:11px; color:#777; }

/* --- M1.x landing/app polish --- */

/* App header icon-only buttons (36x36) */
.app-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent-color, #2c5171);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.app-header-btn:hover {
  background: rgba(70, 130, 180, 0.12);
  color: var(--primary-color, #4682b4);
}
.app-header-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Landing — gradient body bg */
body {
  background: linear-gradient(135deg, #2c5171 0%, #4682b4 50%, #6a9bc3 100%);
  color: #fff;
  font-family: var(--font-body, 'Figtree', system-ui, sans-serif);
  min-height: 100vh;
  margin: 0;
}

/* Hero */
.hero {
  padding: 64px 24px 48px;
  text-align: center;
}
.hero-inner {
  max-width: 880px;
  margin: 0 auto;
}
.hero-title {
  font-family: var(--font-heading, 'Raleway', sans-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 auto 28px;
  max-width: 720px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta .pibico-btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.hero-cta .pibico-btn-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 24px auto 64px;
  padding: 0 24px;
}
.feature-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 14px;
  padding: 18px 22px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  color: var(--text, #2c3e50);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.feature-card h3 {
  font-family: var(--font-heading, 'Raleway', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-color, #2c5171);
  margin: 0 0 3px;
  line-height: 1;
}
.feature-card p {
  font-size: 0.875rem;
  line-height: 1.45;
  margin: 0;
  color: var(--text-muted, #555);
}

/* App shell wrapper (post-login dashboard placeholder) */
.app-shell {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

/* Footer over gradient — keep readable */
.app-footer {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Toast (used by app.js stub) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(44, 81, 113, 0.96);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Backdrop (slide panels — M2+) */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 800;
}
.panel-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* App shell card text contrast — body color is #fff (gradient), force dark inside cards */
.app-shell .pibico-card,
.app-main .pibico-card {
  color: var(--text, #2c3e50);
}
.app-shell .pibico-card h1,
.app-shell .pibico-card h2,
.app-shell .pibico-card h3 {
  color: var(--accent-color, #2c5171);
  margin: 0 0 6px;
  line-height: 1.15;
}
.app-shell .pibico-card .muted {
  color: var(--text-muted, #555);
  font-size: 0.875rem;
  margin: 0 0 12px;
}

/* Card inner padding (per feedback_compact_cards: 16px 20px 12px) */
.app-shell .pibico-card,
.app-main .pibico-card {
  padding: 16px 20px 12px;
}
