/* ==========================================================================
   HolooVault design system
   - one accent colour (blue), light and dark themes, switchable in the sidebar
   - small radii: 4px for tags, 6px for buttons and fields, 8px for cards and dialogs (no pills)
   ========================================================================== */
:root {
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-ink: #ffffff; --accent-soft: #eaf1ff; --accent-line: #bfd3fb;
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f7;
  --ink: #0f172a; --ink-2: #334155; --mute: #64748b; --line: #e2e8f0; --line-strong: #cbd5e1;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fdf3e2; --bad: #b91c1c; --bad-soft: #fdeaea;
  --info: #0e7490; --info-soft: #e3f4f8; --violet: #6d28d9; --violet-soft: #efe9fd;
  --nav: #0f172a; --nav-ink: #94a3b8; --nav-hi: #1e293b; --nav-on: #ffffff;
  --r-xs: 4px; --r: 6px; --r-lg: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .22);
  --focus: 0 0 0 3px rgba(37, 99, 235, .25);
}
:root[data-theme="dark"] {
  --accent: #3b82f6; --accent-hover: #60a5fa; --accent-ink: #ffffff; --accent-soft: #14284a; --accent-line: #29467a;
  --bg: #0b1120; --surface: #111a2c; --surface-2: #0f1828; --surface-3: #18243a;
  --ink: #e2e8f0; --ink-2: #cbd5e1; --mute: #94a3b8; --line: #1f2c44; --line-strong: #2c3c5a;
  --ok: #4ade80; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1616;
  --info: #22d3ee; --info-soft: #0c2630; --violet: #a78bfa; --violet-soft: #22193d;
  --nav: #070d1a; --nav-ink: #8190a8; --nav-hi: #15203a; --nav-on: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* native controls (number spinners, dropdown arrows, date pickers) follow the theme instead of showing bright white */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; cursor: pointer; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 15px; } h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.mute { color: var(--mute); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }
.side { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; padding: 16px 12px; gap: 2px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: var(--nav-on); font-weight: 700; font-size: 15px; }
.brand .logo { width: 30px; height: 30px; display: block; flex: none; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r); color: var(--nav-ink); cursor: pointer; font-weight: 500; user-select: none; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--nav-hi); color: var(--nav-on); text-decoration: none; }
.nav-item.on { background: var(--nav-hi); color: var(--nav-on); border-left-color: var(--accent); }
.nav-item .badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: var(--r-xs); padding: 0 6px; font-size: 11px; font-weight: 700; }
.side .sp { flex: 1; } .side .foot { padding: 10px; font-size: 12px; opacity: .7; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top h1 { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.page { padding: 24px 28px 64px; overflow: auto; flex: 1; }
.demo { background: var(--warn-soft); color: var(--warn); padding: 1px 8px; border-radius: var(--r-xs); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* ---------- buttons ---------- */
.btn { font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--surface-2); border-color: var(--mute); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); background: var(--surface); } .btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--mute); } .btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- form fields ---------- */
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 10px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--mute); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[readonly] { background: var(--surface-2); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select option { background: var(--surface); color: var(--ink); }
select option:checked, select option:hover { background: var(--accent-soft); color: var(--ink); }
textarea { resize: vertical; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; line-height: 1.5; }
label.f { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 14px 0 5px; }
.hint { font-size: 12.5px; color: var(--mute); margin-top: 6px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; } .row > * { flex: 1; min-width: 160px; }

/* checkboxes: square, accent coloured, with a readable label */
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); flex: none; box-shadow: none; }
label.chk { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; cursor: pointer; font-weight: 500; color: var(--ink); }
label.chk input { margin-top: 3px; }

