/* =============================================================================
 * XPPro Editor — styles.css
 * Design system: "Modern Dark" (slate neutrals + brand lime accent),
 * Fira Sans / Fira Code, subtle motion. Sourced from ui-ux-pro-max.
 * ===========================================================================*/

:root {
  --bg: #0B1120; --surface: #0F172A; --panel: #111a2b; --card: #18202f;
  --card-2: #1e2941; --card-hover: #212c44;
  --border: #26324a; --border-strong: #384a6e;
  --text: #F1F5F9; --muted: #94A3B8; --muted-2: #64748B;
  --accent: #a2e430; --accent-2: #b6f24a; --accent-ink: #10200a; --accent-text: #b6f24a;
  --accent-glow: rgba(162, 228, 48, .22);
  --emerald: #22C55E; --danger: #EF4444; --danger-2: #f87171; --warn: #FBBF24; --info: #56b7f5;
  --ring: rgba(162, 228, 48, .38);
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  --glass: rgba(15, 23, 42, .72);
  --font-sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, 'Cascadia Code', Consolas, monospace;
}
:root[data-theme="light"] {
  --bg: #eef2f8; --surface: #ffffff; --panel: #ffffff; --card: #ffffff;
  --card-2: #f1f5f9; --card-hover: #f8fafc;
  --border: #e3e8f0; --border-strong: #cbd5e1;
  --text: #0f172a; --muted: #55627a; --muted-2: #94a3b8;
  --accent: #a2e430; --accent-2: #8fce23; --accent-ink: #14210a; --accent-text: #4d7c0f;
  --accent-glow: rgba(162, 228, 48, .28);
  --info: #2b8fd6;
  --shadow: 0 10px 30px rgba(30, 41, 59, .12);
  --shadow-sm: 0 2px 8px rgba(30, 41, 59, .08);
  --glass: rgba(255, 255, 255, .78);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font-sans); color: var(--text); font-size: 14px; line-height: 1.5;
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 88% -8%, rgba(162, 228, 48, .06), transparent 60%),
                    radial-gradient(700px 400px at 5% 0%, rgba(86, 183, 245, .05), transparent 55%);
}
.icon { display: block; flex: none; }
code { font-family: var(--font-mono); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ Buttons ==================================== */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 13px; color: var(--text);
  background: var(--card-2); border: 1px solid var(--border-strong);
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: background .16s, border-color .16s, transform .05s, box-shadow .16s; white-space: nowrap;
}
.btn:hover { background: var(--card-hover); border-color: var(--muted-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn-primary { color: var(--accent-ink); background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-color: transparent; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(145deg, var(--accent-2), var(--accent)); }
.btn-danger { color: #fff; background: linear-gradient(145deg, #f26060, #d13030); border-color: transparent; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn .icon { color: currentColor; }
.btn-primary .icon { color: var(--accent-ink); }

.icon-btn {
  display: inline-grid; place-items: center; cursor: pointer; color: var(--muted);
  border: 1px solid var(--border); background: var(--card-2);
  width: 30px; height: 30px; border-radius: 7px; transition: .16s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--card-hover); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.icon-btn.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.icon-btn.ghost { background: transparent; border-color: transparent; }
.icon-btn.ghost:hover { background: var(--card-2); }

/* ============================ Top bar ==================================== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: .5px; color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 1px var(--accent-glow), 0 6px 18px var(--accent-glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text span { font-size: 12px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-actions .icon-btn { width: 36px; height: 36px; }

/* ============================ Layout ===================================== */
.layout { display: grid; grid-template-columns: 236px 1fr; height: calc(100vh - 65px); }

.sidebar {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sidebar-title { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 4px 8px 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 9px 10px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; transition: .16s;
}
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--card); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.nav-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); background: var(--card-2); border: 1px solid var(--border); flex: none; transition: .16s; }
.nav-item.active .nav-icon { color: var(--accent-ink); background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-color: transparent; }
.nav-label { flex: 1; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; transition: .16s; }
.nav-item.loaded .nav-dot { background: var(--accent); box-shadow: 0 0 7px var(--accent-glow); }
.nav-item.modified .nav-dot { background: var(--warn); box-shadow: 0 0 7px rgba(251, 191, 36, .5); }
.sidebar-foot { margin-top: auto; padding: 12px 8px 4px; color: var(--muted-2); font-size: 11px; line-height: 1.7; }
.sidebar-foot code { color: var(--muted); font-size: 11px; }

/* ============================ Panel ====================================== */
.panel { display: flex; flex-direction: column; min-width: 0; }
.panel-head { padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--panel); }
.panel-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-title { display: flex; gap: 13px; align-items: flex-start; min-width: 0; }
.panel-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--accent-ink); flex: none; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 14px var(--accent-glow); }
.panel-title-text { min-width: 0; }
.panel-title h2 { margin: 0; font-size: 18px; letter-spacing: .2px; }
.panel-blurb { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; max-width: 640px; }
.panel-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.file-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 6px 11px; border-radius: 20px; max-width: 230px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .icon { color: var(--accent-text); }

