/* ==========================================================================
   Vault — design system
   Palette, rhythm and restraint borrowed from the house standard (Aero):
   hairline borders, one accent blue, 2px radii, tabular numerals, Inter.
   Light and dark are both first-class; nothing is styled for one only.
   ========================================================================== */

:root {
  --blue: #387ed1;
  --blue-d: #2c6bb8;
  --blue-soft: #f2f7fd;
  --green: #3f9e57;
  --green-soft: #f1f9f3;
  --red: #d9534f;
  --red-soft: #fdf3f2;
  --amber: #a9741a;
  --amber-soft: #fdf7ec;
  --violet: #6b5bd2;

  --bg: #ffffff;
  --subtle: #f9fafb;
  --head: #fbfbfc;
  --ink: #16181c;
  --text: #454a52;
  --muted: #878e99;
  --faint: #a8aeb8;
  --border: #e3e6ea;
  --line: #eff1f4;
  --chip: #f2f4f7;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .09);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .18);

  --r-sm: 3px;
  --r: 5px;
  --r-lg: 8px;
  --r-pill: 999px;

  --sidebar: 250px;
  --topbar: 56px;
  --drawer: 540px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

html[data-theme="dark"] {
  --blue: #5b9ae4;
  --blue-d: #74aaea;
  --blue-soft: #17202c;
  --green: #58b972;
  --green-soft: #16211a;
  --red: #e2706c;
  --red-soft: #241817;
  --amber: #d5a248;
  --amber-soft: #221d13;
  --violet: #9b8cf0;

  --bg: #101215;
  --subtle: #15181c;
  --head: #191d22;
  --ink: #f2f4f7;
  --text: #c3c9d2;
  --muted: #8b93a0;
  --faint: #6e7683;
  --border: #262b32;
  --line: #1e2227;
  --chip: #1d2228;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .5);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -.01em; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100%; }

.sidebar {
  background: var(--head);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; height: var(--topbar);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--blue), #2a5fa8);
  color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-xs);
}
.brand-name { font-weight: 650; color: var(--ink); letter-spacing: -.02em; font-size: 14px; }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.side-search { padding: 10px 12px 6px; }
.side-search input {
  width: 100%; height: 32px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg); padding: 0 10px 0 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23878e99' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.6-3.6'/></svg>");
  background-repeat: no-repeat; background-position: 9px center;
}
.side-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); outline: none; }

.nav { flex: 1; overflow-y: auto; padding: 4px 8px 20px; }
.nav-group { margin-top: 12px; }
.nav-label {
  font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); padding: 6px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 6px 8px; border: 0; background: transparent; border-radius: var(--r-sm);
  color: var(--text); text-align: left; font-size: 13px; line-height: 1.35;
}
.nav-item:hover { background: var(--chip); color: var(--ink); }
.nav-item.on { background: var(--blue-soft); color: var(--blue-d); font-weight: 600; }
html[data-theme="dark"] .nav-item.on { color: var(--blue); }
.nav-item .ico { flex-shrink: 0; width: 15px; height: 15px; opacity: .85; }
.nav-item .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count {
  font-size: 10.5px; color: var(--muted); background: var(--chip);
  border-radius: var(--r-pill); padding: 1px 7px; min-width: 20px; text-align: center;
}
.nav-item.on .count { background: var(--bg); color: var(--blue-d); }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.nav-sub { padding-left: 10px; }

.side-foot {
  border-top: 1px solid var(--border); padding: 10px 12px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted);
}
.lock-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: var(--r-pill); padding: 3px 10px; font-size: 11.5px; font-weight: 550;
}
.lock-pill.locked { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.lock-pill.open { border-color: var(--green); color: var(--green); background: var(--green-soft); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  height: var(--topbar); flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.topbar h1 { font-size: 15px; }
.crumb { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.spacer { flex: 1; }
.content { flex: 1; overflow-y: auto; min-height: 0; padding: 20px 22px 60px; }
.content.flush { padding: 0; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 13px; font-weight: 550; transition: background .14s var(--ease), border-color .14s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--chip); border-color: var(--faint); color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: var(--shadow-xs); }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--chip); }
.btn.danger { color: var(--red); border-color: var(--border); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.icon { width: 32px; padding: 0; }
.btn.icon.sm { width: 26px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--blue); font-size: 12.5px; padding: 0; }

