/* HF-flavored styles — Source Sans Pro, Tailwind-ish tokens */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --color-gray-50: oklch(0.985 0.002 247.839);
  --color-gray-100: #f3f4f6;
  --color-gray-150: #eceef1;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-white: #ffffff;
  --color-blue-600: #2563eb;
  --color-red-500: #ef4444;
  --color-green-500: #10b981;
  --color-green-600: #059669;
  --color-orange-400: #fb923c;
  --color-yellow-400: #facc15;
  --color-orange-500: #f97316;
}

* { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }

html, body {
  font-family: "Source Sans Pro", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-gray-900);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { background: none; font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
svg { display: inline-block; vertical-align: middle; }
hr { border: 0; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1536px; margin: 0 auto; padding: 0 16px; }

/* ---------- top nav ---------- */
.site-header { border-bottom: 1px solid var(--color-gray-100); background: #fff; position: sticky; top: 0; z-index: 30; }
.site-header-row { display: flex; align-items: center; height: 64px; gap: 0; }
.logo { display: flex; align-items: center; gap: 8px; margin-right: 24px; flex: none; }
.logo img { width: 28px; height: 28px; }
.logo-text { font-weight: 700; font-size: 18px; white-space: nowrap; }

.search {
  position: relative; flex: 1; max-width: 384px; margin-right: 24px;
}
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px; font-size: 14px;
  background: var(--color-gray-50); border: 1px solid var(--color-gray-200); border-radius: 8px;
  color: var(--color-gray-900); outline: none; transition: box-shadow 120ms, border-color 120ms;
}
.search input:focus { border-color: var(--color-gray-400); box-shadow: 0 12px 24px -10px rgba(0,0,0,.08); background: #fff; }
.search .s-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--color-gray-400); font-size: 16px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; list-style: none; }
.nav-link {
  padding: 6px 10px; border-radius: 8px; font-size: 15px; color: var(--color-gray-700);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nav-link:hover { background: var(--color-gray-100); color: var(--color-gray-900); }
.nav-link.is-active { color: var(--color-gray-900); }

.new-pill {
  display: inline-flex; align-items: center; padding: 1px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: linear-gradient(135deg, #f97316, #f59e0b);
  border-radius: 4px; margin-left: 4px;
}
.nav-sep { width: 1px; height: 20px; background: var(--color-gray-100); margin: 0 8px; }
.nav-avatar { width: 22px; height: 22px; border-radius: 50%; position: relative; }
.nav-avatar::after { content: ''; position: absolute; bottom: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #facc15, #f97316); border: 1.5px solid #fff; }

/* ---------- page header (model page) ---------- */
.page-header {
  background: linear-gradient(to top, var(--color-gray-50) 0%, #fff 50%, #fff 100%);
  border-bottom: 1px solid var(--color-gray-100);
  padding-top: 36px;
}

.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 20px; }
.org-ico { width: 14px; height: 14px; border-radius: 3px; }
.title-author { color: var(--color-gray-400); }
.title-author:hover { color: var(--color-blue-600); }
.title-slash { color: var(--color-gray-300); margin: 0 2px; }
.title-name { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 20px; }
.title-name:hover { color: var(--color-blue-600); }
.title-copy { color: var(--color-gray-600); padding: 4px; border-radius: 6px; font-size: 14px; }
.title-copy:hover { background: var(--color-gray-100); }

.pill-group {
  display: inline-flex; align-items: stretch; height: 24px; overflow: hidden;
  border: 1px solid var(--color-gray-200); border-radius: 6px; background: #fff;
  font-size: 13px; color: var(--color-gray-500); margin-left: 4px;
}
.pill-group button { padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; }
.pill-group button:hover { background: var(--color-gray-50); }
.pill-group .divider { width: 1px; background: var(--color-gray-200); }
.pill-group .heart { color: var(--color-red-500); }
.pill-group .count { color: var(--color-gray-400); }
.pill-group .avatar-s { width: 12px; height: 12px; border-radius: 2px; }

/* ---------- tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; height: 24px;
  background: #fff; border: 1px solid var(--color-gray-200); border-radius: 6px;
  font-size: 13px; color: var(--color-gray-700);
}
.tag:hover { border-color: var(--color-gray-300); background: var(--color-gray-50); }
.tag .ico { color: var(--color-orange-400); }
.tag-license { padding-right: 14px; position: relative; border-radius: 999px 999px 0 999px; }
.tag-license::after {
  content: ''; position: absolute; right: 2px; bottom: 2px;
  width: 0; height: 0; border: 3px solid transparent;
  border-bottom-color: var(--color-gray-200); border-right-color: var(--color-gray-200);
}
.tag-muted { color: var(--color-gray-400); margin-right: -4px; }

/* ---------- tabs + actions row ---------- */
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; height: 48px; align-items: flex-end; gap: 0; margin-bottom: -1px; overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 15px;
  color: var(--color-gray-600); border-bottom: 2px solid transparent; white-space: nowrap; position: relative;
}
.tab:hover { color: var(--color-gray-900); }
.tab.active { color: var(--color-gray-900); border-bottom-color: var(--color-gray-900); font-weight: 600; }
.tab .tab-ico { color: var(--color-gray-400); }
.tab .tab-count {
  margin-left: 4px; padding: 0 7px; min-width: 20px; height: 20px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: var(--color-gray-900); color: #fff; font-weight: 600;
}

.actions { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; height: 32px;
  font-size: 14px; font-weight: 600;
  background: #fff; color: var(--color-gray-900);
  border: 1px solid var(--color-gray-200); border-radius: 8px;
  transition: background 120ms, border-color 120ms, box-shadow 120ms;
  white-space: nowrap;
}
.btn:hover { background: var(--color-gray-50); border-color: var(--color-gray-300); }
.btn .chev { color: var(--color-gray-400); margin-right: -4px; }
.btn.btn-icon { padding: 6px; width: 32px; justify-content: center; }
.btn.btn-primary {
  background: linear-gradient(to bottom, var(--color-gray-800), #000);
  color: #fff; border-color: #000;
}
.btn.btn-primary:hover { background: linear-gradient(to bottom, #000, #000); }
.btn.btn-primary .chev { color: rgba(255,255,255,.55); }
.btn.btn-ghost { border-color: transparent; background: transparent; }
.btn.btn-ghost:hover { background: var(--color-gray-100); }

.btn.btn-copy { position: relative; }
.btn.btn-copy.busy { color: var(--color-gray-500); cursor: progress; }
.btn.btn-copy.done { border-color: #a7f3d0; background: #ecfdf5; color: var(--color-green-600); }
.btn.btn-copy.done:hover { background: #d1fae5; border-color: #6ee7b7; }
.btn.btn-copy .new-badge {
  display: inline-flex; align-items: center; height: 14px; padding: 0 5px; margin-left: 2px;
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; border-radius: 3px;
}

.btn.btn-outlined-blue {
  border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff;
}
.btn.btn-outlined-blue:hover { background: #dbeafe; border-color: #93c5fd; }

.btn.btn-black-sibling {
  background: #000;
  color: #fff; border-color: #000;
  padding: 6px 14px;
  gap: 8px;
}
.btn.btn-black-sibling:hover { background: #1f2937; border-color: #1f2937; }
.btn.btn-black-sibling .chev { color: rgba(255,255,255,.55); }

.arrow-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; line-height: 1;
}

/* progress bar inside button */
.btn-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0%;
  background: var(--color-green-500); transition: width 120ms linear;
}

/* ---------- centered modal (HF "Mount a bucket" style) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fade-in 140ms ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 640px; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.08);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modal-in 180ms cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-100);
}
.modal-title {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; color: var(--color-gray-900);
}
.modal-close {
  padding: 6px; border-radius: 6px; color: var(--color-gray-500);
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--color-gray-100); color: var(--color-gray-900); }

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

/* pill tabs — 2 equal segments, active = white w/ shadow, inactive = transparent */
.pill-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 18px;
}
.pill-tab {
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--color-gray-500);
  background: transparent; border: 1px solid transparent;
  transition: background 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
}
.pill-tab:hover { color: var(--color-gray-800); }
.pill-tab.is-active {
  background: #fff; color: var(--color-gray-900);
  border-color: var(--color-gray-300);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.field { margin-bottom: 16px; }
.field-label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--color-gray-900); margin-bottom: 6px;
}

.text-input {
  width: 100%; height: 40px; padding: 0 12px;
  font-size: 14px; color: var(--color-gray-900);
  background: #fff; border: 1px solid var(--color-gray-200); border-radius: 8px;
  outline: none; transition: border-color 120ms, box-shadow 120ms;
}
.text-input:focus { border-color: var(--color-blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

.search-field { position: relative; }
.search-field .s-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--color-gray-400); font-size: 15px;
}

.prefix-field {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--color-gray-200); border-radius: 8px;
  background: #fff; overflow: hidden;
  transition: border-color 120ms, box-shadow 120ms;
}
.prefix-field:focus-within { border-color: var(--color-blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.prefix-field .prefix {
  display: inline-flex; align-items: center;
  padding: 0 10px 0 12px; background: var(--color-gray-50);
  color: var(--color-gray-500); font-size: 14px;
  border-right: 1px solid var(--color-gray-200);
}
.prefix-field .text-input {
  border: 0; border-radius: 0; height: 40px;
}
.prefix-field .text-input:focus { box-shadow: none; }

/* radios — HF-style blue ring */
.radio-row { display: flex; gap: 24px; padding-top: 2px; }
.radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--color-gray-700); cursor: pointer;
  user-select: none;
}
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio .radio-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--color-gray-300); background: #fff;
  display: inline-grid; place-items: center;
  transition: border-color 120ms, background 120ms;
}
.radio.on { color: var(--color-gray-900); }
.radio.on .radio-dot {
  border-color: var(--color-blue-600);
}
.radio.on .radio-dot::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-blue-600);
}

