:root {
  --bg: #f5f6f8; --panel: #fff; --line: #e3e6ea;
  --text: #1c2530; --dim: #6b7684;
  --brand: #4d148c;           /* FedEx purple, feels familiar to the team */
  --accent: #ff6200;          /* FedEx orange */
  --good: #1d7f3f; --bad: #c0392b; --warn: #b7791f;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); }

header { display: flex; align-items: center; gap: 24px; padding: 10px 24px;
         background: var(--brand); color: #fff; }
.brand { font-size: 17px; font-weight: 700; }
.brand span { font-weight: 400; opacity: .85; }
nav { display: flex; gap: 4px; flex: 1; }
nav a { color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 6px; opacity: .85; }
nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
nav a.on { background: rgba(255,255,255,.18); opacity: 1; font-weight: 600; }
.who { color: #fff; opacity: .9; } .who a { color: #fff; }

main { max-width: 1200px; margin: 24px auto; padding: 0 24px; }
h2 { margin: 28px 0 10px; font-size: 17px; }
h3 { margin: 0 0 6px; }
section { margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; background: var(--panel);
        border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
th { background: #fafbfc; font-weight: 600; color: var(--dim); font-size: 12.5px;
     text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tr.muted td { opacity: .55; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }

.stats { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
        padding: 14px 22px; min-width: 150px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--dim); }
.stat.bad .n { color: var(--bad); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 20px;
        font-size: 12px; font-weight: 600; }
.pill.on   { background: #e2f4e8; color: var(--good); }
.pill.run  { background: #ffe9d9; color: var(--accent); }
.pill.idle { background: #eef0f3; color: var(--dim); }
.pill.off  { background: #fbe4e1; color: var(--bad); }
.pill.st-e     { background: #e2f4e8; color: var(--good); }
.pill.st-nf    { background: #fdf3dc; color: var(--warn); }
.pill.st-error { background: #fbe4e1; color: var(--bad); }
.pill.st-hold, .pill.st-skip { background: #eef0f3; color: var(--dim); }

.filters { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
input, select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
                font: inherit; background: #fff; }
input[name="q"] { min-width: 220px; }
button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 7px;
         background: var(--brand); color: #fff; font: inherit; cursor: pointer; }
button:hover { filter: brightness(1.12); }
button.small { padding: 4px 10px; font-size: 12.5px; }
button.good { background: var(--good); }
form.inline { display: inline; }
form.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
form.row input { flex: 1; min-width: 240px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
        padding: 14px 18px; margin: 12px 0; }
.card.ack { border-left: 4px solid var(--warn); }
.card-head { display: flex; gap: 12px; align-items: center; color: var(--dim); }
.msg { margin: 8px 0 4px; font-weight: 500; }
.ctx { background: #f7f8fa; border: 1px solid var(--line); border-radius: 7px;
       padding: 10px; font-size: 12px; overflow-x: auto; max-height: 180px; }
.keycard { border-left: 4px solid var(--accent); }
.key { background: #1c2530; color: #7ce38b; padding: 12px; border-radius: 7px;
       font-size: 15px; overflow-x: auto; user-select: all; }

.login-page { display: grid; place-items: center; min-height: 100vh; background: var(--brand); }
.login-card { background: #fff; padding: 44px 52px; border-radius: 14px; text-align: center;
              box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.login-card h1 { margin: 0 0 6px; color: var(--brand); }
.login-card .g_id_signin { display: flex; justify-content: center; margin-top: 18px; }
.warn { color: var(--warn); max-width: 340px; }
code { background: #f0f1f4; padding: 1px 5px; border-radius: 4px; }
