:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f8f9fa;
  --border: #e2e8f0;
  --text: #1a202c;
  --text-muted: #718096;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

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

/* Author rules always beat the UA stylesheet's [hidden]{display:none}
   regardless of specificity — any class below that sets its own `display`
   (.btn, etc.) silently cancels the `hidden` attribute unless this exists.
   Keep this global rather than patching classes one at a time; new classes
   that set `display` would otherwise re-introduce the same bug. */
[hidden] { display: none !important; }

body {
  font-family: var(--font-korean, 'Noto Sans CJK KR', 'NanumGothic', '나눔고딕',
               'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕',
               -apple-system, BlinkMacSystemFont, sans-serif);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.plugin-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}
.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tab-btn:hover { background: var(--surface2); color: var(--text); }
.tab-btn.active { background: var(--primary-light); color: var(--primary-dark); }

.header-right { margin-left: auto; }
.auth-widget { display: flex; align-items: center; gap: 8px; }

/* ── Main ─────────────────────────────────────────── */
.main {
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── Card ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Drop Zone ────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--surface2);
  user-select: none;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.drop-zone.dragover { transform: scale(1.01); }
.drop-icon { font-size: 40px; margin-bottom: 12px; }
.drop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.drop-sub { color: var(--text-muted); font-size: 13px; }

/* Compact variant (explorer plugin) — roughly a third of the default height */
.drop-zone.compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  text-align: left;
}
.drop-zone.compact .drop-icon { font-size: 22px; margin-bottom: 0; }
.drop-zone.compact .drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drop-zone.compact .drop-title { font-size: 14px; margin-bottom: 0; }
.drop-zone.compact .drop-sub { font-size: 11.5px; }

/* ── Progress ─────────────────────────────────────── */
.progress-wrap {
  margin-top: 16px;
  height: 6px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
  display: none;
}
.progress-wrap.visible { display: block; }
.progress-label { margin-top: 4px; font-size: 11.5px; color: var(--text-muted); text-align: right; }
/* Real byte-level progress updates far more often than a few fixed steps —
   a shorter, linear transition avoids the bar visibly lagging behind. */
#explorerProgressBar, #progressBar { transition: width .1s linear; }
.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width .3s;
  width: 0%;
}

/* ── Result Banner ────────────────────────────────── */
.result-banner {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 500;
  align-items: center;
  gap: 12px;
}
.result-banner.visible { display: flex; }
.result-links { display: none; gap: 12px; align-items: center; }
.result-links.active { display: flex; }
.result-banner a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 13px;
}
.result-banner a:hover { background: var(--primary-light); }

/* ── Table ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
/* File Explorer / Ramblr file lists: fixed layout with explicit widths on
   every column except 이름(name) — that one gets whatever's left over and
   shrinks/truncates first, so 크기/일시/동작 never wrap and the row always
   stays one line regardless of window width. Widths set via inline <th
   style> per table (column count/order differs between the two). */
.file-list-table { table-layout: fixed; }
th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface2);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
/* max-width:100% (not a fixed px) — the surrounding <td> is the flexible
   column in a table-layout:fixed row (see .file-list-table), so this just
   fills whatever width that column ends up with and ellipsis-truncates. */
/* Explorer list: the table keeps a minimum width so the 이름 column always
   gets ~190px+ (32 + 80 + 100 + 380 are fixed); on narrow screens the
   .table-wrap scrolls horizontally instead of squeezing the name to nothing. */
.explorer-table { min-width: 800px; }
/* Wide windows: let the action column grow with the table instead of staying
   at 380px, so the name column gets the extra room instead of ellipsis. */
@media (min-width: 1400px) { .explorer-table { min-width: 0; } }
/* List scrolls inside itself, sized to the window (never below 320px), with
   the column headers pinned to the top of the scroll area. */
