/* ── Shared chrome, lifted verbatim from the portal's portal.css ──────────
   The sign-in card and brandbar controls belong to the design system rather
   than to either site; weidner.css does not carry them. Copied rather than
   imported because Netlify's base-directory build cannot reach across
   folders. If you restyle sign-in, restyle it in both places. */
.signin {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--navy);
}
/* A class-level `display` beats the UA's [hidden]{display:none}, so the panel
   would stay on screen after sign-in. Restate it at matching specificity. */
.signin[hidden] { display: none; }
.signin-card {
  background: var(--surface); border-radius: 6px; padding: 34px 34px 26px;
  width: min(420px, 100%); border-top: 4px solid var(--red);
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}
.signin-logo { height: 38px; width: auto; display: block; margin-bottom: 22px; }
.signin h1 {
  margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em;
}
.signin-sub { margin: 0 0 22px; font-size: 13px; color: var(--charcoal); line-height: 1.5; }
.signin label {
  display: block; font-size: 11px; font-weight: 700; color: var(--charcoal);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.signin input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 3px;
  font-family: inherit; font-size: 15px; color: var(--navy); background: #fff;
}
.signin input:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }
.signin-btn { width: 100%; justify-content: center; margin-top: 16px; padding: 12px; font-size: 13px; }
.signin-btn:disabled { opacity: 0.6; cursor: wait; }
.signin-msg {
  margin-top: 16px; padding: 11px 13px; border-radius: 3px; font-size: 13px;
  font-weight: 500; line-height: 1.45;
}
.signin-msg.ok  { background: var(--pos-bg); color: var(--pos); border-left: 3px solid var(--pos); }
.signin-msg.err { background: var(--neg-bg); color: var(--red-dk); border-left: 3px solid var(--red); }
.signin-foot {
  margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: 11.5px; color: var(--gray); line-height: 1.5;
}

/* ---- brand bar extras ---- */
.brandbar .whoami {
  font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500;
  padding-left: 12px; margin-left: 4px; border-left: 1px solid rgba(255,255,255,0.2);
}
.brandbar .signout {
  font-size: 11px; color: rgba(255,255,255,0.7); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 3px; padding: 5px 10px;
}
.brandbar .signout:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Directory-specific ───────────────────────────────────────────────────
   Portal directory — the internal index. Deliberately shares weidner.css with
   the customer portals so the two read as one system; everything here is the
   small amount that is specific to a list of sites. */

/* .wrap comes from weidner.css — do not override it here. The brandbar
   cancels that exact padding with a negative margin to go full-bleed, so a
   different value silently leaves a sliver of background down each side. */

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 0 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.toolbar input[type="search"] {
  flex: 1 1 300px; max-width: 420px; box-sizing: border-box;
  font: 400 14px/1.4 'Barlow', system-ui, sans-serif; color: var(--navy);
  background: #fff; border: 1px solid var(--border); border-radius: 3px; padding: 9px 12px;
}
.toolbar input[type="search"]:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(193, 32, 39, .12);
}
.toolbar-count { font-size: 12px; color: var(--gray); }

.site-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px;
}

.site {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
  border-top: 3px solid var(--red);
  padding: 16px 18px 14px;
  transition: box-shadow .12s, transform .12s;
}
.site:hover { box-shadow: 0 6px 18px rgba(16, 27, 34, .09); transform: translateY(-1px); }
.site:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.site-head { display: flex; align-items: flex-start; gap: 12px; }
.site-head .status-pill { white-space: nowrap; flex: none; }
.site-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.site-name {
  font: 700 15px/1.3 'Barlow', system-ui, sans-serif; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-url {
  font-size: 12px; color: var(--gray); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.site-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.site-stats .stat { min-width: 0; }
.stat-v {
  font: 700 16px/1.2 'Barlow', system-ui, sans-serif; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.stat-l {
  font: 700 9px/1.3 'Barlow', system-ui, sans-serif; letter-spacing: .07em;
  text-transform: uppercase; color: var(--gray); margin-top: 4px;
}

.site-flag {
  margin-top: 12px; padding: 7px 10px; border-radius: 3px;
  background: var(--warn-bg); color: var(--warn);
  font-size: 12px; font-weight: 600;
}

.pending-list {
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
}
.pending {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.pending:last-child { border-bottom: 0; }
.pending-name { flex: 1 1 auto; font-size: 14px; color: var(--navy); font-weight: 600; }
.pending-base { font-size: 12px; color: var(--gray); font-family: ui-monospace, monospace; }

.empty {
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
  padding: 40px; text-align: center; color: var(--gray); font-size: 14px;
}

.footer-note {
  margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--gray);
}

@media (max-width: 640px) {
  .site-grid { grid-template-columns: 1fr; }
  .site-head { flex-wrap: wrap; }
  .brandbar .whoami { display: none; }
}
