/* TrackingMyStuff — the hub. The same palette as the apps, so stepping
   through the door feels like one place. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line: #dde3ea;
  --ink: #17202b;
  --ink-soft: #5c6774;
  --accent: #1b5e8f;
  --accent-soft: #e2edf6;
  --good: #1e6f4e;
  --warn: #8a5a00;
  --bad: #b0332a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #101418; --surface: #181e25; --line: #2a333d; --ink: #e6ebf0; --ink-soft: #9aa6b2; --accent: #7fb3dc; --accent-soft: #1f3345; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; }

.top { padding: 22px 16px 8px; }
.brand { display: flex; align-items: center; gap: 14px; max-width: 980px; margin: 0 auto; }
.brand h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.brand p { margin: 2px 0 0; }
.brand-link { color: inherit; text-decoration: none; display: inline-flex; }
.mark { flex: 0 0 auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

main { max-width: 980px; margin: 0 auto; padding: 8px 16px 40px; }
h2 { font-size: 20px; margin: 14px 0 10px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
h4 { font-size: 14px; margin: 16px 0 6px; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; min-height: 96px; }
.tile a, .tile .tile-inner { display: flex; align-items: center; gap: 14px; padding: 18px 16px; color: inherit; text-decoration: none; height: 100%; }
.tile a:hover, .tile a:focus-visible { outline: none; }
.tile:has(a:hover), .tile:has(a:focus-visible) { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 24, 40, .12); }
.tile-icon { flex: 0 0 44px; color: var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 6px; }
.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-text strong { font-size: 18px; }
.tile.soon { opacity: .75; }
.tile.soon .tile-icon, .tile.off .tile-icon { color: var(--ink-soft); background: var(--bg); filter: grayscale(1); }
.pill { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
td .pill { position: static; }
.dot { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.up { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.down { background: var(--bad); }
.dot[hidden] { display: none; }
.foot { margin: 22px 4px 0; }

/* Buttons, forms, sheets. */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 4px 9px; font-size: 13px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=url] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; background: var(--surface); color: var(--ink); }
input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 460px; margin: 16px auto; }
.sheet.secret { max-width: none; border-color: var(--warn); }
.error { color: var(--bad); }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px 16px; }
.table-wrap { overflow-x: auto; }
table.admin { width: 100%; border-collapse: collapse; }
table.admin th, table.admin td { text-align: left; padding: 8px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.admin th { border-top: 0; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
form.inline { display: inline; }
.ok { color: var(--good); font-weight: 600; }
details.edit { display: inline-block; }
details.edit summary { list-style: none; display: inline-block; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] { display: block; margin-top: 6px; }
details.edit form { margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1 1 180px; }

/* The on/off switch on the admin page. */
.switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px 4px 4px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on span { background: var(--good); }
.switch.on span::after { left: 16px; }

.sheet.wide { max-width: 720px; }

/* The eye beside a password box. */
.pw-wrap { display: flex; gap: 4px; align-items: stretch; width: 100%; }
.pw-wrap input { flex: 1 1 auto; min-width: 0; }
.eye { flex: 0 0 auto; width: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.eye:hover, .eye:focus { color: var(--accent); border-color: var(--accent); outline: none; }

/* Access ticks on the admin page. */
form.access { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
label.tick { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; font-size: 13px; }

.access { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.actions-left { margin: 10px 0 0; }

.tile-logo { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: block; }
.tile.soon .tile-logo, .tile.off .tile-logo { filter: grayscale(1); opacity: .7; }

/* Sections on the admin page fold: the heading is the handle, and the page remembers which are open. */
details.section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; user-select: none; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(-45deg); margin-top: 12px; transition: transform .15s; flex: 0 0 auto; }
details.section[open] > summary::before { transform: rotate(45deg); }
details.section > summary:hover h3 { color: var(--accent); }
/* About you — the one block, the same in every TrackingMy app: Teams' look. */
.about .fg { margin: 0 0 10px; min-width: 0; }
.about .fg label { display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 3px; }
.about .fg label .hint { text-transform: none; letter-spacing: 0; font-size: 10px; opacity: .8; }
.about .fg input { width: 100%; box-sizing: border-box; font-size: 13px; padding: 7px 10px; border-radius: 8px; margin: 0; }
.about .fr { display: grid; gap: 10px; }
.about .about-name { grid-template-columns: .7fr 1.3fr 1fr 1.3fr .7fr; }
.about .about-when { grid-template-columns: 1fr 1fr 1fr; }
.about .about-where { grid-template-columns: 1.6fr .9fr .9fr 1.4fr; }
.about .auth-hint, .about .about-hint { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
@media (max-width: 560px) { .about .about-name, .about .about-when, .about .about-where { grid-template-columns: 1fr 1fr; } }
