/* Finance hub — Tomedes brand, dark: the header and sign-in band are the logo's own navy
   (#042c7f), so the logo's navy block melts into them; the page is a deeper navy. */
:root {
  --brand: #042c7f;
  --accent: #7ea6ff; --accent-strong: #a9c3ff;
  --primary: #2f62e6; --primary-hover: #3f72f2;
  --tint: rgba(126, 166, 255, .12); --tint-line: rgba(126, 166, 255, .35);
  --bg: #071027; --panel: #0e1a39; --panel-2: #0b1530; --line: #1f2f57; --line-strong: #2b3f70;
  --fg: #d6def0; --fg-strong: #ffffff; --muted: #94a3c6;
  --good: #4ccb7f; --warn: #f2c24f; --bad: #ff7b7b; --bad-tint: rgba(255, 123, 123, .1); --bad-line: rgba(255, 123, 123, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--fg); min-height: 100vh; font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── header: the shared site-style header (brand.css) — layout only here ── */
header.top { padding: 0 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
header.top .tm-title { flex: 1; min-width: 0; }
header.top .tm-title small { font-weight: 400; color: rgba(255, 255, 255, .7); }
.top-right { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .75); flex-wrap: wrap; padding: 12px 0; }

.btn { display: inline-block; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; font-family: inherit; line-height: 1.2; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--panel); color: var(--fg-strong); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--tint); border-color: var(--tint-line); }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad-tint); }
.btn-xs { padding: 4px 10px; font-size: 12px; }

main { padding: 32px 24px 56px; max-width: 1100px; margin: 0 auto; }
main.wide { max-width: 1360px; }
h1.title { font-size: 24px; font-weight: 700; color: var(--fg-strong); letter-spacing: -.01em; }
h2 { font-size: 16px; color: var(--fg-strong); margin: 32px 0 4px; }
.sub { color: var(--muted); margin: 6px 0 20px; font-size: 13px; line-height: 1.5; }
.banner { border: 1px solid var(--bad-line); background: var(--bad-tint); color: #ffc2c2; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; }

/* ── My dashboards ── */
h2.group { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #94a3c6); margin: 28px 0 10px; }
h2.group:first-child { margin-top: 8px; }
.cards { margin-bottom: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dash { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 22px 22px 18px; color: var(--fg); box-shadow: var(--shadow); transition: box-shadow .15s, transform .12s, border-color .15s; }
.dash:hover { text-decoration: none; color: var(--fg); border-color: var(--line-strong); border-top-color: var(--accent-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
/* 2026-11-19: optional image icon next to the emoji (flags) */
.dash .icon .icon-img { height: 20px; width: auto; margin-left: 4px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.dash .icon { align-self: flex-start; min-width: 52px; height: 52px; padding: 0 12px; white-space: nowrap; border-radius: 12px; background: var(--tint); display: flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1; margin-bottom: 16px; }
.dash b { display: block; font-size: 16px; color: var(--fg-strong); margin-bottom: 6px; }
.dash p { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; margin-bottom: 14px; }
.dash span { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-strong); background: var(--tint); border-radius: 999px; padding: 3px 9px; }
@media (prefers-reduced-motion: reduce) { .dash, .dash:hover { transition: none; transform: none; } }

/* ── Access page ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; background: var(--panel-2); }
tr:last-child td { border-bottom: none; }
td.email { color: var(--fg-strong); font-weight: 500; }
td .muted { color: var(--muted); font-size: 12px; font-weight: 400; }
select, input[type=text], input[type=password], input[type=email], input[type=date] { background: var(--panel-2); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }
select:focus, input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint); }
input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
select { min-width: 84px; }
td.actions { white-space: nowrap; }
td { vertical-align: top; }
details.scope { margin-top: 6px; font-size: 12px; max-width: 190px; }
details.scope summary { cursor: pointer; color: var(--accent); line-height: 1.4; }
details.scope[open] summary { margin-bottom: 6px; }
.scope-group { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.scope-group label { display: flex; align-items: center; gap: 6px; color: var(--fg); white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.pill.admin { color: var(--accent-strong); border-color: var(--tint-line); background: var(--tint); }
.pill.off { color: var(--bad); border-color: var(--bad-line); background: var(--bad-tint); }

.form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; box-shadow: var(--shadow); }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
#msg { min-height: 18px; font-size: 13px; margin-top: 10px; }
#msg.err { color: var(--bad); }
#msg.ok { color: var(--good); }

/* ── sign-in: the tomedes.com hero gradient with a soft frosted-navy card ── */
.wrap { display: flex; flex-direction: column; align-items: center; min-height: calc(100vh - 72px); padding: 96px 16px 32px; background: linear-gradient(135deg, #000c27 0%, #072062 50%, #1f5ad8 100%); }
.box { background: rgba(8, 22, 62, .55); color: #e6ecf8; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 34px 32px 28px; width: 420px; max-width: 100%;
  box-shadow: 0 18px 44px rgba(0, 6, 24, .35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-family: 'Open Sans', -apple-system, 'Segoe UI', sans-serif; }
.box h1 { font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.15; letter-spacing: -.01em; }
.box h1 .welcome { display: block; font-size: 15px; font-weight: 400; color: rgba(230, 236, 248, .78); letter-spacing: 0; margin-bottom: 4px; }
.box p { color: rgba(230, 236, 248, .8); margin-bottom: 24px; line-height: 1.5; }
.box details summary { color: rgba(230, 236, 248, .72); }
.box input { width: 100%; background: rgba(0, 10, 36, .45); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; }
.box input::placeholder { color: rgba(230, 236, 248, .5); }
.box input:focus { border-color: #7ea6ff; box-shadow: 0 0 0 3px rgba(126, 166, 255, .2); }
.box .btn-secondary { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); }
.box .btn-secondary:hover { background: rgba(255, 255, 255, .18); }
.box #err { color: #ffb4b4; }
.foot { margin-top: 18px; font-size: 13px; color: rgba(230, 236, 248, .8); text-align: center; line-height: 1.6; }
.foot a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
#err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 14px; }

@media (max-width: 600px) {
  main { padding: 24px 16px 40px; }
  header.top { padding: 0 16px; }
  header.top .tm-title, #who { display: none; }
  header.top .top-right { flex: 1; justify-content: flex-end; }
  .top-right { gap: 8px; }
  .wrap { padding-top: 40px; min-height: calc(100vh - 60px); }
}
