/* The approved look "Verkstad" (docs/DESIGN.md): warm paper, white cards, one burnt-orange
   accent. One column made for a 390 px phone, centred on a computer. */
:root {
  --ground: #F6F1E7;
  --card: #FFFFFF;
  --line: #E4DACB;
  --soft: #FBE9DC;
  --text: #1E1B16;
  --quiet: #6B6256;
  --accent: #C2410C;
  --on-accent: #FFFFFF;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --column: 390px;
  --tabs-height: 73px;
  --composer-height: 126px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-family: var(--font); font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); line-height: 1.35; }

.column {
  max-width: var(--column); margin: 0 auto; padding: 20px 16px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.column.with-tabs { padding-bottom: calc(var(--tabs-height) + 24px + env(safe-area-inset-bottom, 0px)); }

h1, h2 { margin: 0; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 16px; font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

.hidden-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Fields and buttons: large targets for gloves and paint. Only the main buttons are orange;
   `a.button.primary` is a link that looks like one. */
input[type="password"], input[type="text"], input[type="date"], input[type="time"], input[type="number"] {
  font: inherit; font-size: 17px; min-height: 52px; padding: 0 16px; width: 100%;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text);
}
input:focus-visible { outline: 2px solid var(--quiet); outline-offset: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

button {
  font: inherit; font-size: 17px; font-weight: 600; min-height: 48px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
}
button.primary { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 16px; }
button.big { min-height: 56px; }
button.quiet { width: 100%; background: transparent; color: var(--quiet); font-weight: 500; }
a.button.primary {
  display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 0 16px;
  border-radius: 16px; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 700;
  text-decoration: none;
}

.error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-weight: 600; }

/* Login */
.column.login { padding-top: 18vh; gap: 20px; }
.wordmark { font-size: 40px; text-align: center; }
/* The test version's one line under the wordmark. */
.preview-note { margin: -8px 0 0; font-size: 15px; color: var(--quiet); text-align: center; }
.preview-note strong { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; }
.stack label { font-weight: 600; }

/* The tab bar, fixed at the bottom of every logged-in page; a page may put more right above it. */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; }
.tabs {
  background: var(--card); border-top: 1px solid var(--line);
  padding: 4px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabs-row { max-width: var(--column); margin: 0 auto; display: flex; }
.tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 60px; text-decoration: none; color: var(--quiet); font-size: 13px; font-weight: 500;
  stroke-width: 1.8;
}
.tab svg { stroke-width: inherit; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; stroke-width: 2.2; }

