/* Astro Report – app screens (login, list). Report sheet styles are in report.css */
.page{max-width:900px;margin:0 auto;}
.card{background:#fff;border-radius:8px;box-shadow:0 1px 6px rgba(0,0,0,.07);padding:14px 16px;margin-bottom:12px;}
.err{color:var(--red);font-size:12.5px;font-weight:600;margin:6px 0;}
.err-card{color:var(--red);font-weight:600;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.empty{text-align:center;color:var(--muted);padding:28px 16px;}
.danger-text{color:var(--red);}
.block{width:100%;}
.linkish{background:none;color:var(--business);font-weight:600;padding:6px;min-height:0;display:block;margin:6px auto 0;}
.linkish:hover{text-decoration:underline;transform:none;}

/* labelled field */
.lf{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:10px;min-width:0;}
.lf input,.lf select{font:inherit;font-size:14px;font-weight:400;color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:9px 10px;background:#fbfdfc;width:100%;min-height:40px;}
.lf input:focus,.lf select:focus{outline:2px solid var(--green);outline-offset:-1px;}

/* ===================== LOGIN ===================== */
/* Barlow (SIL Open Font Licence) – bundled in ../fonts so it works offline */
@font-face{font-family:'Barlow';src:url('../fonts/barlow-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'Barlow';src:url('../fonts/barlow-latin-500-normal.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap;}
@font-face{font-family:'Barlow';src:url('../fonts/barlow-latin-600-normal.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:'Barlow Condensed';src:url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:'Barlow Condensed';src:url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;}

body.is-login{padding:0;background:#F4F7F5;}
.lg{
  --site:#0E5A36; --site-deep:#0A4429; --ink:#17241D; --paper:#F4F7F5; --rule:#C9D5CD; --muted:#56665D; --safety:#D92B2B;
  min-height:100vh; min-height:100dvh; display:grid; grid-template-columns:minmax(380px,44%) 1fr;
  font-family:'Barlow',system-ui,-apple-system,'Segoe UI',sans-serif; color:var(--ink); background:var(--paper);
}
.lg button{transform:none;min-height:0;}
.lg button:hover{transform:none;}
.lg :focus-visible{outline:3px solid #2F8F5B;outline-offset:2px;}

/* brand panel: site green with a drafting grid (major 96px, minor 16px) */
.lg-brand{
  position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:40px;
  padding:56px 52px 48px; color:#E6F0EA; overflow:hidden;
  background-color:var(--site);
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.075) 1px,transparent 1px),
    linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);
  background-size:96px 96px,96px 96px,16px 16px,16px 16px;
  background-position:-1px -1px;
}
.lg-wordmark{font-family:'Barlow Condensed','Barlow',sans-serif;font-weight:700;font-size:clamp(46px,5.2vw,68px);line-height:.95;letter-spacing:.2px;color:#fff;}
.lg-by{margin-top:10px;font-size:16px;font-weight:500;color:#B9D3C3;}
.lg-lede{margin:28px 0 0;max-width:28ch;font-size:19px;line-height:1.45;color:#DCEAE1;}

/* drawing title block: real date and ISO week number */
.tb{
  position:relative; display:grid; max-width:460px;
  grid-template-columns:1fr 1fr 118px; grid-template-areas:"doc doc week" "date day week";
  border:2px solid rgba(255,255,255,.9); background:rgba(8,56,33,.55);
}
.tb::before{content:'';position:absolute;top:-2px;left:-2px;border-top:16px solid var(--safety);border-right:16px solid transparent;}
.tb-cell{display:flex;flex-direction:column;gap:3px;padding:10px 14px;border-right:1px solid rgba(255,255,255,.45);border-bottom:1px solid rgba(255,255,255,.45);min-width:0;}
.tb-doc{grid-area:doc;}
.tb-date{grid-area:date;border-bottom:0;}
.tb-day{grid-area:day;border-bottom:0;}
.tb-week{grid-area:week;border-right:0;border-bottom:0;justify-content:space-between;}
.tb-k{font-size:12.5px;font-weight:500;color:#A6C6B3;}
.tb-v{font-size:16px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tb-wk{font-family:'Barlow Condensed','Barlow',sans-serif;font-weight:700;font-size:64px;line-height:.9;color:#fff;font-variant-numeric:tabular-nums;}

/* form side */
.lg-main{display:grid;grid-template-rows:1fr auto;padding:56px clamp(24px,7vw,112px) 28px;}
.lg-form{align-self:center;width:100%;max-width:392px;}
.lg-form h1{font-family:'Barlow Condensed','Barlow',sans-serif;font-weight:700;font-size:42px;line-height:1.05;margin:0 0 8px;color:var(--ink);}
.lg-sub{margin:0 0 28px;font-size:16.5px;line-height:1.45;color:var(--muted);}
.lg-field{margin-bottom:18px;}
.lg-field>label,.lg-conn-panel>label{display:block;margin-bottom:7px;font-size:15px;font-weight:600;color:var(--ink);}
.lg-input{
  display:block; width:100%; height:52px; padding:0 14px; border:1.5px solid var(--rule); border-radius:4px;
  background:#fff; color:var(--ink); font:inherit; font-size:17px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.lg-input::placeholder{color:#93A39A;}
.lg-input:hover{border-color:#9FB3A7;}
.lg-input:focus{outline:none;border-color:var(--site);box-shadow:0 0 0 3px rgba(14,90,54,.18);}
.lg-input[aria-invalid="true"]{border-color:var(--safety);}
.lg-pw{position:relative;}
.lg-pw .lg-input{padding-right:78px;}
.lg-show{position:absolute;top:7px;right:7px;height:38px;padding:0 12px;border-radius:3px;background:transparent;color:var(--site);font:inherit;font-size:15px;font-weight:600;}
.lg-show:hover{background:rgba(14,90,54,.08);}
.lg-caps{margin-top:7px;font-size:14px;font-weight:500;color:#8A5A00;}
.lg-error{margin:0 0 18px;padding:11px 14px;border-left:3px solid var(--safety);background:#FBEAEA;color:#8C1D1D;font-size:15px;line-height:1.45;}
.lg-note{margin:0 0 20px;padding:11px 14px;border-left:3px solid #C98A0B;background:#FFF5DF;color:#6B4A00;font-size:15px;line-height:1.45;}
.lg-check{display:flex;align-items:center;gap:10px;margin:4px 0 24px;font-size:15.5px;cursor:pointer;user-select:none;}
.lg-check input{width:19px;height:19px;margin:0;accent-color:var(--site);}
.lg-submit{display:block;width:100%;height:54px;border-radius:4px;background:var(--site);color:#fff;font:inherit;font-size:18px;font-weight:600;letter-spacing:.2px;transition:background .15s ease;}
.lg-submit:hover{background:var(--site-deep);}
.lg-submit:disabled{opacity:.7;cursor:progress;}
.lg-help{margin:18px 0 0;font-size:15px;line-height:1.5;color:var(--muted);}
.lg-link{display:inline;padding:0;background:none;color:var(--site);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;}
.lg-link:hover{color:var(--site-deep);}

.lg-conn{margin-top:32px;padding-top:16px;border-top:1px solid var(--rule);}
.lg-conn-toggle{display:flex;align-items:center;gap:9px;padding:4px 0;background:none;color:var(--muted);font:inherit;font-size:14.5px;font-weight:500;}
.lg-conn-toggle:hover{color:var(--ink);}
.lg-dot{width:9px;height:9px;border-radius:50%;background:#A8B5AD;}
.lg-dot.ok{background:#1F9D57;}
.lg-dot.down{background:var(--safety);}
.lg-chev{width:8px;height:8px;margin-left:2px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .15s ease;}
.lg-chev.open{transform:rotate(-135deg) translateY(-1px);}
.lg-conn-panel{margin-top:14px;}
.lg-conn-panel .lg-input{height:46px;font-size:16px;}
.lg-hint{margin:7px 0 12px;font-size:13.5px;color:var(--muted);}
.lg-secondary{height:42px;padding:0 16px;border:1.5px solid var(--site);border-radius:4px;background:#fff;color:var(--site);font:inherit;font-size:15px;font-weight:600;}
.lg-secondary:hover{background:rgba(14,90,54,.06);}
.lg-status{margin-top:10px;font-size:14px;line-height:1.4;}
.lg-status.ok{color:#17733F;}
.lg-status.bad{color:#9B1C1C;}
.lg-status.info{color:var(--muted);}
.lg-foot{padding-top:28px;font-size:13.5px;color:#7B8B82;}

@media (max-width:900px){
  .lg{grid-template-columns:1fr;}
  .lg-brand{padding:28px 20px 22px;gap:22px;background-size:64px 64px,64px 64px,16px 16px,16px 16px;}
  .lg-wordmark{font-size:40px;}
  .lg-by{margin-top:6px;font-size:14.5px;}
  .lg-lede{display:none;}
  .eco.light{margin-top:14px;padding:5px 14px 5px 8px;}
  .eco.light svg{width:24px;height:24px;}
  .tb{grid-template-columns:1fr 1fr 84px;}
  .tb-cell{padding:8px 11px;}
  .tb-v{font-size:14.5px;}
  .tb-wk{font-size:44px;}
  .lg-main{padding:30px 20px 22px;}
  .lg-form{align-self:start;}
  .lg-form h1{font-size:36px;}
  .lg-sub{margin-bottom:22px;}
}
@media (prefers-reduced-motion:reduce){
  .lg *{transition:none !important;}
}

/* ---------- sign-in extras: field errors, password guide, register layout ---------- */
.lg-form.wide{max-width:460px;}
.lg-opt{font-weight:400;color:var(--muted);}
.lg-fhint{margin-top:7px;font-size:13.5px;line-height:1.4;color:var(--muted);}
.lg-ferr{margin-top:7px;font-size:14px;font-weight:500;line-height:1.4;color:#A11F1F;}
.lg-pair{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;}
.lg-success{margin:0 0 20px;padding:11px 14px;border-left:3px solid #1F9D57;background:#E7F5EC;color:#155E36;font-size:15px;line-height:1.45;}
.lg-alt{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:22px;padding:14px 16px;border:1px solid var(--rule);border-radius:4px;background:#fff;font-size:15px;color:var(--muted);}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

.pwg{margin-top:10px;}
.pwg-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;}
.pwg-bar span{height:5px;border-radius:3px;background:#DDE5E0;transition:background .2s ease;}
.pwg-bar.s1 span:nth-child(-n+1){background:#C2410C;}
.pwg-bar.s2 span:nth-child(-n+2){background:#B7791F;}
.pwg-bar.s3 span:nth-child(-n+3){background:#2F8F5B;}
.pwg-bar.s4 span{background:#17733F;}
.pwg-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-top:8px;}
.pwg-rules{list-style:none;margin:0;padding:0;font-size:13.5px;color:var(--muted);}
.pwg-rules li{display:flex;align-items:center;gap:7px;line-height:1.7;}
.pwg-rules li.met{color:#17733F;}
.pwg-mark{width:13px;height:13px;border:1.5px solid #A8B5AD;border-radius:50%;flex-shrink:0;position:relative;}
.pwg-rules li.met .pwg-mark{border-color:#17733F;background:#17733F;}
.pwg-rules li.met .pwg-mark::after{content:'';position:absolute;left:3.5px;top:1px;width:3px;height:6px;border:solid #fff;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);}
.pwg-label{font-size:13.5px;font-weight:600;white-space:nowrap;}
.pwg-label.s1{color:#C2410C;} .pwg-label.s2{color:#9A6512;} .pwg-label.s3{color:#2F8F5B;} .pwg-label.s4{color:#17733F;}

/* change password inside the app (not full screen) */
.lg.lg-inline{display:block;min-height:0;background:transparent;}
.lg.lg-inline .lg-form{background:#fff;border:1px solid var(--rule);border-radius:6px;padding:28px 24px;margin:8px auto 40px;max-width:460px;}

@media (max-width:520px){
  .lg-pair{grid-template-columns:1fr;}
  .lg-alt{flex-direction:column;align-items:stretch;text-align:center;}
}

/* ---------- app header with sections ---------- */
.app-head{max-width:900px;margin:0 auto 14px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 12px;font-family:'Barlow',system-ui,sans-serif;}
.app-head .brand{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-family:'Barlow Condensed','Barlow',sans-serif;font-weight:700;font-size:26px;color:var(--green-dark);}

/* "Save trees / Go paperless" badge */
.eco{display:inline-flex;align-items:center;gap:9px;font-family:'Barlow',system-ui,sans-serif;}
.eco svg{width:28px;height:28px;flex-shrink:0;}
.eco-t{display:flex;flex-direction:column;line-height:1.15;}
.eco-t b{font-size:14.5px;font-weight:600;}
.eco-t span{font-size:13px;font-weight:500;}
.eco.light{margin-top:20px;padding:7px 16px 7px 10px;border:1px solid rgba(255,255,255,.28);border-radius:99px;background:rgba(8,56,33,.35);color:#E6F0EA;}
.eco.light svg{color:#8FE0AE;}
.eco.light .eco-t span{color:#B9D3C3;}
.eco.dark{padding-left:14px;border-left:1px solid var(--line);color:#1F6B43;}
.eco.dark svg{color:#2F8F5B;width:26px;height:26px;}
.eco.dark .eco-t b{font-size:13.5px;}
.eco.dark .eco-t span{font-size:12.5px;color:var(--muted);}
.who{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;font-size:14px;color:var(--ink);}
.who-name{display:inline-flex;align-items:center;gap:8px;font-weight:600;margin-right:4px;}
.who .btn-ghost{min-height:36px;padding:6px 12px;}
.tabs{grid-column:1 / -1;display:flex;gap:2px;border-bottom:1px solid var(--line);overflow-x:auto;}
.tab{background:none;border-radius:0;color:var(--muted);font-family:'Barlow',sans-serif;font-size:15.5px;font-weight:600;padding:10px 14px;min-height:44px;border-bottom:3px solid transparent;white-space:nowrap;}
.tab:hover{color:var(--ink);transform:none;}
.tab.on{color:var(--green-dark);border-bottom-color:var(--green);}
.page{font-family:'Barlow',system-ui,sans-serif;}
.page .card{border-radius:6px;}

/* tags */
.tag{display:inline-block;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:600;line-height:1.6;white-space:nowrap;vertical-align:middle;}
.tag.ok{background:#E3F4E9;color:#17733F;}
.tag.warn{background:#FFF1D6;color:#8A5A00;}
.tag.mute{background:#ECEFED;color:#56665D;}
.tag.bad{background:#FBE5E5;color:#A11F1F;}
.tag.admin{background:#E2EAF3;color:#1D4A72;}
.tag.user{background:#ECEFED;color:#3E4C44;}
.muted{color:var(--muted);font-size:14.5px;line-height:1.5;}
.muted-sm{color:var(--muted);font-size:13px;font-weight:400;}
.owner-note{max-width:900px;margin:0 auto 14px;padding:10px 14px;border-left:3px solid #1D4A72;background:#E8EFF6;color:#1D3550;font-size:14px;font-family:'Barlow',sans-serif;}

/* ---------- admin: users ---------- */
.astats{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:6px;overflow:hidden;margin-bottom:12px;}
.astats>div{background:#fff;padding:12px 14px;display:flex;flex-direction:column;gap:2px;}
.astats b{font-family:'Barlow Condensed',sans-serif;font-size:28px;line-height:1;color:var(--ink);}
.astats span{font-size:13px;color:var(--muted);}
.astats .hl b{color:#8A5A00;}
.filters .frow.two{grid-template-columns:2fr 1fr;}
.filters .frow.with-user{grid-template-columns:1.3fr 1fr 1fr 1.3fr 1.5fr;}
.ulist{display:flex;flex-direction:column;}
.uitem{display:flex;flex-direction:column;gap:10px;}
.uitem.pending{border-left:3px solid #C98A0B;}
.utitle{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:16px;}
.umeta{font-size:14px;color:var(--business);margin-top:4px;white-space:pre-wrap;}
.ustamp{font-size:12.5px;color:var(--muted);margin-top:3px;}
.uactions{display:flex;gap:6px;flex-wrap:wrap;}
.uactions button{min-height:36px;padding:6px 12px;}
.apass{border:1px solid #9FC9AE;background:#F2FAF5;}
.apass h3{margin:0 0 10px;font-size:16px;}
.apass p{margin:10px 0;font-size:14.5px;line-height:1.5;}
.apass-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.apass code{font-family:'Barlow Condensed',sans-serif;font-size:26px;font-weight:600;letter-spacing:1px;background:#fff;border:1px dashed #6FAF87;border-radius:4px;padding:6px 14px;user-select:all;}
.aform h3{margin:0 0 14px;font-size:17px;}
.agrid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;}
.af{display:flex;flex-direction:column;gap:5px;font-size:13.5px;font-weight:600;color:var(--ink);min-width:0;}
.af input,.af select{font:inherit;font-size:15px;font-weight:400;height:44px;padding:0 11px;border:1.5px solid var(--line);border-radius:4px;background:#fff;color:var(--ink);width:100%;}
.af input:disabled,.af select:disabled{background:#F1F4F2;color:var(--muted);}
.af input:focus,.af select:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(15,107,60,.15);}
.af input[aria-invalid="true"]{border-color:var(--red);}
.af-err{font-size:13px;font-weight:500;color:#A11F1F;}
.acheck{display:flex;align-items:center;gap:9px;margin-top:14px;font-size:14.5px;cursor:pointer;}
.acheck input{width:18px;height:18px;accent-color:var(--green);}
.arow{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap;}

/* ---------- admin: settings ---------- */
.aset-h{margin:0 0 6px;font-size:17px;}
.aset{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 0;border-bottom:1px solid var(--line);}
.aset.off{opacity:.55;}
.aset-t{font-weight:600;font-size:15.5px;cursor:pointer;}
.aset p{margin:4px 0 0;font-size:14px;color:var(--muted);line-height:1.45;max-width:60ch;}
.switch{appearance:none;-webkit-appearance:none;flex-shrink:0;width:48px;height:28px;border-radius:99px;background:#C6D0CA;position:relative;cursor:pointer;transition:background .15s ease;margin:0;}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s ease;}
.switch:checked{background:var(--green);}
.switch:checked::after{left:23px;}
.switch:focus-visible{outline:3px solid #2F8F5B;outline-offset:2px;}
.switch:disabled{cursor:not-allowed;}
.acode{display:block;margin-top:6px;padding:10px 12px;background:#F1F4F2;border-radius:4px;font-size:13px;overflow-x:auto;white-space:nowrap;}

@media (max-width:640px){
  .app-head{grid-template-columns:1fr;}
  .who{justify-content:flex-start;}
  .astats{grid-template-columns:1fr 1fr;}
  .agrid,.frow.two,.filters .frow.with-user{grid-template-columns:1fr;}
  .filters .frow.with-user .grow{grid-column:auto;}
  .uactions button{flex:1 1 auto;}
}
@media (prefers-reduced-motion:reduce){
  .switch,.switch::after,.pwg-bar span{transition:none;}
}

/* list */
.banner{max-width:900px;margin:0 auto 12px;background:#fff4dc;color:#7a4b00;border:1px solid #f1d49a;border-radius:8px;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;font-weight:600;}
.banner .actions{display:flex;gap:8px;}
.list-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:4px 0 12px;}
.list-head h2{margin:0;font-size:20px;color:var(--green-dark);}
.filters .frow{display:grid;grid-template-columns:1fr 1fr 1.3fr 1.6fr;gap:10px;}
.hint{font-size:11.5px;color:var(--muted);margin:-2px 0 8px;}
.chips{display:flex;gap:6px;flex-wrap:wrap;}
.chip{background:#eef4f0;color:var(--green-dark);border:1px solid var(--line);border-radius:99px;padding:5px 12px;min-height:32px;font-size:12px;}
.chip:hover{border-color:var(--green);}
.list-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0 10px;}
.list-tools .count{font-size:13px;color:var(--muted);font-weight:600;}
.list-tools .actions{display:flex;gap:8px;flex-wrap:wrap;}
.ritem{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.rmain{flex:1;min-width:0;cursor:pointer;border-radius:6px;}
.rmain:focus{outline:2px solid var(--green);outline-offset:4px;}
.rtitle{font-size:14.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rmeta{font-size:13px;color:var(--business);margin-top:3px;font-weight:600;}
.rstamp{font-size:11.5px;color:var(--muted);margin-top:3px;}
.ractions{display:flex;gap:6px;flex-shrink:0;}
.ractions button{padding:7px 12px;}
.more{text-align:center;margin:10px 0 30px;}

@media (max-width:640px){
  .filters .frow{grid-template-columns:1fr 1fr;}
  .filters .frow .grow{grid-column:1 / -1;}
  .ritem{flex-direction:column;align-items:stretch;}
  .ractions button{flex:1;min-height:42px;}
  .list-tools .actions{width:100%;}
  .list-tools .actions button{flex:1;}
  .lf input,.lf select{font-size:16px;}
}
