/* Lethusiya invoice portal. Colours and heading font match the website (css/styles.css). */
@font-face {
  font-family: "PT Sans Narrow";
  src: url("../../fonts/pt-sans-narrow-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --blue: #2b8be0; --blue-dark: #1f6fb2; --blue-darker: #185a91; --blue-light: #eaf5fe; --blue-alt: #f4f9fe;
  --heading: #1190c4; --text: #1d2a36; --muted: #5a6b7b; --line: #d6e8f7; --field: #b8cfe3;
  --red: #b42318; --red-light: #fdecea; --green: #1a7f37; --green-light: #e8f5ec; --amber: #8a5a00; --amber-light: #fff4dc;
  --font-heading: "PT Sans Narrow", "Arial Narrow", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--blue-alt); }
a { color: var(--blue-dark); }
a:hover { color: var(--blue-darker); }
h1, h2 { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; color: var(--heading); line-height: 1.1; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.top { background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .75rem max(4vw, 16px); }
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; color: var(--heading); }
.logo-tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.1rem; }
.nav a, .link { color: var(--text); font-weight: 600; text-decoration: none; }
.nav a:hover, .link:hover { color: var(--blue-dark); }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem max(4vw, 16px) 4rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; margin: 0 0 1.25rem; }
.narrow { max-width: 440px; margin: 2rem auto; }
.muted { color: var(--muted); }
.right { text-align: right; }
.inline { display: inline; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 8px; border: 1px solid var(--blue-dark); background: var(--blue-dark); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-darker); border-color: var(--blue-darker); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-dark); }
.btn-ghost:hover { background: var(--blue-light); color: var(--blue-darker); }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
label { display: block; font-weight: 600; margin: 0 0 .9rem; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; border: 1px solid var(--field); border-radius: 6px; font: inherit; color: var(--text); background: #fff; }
textarea { min-height: 7rem; resize: vertical; }
input[type="checkbox"] { display: inline-block; width: auto; margin: 0 .4rem 0 0; vertical-align: middle; }
label.check { font-weight: 400; }
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 1px; bottom: 1px; top: calc(.3rem + 1px); width: 2.75rem; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0 5px 5px 0; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--blue-dark); }
.pw-toggle svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 600; padding: 0 .25rem; }
.grid2 { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid4 { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.notice { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; background: var(--blue-light); }
.notice.success { background: var(--green-light); color: var(--green); }
.notice.error { background: var(--red-light); color: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.num { text-align: right; white-space: nowrap; }
.lines input { min-width: 5rem; margin: 0; }
.lines tbody tr:nth-child(odd) { background: #fbf9f6; }
.nodays .dcol { display: none; }
.lines .qty, .lines .days { width: 5.5rem; }
.lines .work { width: 100%; min-width: 14rem; }
.lines .rate { width: 8rem; }
.lines [hidden] { display: none; }
.line-actions { margin: .75rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sums { max-width: 380px; margin: 1rem 0 0 auto; }
.sums div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .5rem; font-weight: 600; }
.sums div[hidden] { display: none; }
.sums .total { border-top: 2px solid var(--text); margin-top: .25rem; color: var(--heading); font-size: 1.2rem; }
.sums .balance { color: var(--red); }
.counters { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0 0 1.5rem; }
.counter { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); }
.counter b { display: block; font-family: var(--font-heading); font-size: 2rem; color: var(--heading); line-height: 1; }
.counter:hover { border-color: var(--blue); color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.filters label { margin: 0; flex: 1 1 180px; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: #eef1f4; color: var(--text); white-space: nowrap; }
.badge-waiting-for-approval, .badge-part-paid { background: var(--amber-light); color: var(--amber); }
.badge-rejected, .badge-unpaid { background: var(--red-light); color: var(--red); }
.badge-paid { background: var(--green-light); color: var(--green); }
.badge-sent { background: var(--blue-light); color: var(--blue-darker); }
.badge-cancelled { text-decoration: line-through; }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-bottom: 3px solid #3b3330; padding-bottom: .75rem; margin-bottom: 1rem; }
.sheet-title { font: 400 1.8rem Georgia, "Times New Roman", serif; color: #1a8fd6; margin: 0; }
.parties { margin-bottom: 1rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .75rem; }
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .right { text-align: left; }
  .sums { max-width: none; }
}
