/* JOBS MANAGER — area pubblica */

/* ---------------------------------------------------------------------------
   Source Sans 3 — carattere unico di tutta la piattaforma.
   I file sono serviti dal dominio dell'installazione: nessuna richiesta a
   Google Fonts o ad altri servizi esterni (requisito GDPR).
   Variabile 300–900: un solo file copre tutti i pesi.
   --------------------------------------------------------------------------- */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/source-sans-3-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/source-sans-3-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/source-sans-3-latin-italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 300 900;
    font-display: swap;
    src: url('../fonts/source-sans-3-latin-ext-italic.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --brand: #1f4fd8;
    --brand-dark: #1a3fae;
    --brand-soft: #eef2ff;
    --ink: #10151f;
    --ink-2: #3d4759;
    --ink-3: #6b7686;
    --line: #e4e8ef;
    --bg: #f7f8fa;
    --card: #ffffff;
    --ok: #157a4a;
    --ok-bg: #e6f6ed;
    --warn: #9a6200;
    --warn-bg: #fff5e0;
    --err: #b32027;
    --err-bg: #fdeced;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 21, 31, .05), 0 8px 24px rgba(16, 21, 31, .05);
    --shadow-lg: 0 4px 12px rgba(16, 21, 31, .06), 0 24px 56px rgba(16, 21, 31, .09);
    --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

button, input, select, textarea { font-family: var(--font); }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }

.skip {
    position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
    padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Intestazione ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; min-height: 68px;
}
.brand {
    display: inline-flex; align-items: center; gap: 11px;
    font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none;
    letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
    background: var(--brand); color: #fff;
    display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
    padding: 8px 12px; border-radius: 8px;
}
.site-nav a:hover { background: var(--bg); color: var(--ink); }
.site-nav a.is-active { background: var(--brand-soft); color: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero h1 {
    font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 0 0 14px;
    letter-spacing: -.025em; font-weight: 750;
}
.hero p { font-size: clamp(16px, 2.2vw, 18px); color: var(--ink-2); margin: 0; max-width: 62ch; }

.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 8px; letter-spacing: -.02em; }
.page-head p { color: var(--ink-2); margin: 0; }

/* ---------- Briciole ---------- */
.crumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    font-size: 13.5px; color: var(--ink-3); padding: 18px 0 0; margin: 0; list-style: none;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs li::after { content: "›"; margin-left: 7px; color: #c3cad6; }
.crumbs li:last-child::after { content: ""; }
.crumbs li[aria-current] { color: var(--ink-2); font-weight: 500; }

/* ---------- Griglia segmenti ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.segment-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px; text-decoration: none; color: inherit; display: flex; flex-direction: column;
    gap: 14px; transition: border-color .16s, box-shadow .16s, transform .16s;
}
.segment-card:hover {
    border-color: #c9d3ea; box-shadow: var(--shadow); transform: translateY(-2px); color: inherit;
}
.segment-logo {
    height: 60px; display: flex; align-items: center;
}
.segment-logo img { max-height: 60px; width: auto; max-width: 190px; object-fit: contain; }
.logo-fallback {
    width: 56px; height: 56px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-weight: 700; font-size: 19px; letter-spacing: .02em;
}
.segment-card h2 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.segment-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.segment-meta {
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13.5px; color: var(--ink-3);
}
.segment-meta strong { color: var(--brand); font-weight: 650; }

/* ---------- Testata segmento ---------- */
.segment-hero {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.segment-hero .segment-logo { height: 76px; }
.segment-hero .segment-logo img { max-height: 76px; max-width: 230px; }
.segment-hero-body { flex: 1 1 320px; min-width: 0; }
.segment-hero h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; }
.segment-hero p { margin: 0; color: var(--ink-2); }

/* ---------- Elenco offerte ---------- */
.job-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.job-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 24px; display: block; text-decoration: none; color: inherit;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}
.job-card:hover {
    border-color: #c9d3ea; box-shadow: var(--shadow); transform: translateY(-1px); color: inherit;
}
.job-card h3 { margin: 0 0 8px; font-size: 18.5px; letter-spacing: -.01em; }
.job-card .job-tags { margin-top: 12px; }
.job-card .job-excerpt { color: var(--ink-2); font-size: 14.5px; margin: 0; }