/* ---------------------------------------------------------------- inputs */
.field { margin-bottom: 14px; }
.field label, .label {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--muted);
  margin-bottom: 5px; letter-spacing: .01em;
}
.label .opt { font-weight: 400; color: var(--faint); }
.input, select.input, textarea.input {
  width: 100%; min-height: 34px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg); color: var(--ink); outline: none;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.input:hover { border-color: var(--faint); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea.input { min-height: 74px; resize: vertical; line-height: 1.55; }
.input.secret { font-family: var(--mono); letter-spacing: .04em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.check input { accent-color: var(--blue); width: 15px; height: 15px; }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 13.5px; }
.card-body { padding: 15px; }
.card-body.tight { padding: 6px 8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 13px 15px; box-shadow: var(--shadow-xs);
}
.tile .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 24px; font-weight: 650; color: var(--ink); line-height: 1.25; margin-top: 3px; }
.tile .s { font-size: 11.5px; color: var(--muted); }
.tile.alert .v { color: var(--amber); }
.tile.bad .v { color: var(--red); }
.tile.good .v { color: var(--green); }

.section-title {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 10px;
}
.section-title h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

.domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.domain { padding: 14px 15px; }
.domain-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.domain-head .ico {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-d); flex-shrink: 0;
}
.domain-head h3 { font-size: 13px; flex: 1; }
.domain-head .n { font-size: 11.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--subtle); border-radius: var(--r-pill);
  padding: 3px 10px; font-size: 12px; color: var(--text); transition: all .14s var(--ease);
}
.chip:hover { border-color: var(--blue); color: var(--blue-d); background: var(--blue-soft); }
.chip .n { color: var(--muted); font-size: 10.5px; }
.chip.zero { opacity: .62; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  background: var(--chip); color: var(--muted); border-radius: var(--r-pill); padding: 2px 9px;
}

/* ---------------------------------------------------------------- tables */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); box-shadow: var(--shadow-xs); }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 650; background: var(--head);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover { background: var(--subtle); }
table.grid tbody tr:last-child td { border-bottom: 0; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); }
.cell-k { color: var(--muted); font-size: 11px; display: block; }
.mask { font-family: var(--mono); color: var(--muted); letter-spacing: .12em; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .14s var(--ease); }
tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; }

/* ------------------------------------------------------------ filter bar */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { height: 32px; min-height: 32px; padding: 4px 10px; width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }

/* --------------------------------------------------------------- banners */
.banner {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--subtle); margin-bottom: 16px;
}
.banner.warn { border-color: var(--amber); background: var(--amber-soft); }
.banner.bad { border-color: var(--red); background: var(--red-soft); }
.banner.good { border-color: var(--green); background: var(--green-soft); }
.banner .b-ico { flex-shrink: 0; margin-top: 1px; }
.banner h4 { font-size: 13px; margin-bottom: 2px; }
.banner p { margin: 0; font-size: 12.5px; color: var(--text); }
.banner .b-actions { margin-top: 9px; display: flex; gap: 8px; }

/* ----------------------------------------------------------- empty states */
.empty { text-align: center; padding: 54px 24px; color: var(--muted); }
.empty .e-art {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--border); color: var(--faint);
}
.empty h3 { font-size: 14.5px; margin-bottom: 5px; color: var(--ink); }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: 12.5px; }

