/* Klientų portalas — same look as kibernetas.lt (green + yellow, Bricolage Grotesque + Figtree). */

@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin-ext.woff2) format('woff2'); unicode-range: u+0100-02ba, u+02bd-02c5, u+02c7-02cc, u+02ce-02d7, u+02dd-02ff, u+0304, u+0308, u+0329, u+1e00-1e9f, u+20a0-20ab, u+20ad-20c4; }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin.woff2) format('woff2'); unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+2000-206f, u+20ac, u+2122, u+2212; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-ext.woff2) format('woff2'); unicode-range: u+0100-02ba, u+02bd-02c5, u+02c7-02cc, u+02ce-02d7, u+02dd-02ff, u+0304, u+0308, u+0329, u+1e00-1e9f, u+20a0-20ab, u+20ad-20c4; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin.woff2) format('woff2'); unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+2000-206f, u+20ac, u+2122, u+2212; }

:root {
  --ground: #f3f6f4;
  --white: #ffffff;
  --ink: #12221e;
  --muted: #4a5a55;
  --line: #dce3df;
  --primary: #0f7b5f;
  --primary-dark: #0a5a45;
  --yellow: #ffcd4a;
  --yellow-dark: #f5bd2a;
  --deep: #0b3a31;
  --mint: #dff0ea;
  --error: #b42318;
  --error-bg: #fdecea;
  --warn-bg: #fff6d9;
  --radius: 16px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: 21px; margin-top: 1.6em; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }

.top { background: var(--deep); color: #fff; }
.top-inner { max-width: 960px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 20px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; flex: none; }
.brand span { color: var(--yellow); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 7px; color: #dce8e3; text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.nav .dot { background: var(--yellow); color: var(--ink); font-size: 11px; line-height: 18px; min-width: 18px; padding: 0 5px; border-radius: 999px; text-align: center; }
.who { font-size: 14px; color: #b9cfc7; display: flex; gap: 12px; align-items: center; min-width: 0; }
.who-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.who form { margin: 0; }
.who button { background: none; border: 0; color: #dce8e3; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; white-space: nowrap; }

/* Phones: brand + sign-out on top, the four sections as a bottom tab bar (thumb-reachable). */
@media (max-width: 760px) {
  .top-inner { justify-content: space-between; gap: 12px; }
  .who-name { max-width: 150px; }
  .nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; gap: 0; background: #fff; border-top: 1px solid var(--line);
         padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(18,34,30,.06); }
  .nav a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 12px; color: var(--muted); }
  .nav a:hover { background: transparent; color: var(--ink); }
  .nav a.on { background: var(--mint); color: var(--primary-dark); }
  .nav svg { width: 22px; height: 22px; }
  .nav .dot { position: absolute; top: 2px; left: calc(50% + 6px); }
  body.has-tabs { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

main { max-width: 960px; margin: 0 auto; padding: 28px 16px 64px; }
.narrow { max-width: 560px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--yellow); color: var(--ink); border: 0; border-radius: 999px; padding: 12px 22px; font: 700 16px var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--yellow-dark); }
.btn.green { background: var(--primary); color: #fff; }
.btn.green:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--primary); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.block { width: 100%; }

.action { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.action:first-of-type { border-top: 0; }
.action .what { flex: 1; min-width: 200px; }
.action .what strong { display: block; }
.amount { font-family: var(--display); font-weight: 700; font-size: 20px; white-space: nowrap; }
.big-amount { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; margin: 4px 0 12px; }

/* Paid invoice rows: title + number on the left, amount + status on the right, PDF button. */
.doc { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.card h2 + .doc { border-top: 0; }
.doc-main { flex: 1; min-width: 0; }
.doc-main strong { display: block; overflow-wrap: anywhere; }
.doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.doc-side .amount { font-size: 17px; }

a.link-row { color: inherit; text-decoration: none; }
a.link-row:hover strong { color: var(--primary); }
.note { background: #f6f8f7; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.help-intro { background: var(--mint); border-color: #cbe5dc; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--mint); color: var(--primary-dark); white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: #8a5a00; }
.badge.bad { background: var(--error-bg); color: var(--error); }
.badge.grey { background: #eef1ef; color: var(--muted); }

.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; background: var(--mint); color: var(--primary-dark); font-weight: 600; }
.flash.error { background: var(--error-bg); color: var(--error); }

label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=email], textarea { width: 100%; padding: 12px 14px; border: 1.5px solid #c9d3ce; border-radius: 12px; font: inherit; background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
textarea { min-height: 120px; }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }

/* Offer scope: ✓ list for what's included, plain dashes for the rest. Two columns on wide screens. */
ul.ticks, ul.plain { list-style: none; padding: 0; margin: 0 0 4px; columns: 2 280px; column-gap: 28px; }
ul.ticks li, ul.plain li { position: relative; padding: 0 0 8px 28px; break-inside: avoid; }
ul.ticks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a5a45' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
ul.plain li::before { content: '–'; position: absolute; left: 6px; color: var(--muted); }

.stages { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.stages li { position: relative; padding: 0 0 20px 44px; }
.stages li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.stages li.done::before { content: '✓'; background: var(--primary); color: #fff; }
.stages li.waiting::before { background: var(--yellow); }
.stages li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }

.thread .msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; background: #f6f8f7; }
.thread .msg.admin { background: var(--mint); }
.thread .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

.terms { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 14px; background: #fafbfa; }
.terms h1 { font-size: 20px; } .terms h2 { font-size: 16px; margin-top: 1.2em; }
.prose h1 { font-size: 26px; } .prose h2 { font-size: 19px; }

footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

@media (max-width: 600px) {
  main { padding-top: 20px; }
  h1 { font-size: 26px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .action { gap: 10px; }
  .action .what { min-width: 0; flex-basis: 100%; }
  .action .amount { flex: 1; }
  .action .btn:not(.small) { flex: 1; }
  .big-amount { font-size: 34px; }
  .doc { flex-wrap: wrap; row-gap: 8px; }
  .doc-main { flex-basis: 100%; }
  .doc-side { flex: 1; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
  th.hide-sm, td.hide-sm { display: none; }
  th, td { padding: 9px 4px; }
  .foot { padding-bottom: 24px; }
}
