/* Stashy Control (17 Nov 2026): cards, pills and colour, with room to breathe. Light and dark follow the device. */
:root {
  --bg: #f4f3ef; --card: #ffffff; --tile: #f8f7f4; --ink: #1d1d1b; --muted: #6f6e69; --line: #e6e4dd; --shadow: 0 1px 2px rgba(20, 20, 15, .05), 0 4px 16px rgba(20, 20, 15, .05);
  --accent: #3b5bdb; --accent-soft: #e8ecff;
  --green: #2f9e5b; --green-soft: #e3f5ea; --amber: #c98a06; --amber-soft: #fdf3dc; --red: #d0453f; --red-soft: #fbe6e5;
  --hot: #f08c3a; --cold: #4c8bd8; --master: #6b4fd8; --master-soft: #efebfd; --preview: #1e9a8a; --preview-soft: #e1f5f2;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211; --card: #1c1c1a; --tile: #232321; --ink: #ecebe6; --muted: #9d9b94; --line: #2f2e2b; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --accent: #8ea4ff; --accent-soft: #252c48;
    --green: #5ac684; --green-soft: #1b3326; --amber: #e9b23d; --amber-soft: #382c12; --red: #ef6e68; --red-soft: #3c1f1e;
    --master: #a996ff; --master-soft: #2b2547; --preview: #4fc9b8; --preview-soft: #17332f;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* layout rules below would otherwise show hidden sections */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 48px 0 14px; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.note { color: var(--muted); font-size: 13px; margin-top: 28px; }
.error { color: var(--red); }
a { color: var(--accent); }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--master)); display: inline-block; }
.mark.big { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px; }
.account { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }

/* Buttons */
button { font: inherit; cursor: pointer; border-radius: 999px; padding: 10px 20px; border: 1px solid transparent; }
button.primary { background: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 7px 16px; font-size: 14px; }
button.ghost:hover { background: var(--tile); }
button:disabled { opacity: .5; cursor: default; }

/* Sign-in */
.signin { display: flex; justify-content: center; padding-top: 8vh; }
.signin .panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 40px; max-width: 440px; text-align: center; }
.signin p { color: var(--muted); margin: 10px 0 26px; }

/* Page head and summary */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .big { font-size: 28px; font-weight: 650; margin-top: 4px; }
.stat.green .big { color: var(--green); } .stat.amber .big { color: var(--amber); } .stat.red .big { color: var(--red); }
/* The tiles that filter the list are buttons */
button.stat { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
button.stat:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--muted); }
button.stat:disabled { opacity: .55; cursor: default; }
button.stat .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
button.stat:disabled .hint { visibility: hidden; }
button.stat.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button.stat.green.active { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
button.stat.amber.active { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
button.stat.red.active { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
button.stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Customer cards */
.cards { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-left: 5px solid var(--muted); }
.card.green { border-left-color: var(--green); } .card.amber { border-left-color: var(--amber); } .card.red { border-left-color: var(--red); }
summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 20px 22px; }
summary::-webkit-details-marker { display: none; }
summary:hover { background: var(--tile); }
.light { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px var(--tile); }
.green .light { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.amber .light { background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.red .light { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
.who { min-width: 0; }
.name { font-size: 17px; font-weight: 650; display: block; }
.who .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px; transition: transform .15s; }
details[open] .chev { transform: rotate(225deg); margin-bottom: -4px; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 18px 52px; }
.body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; padding: 22px 22px 26px 52px; border-top: 1px solid var(--line); }
.body section:first-child { grid-column: 1 / -1; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--tile); border-radius: 12px; padding: 12px 14px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 20px; font-weight: 650; margin-top: 2px; }
.tile .extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 550; line-height: 1.4; background: var(--tile); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.tile .value .pill { font-size: 16px; padding: 2px 12px; }
.pill.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.pill.bad { background: var(--red-soft); color: var(--red); border-color: transparent; }
.pill.muted { color: var(--muted); }
.pill.region { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.release { background: var(--master-soft); color: var(--master); border-color: transparent; }
.pill.master { background: var(--master-soft); color: var(--master); border-color: transparent; }
.pill.preview { background: var(--preview-soft); color: var(--preview); border-color: transparent; }
.pill.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 500; }
.pill.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.status.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.status.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.pill.status.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles + .chips { margin-top: 10px; }
.tiles + .sub { margin-top: 14px; margin-bottom: 8px; }

/* Links to the error log (Google Cloud's own page) */
.h3row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.h3row h3 { margin: 0; }
.h3row + .tip { margin: -6px 0 12px; font-size: 12px; }
.loglink { font-size: 13px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.loglink::after { content: " ↗"; }
.loglink:hover { text-decoration: underline; }
.tile .extra .loglink { font-size: 12.5px; }
a.pill { text-decoration: none; cursor: pointer; }
a.pill::after { content: "↗"; font-size: 11px; opacity: .7; }
a.pill:hover { filter: brightness(.95); box-shadow: 0 0 0 2px var(--red-soft); }

/* Storage bar */
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--tile); margin-top: 14px; }
.bar .hot { background: var(--hot); } .bar .cold { background: var(--cold); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.legend .sub { margin: 0; }
.pill.hot-key::before, .pill.cold-key::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.pill.hot-key::before { background: var(--hot); } .pill.cold-key::before { background: var(--cold); }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Sign-in log */
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.log { width: 100%; border-collapse: collapse; font-size: 14px; }
.log th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); }
.log td { padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.log tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); }

/* Narrow screens (phones) */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:first-child { grid-column: 1 / -1; }
  summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; padding: 18px; }
  .tags { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .when { grid-column: 2 / -1; grid-row: 3; }
  .chev { grid-column: 3; grid-row: 1; }
  .reasons { padding: 0 18px 16px; }
  .body { grid-template-columns: 1fr; padding: 18px; gap: 24px; }
}
@media (max-width: 480px) {
  main { padding: 20px 16px 60px; }
  .top { padding: 12px 16px; }
  .account span { display: none; }
  .signin .panel { padding: 28px 22px; }
  h1 { font-size: 24px; }
}
.body .wide { grid-column: 1 / -1; margin: 0; }
