html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  height: 100%;
  overflow: hidden;
}

.cursor-pointer {
  cursor: pointer;
}

svg.main_svg {
  width: 100%;
  height: 100%;
  background-color: var(--canvas-bg);
  color: var(--canvas-bg);
}

svg.main_svg text {
  fill: currentColor;
}

/* Card colour CSS variables (overridden by settingsService) */
:root {
  --canvas-bg:           #1f2137;
  --card-color-male:     lightblue;
  --card-color-female:   lightpink;
  --card-color-other:    lightgray;
  --card-text-living:    #4f4039;
  --card-text-deceased:  #a0948e;
  --card-text-size:      1;
  /* Link type CSS vars */
  --link-spouse-width:   3px;
  --link-spouse-dash:    none;
  --link-parent-width:   1.5px;
  --link-parent-dash:    none;
  --link-ex-width:       1.5px;
  --link-ex-dash:        6,4;
  --link-single-width:   1.5px;
  --link-single-dash:    6,4;
}

rect.card-female, .card-female .card-body-rect, .card-female .text-overflow-mask {
  fill: var(--card-color-female);
}
rect.card-male, .card-male .card-body-rect, .card-male .text-overflow-mask {
  fill: var(--card-color-male);
}
.card-genderless .card-body-rect, .card-genderless .text-overflow-mask {
  fill: var(--card-color-other);
}

.card_add .card-body-rect {
  fill: var(--canvas-bg);
  stroke-width: 4px;
  stroke: #fff;
  cursor: pointer;
}

g.card_add text {
  fill: #fff;
}

.card-main {
  stroke: #000;
}

/* Pending suggestion cards — orange dashed outline */
.card-pending .card-outline {
  stroke: #e67e22 !important;
  stroke-width: 3px;
  stroke-dasharray: 6,3;
}
/* Pending delete — red dashed outline + faded */
.card-pending-delete .card-outline {
  stroke: #e74c3c !important;
  stroke-width: 3px;
  stroke-dasharray: 6,3;
}
.card-pending-delete .card-body-rect,
.card-pending-delete .text-overflow-mask {
  opacity: 0.5;
}

/* Deceased cards — lighter, desaturated background + gray text */
.card-deceased .card-body-rect,
.card-deceased .text-overflow-mask {
  filter: saturate(0.2) brightness(1.25);
}
svg.main_svg .card-deceased text {
  fill: #7a7a7a !important;
}


/* card_family_tree element */
.card_family_tree rect {
  transition: .3s;
}
.card_family_tree:hover rect {
  transform: scale(1.1);
}

/* card_family_tree element */
.card_add_relative {
  cursor: pointer;
  color: #fff;
  transition: .3s;
}
.card_add_relative circle {
  fill: rgba(0,0,0,0);
}
.card_add_relative:hover {
  color: black;
}

/* pencil_icon element */
.card_edit.pencil_icon {
  color: #fff;
  transition: .3s;
}
.card_edit.pencil_icon:hover {
  color: black;
}

/* link element */
.card_break_link, .link_upper, .link_lower, .link_particles {
  transform-origin: 50% 50%;
  transition: 1s;
}
.card_break_link {
  color: #fff;
}
.card_break_link.closed .link_upper {
  transform: translate(-140.5px,655.6px);
}
.card_break_link.closed .link_upper g {
  transform: rotate(-58deg);
}
.card_break_link.closed .link_particles {
  transform: scale(0);
}

/* create-tree styles */
.input-field input {
  height: 2.5rem!important;
}
.input-field>label:not(.label-icon).active {
  -webkit-transform: translateY(-8px) scale(0.8);
  transform: translateY(-8px) scale(0.8);
}

/* ─────────────────────────────────────────────
   Main canvas layout
───────────────────────────────────────────── */
#mainCanvas {
  position: fixed;
  left: 280px;
  right: 0;
  top: 0;
  bottom: 0;
}

#FamilyChart {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zoom-controls button {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-controls button:hover {
  background-color: #e0e0e0;
}

.zoom-controls button#zoom-reset svg {
  vertical-align: middle;
}

/* ─────────────────────────────────────────────
   Language selector (legacy, kept for compatibility)
───────────────────────────────────────────── */
.language-selector {
  display: none;
}

