:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1d2430;
  --muted: #667085;
  --line: #dde2ea;
  --nav: #202733;
  --nav-soft: #2b3442;
  --primary: #14746f;
  --primary-dark: #0f5d59;
  --red: #c2410c;
  --amber: #b7791f;
  --blue: #2563eb;
  --gray: #8a94a6;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: var(--nav);
  color: white;
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #e4faf6;
  color: var(--primary-dark);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #b9c1cf;
  margin-top: 3px;
}

nav {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

nav button,
.sidebar .wide {
  width: 100%;
}

nav button {
  border: 0;
  text-align: left;
  color: #e8edf5;
  background: transparent;
  padding: 12px;
  border-radius: var(--radius);
}

nav button.active,
nav button:hover {
  background: var(--nav-soft);
}

main {
  padding: 26px;
  min-width: 0;
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

h2 {
  font-size: 16px;
  margin: 0;
}

h3 {
  font-size: 14px;
  margin-bottom: 12px;
}

.page-title p,
.empty,
small,
dt {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat {
  padding: 16px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.stat.alert {
  border-color: #fed7aa;
  background: #fff7ed;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  margin-bottom: 16px;
}

.matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quadrant {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 210px;
}

.mini-list,
.stack,
.timeline,
.template-list {
  display: grid;
  gap: 10px;
}

.buyer-card,
.follow-row {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 6px;
  width: 100%;
}

.buyer-card:hover,
.follow-row:hover,
tbody tr:hover {
  border-color: var(--primary);
  background: #f1fbf9;
}

.buyer-card strong,
.buyer-card small,
.buyer-card .score {
  min-width: 0;
  overflow-wrap: anywhere;
}

.grade,
.pill,
.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.grade-A {
  background: #e6f7f4;
  color: #0f766e;
}

.grade-B {
  background: #eff6ff;
  color: #1d4ed8;
}

.grade-C {
  background: #fff7ed;
  color: #c2410c;
}

.grade-D {
  background: #f1f5f9;
  color: #475569;
}

.pill.hot {
  background: #fee2e2;
  color: #b91c1c;
}

.pill.warm {
  background: #ffedd5;
  color: #c2410c;
}

.pill.cool {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.cold,
.chip {
  background: #eef2f7;
  color: #475467;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px 140px auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.primary,
.ghost,
.danger,
.file-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 40px;
}

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

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

.ghost,
.file-btn {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.danger {
  background: #fff7ed;
  color: var(--red);
  border-color: #fed7aa;
}

.file-btn {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.file-btn input {
  display: none;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td strong,
td small {
  display: block;
}

tbody tr {
  cursor: pointer;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin: -8px 0 16px;
}

.info {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.info-social {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-link {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 10px;
  background: #fff;
  color: #245aa8;
  display: grid;
  place-items: center;
  position: relative;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(24, 82, 145, 0.08);
}

.social-link:hover {
  border-color: #2f80d1;
  transform: translateY(-1px);
}

.social-link img {
  width: 20px;
  height: 20px;
  display: block;
}

.social-link span {
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.social-link img + span {
  position: absolute;
  opacity: 0;
}

.social-fieldset {
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 12px;
  padding: 14px;
  background: #f7faff;
}

.social-fieldset legend {
  padding: 0 6px;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.social-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scorebox {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.scorebox strong {
  font-size: 44px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.memo {
  line-height: 1.6;
  color: #344054;
}

.compact-form {
  display: grid;
  grid-template-columns: 140px 130px minmax(160px, 1fr) minmax(140px, 0.7fr) 150px auto;
  gap: 8px;
  margin-bottom: 14px;
}

.timeline article {
  border-left: 3px solid var(--primary);
  background: #f8fafc;
  padding: 10px 12px;
}

.buyer-pipeline {
  margin-bottom: 16px;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-step {
  min-height: 78px;
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 12px;
  background: #f7faff;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  color: #667085;
}

.pipeline-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6edf6;
  color: #5c6f89;
  font-size: 12px;
  font-weight: 900;
}

.pipeline-step strong {
  font-size: 13px;
  white-space: nowrap;
}

.pipeline-step.done {
  background: #eef8f3;
  color: #16734a;
}

.pipeline-step.done span {
  background: #1f9d63;
  color: #fff;
}

.pipeline-step.current {
  background: #eaf4ff;
  border-color: #2f80d1;
  color: #1d62aa;
}

.pipeline-step.current span {
  background: #2f80d1;
  color: #fff;
}

.pipeline-terminal {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.terminal-step {
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 10px;
  background: #f7faff;
  color: #667085;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.terminal-step.active {
  border-color: #ef4444;
  background: #fff1f2;
  color: #be123c;
}

.email-preview {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 12px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.span2 {
  grid-column: span 2;
}

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

.map-layout {
  grid-template-columns: minmax(560px, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

.world-map {
  position: relative;
  aspect-ratio: 917 / 566;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #2697ad;
  margin-bottom: 16px;
}

.world-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-continent {
  position: absolute;
  border: 0;
  background: rgba(20, 116, 111, 0.01);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border-radius: 999px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  transition: none;
}

.map-continent span {
  font-size: 13px;
  font-weight: 800;
}

.map-continent b {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  text-shadow: none;
  font-size: 12px;
}

.map-continent:hover,
.map-continent.selected {
  background: rgba(20, 116, 111, 0.24);
  box-shadow: none;
}

.map-continent.selected b {
  background: var(--primary);
  color: #fff;
}

.country-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  border: 2px solid #ffffff;
  background: #f8fafc;
  color: var(--ink);
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px 999px 999px 4px;
  display: grid;
  place-items: center;
  box-shadow: none;
  rotate: -45deg;
  z-index: 5;
}

.country-pin span,
.country-pin b {
  grid-area: 1 / 1;
  rotate: 45deg;
}

.country-pin span {
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-5px);
}

.country-pin b {
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4e9f2;
  color: #475467;
  font-size: 11px;
  transform: translateY(9px);
}

.country-pin.has-buyers,
.country-pin:hover,
.country-pin.selected {
  background: var(--primary);
  color: white;
}

.country-pin.has-buyers b,
.country-pin:hover b,
.country-pin.selected b {
  background: #ffffff;
  color: var(--primary-dark);
}

.map-step {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.map-step button {
  justify-content: center;
  min-width: 0;
}

.map-step span,
.map-step b {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef2f7;
  color: #475467;
  font-size: 13px;
}

.map-step b {
  background: #e6f7f4;
  color: var(--primary-dark);
}

.country-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.country-picker button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  text-align: left;
}

.country-picker button small {
  grid-column: 1;
}

.country-picker button b {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef2f7;
  display: grid;
  place-items: center;
}

.country-picker button:hover,
.country-picker button.selected {
  border-color: var(--primary);
  background: #f1fbf9;
}

.country-popup {
  position: static;
  top: auto;
}

.country-popup .panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.popup-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.lane {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 68vh;
}

.lane h2 {
  display: flex;
  justify-content: space-between;
  margin: 2px 2px 10px;
}

.lane h2 span {
  color: var(--muted);
}

.template-card pre {
  margin-top: 12px;
}

@media (max-width: 980px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats,
  .grid.two,
  .map-layout,
  .form-grid,
  .social-form-grid,
  .toolbar,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .span2 {
    grid-column: span 1;
  }

  .matrix,
  .country-picker {
    grid-template-columns: 1fr;
  }

  .country-popup {
    position: static;
  }
}

/* Polished product UI */
:root {
  --bg: #4aa3ec;
  --panel: rgba(255, 255, 255, 0.96);
  --ink: #162033;
  --muted: #6f7f96;
  --line: rgba(28, 74, 125, 0.16);
  --nav: rgba(38, 130, 211, 0.74);
  --nav-soft: rgba(255, 255, 255, 0.18);
  --primary: #2f80d1;
  --primary-dark: #1d62aa;
  --radius: 18px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #327fd0 0%, #4a9be4 46%, #6ab7f5 100%);
  color: var(--ink);
}

#app {
  display: block;
  min-height: 100vh;
}

.sidebar {
  height: auto;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(52, 137, 216, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(14px);
}

.brand {
  margin: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  background: #2444ee;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(36, 68, 238, 0.28);
}

.brand strong {
  font-size: 21px;
  letter-spacing: 0;
}

.brand small {
  color: rgba(255, 255, 255, 0.78);
}

nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

nav button,
.sidebar .wide {
  width: auto;
}

nav button {
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}

nav button.active,
nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.sidebar .primary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  box-shadow: 0 12px 28px rgba(28, 83, 143, 0.2);
}

main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 54px 34px 72px;
}

.page-title {
  margin-bottom: 26px;
}

h1 {
  color: #fff;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 12px 34px rgba(21, 72, 126, 0.22);
}

.page-title p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  font-weight: 700;
}

.stat,
.panel,
.quadrant,
.lane,
.buyer-card,
.follow-row {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(24, 82, 145, 0.18);
}

.stat,
.panel {
  border-radius: var(--radius);
}

.stat {
  padding: 22px;
  min-height: 132px;
}

.stat span {
  color: #5b6f8c;
  font-weight: 800;
}

.stat strong {
  color: #2d79c5;
  font-size: 42px;
}

.stat.alert {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.88);
}

.panel {
  padding: 22px;
}

.panel-head h2,
h2 {
  color: #172033;
  font-size: 20px;
  font-weight: 900;
}

.toolbar {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 12px;
  backdrop-filter: blur(14px);
}

.dropzone {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 104px;
  margin: 0 0 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 18px 42px rgba(24, 82, 145, 0.12);
  transition: none;
}

.dropzone strong {
  font-size: 17px;
  font-weight: 900;
}

.dropzone span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.dropzone.dragging {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
}

input,
select,
textarea,
.ghost,
.file-btn {
  border-color: rgba(48, 105, 169, 0.14);
  border-radius: 12px;
  background: #f7faff;
}

.primary {
  background: #2f80d1;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(47, 128, 209, 0.28);
}

.primary:hover {
  background: #236fbf;
}

.ghost,
.file-btn {
  color: #276daf;
  font-weight: 800;
}

.buyer-card,
.follow-row,
.country-picker button {
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(24, 82, 145, 0.08);
}

.buyer-card:hover,
.follow-row:hover,
tbody tr:hover,
.country-picker button:hover,
.country-picker button.selected {
  background: #f2f8ff;
  border-color: #70b7f4;
}

.map-layout {
  grid-template-columns: minmax(0, 1fr);
}

.map-stage {
  position: relative;
}

.clickable-map {
  position: relative;
  aspect-ratio: 950 / 620;
  min-height: 420px;
  max-height: 680px;
  border: 1px solid rgba(48, 105, 169, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 14px;
}

.map-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.map-stage-head strong {
  color: #172033;
  font-size: 16px;
  font-weight: 900;
}

.country-modal {
  position: absolute;
  right: 18px;
  top: 74px;
  z-index: 9;
  width: min(420px, calc(100% - 36px));
  max-height: calc(100% - 96px);
  overflow: auto;
  border: 1px solid rgba(36, 90, 168, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(22, 40, 68, 0.2);
}

.country-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(36, 90, 168, 0.12);
}

.country-modal-head h2 {
  margin: 0;
}

.country-modal-head p {
  margin: 4px 0 0;
  color: #667085;
  font-weight: 700;
}

.country-modal-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.map-canvas {
  position: absolute;
  inset: 22px;
  transform-origin: center center;
  transition: transform 260ms ease;
}

.clickable-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.world-map-canvas {
  inset: 28px;
}

.focus-map {
  inset: 28px;
}

.focus-asia {
  transform: translate(-32%, 6%) scale(1.88);
}

.focus-europe {
  transform: translate(-12%, 26%) scale(2.65);
}

.focus-middle-east {
  transform: translate(-26%, 12%) scale(2.65);
}

.focus-north-america {
  transform: translate(30%, 19%) scale(2.05);
}

.focus-south-america {
  transform: translate(24%, -18%) scale(2.2);
}

.focus-africa {
  transform: translate(-7%, -8%) scale(2.05);
}

.focus-oceania {
  transform: translate(-50%, -24%) scale(2.18);
}

.continent-hit {
  position: absolute;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.continent-label {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #245aa8;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(28, 64, 116, 0.1);
  white-space: nowrap;
  cursor: pointer;
}

.continent-hit:hover,
.continent-hit.selected {
  background: transparent;
  outline: 0;
}

.continent-label:hover,
.continent-label.selected {
  background: #245aa8;
  color: #fff;
}

.map-country-point {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  min-width: 28px;
  min-height: 28px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f4f96;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
}

.focus-map .map-country-point {
  min-width: 34px;
  min-height: 34px;
  transform: translate(-50%, -50%) scale(0.72);
  box-shadow: 0 10px 22px rgba(22, 40, 68, 0.16);
}

.map-country-point span {
  font-size: 9px;
  font-weight: 900;
}

.detail-country-point {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(36, 90, 168, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #245aa8;
  min-height: 38px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.detail-country-point strong {
  font-size: 12px;
  white-space: nowrap;
}

.detail-country-point b {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #edf3fb;
  color: #4d6078;
  font-size: 11px;
}

.detail-country-point:hover,
.detail-country-point.selected,
.detail-country-point.has-buyers {
  background: #245aa8;
  color: #fff;
}

.detail-country-point:hover b,
.detail-country-point.selected b,
.detail-country-point.has-buyers b {
  background: #fff;
  color: #245aa8;
}

.map-country-point b {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef3fa;
  color: #4d6078;
  font-size: 9px;
  font-weight: 900;
}

.map-country-point.has-buyers,
.map-country-point:hover,
.map-country-point.selected {
  background: #245aa8;
  color: #fff;
}

.map-country-point.has-buyers b,
.map-country-point:hover b,
.map-country-point.selected b {
  background: #fff;
  color: #245aa8;
}

.map-country-point.muted {
  opacity: 0.28;
}

.map-buyer-card {
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.map-buyer-main {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 6px;
}

.map-buyer-main em {
  color: #245aa8;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.map-buyer-main:hover {
  background: #f7faff;
}

.map-buyer-main strong,
.map-buyer-main small,
.map-buyer-main .score {
  overflow-wrap: anywhere;
}

.map-contact-log {
  border-top: 1px solid rgba(48, 105, 169, 0.12);
  background: #f7faff;
}

.map-log-panel {
  display: grid;
  gap: 12px;
}

.map-log-toolbar {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.map-log-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.map-contact-log summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #245aa8;
  font-size: 13px;
  font-weight: 900;
}

.map-log-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.map-log-item {
  border: 1px solid rgba(48, 105, 169, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.map-log-item:hover {
  border-color: #245aa8;
}

.map-log-item strong {
  color: #172033;
  font-size: 13px;
}

.map-log-item span,
.map-log-item small {
  color: #667085;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.world-map {
  border: 0;
  border-radius: 18px;
  min-height: 500px;
  background: #c6def3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.world-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(47, 128, 209, 0.03));
}

.map-continent {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #fff;
  z-index: 4;
}

.map-continent:hover,
.map-continent.selected {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.map-continent span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #2d5f92;
  text-shadow: none;
  box-shadow: none;
}

.map-continent:hover span,
.map-continent.selected span {
  background: #2f80d1;
  color: #fff;
}

.map-continent b {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d62aa;
  box-shadow: none;
}

.country-pin {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 3px solid #fff;
  background: #ffffff;
  box-shadow: none;
}

.country-pin.has-buyers,
.country-pin:hover,
.country-pin.selected {
  background: #2f80d1;
}

.country-pin.has-buyers b,
.country-pin:hover b,
.country-pin.selected b {
  color: #2f80d1;
}

.map-step span,
.map-step b,
.chip,
.pill,
.grade {
  border-radius: 10px;
}

.map-step span,
.map-step b {
  background: rgba(255, 255, 255, 0.68);
  color: #2c5f93;
  font-weight: 800;
}

.map-step button {
  border: 1px solid rgba(48, 105, 169, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #2c5f93;
  min-height: 36px;
  padding: 7px 10px;
  font-weight: 800;
}

.map-step button.selected {
  background: #ffffff;
  border-color: #2f80d1;
  color: #1d62aa;
}

.map-step button b {
  margin-left: 6px;
  background: transparent;
  color: inherit;
  padding: 0;
  min-height: auto;
}

.map-step b {
  background: #ffffff;
  color: #236fbf;
}

.country-popup {
  top: auto;
  width: 100%;
}

.country-popup .panel-head p {
  color: #76869d;
  font-weight: 700;
}

.table-panel table {
  background: #fff;
}

th {
  color: #7d8da5;
}

td {
  color: #24324a;
}

.lane {
  background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  nav {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  nav button {
    flex: 1 1 160px;
  }

  main {
    padding: 34px 18px 56px;
  }

  h1 {
    font-size: 34px;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-step {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .world-map {
    min-height: 320px;
  }
}

.calendar-panel {
  margin-top: 16px;
}

.calendar-panel .panel-head p,
.helper {
  margin: 4px 0 0;
  color: #6f7f96;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(240px, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
}

.calendar-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.calendar-ok {
  background: #e7f8ef;
  color: #16734a;
}

.calendar-error {
  background: #fff1f2;
  color: #be123c;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-actions {
    flex-wrap: wrap;
  }
}

/* =========================================================
   테마 리프레시: 화이트·그레이 위주 + 하늘색 포인트
   (조잡한 풀블루 배경을 차분한 라이트 톤으로 교체)
   ========================================================= */
:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #1f2733;
  --muted: #76828f;
  --line: #e4e8ee;
  --primary: #4aa6e8;        /* 하늘색 포인트 */
  --primary-dark: #2f8fd6;
  --sky-soft: #eaf4fc;       /* 아주 옅은 하늘색 배경 */
  --sky-line: #cfe5f7;
  --radius: 16px;
}

html,
body {
  overflow-x: hidden;
}

body {
  background: linear-gradient(180deg, #fafbfc 0%, #eef2f6 100%);
  color: var(--ink);
}

/* 상단 바: 파란 글래스 → 화이트 */
.sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 2px 16px rgba(31, 41, 55, 0.05);
  backdrop-filter: blur(12px);
}

.brand-mark {
  background: var(--sky-soft);
  color: var(--primary-dark);
  box-shadow: none;
}

.brand strong {
  color: var(--ink);
}

.brand small {
  color: var(--muted);
}

nav button {
  color: #51606e;
}

nav button.active,
nav button:hover {
  color: var(--primary-dark);
  background: var(--sky-soft);
}

.sidebar .primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(74, 166, 232, 0.28);
}

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

/* 제목: 흰 글씨 → 진한 잉크 */
h1 {
  color: var(--ink);
  text-shadow: none;
}

.page-title p {
  color: var(--muted);
}

/* 카드/패널: 옅은 그레이 라인 + 부드러운 그림자 */
.stat,
.panel,
.quadrant,
.lane,
.buyer-card,
.follow-row {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(31, 41, 55, 0.05);
}

.stat strong {
  color: var(--primary-dark);
}

.stat.alert {
  border-color: #f6d8b8;
  background: #fff8f0;
}

/* 툴바: 파란 글래스 → 화이트 */
.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: none;
}

/* 업로드 영역: 옅은 하늘색 */
.dropzone {
  background: var(--sky-soft);
  border: 1.5px dashed var(--sky-line);
  color: var(--primary-dark);
  box-shadow: none;
}

.dropzone strong {
  color: var(--primary-dark);
}

.dropzone span {
  color: var(--muted);
}

.dropzone.dragging {
  background: #dcecfb;
  border-color: var(--primary);
}

/* 지도: 파란 바다 → 옅은 그레이 */
.world-map,
.clickable-map {
  background: #eef2f6;
}

.world-map {
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.04);
}

.continent-label {
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08);
}

.continent-label:hover,
.continent-label.selected {
  background: var(--primary);
  color: #fff;
}

.map-country-point {
  color: var(--primary-dark);
}

.map-country-point.has-buyers,
.map-country-point:hover,
.map-country-point.selected,
.detail-country-point:hover,
.detail-country-point.selected,
.detail-country-point.has-buyers {
  background: var(--primary);
  color: #fff;
}

.map-step button.selected {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* =========================================================
   반응형: 태블릿·모바일에서 국가별 바이어 지도 잘림 해결
   ========================================================= */
@media (max-width: 720px) {
  main {
    padding: 26px 14px 48px;
  }

  h1 {
    font-size: 28px;
  }

  .page-title p {
    font-size: 15px;
  }

  /* 지도 줌(확대 transform)이 컨테이너 밖으로 나가 잘리던 문제:
     모바일에서는 전체 지도를 그대로 보여주고 핀은 제 위치에 표시 */
  .clickable-map {
    min-height: 260px;
    max-height: 420px;
    aspect-ratio: 4 / 3;
  }

  .map-canvas.focus-map {
    transform: none;
    inset: 12px;
  }

  .focus-map .map-country-point {
    transform: translate(-50%, -50%) scale(0.85);
  }

  /* 지도 위에 떠서 잘리던 국가 모달 → 지도 아래로 흐르게 */
  .country-modal {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 12px;
    box-shadow: none;
  }

  .map-stage-head {
    flex-wrap: wrap;
  }

  .map-step {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .country-picker {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .detail-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  main {
    padding: 22px 12px 44px;
  }

  nav button {
    flex: 1 1 120px;
    padding: 9px 10px;
  }

  .stat {
    min-height: auto;
    padding: 16px;
  }

  .stat strong {
    font-size: 32px;
  }

  .map-step {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .country-picker {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── 로그인 / 회원가입 화면 ───────────────────────────── */
#app.auth-mode {
  display: block;
  min-height: 100vh;
  background: var(--nav);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand strong {
  display: block;
  font-size: 18px;
}

.auth-brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tabs button {
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
}

.auth-tabs button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-weight: 400;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.auth-form .wide {
  width: 100%;
  margin-top: 4px;
}

.auth-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.auth-hint {
  margin: -2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-error {
  margin: 0;
  font-size: 13px;
  color: var(--red);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 9px 11px;
}

/* ── 사이드바 사용자 박스 ─────────────────────────────── */
.user-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--nav-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.user-meta strong {
  display: block;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta small {
  display: block;
  color: #b9c1cf;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-box .ghost {
  flex-shrink: 0;
  background: #eef2f7;
  border-color: transparent;
  color: var(--nav);
  font-weight: 600;
  padding: 8px 14px;
  min-height: 0;
}

.user-box .ghost:hover {
  background: #fff;
  color: var(--primary-dark);
}

/* ── 활동 로그 ────────────────────────────────────────── */
.activity-feed {
  display: grid;
  gap: 2px;
}

.activity-row {
  display: grid;
  grid-template-columns: 140px 110px 1fr;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row time {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.activity-user {
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-action {
  color: var(--ink);
}

@media (max-width: 640px) {
  .activity-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ── 가입 인증코드 단계 ───────────────────────────────── */
.auth-note {
  margin: 0;
  font-size: 13px;
  color: var(--primary-dark);
  background: #e6f7f4;
  border: 1px solid #b6e3da;
  border-radius: var(--radius);
  padding: 9px 11px;
}

.auth-subactions {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.linklike {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  padding: 4px;
  text-decoration: underline;
}

.linklike:hover {
  color: var(--primary-dark);
}

/* =========================================================
   Clean pass — 톤·간격·그림자 통일 (마지막 레이어, 우선 적용)
   ========================================================= */
:root {
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.05);
  --shadow: 0 6px 18px rgba(31, 41, 55, 0.06);
  --nav: #f6f9fc; /* 인증화면 등 잔여 참조용 라이트 톤 */
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 카드/패널: 과한 그림자 → 은은하게 통일 */
.stat,
.panel,
.quadrant,
.lane,
.buyer-card,
.follow-row {
  box-shadow: var(--shadow);
}

/* 상호작용 요소 전환 효과 통일 */
.primary,
.ghost,
.danger,
.file-btn,
input,
select,
textarea,
nav button,
.buyer-card,
.follow-row {
  transition: background-color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

/* 입력 포커스 링 — 일관된 하늘색 */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 166, 232, 0.18);
}

/* 기본 버튼: 평소엔 평평하게, 호버에만 살짝 떠오르게 */
.primary {
  box-shadow: none;
}

.primary:hover {
  box-shadow: 0 4px 14px rgba(74, 166, 232, 0.32);
}

/* ── 이메일 템플릿 카드 ──────────────────────────────── */
.template-list {
  gap: 16px;
}

.template-card {
  display: grid;
  gap: 12px;
}

.template-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.template-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.template-card-title h2 {
  margin: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.seq-badge {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
}

.seq-badge.seq-util {
  background: var(--sky-soft);
  color: var(--primary-dark);
}

.template-subject {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: var(--sky-soft);
  border-radius: 10px;
}

.template-subject span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.template-subject strong {
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.template-card pre {
  margin: 0;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  color: #33404f;
}

/* ── 로그인/회원가입 화면: 잔여 글래스 톤 → 깔끔한 라이트 ── */
#app.auth-mode {
  background: linear-gradient(180deg, #eef4fb 0%, #dfeaf6 100%);
}

.auth-card {
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(31, 41, 55, 0.12);
}

/* ── 미평가 상태 표시 ─────────────────────────────────── */
.grade-NA {
  background: #eef1f5;
  color: #8a94a6;
  font-weight: 700;
}

.scorebox.unrated {
  align-items: center;
  gap: 12px;
}

.scorebox.unrated .grade-NA {
  font-size: 16px;
  padding: 6px 14px;
}

.scorebox.unrated span {
  font-size: 13px;
  color: var(--muted);
}

/* 매트릭스: "미평가" 칸은 가로 전체 + 카운트 배지 */
.quadrant.full {
  grid-column: 1 / -1;
}

.quadrant h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

/* ── 바이어 상세: 회사 정보 패널(누가봐도 알게) ──────── */
.buyer-overview {
  margin-top: 16px;
}

.overview-text {
  margin: 0;
  line-height: 1.75;
  color: #33404f;
  font-size: 15px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.overview-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: var(--sky-soft);
  border-radius: 10px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

/* ── 상단 바 레이아웃: 브랜드 | 네비(중앙) | 우측 액션 ── */
.sidebar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
}

/* 브랜드: 로고 마크 제거, 클릭하면 홈(대시보드)로 */
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.brand:hover {
  background: var(--sky-soft);
}

.brand strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

/* 우측 액션 묶음: 신규 바이어 버튼 + 사용자 박스 */
.sidebar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.sidebar-right .primary {
  white-space: nowrap;
}

/* 사용자 박스: 흐릿함 제거, 선명한 라이트 톤 */
.user-box {
  margin: 0;
  padding: 0 0 0 14px;
  border-top: 0;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta {
  text-align: right;
  min-width: 0;
}

.user-meta strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-meta small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-box .ghost {
  flex-shrink: 0;
  padding: 8px 14px;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  color: #51606e;
  font-weight: 700;
}

.user-box .ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--sky-soft);
}

@media (max-width: 860px) {
  .sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sidebar-right {
    justify-self: stretch;
    justify-content: space-between;
  }

  .user-meta strong,
  .user-meta small {
    max-width: 130px;
  }
}