/* ---------- cards and sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card > h2 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; } .card > h2 .sp { flex: 1; }
.grid { display: grid; gap: 16px; } .g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } .g2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.kpi .v { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; } .kpi .l { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.kpi.ok .ico { background: var(--ok-soft); color: var(--ok); } .kpi.warn .ico { background: var(--warn-soft); color: var(--warn); } .kpi.info .ico { background: var(--info-soft); color: var(--info); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; } tbody tr { transition: background .1s; } tbody tr:hover { background: var(--surface-2); } tr.click { cursor: pointer; }
.tablewrap { overflow: auto; border-radius: var(--r); }
.card table th:first-child, .card table td:first-child { padding-left: 16px; }

/* ---------- status tags (square, not pills) ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--mute); white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn, .pill.warning { background: var(--warn-soft); color: var(--warn); }
.pill.bad, .pill.failed { background: var(--bad-soft); color: var(--bad); } .pill.info, .pill.running { background: var(--info-soft); color: var(--info); }
.pill.full { background: var(--violet-soft); color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); display: inline-block; } .dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---------- progress ---------- */
.bar { height: 6px; background: var(--surface-3); border-radius: var(--r-xs); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-xs); transition: width .4s; }
.bar.ok > i { background: var(--ok); } .bar.bad > i { background: var(--bad); } .bar.warn > i { background: var(--warn); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-bottom: 10px; background: var(--warn-soft); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--warn); }
.alert.bad { background: var(--bad-soft); border-left-color: var(--bad); } .alert.info { background: var(--info-soft); border-left-color: var(--info); }
.empty { text-align: center; color: var(--mute); padding: 36px 12px; } .empty svg { opacity: .45; margin-bottom: 10px; }

/* ---------- chart & disk bars ---------- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 6px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart .stack { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; min-height: 3px; background: var(--surface-3); }
.chart .stack i.ok { background: var(--ok); } .chart .stack i.warning { background: var(--warn); } .chart .stack i.failed { background: var(--bad); }
.chart .d { font-size: 11px; color: var(--mute); }
.disk { display: flex; height: 30px; border-radius: var(--r-xs); overflow: hidden; border: 1px solid var(--line); margin: 10px 0 6px; background: var(--surface-2); }
.disk div { display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--surface); min-width: 8px; }
.seg-System { background: #0e7490; } .seg-Reserved { background: #64748b; } .seg-Basic { background: #2563eb; } .seg-Recovery { background: #b45309; } .seg-Other { background: #6d28d9; }

/* ---------- tabs (underline style) ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.tab { padding: 10px 0; cursor: pointer; color: var(--mute); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-color: var(--accent); } .tab:hover { color: var(--ink); }

/* ---------- lists and choice cards ---------- */
.listitem { padding: 9px 12px; border-radius: var(--r); cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.listitem:hover { background: var(--surface-2); } .listitem.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.typecard { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 16px; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); transition: border-color .12s, background .12s; }
.typecard:hover { border-color: var(--mute); }
.typecard.on { border: 2px solid var(--accent); padding: 15px; background: var(--accent-soft); }
.typecard .ico { color: var(--accent); flex: none; margin-top: 2px; } .typecard b { display: block; font-size: 14px; margin-bottom: 2px; } .typecard .small { color: var(--mute); line-height: 1.45; }