/* bucket list inside the modal */
.modal-bucket-list {
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--color-gray-200); border-radius: 10px;
  background: #fff;
}
.modal-bucket-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  background: #fff; border: 0; border-bottom: 1px solid var(--color-gray-100);
  text-align: left; cursor: pointer;
  transition: background 100ms;
}
.modal-bucket-row:last-child { border-bottom: 0; }
.modal-bucket-row:hover { background: var(--color-gray-50); }
.modal-bucket-row.is-selected { background: #eff6ff; }
.modal-bucket-row.is-selected:hover { background: #dbeafe; }
.modal-bucket-row.is-in { opacity: .55; cursor: not-allowed; }
.modal-bucket-row.is-in:hover { background: #fff; }

.mb-check { flex: none; }
.checkbox {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--color-gray-300); background: #fff;
  display: grid; place-items: center; color: #fff;
  font-size: 12px;
  transition: border-color 120ms, background 120ms;
}
.checkbox.on { background: var(--color-blue-600); border-color: var(--color-blue-600); }
.checkbox.locked { background: var(--color-gray-300); border-color: var(--color-gray-300); }
.checkbox svg { width: 12px; height: 12px; }

.modal-bucket-row .bucket-main { flex: 1; min-width: 0; }
.modal-bucket-row .bucket-name {
  font-size: 14px; font-weight: 600; color: var(--color-gray-900);
  display: flex; align-items: center; gap: 8px;
}
.modal-bucket-row .bucket-meta {
  font-size: 12px; color: var(--color-gray-500);
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
}
.empty {
  padding: 32px 16px; text-align: center; color: var(--color-gray-500); font-size: 13px;
}

/* warning strip */
.warn-strip {
  padding: 10px 14px; border-radius: 8px;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; font-size: 13px; line-height: 1.5;
  margin-top: 4px;
}

/* footer */
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 18px; border-top: 1px solid var(--color-gray-100);
  background: var(--color-gray-50);
}
.btn-primary-modal {
  background: #000; color: #fff; border-color: #000;
}
.btn-primary-modal:hover { background: #1f2937; border-color: #1f2937; }
.btn-primary-modal:disabled {
  background: var(--color-gray-200); border-color: var(--color-gray-200); color: var(--color-gray-400);
  cursor: not-allowed;
}

/* ---------- popover (used for the "already in N buckets" manage menu) ---------- */
.popover-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; width: 360px;
  background: #fff; border: 1px solid var(--color-gray-200);
  border-radius: 12px; box-shadow: 0 24px 48px -12px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.05);
  z-index: 50; overflow: hidden; animation: pop-in 140ms ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.popover-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--color-gray-100); }
