:root {
    --bg: #1c2330;
    --canvas-ink: #eef1f6;
    --canvas-muted: #9aa7bd;
    --card: #ffffff;
    --border: #e2e5ea;
    --text: #1f2430;
    --muted: #6b7280;
    --primary: #2566b0;
    --primary-dark: #0b1c33;
    --accent: #2fc4e8;
    --green: #1f8a5f;
    --red: #b3261e;
    --amber: #b06a00;
}
/* --- כיוון עיצובי חדש (סבב 12, 30.8.2026): רקע כללי כהה ומרוכך (--bg) שעליו
   כל תיבת תוכן (כרטיסים/טבלאות/תיבות סטטיסטיקה) "קופצת" כלבן מלא עם צל עדין,
   במקום המראה הקודם שבו הרקע והכרטיסים היו כמעט אותו גוון. טקסט שיושב ישירות
   על הרקע הכהה (לא בתוך כרטיס) חייב להשתמש ב---canvas-ink/--canvas-muted,
   אחרת הוא נעלם (טקסט כהה על רקע כהה) - ראו .public-header למטה כדוגמה. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    max-width: 100%;
    overflow-x: hidden;
}
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 8px;
    background: var(--primary-dark);
    color: white;
    padding: 10px 24px;
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: white; }
.nav-brand img { width: 34px; height: 34px; display: block; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-brand-text .nav-brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.3px; }
.nav-brand-text .nav-brand-sub { font-size: 11px; color: #9fc4e8; }
.nav-links a, .nav-user a {
    color: white;
    text-decoration: none;
    margin-inline-start: 16px;
    opacity: 0.9;
}
.nav-links a:hover, .nav-user a:hover { opacity: 1; text-decoration: underline; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* --- תפריט עליון מתקפל למובייל/טאבלט (סבב 12, 30.8.2026) ---
   מתחת ל-900px התפריט הרגיל (.nav-links/.nav-user) מוסתר, ובמקומו כפתור
   המבורגר (.nav-toggle) פותח קופסה מסודרת אחת (.nav-mobile-panel) עם גבולות
   ברורים, טקסט ממורכז, פונט אחיד וקווים מפרידים בין כל שורה - בדיוק כמו
   שאושר בסקיצת העיצוב. */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-mobile { display: none; }
