/* ----------------------------------------------------------------------------------------------------
   ops/static/ops.css: The look of the MJ Rost Operations pages, in MJ Rost Logistics' own brand.

   What: Design tokens first (color, type, space, radius, shadow), then resets, then components. Phone first:
         the base styles are for a 375-wide screen, with additions at 768 and 1280.
   Why:  The pages should feel like part of MJ Rost, not a generic tool. Every color comes from the logo or the
         website's own styles (read October 13, 2026):
           logo navy #181d55 and teal #195354 (measured from the logo file);
           site navy #1a1f3c / #2D3561 / #3D4A7A, gold #D4A017 (hover #b88a12), warm paper #f5f4f0.
         Type follows the site: the system sans-serif, bold headings, small wide-spaced capitals for labels.
   Contrast: every text color is checked against its background (WCAG AA, 4.5 to 1 or better). Gold on white is
         only 2.4 to 1, so gold is used for fills and on dark backgrounds only; on light backgrounds labels use
         the darker gold --gold-text (6.3 to 1).

   Version:       0.1.0
   First written: Tuesday, October 13, 2026 at 10:59 AM ET
   Author:        Stand And Stretch
   Undo:          delete this file and the link to it in ops/signin.py; the pages fall back to plain HTML.
   ---------------------------------------------------------------------------------------------------- */

/* ================================================================ 1. tokens */
:root {
  --ink: #1a1f3c;          /* headings, darkest navy (site) */
  --navy: #2D3561;         /* primary surfaces and buttons (site) */
  --navy-2: #3D4A7A;       /* hover, secondary navy (site) */
  --navy-logo: #181d55;    /* the logo's navy */
  --teal: #195354;         /* the logo's teal: "approved" and good news */
  --teal-tint: #e3efee;
  --gold: #D4A017;         /* the site's accent: fills and dark backgrounds only */
  --gold-hover: #b88a12;
  --gold-text: #7a5c08;    /* gold for text on light backgrounds (AA) */
  --gold-tint: #fbf3dc;
  --held: #9a3412;
  --held-tint: #ffedd5;
  --paper: #f5f4f0;        /* the site's warm off-white */
  --white: #ffffff;
  --text: #374151;
  --muted: #4b5563;
  --line: #e4e1d8;
  --input-line: #8b8fa8;
  --on-dark-muted: #cfd3e6;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); --fs-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --radius: 8px;           /* the site's --radius .5rem */
  --radius-lg: 16px;       /* the site's rounded-2xl cards */
  --shadow: 0 1px 2px rgba(26, 31, 60, 0.06), 0 4px 16px rgba(26, 31, 60, 0.06);
  --focus: 0 0 0 3px var(--gold);
  --max: 1120px;
}

/* ================================================================ 2. resets */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 var(--fs-md)/1.6 var(--font);
       min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 var(--s3); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s4); }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-2); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
button, input { font: inherit; }

/* ================================================================ 3. components */
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--white); padding: var(--s2) var(--s4); z-index: 10; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--s4); padding-right: var(--s4); }

/* header and menu (a details element, so the phone menu works without any script) */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand-label { display: none; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
                  width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 22px; height: 22px; }
.menu[open] > summary { background: var(--paper); }
.menu-panel { position: absolute; right: 0; top: 52px; min-width: 240px; background: var(--white); border: 1px solid var(--line);
              border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s2); z-index: 5; }
.nav { display: flex; flex-direction: column; gap: var(--s1); }
.nav a, .nav button { display: block; width: 100%; text-align: left; padding: var(--s3) var(--s4); border-radius: var(--radius);
                      color: var(--ink); text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--paper); }
.nav a[aria-current="page"] { color: var(--navy); background: var(--paper); }
.nav form { margin: 0; }
.who { padding: var(--s3) var(--s4) var(--s2); font-size: var(--fs-sm); color: var(--muted); border-bottom: 1px solid var(--line);
       margin-bottom: var(--s1); overflow-wrap: anywhere; }