.popover-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.popover-title .new-badge {
  font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700;
  background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; letter-spacing: .04em;
}
.popover-sub { font-size: 12px; color: var(--color-gray-500); margin-top: 4px; line-height: 1.4; }
.popover-search {
  margin: 10px 0 0;
  position: relative;
}
.popover-search input {
  width: 100%; height: 32px; padding: 0 10px 0 30px;
  font-size: 13px; background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200); border-radius: 6px; outline: none;
}
.popover-search input:focus { background: #fff; border-color: var(--color-gray-400); }
.popover-search .s-icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--color-gray-400); font-size: 14px; }

.bucket-list { max-height: 280px; overflow-y: auto; padding: 6px 0; }
.bucket-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  cursor: pointer; width: 100%; text-align: left;
}
.bucket-row:hover { background: var(--color-gray-50); }
.bucket-row.is-selected { background: #eff6ff; }
.bucket-row.is-in { opacity: .6; cursor: default; }
.bucket-row.is-in:hover { background: transparent; }

.bucket-ico {
  width: 32px; height: 32px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--color-gray-100); color: var(--color-gray-600);
  font-size: 14px;
}
.bucket-main { flex: 1; min-width: 0; }
.bucket-name { font-size: 14px; font-weight: 600; color: var(--color-gray-900); display: flex; align-items: center; gap: 6px; }
.bucket-meta { font-size: 12px; color: var(--color-gray-500); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.bucket-meta .dot { width: 2px; height: 2px; border-radius: 50%; background: var(--color-gray-400); }
.bucket-meter { width: 100%; height: 3px; margin-top: 6px; background: var(--color-gray-100); border-radius: 999px; overflow: hidden; }
.bucket-meter > div { height: 100%; background: var(--color-gray-400); border-radius: 999px; }
.bucket-meter.warn > div { background: var(--color-orange-400); }
.bucket-meter.crit > div { background: var(--color-red-500); }
.bucket-check { color: var(--color-green-600); }
.bucket-badge { font-size: 11px; color: var(--color-gray-500); background: var(--color-gray-100); padding: 1px 6px; border-radius: 4px; }

.popover-foot { border-top: 1px solid var(--color-gray-100); padding: 8px; display: flex; gap: 6px; }
.popover-foot .btn { height: 34px; }
.popover-foot .btn.primary { flex: 1; justify-content: center; background: #000; color: #fff; border-color: #000; }
.popover-foot .btn.primary:hover { background: #111; }
.popover-foot .btn.primary:disabled { background: var(--color-gray-300); border-color: var(--color-gray-300); color: var(--color-gray-500); cursor: not-allowed; }

.create-row {
  border-top: 1px solid var(--color-gray-100); padding: 10px 16px;
  display: flex; align-items: center; gap: 10px; color: var(--color-gray-700);
  font-size: 13px; cursor: pointer;
}
.create-row:hover { background: var(--color-gray-50); color: var(--color-gray-900); }
.create-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--color-gray-50); border: 1px dashed var(--color-gray-300); color: var(--color-gray-500); }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; min-width: 300px; max-width: 420px;
  background: #111; color: #fff; border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.35);
  animation: toast-in 180ms ease-out;
  font-size: 14px;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.toast .t-ico { width: 20px; height: 20px; border-radius: 50%; background: var(--color-green-500); color: #000; display: grid; place-items: center; flex: none; }
.toast .t-body { flex: 1; }
.toast .t-action { color: #93c5fd; font-weight: 600; }
.toast .t-action:hover { color: #bfdbfe; }
.toast .t-close { color: var(--color-gray-400); }

/* ---------- body placeholder ---------- */
.body-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 28px 0 80px; }
.placeholder {
  background:
    repeating-linear-gradient(45deg, var(--color-gray-50) 0 8px, #fff 8px 16px);
  border: 1px solid var(--color-gray-200); border-radius: 12px;
  display: grid; place-items: center; color: var(--color-gray-400); font-family: "IBM Plex Mono", monospace;
  font-size: 12px; text-align: center; padding: 24px;
}
.placeholder.tall { min-height: 520px; }
.placeholder.short { min-height: 160px; }

/* ---------- demo helper banner ---------- */
.demo-note {
  border: 1px dashed var(--color-gray-300); background: var(--color-gray-50);
  padding: 10px 14px; border-radius: 8px; font-size: 13px; color: var(--color-gray-600);
  margin: 16px 0 0; display: flex; align-items: center; gap: 10px;
}
.demo-note kbd {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  padding: 1px 6px; border: 1px solid var(--color-gray-300); border-bottom-width: 2px;
  border-radius: 4px; background: #fff; color: var(--color-gray-700);
}

/* in-use state meta chip */
.copy-meta {
  font-size: 11px; font-weight: 600; color: var(--color-green-600);
  background: #d1fae5; padding: 1px 6px; border-radius: 999px; margin-left: 2px;
}

/* dropdown list used for "already in N buckets" */
.mini-list {
  padding: 6px 0; max-height: 260px; overflow-y: auto;
}
.mini-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 13px;
}
.mini-row:hover { background: var(--color-gray-50); }
.mini-row .remove { color: var(--color-gray-400); padding: 2px; border-radius: 4px; }
.mini-row .remove:hover { color: var(--color-red-500); background: #fef2f2; }

/* ---------- modal: source / destination / summary sections ---------- */
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 12px;
}
.section-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-gray-900); color: #fff;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.section-title {
  font-size: 13px; font-weight: 700; color: var(--color-gray-900);
  letter-spacing: .02em; text-transform: uppercase;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted { color: var(--color-gray-500); font-weight: 400; }

.locked-field {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--color-gray-200);
  border-radius: 8px; background: var(--color-gray-50);
  color: var(--color-gray-900);
}
.locked-hint {
  margin-left: auto; color: var(--color-gray-500); font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.ns-avatar { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: var(--color-gray-100); }
.ns-avatar.sm { width: 20px; height: 20px; border-radius: 5px; }

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-gray-500) 50%), linear-gradient(135deg, var(--color-gray-500) 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.helper { font-size: 12px; color: var(--color-gray-500); margin-top: 6px; }
.link {
  background: none; border: 0; padding: 0; color: var(--color-blue-600);
  font-size: 12px; cursor: pointer; text-decoration: underline;
}

/* destination — bucket select list (radio rows) */
.bucket-select-list {
  border: 1px solid var(--color-gray-200); border-radius: 10px;
  background: #fff; max-height: 220px; overflow-y: auto;
}
.bucket-select-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  background: #fff; border: 0; border-bottom: 1px solid var(--color-gray-100);
  text-align: left; cursor: pointer; transition: background 100ms;
}
.bucket-select-row:last-child { border-bottom: 0; }
.bucket-select-row:hover { background: var(--color-gray-50); }
.bucket-select-row.is-selected { background: #eff6ff; }
.bucket-select-row.is-selected:hover { background: #dbeafe; }

.radio-dot-lg {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--color-gray-300); background: #fff;
  flex: none; position: relative;
}
.radio-dot-lg.on { border-color: var(--color-blue-600); }
.radio-dot-lg.on::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--color-blue-600);
}

