/* Talendipilv — disain A "Päikesetõus" */
:root {
  --bg: #FFFBF5;
  --surface: #FFFFFF;
  --ink: #1B2140;
  --ink-2: #3D4363;
  --muted: #5A5F7A;
  --line: #F0E6D8;
  --line-2: #E6DCCD;
  --coral: #FF6B3D;
  --coral-soft: #FFE9DF;
  --coral-tint: #FFD9C9;
  --peach: #FFF4EC;
  --navy-2: #262D52;
  --navy-3: #3A4166;
  --ok-bg: #DDF4E6; --ok-ink: #14532D;
  --soon-bg: #FFF1CC; --soon-ink: #713F12;
  --danger: #B42318;
  --radius: 24px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
h1, h2, h3, .h2, .h3 { font-family: 'Space Grotesk', Inter, sans-serif; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.02em; }
.h2, h2 { font-size: 26px; }
.h3, h3 { font-size: 19px; }
p { margin: 0; }
a { color: var(--ink); }
a:hover { color: #C2410C; }
input, textarea, select, button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #FF9D7A; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 560px; margin: 32px auto 64px; }
.narrow-wide { max-width: 880px; }
.row { display: flex; align-items: center; }
.wrap-row { flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.muted { color: var(--muted); }
.help { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; }
.card-dark .err { color: #FFB4A6; }
.req { color: #C2410C; }

/* Päis */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; }
.mainnav { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.mainnav a { padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.mainnav a.on { background: var(--coral-soft); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions form { margin: 0; }
.who { font-size: 14px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .who { display: none; } }

.footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }

/* Nupud */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; background: none; white-space: nowrap; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: #FF8459; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--peach); color: var(--ink); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--peach); }
.btn-ghost-light { color: #D6D9EA; }
.btn-icon { min-height: 40px; min-width: 40px; padding: 0; font-size: 18px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Teated */
.flash { max-width: 1232px; margin: 16px auto 0; padding: 14px 18px; border-radius: 16px; font-weight: 600; }
main > .flash { margin-left: max(24px, calc((100% - 1232px) / 2)); margin-right: max(24px, calc((100% - 1232px) / 2)); }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-err { background: #FDE7E4; color: #8A1C12; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; padding-top: 56px; padding-bottom: 32px; }
.hero-tight { padding-top: 40px; padding-bottom: 24px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 640px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }
.steps { flex: 1 1 300px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--coral-soft); color: var(--ink); font-weight: 700; display: grid; place-items: center; flex: none; }
.step-num.on { background: var(--coral); }
.page-head { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }

/* Kaardid ja paigutus */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-head { display: flex; align-items: center; gap: 12px; }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-bottom: 48px; }
.two-col > :first-child { flex: 1 1 340px; }
.two-col > :last-child { flex: 999 1 560px; min-width: 0; }
.two-col-side > :first-child { flex: 1 1 300px; max-width: 100%; }
.two-col-main > :first-child { flex: 999 1 560px; }
.two-col-main > :last-child { flex: 1 1 320px; }
.side-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prose h2 { margin-top: 28px; font-size: 22px; }
.prose h3 { margin-top: 16px; font-size: 17px; }
.prose p, .prose ul { margin-top: 10px; }
.plain-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }

/* Vormid */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 14px; padding: 0; }
fieldset.field > legend { margin-bottom: 8px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea,
.filters select, .filters input[type=date], .table-tools input[type=search] {
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #FFFDFA; width: 100%;
}
.field textarea { padding: 12px 14px; resize: vertical; min-height: 120px; }
.card-dark .field input { background: #fff; border: 0; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.muted-on-dark { color: #B9BED6; font-weight: 400; }
.link-on-dark { color: #FFD0BF; font-size: 14px; }
.link-on-dark:hover { color: #fff; }
.note-on-dark { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #B9BED6; }

.consent { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--navy-2); cursor: pointer; font-size: 14px; color: #EEF0F8; }
.consent input, .check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--coral); flex: none; }
.consent-light { background: var(--peach); color: var(--ink); border: 1px solid var(--line-2); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-height: 32px; }
.checks { display: flex; flex-direction: column; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:checked + span::before { content: '✓'; margin-right: 6px; }
.chip input:focus-visible + span { outline: 3px solid #FF9D7A; outline-offset: 2px; }
.chip-ghost span { border-style: dashed; color: var(--muted); }

.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.lang-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--peach); font-weight: 600; }
.lang-row span { flex: 1; }
.lang-row select { width: auto !important; min-width: 108px; min-height: 40px !important; }

.publish-box { background: var(--peach); border: 1.5px solid var(--coral-tint); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }

/* Olekud */
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; gap: 10px; align-items: flex-start; }
.status-row svg { flex: none; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 0; }
.stats div { background: var(--peach); border-radius: 14px; padding: 12px; }
.stats dt { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; hyphens: auto; }
.stats dd { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; }
.consent-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.consent-log li { display: flex; flex-direction: column; }
.consent-log span { color: var(--muted); font-size: 13px; }
.danger summary { cursor: pointer; font-weight: 700; color: var(--danger); }
.danger form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* Tööandja otsing */
.searchbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.search-input { flex: 999 1 420px; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 18px; background: #fff; border: 1.5px solid var(--line-2); border-radius: 999px; }
.search-input input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 52px; outline: none; }
.search-input:focus-within { outline: 3px solid #FF9D7A; outline-offset: 2px; }
.searchbar .btn { flex: 1 1 140px; min-height: 56px; }
.filters { gap: 22px; padding: 24px; }
.filter { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.filter legend, .filter > label { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.filter-opts { display: flex; flex-direction: column; gap: 2px; }
.filter-scroll { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.fopt { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; border-radius: 10px; padding: 0 6px; }
.fopt:hover { background: var(--peach); }
.fopt input { width: 20px; height: 20px; accent-color: var(--coral); flex: none; }
.fopt span:first-of-type { flex: 1; }
.fcount { font-size: 13px; color: var(--muted); }
.filter .row select { flex: 1; min-width: 0; }

.results { display: flex; flex-direction: column; gap: 16px; }
.selbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; background: var(--ink); color: #fff; border-radius: 20px; position: sticky; top: 8px; z-index: 2; }
.selbar-info { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.selbar-info .star { fill: var(--coral); stroke: var(--coral); }
.selbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.picked { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.picked button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--navy-2); color: #fff; font-size: 14px; cursor: pointer; }
.picked button:hover { background: var(--navy-3); }

.cand { background: #fff; border-radius: 20px; padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; border: 1.5px solid var(--line); }
.cand:has(.pick-input:checked) { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; flex: none; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; border-radius: 22px; }
.av-0 { background: var(--coral-tint); } .av-1 { background: #E3E6F5; } .av-2 { background: #FFE9B8; } .av-3 { background: #D8F0E4; }
.cand-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cand-title { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.cand-title h3 a { text-decoration: none; }
.cand-title h3 a:hover { text-decoration: underline; }
.cand-role { color: var(--ink-2); font-weight: 500; }
.cand-bio { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #F1F2F8; }
.tag-warm { background: var(--peach); }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); font-weight: 600; }
.tag-soon { background: var(--soon-bg); color: var(--soon-ink); font-weight: 600; }
.cand-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: 0 0 auto; text-align: center; }
.small-link { font-size: 14px; font-weight: 600; }

.pick { position: relative; cursor: pointer; display: inline-flex; }
.pick-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; font-weight: 700; white-space: nowrap; }
.pick-btn .star { fill: #fff; }
.pick-on { display: none; }
.pick-input:checked + .pick-btn { background: var(--coral-soft); border-color: var(--coral); }
.pick-input:checked + .pick-btn .star { fill: var(--coral); }
.pick-input:checked + .pick-btn .pick-on { display: inline; }
.pick-input:checked + .pick-btn .pick-off { display: none; }
.pick-input:focus-visible + .pick-btn { outline: 3px solid #FF9D7A; outline-offset: 2px; }
.empty { align-items: flex-start; }

.profile-view { gap: 24px; }
.pv-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.pv-head > div:nth-child(2) { flex: 1 1 240px; }
.pv-bio { font-size: 18px; color: var(--ink-2); white-space: pre-line; }
.pv-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; }
.pv-list dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.pv-list dd { margin: 0; overflow-wrap: anywhere; }
.pv-compact { grid-template-columns: 1fr; }

/* Haldus */
.subnav, .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.subnav a, .tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; background: #fff; border: 1px solid var(--line); }
.subnav a.on, .tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a span { font-weight: 500; opacity: 0.75; margin-left: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { font-family: 'Space Grotesk', sans-serif; font-size: 32px; }
.table-card { padding: 0; gap: 0; overflow: hidden; }
.table-tools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.table-tools input[type=search] { min-height: 44px; width: 220px; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 700; background: var(--peach); padding: 12px 14px; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-card .table { min-width: 960px; }
.table-compact td, .table-compact th { padding: 8px 10px; }
.ua { max-width: 260px; font-size: 12px; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #F1F2F8; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-warm { background: var(--coral-soft); color: #7A2A10; }
.badge-blue { background: #E3E6F5; color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 200px; }

.field-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.field-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #FFFDFA; }
.field-item.is-off { opacity: 0.7; }
.field-item-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.field-item-title { flex: 1 1 220px; display: flex; flex-direction: column; }
.field-item-head form { margin: 0; }
.field-item details { margin-top: 10px; }
.field-item summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.field-edit { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.field-delete { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
[data-show-for][hidden] { display: none !important; }
