/* =========================================================================
   NSBIZ — the compatibility layer. NSBIZ-REWORK-1, 2026-11-12.

   🔴 THIS FILE IS TEMPORARY AND IT SHRINKS EVERY PHASE. When it is empty,
   delete it, delete `.nslegacy` from `templates/_shell.twig`, and delete this
   note. Nothing may be ADDED here that is not a rule being rescued from a
   layout; a new page writes kit components.

   ── WHY IT EXISTS ──────────────────────────────────────────────────────

   REWORK-1 replaced the FRAME on all three surfaces and restyled no page
   body, which was the instruction. But the three old layouts carried their
   page bodies' CSS inside their own `<style>` blocks — 338 uses of `.panel`,
   `.note`, `.err`, `.tag`, the
   issues table, the partner `.pp-*` set — and deleting the layouts without
   rescuing those rules would have blanked the styling of every screen in the
   product on the day the frame changed.

   So they are here, verbatim, scoped under `.nslegacy`, which the shell puts
   on the content wrapper of any page that has not been converted yet. A
   converted page overrides `{% block contentclass %}` to nothing and leaves
   this file behind one page at a time — which is the only way a rework of
   139 templates gets finished rather than abandoned half-done.

   ── WHAT THE KIT'S GLOBAL RULES DO TO AN UNCONVERTED BODY ──────────────

   The kit's whole global footprint is thirteen selectors: `*`, `html`,
   `body`, `h1`, `h2`, `h3`, `p`, `a`, `:focus-visible` and `[x-cloak]`.
   There is no bare `table`, `button`, `input`, `select`, `textarea` or
   `label` rule in it, which is why this file is as small as it is. Of those
   thirteen, four reach an old page body and three are undone below:

     body font-size   14px (admin) / 15px (client), where every page here was
                      authored against the browser's 16px. 3,162 of this
                      repo's 3,203 CSS lengths are `rem` — root-relative, so
                      untouched — but unstyled text would have shrunk.
                      UNDONE: `.nslegacy { font-size: 1rem }`.

     h1 / h2 / h3     `margin: 0`, weight 600, and 20/14/13px. `h2` at 14px is
                      SMALLER than the body text around it and `margin: 0`
                      runs a heading into the paragraph under it. 205 heading
                      tags in page bodies. UNDONE below.

     p                `margin: 0 0 8px`. UNDONE: back to `1em 0`.

     a                brand blue, underline on hover. DELIBERATELY KEPT. The
                      admin layout already declared exactly this; only the
                      tenant side changes, from the browser's default
                      underlined blue, and matching admin is the improvement
                      the kit was adopted for. It is the one global the kit
                      wins outright.

   The page background going from `#f4f7fc` to white is also kept — "a white
   page" was the chosen look and every panel on these screens already draws
   its own 1px border.
   ========================================================================= */

/* ------------------------------------------------------ the column width */
/*
  Each old layout constrained <main> and its page bodies were drawn inside
  that column. In the new shell the content area is ~1,216px at 1440, so a
  760px-authored page stretched to fill it is a page of 150-character lines
  and 1,200px-wide cards. The three widths are the three old `main` rules,
  carried over unchanged.
*/
/*
  CENTRED, because the layouts this replaced centred it: `main { max-width:
  760px; margin: 2rem auto }`. Left-aligning a 760px column inside a 1,216px
  content area puts 456px of white down one side and reads as a page that
  failed to load its right-hand half.
*/
.nslegacy { width: 100%; margin-inline: auto; }
.nslegacy-tenant  { max-width: 760px; }
.nslegacy-admin   { max-width: 1100px; }
.nslegacy-partner { max-width: 980px; }

/* --------------------------------------------- the undone global defaults */
.nslegacy { font-size: 1rem; }

.nslegacy h1, .nslegacy h2, .nslegacy h3,
.nslegacy h4, .nslegacy h5, .nslegacy h6 { font-weight: bold; }
.nslegacy h1 { font-size: 2em;    margin: .67em 0; }
.nslegacy h2 { font-size: 1.5em;  margin: .83em 0; }
.nslegacy h3 { font-size: 1.17em; margin: 1em 0; }
.nslegacy h4 { font-size: 1em;    margin: 1.33em 0; }
/* Both old layouts carried this one line, and it is why every page title on
   this product is brand blue. */
