/* Fuse Footfall portal
   Palette: #0b2541 brand blue, #16335a lifted, #ec7c82 accent pink,
   #c85a61 deeper rose for small text and borders.
   League Spartan for the wordmark only, Hanken Grotesk everywhere else. */

:root {
  --navy: #0b2541;
  --navy-lift: #16335a;
  --pink: #ec7c82;
  --rose: #c85a61;
  --ink: #16202c;
  --muted: #64748b;
  --line: #dfe4ea;
  --page: #f5f6f8;
  --panel: #ffffff;
  --good: #197a56;
  --bad: #b4232c;
  --warn: #9a6212;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--navy-lift); }

/* --- brand ------------------------------------------------------------- */

.brand { display: flex; align-items: baseline; gap: .5rem; text-decoration: none; }
.brand-mark {
  font-family: "League Spartan", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.brand-product { color: rgba(255,255,255,.82); font-weight: 600; letter-spacing: .01em; }
.brand-mark.large { font-size: 2.6rem; color: var(--pink); }
.brand-product.large { font-size: 1.2rem; color: var(--navy); }

/* --- chrome ------------------------------------------------------------ */

.topbar { background: var(--navy); color: #fff; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: .85rem 1.25rem;
  display: flex; align-items: center; gap: 2rem;
}
.nav { display: flex; gap: 1.25rem; flex: 1; }
.nav a {
  color: rgba(255,255,255,.8); text-decoration: none; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; }
.nav a.is-active { color: #fff; border-bottom-color: var(--pink); }

.topbar-user { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.who { color: #fff; font-weight: 500; display: flex; flex-direction: column; line-height: 1.2; }
.who .tenant { font-size: .78rem; color: rgba(255,255,255,.62); font-weight: 400; }
.inline { display: inline; }
button.link {
  background: none; border: 0; color: var(--pink); cursor: pointer;
  font: inherit; font-weight: 600; padding: 0;
}
button.link:hover { color: #fff; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }

.foot {
  max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem 2rem;
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line);
}

/* --- page furniture ---------------------------------------------------- */

.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mono { font-variant-numeric: tabular-nums; }
.num { text-align: right; }
.bad { color: var(--bad); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem;
}
.card-warn { border-color: var(--rose); }
.card-label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.card-figure { font-size: 1.9rem; font-weight: 700; color: var(--navy); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.35rem; margin-bottom: 1.5rem;
}
.panel h2 { margin: 0 0 .85rem; font-size: 1.05rem; color: var(--navy); }

/* --- tables ------------------------------------------------------------ */

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding: .4rem .6rem; border-bottom: 1px solid var(--line);
}
.table th.num { text-align: right; }
.table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td .muted.small { display: block; }
.detail { max-width: 34rem; }

.pill {
  display: inline-block; padding: .12rem .5rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; text-transform: capitalize;
  background: #eef1f5; color: var(--navy-lift);
}
.pill-critical { background: #fbe6e7; color: var(--bad); }
.pill-warning { background: #fdf1dd; color: var(--warn); }
.pill-active { background: #e4f3ec; color: var(--good); }
.pill-decommissioned, .pill-stock { background: #eef1f5; color: var(--muted); }

/* --- forms ------------------------------------------------------------- */

.stack { display: flex; flex-direction: column; gap: .35rem; }
.stack label { font-weight: 600; font-size: .85rem; margin-top: .5rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--pink); outline-offset: 1px; border-color: var(--pink); }

.btn {
  margin-top: 1rem; padding: .6rem 1rem; border: 0; border-radius: 8px;
  background: var(--pink); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--rose); }
.btn-quiet { background: var(--navy); }
.btn-quiet:hover { background: var(--navy-lift); }

.alert { padding: .65rem .8rem; border-radius: 8px; margin: .75rem 0 0; font-size: .9rem; }
.alert-error { background: #fbe6e7; color: var(--bad); border: 1px solid #f2c9cc; }

/* --- sign in ----------------------------------------------------------- */

body.plain { background: var(--navy); }
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.signin-card {
  background: #fff; border-radius: 14px; padding: 2rem 2rem 1.5rem;
  width: 100%; max-width: 380px; box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.signin-brand { display: flex; align-items: baseline; gap: .6rem; }
.signin-lead { color: var(--muted); margin: .35rem 0 1rem; font-size: .9rem; }
.signin-note {
  margin: 1.25rem 0 0; padding-top: .9rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .78rem;
}

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: .75rem 1.25rem; }
  .detail { max-width: none; }
  .table { font-size: .88rem; }
}

/* --- increment two additions ------------------------------------------- */

.card-figure.small-figure { font-size: 1.15rem; font-weight: 600; text-transform: capitalize; }

.chart { width: 100%; height: auto; display: block; margin: .25rem 0 .5rem; }
.chart-bar { fill: var(--navy-lift); }
.chart-bar-alt { fill: var(--pink); }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 11px; font-family: inherit; }

.grid-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; align-items: start; margin-top: .5rem;
}
.grid-form label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .85rem; }
.grid-form label.wide { grid-column: 1 / -1; }
.grid-form .hint { font-weight: 400; font-size: .76rem; color: var(--muted); }
.grid-form .form-actions { grid-column: 1 / -1; }
.grid-form .btn { margin-top: 0; }

.row-form { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.row-form .btn { margin-top: 0; }
.row-form .hint { font-size: .78rem; color: var(--muted); flex-basis: 100%; }

.alert-ok { background: #e4f3ec; color: var(--good); border: 1px solid #bfe3d1; }
.alert-warn { background: #fdf1dd; color: var(--warn); border: 1px solid #f0dcb6; }

.row-quiet td { opacity: .55; }
.plain-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.plain-list li { display: flex; align-items: center; gap: .6rem; }

input[type=date], input[type=datetime-local] {
  padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}

/* --- user administration ----------------------------------------------- */

.check { flex-direction: row !important; align-items: center; gap: .5rem; font-weight: 500; }
.check input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--pink); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
fieldset {
  border: 1px solid var(--line); border-radius: 8px; padding: .85rem 1rem 1rem; margin: 0;
}
fieldset legend { font-weight: 600; font-size: .85rem; padding: 0 .35rem; }
a.who { text-decoration: none; }
a.who:hover { color: var(--pink); }

/* --- provisioning token ------------------------------------------------- */

.token {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem; word-break: break-all; background: #f2f4f7;
  border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; margin: .5rem 0 1rem;
}
.code {
  background: var(--navy); color: #e7edf5; border-radius: 8px; padding: .9rem 1rem;
  overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem; line-height: 1.5;
}
.row-form form.inline { display: inline; }
