:root {
  --brand: #0e5a5f; --brand-dark: #0a4246; --brand-soft: #e6f2f2;
  --accent: #b9471d; --accent-soft: #fbeee8;
  --ink: #1c2526; --muted: #5d6b6c; --line: #e3e8e8; --bg: #f6f7f5; --card: #fff;
  --ok: #1f7a3f; --ok-soft: #e7f5ec; --warn: #9a5b00; --warn-soft: #fff4dc; --bad: #b42318; --bad-soft: #fdecea;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.hidden { display: none !important; }

/* header */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .2px; display: flex; flex-direction: column; line-height: 1.1; }
.logo small { font-weight: 500; opacity: .8; font-size: .72rem; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; white-space: nowrap; }
@media (max-width: 420px) { .top nav { gap: 0; } .top nav a { padding: 8px 7px; font-size: .88rem; } .logo { font-size: .92rem; } .logo small { display: none; } }
.top nav a:hover, .top nav a.active { background: rgba(255,255,255,.14); }
.badge-count { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; font-size: .75rem; margin-left: 2px; }
.trust { background: var(--accent-soft); color: var(--accent); font-size: .85rem; text-align: center; padding: 6px 12px; }

/* layout */
main { padding: 20px 0 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 10px; }

/* hero */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #13777d 100%); color: #fff; padding: 28px 0 32px; }
.hero h1 { font-size: 1.7rem; }
.hero p { opacity: .9; margin: 0 0 16px; }
.searchbar { display: grid; gap: 8px; background: #fff; padding: 8px; border-radius: 14px; }
@media (min-width: 720px) { .searchbar { grid-template-columns: 2fr 1fr auto; } .hero h1 { font-size: 2.1rem; } }
.searchbar input, .searchbar select { border: 0; background: var(--bg); }

/* forms */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #cfd8d8; border-radius: 10px; background: #fff; color: var(--ink); min-height: 46px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #8cc9cc; outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); vertical-align: middle; margin: 0 8px 0 0; }
.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 400; margin: 10px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; min-height: 46px; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--brand); border-color: #b9d3d4; }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.accent { background: var(--accent); } .btn.accent:hover { background: #9c3a15; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c4bf; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.wa { background: #1f9d55; } .btn.wa:hover { background: #17824a; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.seg { display: flex; background: var(--brand-soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: var(--shadow); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #c9d6d6; background: #fff; color: var(--ink); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.on::before { content: "✓ "; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.tag.urgent { background: var(--bad-soft); color: var(--bad); }
.tag.featured { background: var(--warn-soft); color: var(--warn); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.grey { background: #eef1f1; color: var(--muted); }

/* job cards */
.jobs { display: grid; gap: 10px; }
.job { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .15s; }
.job:hover { border-color: #9cc6c8; }
.job h3 { margin: 0 0 2px; color: var(--ink); }
.job .emp { color: var(--muted); font-size: .9rem; }
.job .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; margin-top: 8px; color: #334; }
.salary { font-weight: 700; color: var(--ok); }
.verified { color: var(--ok); font-weight: 600; font-size: .85rem; }
.match { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.match.strong { background: var(--ok-soft); color: var(--ok); } .match.good { background: var(--brand-soft); color: var(--brand); }
.match.partial { background: var(--warn-soft); color: var(--warn); } .match.low { background: #eef1f1; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--ink); font-weight: 600; display: flex; justify-content: space-between; }
.tile span { color: var(--muted); font-weight: 400; }

/* alerts, modal, toast */
.alert { padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: .95rem; }
.alert.warn { background: var(--warn-soft); border-color: #f3d28f; color: #6b4200; }
.alert.bad { background: var(--bad-soft); border-color: #f5c2bc; color: var(--bad); }
.alert.ok { background: var(--ok-soft); border-color: #b6e0c3; color: var(--ok); }
.alert.info { background: var(--brand-soft); border-color: #bcdcdd; color: var(--brand-dark); }
dialog { border: 0; border-radius: 16px; padding: 20px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,20,20,.45); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 99; max-width: 90vw; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }

/* stats + tables */
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.list-item { border-top: 1px solid var(--line); padding: 12px 0; }
.list-item:first-child { border-top: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.tabs button { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font: inherit; cursor: pointer; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.timeline { font-size: .85rem; color: var(--muted); margin: 6px 0 0; padding-left: 18px; }

/* CV builder */
.steps { display: flex; gap: 4px; margin-bottom: 14px; }
.steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.steps span.done { background: var(--brand); }
.cv-layout { display: grid; gap: 16px; }
@media (min-width: 960px) { .cv-layout { grid-template-columns: 1fr 1fr; align-items: start; } .cv-preview-wrap { position: sticky; top: 72px; } }
.cv-preview-wrap { background: #dfe5e5; border-radius: 12px; padding: 12px; overflow: auto; }
.entry { border: 1px dashed #c9d6d6; border-radius: 10px; padding: 12px; margin-bottom: 10px; }

/* CV paper (also used for printing) */
.cv { background: #fff; width: 100%; max-width: 794px; margin: 0 auto; color: #1d1d1d; font-size: 13px; line-height: 1.45; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.cv h1 { font-size: 24px; margin: 0; } .cv h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 16px 0 6px; }
.cv ul { margin: 4px 0; padding-left: 18px; }
.cv .cv-item { margin-bottom: 8px; } .cv .cv-item b { display: block; }
.cv .cv-photo { width: 96px; height: 116px; object-fit: cover; border-radius: 6px; }
.cv.classic { padding: 36px 40px; }
.cv.classic header { display: flex; gap: 18px; align-items: center; border-bottom: 2px solid #0e5a5f; padding-bottom: 12px; }
.cv.classic h2 { color: #0e5a5f; border-bottom: 1px solid #dde5e5; padding-bottom: 3px; }
.cv.modern { display: grid; grid-template-columns: 34% 1fr; }
.cv.modern aside { background: #0e5a5f; color: #fff; padding: 28px 20px; }
.cv.modern aside h2 { color: #bfe0e1; }
.cv.modern aside .cv-photo { width: 110px; height: 130px; border: 3px solid rgba(255,255,255,.4); margin-bottom: 12px; }
.cv.modern section.main { padding: 28px 26px; }
.cv.modern section.main h2 { color: #b9471d; }
.cv .pills span { display: inline-block; border: 1px solid currentColor; border-radius: 99px; padding: 1px 8px; margin: 2px 3px 2px 0; font-size: 11.5px; }

footer.site { border-top: 1px solid var(--line); padding: 20px 0 40px; color: var(--muted); font-size: .88rem; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  #print-root .cv { box-shadow: none; max-width: none; width: 210mm; min-height: 297mm; }
  #print-root .cv.modern { min-height: 297mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