.explorer-list-wrap { max-height: max(320px, calc(100vh - 200px)); overflow: auto; }
.explorer-list-wrap thead th { position: sticky; top: 0; z-index: 2; }
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover, .sortable-th.sort-active { color: var(--primary-dark); }
.sort-arrow { font-size: 10px; }
.file-name { font-weight: 500; max-width: 100%; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.comment-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.date-cell { white-space: nowrap; color: var(--text-muted); font-size: 12px; }
/* One line per row, always — the name column (see .file-list-table) is the
   one that shrinks/truncates to make room, not the actions. */
.action-cell { display: flex; flex-wrap: nowrap; gap: 4px; overflow: hidden; }
.checkbox-cell { width: 32px; text-align: center; }
.empty-row td { text-align: center; padding: 48px; color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.pw-cell { white-space: nowrap; }
.folder-row { cursor: pointer; }
.folder-row.drop-target td { background: var(--primary-light); }
.path-hint {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
  cursor: pointer;
  width: fit-content;
}
.path-hint:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Search bar ───────────────────────────────────── */
.search-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search-input {
  flex: 1;
  min-width: 180px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--primary); }
.search-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

/* ── Bulk selection actions (card-title) ──────────── */
.bulk-actions { display: none; align-items: center; gap: 6px; flex-wrap: wrap; }
.bulk-actions.active { display: flex; }
#selectedCountLabel { font-size: 12.5px; color: var(--text-muted); margin-right: 2px; white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
/* Toggle buttons (거리재기/자르기/etc.) keep btn-ghost as their base class and
   only ADD btn-primary for the "selected" state — declared after .btn-ghost
   so it wins the cascade tie when both classes are present on one element.
   Before this reordering, .btn-ghost's later declaration silently cancelled
   the selected color and the "selected" indicator never appeared. */
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: transparent; color: var(--danger); border-color: #fca5a5; }
.btn-danger:hover { background: var(--danger-light); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled, .btn.btn-disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 16px;
  border-radius: 4px;
}
.btn-icon:hover { background: var(--surface2); }

/* ── Form ─────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  background: var(--surface);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn .15s;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: calc(var(--radius)*1.5);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: slideUp .2s;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.modal-body { padding: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.error-msg { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* ── MD file viewer/editor modal (GitLab-style file header + toolbar) ─── */
.modal-lg { max-width: 900px; height: 82vh; display: flex; flex-direction: column; }
.modal-lg.maximized { max-width: 100vw; width: 100vw; height: 100vh; border-radius: 0; }
.file-title-flex-parent { gap: 12px; }
.file-title-flex-parent h3 {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px;
}
.file-title-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.modal-lg .modal-body {
  flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column;
}
.md-view-frame, .md-view-editor {
  flex: 1; width: 100%; border: none; min-height: 0;
}
.md-view-editor {
  padding: 16px 20px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.modal-lg .modal-actions { margin: 0; padding: 12px 20px; border-top: 1px solid var(--border); }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* ── File Explorer ────────────────────────────────── */
.explorer-layout {
  display: grid;
  /* Tree column scales with the window (220px–360px) instead of a fixed 260px. */
  grid-template-columns: clamp(220px, 22vw, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .explorer-layout { grid-template-columns: 1fr; }
  .main { padding: 16px 12px; }
  .card { padding: 16px 12px; }
}
/* Wide screens: tree stays in view while the list scrolls. */
@media (min-width: 721px) {
  .explorer-tree-card { position: sticky; top: 72px; }
}
/* min-width:0 overrides the grid item's default min-width:auto — without it,
   this column refuses to shrink below its content's natural width (a wide
   table row) and the whole page grows a horizontal scrollbar instead of the
   content adapting to the viewport. */
.explorer-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Height follows the window (viewport minus header/title chrome) rather than a
   fixed 520px; shorter on phones where the tree sits above the list. */
.tree-view { max-height: calc(100vh - 220px); min-height: 160px; overflow-y: auto; }
@media (max-width: 720px) {
  .tree-view { max-height: 40vh; }
}
.tree-node {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.tree-node:hover { background: var(--surface2); }
.tree-node.selected { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.drop-target { outline: 2px dashed var(--primary); background: var(--primary-light); }
.tree-empty { padding: 24px 8px; text-align: center; color: var(--text-muted); font-size: 13px; }
.tree-toggle, .tree-toggle-spacer {
  width: 14px;
  flex: none;
  display: inline-block;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}
.tree-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
  flex: none;
  min-width: 18px;
  text-align: right;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 0 2px;
}
.tree-actions { display: none; gap: 2px; flex: none; }
.tree-node:hover .tree-actions { display: flex; }
.tree-actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.tree-actions button:hover { background: var(--surface); }

/* ── Ramblr ───────────────────────────────────────── */
.ramblr-fetch-bar { display: flex; gap: 8px; }
.ramblr-fetch-bar .search-input { flex: 1; }
/* 기본은 정사각형(JS에서 폭 기준으로 높이를 맞춤), resize 핸들(우측 하단)로
   가로/세로 모두 드래그 조절 가능. overflow:auto는 resize 핸들이 동작하기
   위한 요건(카카오맵 자체는 내부에서 스크롤하지 않음). width:100%는 최초
   렌더링(JS가 폭을 읽어 height/width를 인라인 px로 고정하기 전)에만 쓰인다 —
   이후엔 JS가 설정한 고정 px 값이 이 규칙을 덮어써서 resize:both와
   충돌하지 않는다. */
.ramblr-map { width: 100%; border-radius: var(--radius); overflow: auto; resize: both; }
/* Wraps just the map div (not the whole card) so the filename badge below
   can be positioned relative to the map itself — placing it on #ramblrMapCard
   instead would collide with the title bar's buttons at the top.
   inline-block로 지도의 실제(리사이즈된) 크기에 맞춰 감싸져야 배지가 지도
   가장자리에 계속 붙어있는다 — block이면 가로 리사이즈로 지도가 좁아져도
   래퍼는 카드 전체 너비를 유지해 배지가 지도에서 떨어져 보이게 된다. */
.ramblr-map-wrap { position: relative; display: inline-block; }
.ramblr-map-filename {
  position: absolute; top: 12px; left: 12px; z-index: 20;
  background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  pointer-events: none;
}
/* bottom-center — top-right collided with Kakao's 지도/위성 map-type control,
   bottom-right collided with the elevation graph panel. */
.ramblr-map-summary {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  white-space: nowrap; pointer-events: none;
}
/* Anchors the draggable speed/altitude graph panel (kakao-elevation-graph.js)
   to the map card instead of the whole page. display:flex/flex-direction
   here (not just under :fullscreen below) is required, not cosmetic —
   .ramblr-map-wrap is display:inline-block with a width:100% child
   (.ramblr-map), which only resolves to a real pixel width when the wrap is
   itself stretched by a flex parent (flex items default to align-items:
   stretch). Without this, the wrap shrink-wraps to its (still-empty) content
   and collapses to 0, so _initMap()'s very first getBoundingClientRect()
   read comes back 0 and gets locked in as an inline width/height — the map
   div then never has any pixels to draw into, even though kakao.maps.Map()
   itself initializes fine. /edit-map and the file-explorer share-map page
   already apply this unconditionally on their equivalent #mapCard and don't
   hit this. */
#ramblrMapCard { position: relative; display: flex; flex-direction: column; }
#ramblrMapCard:fullscreen,
#ramblrMapCard:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 16px;
  border-radius: 0;
}
#ramblrMapCard:fullscreen .ramblr-map-wrap,
#ramblrMapCard:-webkit-full-screen .ramblr-map-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#ramblrMapCard:fullscreen .ramblr-map,
#ramblrMapCard:-webkit-full-screen .ramblr-map {
  flex: 1;
  height: auto;
  resize: none;
}

/* GPX 자르기 도구 — 마우스를 따라다니는 거리·고도 말풍선(미리보기) + 클릭으로
   고정하면 나타나는 왼쪽/오른쪽 삭제 + 취소 버튼 (지도 CustomOverlay 안에 삽입).
   삭제/취소 버튼 줄(.ramblr-cut-actions)은 position:absolute로 빼서 정상 흐름의
   너비 계산에서 제외한다 — 그렇지 않으면 그 줄이 더 넓을 때 .ramblr-cut-popup
   전체 너비가 커지고, 카카오맵이 xAnchor:0.5로 계산하는 중심점이 함께 밀려
   말풍선 꼬리(=실제 트랙 지점을 가리키는 꼭짓점) 위치가 고정 전/후 달라졌었다.
   버튼 줄을 흐름 밖으로 빼면 .ramblr-cut-bubble-group(꼬리 포함)만으로 전체
   너비가 정해지므로 고정 여부와 무관하게 꼭짓점이 항상 같은 자리를 가리킨다. */
.ramblr-cut-popup { display: flex; flex-direction: column; align-items: center; }
/* 고도/속도 그래프 호버 마커(kakao-elevation-graph.js bubbleHtml)와 동일한
   말풍선 모양 — 꼬리+스페이서를 gap 없이 붙이기 위해 별도 그룹으로 묶는다. */
.ramblr-cut-popup .ramblr-cut-bubble-group { position: relative; display: flex; flex-direction: column; align-items: center; }
.ramblr-cut-popup .ramblr-cut-bubble {
  background: #1e293b; color: #fff; font-size: 11px; font-weight: bold; padding: 5px 9px;
  border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.35); text-align: center;
}
.ramblr-cut-popup .ramblr-cut-bubble-tail {
  width: 0; height: 0; margin-left: -6px;
  border-left: 4px solid transparent; border-right: 11px solid transparent; border-top: 18px solid #1e293b;
}
.ramblr-cut-popup .ramblr-cut-bubble-spacer { height: 6px; }
.ramblr-cut-popup .ramblr-cut-actions {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px;
  display: flex; gap: 4px; background: #fff; border: 1px solid #d8d8d8;
  border-radius: 6px; padding: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.25); white-space: nowrap;
}
.ramblr-cut-popup .ramblr-cut-actions button {
  border: 1px solid #d0d0d0; background: #fff; border-radius: 4px; padding: 4px 8px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
}
.ramblr-cut-popup .ramblr-cut-actions button:hover { background: #f0f0f0; }
.ramblr-cut-popup .ramblr-cut-actions button[data-act="cancel"] { color: #888; }
/* 삭제될 쪽 경로 미리보기 색과 맞춤 — 왼쪽 삭제=주황, 오른쪽 삭제=파랑 */
.ramblr-cut-popup .ramblr-cut-actions button[data-act="left"] {
  background: rgba(249,115,22,.6); border-color: transparent; color: #fff;
}
.ramblr-cut-popup .ramblr-cut-actions button[data-act="left"]:hover { background: rgba(249,115,22,.8); }
.ramblr-cut-popup .ramblr-cut-actions button[data-act="right"] {
  background: rgba(59,130,246,.6); border-color: transparent; color: #fff;
}
.ramblr-cut-popup .ramblr-cut-actions button[data-act="right"]:hover { background: rgba(59,130,246,.8); }

/* ── Badge ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-admin { background: #fef3c7; color: #92400e; }
.badge-user  { background: #e0e7ff; color: #3730a3; }

.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1e293b;
  color: #f1f5f9;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 3000;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
