/* records — styles owned by mod/records.js (the Admin's edit / remove
   controls on every record) and mod/admin/changes.js (the audit log).
   The pair is deliberately quiet: a dashed muted outline, no fill, so a
   list of forty entries does not turn into forty red buttons. */

/* ---- the ✎ / 🗑 pair, right-aligned under a record ---- */
.admbar{display:flex; justify-content:flex-end; gap:4px; margin-top:6px;}
button.adm{width:auto; min-height:26px; padding:2px 9px; font-size:12.5px; line-height:1;
  border-radius:var(--r-pill); background:transparent; color:var(--muted);
  border:1px dashed var(--line); opacity:.75;}
button.adm:hover:not(:disabled){opacity:1; color:var(--text); border-style:solid; background:var(--panel);}
button.adm.del:hover:not(:disabled){color:var(--bad); border-color:rgba(255,93,93,.5);}
/* inside a list row the pair sits at the end of the row, not under it */
.arow .admbar, .vrow .admbar, .urow .admbar, .item .h .admbar{margin-top:0; flex:none;}
.entry .c .admbar{margin-top:4px;}
.ord .oacts .admbar{margin-top:0; margin-left:auto;}
/* on a chat bubble the pair hides until the bubble is hovered */
.bub .admbar{margin-top:2px; opacity:0; transition:opacity .12s;}
.bub:hover .admbar, .bub:focus-within .admbar{opacity:1;}
.bub.removed .txt{font-style:italic; color:var(--muted);}

/* ---- the forms ---- */
.recform{display:grid; grid-template-columns:1fr 1fr; gap:0 12px;}
.recform .full{grid-column:1 / -1;}
.recform label{margin-top:12px;}
@media (max-width:440px){ .recform{grid-template-columns:1fr;} }
h3.recgroup{margin:16px 0 0;}
/* a wider card for the many-column forms (book, orders, vendors) */
.modal .card:has(.recform){max-width:560px;}
/* vendor contacts: five inputs and a × per row */
.contacts .crow{display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr 1.3fr auto; gap:6px; margin-top:6px;}
.contacts .crow input{padding:8px 10px; font-size:14px;}
@media (max-width:600px){ .contacts .crow{grid-template-columns:1fr 1fr;} }

/* ---- Admin -> Changes ---- */
.chg{padding:10px 0; border-bottom:1px solid var(--line);}
.chg .ch{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px;}
.chg .ch .when{font-family:var(--mono); font-size:11.5px; color:var(--muted); flex:none;}
.chg .ch .who{font-weight:600;}
.chg .ch .act{font-family:var(--mono); font-size:12px; color:var(--accent);}
.chg .ch .act.del{color:var(--bad);} .chg .ch .act.add{color:var(--good);} .chg .ch .act.undo{color:var(--warn);}
.chg .ch .tgt{font-family:var(--mono); font-size:12px;}
.chg .ch .spacer{flex:1;}
.chg .ch button.small{width:auto; min-height:28px; padding:4px 10px; font-size:12.5px; border-radius:var(--r-pill);}
.chg .diff{margin:8px 0 0; font-family:var(--mono); font-size:11.5px; line-height:1.5;
  background:var(--chrome); border:1px solid var(--line); border-radius:var(--r-sm); padding:8px 10px;
  overflow-x:auto;}
.chg .diff table{border-collapse:collapse; width:100%;}
.chg .diff th{text-align:left; color:var(--muted); font-weight:600; padding:2px 8px 2px 0; white-space:nowrap;}
.chg .diff td{padding:2px 8px 2px 0; vertical-align:top; word-break:break-word; max-width:280px;}
.chg .diff td.before{color:var(--bad); text-decoration:line-through; text-decoration-color:rgba(255,93,93,.5);}
.chg .diff td.after{color:var(--good);}
.chg .diff pre{margin:0; white-space:pre-wrap; word-break:break-word;}
.chgbar{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:0 0 6px;}
.chgbar select{width:auto; min-width:180px; padding:8px 10px; font-size:14px;}
.chgbar button.small{width:auto;}
