:root {
  --bg: #f6f3ec;
  --bg-elev: #fbf9f4;
  --surface: #ffffff;
  --sidebar-bg: #1e2421;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(212, 162, 89, 0.18);
  --ink: #1f2421;
  --ink-muted: #666c68;
  --border: #e5dfd3;
  --accent: #b87c2f;
  --accent-soft: #f5ebd9;
  --accent-dark: #935f1e;
  --green: #2c7a5b;
  --red: #b9423a;
  --shadow-sm: 0 2px 8px rgba(31, 36, 33, 0.05);
  --shadow-md: 0 10px 30px rgba(31, 36, 33, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 286px;
  background: var(--sidebar-bg);
  color: #f3efe7;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 14px;
  flex-shrink: 0;
  overflow-y: auto;
}

.twin-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

.avatar-stage {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 162, 89, 0.65);
}

.avatar-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c98f42, #7a521f);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fffaf0;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.avatar-stage.speaking .avatar-ring {
  animation: pulseRing 1.4s ease-in-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.9; }
  70% { transform: scale(1.18); opacity: 0.2; }
  100% { transform: scale(1); opacity: 0.9; }
}

.twin-meta {
  min-width: 0;
}

.twin-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.twin-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #c2c8c3;
  margin-top: 3px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e09f3e;
  display: inline-block;
}

.status-dot.online {
  background: #4cd08a;
}

.avatar-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: #e4c084;
  background: rgba(212, 162, 89, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
}

.memory-meter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: background 0.18s;
}

.memory-meter:hover {
  background: rgba(255, 255, 255, 0.08);
}

.meter-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #d6dcd7;
  margin-bottom: 7px;
}

.meter-row strong {
  color: #f2cb8a;
}

.meter-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #c98f42, #ebd09b);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.meter-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #9ba59f;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.nav-label {
  font-size: 11px;
  color: #8f9a93;
  padding: 2px 8px 4px;
  letter-spacing: 0.5px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #ece9e1;
  border-radius: 11px;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.nav-item:hover {
  background: var(--sidebar-hover);
}

.nav-item.active {
  background: var(--sidebar-active);
  border-color: rgba(212, 162, 89, 0.38);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-text strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.harvest-meta-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.source-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f0ec;
  color: var(--green);
  font-weight: 600;
}

.nav-text small {
  font-size: 11px;
  color: #a7b0aa;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.topbar {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
}

.topbar-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.topbar-desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.model-switcher select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.icon-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.setup-banner {
  background: #fff6e5;
  border-bottom: 1px solid #ecd3a6;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #6b4614;
}

.view-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.view-pane.active {
  display: flex;
}

/* Multi-Topic Bar */
.topic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.topic-new-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.topic-new-btn:hover {
  background: var(--accent-dark);
}

.topic-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.topic-list::-webkit-scrollbar {
  display: none;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.topic-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.topic-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

.topic-del {
  font-size: 13px;
  line-height: 1;
  opacity: 0.55;
  padding: 0 2px;
}

.topic-del:hover {
  opacity: 1;
  color: var(--red);
}

/* Full-Screen PIN Lock */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #1d2420, #121614);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.pin-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-elev);
  border-radius: 20px;
  padding: 30px 24px 26px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.pin-emblem {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d7a153, #875920);
  color: #fffaf0;
  font-size: 30px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(135, 89, 32, 0.35);
}

.pin-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--ink);
}

.pin-card p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink-muted);
}

.pin-card input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 3px;
  background: #fff;
  color: var(--ink);
}

.pin-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.pin-error {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--red);
}