/* ---------- tabs as segmented control (use class="seg-ctl") ---------- */
.seg-ctl { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg-ctl button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border: 0; background: transparent; color: var(--mute); cursor: pointer; }
.seg-ctl button + button { border-left: 1px solid var(--line-strong); }
.seg-ctl button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- dialogs ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: start center; padding: 6vh 16px; overflow: auto; z-index: 50; }
.modal { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); width: 100%; max-width: 680px; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 880px; }
.modal header { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal header h2 { flex: 1; font-size: 16px; }
.modal .body { padding: 6px 22px 16px; max-height: 70vh; overflow: auto; }
.modal footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* wizard steps */
.stepper { display: flex; gap: 0; padding: 14px 22px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 -22px 14px; }
.stepper span { padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.stepper span.on { color: var(--accent); border-color: var(--accent); }
.stepper span.done { color: var(--ok); }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 99; max-width: 440px; }
.toast { background: var(--ink); color: var(--surface); padding: 11px 15px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 13.5px; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- sign-in ---------- */
.login { max-width: 400px; margin: 12vh auto; padding: 0 16px; }
.login .card { padding: 30px; }
.login .brand { color: var(--ink); padding: 0 0 16px; }
.login .brand .logo { width: 36px; height: 36px; }
.login h2 { font-size: 20px; margin-bottom: 4px; }

/* ---------- misc ---------- */
pre.log { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; max-height: 300px; overflow: auto; font: 12.5px/1.55 Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; color: var(--ink-2); }
code.cmd { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; word-break: break-all; margin: 6px 0; user-select: all; color: var(--ink-2); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; color: var(--mute); font-size: 13px; }
.split { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
/* ---------- responsive: computer, tablet, phone ---------- */
.shell { height: 100vh; height: 100dvh; transition: grid-template-columns .18s ease; }
.main { height: 100vh; height: 100dvh; }
.shell.collapsed { grid-template-columns: 64px 1fr; }
.shell.collapsed .side .t, .shell.collapsed .brand .t, .shell.collapsed .side .foot { display: none; }
.shell.collapsed .side { padding-left: 8px; padding-right: 8px; } .shell.collapsed .nav-item { justify-content: center; padding-left: 7px; padding-right: 10px; }
.shell.collapsed .nav-item .badge { position: absolute; margin: -14px 0 0 16px; }
.nav-item { position: relative; }
.backdrop { display: none; }
#navtoggle { padding: 6px 8px; flex: none; }
.top { flex-wrap: wrap; min-width: 0; } .top h1 { min-width: 0; overflow-wrap: anywhere; }
#topact { display: flex; gap: 8px; flex-wrap: wrap; }
.page { min-width: 0; }
.page img, .page svg { max-width: 100%; }
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .top { padding: 12px 18px; } .page { padding: 18px 18px 56px; }
  .g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
}
@media (max-width: 720px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(280px, 84vw); transform: translateX(-102%); transition: transform .2s ease, box-shadow .2s ease; padding: 16px 12px; }
  .shell.open .side { transform: none; box-shadow: 8px 0 24px rgba(0,0,0,.35); }
  .shell.collapsed .side .t, .shell.collapsed .brand .t, .shell.collapsed .side .foot { display: revert; }
  .shell.collapsed .nav-item { justify-content: flex-start; padding: 8px 10px; } .shell.collapsed .nav-item .badge { position: static; margin: 0 0 0 auto; }
  .shell.open .backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, .5); }
  .top { padding: 10px 14px; gap: 8px; } .top h1 { font-size: 17px; flex: 1 1 140px; }
  #topact { width: 100%; } #topact .btn { flex: 1 1 auto; justify-content: center; }
  .page { padding: 14px 12px 48px; }
  .card { padding: 14px; border-radius: var(--r); }
  .grid, .g4, .g2 { grid-template-columns: 1fr; }
  .row > * { min-width: 100%; }
  .btn { padding: 9px 13px; min-height: 40px; } .btn.sm { min-height: 34px; }
  input, select, textarea { font-size: 16px; }
  th, td { padding: 9px 10px; }
  .card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .modal-bg { padding: 8px; place-items: start stretch; } .modal, .modal.wide { max-width: 100%; }
  .modal header, .modal footer { padding: 12px 14px; flex-wrap: wrap; } .modal .body { padding: 4px 14px 14px; max-height: calc(100dvh - 190px); }
  .modal footer .btn { flex: 1 1 auto; justify-content: center; }
  .kpi .v { font-size: 21px; }
  pre.log { max-height: 220px; } .pick-grid { grid-template-columns: 1fr; }
}