/* -------------------------------------------------------------- skeleton */
.skel { background: linear-gradient(90deg, var(--line) 25%, var(--chip) 37%, var(--line) 63%); background-size: 400% 100%; animation: sh 1.3s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes sh { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-line { height: 11px; margin-bottom: 9px; }

/* --------------------------------------------------------------- drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(16, 18, 22, .42);
  backdrop-filter: blur(1.5px); z-index: 40; animation: fade .16s var(--ease);
}
html[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .6); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--drawer); max-width: 96vw;
  background: var(--bg); border-left: 1px solid var(--border); z-index: 41;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slide-in .2s var(--ease);
}
.drawer-head { padding: 15px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.drawer-head .row1 { display: flex; align-items: flex-start; gap: 10px; }
.drawer-head h2 { font-size: 16px; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 40px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 11px 18px; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 1px 14px; }
.kv .k { font-size: 12px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv .v { font-size: 13px; color: var(--ink); padding: 7px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.kv .v.empty-v { color: var(--faint); }
.vrow { display: flex; align-items: center; gap: 8px; }
.vrow .val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vrow .tools { display: flex; gap: 2px; opacity: 0; transition: opacity .12s var(--ease); }
.vrow:hover .tools, .vrow:focus-within .tools { opacity: 1; }

.att { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 7px; background: var(--subtle); }
.att .a-ico { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); color: var(--muted); flex-shrink: 0; }
.att .a-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .a-meta { font-size: 11px; color: var(--muted); }
.drop {
  border: 1.5px dashed var(--border); border-radius: var(--r); padding: 16px;
  text-align: center; color: var(--muted); font-size: 12.5px; transition: all .15s var(--ease);
}
.drop.hot { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-d); }

/* ---------------------------------------------------------------- modals */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
/* A scrim inside a wrapper must stay behind the panel it belongs to: the
   wrapper already sits above the page, so the scrim needs no z-index of its
   own and the panel is lifted just above it. */
.modal-wrap > .scrim, .palette-wrap > .scrim { z-index: 0; }
.modal {
  position: relative; z-index: 1;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: 92vh;
  display: flex; flex-direction: column; animation: pop .18s var(--ease);
}
.modal.wide { max-width: 780px; }
.modal.narrow { max-width: 440px; }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-head h2 { font-size: 15px; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; }

/* --------------------------------------------------------------- palette */
.palette-wrap { position: fixed; inset: 0; z-index: 60; padding: 12vh 16px 16px; display: flex; justify-content: center; align-items: flex-start; }
.palette {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s var(--ease);
  display: flex; flex-direction: column; max-height: 70vh;
}
.palette input { border: 0; border-bottom: 1px solid var(--border); padding: 14px 16px; font-size: 14.5px; background: transparent; color: var(--ink); outline: none; width: 100%; }
.palette-list { overflow-y: auto; padding: 6px; }
.p-item { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: var(--r-sm); width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); }
.p-item.on { background: var(--blue-soft); color: var(--blue-d); }
.p-item .p-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-left: auto; }
.p-item .p-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
  background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--blue);
  border-radius: var(--r); box-shadow: var(--shadow-md); animation: pop .16s var(--ease);
  font-size: 12.5px; color: var(--text);
}
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
.toast strong { display: block; color: var(--ink); font-size: 12.5px; }

/* ------------------------------------------------------------- attention */
.attn { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.attn:last-child { border-bottom: 0; }
.attn:hover { background: var(--subtle); }
.attn .when { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill); background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.attn .when.over { background: var(--red-soft); color: var(--red); }
.attn .t { flex: 1; min-width: 0; }
.attn .t .n { font-weight: 600; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn .t .m { font-size: 11.5px; color: var(--muted); }

/* ----------------------------------------------------------------- misc */
.stat-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row .s-k { color: var(--muted); flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.neutral { background: var(--chip); color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.audit-row { display: flex; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.audit-row .a-when { color: var(--muted); width: 150px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.audit-row .a-act { font-weight: 600; color: var(--ink); width: 130px; flex-shrink: 0; }
.audit-row .a-detail { flex: 1; color: var(--text); }

/* ------------------------------------------------------------ responsive */
.mobile-only { display: none; }
@media (max-width: 900px) {
  :root { --drawer: 100vw; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 272px; z-index: 45;
    transform: translateX(-100%); transition: transform .2s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .mobile-only { display: inline-flex; }
  .content { padding: 14px 14px 70px; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv .k { padding-bottom: 0; border-bottom: 0; }
  .kv .v { padding-top: 2px; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .audit-row .a-when { width: 96px; }
  .audit-row .a-act { width: 96px; }
  table.grid .hide-sm { display: none; }
}

@media print {
  .sidebar, .topbar, .filters, .row-actions, .toasts { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .drawer { position: static; width: auto; box-shadow: none; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