/* ─────────────────────────────────────────────
   Context menu
───────────────────────────────────────────── */
.context-menu {
  position: absolute;
  background: #2c3e50;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  padding: 6px 0;
  z-index: 1100;
  min-width: 210px;
  border-radius: 10px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  list-style: none;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  transition: background .1s;
  white-space: nowrap;
}
.context-menu-item .cm-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .75;
}
.context-menu-item:hover  { background: rgba(255,255,255,0.1); }
.context-menu-item:active { background: rgba(255,255,255,0.16); }
.context-menu-item.delete {
  color: #ff7675;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
  padding-top: 10px;
}
.context-menu-item.delete:hover { background: rgba(231,76,60,.2); }

/* ─────────────────────────────────────────────
   Person Modal  (pm-*)
───────────────────────────────────────────── */
.pm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pm-overlay[style*="flex"] { display: flex; }

.pm-dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  overflow: hidden;
}

/* Header */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #2c3e50;
  flex-shrink: 0;
}
.pm-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 36px);
}
.pm-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.pm-close:hover { color: #fff; }

/* Tabs */
.pm-tabs {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  padding: 0 20px;
  background: #f8f9fa;
  flex-shrink: 0;
  gap: 4px;
}
.pm-tab {
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.pm-tab:hover { color: #2c3e50; }
.pm-tab.active { color: #2c3e50; border-bottom-color: #2c3e50; }

/* Body / panes */
.pm-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.pm-pane { display: none; }
.pm-pane.active { display: block; }

/* Form layout */
.pm-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.pm-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.pm-field label {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pm-field input[type="text"],
.pm-field input[type="email"],
.pm-field input[type="tel"],
.pm-field input[type="url"],
.pm-field textarea {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
  resize: vertical;
}
.pm-field input:focus,
.pm-field textarea:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 2px rgba(44,62,80,.12);
}

/* Radio row */
.pm-radio-row { display: flex; gap: 16px; margin-top: 6px; }
.pm-radio {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: #212529;
}
.pm-radio input { cursor: pointer; }

/* Checkbox */
.pm-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  color: #212529;
}

/* Picture upload */
.pm-picture-area {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 4px;
}
.pm-picture-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 2px dashed #ced4da;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f8f9fa;
}
.pm-picture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-picture-ph { font-size: 28px; color: #adb5bd; }
.pm-picture-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pm-file-btn {
  display: inline-block;
  padding: 7px 14px;
  background: #f0f0f0;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: background .15s;
}
.pm-file-btn:hover { background: #e0e0e0; }

/* Footer */
.pm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
}
.pm-btn-cancel {
  background: #fff;
  border: 1px solid #ced4da;
  color: #495057;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.pm-btn-cancel:hover { background: #f0f0f0; }
.pm-btn-save {
  background: #2c3e50;
  border: none;
  color: #fff;
  padding: 9px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.pm-btn-save:hover { background: #1a252f; }
.pm-btn-save:disabled { background: #95a5a6; cursor: not-allowed; }

/* View modal specific */
.vm-picture-row {
  text-align: center;
  margin-bottom: 16px;
}
.vm-picture-row img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #e9ecef;
}
.vm-fields { display: flex; flex-direction: column; gap: 10px; }
.vm-row {
  display: flex;
  gap: 8px;
  font-size: 14px;
  align-items: baseline;
}
.vm-label {
  font-size: 11px;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: .05em;
  min-width: 130px;
  flex-shrink: 0;
}
.vm-value { color: #212529; }

/* Stats modal table */
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table tr { border-bottom: 1px solid #e9ecef; }
.stats-table tr:last-child { border-bottom: none; }
.stats-table td { padding: 10px 8px; font-size: 14px; }
.stats-label { color: #6c757d; font-weight: 600; white-space: nowrap; }
.stats-value { color: #212529; font-size: 18px; font-weight: 700; text-align: right; }
.stats-age { color: #495057; font-size: 13px; padding-top: 14px; text-align: center; }

@media (max-width: 480px) {
  .pm-row2 { grid-template-columns: 1fr; }
  .pm-dialog { max-height: 100vh; border-radius: 0; }
}

/* ─────────────────────────────────────────────
   Options button (inside #mainCanvas, absolute positioned)
───────────────────────────────────────────── */
.options-btn {
  position: absolute;
  bottom: 60px;
  left: 16px;
  z-index: 900;
  background: rgba(44,62,80,.9);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  transition: background .15s;
}
.options-btn:hover, .options-btn.active { background: #1a252f; }

/* ─────────────────────────────────────────────
   Options panel (slide up from bottom-left of main canvas)
───────────────────────────────────────────── */
.options-panel {
  position: fixed;
  bottom: 100px;
  left: calc(280px + 16px);
  z-index: 950;
  width: 320px;
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s, opacity .2s;
}
.options-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.options-panel-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.options-panel-close:hover { color: #fff; }

.opt-tabs {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  padding: 0 12px;
  background: #f8f9fa;
  flex-shrink: 0;
}
.opt-tab {
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.opt-tab:hover { color: #2c3e50; }
.opt-tab.active { color: #2c3e50; border-bottom-color: #2c3e50; }

.options-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.opt-pane { display: none; }
.opt-pane.active { display: block; }

.opt-group { margin-bottom: 14px; }
.opt-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6c757d;
  margin-bottom: 6px;
}
.opt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #212529;
  margin-bottom: 4px;
  cursor: pointer;
}
.opt-check input { cursor: pointer; }

.opt-color-row, .opt-range-row, .opt-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.opt-color-row span, .opt-range-row span, .opt-select-row span {
  flex: 1;
  min-width: 100px;
  font-weight: 500;
  color: #495057;
}
.opt-color-row input[type="color"] { width: 36px; height: 28px; border: 1px solid #ced4da; border-radius: 4px; padding: 2px; cursor: pointer; }
.opt-range-row input[type="range"] { flex: 1; }
.opt-val { min-width: 28px; font-size: 12px; color: #6c757d; text-align: right; }
.opt-select-row select { flex: 1; padding: 5px 8px; border: 1px solid #ced4da; border-radius: 4px; font-size: 13px; }
.opt-reset-btn {
  background: #f0f0f0;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #495057;
  white-space: nowrap;
}
.opt-reset-btn:hover { background: #e0e0e0; }
.opt-reset-all-row { margin-top: 12px; border-top: 1px solid #e9ecef; padding-top: 12px; }
.opt-reset-all-btn {
  width: 100%;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.opt-reset-all-btn:hover { background: #c0392b; }

/* ─────────────────────────────────────────────
   Relation picker person list
───────────────────────────────────────────── */
.relation-person-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.relation-person-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  color: #212529;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  transition: background .1s;
}
.relation-person-item:hover { background: #e9ecef; }

/* ─────────────────────────────────────────────
   Relation result toast
───────────────────────────────────────────── */
.relation-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: #2c3e50;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  transition: transform .3s;
  max-width: 420px;
  text-align: center;
}
.relation-toast.show { transform: translateX(-50%) translateY(0); }
.relation-toast button {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.relation-toast button:hover { color: #fff; }

/* Card Hover Tooltip */
#card-tooltip {
  position: fixed;
  background: rgba(30, 40, 50, 0.92);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
  z-index: 1000;
  max-width: 220px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  display: none;
}
#card-tooltip .tooltip-name {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
}
#card-tooltip .tooltip-row {
  font-size: 12px;
  margin-top: 3px;
  color: #ddd;
}
#card-tooltip .tooltip-label {
  color: #aaa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────
   My Account Modal
───────────────────────────────────────────── */
.account-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
}
.account-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #2c3e50;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.account-username { font-weight: 700; font-size: 15px; color: #2c3e50; }
.account-joined   { font-size: 12px; color: #7f8c8d; margin-top: 2px; }
.account-msg {
  font-size: 12px;
  padding: 4px 0;
  min-height: 18px;
}
.account-msg.ok  { color: #27ae60; }
.account-msg.err { color: #e74c3c; }

/* ─────────────────────────────────────────────
   Link type styling
───────────────────────────────────────────── */
path.link         { stroke: #fff; }
path.link-spouse  { stroke-width: var(--link-spouse-width); stroke-dasharray: var(--link-spouse-dash); }
path.link-parent  { stroke-width: var(--link-parent-width); stroke-dasharray: var(--link-parent-dash); }
path.link-ex      { stroke-width: var(--link-ex-width);     stroke-dasharray: var(--link-ex-dash); }
path.link-single  { stroke-width: var(--link-single-width); stroke-dasharray: var(--link-single-dash); }

/* ─────────────────────────────────────────────
   Sidebar
───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #2c3e50;
  color: white;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ─────────────────────────────────────────────
   Tree Stats Card
───────────────────────────────────────────── */
.tree-stats-card {
  margin: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px;
  flex-shrink: 0;
}
.tree-stats-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}
.tree-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-item {
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 3px;
}
.stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sidebar-logo {
  padding: 20px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-nav-btn {
  width: 100%;
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: none;
  padding: 12px 20px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.sidebar-nav-btn:hover { background: rgba(255,255,255,0.1); }

#sidebarPersonPanel {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.sb-person-placeholder {
  padding: 20px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  text-align: center;
  margin-top: 40px;
}

.sb-person-header {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sb-person-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sb-person-name {
  font-weight: 600;
  font-size: 14px;
  color: white;
}

.sb-person-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.sb-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.sb-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  padding: 8px 4px;
  font-size: 11px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.sb-tab.active { color: white; border-bottom-color: white; }

.sb-pane {
  display: none;
  padding: 12px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}
.sb-pane.active { display: block; }

.sb-field-row { margin-bottom: 8px; }

.sb-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 2px;
}

.sb-value {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.sb-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 16px 0;
}

.sb-partner-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}

.sb-partner-name {
  font-weight: 600;
  font-size: 13px;
  color: white;
  margin-bottom: 6px;
}

.sb-partner-type,
.sb-partner-date {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
}

.sb-save-partner-btn {
  margin-top: 8px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.sb-save-partner-btn:hover { background: rgba(255,255,255,0.25); }

/* ─────────────────────────────────────────────
   Language selector in sidebar
───────────────────────────────────────────── */
.sidebar-lang {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.sidebar-lang select {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  width: 100%;
}

/* ── Share & Suggestions ─────────────────────────────────────── */
.sidebar-nav-share { color: #f1c40f !important; font-weight: 600 !important; }
.suggestions-badge {
  display: inline-block; background: #e74c3c; color: #fff;
  border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 6px;
}

/* Share modal */
.share-create-section { margin-bottom: 16px; }
.share-mode-select, .share-label-input {
  padding: 8px 10px; border: 1px solid #ced4da; border-radius: 6px; font-size: 13px;
}
.share-mode-select { flex-shrink: 0; }
.share-label-input { flex: 1; }

.share-list { display: flex; flex-direction: column; gap: 10px; }
.share-item {
  border: 1px solid #e9ecef; border-radius: 8px; padding: 12px;
  background: #f8f9fa;
}
.share-item-inactive { opacity: .55; }
.share-item-info { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.share-item-mode { font-weight: 700; font-size: 13px; }
.share-item-mode.suggest { color: #e67e22; }
.share-item-mode.readonly { color: #2980b9; }
.share-item-label { color: #495057; }
.share-item-date { color: #aaa; margin-left: auto; }
.share-item-url { display: flex; gap: 8px; margin-bottom: 8px; }
.share-url-input {
  flex: 1; padding: 6px 10px; border: 1px solid #ced4da; border-radius: 4px;
  font-size: 12px; background: #fff; color: #495057; cursor: pointer;
}
.share-copy-btn, .share-toggle-btn, .share-delete-btn {
  padding: 5px 10px; border-radius: 4px; border: 1px solid #ced4da;
  font-size: 12px; cursor: pointer; background: #fff; white-space: nowrap;
}
.share-delete-btn  { color: #e74c3c; border-color: #e74c3c; }
.share-toggle-btn:hover { background: #e9ecef; }
.share-delete-btn:hover { background: #fdecea; }
.share-item-actions { display: flex; gap: 8px; }

/* Suggestions review */
.sug-card {
  border: 1px solid #e9ecef; border-radius: 8px; padding: 14px; margin-bottom: 10px;
  background: #fff;
}
.sug-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 14px; }
.sug-type { color: #2c3e50; }
.sug-type.add { color: #27ae60; }
.sug-type.edit { color: #2980b9; }
.sug-type.delete { color: #e74c3c; }
.sug-status { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.sug-meta { font-size: 12px; color: #7f8c8d; margin-bottom: 6px; }
.sug-diff { background: #f8f9fa; border-radius: 4px; padding: 8px; margin: 8px 0; }
.sug-diff-row { font-size: 12px; margin-bottom: 3px; }
.sug-field { font-weight: 600; color: #495057; }
.sug-old { color: #e74c3c; text-decoration: line-through; }
.sug-new { color: #27ae60; font-weight: 600; }
.sug-actions { display: flex; gap: 8px; margin-top: 10px; }
.sug-approve-btn { background: #27ae60; color: #fff; border: none; border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sug-reject-btn  { background: #e74c3c; color: #fff; border: none; border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sug-approve-btn:disabled, .sug-reject-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Suggest banner (on share page) */
.suggest-banner {
  position: absolute; top: 0; left: 0; right: 0; z-index: 100;
  background: #e67e22; color: #fff; text-align: center;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
}
