/* Προσφορές · Panos — the quote tool. Phone first. Brand: navy #14324F, orange #E07A3F, Commissioner. */
@font-face { font-family: "Commissioner"; font-weight: 400; font-display: swap; src: url("/fonts/Commissioner-400.ttf") format("truetype"); }
@font-face { font-family: "Commissioner"; font-weight: 600; font-display: swap; src: url("/fonts/Commissioner-600.ttf") format("truetype"); }
@font-face { font-family: "Commissioner"; font-weight: 800; font-display: swap; src: url("/fonts/Commissioner-800.ttf") format("truetype"); }

:root {
  --navy: #14324F; --navy-900: #0C2238; --navy-100: #E3EAF1; --orange: #E07A3F; --orange-600: #C9652B; --orange-100: #FBE9DD;
  --sand: #F6F2EC; --sand-300: #DED5C8; --ink: #16212B; --muted: #55657A; --line: #E3E8EE; --ok: #1E7F4F; --bad: #B3261E;
  --r: 14px; --pad: 16px;
  --font: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.45; color: var(--ink); background: var(--sand); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.boot { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }

/* ---------- frame ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--pad) 12px; display: flex; align-items: center; gap: 12px; }
.top__wm { height: 18px; width: auto; fill: #fff; display: block; flex: none; }
.top__title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__back { flex: none; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 10px; height: 40px; padding: 0 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.top__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: none; margin-inline-start: -8px; align-self: flex-end; margin-bottom: 1px; }
.wrap { max-width: 620px; margin: 0 auto; padding: var(--pad) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 120px); }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: #fff; border-top: 1px solid var(--line); padding: 10px var(--pad) calc(env(safe-area-inset-bottom, 0px) + 10px); }
.bar__in { max-width: 620px; margin: 0 auto; display: flex; gap: 10px; }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 12px; min-height: 52px; padding: 0 18px; font-weight: 800; font-size: 1.02rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; flex: 1; }
.btn--primary { background: var(--orange); color: var(--navy-900); box-shadow: 0 6px 16px rgba(224,122,63,.35); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--navy-100); }
.btn--quiet { background: transparent; color: var(--navy); min-height: 44px; flex: none; padding: 0 10px; font-weight: 600; }
.btn--danger { background: #fff; color: var(--bad); border: 1.5px solid #f0d2d0; }
.btn--big { min-height: 64px; font-size: 1.15rem; width: 100%; }
.btn[disabled] { opacity: .55; box-shadow: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: translateY(1px); }

/* ---------- home ---------- */
.hello { margin: 4px 0 14px; }
.hello h1 { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.hello p { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.sect { margin-top: 26px; }
.sect__h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sect__h h2 { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.sect__h span { color: var(--muted); font-size: .85rem; }
.search { width: 100%; height: 48px; border-radius: 12px; border: 1.5px solid var(--sand-300); background: #fff; padding: 0 14px; margin-bottom: 12px; }
.client { background: #fff; border-radius: var(--r); padding: 14px 14px 6px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(20,50,79,.06); }
.client__name { font-weight: 800; color: var(--navy); font-size: 1.08rem; }
.client__place { color: var(--muted); font-size: .9rem; }
.q { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: start; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 0; margin-top: 10px; }
.q + .q { margin-top: 0; }
.q__a { font-weight: 600; font-size: .98rem; }
.q__b { color: var(--muted); font-size: .86rem; grid-column: 1; }
.q__t { font-weight: 800; color: var(--navy); grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 1.05rem; }
.chip { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--navy-100); color: var(--navy); vertical-align: 1px; margin-inline-start: 6px; }
.chip--sent { background: #DDF1E6; color: var(--ok); }
.chip--draft { background: var(--orange-100); color: var(--orange-600); }
.empty { background: #fff; border-radius: var(--r); padding: 22px 18px; text-align: center; color: var(--muted); }
.foot { margin-top: 28px; text-align: center; color: var(--muted); font-size: .82rem; }
.foot button { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 8px; }

/* ---------- form ---------- */
.field { margin-top: 18px; }
.field > label, .lbl { display: block; font-weight: 800; color: var(--navy); font-size: .95rem; margin-bottom: 6px; }
.field small, .hint { display: block; color: var(--muted); font-size: .86rem; margin-top: 6px; font-weight: 400; }
.in, .ta { width: 100%; border: 1.5px solid var(--sand-300); border-radius: 12px; background: #fff; padding: 13px 14px; min-height: 52px; font-size: 1.05rem; }
.ta { resize: none; line-height: 1.35; display: block; }
.in:focus, .ta:focus, .search:focus { outline: 3px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.in.bad, .ta.bad { border-color: var(--bad); background: #fff7f6; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--sand-300); background: #fff; font-weight: 800; color: var(--navy); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; text-align: center; line-height: 1.2; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg--stack { grid-template-columns: 1fr; }
.seg--stack button { justify-content: flex-start; text-align: start; font-weight: 600; min-height: 50px; padding: 8px 14px; }
.flag { width: 24px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; gap: 8px; align-items: start; }
.line .price { text-align: end; padding-inline: 10px; }
.line__x { height: 52px; border: 0; background: none; color: var(--muted); font-size: 1.3rem; border-radius: 10px; }
.add { margin-top: 10px; border: 1.5px dashed var(--sand-300); background: transparent; color: var(--navy); font-weight: 800; border-radius: 12px; min-height: 48px; width: 100%; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dur { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.sum { margin-top: 14px; background: var(--navy); color: #fff; border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sum b { font-size: 1.5rem; font-weight: 800; }
.sum span { font-weight: 600; }
.sum .in { width: 130px; text-align: end; color: var(--ink); }
.note { background: var(--orange-100); color: #6b3414; border-radius: 12px; padding: 12px 14px; font-size: .93rem; margin-top: 4px; }
.err { color: var(--bad); font-weight: 600; font-size: .92rem; margin-top: 8px; }

/* ---------- the quote on screen (mirrors the PDF) ---------- */
.paper { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(20,50,79,.14); font-size: 15px; }
.p-head { background: var(--navy); color: #fff; padding: 16px 16px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.p-head svg.wm { height: 17px; width: auto; fill: #fff; display: block; }
.p-tag { font-size: 8.5px; letter-spacing: .09em; font-weight: 600; opacity: .75; margin-top: 7px; line-height: 1.35; }
.p-contact { text-align: end; font-size: 11.5px; line-height: 1.5; white-space: nowrap; }
.p-contact b { font-size: 14px; font-weight: 800; display: block; }
.p-body { padding: 16px; }
.p-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.p-title h2 { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.p-rep { color: var(--orange-600); font-size: 11.5px; font-weight: 600; margin-top: 3px; }
.p-meta { font-size: 11.5px; text-align: end; line-height: 1.55; font-weight: 600; white-space: nowrap; }
.p-meta i { font-style: normal; font-size: 8.5px; letter-spacing: .08em; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-inline-end: 6px; }
.p-lab { font-size: 9px; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; color: var(--orange-600); }
.p-card { background: var(--sand); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.p-client { font-size: 17px; font-weight: 800; color: var(--navy); margin-top: 3px; line-height: 1.25; }
.p-job { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sand-300); }
.p-lines { margin-top: 16px; }
.p-line { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--sand-300); }
.p-line b { color: var(--navy); font-weight: 800; white-space: nowrap; }
.p-line em { font-style: normal; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.p-el { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.p-el::before { content: "= "; }
.p-edit { border: 0; background: none; color: var(--orange-600); font-weight: 800; font-size: 12.5px; padding: 4px 0; text-decoration: underline; }
.p-warn { display: block; color: var(--bad); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.p-total { background: var(--navy); color: #fff; border-radius: 11px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.p-total b { font-size: 25px; font-weight: 800; white-space: nowrap; }
.p-total strong { font-weight: 800; display: block; }
.p-total small { font-size: 11.5px; opacity: .8; display: block; line-height: 1.35; }
.p-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.p-fact { background: var(--sand); border-radius: 9px; padding: 9px 10px; }
.p-fact .p-lab { color: var(--muted); }
.p-fact b { display: block; color: var(--navy); font-weight: 800; font-size: 13px; margin-top: 3px; line-height: 1.3; }
.p-get { margin-top: 14px; }
.p-get li { display: flex; gap: 8px; margin-top: 7px; font-size: 13.5px; line-height: 1.4; }
.p-get ul { list-style: none; margin: 0; padding: 0; }
.p-get b { color: var(--navy); font-weight: 800; }
.p-get li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--orange-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9652B' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6.6 12.4l3.5 3.6 7.4-8'/%3E%3C/svg%3E") center/14px no-repeat; }
.p-sign { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.p-sign img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--orange); object-fit: cover; flex: none; }
.p-sign p { font-weight: 600; color: var(--navy); font-size: 13.5px; line-height: 1.35; }
.p-sign span { display: block; color: var(--orange-600); font-weight: 800; font-size: 12px; margin-top: 2px; }
.p-cta { background: var(--orange); color: var(--navy-900); border-radius: 12px; padding: 13px 14px; margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.p-cta svg { width: 28px; height: 28px; fill: #fff; flex: none; }
.p-cta b { font-weight: 800; font-size: 16px; display: block; line-height: 1.25; }
.p-cta small { font-weight: 600; font-size: 12px; display: block; margin-top: 2px; }
.p-foot { border-top: 1px solid var(--sand-300); margin-top: 14px; padding-top: 9px; text-align: center; color: var(--muted); font-size: 10px; line-height: 1.5; }

.status { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .93rem; color: var(--muted); flex-wrap: wrap; }
.acts { display: grid; gap: 8px; margin-top: 18px; }
.langswap { display: flex; gap: 8px; margin-bottom: 12px; }
.langswap button { flex: 1; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--sand-300); background: #fff; font-weight: 800; color: var(--navy); display: flex; align-items: center; justify-content: center; gap: 8px; }
.langswap button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- pin ---------- */
.pin { min-height: 100vh; min-height: 100dvh; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.pin svg { height: 26px; fill: #fff; }
.pin h1 { font-size: 1.4rem; font-weight: 800; margin-top: 22px; }
.pin p { opacity: .8; margin-top: 6px; }
.pin input { margin-top: 20px; width: 220px; height: 60px; border-radius: 14px; border: 0; text-align: center; font-size: 1.7rem; font-weight: 800; letter-spacing: .25em; color: var(--ink); }
.pin .btn { margin-top: 14px; width: 220px; flex: none; }
.pin .err { color: #ffd3cf; min-height: 1.4em; }

/* ---------- sheet + toast + spinner ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(12,34,56,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet__in { background: #fff; width: 100%; max-width: 620px; border-radius: 18px 18px 0 0; padding: 20px var(--pad) calc(env(safe-area-inset-bottom, 0px) + 18px); max-height: 88vh; overflow: auto; }
.sheet__in h3 { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.sheet__in p { color: var(--ink); margin-bottom: 10px; }
.sheet__btns { display: flex; gap: 10px; margin-top: 14px; }
.msgbox { background: var(--sand); border-radius: 12px; padding: 12px 14px; font-size: .98rem; margin-top: 6px; white-space: pre-wrap; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); transform: translateX(-50%); z-index: 30; background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: .95rem; max-width: 88vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: sp .8s linear infinite; flex: none; }
.btn--ghost .spin, .wait .spin { border-color: var(--navy-100); border-top-color: var(--navy); }
.wait { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 40px 0; color: var(--muted); font-weight: 600; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
@media (min-width: 700px) { .wrap { padding-top: 24px; } .paper { font-size: 16px; } }
