/* URLSHRT brand pack — Governance, 2026-08-17.
 *
 * The identity is inherited rather than invented. The holding page this replaces used
 * the wordmark URLSHRT in wide letter-spacing on navy #0B2A5B, so that navy is the
 * anchor colour and the wordmark keeps its spacing. Everything else is built around it.
 *
 * Deliberately NOT the DraxCoders palette. That is an internal infrastructure identity
 * used for alerts to Ross; this is a product surface with its own name, and Ross has
 * said it might be commercialised later. Borrowing the alert branding would make that
 * harder to unpick, not easier.
 */

:root {
  --navy:        #0B2A5B;   /* inherited from the holding page — the anchor */
  --navy-deep:   #071B3C;
  --navy-line:   #16386F;
  --ink:         #F2F6FF;
  --ink-dim:     #8FA6CE;
  --accent:      #35C3F3;   /* link cyan — reads as "connection", high contrast on navy */
  --accent-deep: #1AA5D6;
  --good:        #2ED47A;
  --bad:         #FF6B5E;
  --warn:        #FFB020;
  --radius:      10px;
  --shadow:      0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 860px;
  /* min() so the padding cannot force a horizontal scroll on a narrow phone — the
   * single most common responsive bug in the standing orders. */
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ---- wordmark ------------------------------------------------------------ */
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.brand svg { flex: 0 0 auto; }
.brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.25em;   /* inherited from the holding page */
  color: var(--ink);
}
.brand h1 span { color: var(--accent); }
.tagline { margin: 0 0 28px; color: var(--ink-dim); font-size: 14px; letter-spacing: 0.04em; }

/* ---- panels -------------------------------------------------------------- */
.panel {
  background: var(--navy);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.panel .hint { margin: 0 0 18px; font-size: 13px; color: var(--ink-dim); }

/* ---- tabs ---------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a {
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-dim);
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on {
  background: var(--navy);
  border-color: var(--navy-line);
  color: var(--ink);
}

/* ---- form ---------------------------------------------------------------- */
label { display: block; font-size: 13px; color: var(--ink-dim); margin: 14px 0 6px; }
input[type=text], input[type=url], input[type=password] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--navy-line);
  background: var(--navy-deep);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

.prefix { display: flex; align-items: stretch; }
.prefix .tag {
  display: flex; align-items: center;
  padding: 0 12px;
  background: var(--navy-line);
  border: 1px solid var(--navy-line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  font-size: 14px; color: var(--ink-dim); white-space: nowrap;
}
.prefix input { border-radius: 0 8px 8px 0; }

button {
  margin-top: 20px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #04263A;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
button:hover { background: var(--accent-deep); }
button.ghost { background: transparent; border: 1px solid var(--navy-line); color: var(--ink-dim); }

/* ---- messages ------------------------------------------------------------ */
.msg { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.msg.ok   { background: rgba(46,212,122,.10); border-left: 3px solid var(--good); }
.msg.err  { background: rgba(255,107,94,.10); border-left: 3px solid var(--bad); }
.msg.warn { background: rgba(255,176,32,.10); border-left: 3px solid var(--warn); }

.result { margin-top: 4px; }
.result .short {
  display: inline-block;
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}
.result .dest { font-size: 13px; color: var(--ink-dim); word-break: break-all; }

/* ---- tables -------------------------------------------------------------- */
.scroller { overflow-x: auto; }          /* wide content scrolls in its own box */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--navy-line); }
th { color: var(--ink-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { color: var(--accent); text-decoration: none; word-break: break-all; }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
  flex: 1 1 130px;
  background: var(--navy-deep);
  border: 1px solid var(--navy-line);
  border-radius: 8px;
  padding: 14px;
}
.stat .n { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .07em; }

footer { margin-top: 34px; font-size: 12px; color: var(--ink-dim); }
footer a { color: var(--ink-dim); }

@media (max-width: 560px) {
  .brand h1 { font-size: 21px; letter-spacing: 0.18em; }
  .panel { padding: 18px; }
}

/* The created link is an anchor now, not a label — Ross asked to be able to click it.
   Underlined on hover only, so the result still reads as a headline rather than as body copy. */
a.short:hover { text-decoration: underline; }

/* Delete is the one irreversible action here, so it does not look like the others. */
button.danger { background: var(--bad); color: #2A0703; }
button.danger:hover { background: #E2564A; }