/* page band: navy, like the site's sections */
.band { background: var(--ink); color: var(--white); padding: var(--s6) 0 var(--s7); }
.band h1 { color: var(--white); font-size: var(--fs-2xl); margin: 0; }
.band p { color: var(--on-dark-muted); margin: var(--s2) 0 0; }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
           color: var(--gold-text); margin-bottom: var(--s3); }
.band .eyebrow { color: var(--gold); border: 1px solid rgba(212, 160, 23, 0.55); border-radius: 999px; padding: var(--s1) var(--s3); }

main { flex: 1; display: flex; flex-direction: column; }   /* lets the sign-in card center in the space */
.page { padding-top: var(--s6); padding-bottom: var(--s7); }   /* top and bottom only: the side gutter comes from .wrap */
.band + .page { padding-top: 0; margin-top: calc(-1 * var(--s6)); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
        padding: var(--s5); }
.card + .card { margin-top: var(--s4); }
.card h2 { font-size: var(--fs-lg); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }

/* sign-in: one centered card */
.auth { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: var(--s6) var(--s4) var(--s7); }
.auth .card { width: 100%; max-width: 440px; padding: var(--s6) var(--s5); text-align: left; }
.auth-logo { width: 220px; margin: 0 auto var(--s6); }
.auth h1 { font-size: var(--fs-xl); }
.auth .icon { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; margin-bottom: var(--s4);
              background: var(--teal-tint); color: var(--teal); }
.auth .icon.warn { background: var(--held-tint); color: var(--held); }
.auth .icon svg { width: 24px; height: 24px; }

label { display: block; font-weight: 600; color: var(--ink); margin-bottom: var(--s2); }
input[type=email], input[type=text] { width: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--input-line);
       border-radius: var(--radius); background: var(--white); color: var(--ink); min-height: 48px; }
input::placeholder { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5);
       border-radius: var(--radius); border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer;
       transition: background-color .15s ease, border-color .15s ease; }
.btn-block { width: 100%; margin-top: var(--s4); }
.btn-accent { background: var(--gold); color: var(--ink); }
.btn-accent:hover { background: var(--gold-hover); color: var(--ink); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--input-line); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* cards laid out in a grid keep the grid's even gap, never the stacked-card margin */
.stats > .card, .list > .card, .layout-2 > .card { margin-top: 0; }

