/* JayAutomotive Group — Team Office.
   Premium revamp (Nov 20, 2026): one design language with JayAutomotive Pro
   and the Hub — matte black (#0e1116 family), layered dark panels, gold
   (#d4a017) accents, refined type and spacing. Everything is self-hosted
   system fonts and pure CSS: no libraries, no webfonts, no animation weight,
   so pages stay instant on a phone. Desktop and ~390px phone are both
   first-class: cards instead of wide tables, 44px+ tap targets, no
   horizontal overflow. */
:root {
  --bg: #0e1116;
  --bg-deep: #08090c;
  --panel: #15181e;
  --panel2: #1c2027;
  --panel3: #232833;
  --line: #2c313c;
  --line-soft: #23272f;
  --gold: #d4a017;
  --gold-hi: #eec54f;
  --gold-dim: #8a6d1f;
  --text: #f4f1e8;
  --muted: #aaa393;
  --faint: #7d7767;
  --error-bg: #3d1620;
  --error-text: #ffb9c4;
  --error-line: #6d2a3a;
  --notice-bg: #17351c;
  --notice-text: #b6e7bd;
  --notice-line: #2c5a34;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0;
       font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: radial-gradient(1200px 500px at 50% -120px, #171b23 0%, var(--bg) 55%) fixed, var(--bg);
       color: var(--text); line-height: 1.45; }

/* ---- masthead: JayAutomotive Group identity on every page ----------------- */
.topbar { background: linear-gradient(180deg, #050607, #0a0c10);
          border-bottom: 2px solid var(--gold);
          padding: 16px 20px 14px; text-align: center; }
.logoline { color: var(--gold); font-weight: 800; letter-spacing: .22em;
            font-size: .68rem; text-transform: uppercase; }
.brand { display: block; font-weight: 800; letter-spacing: .015em; color: #fff;
         font-size: 1.55rem; line-height: 1.15; margin-top: 5px; }
.brand .goldword { color: var(--gold); }
a.brandlink { display: block; text-decoration: none; color: inherit; }
.tagline { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; font-style: italic; }

main { max-width: 680px; margin: 0 auto; padding: 26px 16px 52px; }
h1 { font-size: 1.55rem; margin: 0 0 10px; line-height: 1.2; }
h2 { font-size: 1.08rem; margin: 0 0 8px; color: var(--gold); letter-spacing: .01em; }
h3 { color: var(--gold); font-size: 1rem; margin: 14px 0 4px; }
a { color: var(--gold-hi); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
p { margin: 8px 0; }

/* ---- cards ---------------------------------------------------------------- */
.card { background: linear-gradient(180deg, var(--panel2), var(--panel));
        border: 1px solid var(--line); border-radius: 14px;
        padding: 18px; margin: 16px 0; display: block;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.card h2:first-child { margin-top: 0; }

/* ---- forms + buttons ------------------------------------------------------- */
form.card label, form label { display: block; margin: 0 0 14px; font-size: .95rem; font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"], input[type="date"],
input[type="time"], input[type="tel"], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; min-height: 46px;
  border-radius: 9px; border: 1px solid var(--line); background: #0b0d11; color: #fff;
  font-size: 1rem; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .22); }
input[type="file"] { display: block; margin-top: 6px; font-size: .95rem; color: var(--text); font-weight: 400; }
textarea { resize: vertical; min-height: 0; }
button { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #171106;
         border: 0; border-radius: 9px; padding: 12px 20px; min-height: 46px;
         font-size: 1rem; font-weight: 700; cursor: pointer;
         box-shadow: 0 4px 14px rgba(212, 160, 23, .25); }
button:active { filter: brightness(1.1); }
button.secondary { background: var(--panel3); color: var(--text);
                   border: 1px solid var(--line); box-shadow: none; }
a.buttonlink { display: inline-block; background: linear-gradient(180deg, var(--gold-hi), var(--gold));
               color: #171106; font-weight: 700; padding: 12px 20px; min-height: 46px;
               border-radius: 9px; text-decoration: none;
               box-shadow: 0 4px 14px rgba(212, 160, 23, .25); }
form.inlineform { margin-top: 12px; }
form.inlineform label { display: inline-block; margin: 0 8px 0 0; }
form.inlineform select { display: inline-block; width: auto; margin-top: 0; }

/* ---- messages, fine print --------------------------------------------------- */
.msg { padding: 11px 14px; border-radius: 9px; margin: 12px 0; border: 1px solid transparent; }
.msg.error { background: var(--error-bg); color: var(--error-text); border-color: var(--error-line); }
.msg.notice { background: var(--notice-bg); color: var(--notice-text); border-color: var(--notice-line); }
.fineprint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.roleline { color: var(--muted); }
.roleline strong { color: var(--text); }
ul { margin: 6px 0 6px 18px; padding: 0; }
li { margin: 5px 0; }
.noteitem { border-bottom: 1px solid var(--line-soft); padding: 9px 0; margin: 0; }
.noteitem:last-child { border-bottom: none; }

/* ---- tables (owner members list) ------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line-soft); }
th { color: var(--gold); }
/* Phones: the members table is wider than a phone — reflow each row into a
   stacked card with gold labels instead. */
@media (max-width: 700px) {
  table.members, table.members tbody { display: block; }
  table.members thead { display: none; }
  table.members tr { display: block; border: 1px solid var(--line); border-radius: 12px;
                     padding: 10px 14px; margin: 0 0 10px; background: var(--panel); }
  table.members td { display: flex; justify-content: space-between; align-items: baseline;
                     gap: 16px; padding: 4px 0; border-bottom: none; text-align: right;
                     overflow-wrap: anywhere; }
  table.members td::before { content: attr(data-label); color: var(--gold); font-size: .82rem;
                             font-weight: 700; text-align: left; white-space: nowrap; }
}

/* ---- footer ----------------------------------------------------------------- */
.foot { text-align: center; padding: 22px 16px 26px; border-top: 1px solid var(--line-soft);
        background: var(--bg-deep); }
.foot .motto { color: var(--muted); font-size: .82rem; font-style: italic; margin: 0 0 6px; }
.foot .powered { color: var(--gold); font-size: .85rem; font-weight: 700;
                 letter-spacing: .04em; margin: 0; }

/* ---- portal navigation -------------------------------------------------------- */
.portalnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.portalnav a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center;
               border: 1px solid var(--line); border-radius: 999px;
               color: var(--text); text-decoration: none; font-size: .92rem; background: var(--panel); }
.portalnav a.active { background: linear-gradient(180deg, var(--gold-hi), var(--gold));
                      color: #171106; font-weight: 700; border-color: var(--gold); }
.portalnav a.hubback { border-color: var(--gold); color: var(--gold-hi); font-weight: 700;
                       background: rgba(212, 160, 23, .12); }

/* ---- back links: the way out of every sub-page ------------------------------ */
.backrow { margin: 2px 0 10px; }
a.backlink { display: inline-flex; align-items: center; min-height: 44px;
             padding: 10px 16px; border: 1px solid var(--gold); border-radius: 999px;
             color: var(--gold-hi); font-weight: 700; text-decoration: none;
             background: rgba(212, 160, 23, .10); }

/* ---- role home: welcome hero + big tappable cards ------------------------------ */
.hero { background: linear-gradient(160deg, #1d212b 0%, var(--panel) 60%);
        border: 1px solid var(--line); border-top: 3px solid var(--gold);
        border-radius: 14px; padding: 20px; margin: 4px 0 18px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.hero h1 { margin-bottom: 4px; }
.rolepill { display: inline-block; border: 1px solid var(--gold); color: var(--gold);
            border-radius: 999px; padding: 3px 12px; font-size: .8rem; font-weight: 700;
            letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }
.hero .heroline { color: var(--muted); margin: 8px 0 0; }
.homegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0 6px; }
.homecard { display: flex; flex-direction: column; gap: 7px; min-height: 118px;
            background: linear-gradient(180deg, var(--panel2), var(--panel));
            border: 1px solid var(--line); border-radius: 14px; padding: 16px;
            color: var(--text); text-decoration: none;
            box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.homecard:active { border-color: var(--gold); }
.homecard .hc-icon { color: var(--gold); line-height: 0; }
.homecard .hc-icon svg { width: 27px; height: 27px; }
.homecard .hc-label { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.homecard .hc-sub { color: var(--muted); font-size: .83rem; line-height: 1.35; }
.homecard .hc-stat { color: var(--gold); font-weight: 800; font-size: 1.45rem; line-height: 1.1; }
@media (min-width: 701px) {
  .homegrid { grid-template-columns: repeat(3, 1fr); }
  .homecard:hover { border-color: var(--gold-dim); }
}

/* ---- auth pages (sign in / invite / reset): the team's first impression ------- */
.authhero { text-align: center; margin: 10px 0 4px; }
.authhero .ah-logo { color: var(--gold); font-weight: 800; letter-spacing: .22em;
                     font-size: .66rem; text-transform: uppercase; }
.authhero .ah-name { font-size: 1.9rem; font-weight: 800; color: #fff; margin-top: 6px; line-height: 1.15; }
.authhero .ah-name .goldword { color: var(--gold); }
.authhero .ah-motto { color: var(--muted); font-style: italic; font-size: .9rem; margin-top: 5px; }
.authcard { border-top: 3px solid var(--gold); }
.authcard h1 { font-size: 1.3rem; text-align: center; }
.authcard button { width: 100%; }
.authlinks { text-align: center; }
.signoutrow { margin-top: 22px; }

/* ---- photos --------------------------------------------------------------------- */
.photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.photos figure { margin: 0; width: 150px; }
.photos img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photos figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---- checklists ------------------------------------------------------------------- */
ul.checklist { list-style: none; margin-left: 0; }
ul.checklist li { margin: 8px 0; }
ul.checklist label { display: flex; gap: 10px; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 400; }
ul.checklist input[type="checkbox"] { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--gold); flex: 0 0 auto; }

/* ---- calendar ----------------------------------------------------------------------- */
.cal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 12px 0 18px;
       background: var(--panel); }
.calhead, .calweek { display: grid; grid-template-columns: repeat(7, 1fr); }
.calhead span { padding: 8px 4px; text-align: center; color: var(--gold); font-size: .8rem; font-weight: 700; background: #050607; }
.calday { min-height: 64px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 4px; font-size: .78rem; }
a.calday { display: block; color: inherit; text-decoration: none; cursor: pointer; }
a.calday:hover, a.calday:focus-visible { background: #151a21; }
.calday:nth-child(7n+1) { border-left: none; }
.calday.empty { background: #0b0d11; }
.calday.today { box-shadow: inset 0 0 0 2px var(--gold); }
.calday.today .calnum { color: var(--gold); }
.calnum { color: var(--muted); font-weight: 700; }
.calevent { display: block; background: #2a2410; border: 1px solid var(--gold-dim); color: var(--text);
            border-radius: 5px; padding: 2px 4px; margin-top: 3px; overflow-wrap: anywhere; }
.calevent.own { background: #122530; border-color: #3d7ea6; }
.calevent.office { background: #3a2f0e; border-color: var(--gold); }
.calevent em { color: var(--muted); font-style: normal; }
.officetag { display: inline-block; background: var(--gold); color: #0e1116; font-size: .6rem;
             font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
             padding: 0 4px; border-radius: 3px; vertical-align: 1px; white-space: nowrap; }
.caldelform { display: inline-block; margin: 0; vertical-align: top; }
.caldelform button { margin: 0; }
.calnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.calnav a { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 4px; }

/* ---- phones --------------------------------------------------------------------------- */
@media (max-width: 700px) {
  main { max-width: none; padding: 20px 14px 44px; }
  .topbar { padding: 14px 12px 12px; }
  .logoline { font-size: .58rem; letter-spacing: .16em; }
  .brand { font-size: 1.3rem; }
  .tagline { font-size: .78rem; }
  .calday { min-height: 52px; font-size: .68rem; padding: 3px; }
  .photos figure, .photos img { width: 108px; }
  .photos img { height: 84px; }
  .homecard { min-height: 112px; padding: 14px; }
}

/* ---- Phase 2 (Jobber field layer) ------------------------------------------
   My Day route cards, status stamps, completion + inspection forms, payment
   link, fleet plot. Same matte black/gold language; 44px+ targets; the
   390px phone is first-class everywhere below. */
.quickrow { margin: 12px 0 4px; }
.quickrow .buttonlink { margin: 0 8px 8px 0; }

.daycard { position: relative; }
.daytime { display: inline-block; background: var(--panel3); color: var(--gold-hi);
           border: 1px solid var(--line); border-radius: 999px;
           padding: 4px 12px; font-weight: 700; font-size: .9rem; margin: 0 0 8px; }
.daycard h2 { margin-top: 0; }
.daycard h2 a { color: var(--text); text-decoration: none; }
.daycard h2 a:hover { color: var(--gold-hi); }

.stampgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.stampbtn { min-height: 52px; padding: 10px 6px; font-size: .95rem;
            background: var(--panel3); color: var(--text);
            border: 1px solid var(--line); box-shadow: none; }
.stampbtn.next { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #171106;
                 box-shadow: 0 4px 14px rgba(212, 160, 23, .25); }
.stampbtn.done { border-color: var(--gold-dim); color: var(--gold-hi); background: #221d0e; }
ul.timeline { list-style: none; margin: 10px 0 0; padding: 0; }
ul.timeline li { border-left: 3px solid var(--gold-dim); padding: 2px 0 2px 10px; margin: 0 0 6px; }
@media (max-width: 480px) { .stampgrid { grid-template-columns: repeat(2, 1fr); } }

.linerow { display: flex; gap: 10px; align-items: flex-end; }
.linerow label { flex: 1; }
.linerow label.qty { flex: 0 0 92px; }

#sigpad { display: block; width: 100%; max-width: 640px; height: 200px;
          background: #0b0d11; border: 1px dashed var(--gold-dim); border-radius: 9px;
          touch-action: none; margin: 8px 0; }
img.sigimg { max-width: 100%; background: #0b0d11; border: 1px solid var(--line);
             border-radius: 9px; padding: 6px; }

.switchrow { display: flex !important; align-items: center; gap: 12px;
             font-size: 1.05rem; padding: 10px 0; }
.switchrow input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--gold); flex: 0 0 auto; }
.inspitem { border-bottom: 1px solid var(--line-soft); padding: 10px 0 14px; }
.inspitem:last-of-type { border-bottom: none; }
.inspname { font-weight: 600; margin: 0 0 8px; }
.inspstates { display: flex; flex-wrap: wrap; gap: 8px; }
.inspstate { display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important;
             border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px;
             min-height: 44px; font-size: .92rem !important; font-weight: 600 !important;
             background: var(--panel); cursor: pointer; }
.inspstate input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; }
.inspstate.s-urgent { border-color: var(--error-line); }
.inspstate:has(input:checked) { border-color: var(--gold); background: #221d0e; color: var(--gold-hi); }
.inspstate.s-urgent:has(input:checked) { border-color: var(--error-line); background: var(--error-bg); color: var(--error-text); }

.fleetplot { width: 100%; height: auto; display: block; }
.fleetplot .plotbg { fill: #0b0d11; stroke: var(--line); }
.fleetplot .plotdot { fill: var(--gold); stroke: #171106; stroke-width: 2; }
.fleetplot .plotlabel { fill: var(--text); font-size: 15px; font-weight: 700; }
