:root {
  --bg: #17281f; --panel: #21392c; --line: #ffffff22; --fg: #f4efe0; --dim: #b8c7b4;
  --accent: #f59a23; --danger: #e5624f; --good: #9fe07a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, sans-serif; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; color: var(--dim); }
a { color: inherit; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: #0003; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; }
button { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 11px; cursor: pointer; font-weight: 600; }
button:hover:not(:disabled) { border-color: #ffffff66; }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #2c1b05; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.error { color: #ff9a8b; min-height: 20px; margin: 0; }
.dim { color: var(--dim); }
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
#loginForm { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; }
#loginForm label, #askLabel { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 14px; }
header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px; }
#tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
#tabs button { background: none; border-color: transparent; }
#tabs button.on { background: #0003; border-color: var(--line); color: var(--accent); }
#tabs .count { color: var(--accent); margin-left: 4px; }
#who { color: var(--dim); font-size: 14px; }
#view { max-width: 1100px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { color: var(--dim); font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row input[type=search], .row textarea, .grow { flex: 1 1 200px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--dim); font-weight: 600; white-space: nowrap; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.link { cursor: pointer; }
tr.link:hover td { background: #ffffff0a; }
.tag { display: inline-block; border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 700; background: #0004; }
.tag.bad { background: var(--danger); color: #fff; }
.tag.warn { background: var(--accent); color: #2c1b05; }
.tag.ok { background: var(--good); color: #123; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 14px; margin: 0; }
.facts dt { color: var(--dim); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.body { overflow-wrap: anywhere; white-space: pre-wrap; }
dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: #0009; }
dialog p { margin: 0 0 10px; overflow-wrap: anywhere; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
#askText { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The eye beside password fields: shows or hides what was typed. */
.peek { position: relative; display: block; width: 100%; }
.peek > input { width: 100%; padding-right: 46px; }
.peek-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: none; font-size: 18px; line-height: 1; cursor: pointer; }
.peek-eye:hover { background: #0000000f; }
.peek-eye:focus-visible { outline: 2px solid #f59a23; }

/* A bar per day in "Dia a dia": its length is that day's new visits against the busiest day. */
td.grow { width: 50%; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar i { display: block; height: 12px; min-width: 2px; border-radius: 6px; background: linear-gradient(90deg, #f7a325, #ffcf4a); }
.bar b { font-variant-numeric: tabular-nums; }
