/* FreeMe member app: sign in, dashboard, admin. Same look as the FreeMe.com v2 page.
   Layout idea: a quiet working surface. White cards on pale green-grey paper, one deep green for money and action,
   marker yellow only for test mode, so nobody ever mistakes a test for the real thing. Single light theme by choice. */
:root {
  color-scheme: light;
  --paper: #f4f7f5; --card: #ffffff; --ink: #10201a; --soft: #4d5f57;
  --green: #0b6b48; --green-deep: #074a32; --mint: #dff0e8; --mark: #ffd84a; --rule: #d5dfda;
  --bad: #b3261e; --bad-bg: #fbe9e7; --wait: #8a5a00; --wait-bg: #fff3cd;
  --font-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --r: 16px; --shadow: 0 1px 2px rgba(16, 32, 26, .06), 0 10px 28px rgba(16, 32, 26, .07);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
h1, h2, h3, p, ul, ol { margin: 0; } ul, ol { padding: 0; list-style: none; }
a { color: var(--green); } button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(30px, 4vw, 42px); } h2 { font-weight: 800; font-size: 24px; } h3 { font-weight: 700; font-size: 18px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(480px, 100% - 32px); margin-inline: auto; }
.stack { display: grid; gap: 18px; } .stack-lg { display: grid; gap: 30px; } .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.soft { color: var(--soft); } .fine { font-size: 14.5px; color: var(--soft); } .num { font-variant-numeric: tabular-nums; } [hidden] { display: none !important; }

.testbar { background: var(--mark); color: #2b2300; font-size: 14.5px; font-weight: 600; padding: 7px 0; }
.testbar .wrap, .viewbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; }
.viewbar { background: var(--ink); color: #fff; font-size: 15px; padding: 9px 0; }
.top { background: var(--card); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; min-height: 64px; padding-block: 8px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo b { color: var(--green); font-weight: 800; }
.logo svg { display: block; height: 42px; width: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.tab { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--soft); cursor: pointer; }
.tab:hover { background: var(--mint); color: var(--green-deep); } .tab[aria-current="page"] { background: var(--green); color: #fff; }
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--rule); }
.subtabs .tab { border-radius: 10px 10px 0 0; } .subtabs .tab[aria-current="page"] { background: var(--ink); }
main { padding-block: 30px 70px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border: 0; border-radius: 999px; background: var(--green); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--green-deep); } .btn:disabled { opacity: .55; cursor: default; }
.btn--big { min-height: 54px; font-size: 18px; width: 100%; }
.btn--quiet { background: var(--mint); color: var(--green-deep); } .btn--quiet:hover { background: #cbe6d9; }
.btn--plain { background: none; color: var(--green); padding-inline: 8px; min-height: 36px; text-decoration: underline; font-weight: 600; }
.btn--plain:hover { background: none; color: var(--green-deep); }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: 14.5px; }
.btn--test { background: var(--mark); color: #2b2300; } .btn--test:hover { background: #f5c91f; }
.btn--bad { background: var(--bad-bg); color: var(--bad); } .btn--bad:hover { background: #f6d5d1; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.card--test { background: #fffbe6; border: 2px dashed #e0b400; box-shadow: none; }
.grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.tile b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14.5px; color: var(--soft); } .tile--money b { color: var(--green); }

.field { display: grid; gap: 6px; } .field label, legend { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.field input, .field select, .field textarea, .in { min-height: 48px; padding: 9px 13px; border: 2px solid var(--rule); border-radius: 12px; background: var(--card); width: 100%; }
.field textarea { min-height: 120px; line-height: 1.45; } .field input:focus, .field select:focus, .field textarea:focus, .in:focus { border-color: var(--green); outline: 0; }
.in--sm { min-height: 38px; width: auto; padding: 5px 10px; }
.two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; } @media (max-width: 440px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.35; cursor: pointer; }
.check small { display: block; font-size: 14px; color: var(--soft); }
.check input { width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; flex: none; margin: 1px 0 0; accent-color: var(--green); }
/* a check box that sits inside a form field: the field's tall input and bold label styles must not reach it */
.field label.check { font-family: var(--font-body); font-weight: 400; font-size: 16px; }
/* a short headline meant to sit on one line in the narrow column; it still wraps if a screen is too small */
h1.oneline { font-size: clamp(24px, 6.7vw, 38px); text-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.err { font-size: 14.5px; font-weight: 600; color: var(--bad); } .err:empty { display: none; }
.msg { padding: 12px 16px; border-radius: 12px; font-weight: 600; } .msg--ok { background: var(--mint); color: var(--green-deep); } .msg--bad { background: var(--bad-bg); color: var(--bad); } .msg--wait { background: var(--wait-bg); color: var(--wait); }

.link { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15.5px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.linkcard { display: grid; gap: 14px; grid-template-columns: 1fr 132px; align-items: start; } .linkcard img { width: 132px; height: 132px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
@media (max-width: 440px) { .linkcard { grid-template-columns: 1fr; } }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; font-family: var(--font-head); white-space: nowrap; }
.pill--pending { background: var(--wait-bg); color: var(--wait); } .pill--approved, .pill--ok { background: var(--mint); color: var(--green-deep); }
.pill--paid { background: var(--green); color: #fff; } .pill--cancelled, .pill--bad { background: var(--bad-bg); color: var(--bad); } .pill--plain { background: var(--paper); color: var(--soft); border: 1px solid var(--rule); }
.tablebox { overflow-x: auto; } table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th { text-align: left; font-family: var(--font-head); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); padding: 8px 10px; border-bottom: 2px solid var(--rule); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; } td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; } tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--paper); }

.levels { display: grid; gap: 8px; } .level { display: grid; grid-template-columns: 78px 54px 1fr; gap: 10px; align-items: center; font-size: 15.5px; }
.level__n { font-family: var(--font-head); font-weight: 700; } .level__c { font-family: var(--font-head); font-weight: 800; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.level__bar { min-width: 0; } .level__bar i { display: block; height: 10px; border-radius: 6px; background: var(--green); min-width: 2px; } .level--empty { color: var(--soft); } .level--empty .level__bar i { background: var(--rule); }
.level__names { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 16px; } .kv dt { color: var(--soft); } .kv dd { margin: 0; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
