/* A class that sets `display` outruns the `hidden` attribute, which the
   browser applies at user-agent specificity. Without this the sign-on
   divider renders on a page with no sign-on providers -- an "or continue
   with email" line above the only option there is. */
[hidden]{display:none!important}

/* Shared by the login and sign-up pages. */
.authwrap{max-width:430px;margin:0 auto;padding:52px 20px 80px}
.authcard{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:28px 26px}
.authcard h1{font-size:21px;margin:0 0 5px;font-weight:620;letter-spacing:-.01em}
.authcard .sub{color:var(--muted);font-size:13.5px;margin:0 0 20px}
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:5px}
.field input{width:100%;font:inherit;padding:10px 12px;border-radius:8px;
  border:1px solid var(--line);background:var(--bg);color:var(--ink)}
.field input:focus{outline:2px solid var(--orange);outline-offset:-1px;border-color:var(--orange)}
.field .hint{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.5}
.authcard button[type=submit]{width:100%;padding:11px;margin-top:6px}
.authmsg{margin-top:14px;font-size:13px;padding:10px 12px;border-radius:8px;display:none}
.authmsg.err{display:block;background:rgba(198,40,40,.10);border:1px solid rgba(198,40,40,.3);color:var(--red)}
.authmsg.ok{display:block;background:rgba(46,125,50,.10);border:1px solid rgba(46,125,50,.3);color:var(--green)}
.authfoot{text-align:center;margin-top:18px;font-size:13.5px;color:var(--muted)}
.authfoot a{color:var(--orange);text-decoration:none;font-weight:550}
.authfoot a:hover{text-decoration:underline}
.sso{display:flex;flex-direction:column;gap:9px;margin-bottom:6px}
.sso button{width:100%;background:transparent;color:var(--ink);border-color:var(--line);font-weight:550}
.ordiv{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}
.ordiv::before,.ordiv::after{content:"";flex:1;height:1px;background:var(--line)}
.authbrand{text-align:center;margin-bottom:24px}
.authbrand .brand{font-size:22px}
.authbrand .tag{font-size:13px}
.invited{background:rgba(255,126,5,.08);border:1px solid rgba(255,126,5,.3);border-radius:8px;
  padding:10px 12px;font-size:12.5px;margin-bottom:18px;line-height:1.5}

/* Settings page */
header{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.setcard{background:var(--panel);border:1px solid var(--line);border-radius:14px;
  padding:22px 24px;margin-bottom:22px}
.setcard h2{font-size:16px;margin:0 0 4px;font-weight:620}
.setcard .muted{font-size:13px;color:var(--muted)}

/* The quoting page went full-width, which removed the auto margins from `main`.
   The auth pages keep a centred column -- a sign-in form or a settings list
   stretched across a 27-inch monitor is not more usable, just further apart. */
/* The sign-in and sign-up pages keep a centred column; the settings page
   brings its own sidebar layout and sets its own width. */
.authwrap{margin-left:auto;margin-right:auto}
.opstable td,.opstable th{white-space:nowrap}

/* --- settings: sidebar + sections ----------------------------------------- */
/* Full width, and the section list sits against the left edge -- aligned to
   the brand above it, the same 28px the quoting page uses, so the two pages
   share one left margin rather than each having their own. */
.setlayout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:0;
  max-width:none;margin:0;padding-left:28px;align-items:start}
.setnav{position:sticky;top:0;padding:26px 18px 26px 0;border-right:1px solid var(--line);
  min-height:calc(100vh - 78px)}
.setnav-group{margin-bottom:20px}
.setnav-title{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);
  font-weight:700;padding:0 10px 7px}
.setnav a{display:block;padding:7px 10px;border-radius:7px;text-decoration:none;
  color:var(--ink);font-size:13.5px;font-weight:500}
.setnav a:hover{background:rgba(128,128,128,.11)}
.setnav a.on{background:rgba(255,126,5,.13);color:var(--orange);font-weight:600}
.setmain{padding:26px 28px 70px;min-width:0}
.setsec h2{font-size:19px;margin:0 0 4px;font-weight:620;letter-spacing:-.01em}
.setsec h3{font-size:14px;margin:0 0 10px;font-weight:620}
.secsub{color:var(--muted);font-size:13.5px;margin:0 0 18px;max-width:640px;line-height:1.6}
.adminonly-note{color:var(--muted);font-size:12.5px;margin-top:10px}

/* --- member list ----------------------------------------------------------
   A table was the wrong shape here: four columns of unrelated widths, one of
   them an email that will not wrap, is exactly how a row pushes past the panel
   it sits in. A grid with a flexible first column and fixed rest cannot. */
.memberlist{display:flex;flex-direction:column}
.member{display:grid;gap:12px;align-items:center;padding:11px 2px;
  grid-template-columns:minmax(0,1fr) 110px 130px auto;
  border-bottom:1px solid var(--line)}