.status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.status-chip.saved { color: var(--accent-text); border-color: rgba(162, 228, 48, .32); background: rgba(162, 228, 48, .07); }
.status-chip.modified { color: var(--warn); border-color: rgba(251, 191, 36, .32); background: rgba(251, 191, 36, .08); }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg-btn { background: transparent; border: 0; color: var(--muted); padding: 7px 13px; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: .16s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--card-2); color: var(--text); }

.panel-body { flex: 1; overflow-y: auto; padding: 18px 22px 64px; }

/* ============================ Editor tools =============================== */
.editor-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.tool-count { font-size: 12px; color: var(--muted); padding: 5px 9px; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); }
.search-wrap { position: relative; display: flex; align-items: center; margin-left: auto; min-width: 200px; max-width: 340px; flex: 1; }
.search-wrap .icon { position: absolute; left: 10px; color: var(--muted-2); pointer-events: none; }
.search { padding-left: 34px !important; width: 100%; }

/* ============================ Config sub-nav ============================= */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.subnav-item { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 7px 12px; border-radius: 20px; transition: .16s; }
.subnav-item:hover { color: var(--text); border-color: var(--border-strong); }
.subnav-item.active { color: var(--accent-ink); background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-color: transparent; }
.subnav-item.active .icon { color: var(--accent-ink); }
.config-body { display: flex; flex-direction: column; gap: 16px; }
.config-section-head h3 { margin: 0 0 3px; font-size: 16px; }
.config-section-head p { margin: 0; color: var(--muted); font-size: 12.5px; max-width: 720px; }
.version-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 7px 11px; border-radius: var(--radius-sm); }
.note { font-size: 12px; color: var(--muted-2); margin: 2px 0 0; }

/* ============================ Cards ====================================== */
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .16s; }
.card:hover { border-color: var(--border-strong); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; user-select: none; }
.card-head:hover { background: var(--card-2); }
.caret { color: var(--muted); transition: transform .18s; flex: none; }
.card.open .caret { transform: rotate(90deg); }
.card-title-wrap { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.card-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 11.5px; color: var(--muted); }
.card-actions { display: flex; gap: 6px; flex: none; }
.card-body { display: none; flex-direction: column; gap: 14px; padding: 6px 16px 18px; border-top: 1px solid var(--border); }
.card.open .card-body { display: flex; animation: fade .18s ease; }

.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); flex: none; }
.badge.on { color: var(--accent-text); border-color: rgba(162, 228, 48, .32); background: rgba(162, 228, 48, .08); }
.badge.off { color: var(--muted-2); }

/* ============================ Fields ===================================== */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.span2 { grid-column: span 2; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.help { position: relative; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; font-weight: 700; color: var(--bg); background: var(--muted-2); cursor: help; flex: none; }
.help:hover, .help:focus-visible { background: var(--accent); color: var(--accent-ink); outline: none; }
.help::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 0;
  width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 8px;
  background: #0a0f1a; color: #e6edf6; border: 1px solid var(--border-strong);
  font-size: 11.5px; font-weight: 500; line-height: 1.45; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20;
}
.help:hover::after, .help:focus-visible::after { opacity: 1; transform: none; }

.input {
  width: 100%; font: inherit; font-size: 13px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
  transition: border-color .16s, box-shadow .16s; font-family: var(--font-sans);
}
.input::placeholder { color: var(--muted-2); }
.input:hover:not(:focus) { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.textarea { resize: vertical; min-height: 40px; line-height: 1.5; }
.select { cursor: pointer; }
input[type="number"].input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 40px; }
.input-suffix { position: absolute; right: 11px; font-size: 12px; color: var(--muted-2); pointer-events: none; font-family: var(--font-mono); }

.color-field { display: flex; gap: 8px; align-items: center; }
.color-swatch { width: 38px; height: 38px; flex: none; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }
.color-swatch::-webkit-color-swatch-wrapper { padding: 3px; }
.color-swatch::-webkit-color-swatch { border: none; border-radius: 5px; }
.color-text { flex: 1; font-family: var(--font-mono); }

/* toggle switch */
.field.toggle { flex-direction: row; align-items: center; gap: 10px; padding: 4px 0; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background .18s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s; }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch-input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--ring); }
.toggle-label { font-size: 13px; font-weight: 600; }

/* ============================ Sections ================================== */
.section { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden; }
.section.sub { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text); padding: 9px 12px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.section-title .icon { color: var(--accent-text); }
.section-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.section-hint { margin: 0; font-size: 11.5px; color: var(--muted-2); }

