/* Shared per-dashboard chat settings panel (model, answer length, speed/cost) */
.dash-settings-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.dash-settings-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dash-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 999;
  display: none;
}
.dash-settings-backdrop.open { display: block; }

.dash-settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
  z-index: 1000;
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
}
.dash-settings-panel.open { display: flex; }

.dash-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.dash-settings-head strong { font-size: 14px; }
.dash-settings-close {
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
}
.dash-settings-close:hover { background: #f1f5f9; }

.dash-settings-body {
  padding: 14px 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.dash-settings-section {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.dash-settings-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin: 0 0 10px;
}
.dash-settings-section p.hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
  margin: 8px 0 0;
}
.dash-settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.dash-settings-row select,
.dash-settings-row input[type="text"],
.dash-settings-row input[type="number"] {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
  font-family: inherit;
}
.dash-settings-apply {
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.dash-settings-apply:hover { background: #1d4ed8; }
.dash-settings-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.dash-settings-preset {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.dash-settings-preset:hover { background: #f8fafc; }

.dash-settings-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dash-settings-toast.show { opacity: 1; }

@media (max-width: 768px) {
  .dash-settings-panel {
    width: 100vw;
    max-width: none;
  }
  .dash-settings-toast {
    bottom: calc(56px + env(safe-area-inset-bottom) + 12px);
  }
}