.nslegacy h1 { margin-top: 0; color: var(--brand); }
.nslegacy p { margin: 1em 0; }

/* ======================================================================
   LIFTED VERBATIM FROM templates/tenant/_layout.twig
   ====================================================================== */
.nslegacy label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
.nslegacy input[type=email],
.nslegacy input[type=password] {
  width: 100%; max-width: 340px; padding: .45rem;
  border: 1px solid var(--inputline); border-radius: 3px; font: inherit;
}
.nslegacy button.primary {
  background: var(--brand); color: var(--surface); border: 0; padding: .5rem 1rem;
  border-radius: 3px; cursor: pointer; font: inherit; margin-top: 1rem;
}
.nslegacy .note {
  background: var(--brand50); padding: .6rem .75rem; border-left: 3px solid var(--brand);
  margin: 1rem 0; font-size: .95rem;
}
.nslegacy .err {
  color: var(--bad); background: var(--badbg); padding: .5rem .75rem;
  border-radius: 3px; margin: 1rem 0;
}

/*
  🔴 `.tag` IS NOT ONE RULE. The tenant layout drew it as a pale blue chip
  with blue text and the admin layout as SOLID blue with white text, both
  under the same class name, and 22 page-body uses are split across the two
  surfaces. Collapsing them to one would silently repaint half of them —
  which is exactly the "same badge vocabulary redefined in four places" the
  kit exists to end. Here they stay apart until the pages using them are
  converted to `ui.badge`, which is the one answer.
*/
.nslegacy-tenant .tag,
.nslegacy-partner .tag {
  display: inline-block; padding: .25rem .5rem; background: var(--brand50);
  color: var(--brand); border-radius: 4px; font-size: .85rem; letter-spacing: .05em;
}
.nslegacy-admin .tag {
  display: inline-block; padding: .25rem .5rem; background: var(--brand);
  color: var(--surface); border-radius: 4px; font-size: .85rem; letter-spacing: .05em;
}

/* ======================================================================
   LIFTED VERBATIM FROM templates/admin/_layout.twig
   ====================================================================== */
/* The `.counts` / `.count-card` set (4 rules) was DELETED by NSBIZ-REWORK-3B:
   its last caller was the admin issues list, which is `ui.statcard` now.
   Checked class by class rather than assumed — nothing in templates/ or
   public/js/ names either one. */

.nslegacy .filters {
  margin: 1rem 0; padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; display: flex; gap: .75rem; flex-wrap: wrap; align-items: end;
}
.nslegacy .filters label { margin: 0; }
.nslegacy .filters select,
.nslegacy .filters input {
  padding: .3rem .4rem; border: 1px solid var(--inputline); border-radius: 3px; font: inherit;
}

/*
  The page-level `.flash`. NOT the shell's — the shell renders the kit's
  `ui.flash` for the one message the session carries, and the twelve page
  templates that draw their own stay on this until Phase 2. Two flashes that
  look different on one product is precisely the thing being fixed; this is
  the half of it that is not this phase's job.
*/
.nslegacy .flash {
  background: var(--okbg); border: 1px solid var(--line); color: var(--ok);
  padding: .5rem .75rem; border-radius: 3px; margin-bottom: 1rem;
}

.nslegacy nav.crumbs { margin: .5rem 0; color: var(--muted); font-size: .9rem; }
.nslegacy .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 1rem 1.25rem; margin: 1rem 0;
}
.nslegacy pre.evidence {
  background: var(--bg); padding: .75rem; border-radius: 3px; overflow: auto;
  font-size: .85rem; max-height: 260px;
}
.nslegacy textarea {
  width: 100%; padding: .4rem; border: 1px solid var(--inputline); border-radius: 3px;
  font: inherit; min-height: 5rem;
}

/* The partner `.pp-*` set (8 rules) was DELETED by NSBIZ-REWORK-3A: all seven
   partner screens are converted and no markup names any of those classes any
   more, checked class by class. The `--ink`-meant-brand-blue story those rules
   carried is in templates/partner/_layout.twig and docs/UI-KIT-NSBIZ.md. */