/* stats on the home page: three across at every width, compact on a phone */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: var(--s4); }
.stat { display: block; text-decoration: none; color: inherit; padding: var(--s4) var(--s3); }
.stat .num { font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat .label { margin-top: var(--s2); color: var(--muted); font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.stat.attention { border-top: 4px solid var(--gold); }
.stat.good { border-top: 4px solid var(--teal); }
.stat.held { border-top: 4px solid var(--held); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: var(--s1); padding: 2px var(--s3); border-radius: 999px;
        font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.pill-pending { background: var(--gold-tint); color: #6b5007; }
.pill-approved, .pill-create { background: var(--teal-tint); color: var(--teal); }
.pill-held { background: var(--held-tint); color: var(--held); }
.pill-exists { background: #eceef5; color: var(--navy); }

/* list of emails waiting for a check */
.list { display: grid; gap: var(--s3); }
.row { display: grid; gap: var(--s2); padding: var(--s4) var(--s5); text-decoration: none; color: inherit; }
.row:hover { border-color: var(--navy-2); }
.row > .pill { justify-self: start; }   /* a pill keeps its own width, never the card's */
.row-title { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.counts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.count { font-size: var(--fs-sm); color: var(--text); }
.count b { color: var(--ink); }

/* one email's plan */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin: var(--s4) 0; }
.summary div { background: var(--paper); border-radius: var(--radius); padding: var(--s3); text-align: center; }
.summary b { display: block; font-size: 1.5rem; color: var(--ink); }
.summary span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.actions { display: grid; gap: var(--s3); margin: var(--s4) 0 var(--s3); }
.actions .btn { width: 100%; }
.layout-2 { display: grid; gap: var(--s4); }
.po { display: grid; gap: var(--s2); padding: var(--s4) 0; border-top: 1px solid var(--line); }
.po:first-of-type { border-top: 0; }
.po-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.po-num { font-family: var(--mono); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
details.report > summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: var(--s2) 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); border-radius: var(--radius); padding: var(--s4);
      font: 0.8125rem/1.55 var(--mono); color: var(--ink); margin: var(--s3) 0 0; }

.notice { border-radius: var(--radius); padding: var(--s3) var(--s4); background: var(--gold-tint); color: #6b5007; font-weight: 600; }
.notice.good { background: var(--teal-tint); color: var(--teal); }

/* admin tables: stacked rows on a phone (an email address is never broken mid-word), a table from 768 up */
.table, .table tbody, .table tr, .table td { display: block; width: 100%; }
.table { border-collapse: collapse; }
.table thead { display: none; }
.table tr { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.table tbody tr:first-child { border-top: 0; }
.table td { padding: 0; }
.table td + td { color: var(--muted); font-size: var(--fs-sm); }

.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.site-footer .wrap { display: flex; flex-direction: column; gap: var(--s1); padding-top: var(--s4); padding-bottom: var(--s4);
                     font-size: var(--fs-sm); color: var(--muted); text-align: center; }

/* ================================================================ 4. tablet (768 and up) */
@media (min-width: 768px) {
  .wrap { padding-left: var(--s6); padding-right: var(--s6); }
  .site-header .wrap { min-height: 88px; }
  .brand img { height: 56px; }
  .brand-label { display: inline; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
                 color: var(--muted); border-left: 1px solid var(--line); padding-left: var(--s3); }
  .band { padding: var(--s7) 0 var(--s8); }
  .band + .page { margin-top: calc(-1 * var(--s7)); }
  .stats { gap: var(--s5); margin-bottom: var(--s5); }
  .stat { padding: var(--s5); }
  .stat .num { font-size: 2.25rem; }
  .stat .label { font-size: var(--fs-md); }
  .row { grid-template-columns: 1fr auto; align-items: center; }
  .layout-2 { gap: var(--s5); }
  .table { display: table; }
  .table thead { display: table-header-group; }
  .table thead tr { border-top: 0; }
  .table tbody { display: table-row-group; }
  .table tr { display: table-row; padding: 0; }
  .table th, .table td { display: table-cell; width: auto; }
  .table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
              padding: var(--s2) 0; }
  .table td { padding: var(--s3) 0; border-top: 1px solid var(--line); vertical-align: top; }
  .table th + th { padding-left: var(--s4); }
  .table td + td { padding-left: var(--s4); color: var(--text); font-size: var(--fs-md); }
  .table tbody tr:first-child td { border-top: 1px solid var(--line); }
  .site-footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; }
  .auth { align-items: center; }
}

/* ================================================================ 5. wide screens (1024 and up): the menu sits in the header */
.nav-wide { display: none; }
@media (min-width: 1024px) {
  .menu { display: none; }
  .nav-wide { display: flex; align-items: center; gap: var(--s2); }
  .nav-wide a, .nav-wide button { padding: var(--s2) var(--s4); border-radius: var(--radius); color: var(--ink); font-weight: 600;
                                  text-decoration: none; background: none; border: 0; cursor: pointer; }
  .nav-wide a:hover, .nav-wide button:hover { background: var(--paper); }
  .nav-wide a[aria-current="page"] { background: var(--paper); color: var(--navy); }
  .nav-wide form { margin: 0; }
  .nav-wide .signout { border: 1px solid var(--input-line); }
  .nav-wide .who { border: 0; margin: 0 var(--s2) 0 var(--s4); padding: 0; }
}

/* ================================================================ 6. desktop (1280 and up) */
@media (min-width: 1280px) {
  .layout-2 { grid-template-columns: 2fr 1fr; align-items: start; }
}