/* Idag */
.day-head { padding: 4px 4px 0; }
.day-head h1 { font-size: 17px; color: var(--quiet); font-weight: 700; letter-spacing: 0; }
.day-head .date { margin: 12px 0 0; font-size: 15px; color: var(--quiet); }
.day-total { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.day-total .figure {
  font-size: 64px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.day-total .unit { font-size: 17px; color: var(--quiet); }

.sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.session { display: flex; align-items: center; gap: 12px; padding: 16px; }
.session .mark { width: 6px; align-self: stretch; border-radius: 3px; background: var(--quiet); }
.session .what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.session .name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.session .time { font-size: 15px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.session .hours { font-size: 20px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { margin: 0; padding: 16px; color: var(--quiet); }

.week { padding: 16px; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; }
.week-total { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bars { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 10px; }
.bar-day { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-track { height: 90px; width: 100%; display: flex; align-items: flex-end; }
.bar { width: 100%; min-height: 4px; border-radius: 8px; background: var(--line); }
.bar-name { font-size: 13px; font-weight: 500; color: var(--quiet); }
.bar-day.is-today .bar { background: var(--quiet); }
.bar-day.is-today .bar-name { font-weight: 700; color: var(--text); }

.logout { margin-top: 10px; }

/* Chatt: today's and the week's hours at the top, the latest messages and replies, then the
   chips and the field to write in, fixed right above the tab bar. The page keeps room below
   the log for them, so the newest exchange can always scroll clear of them. */
.column.chat-page {
  min-height: 100vh;
  padding-bottom: calc(var(--tabs-height) + var(--composer-height) + 16px + env(safe-area-inset-bottom, 0px));
}
.chat-head {
  position: sticky; top: 0; z-index: 5; margin: -20px -16px 0; padding: 20px 20px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--ground); border-bottom: 1px solid var(--line);
}
.chat-hours { margin: 0; display: flex; flex-direction: column; align-items: flex-end; }
.chat-hours .label { font-size: 13px; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.05em; }
.chat-hours .figures { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }
.log { display: flex; flex-direction: column; gap: 10px; }
.exchange { display: flex; flex-direction: column; gap: 10px; }
.bubble { margin: 0; padding: 12px 16px; font-size: 17px; max-width: 85%; overflow-wrap: anywhere; }
.bubble p { margin: 0; }
.bubble.mine {
  align-self: flex-end; max-width: 80%; background: var(--accent); color: var(--on-accent); font-weight: 500;
  border-radius: 20px 20px 6px 20px;
}
.bubble.reply {
  align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px;
}
.receipt {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.receipt-mark {
  margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent);
}
.receipt-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.receipt-lines li { display: flex; flex-direction: column; }
.receipt-name { font-size: 17px; font-weight: 600; }
.receipt-when { font-size: 15px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.receipt-hours { white-space: nowrap; }
/* "Ändra" and "Ångra" side by side under the session, plain bordered targets. */
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.receipt-edit {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: 15px; text-decoration: none;
}
.receipt-undo { margin: 0; }
.receipt-undo button {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: transparent;
  color: var(--text); font-size: 15px; font-weight: 400;
}
/* A download in a reply, "Ladda ner Excel": a plain bordered target like "Ändra" (only the
   main buttons are orange). */
.reply-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 12px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); font-size: 16px;
  font-weight: 700; text-decoration: none;
}
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.choices button { min-height: 48px; }
/* A label on two lines breaks evenly: "Volvo · Torslanda" over "07:00–11:00". */
.choices button { text-wrap: balance; }
.choices.project-name { flex-wrap: nowrap; }
.choices.project-name input[type="text"] { flex: 1; min-width: 0; min-height: 48px; }

.composer {
  background: var(--ground);
  padding: 8px max(12px, calc((100% - var(--column)) / 2 + 12px)) 10px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip { margin: 0; flex: none; }
.chip button {
  min-height: 48px; padding: 0 16px; border-radius: 999px; background: transparent;
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.send { display: flex; gap: 8px; }
.send input[type="text"] { flex: 1; min-width: 0; }
.send button.round {
  flex: none; width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Vecka: the week's name with steps back and forward, its total and split, filter chips per
   customer (the chosen one dark), then the days with sessions as cards. */
.vecka-head { padding: 0 4px; display: flex; flex-direction: column; gap: 14px; }
.vecka-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step, .step-gap { flex: none; width: 48px; height: 48px; }
.step {
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text); font-size: 26px; line-height: 1; text-decoration: none;
}
.vecka-name { text-align: center; }
.vecka-name h1 {
  font-size: 14px; font-weight: 500; color: var(--quiet); letter-spacing: 0.04em; text-transform: uppercase;
}
.vecka-name p { margin: 0; font-size: 18px; font-weight: 700; }
/* The total and split on the left, the orange "Excel" download on the right. */
.vecka-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.vecka-figures { min-width: 0; }
/* "Fakturera" (with a customer chosen and uninvoiced hours) and "Historik", plain bordered
   links (only the main buttons are orange), above "Excel". */
.vecka-actions { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.history-link, .invoice-week {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.excel {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 700;
  text-decoration: none;
}
.vecka-sum .figure {
  margin: 0; font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.vecka-sum .split { margin: 6px 0 0; font-size: 15px; color: var(--quiet); font-variant-numeric: tabular-nums; }
/* "Belopp 12 350 kr" in the text colour, what is without a price quiet after it. */
.vecka-sum .money { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--text); font-size: 15px; text-decoration: none; overflow-wrap: anywhere;
}
.filter-chip[aria-current="true"] { border-color: var(--text); background: var(--text); color: var(--ground); font-weight: 600; }

.vecka-days { display: flex; flex-direction: column; gap: 12px; }
.vecka-day { padding: 14px 16px 4px; }
.vecka-day-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; }
.vecka-day-total { font-size: 15px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.vecka-sessions { list-style: none; margin: 0; padding: 0; }
/* Each session is a link to its edit form, as tall as a target. */
.vecka-session { border-top: 1px solid var(--line); }
.vecka-edit {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 0; color: var(--text);
  text-decoration: none;
}
.vecka-edit::after { content: "›"; color: var(--quiet); font-size: 24px; line-height: 1; margin-left: -4px; }
.vecka-session .mark { width: 6px; align-self: stretch; border-radius: 3px; background: var(--quiet); }
.vecka-session .what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.vecka-session .name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.vecka-session .time { font-size: 14px; color: var(--quiet); font-variant-numeric: tabular-nums; }
/* For an admin, whose session it is ("Anna"), before its times. */
.vecka-session .person { font-weight: 600; color: var(--text); }
.vecka-session .hours { font-size: 19px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vecka-session .money { font-size: 16px; font-weight: 600; }
/* The hours with "Fakturerad" or "Betald" small and quiet under them. */
.vecka-session .amount { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.vecka-session .status { font-size: 13px; font-weight: 600; color: var(--quiet); white-space: nowrap; }

/* After the session form: "Sparat." with the orange mark, and what the session overlaps. */
.saved-note { margin: 0; padding: 14px 16px; font-size: 16px; overflow-wrap: anywhere; }
.saved-mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); vertical-align: -3px; }

/* The round "+" that opens the session form, right above the tab bar. The page keeps room
   for it below the last day. */
.column.with-fab { padding-bottom: calc(var(--tabs-height) + 104px + env(safe-area-inset-bottom, 0px)); }
.fab-row {
  max-width: var(--column); margin: 0 auto; padding: 0 20px 16px; display: flex; justify-content: flex-end;
  pointer-events: none;
}
.fab {
  pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: var(--accent); color: var(--on-accent); font-size: 34px; line-height: 1;
  text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* The session form: one field under the other, start and end side by side, "Spara" last. */
.form-head { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.form-head h1 { font-size: 26px; }
.session-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 15px; font-weight: 600; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.session-form input { min-height: 56px; }
.session-form input[type="date"], .session-form input[type="time"] { appearance: none; -webkit-appearance: none; }
.session-form button[type="submit"] { min-height: 64px; margin-top: 4px; }
/* The price the session was saved with, which an edit on the same project keeps. */
.session-price { margin: 0; font-size: 16px; font-weight: 600; color: var(--quiet); font-variant-numeric: tabular-nums; }
/* "Ta bort" under the edit form and "Avbryt" in its confirmation: plain, not orange. */
a.button.plain {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text);
  font-size: 17px; font-weight: 600; text-decoration: none;
}
.confirm { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; }
.confirm-question { margin: 0 0 8px; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.confirm button[type="submit"] { min-height: 64px; }
.gone { display: flex; flex-direction: column; gap: 16px; padding: 20px 16px; }
.gone h1 { font-size: 22px; }

/* Kunder: "+ Ny kund" (orange) next to the heading, then one card per customer, its hours
   this month on the right, its projects below; the card opens the customer's sessions on
   the Vecka tab, and "Ändra" under it opens the customer. */
.kunder-head { padding: 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kunder-head h1 { font-size: 30px; }
.new-customer {
  flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 14px;
  background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 700; text-decoration: none;
}
.kunder { display: flex; flex-direction: column; gap: 12px; }
.kund { display: block; padding: 14px 16px; color: var(--text); }
.kund-open { display: block; color: var(--text); text-decoration: none; }
/* A plain bordered target: "Ändra", "Byt namn", "Slå ihop med…" (only the main buttons are orange). */
.kund-edit, .plain-target {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.kund-edit { margin-top: 12px; }
.finished { font-size: 14px; font-weight: 500; color: var(--quiet); }
.kund-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 28px; }
.kund-head h2 { font-size: 20px; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.kund-total { font-size: 16px; color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kund-projects { list-style: none; margin: 0; padding: 0; }
.kund-project {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 0 2px;
  border-top: 1px solid var(--line); font-size: 17px;
}
.kund-project .name { min-width: 0; overflow-wrap: anywhere; }
.kund-project .hours { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Historik (opened from the Vecka tab): one card per change, newest first, with what kind it
   was and its time, where it came from, then the session before and after as a line each. */
.history { display: flex; flex-direction: column; gap: 12px; }
.change { padding: 14px 16px; }
.change-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.change-kind { font-size: 17px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.change-at { font-size: 15px; color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.change-source { margin: 2px 0 0; font-size: 14px; color: var(--quiet); overflow-wrap: anywhere; }
.change-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.change-line {
  padding: 10px 0 2px; border-top: 1px solid var(--line); font-size: 16px; overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.change-line + .change-line { margin-top: 8px; }
.change-line .label { font-weight: 700; }
/* "Ångra" on a session change: a plain bordered target, like "Ändra" on the chat's receipt. */
.change-undo { margin: 12px 0 0; }
.change-undo button {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  color: var(--text); font-size: 15px; font-weight: 600;
}

/* A customer, opened with "Ändra": its hours this month and the buttons that change it,
   then its projects, each with "Byt namn" and "Avsluta", and "+ Nytt projekt" last. */
.note-link { color: var(--text); font-weight: 600; white-space: nowrap; }
.kund-sum { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.kund-month { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.kund-month .figure {
  font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.kund-month .unit { font-size: 17px; color: var(--quiet); }
.kund-actions, .detail-project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kund-detail { padding: 14px 16px; }
.kund-detail .empty { padding: 12px 0 0; }
.detail-projects { list-style: none; margin: 0; padding: 0; }
.detail-project { margin-top: 10px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.detail-project-head { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.detail-project-head .name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.detail-project-head .hours { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detail-project-actions { margin-top: 10px; }
/* The hourly prices: the customer's next to "Ändra timpris", each project's under its name. */
.kund-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kund-rate { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kund-rate.is-none, .detail-project-rate.is-none { font-weight: 500; color: var(--quiet); }
.detail-project-rate { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.form-hint { margin: -4px 0 0; font-size: 15px; color: var(--quiet); }
.finish-project { margin: 0; }
.finish-project button { font-size: 16px; }
.detail-project.is-finished .detail-project-head .name { color: var(--quiet); }

/* "Slå ihop med…": a button per other customer, then the confirmation naming both. */
.confirm-detail { margin: -4px 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.merge-choices { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.merge-choice { width: 100%; justify-content: flex-start; min-height: 56px; font-size: 17px; overflow-wrap: anywhere; }
.form-head h1 { min-width: 0; overflow-wrap: anywhere; }

/* Fakturor (opened from the Kunder tab): "Fakturor" next to "+ Ny kund"; the invoices, newest
   first, each a card that opens it; "Ny faktura" with a customer, two days and "Visa", the
   uninvoiced sessions with their total and the orange "Markera som fakturerade"; an invoice
   with its total, hours per project and sessions. */
.kunder-head { flex-wrap: wrap; }
.kunder-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.invoices-head h1 { flex: 1 1 auto; }
select {
  font: inherit; font-size: 17px; min-height: 56px; padding: 0 16px; width: 100%;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text);
}
select:focus-visible { outline: 2px solid var(--quiet); outline-offset: 0; }
.invoices { display: flex; flex-direction: column; gap: 12px; }
.invoice-card { display: flex; flex-direction: column; gap: 4px; min-height: 48px; padding: 14px 16px; color: var(--text); text-decoration: none; }
.invoice-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.invoice-number { font-size: 20px; font-weight: 800; }
.invoice-card .hours { font-size: 19px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-card-what { font-size: 16px; color: var(--quiet); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.invoice-card .invoice-customer { color: var(--text); font-weight: 600; }
.invoice-sessions { padding: 14px 16px; }
.invoice-lines { list-style: none; margin: 0; padding: 0; }
.invoice-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 0 2px;
  border-top: 1px solid var(--line);
}
.invoice-line .what { min-width: 0; display: flex; flex-direction: column; }
.invoice-line .name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.invoice-line .time { font-size: 14px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.invoice-line .person { font-weight: 600; color: var(--text); }
.invoice-line .hours { font-size: 19px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-total {
  display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding-top: 12px;
  border-top: 2px solid var(--text); font-size: 19px; font-weight: 800;
}
.invoice-total .hours { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-mark { margin: 0; display: flex; flex-direction: column; }
.invoice-mark button { min-height: 64px; }
.invoice-sum { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.invoice-sum .invoice-customer { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.invoice-sum p { margin: 0; }
.invoice-sum .invoice-period, .invoice-sum .invoice-date { font-size: 16px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.invoice-figure { display: flex; align-items: baseline; gap: 8px; }
.invoice-figure .figure {
  font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.invoice-figure .unit { font-size: 17px; color: var(--quiet); }
/* Story 7.3: on an invoice, "Betald …" under the day it was invoiced, then the orange
   "Markera som betald" (plain "Markera som obetald" once paid); "Ta bort faktura" last, plain.
   On the list, each invoice says "Fakturerad" or "Betald" with its day. */
.invoice-sum .invoice-paid { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.invoice-pay { margin: 10px 0 0; display: flex; flex-direction: column; }
.invoice-pay button { min-height: 56px; }
.invoice-state { font-size: 15px; font-weight: 600; color: var(--quiet); font-variant-numeric: tabular-nums; }
.invoice-state.is-paid { color: var(--text); }
/* Story 7.5: under the invoice's total, "Excel" and "CSV" download its basis; plain bordered
   buttons side by side, as only "Markera som betald" is orange there. */
.basis-downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.basis-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  font-size: 16px; font-weight: 700; text-decoration: none;
}
/* Story 8.3: an invoice's amount under its hours, each project's and session's amount (a
   session's price before it) under its hours, and "Belopp" under "Totalt"; the hours without
   a price ("varav 4 h utan timpris") quieter, next to the amount. */
.invoice-sum .invoice-amount {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px;
  font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.invoice-amount .money, .invoice-total-amount .money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.unpriced { font-size: 15px; font-weight: 600; color: var(--quiet); }
.invoice-line .figures, .invoice-total-amount .figures {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right;
}
.invoice-line .money { font-size: 15px; font-weight: 600; color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-total-amount {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 6px 0 0;
  font-size: 19px; font-weight: 800;
}
/* Story 9.2: the users, under the Kunder tab. A card per user with its role, "Avstängd"
   quieter for a deactivated one; a user's page has its role, a new password and "Stäng av"
   or "Aktivera", each a plain button, as none of them is the page's main action. */
.users { display: flex; flex-direction: column; gap: 12px; }
.user-card {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 48px;
  padding: 14px 16px; color: var(--text); text-decoration: none;
}
.user-name { min-width: 0; font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.user-what { flex: none; display: flex; gap: 8px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.user-role { color: var(--quiet); }
.user-off { color: var(--text); }
.user-card.is-off .user-name { color: var(--quiet); }
.user-form button[type="submit"] { min-height: 56px; }
.user-state { margin: 0; font-size: 16px; font-weight: 600; color: var(--quiet); }
.user-state.is-off { color: var(--text); }
/* The Idag tab: "Inloggad som Anna" next to "Logga ut". */
.logout { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logged-in { min-width: 0; font-size: 15px; color: var(--quiet); overflow-wrap: anywhere; }
.logout button.quiet { width: auto; flex: none; }
