/* 해봄 자료관리 styles.css 원본 복사본 — 여기서 고치지 말 것. 업무 시스템 추가분은 app.css에 쓴다. */
@font-face { font-family: 'Pretendard'; src: url('fonts/PretendardVariable.woff2') format('woff2'); font-weight: 45 920; font-display: swap; }
:root {
  --bg: #f4f5f7; --panel: #ffffff; --panel-2: #fafbfc; --line: #e4e7ec; --line-2: #eef0f3;
  --text: #1c2330; --text-2: #4a5566; --muted: #8590a2; --faint: #b4bcc8;
  --accent: #0b78c2; --accent-2: #0a66a8; --accent-soft: #e6f3fb; --accent-line: #bfe0f5;
  --brand-m: #de007f; --brand-b: #0095dc; --brand-d: #1b6eb7; --brand-g: #27ae4d;
  --brand-grad: linear-gradient(135deg, #de007f 0%, #1b6eb7 42%, #0095dc 62%, #27ae4d 100%);
  --btn-grad: linear-gradient(135deg, #1b6eb7 0%, #0a86cf 55%, #0b9fb0 100%);
  --soft-grad: linear-gradient(135deg, rgba(222,0,127,.10), rgba(0,149,220,.12) 55%, rgba(39,174,77,.12));
  --sun: #c8157c; --sun-soft: #fdebf4;
  --ok: #148a52; --ok-soft: #e6f6ee; --warn: #b7700a; --warn-soft: #fff5e0; --err: #d23a3a; --err-soft: #fdeceb;
  --sel: #e7efff; --hover: #f2f4f7;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.08);
  --r: 10px; --r-sm: 7px;
  --side: 212px;
}
[data-theme="dark"] {
  --bg: #111418; --panel: #191d23; --panel-2: #1d2229; --line: #2b313a; --line-2: #232931;
  --text: #e6e9ee; --text-2: #b3bbc7; --muted: #7f8898; --faint: #525b69;
  --accent: #3db0f0; --accent-2: #6cc4f5; --accent-soft: #14304a; --accent-line: #1f4d73;
  --sun: #ff5fb0; --sun-soft: #3a1a2c;
  --ok: #3cc684; --ok-soft: #173327; --warn: #f0b24a; --warn-soft: #362a16; --err: #ff6b6b; --err-soft: #3a1d1f;
  --sel: #22314f; --hover: #20252d;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Pretendard', 'Malgun Gothic', system-ui, sans-serif; font-size: 13.5px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent); text-decoration: none; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic.sm { width: 14px; height: 14px; } .ic.lg { width: 20px; height: 20px; } .ic.xl { width: 28px; height: 28px; stroke-width: 1.6; }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
::-webkit-scrollbar { width: 11px; height: 11px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }

/* ---------- shell ---------- */
#app { height: 100%; }
.shell { display: flex; height: 100%; }
.side { width: var(--side); flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.brand .logo { width: 34px; height: 34px; flex: none; } .brand .logo img { width: 34px; height: 34px; display: block; }
.brand .t1 { font-weight: 700; font-size: 14.5px; letter-spacing: -0.02em; } .brand .t2 { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.nav { padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; cursor: pointer; user-select: none; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; position: relative; }
.nav a.on:before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--brand-grad); }
.nav .badge { margin-left: auto; }
.nav .sep { height: 1px; background: var(--line-2); margin: 8px 6px; }
.side-foot { margin-top: auto; padding: 10px 12px 12px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); }
.side-foot .row { display: flex; align-items: center; gap: 6px; padding: 3px 2px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.finder-btn { display: flex; align-items: center; gap: 8px; width: 380px; max-width: 45vw; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted); cursor: text; }
.finder-btn:hover { border-color: var(--faint); }
.finder-btn kbd { margin-left: auto; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); color: var(--muted); }
.topbar .grow { flex: 1; }
.content { flex: 1; min-height: 0; overflow: auto; }
.page { padding: 22px 26px 40px; max-width: 1500px; }
.page.full { max-width: none; height: 100%; padding: 0; display: flex; flex-direction: column; }

/* ---------- basics ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--hover); border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--btn-grad); border-color: transparent; color: #fff; box-shadow: 0 1px 2px rgba(11,94,160,.25); }
.btn.primary:hover { filter: brightness(1.08); background: var(--btn-grad); }
.btn.primary:disabled { filter: grayscale(.4); }
.btn.danger { color: var(--err); } .btn.danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; } .btn.sm.icon { width: 27px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; margin-left: -1px; } .btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; } .btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-group .btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); z-index: 1; position: relative; }
.inp, select.inp, textarea.inp { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); outline: none; min-width: 0; }
textarea.inp { height: auto; padding: 8px 10px; resize: vertical; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp.sm { height: 27px; font-size: 12.5px; padding: 0 8px; border-radius: 7px; }
.inp.err { border-color: var(--err); }
label.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--text-2); white-space: nowrap; }
.badge.blue { background: var(--accent-soft); color: var(--accent); } .badge.sun { background: var(--sun-soft); color: var(--sun); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.err { background: var(--err-soft); color: var(--err); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
a.chip:hover, button.chip:hover { border-color: var(--accent-line); color: var(--accent); cursor: pointer; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.mono { font-family: Consolas, 'D2Coding', monospace; font-size: 12px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h3 { font-size: 13.5px; font-weight: 700; margin: 0; color: var(--text); }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; }
.sec-title h2 { font-size: 14.5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .ic.xl { color: var(--faint); margin-bottom: 8px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent-line); }
.notice.warn { background: var(--warn-soft); border-color: #f1d9a8; } .notice.err { background: var(--err-soft); border-color: #f3c3c1; } .notice.ok { background: var(--ok-soft); border-color: #b9e4cd; }
[data-theme="dark"] .notice.warn { border-color: #5a4520; } [data-theme="dark"] .notice.err { border-color: #5c2c2e; } [data-theme="dark"] .notice.ok { border-color: #1f5139; }
.notice .ic { margin-top: 1px; }
.grid { display: grid; gap: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 12px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text); } .tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.pill-tabs { display: inline-flex; background: var(--line-2); padding: 3px; border-radius: 9px; gap: 2px; }
.pill-tabs a { padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.pill-tabs a.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.hover:hover td { background: var(--hover); }
.tbl tr.sel td { background: var(--sel); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fi { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.fi img { width: 18px; height: 18px; }
.fi.big { width: 40px; height: 40px; } .fi.big img { width: 40px; height: 40px; }

/* ---------- plant page ---------- */
.plant-head { padding: 20px 26px 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.plant-head .title { display: flex; align-items: center; gap: 12px; }
.plant-head .pic { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(27,110,183,.28); }
.plant-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.plant-body { flex: 1; min-height: 0; display: flex; }
.plant-rail { width: 262px; flex: none; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 10px 8px 30px; }
.rail-cat { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 12px 10px 5px; letter-spacing: .02em; }
.rail-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.rail-item:hover { background: var(--hover); color: var(--text); }
.rail-item.on { background: var(--accent-soft); color: var(--accent); }
.rail-item .cnt { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail-item.on .cnt { color: var(--accent); }
.rail-item.dim { color: var(--faint); }
.rail-item .dot { width: 6px; height: 6px; border-radius: 3px; background: var(--faint); flex: none; }
.plant-pane { flex: 1; min-width: 0; overflow: auto; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.area-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 92px; transition: border-color .12s, box-shadow .12s; }
.area-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.area-card .h { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.area-card .h .ic { color: var(--accent); }
.area-card.match .h .ic { color: var(--sun); }
.area-card .p { font-size: 11.5px; color: var(--muted); }
.area-card .s { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.area-card.none { background: var(--panel-2); border-style: dashed; cursor: default; }
.area-card.none .h { color: var(--muted); } .area-card.none .h .ic { color: var(--faint); }
.timeline { position: relative; padding-left: 18px; }
.timeline:before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 8px 12px; margin-bottom: 6px; border-radius: 9px; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.tl-item:before { content: ''; position: absolute; left: -17px; top: 15px; width: 10px; height: 10px; border-radius: 5px; background: var(--panel); border: 2px solid var(--accent); }
.tl-item:hover { background: var(--hover); }
.tl-date { width: 86px; flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-year { font-weight: 800; font-size: 15px; margin: 18px 0 8px -26px; padding: 2px 0 2px 0; color: var(--text); position: relative; background: var(--bg); display: inline-block; }

/* ---------- browser ---------- */
.browser { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.bw-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 1px; min-width: 0; flex: 1; overflow: hidden; }
.crumbs a { padding: 3px 6px; border-radius: 6px; color: var(--text-2); white-space: nowrap; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { background: var(--hover); color: var(--text); }
.crumbs a:last-child { color: var(--text); font-weight: 600; }
.crumbs .ic { color: var(--faint); flex: none; }
.bw-main { flex: 1; min-height: 0; display: flex; }
.bw-list { flex: 1; min-width: 0; overflow: auto; position: relative; }
.bw-list.drop { outline: 2px dashed var(--accent); outline-offset: -6px; background: var(--accent-soft); }
.bw-preview { width: 42%; min-width: 320px; max-width: 760px; border-left: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; }
.bw-preview .pv-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto; }
.bw-preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.bw-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bw-preview .pv-head { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; padding: 12px; }
.thumb { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.thumb .im { height: 104px; display: grid; place-items: center; background: var(--panel-2); overflow: hidden; }
.thumb .im img.ph { width: 100%; height: 100%; object-fit: cover; }
.thumb .nm { padding: 6px 8px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.bw-status { padding: 5px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); background: var(--panel); display: flex; gap: 12px; }

/* ---------- folder page with tree ---------- */
.split { display: flex; height: 100%; min-height: 0; }
.tree { width: 280px; flex: none; border-right: 1px solid var(--line); overflow: auto; background: var(--panel); padding: 8px 4px 30px; }
.tn { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; color: var(--text-2); }
.tn:hover { background: var(--hover); color: var(--text); }
.tn.on { background: var(--accent-soft); color: var(--accent); }
.tn .tw { width: 16px; height: 16px; display: grid; place-items: center; flex: none; color: var(--muted); }
.tn .ic.f { color: #e0a526; }

/* ---------- import ---------- */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 40px 20px; text-align: center; background: var(--panel); transition: all .12s; }
.dropzone.on { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .big { width: 58px; height: 58px; border-radius: 17px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(27,110,183,.3); }
.imp-wrap { display: flex; flex: 1; min-height: 0; }
.imp-table { flex: 1; min-width: 0; overflow: auto; }
.imp-side { width: 400px; flex: none; border-left: 1px solid var(--line); background: var(--panel); overflow: auto; }
.imp-side .sect { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.imp-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--panel); }
.status-ok { color: var(--ok); } .status-warn { color: var(--warn); } .status-err { color: var(--err); }
.newname { font-weight: 600; }
.dest { font-size: 11.5px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.req:after { content: '*'; color: var(--err); margin-left: 2px; }
.quick { display: flex; gap: 4px; flex-wrap: wrap; }
.quick button { height: 23px; font-size: 11.5px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; color: var(--text-2); }
.quick button:hover { border-color: var(--accent-line); color: var(--accent); }
.preview-name { padding: 9px 11px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; word-break: break-all; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); flex-wrap: wrap; }

/* ---------- combobox ---------- */
.combo { position: relative; }
.combo .dd { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-lg); max-height: 320px; overflow: auto; padding: 4px; min-width: 260px; }
.combo .opt { padding: 6px 9px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.combo .opt:hover, .combo .opt.act { background: var(--hover); }
.combo .opt.cur { color: var(--accent); font-weight: 600; }
.combo .grp { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 9px 3px; }
.combo .trigger { width: 100%; display: flex; align-items: center; gap: 6px; text-align: left; justify-content: space-between; }

/* ---------- modal / palette / menu / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16,24,40,.35); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding-top: 9vh; }
[data-theme="dark"] .overlay { background: rgba(0,0,0,.55); }
.modal { width: 560px; max-width: calc(100vw - 40px); max-height: 82vh; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: 920px; } .modal.xwide { width: 1180px; }
/* 입력 칸 있는 창의 바깥을 눌렀을 때 — 닫지 않고 살짝 흔든다(core.js backdropDismiss) */
.modal.nudge { animation: modal-nudge .3s ease-in-out; }
@keyframes modal-nudge { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .modal.nudge { animation: none; box-shadow: var(--shadow-lg), 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } }
.overlay.sheet .modal.nudge { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -3px; }   /* 휴대폰 아래 창: 올라오는 움직임과 겹치지 않게 테두리만 */
.modal-h { padding: 16px 18px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-2); }
/* 되살린 창 띠(comp.js AppModal) — 머리 바로 아래에 오도록 순서만 바꾼다 */
.modal > .modal-restored { order: 1; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 18px; font-size: 12.5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-bottom: 1px solid var(--line-2); }
.modal > .modal-restored .spacer { flex: 1; }
.modal > .modal-restored ~ :not(.modal-h) { order: 2; }
.modal-b { padding: 16px 18px; overflow: auto; flex: 1; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.palette { width: 640px; }
.palette .pin { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette .pin input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; }
.palette .list { max-height: 440px; overflow: auto; padding: 6px; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.palette .it.act { background: var(--accent-soft); }
.palette .it .sub { font-size: 12px; color: var(--muted); }
.ctx { position: fixed; z-index: 200; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 200px; }
.ctx a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--text); }
.ctx a:hover { background: var(--hover); }
.ctx .sep { height: 1px; background: var(--line-2); margin: 4px 2px; }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #1c2330; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 460px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; animation: tin .18s ease-out; white-space: pre-line; }
.toast.err { background: #b42828; } .toast.ok { background: #13744a; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand-grad); transition: width .2s; }
.stat { padding: 14px 16px; } .stat .v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; } .stat .l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.plant-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; min-width: 0; }
.plant-tile:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.plant-tile .pi { width: 30px; height: 30px; border-radius: 9px; background: var(--soft-grad); color: var(--brand-d); display: grid; place-items: center; flex: none; }
.plant-tile .n { font-weight: 650; } .plant-tile .s { font-size: 11.5px; color: var(--muted); }
.act-item { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.act-item:last-child { border-bottom: 0; }
.avatar { width: 26px; height: 26px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.code { font-family: Consolas, monospace; font-size: 12px; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.token-btn { height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); cursor: pointer; font-size: 12px; }
.admin-nav { display: flex; flex-direction: column; gap: 1px; width: 200px; flex: none; padding: 16px 8px; border-right: 1px solid var(--line); background: var(--panel); }
.admin-nav a { padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 500; display: flex; gap: 9px; align-items: center; }
.admin-nav a:hover { background: var(--hover); } .admin-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tag-input { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; min-height: 32px; align-items: center; background: var(--panel); }
.tag-input .tg { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 4px 0 8px; border-radius: 6px; background: var(--line-2); font-size: 12px; }
.tag-input .tg button { border: 0; background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; color: var(--muted); }
.tag-input input { border: 0; outline: none; flex: 1; min-width: 80px; background: transparent; height: 22px; }
.hl { background: #fff1a8; color: inherit; border-radius: 2px; } [data-theme="dark"] .hl { background: #5a4a10; }
.tbl.fixed { table-layout: fixed; }
.grid > * { min-width: 0; }
.field > .inp, .field > select.inp, .field > textarea.inp { width: 100%; }
.nowrap { white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; line-height: 1.35; }
.imp-side { width: 370px; }
.newname { font-size: 12.5px; }

.topbar { position: relative; }
.topbar:after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-grad); opacity: .55; }
.hero-title { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-chip { background: var(--soft-grad); border-color: transparent; color: var(--brand-d); }
.area-card .h .ic { color: var(--brand-d); }
.area-card.match .h .ic { color: var(--brand-m); }
.rail-item.on { background: var(--soft-grad); }

/* ---------- cases (건별 보기) ---------- */
.case-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 4px; font-size: 13.5px; }
.case-sum b { font-size: 17px; margin-right: 2px; color: var(--brand-d); }
.case-year { font-weight: 800; font-size: 14px; margin: 14px 0 6px; color: var(--muted); }
.case { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); margin-bottom: 7px; overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.case:hover { border-color: var(--brand-b); box-shadow: 0 2px 10px rgba(0, 149, 220, .08); }
.case.shared { border-style: dashed; }
.case-main { display: flex; align-items: center; gap: 14px; padding: 10px 12px; cursor: pointer; }
.case-date { width: 58px; flex: none; text-align: center; padding: 6px 0; border-radius: 9px; background: var(--soft-grad); color: var(--brand-d); font-variant-numeric: tabular-nums; }
.case-date b { font-size: 15px; }
.case.period .case-date { background: var(--panel-2); color: var(--muted); }
.case-t { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; min-width: 0; }
.case-m { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 12.5px; color: var(--text-2, var(--muted)); min-width: 0; white-space: nowrap; overflow: hidden; }
.case-m > span { display: inline-flex; align-items: center; gap: 4px; }
.case-m .ellip { min-width: 0; }
.case-parts { border-top: 1px solid var(--line); background: var(--panel-2); padding: 4px 6px 8px; }
.case-part { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; min-width: 0; }
.case-part:hover { background: var(--hover); }
.loose-grp + .loose-grp { border-top: 1px solid var(--line); }
.loose-h { display: flex; align-items: center; gap: 6px; padding: 9px 12px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.loose-h:hover { color: var(--accent); }

/* ---------- inline finder ---------- */
.finder { position: relative; width: 400px; max-width: 45vw; }
.finder-in { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted); cursor: text; transition: border-color .12s, box-shadow .12s, background .12s; }
.finder-in:hover { border-color: var(--faint); }
.finder.on .finder-in { border-color: var(--brand-b); background: var(--panel); box-shadow: 0 0 0 3px rgba(0, 149, 220, .14); }
.finder-in input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; color: var(--text); }
.finder-in kbd { margin-left: auto; }
.finder.big { width: 100%; max-width: none; }
.finder.big .finder-in { height: 48px; border-radius: 12px; font-size: 15px; background: var(--panel); padding-left: 14px; }
.finder-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); min-width: 420px; max-height: 460px; overflow: auto; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 50, .16); padding: 6px; }
.finder-cap { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; }
.finder-drop .it { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.finder-drop .it.act { background: var(--soft-grad); }
.finder-drop .it .sub { font-size: 12px; color: var(--muted); }
.finder-drop .pi { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--soft-grad); color: var(--brand-m); }
.finder-drop .pi.srch { background: var(--accent-soft); color: var(--accent); }

/* ---------- version history ---------- */
.ver-link { cursor: pointer; gap: 6px; color: var(--faint); border-radius: 6px; }
.ver-link:hover { color: var(--accent); }
.ver-link .faint { font-size: 11px; }
.badge.pulse { animation: hhpulse 1.6s ease-in-out infinite; }
@keyframes hhpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 77, .45); } 50% { box-shadow: 0 0 0 5px rgba(39, 174, 77, 0); } }
.ver-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px 8px; margin-bottom: 10px; }
.ver-card.cur { border-color: var(--brand-b); background: var(--soft-grad); }
.ver-card.next { border-color: var(--brand-g); }
.ver-h { display: flex; align-items: center; gap: 8px; }
.ver-no { font-size: 16px; }
.ver-card ul { margin: 6px 0 4px; padding-left: 18px; line-height: 1.75; font-size: 13px; }