.bucket-select-row .bucket-main { flex: 1; min-width: 0; }
.bucket-select-row .bucket-name {
  font-size: 13px; font-weight: 600; color: var(--color-gray-900);
  display: flex; align-items: center; gap: 6px;
}
.bucket-select-row .bucket-meta {
  font-size: 11px; color: var(--color-gray-500); margin-top: 2px;
}

.ns-chip {
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 999px; letter-spacing: .04em; text-transform: uppercase;
}
.ns-chip.user { background: #eef2ff; color: #4338ca; }
.ns-chip.org  { background: #ecfeff; color: #0e7490; }

.size-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; color: var(--color-gray-600);
  padding: 3px 8px; border-radius: 999px;
  background: var(--color-gray-100);
}

/* namespace picker (for "new bucket") */
.ns-select {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ns-opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--color-gray-200); background: #fff;
  font-size: 13px; color: var(--color-gray-800); cursor: pointer;
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
}
.ns-opt:hover { border-color: var(--color-gray-300); }
.ns-opt.on {
  border-color: var(--color-blue-600);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

/* visibility toggle (segmented) */
.vis-toggle {
  display: inline-flex; border: 1px solid var(--color-gray-200);
  border-radius: 8px; overflow: hidden; background: #fff;
}
.vis-opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  color: var(--color-gray-600); background: #fff; border: 0;
  cursor: pointer; border-right: 1px solid var(--color-gray-200);
}
.vis-opt:last-child { border-right: 0; }
.vis-opt:hover { color: var(--color-gray-900); }
.vis-opt.on {
  background: var(--color-gray-900); color: #fff;
}

/* summary card */
.summary-card {
  border: 1px solid var(--color-gray-200); border-radius: 10px;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  padding: 14px 16px;
}
.summary-row {
  display: flex; align-items: baseline; gap: 12px;
}
.summary-k {
  font-size: 11px; font-weight: 700; color: var(--color-gray-500);
  text-transform: uppercase; letter-spacing: .06em;
  min-width: 92px;
}
.summary-v {
  font-size: 13px; color: var(--color-gray-900);
  word-break: break-all;
}
.summary-arrow {
  color: var(--color-gray-400); font-size: 14px;
  margin: 4px 0 4px 100px;
}
.summary-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 14px;
  padding-top: 14px; border-top: 1px dashed var(--color-gray-200);
}
.stat { text-align: center; }
.stat-v {
  font-size: 18px; font-weight: 700; color: var(--color-gray-900);
  font-variant-numeric: tabular-nums;
}
.stat-k {
  font-size: 11px; color: var(--color-gray-500);
  text-transform: uppercase; letter-spacing: .04em; margin-top: 2px;
}
