.page-content { padding-bottom: var(--sp-16); }
.sample-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
}

/* ---- Widget ---- */
.widget {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);
}

/* FAB */
.widget-fab {
  width: 52px; height: 52px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(0,120,211,0.3);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.widget-fab:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-xl), 0 0 0 8px rgba(0,120,211,0.12);
}
.widget-fab:active { transform: scale(0.95); }

.fab-icon-close { display: none; }
.widget.open .fab-icon-open { display: none; }
.widget.open .fab-icon-close { display: block; }

/* Panel */
.widget-panel {
  display: none;
  width: 380px;
  max-height: 520px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  flex-direction: column;
}
.widget.open .widget-panel {
  display: flex;
  animation: panel-in 0.3s var(--ease-spring);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 480px) { .widget-panel { width: calc(100vw - 32px); } }

/* Header */
.widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-0);
  flex-shrink: 0;
}
.widget-header-info { display: flex; align-items: center; gap: var(--sp-3); }
.widget-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.widget-title { font-size: var(--text-sm); font-weight: 600; }
.widget-status { font-size: var(--text-xs); color: var(--text-3); display: flex; align-items: center; gap: var(--sp-1); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Messages */
.widget-messages {
  flex: 1; overflow-y: auto;
  padding: var(--sp-4);
  min-height: 200px;
}
.widget-messages .msg { gap: var(--sp-2); }
.widget-messages .msg-avatar { width: 24px; height: 24px; font-size: 10px; }
.widget-messages .msg-body { font-size: var(--text-sm); }
.widget-messages .msg-user .msg-body { padding: var(--sp-2) var(--sp-3); font-size: var(--text-sm); max-width: 80%; }

/* Input */
.widget-input {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3);
  border-top: 1px solid var(--border-0);
  flex-shrink: 0;
}
.widget-input input {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-0);
  border-radius: var(--r-full);
  transition: border-color var(--t-fast) var(--ease);
}
.widget-input input:focus { border-color: var(--accent); }
.widget-input input::placeholder { color: var(--text-3); }

.widget-input .send-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  padding: 0;
  flex-shrink: 0;
}