/* ---------- 계획서 만들기 ---------- */
.plan-wrap { height: 100%; display: flex; gap: 16px; padding: 18px 22px; min-height: 0; }
.plan-list { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.plan-list-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.plan-rows { flex: 1; overflow: auto; }
.plan-rows tr.sel td { background: var(--soft-grad); }
.plan-rows tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--brand-b); }
.plan-side { width: 380px; flex: none; display: flex; flex-direction: column; gap: 12px; overflow: auto; padding-bottom: 8px; }
.plan-name { font-size: 18px; font-weight: 750; min-width: 0; }
.plan-dest { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 9px; border-radius: 8px; background: var(--panel-2); font-size: 12.5px; color: var(--text-2); min-width: 0; }
.plan-job { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; user-select: none; transition: border-color .12s, background .12s; }
.plan-job:hover { border-color: var(--faint); }
.plan-job.on { border-color: var(--brand-b); background: var(--soft-grad); }
.plan-job input { margin: 0; }
.plan-kind { width: 22px; height: 22px; flex: none; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.plan-kind.w { background: #2b579a; } .plan-kind.p { background: #d24726; }
.plan-side .hr { height: 1px; background: var(--line); margin: 12px 0; }
.plan-side .dim { opacity: .5; }
.plan-result .case-part { padding: 5px 6px; }
.plan-side > * { flex: none; }
.plan-result .case-part .ellip { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.35; }