.member:last-child{border-bottom:0}
.member.off{opacity:.55}
.m-who{min-width:0}
.m-name{font-size:13.5px;font-weight:560;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.m-mail,.m-last{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.m-role select{font:inherit;font-size:12.5px;padding:4px 6px;border-radius:6px;
  border:1px solid var(--line);background:var(--bg);color:var(--ink);width:100%}
.m-acts{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.rolechip{display:inline-block;font-size:11px;font-weight:650;padding:2px 8px;border-radius:20px;
  background:rgba(128,128,128,.16);color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.rolechip.owner{background:rgba(255,126,5,.16);color:var(--orange)}
.rolechip.admin{background:rgba(70,130,220,.16);color:#5b93e0}
.rolechip.off{background:rgba(198,40,40,.16);color:var(--red)}

.inviterow{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}
.inviterow .field{margin-bottom:0}
/* The page is full width; a single-line text field need not be. An input
   stretched across a 27-inch monitor is harder to read back, not easier. */
.inviterow .field:first-child{flex:1;min-width:220px;max-width:420px}
.linkout{background:rgba(255,126,5,.08);border:1px solid rgba(255,126,5,.3);border-radius:8px;
  padding:11px 13px;font-size:12.5px;line-height:1.7;margin-top:12px}
.linkout code{user-select:all;word-break:break-all;font-size:12px}
.pend{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:9px 2px;
  border-bottom:1px solid var(--line);font-size:12.5px}
.pendlink{font-size:11.5px;color:var(--muted);user-select:all;word-break:break-all;
  flex:1;min-width:200px}

@media (max-width:820px){
  .setlayout{grid-template-columns:1fr;padding-left:20px}
  .setnav{position:static;min-height:0;border-right:0;border-bottom:1px solid var(--line);
    padding:14px 0;display:flex;gap:18px;flex-wrap:wrap}
  .setnav-group{margin:0;display:flex;align-items:center;gap:4px;flex-wrap:wrap}
  .setnav-title{padding:0 4px 0 0}
  .setmain{padding:22px 20px 60px 0}
  .member{grid-template-columns:1fr;gap:6px}
  .m-acts{justify-content:flex-start}
}

/* Body links inside settings copy -- otherwise they render in the browser
   default blue, which is the one colour the palette does not contain. */
.setcard a,.secsub a,.sd a{color:var(--orange);text-decoration:none;font-weight:550}
.setcard a:hover,.secsub a:hover,.sd a:hover{text-decoration:underline}

/* --- past quotes ---------------------------------------------------------- */
.qmain{padding:24px 28px 70px}
.qbar{display:flex;gap:14px;align-items:center;margin-bottom:14px}
.qbar input{font:inherit;padding:8px 12px;border-radius:8px;border:1px solid var(--line);
  background:var(--panel);color:var(--ink);width:340px;max-width:100%}
.qlist{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;
  overflow:hidden;background:var(--panel)}
.qrow{display:grid;gap:14px;align-items:center;padding:12px 16px;text-decoration:none;
  color:var(--ink);border-bottom:1px solid var(--line);
  grid-template-columns:96px minmax(0,1fr) 150px 90px 110px 150px 130px}
.qrow:last-child{border-bottom:0}
.qrow:hover{background:rgba(255,126,5,.07)}
.q-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;
  font-weight:650;color:var(--orange);letter-spacing:.02em}
.q-title,.q-who{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px}
.q-who{font-size:12.5px;color:var(--muted)}
.q-parts,.q-when{font-size:12.5px;color:var(--muted)}
.q-total{font-size:13.5px;font-weight:620;text-align:right}
.q-acts{display:flex;gap:6px;justify-content:flex-end;align-items:center}
.q-acts button{padding:3px 9px;font-size:11.5px}
.qrow:hover .q-acts button{border-color:var(--muted)}
@media (max-width:900px){
  .qrow{grid-template-columns:90px minmax(0,1fr) auto;row-gap:4px}
  .q-parts,.q-when{grid-column:2/-1}
}

/* The preview section sits under quote history in the nav, because its lifetime
   does too. */
.setnav a.subnav{padding-left:22px;font-size:13px}
.setnav a.subnav::before{content:"\21B3";position:absolute;margin-left:-14px;opacity:.45}
.setnav a.subnav{position:relative}
.depnote{font-size:12.5px;line-height:1.6;padding:10px 13px;border-radius:8px;margin-bottom:16px;
  background:rgba(128,128,128,.10);border:1px solid var(--line);color:var(--muted)}
.depnote.warn{background:rgba(240,165,0,.10);border-color:rgba(240,165,0,.35);color:var(--ink)}
.depnote a{color:var(--orange);text-decoration:none;font-weight:550}

/* --- operation templates -------------------------------------------------- */
.tplbar{display:flex;gap:14px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.tpllist{display:flex;flex-direction:column}
.tplrow{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;
  padding:10px 2px;border-bottom:1px solid var(--line)}
.tplrow:last-child{border-bottom:0}
.tplrow.off{opacity:.5}
.tplsw input{width:16px;height:16px;accent-color:var(--orange);cursor:pointer}
.tplname{font-size:13.5px;font-weight:560;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tplname .muted{font-size:11.5px;font-weight:400}
.tplops-line{font-size:12px;color:var(--muted);margin-top:2px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.tplacts{display:flex;gap:6px}
.tplop{display:flex;gap:9px;align-items:center;margin-bottom:7px;max-width:520px}
.tplnum{width:20px;text-align:right;color:var(--muted);font-size:12px}
.tplops{margin:14px 0 4px}

/* The secondary way out of a form -- "forgot your password", "back to sign in".
   Quieter than .authfoot: it sits inside the card under a primary button, so it
   must not compete with the thing it is offering an alternative to. */
.authalt{text-align:center;margin:12px 0 0;font-size:13px}
.authalt a{color:var(--muted);text-decoration:none}
.authalt a:hover{color:var(--orange);text-decoration:underline}
