*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background: #0d1117; color: #c9d1d9; }

#app { display: flex; height: 100vh; overflow: hidden; }
#sidebar { width: 280px; min-width: 280px; background: #161b22; border-right: 1px solid #30363d; display: flex; flex-direction: column; }
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.sidebar-header { padding: 12px; border-bottom: 1px solid #30363d; }
.sidebar-header input { width: 100%; padding: 8px 12px; background: #0d1117; color: #c9d1d9; border: 1px solid #30363d; border-radius: 6px; font-size: 13px; outline: none; }
.sidebar-header input:focus { border-color: #1f6feb; }

.contact-list { flex: 1; overflow-y: auto; padding: 4px; }
.contact-item { padding: 8px 12px; margin: 2px 0; border-radius: 6px; cursor: pointer; transition: background 0.15s; display: flex; align-items: center; gap: 10px; }
.contact-item:hover { background: #1c2333; }
.contact-item.active { background: #1c2333; border: 1px solid rgba(31,111,235,0.33); }
.contact-item .contact-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: #21262d; }
.contact-item .contact-info { flex: 1; min-width: 0; }
.contact-item .name { font-size: 13px; font-weight: 600; color: #c9d1d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-item .meta { font-size: 11px; color: #8b949e; margin-top: 2px; display: flex; justify-content: space-between; }
.type-badge { font-size: 10px; padding: 1px 6px; border-radius: 3px; }
.type-badge.group { background: rgba(31,111,235,0.13); color: #58a6ff; }
.type-badge.user { background: rgba(255,138,101,0.13); color: #ff8a65; }

.chat-header { padding: 10px 16px; border-bottom: 1px solid #30363d; display: flex; align-items: center; gap: 10px; background: #161b22; }
.chat-header .header-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: #21262d; }
.chat-header .header-info { display: flex; align-items: baseline; gap: 12px; }
.chat-name { font-size: 14px; font-weight: 700; color: #58a6ff; }
.chat-stats { font-size: 11px; color: #8b949e; }

.filter-bar { padding: 10px 16px; border-bottom: 1px solid #30363d; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #161b22; }
.filter-bar input, .filter-bar select { background: #0d1117; color: #c9d1d9; border: 1px solid #30363d; border-radius: 4px; padding: 5px 10px; font-size: 12px; outline: none; }
.filter-bar input:focus, .filter-bar select:focus { border-color: #1f6feb; }
#filter-keyword { width: 180px; }
#filter-date-start, #filter-date-end, #jump-date { width: 115px; }
.date-sep { color: #484f58; font-size: 12px; }
.filter-result-count { font-size: 10px; color: #8b949e; margin-left: auto; }

.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #484f58; }
.welcome-icon { font-size: 48px; margin-bottom: 16px; }
.welcome h2 { color: #8b949e; font-size: 18px; margin-bottom: 8px; }
.welcome p { font-size: 13px; }

.message-list { flex: 1; overflow-y: auto; padding: 16px 20px; }
.date-divider { text-align: center; margin: 20px 0 14px; }
.date-divider span { background: #21262d; color: #8b949e; padding: 3px 14px; border-radius: 12px; font-size: 11px; }

/* Chat bubble messages */
.msg-row { display: flex; margin-bottom: 12px; cursor: pointer; align-items: flex-start; }
.msg-row.me { justify-content: flex-end; }
.msg-row.other { justify-content: flex-start; }

.msg-avatar { width: 32px; height: 32px; border-radius: 4px; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.msg-row.other .msg-avatar { margin-right: 8px; }
.msg-row.me .msg-avatar { margin-left: 8px; }

.msg-bubble { max-width: 72%; padding: 0; border-radius: 8px; transition: background 0.1s; }
.msg-row.me .msg-bubble { background: #1a3a5c; border: 1px solid rgba(31,111,235,0.2); }
.msg-row.other .msg-bubble { background: #1c2128; border: 1px solid #30363d; }
.msg-row.me .msg-bubble:hover { background: #1f4068; }
.msg-row.other .msg-bubble:hover { background: #21262d; }

.msg-meta { display: flex; align-items: center; gap: 8px; padding: 6px 12px 2px; font-size: 11px; }
.msg-row.me .msg-meta { justify-content: flex-end; }
.msg-sender { font-weight: 600; font-size: 11px; }
.msg-row.me .msg-sender { color: #ff8a65; }
.msg-row.other .msg-sender { color: #58a6ff; }
.msg-time { color: #484f58; font-family: monospace; font-size: 10px; }
.msg-num { color: #484f58; font-family: monospace; font-size: 10px; min-width: 24px; }

.msg-text { padding: 4px 12px 8px; font-size: 13px; color: #c9d1d9; line-height: 1.5; word-break: break-word; }

.msg-type-tag { padding: 1px 6px; border-radius: 3px; font-size: 10px; margin-right: 4px; white-space: nowrap; }
.msg-type-tag.image { background: rgba(255,138,101,0.13); color: #ff8a65; }
.msg-type-tag.voice { background: rgba(77,182,172,0.13); color: #4db6ac; }
.msg-type-tag.video { background: rgba(233,69,96,0.13); color: #e94560; }
.msg-type-tag.location { background: rgba(88,166,255,0.13); color: #58a6ff; }
.msg-type-tag.link { background: rgba(255,213,79,0.13); color: #ffd54f; }
.msg-type-tag.card { background: rgba(120,144,156,0.13); color: #78909c; }
.msg-type-tag.file { background: rgba(255,138,101,0.13); color: #ff8a65; }
.msg-type-tag.emoji { background: rgba(186,104,200,0.13); color: #ba68c8; }
.msg-type-tag.system { background: rgba(120,144,156,0.13); color: #78909c; }

/* Expanded bubble detail */
.msg-bubble-detail { padding: 12px 16px; margin: 4px 0 16px; background: #161b22; border: 1px solid #21262d; border-radius: 8px; font-size: 12px; cursor: default; }
.msg-bubble-detail.own { margin-left: auto; max-width: 72%; }
.msg-bubble-detail.other { margin-right: auto; max-width: 72%; }
.bubble-image { max-width: 320px; border-radius: 6px; cursor: pointer; }
.bubble-voice { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.bubble-voice .vp-play-btn { width: 34px; height: 34px; min-width: 34px; border-radius: 50%; background: #1f6feb; border: none; color: #fff; font-size: 15px; cursor: pointer; line-height: 34px; text-align: center; padding: 0; transition: background 0.15s; }
.bubble-voice .vp-play-btn:hover { background: #388bfd; }
.bubble-voice .vp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bubble-voice .vp-time-row { display: flex; align-items: center; gap: 2px; font-size: 10px; color: #8b949e; font-family: monospace; }
.bubble-voice .vp-time-sep { color: #484f58; }
.bubble-voice .vp-time-dur { color: #8b949e; }
.bubble-voice .vp-bar-track { height: 6px; background: #30363d; border-radius: 3px; cursor: pointer; position: relative; margin: 1px 0; }
.bubble-voice .vp-bar-track:hover { background: #3a3f47; }
.bubble-voice .vp-bar-fill { height: 6px; background: #4db6ac; border-radius: 3px; pointer-events: none; transition: width 0.1s linear; }
.bubble-voice .vp-speed-row { display: flex; gap: 3px; margin-top: 2px; }
.bubble-voice .vp-speed-btn { height: 20px; padding: 0 5px; border-radius: 3px; background: transparent; border: 1px solid rgba(77,182,172,0.2); color: #8b949e; font-size: 10px; font-family: monospace; cursor: pointer; transition: all 0.15s; line-height: 18px; }
.bubble-voice .vp-speed-btn:hover { border-color: rgba(77,182,172,0.5); color: #c9d1d9; }
.bubble-voice .vp-speed-btn.active { background: rgba(77,182,172,0.2); border-color: #4db6ac; color: #4db6ac; font-weight: 600; }
.bubble-voice .vp-trans-btn { width: 26px; height: 26px; min-width: 26px; border-radius: 4px; background: rgba(77,182,172,0.15); border: 1px solid rgba(77,182,172,0.3); color: #4db6ac; font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; line-height: 24px; text-align: center; transition: background 0.15s; }
.bubble-voice .vp-trans-btn:hover { background: rgba(77,182,172,0.25); }
.bubble-voice .vp-trans-btn:disabled { opacity: 0.5; cursor: default; }
.bubble-voice .vp-dl-btn { color: #484f58; font-size: 12px; text-decoration: none; padding: 4px; border-radius: 3px; transition: color 0.15s; }
.bubble-voice .vp-dl-btn:hover { color: #58a6ff; }
.vp-trans-result { margin-top: 6px; padding: 8px 12px; border-radius: 6px; font-size: 12px; line-height: 1.4; }
.vp-trans-result.success { background: rgba(77,182,172,0.08); color: #c9d1d9; border: 1px solid rgba(77,182,172,0.2); }
.vp-trans-result.empty { background: rgba(120,144,156,0.08); color: #8b949e; border: 1px solid rgba(120,144,156,0.2); }
.vp-trans-result.error { background: rgba(233,69,96,0.08); color: #e94560; border: 1px solid rgba(233,69,96,0.2); }
.bubble-location { border: 1px solid #30363d; border-radius: 6px; overflow: hidden; }
.bubble-location .map-placeholder { height: 120px; background: #1a2332; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #8b949e; }
.bubble-location .addr-info { padding: 8px 12px; }
.bubble-link { border: 1px solid #30363d; border-radius: 6px; overflow: hidden; cursor: pointer; }
.bubble-link:hover { border-color: #1f6feb; }
.bubble-link .link-title { padding: 10px 12px 4px; font-weight: 600; }
.bubble-link .link-desc { padding: 0 12px 10px; color: #8b949e; font-size: 11px; }
.bubble-contact { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #30363d; border-radius: 6px; }
.bubble-system { text-align: center; padding: 4px 0; }
.bubble-system span { background: rgba(120,144,156,0.12); color: #78909c; padding: 2px 12px; border-radius: 10px; font-size: 11px; }

/* Non-text message placeholders */
.nontext-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px; gap: 6px; color: #8b949e; font-size: 13px; background: #0d1117; border: 1px solid #21262d; border-radius: 6px; }
.nontext-placeholder > span:first-child { font-size: 28px; }
.image-plc { border-color: rgba(255,138,101,0.2); }
.voice-plc { border-color: rgba(77,182,172,0.2); }
.location-plc { border-color: rgba(88,166,255,0.2); }
.link-plc { border-color: rgba(255,213,79,0.2); }
.card-plc { border-color: rgba(120,144,156,0.2); }
.emoji-plc { border-color: rgba(186,104,200,0.2); }
.file-plc { border-color: rgba(255,138,101,0.2); }

.pagination-bar { padding: 10px 16px; border-top: 1px solid #30363d; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #161b22; }
.pg-btn { padding: 5px 10px; background: #0d1117; color: #c9d1d9; border: 1px solid #30363d; border-radius: 4px; cursor: pointer; font-size: 12px; }
.pg-btn:hover { border-color: #1f6feb; color: #58a6ff; }
.pg-btn:disabled { color: #484f58; cursor: default; border-color: #21262d; }
.pg-btn.active { background: #1f6feb; color: #fff; border-color: #1f6feb; }
.page-numbers { display: flex; gap: 4px; }
.pagination-info { font-size: 10px; color: #484f58; margin-left: auto; }

.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; z-index: 1000; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 32px; cursor: pointer; }

.hidden { display: none !important; }
.loading { text-align: center; padding: 40px; color: #8b949e; }
.loading-icon { font-size: 28px; margin-bottom: 8px; }
.error-msg { text-align: center; padding: 40px; color: #e94560; }
.empty-msg { text-align: center; padding: 40px; color: #484f58; font-size: 13px; line-height: 1.8; }
.empty-msg .hint { margin-top: 12px; font-size: 12px; color: #484f58; background: #161b22; padding: 12px 20px; border-radius: 8px; display: inline-block; text-align: left; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* === Top Navigation === */
#top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 48px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  position: sticky;
  top: 0;
  z-index: 100;
}
#top-nav .nav-brand {
  font-size: 16px;
  font-weight: 600;
  color: #f0f6fc;
  text-decoration: none;
}
#top-nav .nav-brand:hover { color: #58a6ff; }
#top-nav .nav-right { display: flex; gap: 12px; align-items: center; }
#top-nav .nav-link {
  color: #8b949e;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}
#top-nav .nav-link:hover { color: #f0f6fc; background: #21262d; }
#top-nav .nav-meta { font-size: 12px; color: #8b949e; }

#content { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

/* === Dashboard === */
.dashboard-section { margin-bottom: 32px; }
.dashboard-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #f0f6fc;
}
.dashboard-section .section-subtitle {
  font-size: 12px;
  color: #8b949e;
  margin: 0 0 16px 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .device-grid, .device-detail-grid, .device-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
.dashboard-card {
  display: block;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: #c9d1d9;
  transition: border-color 0.15s, background 0.15s;
}
.dashboard-card:hover {
  border-color: #58a6ff;
  background: #1c2333;
}
.dashboard-card .card-icon { font-size: 28px; margin-bottom: 8px; }
.dashboard-card .card-title { font-size: 15px; font-weight: 600; color: #f0f6fc; margin-bottom: 4px; }
.dashboard-card .card-desc { font-size: 12px; color: #8b949e; }
.device-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.summary-card, .device-card, .event-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}
.summary-card { padding: 18px 20px; }
.summary-label { color: #8b949e; font-size: 12px; margin-bottom: 8px; }
.summary-value { color: #f0f6fc; font-size: 24px; font-weight: 700; }
.device-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.device-card {
  display: block;
  text-decoration: none;
  color: #c9d1d9;
  padding: 18px;
  transition: border-color 0.15s, background 0.15s;
}
.device-card:hover { border-color: #58a6ff; background: #1c2333; }
.device-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.device-title { color: #f0f6fc; font-size: 16px; font-weight: 600; }
.device-subtitle {
  margin-top: 4px;
  color: #8b949e;
  font-size: 12px;
  word-break: break-all;
}
.device-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.device-badge.online { color: #3fb950; background: rgba(63,185,80,0.12); }
.device-badge.offline { color: #f0883e; background: rgba(240,136,62,0.12); }
.device-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #8b949e;
  padding-top: 8px;
}
.device-meta-row strong { color: #c9d1d9; text-align: right; }
.device-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.event-list { display: grid; gap: 10px; }
.event-card { padding: 14px 16px; }

/* === Wizard / Operation Pages === */
.steps-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow-x: auto;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #484f58;
  white-space: nowrap;
}
.step-item.active { color: #58a6ff; font-weight: 600; }
.step-item.done { color: #3fb950; }
.step-arrow { color: #30363d; font-size: 12px; }

.config-panel {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.config-panel label { display: block; font-size: 12px; color: #8b949e; margin-bottom: 4px; }
.config-panel .form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.config-panel input, .config-panel select {
  flex: 1;
  min-width: 150px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.config-panel input:focus, .config-panel select:focus {
  border-color: #58a6ff;
  outline: none;
}
.btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}
.btn-primary { background: #238636; color: #fff; }
.btn-primary:hover { background: #2ea043; }
.btn-primary:disabled { background: #21262d; color: #484f58; cursor: not-allowed; }
.btn-secondary { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.btn-secondary:hover { background: #30363d; }

.progress-panel {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.progress-bar-outer {
  height: 8px;
  background: #21262d;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #238636, #3fb950);
  border-radius: 4px;
  transition: width 0.3s;
}
.progress-detail { font-size: 13px; color: #8b949e; }

.log-console {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}
.log-line { padding: 1px 0; }
.log-line.stage { color: #58a6ff; }
.log-line.ok { color: #3fb950; }
.log-line.warn { color: #d29922; }
.log-line.error { color: #f85149; }

.result-panel {
  background: #161b22;
  border: 1px solid #3fb950;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}
.result-panel h3 { color: #3fb950; font-size: 15px; margin: 0 0 8px 0; }
.result-stats { font-size: 13px; color: #c9d1d9; }
.result-stats dt { font-size: 11px; color: #8b949e; margin-top: 8px; }
.result-stats dd { margin: 0; }

/* === Selection Dialog === */
.select-panel {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.select-list { display: flex; flex-direction: column; gap: 8px; }
.select-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.select-item:hover { border-color: #58a6ff; background: #1c2333; }
.select-name { font-size: 14px; font-weight: 600; color: #f0f6fc; }
.select-meta { font-size: 11px; color: #8b949e; }
.select-count { font-size: 11px; color: #8b949e; }

/* === Back link === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b949e;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 16px;
}
.back-link:hover { color: #58a6ff; }

/* === Settings Page === */
.settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.settings-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(63,185,80,0.14);
  color: #3fb950;
  border: 1px solid rgba(63,185,80,0.25);
  font-size: 12px;
  white-space: nowrap;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.settings-section-title {
  margin: 0 0 14px 0;
  font-size: 15px;
  color: #f0f6fc;
}
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #c9d1d9;
}
.switch-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #238636;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-box {
  padding: 12px 14px;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid #30363d;
}
.status-label {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 6px;
}
.status-value {
  font-size: 14px;
  color: #f0f6fc;
  word-break: break-word;
}
.compact-box {
  padding: 10px 12px;
}
.danger-btn {
  color: #ffb3b3;
  border-color: rgba(248,81,73,0.3);
}
.danger-btn:hover {
  background: rgba(248,81,73,0.12);
  border-color: rgba(248,81,73,0.45);
}
.paths-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.path-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 14px;
}
.path-label {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 6px;
}
.path-value {
  font-size: 12px;
  color: #c9d1d9;
  line-height: 1.6;
  word-break: break-all;
}
@media (max-width: 860px) {
  .settings-grid,
  .paths-grid {
    grid-template-columns: 1fr;
  }
  .settings-hero {
    flex-direction: column;
    align-items: stretch;
  }
}

/* === Login === */
.login-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(22,27,34,0.98), rgba(13,17,23,0.98));
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.login-eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(88,166,255,0.12);
  color: #58a6ff;
  font-size: 11px;
  margin-bottom: 12px;
}
.login-title {
  font-size: 28px;
  color: #f0f6fc;
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 13px;
  color: #8b949e;
  line-height: 1.7;
  margin-bottom: 18px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #8b949e;
}
.login-form input {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.login-form input:focus {
  border-color: #58a6ff;
  outline: none;
}
.login-submit {
  margin-top: 6px;
  width: 100%;
}
.login-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(248,81,73,0.12);
  border: 1px solid rgba(248,81,73,0.2);
  color: #ffb3b3;
  font-size: 13px;
}