.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
    border-radius: 100px; padding: 4px 12px; font-size: 13px; font-weight: 500;
}
.tag-brand { background: var(--brand-soft); border-color: #d5deff; color: var(--brand); }
.tag-warn { background: var(--warn-bg); border-color: #f3dfb4; color: var(--warn); }

/* ---------- Dettaglio offerta ---------- */
.job-layout { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
@media (max-width: 900px) { .job-layout { grid-template-columns: 1fr; } }

.panel {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.015em; }
.panel h3 { font-size: 16px; margin: 26px 0 10px; letter-spacing: -.01em; }
.panel h3:first-child { margin-top: 0; }

.prose { color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose li::marker { color: var(--brand); }

.job-title { font-size: clamp(25px, 4.2vw, 34px); margin: 0 0 12px; letter-spacing: -.025em; line-height: 1.2; }

.sticky { position: sticky; top: 88px; }
@media (max-width: 900px) { .sticky { position: static; } }

.summary-list { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.summary-list li {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 11px 0; border-bottom: 1px solid var(--line);
}
.summary-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-list dt, .summary-list .k { color: var(--ink-3); flex: 0 0 auto; }
.summary-list .v { text-align: right; font-weight: 550; color: var(--ink); }

/* ---------- Modulo ---------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.hint { font-size: 13px; color: var(--ink-3); margin: 6px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="url"], input[type="number"], input[type="date"], input[type="search"],
select, textarea {
    width: 100%; padding: 11px 13px; font-family: inherit; font-size: 15px; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    transition: border-color .14s, box-shadow .14s; -webkit-appearance: none; appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7686' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(31, 79, 216, .13);
}
input.has-error, select.has-error, textarea.has-error { border-color: var(--err); }
.error-text { color: var(--err); font-size: 13px; margin: 6px 0 0; font-weight: 500; }

.file-field {
    border: 1.5px dashed #ccd4e2; border-radius: var(--radius-sm); padding: 18px;
    background: #fbfcfe; text-align: center; cursor: pointer; transition: border-color .14s, background .14s;
}
.file-field:hover, .file-field.is-hover { border-color: var(--brand); background: var(--brand-soft); }
.file-field input[type="file"] { display: block; width: 100%; margin-top: 10px; font-size: 14px; }
.file-field .file-label { font-weight: 600; font-size: 14.5px; }
.file-field .file-hint { font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.check {
    display: flex; gap: 11px; align-items: flex-start;
    font-size: 14px; font-weight: 400; color: var(--ink-2); line-height: 1.55; cursor: pointer;
}
.check input[type="checkbox"] {
    width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--brand); cursor: pointer;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: #fff; border: 1.5px solid var(--brand);
    padding: 12px 22px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
    font-family: inherit; text-decoration: none; cursor: pointer; transition: background .14s, border-color .14s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: #ccd4e2; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- Avvisi ---------- */
.alert {
    border-radius: var(--radius-sm); padding: 14px 17px; font-size: 14.5px;
    margin-bottom: 18px; border: 1px solid transparent; line-height: 1.55;
}
.alert:last-child { margin-bottom: 0; }
.alert-success { background: var(--ok-bg); border-color: #c2e6d3; color: var(--ok); }
.alert-error { background: var(--err-bg); border-color: #f4c9cc; color: var(--err); }
.alert-warning { background: var(--warn-bg); border-color: #f3dfb4; color: var(--warn); }
.alert-info { background: var(--brand-soft); border-color: #d5deff; color: var(--brand-dark); }
.alert strong { display: block; margin-bottom: 3px; }

.result-box { text-align: center; padding: 36px 28px; }
.result-box .result-icon {
    width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
    display: grid; place-items: center; font-size: 28px;
}
.result-box.is-success .result-icon { background: var(--ok-bg); color: var(--ok); }
.result-box.is-warning .result-icon { background: var(--warn-bg); color: var(--warn); }
.result-box h2 { margin: 0 0 10px; font-size: 21px; }
.result-box p { color: var(--ink-2); margin: 0 auto 18px; max-width: 46ch; }

/* ---------- Stato vuoto ---------- */
.empty {
    text-align: center; padding: 56px 24px; background: #fff;
    border: 1px dashed #d5dce8; border-radius: var(--radius); color: var(--ink-3);
}
.empty h2 { color: var(--ink); font-size: 19px; margin: 0 0 8px; }
.empty p { margin: 0; }

/* ---------- Piè di pagina ---------- */
.site-footer {
    margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line);
    background: #fff; font-size: 14px; color: var(--ink-3);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Pagina di accesso ---------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--bg);
}
.auth-card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 36px; width: 100%; max-width: 430px; box-shadow: var(--shadow-lg);
}
.auth-card .brand { margin-bottom: 26px; }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--ink-3); font-size: 14.5px; margin: 0 0 24px; }

.code-block {
    background: #f4f6fa; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px; color: var(--ink-2); word-break: break-all; margin: 8px 0 0;
}

/* ---------- Paginazione ---------- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 0; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: 14px;
    border: 1px solid var(--line); color: var(--ink-2); background: #fff;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 28px; }
.mb-2 { margin-bottom: 20px; }
.text-center { text-align: center; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 600px) {
    .panel { padding: 22px 18px; }
    .segment-hero { padding: 22px 18px; }
    .hero { padding: 38px 0 28px; }
    .site-header .wrap { min-height: 60px; }
}

@media print {
    .site-header, .site-footer, .apply-panel, .crumbs { display: none; }
    body { background: #fff; }
    .panel { border: 0; box-shadow: none; padding: 0; }
}