/* ---- source picker (disk image jobs): one card per disk or volume ---- */
.pick-head { font-size: 13px; font-weight: 600; color: var(--ink); margin: 18px 0 4px; }
.pick-list, .pick-grid { display: grid; gap: 8px; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pick { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.pick:hover { border-color: var(--line-strong); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick input[type="checkbox"] { margin-top: 3px; }
.pick .t { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pick .s { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 11.5px; padding: 2px 7px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }

/* number inputs: quieter spinners that match the theme */
/* number fields: type the value; the small up/down arrows are hidden */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- progress of background operations ---------- */
.bar.big { height: 12px; border-radius: 6px; } .bar.big > i { border-radius: 6px; background-image: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.bar.big.ok > i { background-image: none; background: var(--ok); } .bar.big.bad > i { background-image: none; background: var(--bad); }
.opline { margin-top: 6px; color: var(--ink-2); } .opbar { min-width: 180px; }
.opsbadge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; max-width: 100%; }
.opsbadge:hover { filter: brightness(.96); text-decoration: none; } .opsbadge[hidden] { display: none; }
@media (max-width: 720px) { .opsbadge { order: 3; flex: 1 1 100%; justify-content: center; } }
.alert.ok { background: var(--ok-soft); border-left-color: var(--ok); }

/* ---------- operations and restores: a tidy list, not a squeezed table ---------- */
.oplist { display: grid; gap: 10px; }
.oprow { display: grid; grid-template-columns: minmax(170px, 2fr) auto minmax(150px, 2fr) max-content; gap: 8px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.oprow .opmain { min-width: 0; overflow-wrap: anywhere; }
.oprow .opprog { min-width: 0; } .oprow .opres { overflow-wrap: anywhere; }
.oprow.recent { padding: 9px 12px; grid-template-columns: minmax(180px, 2fr) auto minmax(120px, 2fr); background: var(--surface-2); }
.ctl { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.opsum { cursor: pointer; list-style-position: inside; padding: 2px 0; } details[open] > .opsum { margin-bottom: 4px; }
#ropsbox { margin-top: 4px; }
@media (max-width: 1180px) {
  .oprow, .oprow.recent { grid-template-columns: 1fr auto; }
  .oprow .opprog { grid-column: 1 / -1; } .oprow .opctl { grid-column: 1 / -1; } .ctl { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .oprow, .oprow.recent { grid-template-columns: 1fr; } .oprow .opstat { justify-self: start; }
  .ctl { width: 100%; } .ctl .btn { flex: 1 1 auto; justify-content: center; }
}
.split > .card { margin-bottom: 0; }
.listitem { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.listitem:hover { background: var(--surface-2); text-decoration: none; } .listitem.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* dialogs stay inside the window; the browse list in the backup browser is what you resize (bottom-right corner) */
.modal { overflow: auto; min-width: min(360px, 92vw); max-width: min(980px, 96vw); max-height: 94vh; display: flex; flex-direction: column; }
.modal.wide { max-width: min(1200px, 96vw); }
.browse-list { resize: both; overflow: auto; height: 52vh; min-height: 180px; min-width: 260px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); }
.modal header { flex: none; } .modal footer { flex: none; }
.modal .body { flex: 1 1 auto; min-height: 0; max-height: none; }
@media (max-width: 720px) { .modal { resize: none; max-height: 96dvh; } }

/* the backup browser: one window, resized from its bottom-right corner; the list fills the rest */
.modal.browse-modal { resize: both; overflow: hidden; width: min(1100px, 94vw); min-width: min(480px, 94vw); height: 78vh; min-height: min(380px, 80vh); max-height: 96vh; max-width: 98vw; }
.browse-modal .body { flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.browse-modal #ibwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.browse-list { flex: 1 1 auto; min-height: 0; height: auto; resize: none; overflow: auto; }
.crumbs-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); margin-bottom: 10px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.crumb:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.crumb.on { background: var(--accent-soft); color: var(--accent); }
.crumb-sep { color: var(--mute); font-size: 16px; }
@media (max-width: 720px) { .modal.browse-modal { resize: none; width: 100vw; height: 96vh; max-width: 100vw; max-height: 96vh; } }

/* ---------- backup browser: aligned toolbar, resizable columns, select-all ---------- */
/* one row of three equal boxes: volume, location, hidden-files toggle. Same height, border, radius and background. */
.browse-modal .ibbar { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.browse-modal .ibbar > * { height: 38px; box-sizing: border-box; margin: 0 !important; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; }
.browse-modal .ibbar select#ibvol { appearance: none; -webkit-appearance: none; width: auto; min-width: 230px; padding: 0 34px 0 12px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.browse-modal .ibbar select#ibvol:focus { outline: none; border-color: var(--accent); }
.browse-modal .ibbar .pill { display: inline-flex; align-items: center; padding: 0 12px; min-width: 230px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); height: 38px; box-sizing: border-box; }
.browse-modal .crumbs-bar { flex: 1; min-width: 200px; display: flex; align-items: center; overflow: hidden; padding: 0 10px; }
.browse-modal .ibhid { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; cursor: pointer; user-select: none; }
.browse-modal .ibhid input { margin: 0; }
.ftable { table-layout: fixed; width: 100%; }
.ftable th { position: relative; user-select: none; }
.ftable td, .ftable th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-grip { position: absolute; right: -4px; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 2; }
.col-grip::after { content: ""; position: absolute; left: 4px; top: 22%; bottom: 22%; width: 1px; background: var(--line-strong); }
.col-grip:hover::after { background: var(--accent); width: 2px; left: 3px; }
.ftable tr.click td { cursor: pointer; }
.browse-list table tr[data-row]:hover td { background: var(--surface-2); }

/* ---------- partition bar: drive letter and size on each segment ---------- */
.disk > div { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; overflow: hidden; line-height: 1.15; }
.disk > div b { font-size: 12px; white-space: nowrap; } .disk > div small { font-size: 10.5px; opacity: .85; white-space: nowrap; }

/* ---------- Open: a clear button instead of a bare link with an arrow ---------- */
.open-btn { display: inline-flex; align-items: center; gap: 6px; }