/* Interview Banner */
.interview-banner {
  margin: 14px 22px 0;
  background: linear-gradient(135deg, #fffdf8, #f9f0df);
  border: 1px solid #e4cca0;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.interview-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pill {
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.interview-progress {
  font-size: 12px;
  color: var(--ink-muted);
}

.interview-question {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #2b2214;
}

.interview-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Chat Stream */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  margin: auto;
  max-width: 560px;
  text-align: center;
  padding: 28px 20px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.starter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.starter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.16s;
}

.starter-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.msg-row {
  display: flex;
  gap: 11px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.msg-row.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg-row.assistant .msg-avatar {
  background: linear-gradient(135deg, #c98f42, #7a521f);
  color: #fff;
}

.msg-row.user .msg-avatar {
  background: #2e3b34;
  color: #fff;
}

.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.msg-row.user .msg-bubble-wrap {
  align-items: flex-end;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 14.5px;
  line-height: 1.72;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.msg-row.assistant .msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: #26332c;
  color: #faf7f0;
  border-top-right-radius: 4px;
}

.msg-bubble p {
  margin: 0 0 8px;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.msg-bubble ul, .msg-bubble ol {
  margin: 6px 0;
  padding-left: 20px;
}

.msg-bubble blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 4px;
}

.msg-bubble code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

.msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  padding: 0 4px;
}

.msg-action-btn {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 5px;
}

.msg-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent-dark);
}

/* Inline Memory Suggestion Card */
.suggestion-block {
  max-width: 820px;
  width: 100%;
  margin: 4px auto 0;
  background: #fdf9f0;
  border: 1px dashed #d6ad6f;
  border-radius: 13px;
  padding: 12px 15px;
}

.suggestion-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.suggestion-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.suggestion-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.suggestion-card-title {
  font-size: 13.5px;
  font-weight: 700;
}

.suggestion-card-body {
  font-size: 13px;
  line-height: 1.6;
  color: #3a3f3c;
  margin-bottom: 8px;
}

.suggestion-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

/* Composer */
.composer-wrap {
  padding: 10px 24px 16px;
  background: linear-gradient(to top, var(--bg) 82%, transparent);
}

.composer-toolbar {
  max-width: 820px;
  margin: 0 auto 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}

.toolbar-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.observe-pill {
  font-size: 12px;
  color: var(--green);
}

.composer-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s;
}

.composer-box:focus-within {
  border-color: var(--accent);
}

.mic-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
  font-size: 17px;
  flex-shrink: 0;
}

.mic-btn.recording {
  background: #fde8e7;
  border-color: var(--red);
  animation: pulseRing 1.1s infinite;
}

#chatInput {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 14.5px;
  line-height: 1.55;
  padding: 7px 4px;
  max-height: 160px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}

.send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.send-btn:hover {
  background: var(--accent-dark);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Panels (Memories & Settings) */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 40px;
}

.vault-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.vault-header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.vault-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vault-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink);
}

.cat-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 13px;
  min-width: 240px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.memory-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.memory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.memory-stars {
  color: var(--accent);
  font-size: 12px;
}

.memory-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.memory-content {
  font-size: 13.5px;
  line-height: 1.65;
  color: #3c423e;
  white-space: pre-wrap;
  flex: 1;
}

.memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  font-size: 11px;
  background: var(--bg);
  color: var(--ink-muted);
  padding: 2px 7px;
  border-radius: 6px;
}

.memory-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f0ece3;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Settings Cards */
.settings-layout {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
}

.muted {
  color: var(--ink-muted);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.55;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.provider-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.provider-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ece8de;
  color: var(--ink-muted);
}

.badge.ok {
  background: #dff3e8;
  color: var(--green);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 11px;
}

.field span {
  font-size: 12.5px;
  font-weight: 600;
  color: #3f4641;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 14px;
}

.toggle-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}

.toggle-item input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.card-future {
  background: linear-gradient(135deg, #fffdf9, #f7f1e4);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.roadmap-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
}

.roadmap-item p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Buttons */
.btn {
  border-radius: 10px;
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-danger {
  background: transparent;
  border: none;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 22, 0.45);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.modal-lg {
  max-width: 700px;
}

.modal-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.close-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-muted);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2421;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  z-index: 120;
}

/* Responsive */
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: inline-block;
  }
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 10px 14px;
  }
  .topbar-desc {
    display: none;
  }
}