.nav-mobile.open { display: block; background: var(--primary-dark); padding: 14px 16px 18px; }
.nav-mobile-panel {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    overflow: hidden;
}
.nav-mobile-single {
    display: block; text-align: center; padding: 14px 12px;
    font-size: 14.5px; font-weight: 600; color: #e7eefa; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav-mobile-single:hover { background: rgba(255,255,255,.05); }
.nav-mobile-group { border-bottom: 1px solid rgba(255,255,255,.12); }
.nav-mobile-group:last-child { border-bottom: none; }
.nav-mobile-head {
    display: flex; align-items: center; justify-content: center; position: relative;
    padding: 14px 40px; text-align: center;
    font-size: 14.5px; font-weight: 600; color: #e7eefa; cursor: pointer;
}
.nav-mobile-group.expanded .nav-mobile-head { background: rgba(255,255,255,.05); }
.nav-mobile-head .chev {
    position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; transition: transform .18s ease; color: #7f93ad;
}
.nav-mobile-group.expanded .nav-mobile-head .chev { transform: translateY(-50%) rotate(180deg); }
.nav-mobile-body { display: none; flex-direction: column; border-top: 1px solid rgba(255,255,255,.12); }
.nav-mobile-group.expanded .nav-mobile-body { display: flex; }
.nav-mobile-body a, .nav-mobile-static {
    display: block; padding: 12px 12px; text-align: center;
    font-size: 14px; color: #c3d3e8; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-mobile-body a:last-child, .nav-mobile-static:last-child { border-bottom: none; }
.nav-mobile-body a:hover { background: rgba(255,255,255,.06); color: #fff; }

h1 { font-size: 22px; margin-bottom: 4px; }
h2 { font-size: 18px; margin-top: 28px; }
.subtitle { color: var(--muted); margin-bottom: 20px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(6,10,18,.3), 0 18px 36px -20px rgba(6,10,18,.5);
}

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(6,10,18,.3), 0 18px 36px -20px rgba(6,10,18,.5); }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: #eef1f5; font-weight: 600; color: var(--muted); }
tr:hover td { background: #fafbfc; }
a.rowlink { color: var(--primary); text-decoration: none; font-weight: 600; }
a.rowlink:hover { text-decoration: underline; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--text);
}
textarea { width: 100%; min-height: 80px; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: white; color: var(--primary); border: 1px solid var(--primary); }
.btn-danger { background: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    border: 1.5px solid currentColor;
}
.badge-new { background: #e5edf7; color: var(--primary); }
.badge-in_review { background: #fdf3d8; color: var(--amber); }
.badge-contacted { background: #e5edf7; color: var(--primary); }
.badge-offered { background: #e3f2ea; color: var(--green); }
.badge-hired { background: #d7f0e2; color: var(--green); }
.badge-on_hold { background: #f1f1f1; color: var(--muted); }
.badge-rejected { background: #fbe6e5; color: var(--red); }
.badge-withdrawn { background: #f1f1f1; color: var(--muted); }
.badge-handled { background: #e3f2ea; color: var(--green); }
.badge-unhandled { background: #fdf3d8; color: var(--amber); font-weight: 700; }
/* תגית "דחוף" - עיצוב בולט (מילוי אדום מלא, לא רק גוון עדין) לסימון משרה/מועמד
   שדורש תשומת לב מיידית. מחוברת לשדות DB אמיתיים (jobs.is_urgent,
   candidates.is_urgent) מ-30.8.2026 - ראו candidates_list.html/jobs_list.html
   וכו'. */
.badge-urgent { background: var(--red); color: #fff; border-color: var(--red); font-weight: 800; }
/* תגית "בסל משרות" - מסמנת מועמד/ת שנרשמ/ה מתוך התעניינות כללית (לא למשרה
   ספציפית) ולכן ההתאמות שלו/ה מחושבות אוטומטית מול כל המשרות הפתוחות.
   שיפור נראות (31.8.2026, בעקבות בקשת המשתמש) - קודם הופיע כטקסט קטן בתוך
   שורת מידע צפופה; עכשיו תגית בולטת בצבע accent, גם ברשימת המועמדים וגם
   בכרטיס המועמד. ראו candidates_list.html, candidate_detail.html. */
.badge-pool { background: #eafaff; color: #0f7c99; border: 1px solid #b8ecfa; font-weight: 700; }

.score {
    font-weight: 700;
    font-size: 16px;
}
.score-high { color: var(--green); }
.score-mid { color: var(--amber); }
.score-low { color: var(--red); }

.flash-wrap { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #e3f2ea; color: var(--green); }
.flash-error { background: #fbe6e5; color: var(--red); }

.login-page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo img { width: 84px; height: 84px; }
.login-logo .brand-name { color: white; font-weight: 700; font-size: 20px; margin-top: 8px; letter-spacing: 0.5px; }
.login-logo .brand-sub { color: #9fc4e8; font-size: 12px; margin-top: 2px; letter-spacing: 1px; }
.login-wrap {
    max-width: 380px;
    width: 100%;
}
.public-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}
.public-header {
    text-align: center;
    margin-bottom: 24px;
}
.public-header .public-logo { margin-bottom: 10px; }
.public-header .public-logo img { width: 60px; height: 60px; }
.public-header .public-brand-name { color: var(--canvas-ink); font-weight: 700; font-size: 15px; letter-spacing: 0.5px; margin-bottom: 4px; }
/* public-header יושב ישירות על רקע העמוד הכהה (--bg), לא בתוך כרטיס לבן -
   לכן הכותרת והתת-כותרת שלו חייבות טוקן צבע בהיר ייעודי, לא var(--text)/var(--muted)
   הרגילים (שנועדו לטקסט בתוך כרטיסים לבנים) */
.public-header h1 { color: var(--canvas-ink); }
.public-header .subtitle { color: var(--canvas-muted); line-height: 1.6; }

/* טופס ההרשמה הציבורי (30.8.2026) - יותר "אוויר" בין שאלות כדי שכל שאלה
   תיקרא בנפרד ותתבלט, גם במובייל. מוגבל ל-.public-form-wrap בכוונה - לא
   נוגע במסכי הניהול הפנימיים (שם הצפיפות הנוכחית עדיין רצויה). */
.public-form-wrap .field { margin-bottom: 20px; }
.public-form-wrap .grid-2 { gap: 18px 24px; }
.public-form-wrap label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.public-form-wrap .section-block { margin-bottom: 34px; }
.public-form-wrap .section-hint { font-size: 13px; font-weight: 400; color: var(--muted); }

/* "שאלת סימון" - תיבת סימון (checkbox) שמלווה אותה שדות פירוט מותנים, בתוך
   קופסה עם גבול ורקע עדין משלה - כדי שהיא תיקרא כשאלה אחת ברורה ותחומה,
   ולא כשורה בודדת שמצטרפת לרשימה ארוכה שנראית כמו חזרה על אותה שאלה. */
.check-question {
    background: #f6f8fb;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.check-question label { margin-bottom: 0; }
.check-question .field { margin-top: 12px; margin-bottom: 0; }

/* --- דשבורד (עמוד הבית) --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.stat-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary-dark);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(6,10,18,.3), 0 14px 30px -18px rgba(6,10,18,.45);
}
.stat-tile.accent { border-top-color: var(--accent); }
.stat-tile.good { border-top-color: var(--green); }
.stat-tile.warn { border-top-color: var(--amber); }
.stat-number { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dash-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.dash-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-section-title h2 { margin: 0; }
.dash-section-title a { font-size: 13px; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.status-bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.status-bar-row .status-bar-label { flex: 0 0 150px; color: var(--text); }
.status-bar-row .status-bar-track { flex: 1; background: #eef1f5; border-radius: 6px; height: 10px; overflow: hidden; }
.status-bar-row .status-bar-fill { height: 100%; background: var(--primary); border-radius: 6px; }
.status-bar-row .status-bar-count { flex: 0 0 28px; text-align: left; color: var(--muted); }
.apply-link-box {
    display: flex; align-items: center; gap: 8px; background: #f8f9fb;
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
    font-size: 13px; direction: ltr; text-align: left; overflow-wrap: anywhere;
}
/* כפתורי שיתוף מהירים לקישור ההרשמה (2.9.2026) - מוצגים מתחת לקישור הגולמי
   בכרטיס "קישור טופס הרשמה למועמדים" במסך הבית (dashboard.html) */
.share-buttons {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.page-header {
    background: var(--primary-dark);
    border-radius: 8px;
    padding: 20px 26px;
    margin-bottom: 22px;
    color: white;
    border-bottom: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    box-shadow: 0 10px 26px -14px rgba(0,0,0,.55);
}
.page-header h1, .page-header .subtitle { color: white; margin-bottom: 0; }
.page-header .subtitle { color: #9fc4e8; }
.page-header h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-header .btn-secondary { background: rgba(255,255,255,0.08); color: white; border: 1px solid rgba(255,255,255,0.35); }
.page-header .btn-secondary:hover { background: rgba(255,255,255,0.18); }
.page-header a.muted { color: #9fc4e8; }
.alert-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #fdf3d8; border: 1px solid #f3d98a; color: #7a5200;
    border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px;
}
.alert-banner a { color: #7a5200; }
.activity-feed { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--primary); }
.activity-item.activity-new_candidate .activity-dot { background: var(--accent); }
.activity-item.activity-status_change .activity-dot { background: var(--primary); }
.activity-item.activity-review .activity-dot { background: var(--amber); }
.activity-item.activity-new_job .activity-dot { background: var(--green); }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 14px; color: var(--text); }
.activity-text a { color: var(--text); text-decoration: none; }
.activity-text a:hover { text-decoration: underline; }
.activity-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; }
@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-columns { grid-template-columns: 1fr; }
}

.muted { color: var(--muted); font-size: 13px; }
.mismatch-list { color: var(--red); font-size: 13px; }
.criteria-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }

/* --- public form: sections, job picker, yes/no screening questions --- */
.section-block { margin-bottom: 26px; }
.section-block h2 {
    font-size: 16px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary-dark);
}
.section-hint { color: var(--muted); font-size: 13px; margin: -6px 0 14px 0; }
.job-question {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}
.job-question .q-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; display: block; color: var(--text); }
.yesno-group { display: flex; gap: 10px; margin-bottom: 8px; }
.yesno-group label {
    display: flex; align-items: center; gap: 6px;
    background: white; border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 18px; cursor: pointer; font-size: 15px; color: var(--text);
    flex: 1; justify-content: center;
}
.yesno-group input[type=radio] { width: 18px; height: 18px; margin: 0; }
.yesno-group input[type=radio]:checked + span { font-weight: 700; }
#jobQuestionsWrap:empty::before {
    content: "בחר/י משרה למעלה כדי לראות שאלות ספציפיות אליה (אם יש).";
    color: var(--muted); font-size: 13px;
}
.job-select-wrap select { width: 100%; padding: 12px; font-size: 16px; }

/* --- dynamic language rows (public form + staff form) --- */
.lang-row {
    display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.lang-row input[type=text] { flex: 2; }
.lang-row select { flex: 1; }
.lang-row-remove {
    flex: 0 0 auto; background: none; border: 1px solid var(--border); border-radius: 6px;
    color: var(--red); cursor: pointer; font-size: 14px; padding: 8px 12px; line-height: 1;
}
.lang-row-remove:hover { background: #fdf1f1; }

/* --- כפתור העלאת קובץ מעוצב (טופס ציבורי) - מחליף את ה-<input type="file">
   הגולמי בכפתור אמיתי (label[for]) + טקסט שם/כמות הקבצים שנבחרו --- */
.file-upload-input {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.file-upload-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-upload-btn { flex: 0 0 auto; }
.file-upload-name { font-size: 13px; color: var(--muted); }

/* --- consent checkbox (public form) --- */
.consent-block {
    background: #f8f9fb; border: 1px solid var(--border); border-radius: 8px; padding: 14px;
}
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text); }
.consent-label input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.consent-label + .consent-label { margin-top: 14px; }

/* --- mobile-first responsiveness (כל המערכת - כולל תפריט הניווט הפנימי, לא
   רק הטופס הציבורי - ראו דגש המשתמש מ-23.8.2026 על "התכווצות" בטלפון) --- */
@media (max-width: 640px) {
    .container { padding: 14px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    input[type=text], input[type=search], input[type=email], input[type=password],
    input[type=number], input[type=date], select, textarea {
        font-size: 16px;   /* prevents iOS auto-zoom on focus */
        padding: 12px;
        width: 100%;
    }
    .btn { width: 100%; text-align: center; padding: 14px; font-size: 16px; }
    .public-form-wrap { max-width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .container table { display: block; overflow-x: auto; white-space: nowrap; }

    /* --- תפריט ניווט עליון במובייל: הוחלף בתפריט מתקפל (המבורגר) - ראו
       .nav-toggle/.nav-mobile למעלה - כדי לא להציג שורת ניווט ארוכה שדוחסת
       את הדף (הבעיה המקורית שתוארה: "התוכן התכווץ"). --- */
    .topnav { padding: 10px 14px; }
    .nav-links, .nav-user { display: none; }
    .nav-toggle { display: flex; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .status-bar-row { flex-wrap: wrap; row-gap: 4px; }
    .status-bar-row .status-bar-label { flex: 1 1 100%; }
    .status-bar-row .status-bar-track { flex: 1 1 auto; }

    .page-header { padding: 16px 18px; }
    .page-header h1 { font-size: 19px; }
}
