/* ═══════════════════════════════════════════════════════════════════════════════════════
   ADMIN PANEL styles · builds on the portal's tokens and cards (index.html) — forms, list
   editors, message boxes. Only CoverYou admins ever see these screens.
   ═══════════════════════════════════════════════════════════════════════════════════════ */
.adm-stack { display: flex; flex-direction: column; gap: 18px; }
.adm-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-toolbar .grow { flex: 1 1 auto; }
.adm-back { font-size: 12px; font-weight: 600; color: var(--brand); cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; }
.adm-h { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 600; color: var(--text-bright); }
.adm-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.adm-hint b { color: var(--text-soft); }
.adm-hint a { color: var(--brand); font-weight: 600; text-decoration: none; }
.adm-hint a:hover { text-decoration: underline; }

/* fields */
.adm-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.adm-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.adm-field.wide { grid-column: 1 / -1; }
.adm-field > span { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-muted); }
.adm-field > span i { color: var(--brand); font-style: normal; }
.adm-field > small { font-size: 10.5px; color: var(--text-muted); }
.adm-input { font-family: inherit; font-size: 12.5px; color: var(--text-bright); background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
.adm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
.adm-input:disabled { background: var(--navy-mid); color: var(--text-muted); }
textarea.adm-input { resize: vertical; min-height: 60px; line-height: 1.45; }
select.adm-input { cursor: pointer; }
.adm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; user-select: none; }
.adm-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.adm-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; padding: 4px 0; }

/* list editors (signatories, council, rates …) */
.adm-list { display: flex; flex-direction: column; gap: 8px; }
.adm-row { display: grid; gap: 8px; align-items: center; grid-template-columns: 1fr 1fr 32px; }
.adm-row.three { grid-template-columns: 1fr 90px 1fr 32px; }
.adm-row.four { grid-template-columns: 1.1fr 1.4fr 1fr 1.3fr; }
.adm-row.rm { grid-template-columns: 1.1fr 1.3fr 1fr 1.4fr 32px; }
.adm-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; }
.adm-x:hover { color: var(--danger); border-color: #f3c4c4; }
.adm-add { align-self: flex-start; font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--brand-dim); border: 1px dashed var(--brand-border); border-radius: 8px; padding: 6px 12px; cursor: pointer; }

/* products + files */
.adm-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-product { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.adm-product.on { border-color: var(--brand-border); background: #fffaf9; }
.adm-file { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); }
.adm-file a { color: var(--brand); font-weight: 600; text-decoration: none; }
.adm-logo { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; flex-shrink: 0; }
.adm-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.adm-logo .logo-initials { font-size: 11px; }
.btn-small.tiny { padding: 5px 10px; font-size: 11px; }
.btn-small.danger { background: #fff; color: var(--danger); border-color: #f3c4c4; }
.btn-small:disabled { opacity: .5; cursor: not-allowed; }

/* messages */
.adm-msg { border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.5; }
.adm-msg ul { margin: 6px 0 0 18px; }
.adm-msg.bad  { background: #fdf2f2; border: 1px solid #f3c4c4; color: #7f1d1d; }
.adm-msg.warn { background: #fffbeb; border: 1px solid #f5d98a; color: #78350f; }
.adm-msg.good { background: rgba(22,163,74,.07); border: 1px solid rgba(22,163,74,.3); color: #14532d; }
.adm-msg b { font-weight: 700; }
.adm-secret { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-secret code { font-size: 16px; font-weight: 700; letter-spacing: 1px; background: #fff; border: 1px solid rgba(22,163,74,.3); border-radius: 8px; padding: 6px 12px; color: var(--text-bright); }

/* save bar */
.adm-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
.adm-savebar .dirty { font-size: 11.5px; font-weight: 600; color: #b45309; }

/* tables and tags */
.adm-table td .sub { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.adm-table td.actions { white-space: nowrap; text-align: right; }
.adm-table td.actions .btn-small { margin-left: 4px; }
.adm-pill { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 2px 8px; border-radius: 20px; background: var(--navy-mid); color: var(--text-soft); white-space: nowrap; }
.adm-pill.brand { background: var(--brand-tint); color: var(--brand-dark); }
.adm-pill.green { background: rgba(22,163,74,.1); color: #15803d; }
.adm-logo-sm { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; vertical-align: middle; margin-right: 8px; background: #fff; }
.adm-logo-sm img { max-width: 100%; max-height: 100%; }
.adm-logo-sm .logo-initials { font-size: 7px; }

/* toast */
.adm-toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; background: var(--ink-deep); color: #fff; font-size: 12.5px; font-weight: 500; padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: all .2s; pointer-events: none; }
.adm-toast.show { opacity: 1; transform: none; }

@media (max-width: 1100px) { .adm-fields, .adm-fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .adm-products { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .adm-fields, .adm-fields.two, .adm-fields.four { grid-template-columns: 1fr; }
  .adm-row { grid-template-columns: 1fr; }
  .adm-row.three { grid-template-columns: 1fr 52px 1fr 32px; }
  .adm-row.four, .adm-row.rm { grid-template-columns: 1fr 1fr; }
  .adm-x { justify-self: end; }
}
