/* Developer Agreements Register
   ------------------------------------------------------------------
   FONTS - change these three lines to restyle the whole register.
   Nothing else in this file needs touching.

   Other options, paste over the values below:

     Poppins       "Poppins", Tahoma, sans-serif          (matches the logo)
     Tahoma        Tahoma, Verdana, Geneva, sans-serif
     Segoe UI      "Segoe UI", Tahoma, sans-serif
     Arial         Arial, Helvetica, sans-serif

   All three are Poppins, in different weights. --font-data carries the dates
   and countdowns; its digits are set to a fixed width so columns still line
   up without a second typeface.
   ------------------------------------------------------------------ */

:root {
  --font-display: "Poppins", Tahoma, Verdana, sans-serif;
  --font-body:    "Poppins", Tahoma, Verdana, sans-serif;
  --font-mono:    "Poppins", Tahoma, Verdana, sans-serif;
}

:root {
  /* Springfield Properties - navy and red taken from the logo itself */
  --brand:      #234390;   /* the wordmark navy - buttons and links */
  --brand-deep: #16295e;   /* darker navy - the header sits in this */
  --brand-dark: #1a3372;   /* pressed and hover states */
  --brand-soft: #eef1f9;   /* pale navy wash */
  --edge:       #0b0f1a;   /* the rule under the header */
  --accent:     #ee1e24;   /* the map pin red, kept for reference */

  --paper:   #eef0f4;
  --surface: #ffffff;
  --ink:     #1b2440;
  --muted:   #6b7488;
  --rule:    #dce0e8;

  /* Status colours stay a traffic light, deliberately separate from the
     brand: green means in date, amber means running out, red means gone. */
  --ok:      #157347;
  --amber:   #9a6510;
  --rust:    #cc1b21;
  --slate:   #4a5578;

  --shadow:  0 1px 2px rgba(27, 36, 64, .06), 0 8px 24px -16px rgba(27, 36, 64, .30);
  --radius:  6px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14.5px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { width: min(1360px, 100% - 3rem); margin-inline: auto; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--brand-deep);
  color: #ffffff;
  border-bottom: 3px solid var(--edge);
}
.topbar-in {
  display: flex; align-items: center; gap: 1.75rem;
  min-height: 60px; flex-wrap: wrap; padding: .5rem 0;
}
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand-text {
  font: 500 9.5px/1.5 var(--font-mono);
  letter-spacing: .17em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
  padding-left: .85rem; border-left: 1px solid rgba(255,255,255,.28);
}
.nav { display: flex; gap: 1.6rem; margin-right: auto; flex-wrap: nowrap; white-space: nowrap; }
.nav a {
  color: rgba(255,255,255,.72); font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem 0; border-bottom: 3px solid transparent;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.on { color: #fff; border-bottom-color: var(--accent); }
.who { display: flex; align-items: center; gap: .6rem; font-size: 13px; white-space: nowrap; }
.who-name { color: #fff; }
.who-sep { color: rgba(255,255,255,.35); }
.signout { color: rgba(255,255,255,.75); font-size: 13px; }
.signout:hover { color: #fff; }

/* sub-tabs: the white strip under the top bar */
.subnav { background: #ffffff; border-bottom: 1px solid var(--rule); }
.subnav-in { display: flex; gap: .4rem; white-space: nowrap; overflow-x: auto; }
.subnav-in a {
  color: #5b6475; font-size: 13.5px; padding: .8rem .7rem .65rem;
  border-bottom: 2px solid transparent;
}
.subnav-in a:hover { color: var(--brand-deep); text-decoration: none; }
.subnav-in a.on { color: var(--brand-deep); font-weight: 500; border-bottom-color: var(--brand-deep); }

/* placeholder for tabs not built yet */
.soon { text-align: center; padding: 4.5rem 1rem; color: #5b6475; }
.soon h1 { color: var(--brand-deep); margin-bottom: .4rem; }

/* ------------------------------------------------------------- structure */
main.wrap { padding: 2rem 0 3rem; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
h1 {
  font: 600 26px/1.25 var(--font-display);
  margin: 0; letter-spacing: -.005em;
}
h2 {
  font: 600 17px/1.3 var(--font-display);
  margin: 0 0 .85rem;
}
.eyebrow {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 .35rem;
}
.sub { color: var(--muted); font-size: 14px; margin: .35rem 0 0; }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem; margin-bottom: 1.5rem;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--rule);
}
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1.6fr 1fr; align-items: start; }

/* ------------------------------------------------------------ watch band */
/* The one loud element: what needs attention, counted. */
.watch {
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.5rem;
}
.watch.alarm { border-left-color: var(--rust); }
.watch-cell {
  padding: 1.15rem 1.3rem; border-right: 1px solid var(--rule);
  display: block; color: inherit;
}
.watch-cell:last-child { border-right: 0; }
.watch-cell:hover { background: #f7f9fa; text-decoration: none; }
.watch-num {
  font: 600 30px/1 var(--font-display); display: block;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.watch-label {
  font: 500 11px/1.4 var(--font-mono); letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); display: block; margin-top: .5rem;
}
.n-expired  { color: var(--rust); }
.n-expiring { color: var(--amber); }
.n-active   { color: var(--ok); }
.n-review   { color: var(--slate); }

/* --------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; }
thead th {
  font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); text-align: left;
  padding: .85rem 1.15rem; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
thead th a { color: inherit; }
tbody td { padding: 1rem 1.15rem; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f9fc; }
.t-name { font-weight: 600; font-size: 14.5px; }
.t-name a { color: var(--ink); }
.t-sub { color: var(--muted); font-size: 12.5px; margin-top: .2rem; }
.mono, .num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 400;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.num { white-space: nowrap; }
.right { text-align: right; }

/* ------------------------------------------------------------- term bar */
/* Signature element: how much of the agreed term has been used up. */
.term { display: block; width: 92px; height: 3px; background: #e3e8ec; border-radius: 2px; }
.term span { display: block; height: 100%; border-radius: 2px; background: var(--ok); }
.term-expiring span { background: var(--amber); }
.term-expired  span { background: var(--rust); }

/* ---------------------------------------------------------------- pills */
.pill {
  display: inline-block; padding: .25rem .75rem; border-radius: 100px;
  font: 500 12px/1.5 var(--font-body); white-space: nowrap;
  border: 1px solid;
}
.pill-active       { color: var(--ok);     border-color: #b8ddc8; background: #eff8f3; }
.pill-expiring     { color: var(--amber); border-color: #e6cfa5; background: #fdf6e9; }
.pill-expired      { color: var(--rust);  border-color: #f0c3c4; background: #fdf1f1; }
.pill-pending,
.pill-registration,
.pill-renewal,
.pill-not_signed   { color: var(--slate); border-color: #ccd4e8; background: var(--brand-soft); }
.pill-open         { color: var(--brand);  border-color: #c3cfe8; background: var(--brand-soft); }
.pill-unknown      { color: var(--muted); border-color: var(--rule); background: #f4f6f8; }

.tag {
  display: inline-block; font: 500 10.5px/1.5 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 3px; padding: .05rem .4rem;
}
.tag-flag { color: var(--amber); border-color: #e6cfa5; background: #fdf6e9; }

/* --------------------------------------------------------------- forms */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
input[type=text], input[type=search], input[type=date], input[type=email], input[type=password], select, textarea {
  font: 400 14px/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .5rem .65rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(35,67,144,.15); }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 260px; }
textarea { min-height: 90px; resize: vertical; }

.field { margin-bottom: 1rem; }
.field label {
  display: block; font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .4rem;
}
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: .3rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn {
  display: inline-block; font: 500 14px/1 var(--font-body);
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: var(--radius); padding: .6rem .95rem; cursor: pointer;
}
.btn:hover { background: #2a3557; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: #f2f5f7; }
.btn-danger { background: transparent; color: var(--rust); border-color: #f0c3c4; }
.btn-danger:hover { background: #fdf1f1; }
.btn-sm { font-size: 12.5px; padding: .35rem .6rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------- record */
.record-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.1rem 1.5rem; }
.fact dt {
  font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .3rem;
}
.fact dd { margin: 0; font-size: 14.5px; }
.countdown {
  font: 600 30px/1 var(--font-display); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.countdown small { font: 400 12px/1 var(--font-mono); color: var(--muted); display: block; margin-top: .4rem; letter-spacing: .1em; text-transform: uppercase; }

.docs { list-style: none; margin: 0; padding: 0; }
.docs li {
  display: flex; align-items: center; gap: .85rem; padding: .75rem 0;
  border-bottom: 1px solid #eef1f4; flex-wrap: wrap;
}
.docs li:last-child { border-bottom: 0; }
.doc-main { flex: 1; min-width: 200px; }
.doc-name { font-weight: 500; font-size: 14px; }
.doc-meta { color: var(--muted); font-size: 12.5px; margin-top: .1rem; }

.log { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.log li { padding: .55rem 0; border-bottom: 1px solid #eef1f4; }
.log li:last-child { border-bottom: 0; }
.log time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: block; }

.flash {
  border: 1px solid var(--rule); border-left: 3px solid var(--brand);
  background: var(--surface); border-radius: var(--radius);
  padding: .8rem 1rem; margin: 0 0 1.5rem; font-size: 14px;
}
.flash-warn  { border-left-color: var(--amber); }
.flash-error { border-left-color: var(--rust); }

.empty { padding: 2.5rem 1.35rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: .3rem; }

.foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem 0 2.5rem; color: var(--muted);
  font: 400 11.5px/1.5 var(--font-mono); letter-spacing: .05em;
  border-top: 1px solid var(--rule);
}

/* ----------------------------------------------------------- sign in page */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.signin-card {
  background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--brand);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2.25rem; width: min(420px, 100%); text-align: center;
}
.signin-card h1 { font-size: 21px; margin-bottom: .5rem; }
.signin-logo { width: 210px; max-width: 70%; height: auto; margin: 0 auto 1.5rem; display: block; }
.signin-card p { color: var(--muted); font-size: 14px; }
.gbtn { display: flex; justify-content: center; margin: 1.5rem 0 .5rem; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .watch { grid-template-columns: 1fr 1fr; }
  .watch-cell:nth-child(2) { border-right: 0; }
  .watch-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 1.75rem); }
  .brand-text { display: none; }        /* logo alone on a narrow screen */
  .nav { order: 4; width: 100%; overflow-x: auto; gap: 1.1rem; }
  .brand img { height: 22px; }
  .row2 { grid-template-columns: 1fr; }
  .topbar-in { align-items: flex-start; }
  .who { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.22); padding-top: .5rem; }
  .responsive thead { display: none; }
  .responsive tbody tr {
    display: block; padding: .9rem 1rem; border-bottom: 1px solid var(--rule);
  }
  .responsive tbody td {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .25rem 0; border: 0; text-align: right;
  }
  .responsive tbody td::before {
    content: attr(data-label);
    font: 400 10px/1.6 var(--font-mono); letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted); text-align: left;
  }
  .responsive tbody td.t-name-cell { display: block; text-align: left; padding-bottom: .5rem; }
  .responsive tbody td.t-name-cell::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .filters, .actions, .foot { display: none; }
  body { background: #fff; }
}
