/* MMG Hours, styled to match the madisonmarketing.com home page (MMG 2023 theme).
   Scoped under .mh-root so it can't clash with HubSpot. Fonts are loaded by the page template:
   Merriweather (headings and text), Fjalla One (nav, buttons), Montserrat 700 (small labels). */
.mh-root, .mh-modal-back, .mh-toast {
  --ink: #000; --muted: #5a6072; --line: #dbe9f3; --line-strong: #c6e1f1;
  --bg: #fff; --tint: #ecf6fb; --card: #fff;
  --brand: #1e86c7; --brand-dark: #0b6ca8; --brand-soft: #ecf6fb;
  --indigo: #241c75; --indigo-deep: #0b054d;
  --teal: #22d3ab; --teal-ink: #0b7a62; --teal-soft: #effcf9; --coral-soft: #fff7f5;
  --accent: var(--brand); --accent-ink: #fff; --accent-soft: var(--brand-soft);
  --good: #0b7a62; --warn: #a3650a; --warn-soft: #fdf3dc; --bad: #c0392b; --bad-soft: #fdecea;
  --radius: 8px;
  --serif: Merriweather, Georgia, serif;
  --display: "Fjalla One", "Arial Narrow", sans-serif;
  --sans: Merriweather, Georgia, serif; --ui: proxima-nova, Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --label: Montserrat, proxima-nova, sans-serif;
  font: 14px/1.6 var(--sans); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.mh-root { background: var(--bg); min-height: 100vh; overflow-x: hidden; }
.mh-root *, .mh-modal-back * { box-sizing: border-box; }
.mh-shell { max-width: 1240px; margin: 0 auto; padding: 0 24px 64px; }
.mh-loading, .mh-empty { color: var(--muted); padding: 28px 4px; }
.mh-muted { color: var(--muted); }
.mh-err { color: var(--bad); min-height: 1em; margin: 4px 0; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.bad { color: var(--bad); } .warn { color: var(--warn); }
.mh-root b, .mh-root strong { font-weight: 700; }

/* ---------- header: white bar with the MMG logo, Fjalla One nav, like the home page ---------- */
.mh-nav { position: relative; display: flex; align-items: center; gap: 36px; min-height: 77px; margin-bottom: 0; }
.mh-nav::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; right: -100vw; z-index: 0; background: #fff; border-bottom: 1px solid #e3e8ee; }
.mh-nav > * { position: relative; z-index: 1; }
.mh-logo { display: flex; align-items: center; gap: 12px; font-size: 0; white-space: nowrap; }
.mh-logo::before { content: ""; display: block; width: 134px; height: 39px; background: url(mmg-logo.svg) no-repeat left center / contain; }
.mh-logo::after { content: "Hours"; font: 22px/1 var(--display); color: var(--ink); padding-left: 12px; border-left: 1px solid #c9d3dc; }
.mh-tabs { display: flex; gap: 6px; flex: 1; align-self: stretch; }
.mh-tabs a { display: flex; align-items: center; padding: 0 12px; color: var(--ink); text-decoration: none;
  font: 18px/1 var(--display); border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.mh-tabs a:hover { color: var(--brand); }
.mh-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.mh-user { display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 14px; }
.mh-user .mh-link { display: inline-flex; align-items: center; background: var(--teal); color: #fff; font: 16px/1 var(--display); letter-spacing: .02em; padding: 9px 16px; border-radius: 4px; }
.mh-user .mh-link:hover { background: #1bbd98; text-decoration: none; }
/* pale blue band behind the top of each screen, like the home page hero */
.mh-root:has(.mh-nav) { position: relative; z-index: 0; }
.mh-main { position: relative; padding-top: 34px; }
.mh-main::before { content: ""; position: absolute; z-index: -1; top: 0; left: -100vw; right: -100vw; height: 230px; background: var(--tint); }

/* ---------- headings ---------- */
.mh-toolbar h2, .mh-day-title, .mh-modal-head h3, .mh-inv-head h1 { font-family: var(--serif); font-weight: 700; color: var(--ink); }
.mh-toolbar h2 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 400; }
.mh-card h3 { margin: 0 0 12px; font: 700 17px/1.35 var(--serif); }
.mh-form h4 { margin: 10px 0 0; font: 700 11px/1.4 var(--label); text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }

/* ---------- controls ---------- */
.mh-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  border-radius: 5px; padding: 8px 16px; font: 15px/1.2 var(--display); letter-spacing: .03em; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s; }
.mh-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.mh-btn:disabled { opacity: .45; cursor: default; }
.mh-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mh-btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.mh-btn.primary.big::after, .mh-login-form .mh-btn.primary::after { content: "»"; margin-left: 2px; }
.mh-btn.ghost { background: transparent; border-color: transparent; color: var(--brand-dark); }
.mh-btn.ghost:hover { background: var(--brand-soft); }
.mh-btn.danger { color: var(--bad); }
.mh-btn.danger:hover { border-color: var(--bad); }
.mh-btn.big { padding: 12px 22px; font-size: 17px; }
.mh-btn.small { padding: 5px 10px; font-size: 14px; }
.mh-btn.icon { width: 36px; height: 36px; justify-content: center; font: 22px/1 var(--sans); padding: 0; }
.mh-btn.timer { min-width: 72px; justify-content: center; }
.mh-btn.timer.on { background: var(--teal); border-color: var(--teal); color: var(--indigo-deep); }
.mh-btn.timer.on:hover { background: #1bbd98; border-color: #1bbd98; color: var(--indigo-deep); }
.mh-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.mh-link:hover { text-decoration: underline; }
.mh-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 5px; }
.mh-x:hover { background: var(--brand-soft); color: var(--ink); }
.mh-select, .mh-date, .mh-filter, .mh-form input, .mh-form select, .mh-form textarea, .mh-in {
  font: 15px/1.3 var(--ui); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 5px; padding: 8px 10px; background: #fff; min-height: 38px; }
.mh-select:focus, .mh-date:focus, .mh-filter:focus, .mh-form input:focus, .mh-form select:focus, .mh-form textarea:focus, .mh-in:focus, .mh-login-form input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,134,199,.15); }
.mh-in { padding: 6px 8px; width: 100%; min-height: 34px; }
.mh-in.num { width: 90px; text-align: right; }
.mh-filter { min-width: 220px; }
.mh-seg { display: inline-flex; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px; gap: 2px; }
.mh-seg button, .mh-seg a { border: 0; background: transparent; padding: 6px 14px; border-radius: 3px; font: 15px/1.2 var(--display); letter-spacing: .03em; color: var(--muted); cursor: pointer; text-decoration: none; }
.mh-seg button:hover, .mh-seg a:hover { color: var(--brand-dark); }
.mh-seg .on, .mh-seg .on:hover { background: var(--brand); color: #fff; }
.mh-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.mh-check input { margin: 0; accent-color: var(--brand); width: 16px; height: 16px; }

.mh-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.mh-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mh-card { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.mh-card:has(table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mh-card > .mh-seg { margin-bottom: 14px; }
.mh-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.mh-actions > span:first-child { margin-right: auto; }
.mh-actions.left { justify-content: flex-start; }
.mh-banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border-left: 4px solid currentColor; }
.mh-banner.warn { background: var(--warn-soft); color: #6b4a10; }
.mh-tag { display: inline-block; font: 700 11px/1.6 var(--label); text-transform: uppercase; letter-spacing: .05em; padding: 1px 8px; border-radius: 3px; background: var(--brand-soft); color: var(--brand-dark); margin-left: 6px; vertical-align: 1px; }
.mh-tag.grey, .mh-tag.closed { background: #eef2f6; color: var(--muted); }
.mh-tag.warn { background: var(--warn-soft); color: var(--warn); }
.mh-tag.bad { background: var(--bad-soft); color: var(--bad); }
.mh-tag.paid { background: var(--teal-soft); color: var(--good); }
.mh-tag.draft { background: #eef2f6; color: var(--ink); }
.mh-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand); color: #fff; border-radius: 3px; padding: 2px 4px 2px 10px; font-size: 13px; margin-left: 8px; }
.mh-chip button { background: none; border: 0; color: #fff; cursor: pointer; font-size: 15px; }
.mh-range { color: var(--muted); margin: -6px 0 14px; font: 700 12px/1.4 var(--label); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- stat tiles ---------- */
.mh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.mh-stat { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.mh-stat span { color: var(--brand); font: 700 11px/1.4 var(--label); text-transform: uppercase; letter-spacing: .08em; }
.mh-stat b { font: 700 26px/1.25 var(--serif); font-variant-numeric: tabular-nums; }
.mh-stat small { color: var(--muted); font-size: 13px; }
.mh-stat.bad { border-color: #f3c4bd; background: var(--coral-soft); }
.mh-stat.bad b { color: var(--bad); }
.mh-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .mh-split { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.mh-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mh-table th { text-align: left; font: 700 11px/1.4 var(--label); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding: 10px 10px; border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
.mh-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mh-table td:first-child, .mh-table th:first-child { padding-left: 0; }
.mh-table td:last-child, .mh-table th:last-child { padding-right: 0; }
.mh-table.compact td { padding: 7px 10px; }
.mh-table tfoot td { border-bottom: 0; font-weight: 700; }
.mh-table tr.total td { border-top: 2px solid var(--ink); font: 700 16px/1.4 var(--serif); }
.mh-table tr.click { cursor: pointer; }
.mh-table tr.click:hover td { background: var(--brand-soft); }
.mh-table tr.archived td { color: var(--muted); }
.mh-num, .mh-table th.mh-num { text-align: right; white-space: nowrap; }
.mh-notes { max-width: 360px; color: var(--muted); }
.mh-bar-col { width: 22%; }
.mh-bar-col.wide { width: 34%; }
.mh-bar { display: flex; height: 6px; border-radius: 3px; background: #e6eef5; overflow: hidden; margin-top: 6px; }
.mh-bar i { display: block; height: 100%; background: var(--brand); }
.mh-bar i.nb { background: #b9cddd; }
.mh-budget { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.mh-budget .mh-bar { margin-top: 2px; }
.mh-budget.warn .mh-bar i { background: #e9a23b; }
.mh-budget.bad .mh-bar i { background: var(--bad); }
.mh-budget span { font-size: 12px; color: var(--muted); }
.mh-budget .mh-bar { position: relative; overflow: visible; }
.mh-budget .mh-bar i:first-child { border-radius: 3px 0 0 3px; }
.mh-budget .mh-bar i:only-of-type { border-radius: 3px; }
.mh-budget.warn span { color: var(--warn); }
.mh-budget.over .mh-bar i.in { background: #eab3ab; }
.mh-budget.over .mh-bar i.ov { background: var(--bad); border-radius: 0 3px 3px 0; }
.mh-budget .mh-bar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.mh-budget span strong { color: var(--bad); font-weight: 700; }
.mh-budget.big { gap: 8px; }
.mh-budget.big .mh-bar { height: 12px; border-radius: 6px; }
.mh-budget.big span { font-size: 14px; }

/* ---------- time ---------- */
.mh-weekstrip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 18px; }
.mh-day { border: 1px solid var(--line-strong); background: #fff; border-radius: 5px; padding: 10px 6px; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink);
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; transition: border-color .15s; }
.mh-day:hover { border-color: var(--brand); }
.mh-day span { font: 700 11px/1.3 var(--label); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mh-day.on { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: none; }
.mh-day.on span { color: rgba(255,255,255,.75); }
.mh-day.today span { color: var(--brand); }
.mh-day.on.today span { color: #fff; }
.mh-day.total { background: #fff; border-color: var(--line-strong); cursor: default; }
.mh-day-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; font-size: 13px; }
.mh-entry { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mh-entry-title b { font-weight: 700; }
.mh-entry.running { background: linear-gradient(90deg, var(--teal-soft), transparent 70%); margin: 0 -24px; padding-left: 24px; padding-right: 24px; box-shadow: inset 4px 0 0 var(--teal); }
.mh-entry-hours { font: 700 22px/1 var(--serif); min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.mh-entry.running .mh-entry-hours { color: var(--teal-ink); }
.mh-day-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; padding: 16px 0 0; font: 700 12px/1 var(--label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mh-day-total b { font: 700 22px/1 var(--serif); color: var(--ink); letter-spacing: 0; text-transform: none; }
.mh-week th.today { color: var(--brand); }
.mh-cell { padding: 4px !important; text-align: right; }
.mh-cell-input { width: 64px; text-align: right; border: 1px solid transparent; border-radius: 5px; padding: 7px; font: inherit; background: var(--bg); font-variant-numeric: tabular-nums; }
.mh-cell-input:focus { border-color: var(--brand); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(30,134,199,.15); }
.mh-cell.locked { padding: 12px 8px !important; }
.mh-rowlabel { min-width: 220px; }

/* ---------- forms + modal ---------- */
.mh-form { display: flex; flex-direction: column; gap: 14px; }
.mh-form label { display: flex; flex-direction: column; gap: 5px; font: 700 12px/1.4 var(--label); letter-spacing: .02em; color: var(--ink); }
.mh-form label.mh-check { flex-direction: row; font: 500 14px/1.4 var(--ui); color: var(--muted); }
.mh-form input[type=checkbox], .mh-form input[type=radio] { min-height: 0; width: 18px; height: 18px; padding: 0; margin: 2px 0 0; align-self: flex-start; accent-color: var(--brand); box-shadow: none; }
.mh-form textarea { min-height: 80px; resize: vertical; }
.mh-form .grid, .mh-card.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.mh-picker { display: flex; flex-direction: column; gap: 6px; }
.mh-results { max-height: 260px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; padding: 4px 0; }
.mh-results[hidden] { display: none; }
.mh-results-group { font: 700 11px/1.4 var(--label); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 2px; }
.mh-results .mh-result { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 12px 7px 20px; font: 400 14px/1.4 var(--ui); color: var(--ink); cursor: pointer; }
.mh-results .mh-result:hover, .mh-results .mh-result.on { background: var(--tint); }
.mh-results .mh-result.cur { font-weight: 700; color: var(--brand-dark); }
.mh-results-empty { padding: 8px 12px; color: var(--muted); font: 400 14px/1.4 var(--ui); }
.mh-hint { font-size: 13px; padding: 8px 12px; border-radius: 5px; background: var(--teal-soft); color: var(--good); }
.mh-hint:empty { display: none; }
.mh-hint.warn { background: var(--warn-soft); color: var(--warn); }
.mh-hint.bad { background: var(--bad-soft); color: var(--bad); }
.mh-modal-back { position: fixed; inset: 0; background: rgba(11,5,77,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 9999; overflow: auto; }
.mh-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 540px; padding: 22px 26px 26px; box-shadow: 0 24px 60px rgba(11,5,77,.3); border-top: 5px solid var(--brand); }
.mh-modal.wide { max-width: 880px; }
.mh-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.mh-modal-head h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.mh-modal-sub { color: var(--muted); font-weight: 600; margin-top: -6px; }
.mh-toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 5px; opacity: 0; transition: .2s; z-index: 10000; pointer-events: none; font: 600 14px/1.4 var(--ui); box-shadow: 0 10px 30px rgba(11,5,77,.3); }
.mh-toast.show { opacity: 1; transform: translate(-50%, 0); }
.mh-toast.err { background: var(--bad); }

/* ---------- sign in: home page hero look (pale blue panel, oversized rounded corner) ---------- */
.mh-root:has(.mh-login) { background: #fff; position: relative; z-index: 0; }
.mh-root:has(.mh-login)::before { content: ""; position: fixed; z-index: -1; top: 0; left: 0; right: 0; height: 62vh; background: var(--tint); border-bottom-right-radius: 220px; }
.mh-login { position: relative; max-width: 430px; margin: 15vh auto 0; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 36px 36px 32px; }
.mh-login .mh-logo { margin-bottom: 14px; }
.mh-login .mh-logo::before { width: 150px; height: 44px; }
.mh-login > p { margin: 8px 0 0; }
.mh-login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.mh-login-form label { display: flex; flex-direction: column; gap: 6px; font: 700 12px/1.4 var(--label); }
.mh-login-form input { font: 16px/1.3 var(--ui); padding: 12px; border: 1px solid var(--line-strong); border-radius: 5px; }
.mh-login-form .mh-btn { justify-content: center; padding: 13px; font-size: 18px; }
.mh-sent { background: var(--teal-soft); color: var(--good); padding: 14px; border-radius: 5px; border-left: 4px solid var(--teal); margin: 0; }

/* no HubSpot chat bubble on this page (the template also tells HubSpot not to load it) */
#hubspot-messages-iframe-container { display: none !important; }

/* ---------- invoice ---------- */
.mh-invoice { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 44px; max-width: 900px; }
.mh-inv-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.mh-inv-head h1 { margin: 0 0 6px; font-size: 24px; }
.mh-inv-head h2 { margin: 0 0 8px; font: 22px/1 var(--display); letter-spacing: .12em; color: var(--brand); text-align: right; }
.mh-inv-head th { text-align: right; color: var(--muted); font-weight: 600; padding: 2px 10px 2px 0; }
.mh-inv-to { display: flex; flex-direction: column; margin-bottom: 24px; }
.mh-inv-notes { margin-top: 24px; color: var(--muted); }
@media print {
  body * { visibility: hidden; }
  .mh-invoice, .mh-invoice * { visibility: visible; }
  .mh-invoice { position: absolute; left: 0; top: 0; border: 0; padding: 0; max-width: none; width: 100%; }
}

/* ---------- agreement setup ---------- */
.mh-drop { border: 2px dashed var(--line-strong); border-radius: 10px; padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: var(--brand-soft); }
.mh-drop:hover, .mh-drop.over { border-color: var(--brand); background: #dff0f9; }
.mh-drop.busy { cursor: progress; border-style: solid; animation: mh-pulse 1.4s ease-in-out infinite; }
@keyframes mh-pulse { 50% { background: var(--teal-soft); } }
.mh-draft { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mh-draft.off { opacity: .45; }
.mh-draft-main { display: flex; flex-direction: column; gap: 4px; }
.mh-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mh-pill { font-size: 12px; background: #eef2f6; border-radius: 3px; padding: 1px 8px; }
.mh-pill.new { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.mh-quote { margin: 4px 0 0; padding: 4px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); font-size: 13px; }
.mh-banner ul { margin: 6px 0 0; padding-left: 20px; }
.mh-facts { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; }

/* ---------- tablet ---------- */
@media (max-width: 980px) {
  .mh-nav { gap: 18px; }
  .mh-user > span { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  .mh-root, .mh-modal-back, .mh-toast { font-size: 15px; }
  .mh-shell { padding: 0 14px 48px; }

  /* header: logo + sign out on top, tabs as a scrolling strip underneath */
  .mh-nav { flex-wrap: wrap; gap: 0; min-height: 0; }
  .mh-logo { order: 1; padding: 12px 0; flex: 1; font-size: 0; }
  .mh-logo::before { width: 104px; height: 30px; }
  .mh-logo::after { font-size: 18px; padding-left: 10px; }
  .mh-user { order: 2; }
  .mh-user .mh-link { padding: 7px 12px; font-size: 14px; }
  .mh-tabs { order: 3; flex: 0 0 calc(100% + 28px); margin: 0 -14px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid #e3e8ee; }
  .mh-tabs::-webkit-scrollbar { display: none; }
  .mh-tabs a { padding: 12px 11px 9px; font-size: 16px; white-space: nowrap; }
  .mh-main { padding-top: 20px; }
  .mh-main::before { height: 170px; }

  .mh-toolbar { gap: 10px; margin-bottom: 14px; }
  .mh-toolbar h2 { font-size: 20px; flex-basis: 100%; }
  .mh-group { width: 100%; }
  .mh-group > .mh-select, .mh-group > .mh-filter, .mh-group > .mh-date { flex: 1 1 140px; min-width: 0; }
  .mh-filter { min-width: 0; }
  .mh-seg { flex: 0 0 auto; }

  .mh-card { padding: 16px; margin-bottom: 14px; }
  .mh-card:has(table) { padding: 4px 16px 10px; }
  .mh-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mh-stat { padding: 12px 14px; }
  .mh-stat b { font-size: 20px; }

  /* tables scroll sideways inside their card, first column stays put */
  .mh-table th, .mh-table td { white-space: nowrap; }
  .mh-table td:first-child, .mh-table th:first-child { position: sticky; left: -16px; background: #fff; z-index: 1; white-space: normal; min-width: 150px; max-width: 190px; padding-left: 16px; padding-right: 10px; box-shadow: 1px 0 0 var(--line); }
  .mh-table tr.click:hover td:first-child { background: var(--brand-soft); }
  .mh-rowlabel { min-width: 150px; }
  .mh-notes { white-space: normal; min-width: 200px; }

  /* week strip: 7 days in one row, week total full width below */
  .mh-weekstrip { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .mh-day { padding: 8px 0; font-size: 13px; border-radius: 4px; }
  .mh-day span { font-size: 9px; letter-spacing: .04em; }
  .mh-day.total { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 8px; padding: 8px; }

  /* day entries: text on top, hours + buttons in a row underneath */
  .mh-day-head > .mh-muted { display: none; }
  .mh-day-head .mh-btn.big { width: 100%; justify-content: center; }
  .mh-entry { grid-template-columns: 1fr auto auto; gap: 8px 10px; padding: 14px 0; }
  .mh-entry-main { grid-column: 1 / -1; }
  .mh-entry-hours { text-align: left; font-size: 20px; }
  .mh-entry.running { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

  /* modals become near-full-screen sheets */
  .mh-modal-back { padding: 10px 8px; align-items: flex-start; }
  .mh-modal, .mh-modal.wide { padding: 18px 16px 20px; border-radius: 10px; }
  .mh-modal-head h3 { font-size: 18px; }
  .mh-form .grid, .mh-card.grid { grid-template-columns: 1fr 1fr; }
  .mh-actions { justify-content: stretch; }
  .mh-actions > .mh-btn { flex: 1; justify-content: center; }
  .mh-actions > span:first-child { flex-basis: 100%; }
  .mh-form input, .mh-form select, .mh-form textarea, .mh-select, .mh-filter, .mh-date, .mh-in { font-size: 16px; } /* stops iOS zooming on focus */

  .mh-login { margin: 8vh 4px 0; padding: 28px 22px 24px; }
  .mh-root:has(.mh-login)::before { border-bottom-right-radius: 90px; height: 52vh; }
  .mh-invoice { padding: 20px; }
  .mh-inv-head h2 { text-align: left; }
  .mh-draft { grid-template-columns: auto 1fr; }
  .mh-draft > :last-child { grid-column: 2; }
}

/* Paste-link sign-in (iPhone home-screen app) */
.mh-paste-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
