:root {
  --bg: #111215;
  --surface: #181a1f;
  --surface-2: #1f2228;
  --input-bg: #121418;
  --border: #282c34;
  --border-hover: #3a404c;
  --text: #ecebe7;
  --text-2: #b9bcc4;
  --muted: #7f8591;
  --accent: #d4a259;
  --accent-hover: #dfb16c;
  --accent-bg: rgba(212, 162, 89, 0.12);
  --accent-border: rgba(212, 162, 89, 0.34);
  --green: #3fb68b;
  --green-bg: rgba(63, 182, 139, 0.12);
  --red: #d95a5a;
  --red-bg: rgba(217, 90, 90, 0.12);
  --blue: #6aa5d9;
  --blue-bg: rgba(106, 165, 217, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.req { color: var(--accent); }
.col-right { text-align: right; }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e333c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f4652; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(17, 18, 21, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--accent);
  color: #111215;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  letter-spacing: -0.5px;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-tab:hover { color: var(--text); }
.nav-tab.active {
  color: var(--text);
  background: var(--surface-2);
}

.tab-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.auth-btn:hover { border-color: var(--border-hover); color: var(--text); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--red); }

/* Layout */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.view { display: none; }
.view.active { display: block; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.import-group {
  display: flex;
  gap: 6px;
}
.import-group input { width: 175px; }

/* Buttons */
.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 38px; padding: 0 22px; font-size: 14px; font-weight: 600; }

.btn-primary {
  background: var(--accent);
  color: #111215;
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--border-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--border-hover); }

.btn-warning {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-border);
}
.btn-warning:hover:not(:disabled) { background: rgba(212, 162, 89, 0.2); }

.btn-danger {
  background: var(--red-bg);
  color: #e57a7a;
  border-color: rgba(217, 90, 90, 0.34);
}
.btn-danger:hover:not(:disabled) { background: rgba(217, 90, 90, 0.22); }

.close-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.close-btn:hover { color: var(--text); background: var(--surface-2); }

/* Inputs */
input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
input[type="text"], input[type="password"], select { height: 34px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #565c67; }

/* Panels & Forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.head-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.field-top label { margin: 0; }

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.field-grid-2:last-child { margin-bottom: 0; }
.field-grid-2 .field { margin-bottom: 0; }

.sub-field {
  padding: 2px 0 6px;
}

.meter {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meter.over { color: var(--red); }

.meter-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.meter-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s;
}

/* Switches */
.switch-list {
  display: flex;
  flex-direction: column;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.switch-row:last-of-type { border-bottom: none; }

.switch {
  appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #2c313a;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c8ccd4;
  transition: transform 0.15s, background 0.15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); background: #111215; }

.more-opts {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.more-opts summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
.more-opts summary:hover { color: var(--text-2); }
.more-opts-body { margin-top: 12px; }

/* Tags & Pills */
.tag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-accent { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }
.tag-green { background: var(--green-bg); color: var(--green); border-color: rgba(63, 182, 139, 0.3); }
.tag-blue { background: var(--blue-bg); color: var(--blue); border-color: rgba(106, 165, 217, 0.3); }
.tag-red { background: var(--red-bg); color: #e57a7a; border-color: rgba(217, 90, 90, 0.3); }

.preset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s;
}
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.pill-danger:hover { border-color: var(--red); color: #e57a7a; }

/* Create Layout */
.create-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 16px;
  align-items: start;
}

.col-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Map Builder */
.map-mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.map-mode-bar label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.map-mode-bar select { max-width: 150px; height: 30px; padding: 4px 8px; }

.map-columns {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
}

.col-caption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.map-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 468px;
  overflow-y: auto;
  padding-right: 4px;
}

.map-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.14s;
}
.map-card:hover { border-color: var(--border-hover); }

.map-add-area {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.map-add-area:hover .map-zh { color: var(--accent); }
.map-zh { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-region { display: block; font-size: 11px; color: var(--muted); }

.map-loop-btn {
  flex-shrink: 0;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.map-loop-btn:hover { border-color: var(--accent); color: var(--accent); }

.rotation-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 468px;
  overflow-y: auto;
  padding-right: 4px;
}

.rot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.rot-index {
  width: 20px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.rot-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rot-mode-select {
  width: auto !important;
  height: 24px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  background: var(--surface) !important;
}

.rot-ops {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.rot-ops button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.rot-ops button:hover { color: var(--text); border-color: var(--border-hover); }

/* 49 Rules */
.rules-panel { margin-top: 16px; }

.rule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.rule-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rule-tab:hover { color: var(--text); }
.rule-tab.active {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.rule-tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.rule-item.modified {
  border-color: var(--accent-border);
  background: rgba(212, 162, 89, 0.05);
}
.rule-name {
  font-size: 13px;
  color: var(--text);
}

.seg-group {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.seg-btn {
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #111215;
  font-weight: 600;
}

/* Sticky Bottom Bar */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: rgba(17, 18, 21, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.bottom-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bottom-summary { font-size: 13px; color: var(--text-2); }
.bottom-actions { display: flex; gap: 8px; }

/* Server Cards */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.srv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.srv-card:hover { border-color: var(--border-hover); }

.srv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.srv-name { font-size: 15px; font-weight: 600; word-break: break-word; }
.srv-id {
  font-family: Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.srv-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-cell {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.stat-label { font-size: 11px; color: var(--muted); }
.stat-val { font-size: 14px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

.srv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-desc {
  font-size: 12px;
  color: var(--text-2);
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  white-space: pre-wrap;
  max-height: 68px;
  overflow: hidden;
}
.srv-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}

/* Empty State */
.empty-box {
  text-align: center;
  padding: 64px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-title { margin: 0 0 12px; font-size: 15px; color: var(--text-2); }
.empty-sub { margin: 0; font-size: 13px; color: var(--muted); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 9, 11, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 520px; }
.modal-xl { max-width: 860px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.modal-tabs {
  display: flex;
  gap: 4px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--input-bg);
}
.m-tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.m-tab:hover { color: var(--text); }
.m-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.m-pane { display: none; }
.m-pane.active { display: block; }

.warn-banner {
  background: var(--red-bg);
  color: #e57a7a;
  border-bottom: 1px solid rgba(217, 90, 90, 0.28);
  padding: 9px 18px;
  font-size: 12px;
}

/* Auth Modal */
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.seg-tab {
  height: 30px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.seg-tab.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

.note-line {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.status-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}

/* Roster & Lists */
.roster-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.roster-bar > input { max-width: 240px; }
.manual-box { display: flex; gap: 6px; align-items: center; }
.manual-box input { width: 170px; }

.roster-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.roster-meta { font-size: 12px; color: var(--muted); }

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.check-group {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
  flex-wrap: wrap;
}
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.check-item input { width: auto; accent-color: var(--accent); cursor: pointer; }

.bfban-result {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-link {
  text-decoration: none;
  cursor: pointer;
}
.tag-link:hover { filter: brightness(1.15); }

.table-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 380px;
  overflow-y: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--input-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.mono { font-family: Consolas, monospace; font-size: 12px; color: var(--text-2); }

.pane-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pane-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.record-main { min-width: 0; }
.record-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
}
.record-reason {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}
.record-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.target-summary {
  padding: 9px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

.dialog-msg {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-2);
}

/* Toasts */
.toast-stack {
  position: fixed;
  top: 68px;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }

@media (max-width: 1020px) {
  .create-grid { grid-template-columns: 1fr; }
  .map-columns { grid-template-columns: 1fr; }
}
