@font-face {
  font-family: "FatFrank";
  src: url("/assets/fat-frank-604b8739.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("/assets/mona-sans-bf7162d4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #211f1b;
  --muted: #776f62;
  --line: #e7dfd1;
  --paper: #ffffff;
  --card: #ffffff;
  --accent: #222222;
  --orange: #ff9d1d;
  --warn: #c14427;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: #222; font-weight: 800; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.current { color: var(--ink); font-weight: 800; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.field-hint { margin-top: 4px; }
header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; width: min(1500px, calc(100% - 2rem)); margin: 0 auto; padding: 1.35rem 3rem; background: var(--orange); border-radius: 0 0 30px 30px; }
nav { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; font-size: 18px; }
nav a.active { color: var(--ink); font-weight: 800; }
nav a { color: var(--ink); text-decoration: none; }
nav a.sign-out { border: 0; border-radius: 0; padding: 0; }
nav form { margin: 0; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; padding: .65rem 1rem; border-radius: 999px; background: #222; color: white; font-weight: 800; cursor: pointer; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-left: .65rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15rem) rotate(45deg); }
.mobile-nav[open] summary::after { transform: translateY(.1rem) rotate(225deg); }
.mobile-nav nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; display: grid; min-width: 190px; gap: 0; padding: .5rem; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 40px rgb(33 31 27 / 16%); }
.mobile-nav nav a { padding: .8rem 1rem; border-radius: 12px; text-decoration: none; }
.mobile-nav nav a:hover, .mobile-nav nav a.active { background: #f9f4f0; }
main { width: min(1400px, calc(100% - 8rem)); margin: 2.5rem auto 4rem; }
.brand { color: var(--ink); font-weight: 800; font-size: 20px; text-decoration: none; }
.page-title { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.title-with-pill { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.title-with-pill h1 { margin-bottom: 0; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin: 0; }
h1, h2 { font-family: "FatFrank", "Mona Sans", ui-sans-serif, system-ui, sans-serif; font-weight: 900; line-height: 1.05; margin: 0 0 1rem; }
h1 { font-size: 80px; letter-spacing: -3px; margin-bottom: 0; }
h2 { font-size: 1.35rem; }
h3 { margin: 0 0 .75rem; }
.card, table { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.card { padding: 1.25rem; margin-bottom: 1rem; }
.section { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-header h2 { margin-bottom: 1rem; }
.inline-form { display: flex; gap: .65rem; align-items: end; margin-top: 1rem; }
.inline-form label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.inline-form input[type="submit"] { margin-top: 0; }
.narrow { max-width: 540px; margin-inline: auto; }
main:has(.card.narrow) h1 { text-align: center; }
main:has(.card.narrow) .eyebrow { text-align: center; }
main:has(.card.narrow) .card.narrow { margin-top: 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.project-card { display: block; color: inherit; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem; }
.project-card small { color: var(--muted); }
.budget-bar { position: relative; display: flex; height: 18px; background: #eadfca; border-radius: 999px; overflow: hidden; }
.budget-bar-label { margin: 0 0 .35rem; color: var(--muted); font-size: .9rem; font-weight: 800; }
.budget-bar .used { display: block; height: 100%; background: #386ed6; }
.budget-bar.over { background: transparent; overflow: visible; margin-right: min(35%, 160px); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.project-budget-summary .budget-bar.over { margin-right: 0; }
.budget-bar.over .used { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.budget-bar .overage { display: block; height: 100%; background: var(--warn); border-top-right-radius: 999px; border-bottom-right-radius: 999px; box-shadow: inset 0 0 0 1px #9e321f; }
.over-budget { color: var(--warn); }
.projects-table a { color: #222; font-weight: 800; }
.projects-table .project-progress { min-width: 220px; }
.project-progress .budget-bar { max-width: 220px; }
.project-remaining { white-space: nowrap; }
.project-remaining small { color: var(--muted); }
.pill { display: inline-block; padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .82rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
thead th { background: #f9f4f0; }
tbody td { background: #fff; }
tbody tr.client-row td { background: #fcfaf8; color: var(--muted); font-size: .9rem; padding-top: .75rem; padding-bottom: .35rem; }
th, td { padding: .95rem 1.25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
td { font-size: .92rem; }
.subrow td:first-child { padding-left: 2rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
label { display: block; margin: 1.1rem 0 .3rem; color: var(--ink); font-size: .95rem; font-weight: 800; }
form > label:first-of-type, form > div:first-child > label:first-of-type { margin-top: 0; }
input, select, textarea { width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: white; }
textarea { resize: vertical; }
input[type="checkbox"] { width: auto; }
input[type="radio"] { width: auto; }
input[type="submit"], button, .button { display: inline-block; width: auto; margin-top: 1rem; padding: .65rem 1rem; border: 0; border-radius: 999px; background: #222; color: white; font: inherit; font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer; }
.timer-field { display: flex; gap: .65rem; align-items: center; }
.timer-field input { flex: 1; }
.timer-field button { margin-top: 0; white-space: nowrap; }
.timer-running .timer-field button { background: var(--warn); }
.recording-dot { display: none; width: .75rem; height: .75rem; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 rgb(193 68 39 / 70%); }
.timer-running .recording-dot { display: inline-block; animation: recording-pulse 1.2s infinite; }

@keyframes recording-pulse {
  0% { box-shadow: 0 0 0 0 rgb(193 68 39 / 70%); opacity: 1; }
  70% { box-shadow: 0 0 0 .45rem rgb(193 68 39 / 0%); opacity: .65; }
  100% { box-shadow: 0 0 0 0 rgb(193 68 39 / 0%); opacity: 1; }
}
.secondary { background: var(--muted); }
.notice, .alert { padding: .75rem 1rem; border-radius: 12px; background: #e6f1e9; }
.alert { background: #f7ded9; color: var(--warn); }
.totals { display: flex; gap: 2rem; flex-wrap: wrap; }
.filters { margin-bottom: 1rem; }
.filters form { display: flex; gap: 1rem; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.filter-status { min-width: 210px; }
.filter-fields { display: flex; gap: .65rem; align-items: end; justify-content: flex-end; flex: 1; flex-wrap: wrap; }
.filter-fields > div { min-width: 150px; }
.filters label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.filters a { align-self: center; }
.filters input, .filters select { padding: .55rem .75rem; border-radius: 8px; font-size: .9rem; background: white; }
.actions { text-align: right; white-space: nowrap; }
.status-pill { text-align: right; }
.report-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.report-nav form { display: flex; align-items: end; gap: .5rem; }
.report-nav input[type="date"] { width: auto; }
.report-nav input[type="month"] { width: auto; }
.report-nav input[type="submit"] { margin-top: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card { background: #fcfaf8; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; }
.metric-card span { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.metric-card strong { display: block; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1; letter-spacing: -.04em; }
.charts-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1rem; margin-bottom: 1rem; }
.chart-card { background: #fcfaf8; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; overflow: hidden; }
.chart-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: .5rem; }
.chart-head p { margin: 0; color: var(--muted); }
.line-chart { width: 100%; height: auto; display: block; }
.grid-line { stroke: #e4ded2; stroke-width: 1; }
.axis-line { stroke: #8d8678; stroke-width: 1.5; }
.axis-label { fill: var(--muted); font-size: 14px; font-family: ui-sans-serif, system-ui, sans-serif; }
.budget-line { stroke: var(--warn); stroke-width: 2; }
.budget-label { fill: var(--warn); font-size: 14px; font-weight: 700; font-family: ui-sans-serif, system-ui, sans-serif; }
.progress-line { fill: none; stroke: #5f625e; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.progress-dot { fill: #353936; stroke: white; stroke-width: 3; }
.over-dot { fill: var(--warn); stroke: white; stroke-width: 3; }

@media (max-width: 900px) {
  h1 { font-size: clamp(4rem, 18vw, 80px); }
}
.bar-chart { height: 280px; display: flex; align-items: end; gap: .65rem; padding-top: 1rem; overflow-x: auto; }
.week-bar { min-width: 58px; height: 100%; display: grid; grid-template-rows: 1fr auto auto; gap: .35rem; text-align: center; color: var(--muted); font-size: .8rem; }
.week-bar strong { color: var(--ink); font-size: .9rem; }
.bar-fill { align-self: end; min-height: 4px; border-radius: 8px 8px 2px 2px; background: #386ed6; box-shadow: inset 0 0 0 1px #2751a4; }
.invoice-controls { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.invoice-controls form { display: flex; align-items: end; gap: .65rem; flex-wrap: wrap; }
.invoice-controls label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.invoice-controls select { min-width: 180px; padding: .55rem .75rem; border-radius: 8px; font-size: .9rem; }
.project-tabs { margin-top: 2rem; }
.project-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tab-labels { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.tab-labels label { width: auto; margin: 0; padding: 0 0 .75rem; color: var(--muted); font-size: 1.15rem; font-weight: 600; cursor: pointer; border-bottom: 4px solid transparent; }
#project-tab-tasks:checked ~ .tab-labels label[for="project-tab-tasks"], #project-tab-team:checked ~ .tab-labels label[for="project-tab-team"], #project-tab-time:checked ~ .tab-labels label[for="project-tab-time"] { color: var(--ink); font-weight: 900; border-color: var(--orange); }
.project-tab-panel { display: none; }
#project-tab-tasks:checked ~ .tasks-panel, #project-tab-team:checked ~ .team-panel, #project-tab-time:checked ~ .time-panel { display: block; }
.danger-zone { margin-top: 1rem; }
.danger-zone input[type="submit"], .danger-zone button { background: var(--warn); }

@media (max-width: 700px) {
  header { padding: 1.25rem; align-items: flex-start; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .page-title { align-items: flex-start; flex-direction: column; }
  .filters form, .filter-fields { align-items: stretch; flex-direction: column; }
  .timer-field { align-items: stretch; flex-direction: column; }
  .filter-status, .filter-fields > div { width: 100%; }
  body { font-size: 16px; }
  table { display: block; overflow-x: auto; }
  .charts-grid { grid-template-columns: 1fr; }
  .invoice-controls, .invoice-controls form { align-items: stretch; flex-direction: column; }
}