/* ============================ key/value editors ========================= */
.map-editor, .list-editor { display: flex; flex-direction: column; gap: 8px; }
.kv-rows { display: flex; flex-direction: column; gap: 7px; }
.kv-row { display: flex; align-items: center; gap: 8px; }
.kv-row .input { flex: 1; }
.kv-key { max-width: 96px; flex: none !important; }
.kv-name { font-size: 12px; color: var(--accent-text); min-width: 120px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-key-text { flex: 1; }
.kv-val, .kv-valwrap { max-width: 130px; flex: none !important; }
.kv-val-text { flex: 2; }
.empty-row { font-size: 12px; color: var(--muted-2); font-style: italic; padding: 2px; }

/* ============================ XP rewards ================================ */
.reward-groups { display: flex; flex-direction: column; gap: 12px; }
.reward-group .section-body { padding: 8px; }
.reward-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
@media (max-width: 780px) { .reward-list { grid-template-columns: 1fr; } }
.reward-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 9px; }
.reward-key { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.reward-label { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reward-code { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reward-val { width: 104px; flex: none; }
.reward-input { text-align: right; }

/* ============================ Skill tiers =============================== */
.tiers { display: flex; flex-direction: column; gap: 7px; }
.tier-row { display: grid; grid-template-columns: 30px 1fr 1fr 1fr 30px; gap: 8px; align-items: center; }
.tier-head { font-size: 11px; color: var(--muted-2); font-weight: 600; padding: 0 2px; }
.tier-num { text-align: center; font-weight: 700; color: var(--accent-text); font-family: var(--font-mono); }

/* ============================ Players ================================== */
.player-table { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ptable-head, .ptable-row { display: grid; grid-template-columns: 1.6fr .7fr 1fr 1fr .8fr .8fr 92px; gap: 10px; align-items: center; padding: 8px 12px; }
.ptable-head { background: var(--card-2); border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); font-weight: 700; }
.ptable-row { border-bottom: 1px solid var(--border); }
.ptable-row:hover { background: var(--card); }
.pid { font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.input.cell { padding: 6px 8px; font-size: 12.5px; }
.player-detail { display: none; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.player-detail.open { display: flex; animation: fade .18s ease; }
.detail-actions { display: flex; justify-content: flex-end; }
@media (max-width: 780px) { .ptable-head { display: none; } .ptable-row { grid-template-columns: 1fr 1fr; } }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.pager-info { font-size: 12.5px; color: var(--muted); }

/* ============================ Empty / raw ============================== */
.empty-state { color: var(--muted); text-align: center; padding: 30px; }
.empty-state.big { max-width: 540px; margin: 34px auto; padding: 54px 26px; background: var(--panel); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-ico { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 18px; color: var(--accent-ink); background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 24px var(--accent-glow); }
.empty-state h3 { margin: 0 0 6px; color: var(--text); }
.empty-state p { margin: 6px 0; font-size: 13px; }
.empty-hint { color: var(--muted-2); font-size: 12px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

.raw-wrap { display: flex; flex-direction: column; gap: 12px; }
.raw-hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.raw-area { width: 100%; min-height: 56vh; resize: vertical; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; tab-size: 2; }
.raw-area:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.raw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.error-banner { background: rgba(239, 83, 80, .1); border: 1px solid rgba(239, 83, 80, .4); color: var(--danger-2); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px; font-family: var(--font-mono); }

/* ============================ Modal ==================================== */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 8, 14, .62); backdrop-filter: blur(3px); animation: fade .12s ease; }
.modal { width: min(440px, 92vw); background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; }
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal-body { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.modal .input { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ============================ Toasts ================================== */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, 90vw); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--info); color: var(--text); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; box-shadow: var(--shadow); opacity: 0; transform: translateX(18px); transition: opacity .25s, transform .25s; }
.toast .icon { color: var(--info); }
.toast.show { opacity: 1; transform: none; }
.toast.success { border-left-color: var(--accent); } .toast.success .icon { color: var(--accent-text); }
.toast.error { border-left-color: var(--danger); } .toast.error .icon { color: var(--danger-2); }

/* ============================ Drop overlay ============================ */
.drop-overlay { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(8, 12, 20, .8); backdrop-filter: blur(4px); }
.drop-overlay.show { display: grid; }
.drop-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 64px; border: 2px dashed var(--accent); border-radius: 18px; background: rgba(162, 228, 48, .05); }
.drop-ico { color: var(--accent); }
.drop-card strong { color: var(--text); font-size: 16px; }
.drop-card span { color: var(--muted); font-size: 13px; }

/* ============================ Motion ================================== */
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.editor-host, .empty-state, .raw-wrap { animation: fade .2s ease; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
