/* GM Pavers 2.0: graphite and concrete greys, cobalt blue for action, the logo yellow for the one button that matters.
   Fonts are served from this site (no outside requests): Inter for text, Archivo Expanded for headings and amounts. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../fonts/archivo.woff2") format("woff2"); }

:root {
  --gm-ink: #1F2226;
  --gm-graphite: #1F2226;
  --gm-graphite-2: #2F3236;
  --gm-steel: #5F6469;
  --gm-steel-2: #8A8F94;
  --gm-line: #E3E5E2;
  --gm-field: #D5D8D4;
  --gm-concrete: #EEEFED;
  --gm-cobalt: #0B76B5;
  --gm-cobalt-dark: #075482;
  --gm-sky: #129FEF;
  --gm-sky-50: #DDEDF8;
  --gm-yellow: #F2D45C;
  --gm-yellow-50: #FBF1C7;
  --gm-yellow-ink: #7A5B00;
  --gm-red: #B42318;
  --gm-red-50: #FDECEA;
  --gm-green: #1E7F4A;
  --gm-green-50: #E2F3E8;
  --gm-display: "Archivo", "Inter", system-ui, sans-serif;
  --gm-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gm-r: 20px;
  --gm-shadow: 0 1px 2px rgba(31,34,38,.05), 0 8px 22px rgba(31,34,38,.06);
  --gm-hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.5'%3E%3Cpath d='M14 0L28 8.08V24.25L14 32.33L0 24.25V8.08Z M14 32.33V48.5' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.1'/%3E%3C/svg%3E");
  /* Older names, still used by printed documents */
  --gm-grey-900: #2F3236; --gm-grey-700: #4B4F54; --gm-grey-500: #7A7F84; --gm-grey-200: #D9DBD8; --gm-grey-100: #EEEFED;
  --gm-blue: #129FEF; --gm-blue-dark: #0B76B5;
  --bs-body-font-family: var(--gm-text);
  --bs-border-radius: 14px;
}
html { font-size: 16px; }
body { background: var(--gm-concrete); color: var(--gm-ink); font-family: var(--gm-text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: rgba(18,159,239,.15); }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5 { font-family: var(--gm-display); font-stretch: 110%; font-weight: 700; letter-spacing: -.005em; }
h4, h5, h6, .h6 { font-weight: 700; }
a { color: var(--gm-cobalt); }
a:hover { color: var(--gm-cobalt-dark); }
.text-muted { color: var(--gm-steel) !important; }
.text-primary { color: var(--gm-cobalt) !important; }
.text-success { color: var(--gm-green) !important; }
.text-danger { color: var(--gm-red) !important; }
:focus-visible { outline: 3px solid rgba(18,159,239,.55); outline-offset: 2px; }

/* Icons from the sprite (Lucide) */
.ic { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.ic-bold { stroke-width: 2.4; }

/* ---------- Frame: side menu on computers, app bar, bottom bar on phones ---------- */
.shell { min-height: 100vh; }
.content { min-width: 0; }
.appbar { position: sticky; top: 0; z-index: 1030; background: var(--gm-graphite) var(--gm-hex); color: #fff; }
.appbar-in { display: flex; align-items: center; gap: .75rem; min-height: 68px; padding: .55rem 1rem; max-width: 1320px; margin: 0 auto; }
.ab-btn, .ab-close { flex: none; width: 48px; height: 48px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ab-btn:hover { color: var(--gm-yellow); background: rgba(255,255,255,.1); }
.ab-mark { flex: none; line-height: 0; }
.ab-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ab-title strong { font-family: var(--gm-display); font-stretch: 110%; font-size: 1.2rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-title small { color: #B4B9BE; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-title small b { color: #E3E5E2; font-weight: 600; }
.ab-avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--gm-yellow); color: var(--gm-ink); align-items: center; justify-content: center; font-family: var(--gm-display); font-weight: 800; text-decoration: none; }
.ab-avatar:hover { color: var(--gm-ink); box-shadow: 0 0 0 3px rgba(242,212,92,.35); }
.gm-stripe { height: 5px; background: linear-gradient(90deg, var(--gm-yellow) 0 22%, var(--gm-sky) 22% 100%); }
.gm-badge { background: var(--gm-yellow); color: var(--gm-ink); font-weight: 600; }
.gm-main { padding-top: 1rem; padding-bottom: 8rem; }
.gm-main.is-home { padding-top: 0; }

.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; border-top: 1px solid var(--gm-line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(31,34,38,.06); }
.bnav a, .bnav .fab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; color: var(--gm-steel); font-size: 13px; font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; font-family: var(--gm-text); }
.bnav .pill { width: 60px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.bnav a.active { color: var(--gm-cobalt); font-weight: 700; }
.bnav a.active .pill { background: var(--gm-sky-50); }
.bnav .fab { color: var(--gm-ink); font-weight: 600; }
.bnav .fab .sq { width: 62px; height: 62px; margin-top: -30px; box-sizing: border-box; border-radius: 22px; background: var(--gm-yellow); color: var(--gm-ink); display: flex; align-items: center; justify-content: center; border: 5px solid #fff; box-shadow: 0 10px 22px rgba(31,34,38,.22); }
.bnav .fab:active .sq { transform: scale(.96); }
/* Phones: the bar steps aside while the keyboard is open, so it never covers the field being typed in */
body.typing .bnav, body.typing .totop { display: none !important; }

.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-direction: column; gap: 1rem; padding: 1.1rem 1rem 1.5rem; background: #fff; border-right: 1px solid var(--gm-line); }
.side-brand { display: flex; align-items: center; gap: .75rem; color: var(--gm-ink); text-decoration: none; }
.side-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.side-brand strong { font-family: var(--gm-display); font-stretch: 112%; font-size: 1.2rem; }
.side-brand small { color: var(--gm-steel); font-size: .8rem; }
.side .mgroup h2 { font-size: .78rem; margin: .4rem .25rem .3rem; }
.side .mlist { background: none; box-shadow: none; padding: 0; }
.side .mrow { min-height: 42px; gap: .6rem; border: 0; padding: 0 .5rem; border-radius: 12px; font-size: .92rem; }
.side .mrow .chip { width: 30px; height: 30px; border-radius: 9px; }
.side .mrow .chip .ic { width: 18px; height: 18px; }
.side .mrow .chev { display: none; }
.side .mrow:hover { background: var(--gm-concrete); }
.side .mrow.active { background: var(--gm-sky-50); color: var(--gm-cobalt-dark); font-weight: 650; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: .5rem; color: var(--gm-steel); font-size: .78rem; padding-top: 1rem; border-top: 1px solid var(--gm-line); }
.side-foot img { height: 28px; width: auto; }
@media (min-width: 1200px) {
  .shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); }
  .gm-main { padding-bottom: 3rem; }
}

/* ---------- Shared pieces ---------- */
.chip { flex: none; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--gm-display); font-weight: 800; font-size: .95rem; }
.t-blue { background: var(--gm-sky-50); color: var(--gm-cobalt); }
.t-blue-solid { background: var(--gm-cobalt); color: #fff; }
.t-dark { background: var(--gm-graphite-2); color: var(--gm-yellow); }
.t-grey { background: #E6E8E5; color: #3A3E43; }
.t-yellow { background: var(--gm-yellow-50); color: var(--gm-yellow-ink); }
.t-yellow-solid { background: var(--gm-yellow); color: var(--gm-ink); }
.t-green { background: var(--gm-green-50); color: var(--gm-green); }
.t-red { background: var(--gm-red-50); color: var(--gm-red); }
.pillb { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.avatar-sm { width: 40px; height: 40px; border-radius: 13px; background: var(--gm-sky-50); color: var(--gm-cobalt); display: inline-flex; align-items: center; justify-content: center; font-family: var(--gm-display); font-weight: 800; font-size: .85rem; flex: none; }

.card { border: 0; border-radius: var(--gm-r); box-shadow: var(--gm-shadow); }
.card-header { background: none; border-bottom-color: var(--gm-line); }
.page-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head .btn { min-height: 42px; }
.setup li { margin-bottom: .25rem; }
.setup-card { background: var(--gm-yellow-50); box-shadow: none; }
.role-card { display: flex; gap: .9rem; align-items: flex-start; }

/* Buttons */
.btn { border-radius: 14px; font-weight: 600; min-height: 48px; padding: .55rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 40px; border-radius: 12px; padding: .35rem .8rem; }
.btn-lg { min-height: 58px; border-radius: 18px; font-size: 1.1rem; padding: .7rem 1.4rem; }
.btn-link { min-height: auto; }
.btn-primary { color: #fff; background-color: var(--gm-cobalt); border-color: var(--gm-cobalt); box-shadow: 0 8px 18px rgba(11,118,181,.22); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:disabled { color: #fff; background-color: #09659B; border-color: #09659B; }
.btn-outline-primary { color: var(--gm-cobalt); border: 1.5px solid var(--gm-cobalt); background: #fff; }
.btn-outline-primary:hover, .btn-outline-primary:active { color: #fff; background-color: var(--gm-cobalt) !important; border-color: var(--gm-cobalt); }
.btn-outline-secondary { color: var(--gm-ink); border: 1.5px solid #C9CCC8; background: #fff; }
.btn-outline-secondary:hover, .btn-outline-secondary:active { color: var(--gm-ink); background: var(--gm-concrete) !important; border-color: #B4B8B3; }
.btn-outline-danger { border-width: 1.5px; background: #fff; }
.btn-outline-success { border-width: 1.5px; background: #fff; }
.btn-light { background: var(--gm-concrete); border-color: var(--gm-concrete); color: var(--gm-ink); }
.btn-light:hover { background: #E3E5E2; border-color: #E3E5E2; }
.btn-secondary, .btn-dark-grey { background: var(--gm-graphite-2); border-color: var(--gm-graphite-2); color: #fff; font-weight: 600; }
.btn-secondary:hover, .btn-dark-grey:hover { background: var(--gm-graphite); border-color: var(--gm-graphite); color: var(--gm-yellow); }
.btn-success { background-color: var(--gm-green); border-color: var(--gm-green); }
.btn-success:hover { background-color: #186B3E; border-color: #186B3E; }
.btn-accent { background: var(--gm-yellow); border-color: var(--gm-yellow); color: var(--gm-ink); font-weight: 700; }
.btn-accent:hover, .btn-accent:focus { background: #E8C643; border-color: #E8C643; color: var(--gm-ink); }
.btn-close { min-height: auto; }

/* Forms */
.form-label { font-weight: 600; color: #3A3E43; margin-bottom: .35rem; }
.form-text { color: var(--gm-steel); }
.form-control, .form-select { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--gm-field); background-color: #FAFBF9; color: var(--gm-ink); }
.form-control:focus, .form-select:focus { border-color: var(--gm-sky); background-color: #fff; box-shadow: 0 0 0 4px rgba(18,159,239,.18); }
.form-control[readonly] { background-color: var(--gm-concrete); }
.form-control-sm, .form-select-sm { min-height: 40px; border-radius: 11px; }
.input-group-text { border: 1.5px solid var(--gm-field); background: var(--gm-concrete); border-radius: 14px; }
.form-check-input { border: 1.5px solid #A9AEB3; }
.form-check-input:checked { background-color: var(--gm-cobalt); border-color: var(--gm-cobalt); }
.form-check-input.big { width: 1.6em; height: 1.6em; }
.field-ic { position: relative; }
.field-ic > .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gm-steel); pointer-events: none; }
.field-ic > .form-control { padding-left: 50px; min-height: 58px; font-size: 1.05rem; }
.field-ic > .form-control.has-end { padding-right: 56px; }
.field-end { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--gm-steel); display: inline-flex; align-items: center; justify-content: center; }
.field-end:hover { background: var(--gm-concrete); color: var(--gm-ink); }

/* Tables */
.table { --bs-table-bg: transparent; color: var(--gm-ink); }
.table > thead th { font-size: .82rem; font-weight: 650; color: var(--gm-steel); border-bottom: 1px solid var(--gm-line); white-space: nowrap; }
.table > :not(caption) > * > * { border-bottom-color: var(--gm-line); }
.table td, .table th { vertical-align: middle; }
.table-light { --bs-table-bg: #F6F7F5; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.low { color: var(--gm-red); font-weight: 600; }
.card > .table-responsive > .table, .card > .table-responsive { border-radius: var(--gm-r); }

/* Old dashboard figure boxes (still used on some pages) */
.stat .label { font-size: .8rem; color: var(--gm-steel); letter-spacing: .02em; }
.stat .value { font-family: var(--gm-display); font-stretch: 110%; font-size: 1.45rem; font-weight: 750; }
.stat.blue .value { color: var(--gm-cobalt); }
.quick a { min-height: 64px; text-align: center; font-weight: 600; }

/* Alerts, badges, menus */
.alert { border: 0; border-radius: 16px; }
.alert-success { background: var(--gm-green-50); color: #135C35; }
.alert-danger { background: var(--gm-red-50); color: #7D1A12; }
.alert-warning { background: var(--gm-yellow-50); color: #5C4400; }
.alert-info { background: var(--gm-sky-50); color: #0A4A70; }
.badge { border-radius: 999px; font-weight: 650; }
.dropdown-menu { border: 0; border-radius: 16px; box-shadow: 0 12px 34px rgba(31,34,38,.16); padding: .4rem; }
.dropdown-item { border-radius: 10px; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--gm-cobalt); }
.pagination .page-link { color: var(--gm-cobalt); }
.pagination .page-item.active .page-link { background: var(--gm-sky); border-color: var(--gm-sky); color: #fff; }
.modal-content { border: 0; border-radius: 24px; }
.offcanvas { border: 0; }

.totop { position: fixed; right: 1rem; bottom: calc(112px + env(safe-area-inset-bottom)); z-index: 1030; width: 3rem; height: 3rem; min-height: 0; padding: 0; border-radius: 16px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
@media (min-width: 1200px) { .totop { bottom: 1.5rem; } }

/* ---------- Home ---------- */
.home-hero { background: var(--gm-graphite) var(--gm-hex); color: #fff; margin: 0 calc(var(--bs-gutter-x) * -.5); padding: 1rem 1.25rem 4.2rem; display: flex; flex-direction: column; }
.hh-greet { color: #C9CDD1; font-size: .95rem; }
.hh-label { color: #A9AEB3; font-size: .9rem; margin-top: .9rem; }
.hh-kpi { font-family: var(--gm-display); font-stretch: 115%; font-weight: 780; font-size: 2.6rem; line-height: 1.05; letter-spacing: -.015em; }
.hh-kpi span { font-size: .45em; font-weight: 600; color: #C9CDD1; margin-right: .35rem; vertical-align: .35em; }
.hh-chip { align-self: flex-start; margin-top: .6rem; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem .3rem .6rem; border-radius: 999px; background: rgba(18,159,239,.16); color: #8FD3FB; font-size: .85rem; font-weight: 600; }
.hh-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.hh-row > * { display: flex; flex-direction: column; color: #A9AEB3; font-size: .78rem; text-decoration: none; min-width: 0; }
.hh-row strong { color: #fff; font-size: 1.05rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.hh-row strong.yel { color: var(--gm-yellow); }
.home-body { position: relative; margin-top: -2.8rem; display: flex; flex-direction: column; gap: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.tile { background: #fff; border-radius: 22px; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; color: var(--gm-ink); text-decoration: none; box-shadow: 0 1px 2px rgba(31,34,38,.06), 0 10px 26px rgba(31,34,38,.08); }
.tile:hover { color: var(--gm-ink); box-shadow: 0 0 0 2px var(--gm-sky), 0 10px 26px rgba(31,34,38,.08); }
.tile .chip { width: 52px; height: 52px; border-radius: 16px; }
.tile > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.tile strong { font-size: 1.02rem; }
.tile small { color: var(--gm-steel); font-size: .85rem; }
.arow { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--gm-concrete); color: var(--gm-ink); text-decoration: none; }
.arow:last-child { border-bottom: 0; }
.arow strong { display: block; font-weight: 650; line-height: 1.3; }
.arow small { display: block; color: var(--gm-steel); font-size: .85rem; }
.arow:hover { color: var(--gm-ink); }
.arow:hover strong { color: var(--gm-cobalt); }
.chev { color: var(--gm-steel-2); flex: none; }
.yard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; margin-top: .9rem; }
.yard > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yard small { color: var(--gm-steel); font-size: .85rem; display: flex; align-items: center; gap: .35rem; }
.yard strong { font-family: var(--gm-display); font-stretch: 110%; font-size: 1.35rem; font-weight: 750; }
.month-kpi { font-family: var(--gm-display); font-stretch: 112%; font-size: 1.85rem; font-weight: 780; margin-top: .4rem; }
.bars { display: flex; flex-direction: column; gap: .55rem; margin: 1rem 0 .75rem; }
.bars > div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); align-items: center; column-gap: .75rem; }
.bars span { color: var(--gm-steel); font-size: .85rem; }
.bars i { display: block; height: 14px; border-radius: 7px; grid-column: 2; grid-row: 1; }
.bars b { grid-column: 2; grid-row: 2; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.b-now { background: var(--gm-cobalt); }
.b-pace { background: repeating-linear-gradient(135deg, var(--gm-sky) 0 6px, #7CCBFA 6px 12px); }
.b-last { background: #C3C7C2; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hh-kpi { font-size: 3rem; } }
@media (min-width: 1200px) { .home-hero { margin: 1rem 0 0; border-radius: 24px; padding: 1.5rem 1.75rem 4.5rem; } }

/* ---------- Menu page ---------- */
.menu-page { display: flex; flex-direction: column; gap: .6rem; max-width: 720px; margin: 0 auto; }
.mprofile { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: 22px; background: var(--gm-graphite) var(--gm-hex); color: #fff; text-decoration: none; }
.mprofile:hover { color: #fff; }
.mprofile .avatar { width: 58px; height: 58px; border-radius: 18px; background: var(--gm-yellow); color: var(--gm-ink); display: flex; align-items: center; justify-content: center; font-family: var(--gm-display); font-stretch: 112%; font-size: 1.3rem; font-weight: 800; flex: none; }
.mprofile strong { display: block; font-size: 1.1rem; }
.mprofile small { display: block; color: #B4B9BE; }
.msearch { position: relative; display: block; margin: .3rem 0; }
.msearch .ic { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--gm-steel); }
.msearch .form-control { padding-left: 52px; min-height: 56px; border: 0; background: #fff; border-radius: 18px; box-shadow: var(--gm-shadow); }
.mgroups { display: flex; flex-direction: column; gap: .4rem; }
.mgroup h2 { font-family: var(--gm-text); font-stretch: 100%; font-size: .9rem; font-weight: 650; color: var(--gm-steel); margin: .9rem .25rem .4rem; }
.mlist { background: #fff; border-radius: 22px; padding: .15rem 1rem; box-shadow: var(--gm-shadow); }
.mrow { display: flex; align-items: center; gap: .9rem; min-height: 62px; width: 100%; color: var(--gm-ink); text-decoration: none; border: 0; border-bottom: 1px solid var(--gm-concrete); background: none; padding: 0; text-align: left; font: inherit; font-weight: 550; }
.mlist > .mrow:last-child { border-bottom: 0; }
.mrow .chip { width: 42px; height: 42px; border-radius: 13px; }
.mrow-label { flex: 1; min-width: 0; }
.mrow:hover { color: var(--gm-cobalt); }
.mrow-danger, .mrow-danger:hover { color: var(--gm-red); }
.menu-foot { display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--gm-steel); font-size: .85rem; margin: 1.5rem 0 .5rem; }
.menu-foot img { height: 34px; width: auto; }

/* ---------- Record sheet (yellow button) ---------- */
.record-sheet.offcanvas-bottom { height: auto; max-height: 92vh; border-radius: 30px 30px 0 0; padding-bottom: env(safe-area-inset-bottom); }
.rs-grab { width: 46px; height: 5px; border-radius: 3px; background: var(--gm-field); margin: 10px auto 0; }
.record-sheet .offcanvas-header { align-items: flex-start; padding: .9rem 1.2rem .4rem; }
.record-sheet .offcanvas-title { font-family: var(--gm-display); font-stretch: 112%; font-size: 1.5rem; font-weight: 750; margin: 0; }
.rs-sub { color: var(--gm-steel); font-size: .9rem; }
.record-sheet .ab-close { background: var(--gm-concrete); color: var(--gm-ink); border: 0; }
.rs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding-bottom: .75rem; }
.rs-tile { min-height: 104px; border-radius: 20px; background: #F6F7F5; border: 1.5px solid #E6E8E5; padding: .9rem; display: flex; flex-direction: column; gap: .6rem; color: var(--gm-ink); text-decoration: none; }
.rs-tile strong { font-size: 1rem; line-height: 1.25; }
.rs-tile:hover { border-color: var(--gm-sky); color: var(--gm-ink); }
@media (min-width: 768px) {
  .record-sheet.offcanvas-bottom { max-width: 720px; margin: 0 auto; left: 0; right: 0; }
  .rs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Idle dialog ---------- */
.idle-dialog .modal-body { padding: 1.6rem; text-align: center; }
.idle-dialog .idle-ic { width: 64px; height: 64px; border-radius: 20px; margin-bottom: .8rem; }
.idle-dialog h2 { font-size: 1.5rem; }
.idle-dialog p { color: var(--gm-steel); }

/* ---------- Signed-in devices ---------- */
.dev-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid var(--gm-concrete); }
.dev-row:last-child { border-bottom: 0; }
.dev-row form .btn { white-space: nowrap; }

/* ---------- Labour sheet: Full day / Half day / Off ---------- */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--gm-concrete); min-width: 15rem; }
.seg label { min-height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #3A3E43; cursor: pointer; user-select: none; text-align: center; line-height: 1.1; }
.seg .btn-check:focus-visible + label { outline: 3px solid rgba(18,159,239,.55); }
.seg .btn-check:checked + .seg-full { background: var(--gm-cobalt); color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(31,34,38,.14); }
.seg .btn-check:checked + .seg-half { background: var(--gm-yellow); color: var(--gm-ink); font-weight: 700; box-shadow: 0 2px 6px rgba(31,34,38,.14); }
.seg .btn-check:checked + .seg-off { background: #fff; color: var(--gm-red); font-weight: 700; box-shadow: 0 2px 6px rgba(31,34,38,.14); }
#sheet tr.table-success { --bs-table-bg: #F3F8FC; --bs-table-accent-bg: transparent; background: #F3F8FC; }
.worker-cell { display: flex !important; align-items: center; gap: .6rem; }

/* ---------- Sign-in page ---------- */
body.auth { background: var(--gm-graphite); min-height: 100vh; }
.auth-page { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.auth-hero { position: relative; height: 340px; flex: none; }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31,34,38,.25) 0%, rgba(31,34,38,.55) 55%, rgba(31,34,38,.96) 100%); }
.auth-brand { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 48px; display: flex; flex-direction: column; gap: 12px; color: #fff; }
.auth-logo { width: 76px; height: 76px; border-radius: 24px; border: 3px solid rgba(255,255,255,.9); object-fit: cover; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gm-yellow); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow span { width: 22px; height: 3px; border-radius: 2px; background: var(--gm-yellow); }
.auth-brand h1 { margin: 0; font-stretch: 115%; font-weight: 780; font-size: 2.6rem; line-height: 1.04; }
.auth-brand p { margin: 0; color: #D5D8DB; }
.auth-sheet { position: relative; z-index: 2; flex: 1; margin-top: -30px; background: #fff; border-radius: 30px 30px 0 0; padding: 28px 24px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.auth-sheet h2 { font-size: 1.5rem; margin: 0; }
.auth-sheet .remember { display: flex; align-items: center; gap: .7rem; padding-left: 0; min-height: 32px; }
.auth-sheet .remember .form-check-input { width: 1.4em; height: 1.4em; margin: 0; float: none; }
.auth-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: 14px; border-top: 1px solid #ECEDEB; color: var(--gm-steel); font-size: .85rem; }
.auth-foot .built { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.auth-foot img { height: 24px; width: auto; }
@media (min-width: 768px) {
  body.auth { background: var(--gm-concrete); }
  .auth-page { max-width: 460px; min-height: auto; margin: 4vh auto; border-radius: 30px; overflow: hidden; box-shadow: 0 24px 60px rgba(31,34,38,.25); }
  .auth-sheet { border-radius: 30px 30px 0 0; }
}

/* ---------- Printable documents: invoice, quote, receipt, delivery note ---------- */
.doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 2rem; box-shadow: var(--gm-shadow); border-radius: 12px; }
.doc-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--gm-grey-700); padding-bottom: 1rem; margin-bottom: 1rem; }
.doc-head img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.doc-title { font-size: 1.6rem; font-weight: 700; letter-spacing: .05em; color: var(--gm-grey-700); }
.doc-title small { display: block; font-size: .9rem; color: var(--gm-blue-dark); letter-spacing: 0; }
.doc table th { background: var(--gm-grey-100); }
.doc .totals td { border: 0; }
.doc .grand { font-size: 1.15rem; font-weight: 700; border-top: 2px solid var(--gm-grey-700) !important; }
.doc-foot { border-top: 1px solid var(--gm-grey-200); margin-top: 1.5rem; padding-top: .75rem; font-size: .85rem; color: var(--gm-grey-500); }
.stamp { display: inline-block; border: 2px solid; padding: .1rem .6rem; border-radius: 4px; font-weight: 700; transform: rotate(-4deg); }

@media print {
  body { background: #fff; }
  .shell { display: block; }
  .card, .doc { box-shadow: none; }
  .doc { padding: 0; max-width: 100%; }
  main.container-xl, .gm-main { max-width: 100%; padding: 0; }
  a { text-decoration: none; color: inherit; }
  .appbar, .bnav, .side, .totop, .record-sheet { display: none !important; }
  .home-hero { color: #000; background: none; }
}

/* Entry tables stack into cards on phones */
@media (max-width: 767.98px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tfoot { display: block; width: 100%; }
  table.stack tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; padding: .6rem .9rem; }
  table.stack tfoot td { border: 0; padding: 0; }
  table.stack tfoot td:empty { display: none; }
  table.stack tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .7rem; padding: .85rem .9rem; border-bottom: 1px solid var(--gm-line); }
  table.stack td { border: 0; padding: 0; }
  table.stack td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.stack.three tbody tr { grid-template-columns: 1fr 1fr 1.3fr; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; color: var(--gm-steel); margin-bottom: 2px; }
  table.stack input:not([type=checkbox]):not([type=radio]), table.stack select:not(.visually-hidden), table.stack .input-group { width: 100% !important; }
  table.stack .input-group > input.form-control:not([type=checkbox]):not([type=radio]) { width: 1% !important; flex: 1 1 auto; }
  table.stack td.std { text-align: left; }
  table.stack td { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  table.stack td.num[data-label] { text-align: left; }
  table.stack td.full { grid-column: 1 / -1; }
  .seg { min-width: 0; }
}

/* Phones and tablets (also phones in "desktop site" mode): large text so nothing needs zooming.
   Inputs stay at 16px or more, which also stops iPhones zooming on tap. */
@media (max-width: 1199.98px) {
  html { font-size: 18px; }
  .small, small, .form-text { font-size: .95em; }
  .form-control, .form-select, .form-control-sm, .form-select-sm, .input-group-text, .input-group-sm > .form-control, .input-group-sm > .input-group-text { font-size: 1rem; min-height: 2.9rem; }
  .btn, .btn-sm { font-size: 1rem; }
  .btn-sm { padding: .4rem .8rem; }
  .table, .table-sm { font-size: 1rem; }
  .table-sm > :not(caption) > * > * { padding: .5rem .4rem; }
  .badge { font-size: .85em; }
  .page-head h1 { font-size: 1.45rem; }
  .dropdown-item { font-size: 1.05rem; padding: .7rem 1rem; }
}
@media (max-width: 767.98px) {
  .gm-main { padding-left: 12px; padding-right: 12px; }
  .home-hero { margin: 0 -12px; }
  .doc { padding: 1rem .75rem; }
  .doc-head { flex-wrap: wrap; }
  .doc-head img { width: 64px; height: 64px; }
  .doc table { font-size: .8rem; }
  .doc table th, .doc table td { white-space: normal; padding: .35rem .2rem; overflow-wrap: anywhere; }
  .doc .grand { font-size: 1rem; }
  .pagination .page-link { padding: .5rem .8rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
