/* BetterWays owner portal — visual refresh (item 21). Layout and typography only.
   Served as /beta/style.css. CSP: style-src 'self' (no inline styles anywhere). */
:root{
  --brand:#176b56;--brand-ink:#0f4d3e;--brand-soft:#e2f1ec;
  --ink:#16181d;--muted:#5f6672;--line:#e2e5ea;--line-strong:#c9ced6;
  --canvas:#f5f6f8;--surface:#fff;
  --warn:#9a5b00;--warn-soft:#fff1d6;--danger:#b3261e;--danger-soft:#fde7e5;
  --radius:14px;
  font-family:"Segoe UI",Roboto,system-ui,-apple-system,sans-serif;
  color:var(--ink);background:var(--canvas);line-height:1.55;font-size:16px
}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
[hidden]{display:none!important}

/* Top bar */
header{background:var(--surface);border-bottom:1px solid var(--line);padding:14px max(20px,calc((100vw - 1000px)/2));
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;position:sticky;top:0;z-index:5}
header a{color:var(--ink);text-decoration:none;font-weight:750;font-size:1.05rem;display:inline-flex;align-items:center;gap:10px}
header a::before{content:"BW";display:inline-grid;place-items:center;width:34px;height:34px;border-radius:9px;
  background:var(--brand);color:#fff;font-size:.8rem;font-weight:800;letter-spacing:.02em}
header span{font-size:.72rem;font-weight:700;letter-spacing:.08em;color:var(--brand-ink);background:var(--brand-soft);
  padding:6px 12px;border-radius:999px}

/* Page */
main{width:100%;max-width:1000px;margin:0 auto;padding:36px 20px 48px;flex:1}
main>a:first-child{display:inline-flex;align-items:center;gap:6px;color:var(--brand);font-weight:600;text-decoration:none;margin-bottom:8px}
main>a:first-child::before{content:"←"}
h1{font-size:clamp(1.9rem,4.2vw,2.6rem);line-height:1.15;margin:8px 0 10px;letter-spacing:-.01em}
h2{font-size:1.2rem;margin:0 0 10px;line-height:1.3}
.lead{font-size:1.1rem;color:var(--muted);max-width:720px}
main>p{color:var(--muted);max-width:760px}
p{margin:10px 0}
strong{font-weight:650}

/* Cards */
section,.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin:18px 0;
  box-shadow:0 1px 2px rgba(16,24,40,.04)}
section section{border:0;box-shadow:none;padding:0;margin:16px 0 0;background:transparent}
section>h2{display:flex;align-items:center;gap:10px}
section>p{color:var(--muted)}
section>p strong{color:var(--ink)}

/* Workspace: two columns of cards on wide screens */
#workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;align-items:start}
#workspace>nav,#workspace>p,#workspace>.wide{grid-column:1/-1}
#workspace>p{justify-self:start}
@media (max-width:820px){#workspace{display:block}}

/* Sign-in card */
.signin,form.card{max-width:520px}

/* Forms */
label{display:block;margin:14px 0;font-weight:600;font-size:.95rem}
label.check,label:has(>input[type=checkbox]){display:flex;gap:10px;align-items:flex-start;font-weight:500;padding:12px 14px;
  border:1px solid var(--line);border-radius:10px;background:var(--canvas)}
input,textarea,select{width:100%;font:inherit;color:inherit;border:1px solid var(--line-strong);border-radius:10px;
  padding:12px 14px;margin-top:6px;background:var(--surface);min-height:48px}
input[type=checkbox]{width:20px;height:20px;min-height:0;margin:2px 0 0;accent-color:var(--brand);flex:none}
textarea{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;font-size:.85rem;resize:vertical;background:#fbfbfc}
select[size]{padding:6px}
input:focus,textarea:focus,select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(23,107,86,.18);outline:none}

/* Buttons */
button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 20px;margin:6px 8px 6px 0;
  border:1px solid var(--brand);border-radius:10px;background:var(--brand);color:#fff;font:inherit;font-weight:650;
  text-decoration:none;cursor:pointer;transition:background .15s,box-shadow .15s}
button:hover,.button:hover{background:var(--brand-ink)}
button:disabled{opacity:.45;cursor:default}
nav button,#logout,#backupLogout,#calendarLogout,#catalogSignOut,#backupClear,#refresh,#copyConfig,#backupCopy,#renew{
  background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
nav button:hover,#backupLogout:hover,#catalogSignOut:hover,#backupClear:hover,#copyConfig:hover,#backupCopy:hover,#renew:hover{background:var(--canvas)}
form>button,#staff,#voidPolicy,#activate,#opening,#backupApprove,#backupReview{min-width:200px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #d5a221;outline-offset:2px}
.lead+p .button{min-height:52px;padding:12px 24px;font-size:1.02rem}
nav{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 8px}

/* Results and status */
output{display:block;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--brand-soft);color:var(--brand-ink);
  border:1px solid #c5e3d8;padding:14px;border-radius:10px;margin:12px 0;font-family:ui-monospace,Consolas,monospace;font-size:.88rem}
output:empty{display:none}
[role=status]:not(:empty){padding:14px 16px;background:var(--warn-soft);color:#5c3a00;border-radius:10px;border-left:4px solid var(--warn);
  margin:16px 0;font-weight:500}
#storeLabel:not(:empty),#catalogStore:not(:empty),#backupIdentity:not(:empty),#calendarIdentity:not(:empty){
  display:inline-block;font-weight:650;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px 14px;margin:8px 8px 0 0}
#stage:not(:empty){color:var(--muted)}
#voidStatus{font-weight:600;color:var(--ink)}

/* Tables (backup summary, catalog) */
table{width:100%;border-collapse:collapse;margin:12px 0;font-size:.95rem}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
th{color:var(--muted);font-weight:600;width:40%}
tr:last-child th,tr:last-child td{border-bottom:0}
.error{color:var(--danger);font-weight:600}
.muted{color:var(--muted)}
ul{padding-left:20px}li{margin:6px 0}

footer{color:var(--muted);font-size:.85rem;margin-top:40px;padding-top:16px;border-top:1px solid var(--line)}

@media (max-width:560px){
  main{padding:24px 16px 36px}
  section,.card{padding:18px}
  button,.button{width:100%;margin-right:0}
  header span{display:none}
}
