/* ==========================================================================
   Rekrytering – stilmall
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/fraunces-latin-full-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --bg: #FBF6EF;
  --surface: #ffffff;
  --surface-2: #F7F0E6;
  --text: #2B1B2E;
  --text-2: #4A3A47;
  --muted: #6E5E68;
  --border: #EADFD3;
  --border-strong: #DCCDBE;

  --primary: #B24A26;
  --primary-hover: #963D1F;
  --primary-600: #C45A33;
  --primary-50: #FBEDE5;
  --primary-100: #F6E3D8;

  --accent: #D99A2B;
  --accent-50: #FDF3DD;
  --magic: #6B3F63;
  --magic-50: #F6ECF3;

  --ok: #4A6B4F;
  --ok-50: #E8EFE5;
  --fail: #d92d20;
  --fail-50: #fef3f2;
  --info: #175cd3;
  --info-50: #eff8ff;
  --warn: #b54708;
  --warn-50: #fffaeb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(43, 27, 46, 0.05);
  --shadow-sm: 0 1px 3px rgba(43, 27, 46, 0.08), 0 1px 2px rgba(43, 27, 46, 0.04);
  --shadow-md: 0 12px 24px -6px rgba(43, 27, 46, 0.1), 0 4px 8px -4px rgba(43, 27, 46, 0.05);
  --ring: 0 0 0 4px rgba(178, 74, 38, 0.2);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; color: var(--text); font-family: var(--font-display); font-optical-sizing: auto; }
h1 { font-size: clamp(1.7rem, 2.5vw + 1rem, 2.4rem); font-weight: 600; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.stack { display: grid; gap: 8px; justify-items: start; }
.stack-lg { display: grid; gap: 20px; align-content: start; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow-md); }

:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- Varumärke ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-flex; flex-shrink: 0; width: 40px; height: 40px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { font-size: 0.68rem; color: var(--primary); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- Publik sidhuvud / sidfot ---------- */
body.is-public {
  background:
    radial-gradient(1100px 480px at 12% -120px, rgba(232, 176, 75, 0.2), transparent 70%),
    radial-gradient(900px 420px at 95% -160px, rgba(94, 127, 99, 0.12), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.75); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(234, 223, 211, 0.7); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.pill-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 550; font-size: 0.925rem; text-decoration: none; color: var(--text-2); }
.pill-link:hover { background: rgba(43, 27, 46, 0.05); color: var(--text); }
main.page { flex: 1; padding-top: 32px; padding-bottom: 64px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.875rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer-inner p { margin: 0; }
.footer-brand { font-weight: 600; color: var(--text-2); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Kort, rubriker ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); }
.card + .card { margin-top: 20px; }
.card.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.title-row h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { margin: 0 0 16px; font-size: 0.925rem; }
.back a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 500; }
.back a:hover { color: var(--text); }
.section-title { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 14px; letter-spacing: 0; }
.section-h { display: flex; align-items: center; gap: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-size: 0.85rem; font-weight: 600; border: 1px solid var(--primary-100); margin-bottom: 14px; }
.eyebrow .icon { fill: currentColor; stroke: none; width: 14px; height: 14px; }
.lead { font-size: 1.125rem; color: var(--text-2); max-width: 680px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 20px; }
.inline-form { display: inline; margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---------- Knappar ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--primary);
  background: var(--primary); color: #fff; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  white-space: nowrap;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.button-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.button-ghost { background: transparent; color: var(--text-2); border-color: transparent; box-shadow: none; }
.button-ghost:hover { background: rgba(43, 27, 46, 0.05); color: var(--text); border-color: transparent; }
.button-danger { background: var(--surface); color: var(--fail); border-color: #fecdca; box-shadow: none; }
.button-danger:hover { background: var(--fail-50); color: var(--fail); border-color: #fda29b; }
.button-magic { background: linear-gradient(135deg, #7E4A73, var(--magic)); border-color: var(--magic); }
.button-magic:hover { background: linear-gradient(135deg, #6B3F63, #58324F); border-color: #58324F; }
.button-small { padding: 7px 14px; font-size: 0.85rem; border-radius: 999px; gap: 6px; }
.button-large { padding: 14px 28px; font-size: 1.02rem; border-radius: 999px; }
.button-block { width: 100%; }
.button.is-copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.icon-button { display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--text-2); font-size: 0.9rem; }
.icon-button:hover:not(:disabled) { background: var(--surface-2); }
.icon-button:disabled { opacity: 0.35; cursor: default; }
.icon-button.danger { color: var(--fail); }

/* ---------- Meddelanden och märken ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin: 0 0 20px; border: 1px solid transparent; font-size: 0.95rem; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--ok-50); border-color: #C9DAC5; color: #3B5A40; }
.alert-error { background: var(--fail-50); border-color: #fecdca; color: #912018; }
.alert-info { background: var(--info-50); border-color: #b2ddff; color: #1849a9; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: #F3EBE1; color: var(--text-2); white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.badge .icon { width: 12px; height: 12px; }
.badge-published { background: var(--ok-50); color: var(--ok); border-color: #C9DAC5; }
.badge-draft { background: #F3EBE1; color: var(--muted); border-color: var(--border); }
.badge-closed { background: var(--warn-50); color: var(--warn); border-color: #fedf89; }
.badge-ok { background: var(--ok-50); color: var(--ok); }
.badge-fail { background: var(--fail-50); color: var(--fail); }
.badge-status-new { background: var(--accent-50); color: #8A5A0B; }
.badge-status-review { background: var(--info-50); color: var(--info); }
.badge-status-interview { background: var(--magic-50); color: #6B3F63; }
.badge-status-offer { background: var(--warn-50); color: var(--warn); }
.badge-status-hired { background: var(--ok-50); color: var(--ok); }
.badge-status-rejected { background: #F3EBE1; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 0.85rem; font-weight: 500; }
.chip .icon { width: 14px; height: 14px; color: var(--muted); }
.chip-warm { background: var(--accent-50); border-color: #F4DDA8; color: #7A4E0A; }
.chip-warm .icon { color: #B97F17; }
.chip-green { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.chip-green .icon { color: var(--primary-600); }
.chips.small .chip { font-size: 0.8rem; padding: 3px 10px; }

/* ---------- Publik startsida ---------- */
.hero { max-width: 760px; margin: 24px 0 40px; }
.hero h1 { font-size: clamp(2rem, 4vw + 1rem, 3.1rem); letter-spacing: -0.02em; line-height: 1.08; font-weight: 600; margin-bottom: 16px; }
.job-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.job-card {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.job-card:hover { color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary-100); }
.job-card h3 { font-size: 1.15rem; margin: 0; }
.job-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.job-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); }
.job-icon .icon { fill: currentColor; stroke: none; }
.job-card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); }
.job-card:hover .job-card-cta .icon { transform: translateX(3px); }
.job-card-cta .icon { transition: transform 0.2s; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state.small { padding: 28px 16px; color: var(--muted); }
.empty-state.small p { margin: 0; }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); margin-bottom: 14px; }
.empty-icon .icon { width: 26px; height: 26px; }

/* ---------- Annonssida ---------- */
.job-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff 0%, #FBEDE5 100%);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.job-hero h1 { max-width: 760px; margin-bottom: 16px; }
.job-hero-text { min-width: 0; flex: 1 1 420px; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.job-layout .card + .card { margin-top: 0; }
.job-description { position: sticky; top: 92px; }
.prose p, .prose ul { margin: 0 0 1em; color: var(--text-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 4px; }
.checklist ul { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B24A26' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.job-description h2 + .prose { margin-bottom: 8px; }
.job-description h2:not(:first-child) { margin-top: 24px; }
.application { scroll-margin-top: 90px; }

/* ---------- Formulär ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.apply-form > fieldset { padding-top: 24px; border-top: 1px solid var(--border); }
.apply-form > fieldset:first-of-type { border-top: 0; padding-top: 8px; }
fieldset > legend { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.05rem; margin-bottom: 16px; padding: 0; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.field { margin-bottom: 20px; }
.field > label, .question-label, .label-like { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; color: var(--text); }
fieldset.choice-group > legend { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 11px 14px; min-height: 46px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-xs); transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #B3A294; }
input:hover:not([type=checkbox]):not([type=radio]), select:hover, textarea:hover { border-color: #B3A294; }
input:focus:not([type=checkbox]):not([type=radio]), select:focus, textarea:focus { outline: none; border-color: var(--primary-600); box-shadow: var(--ring); }
input.short { max-width: 160px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E5E68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.help { color: var(--muted); font-size: 0.875rem; margin: 6px 0 10px; }
.help .icon { width: 14px; height: 14px; }
.req { color: var(--fail); font-weight: 600; }
.error { display: flex; align-items: center; gap: 6px; color: var(--fail); font-weight: 550; font-size: 0.875rem; margin: 8px 0 0; }
.error::before { content: '!'; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--fail); color: #fff; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
.has-error input:not([type=checkbox]):not([type=radio]), .has-error textarea, .has-error select { border-color: #fda29b; background: #fffbfa; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.choices { display: grid; gap: 8px; }
.choices.inline { grid-template-columns: repeat(2, minmax(0, 140px)); }
.choice { display: flex; gap: 12px; align-items: flex-start; font-weight: 450; cursor: pointer; }
.field > label.choice { display: flex; font-weight: 450; font-size: 0.95rem; color: var(--text-2); margin-bottom: 0; }
.choices .choice {
  align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.choices .choice:hover { border-color: #B3A294; }
.choices .choice:has(input:checked) { border-color: var(--primary-600); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary-600); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.choices .choice input { margin: 0; }

.dropzone, .field > label.dropzone {
  position: relative; display: flex; margin-bottom: 0; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 24px 16px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  color: var(--muted); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary-600); background: var(--primary-50); }
.dropzone:focus-within { box-shadow: var(--ring); border-color: var(--primary-600); }
.dropzone.has-file { border-style: solid; border-color: var(--primary-600); background: var(--primary-50); }
.dz-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--primary); box-shadow: var(--shadow-xs); }
.dz-text { font-size: 0.925rem; }
.dz-text strong { color: var(--primary); }
.dz-file { font-weight: 600; color: var(--primary); font-size: 0.925rem; word-break: break-all; }
.dz-file:empty { display: none; }
.dz-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.has-error .dropzone { border-color: #fda29b; background: #fffbfa; }

/* ---------- Tack-sidan ---------- */
.success-card { padding: 48px 32px; }
.success-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--ok-50); color: var(--ok); margin-bottom: 18px; box-shadow: 0 0 0 10px rgba(94, 127, 99, 0.12); animation: pop 0.4s ease-out; }
.success-icon .icon { width: 34px; height: 34px; stroke-width: 3; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.privacy h2 { margin-top: 1.5em; }

/* ==========================================================================
   Administration
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) 263px, var(--border) 263px, var(--border) 264px, transparent 264px); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px;
  padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar .brand { padding: 0 6px; }
.side-nav { display: grid; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; width: 100%;
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: 0.95rem;
  background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left;
}
.nav-link .icon { color: var(--muted); }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-link.active .icon { color: var(--primary); }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 22px; text-align: center; }
.logout-form { margin-top: auto; }
.app-main { min-width: 0; }
.content { max-width: 1180px; margin: 0 auto; padding: 32px 32px 64px; }

/* Så fungerar det */
.how-it-works { background: linear-gradient(135deg, #2B1B2E, #4A2E45); color: #fff; border-radius: var(--radius-xl); padding: 26px 28px; margin-bottom: 24px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.how-it-works h2 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; opacity: 0.9; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); padding: 16px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 0.875rem; color: rgba(255, 255, 255, 0.82); }
.step-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: #E8B04B; color: #2B1B2E; }
.how-it-works.is-compact { padding: 20px 24px; }
.how-it-works.is-compact .steps p { display: none; }

/* Nyckeltal */
.stat-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-xs); }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); }
.stat-num { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.stat-accent .stat-icon { background: var(--accent-50); color: var(--accent); }

/* Annonslista */
.admin-job-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.admin-job { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-xs); transition: box-shadow 0.2s, border-color 0.2s; }
.admin-job:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.admin-job-main { text-decoration: none; color: var(--text); min-width: 0; }
.admin-job-main:hover { color: var(--text); }
.admin-job-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-job-title h3 { margin: 0; font-size: 1.05rem; }
.admin-job-stats { display: flex; gap: 22px; text-align: center; }
.admin-job-stats .num { display: block; font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.admin-job-stats .num.is-new { color: var(--accent); }
.admin-job-stats .lbl { font-size: 0.75rem; color: var(--muted); }
.admin-job-actions { display: flex; gap: 6px; }

/* Länkruta */
.link-box { background: linear-gradient(135deg, #FBEDE5, #ffffff 70%); border: 1px solid #EFCDBB; border-radius: var(--radius-xl); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.link-box-head { display: flex; gap: 14px; align-items: flex-start; }
.link-box-head h2 { margin-bottom: 4px; }
.link-box-head p { margin: 0; color: var(--text-2); }
.link-box-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; box-shadow: 0 4px 10px -2px rgba(178, 74, 38, 0.35); }
.link-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 12px; }
.share-url.big { flex: 1 1 320px; font-weight: 600; color: var(--primary) !important; background: var(--surface) !important; font-size: 0.95rem !important; }
.mini-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; counter-reset: s; font-size: 0.875rem; color: var(--text-2); }
.mini-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; }
.mini-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-100); color: var(--primary); font-size: 0.75rem; font-weight: 700; }
.link-box .alert { margin: 14px 0 0; }

/* Detaljsida */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.side-col { display: grid; gap: 16px; }
.side-col .card { padding: 20px; }
.side-col .card + .card { margin-top: 0; }
.side-col h3 { margin-bottom: 12px; }
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; align-self: flex-start; }
.segmented a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 550; color: var(--text-2); text-decoration: none; }
.segmented a:hover { color: var(--text); background: rgba(43, 27, 46, 0.04); }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented .count { font-size: 0.75rem; color: var(--muted); background: #EFE5D9; border-radius: 999px; padding: 0 7px; }
.segmented .icon { width: 14px; height: 14px; }

.applicant-list { list-style: none; margin: 0 -8px; padding: 0; }
.applicant { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); text-decoration: none; color: var(--text); transition: background 0.15s; }
.applicant:hover { background: var(--surface-2); color: var(--text); }
.applicant-list li + li { border-top: 1px solid var(--border); }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #F6E3D8, #EFCDBB); color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.applicant.is-new .avatar { background: linear-gradient(135deg, #FBE9C2, #F4DDA8); color: #8A5A0B; }
.applicant-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.applicant-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.applicant-sub { font-size: 0.825rem; color: var(--muted); }
.applicant-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.chev { color: #B3A294; }

.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.9rem; }
.req-list li { display: flex; gap: 10px; align-items: flex-start; }
.req-list .icon { color: var(--primary); margin-top: 3px; }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.source-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 0.9rem; }
.bar { grid-column: 1 / -1; width: 100%; height: 6px; border: 0; border-radius: 999px; background: #EFE5D9; overflow: hidden; appearance: none; }
.bar::-webkit-progress-bar { background: #EFE5D9; border-radius: 999px; }
.bar::-webkit-progress-value { background: var(--primary-600); border-radius: 999px; }
.bar::-moz-progress-bar { background: var(--primary-600); border-radius: 999px; }
.share-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.share-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.share-label { font-weight: 550; font-size: 0.9rem; }
.danger-zone .help { margin-top: 12px; margin-bottom: 0; }

/* En ansökan */
.application-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.application-layout .card + .card { margin-top: 0; }
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.profile-head h1 { margin-bottom: 8px; font-size: 1.6rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.contact { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; background: var(--surface-2); min-width: 0; word-break: break-word; }
a.contact:hover { border-color: var(--primary-600); background: var(--primary-50); color: var(--text); }
.contact .icon { color: var(--primary); }
.contact .lbl { display: block; font-size: 0.75rem; color: var(--muted); }
.attachments { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.attachment { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.file-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--fail-50); color: var(--fail); }
.file-meta { display: flex; flex-direction: column; flex: 1; min-width: 140px; word-break: break-all; }
.answers { margin: 0; display: grid; }
.answer { padding: 16px 0; border-bottom: 1px solid var(--border); }
.answer:last-child { border-bottom: 0; padding-bottom: 0; }
.answer dt { font-weight: 600; color: var(--text); }
.answer dd { margin: 6px 0 0; color: var(--text-2); }
.answer-failed { background: var(--fail-50); margin: 4px -14px; padding: 14px; border-radius: var(--radius); border-bottom: 0; }
.req-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 0.75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; }
.req-tag .icon { width: 12px; height: 12px; }
.req-tag.ok { background: var(--ok-50); color: var(--ok); }
.req-tag.fail { background: #fff; color: var(--fail); border: 1px solid #fecdca; }
.sticky { position: sticky; top: 24px; }
.status-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px; }
.status-picker legend { grid-column: 1 / -1; }
.status-option { display: flex; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; pointer-events: none; }
.status-option span { flex: 1; text-align: center; padding: 8px 6px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 0.85rem; font-weight: 550; color: var(--text-2); transition: all 0.15s; }
.status-option:hover span { border-color: #B3A294; }
.status-option input:focus-visible + span { box-shadow: var(--ring); }
.status-option input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager { display: flex; gap: 4px; }

/* Inloggning */
.auth-card { max-width: 420px; margin: 48px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 36px 32px; box-shadow: var(--shadow-md); }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, #D0673E, var(--primary)); box-shadow: 0 6px 14px -4px rgba(178, 74, 38, 0.45); }
.auth-icon .icon { width: 24px; height: 24px; }
.form-narrow { max-width: 640px; }
.form-narrow h2:not(:first-of-type) { margin-top: 28px; }

/* Annonsformuläret */
.job-form .card + .card { margin-top: 20px; }
.job-form .section-h { margin-bottom: 16px; }
.status-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.status-cards legend { grid-column: 1 / -1; }
.status-card { position: relative; cursor: pointer; }
.status-card input { position: absolute; opacity: 0; pointer-events: none; }
.status-card-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: 0.875rem; color: var(--muted); transition: all 0.15s; }
.status-card-body strong { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.95rem; }
.status-card:hover .status-card-body { border-color: #B3A294; }
.status-card input:focus-visible + .status-card-body { box-shadow: var(--ring); }
.status-card input:checked + .status-card-body { border-color: var(--primary-600); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary-600); }

/* Frågebyggaren */
.question-list { display: grid; gap: 12px; margin-bottom: 16px; }
.question-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); box-shadow: var(--shadow-xs); }
.question-card.is-requirement { border-left: 4px solid var(--fail); }
.question-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.question-num { font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.spacer { flex: 1; }
.question-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.templates summary { list-style: none; }
.templates summary::-webkit-details-marker { display: none; }
.templates[open] summary { background: var(--surface-2); }
.template-list { list-style: none; padding: 12px 16px; margin: 8px 0 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; max-width: 580px; box-shadow: var(--shadow-md); }
.chosen-heading { margin-top: 0; }

/* Frågeförslag */
.suggest-box { border: 1px solid #E6D3E0; background: linear-gradient(135deg, var(--magic-50), #ffffff 80%); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px; }
.suggest-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.suggest-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; color: #58324F; }
.suggest-head .help { margin: 0; max-width: 620px; }
.suggest-status { margin: 12px 0 0; font-size: 0.9rem; color: var(--text-2); }
.suggest-status:empty { display: none; }
.suggest-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.suggest-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-xs); }
.suggest-item.added { opacity: 0.55; }
.suggest-text { flex: 1; min-width: 0; }
.suggest-label { font-weight: 600; }
.suggest-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 0.8rem; align-items: center; }
.suggest-meta .badge { font-weight: 550; }
.badge-type-open { background: var(--magic-50); color: #6B3F63; }
.suggest-reason { color: var(--muted); font-size: 0.825rem; margin-top: 4px; }
.suggest-actions { margin-top: 12px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsivt ---------- */
@media (max-width: 1080px) {
  .detail-layout, .application-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .job-layout { grid-template-columns: 1fr; }
  .job-description { position: static; }
  .app-shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .sidebar .brand-text { display: none; }
  .side-nav { display: flex; gap: 2px; }
  .nav-link { width: auto; white-space: nowrap; padding: 8px 10px; }
  .logout-form { margin-top: 0; margin-left: auto; }
  .sidebar .brand { flex-shrink: 0; padding: 0; }
  .side-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-link, .logout-form { flex-shrink: 0; }
  .content { padding: 24px 20px 48px; }
  .steps { grid-template-columns: 1fr; }
  .admin-job { grid-template-columns: 1fr; gap: 14px; }
  .admin-job-stats { justify-content: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .card { padding: 18px; border-radius: 14px; }
  .job-hero { padding: 22px; border-radius: 18px; }
  .hero-cta { width: 100%; }
  .nav-link span:not(.nav-count) { display: none; }
  .sidebar { gap: 6px; padding: 8px 12px; }
  .sidebar .brand-mark { width: 36px; height: 36px; }
  .nav-link { padding: 8px; gap: 4px; }
  .logout-form .nav-link span { display: none; }
  .stat { padding: 14px; }
  .stat-num { font-size: 1.35rem; }
  .status-cards { grid-template-columns: 1fr; }
  .applicant-tags { display: none; }
  .link-box { padding: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Logotyp i inloggning och jobbkort */
.auth-logo { display: inline-flex; width: 56px; height: 56px; margin-bottom: 18px; }
.auth-logo svg, .job-icon svg { width: 100%; height: 100%; }
.job-icon { background: none !important; }
.sidebar .brand-name { white-space: normal; font-size: 1.08rem; line-height: 1.15; }

/* ---------- Plattformens startsida ---------- */
.landing-hero { max-width: 780px; margin: 32px 0 48px; }
.landing-hero h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; margin-bottom: 18px; }
.landing-hero .actions { margin-top: 28px; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-grid .card + .card { margin-top: 0; }
.feature h2 { font-size: 1.2rem; margin-top: 14px; }
.feature p { color: var(--text-2); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary-50); color: var(--primary); }
.auth-switch { margin-top: 18px; }

/* ---------- Inställningar ---------- */
.settings-layout { display: grid; gap: 20px; max-width: 760px; }
.settings-layout .card + .card { margin-top: 0; }
.settings-layout .section-h .step { background: var(--primary-50); color: var(--primary); }
.settings-layout .section-h .step .icon { width: 15px; height: 15px; }
.link-row.compact { margin: 0; }
.link-row.compact .share-url { flex: 1 1 260px; }
.toggle { display: flex !important; align-items: center; gap: 12px; font-weight: 600 !important; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--primary); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
.mail-preview { margin-bottom: 20px; }
.mail-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 16px 18px; }
.mail-subject { font-weight: 700; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.mail-body { white-space: pre-wrap; color: var(--text-2); font-size: 0.95rem; }

/* ---------- Matchning ---------- */
.match-ring { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; font-weight: 700; font-size: 0.9rem; border: 3px solid currentColor; background: var(--surface); }
.match-strong { color: var(--ok); }
.match-possible { color: #9A6B0F; }
.match-weak { color: var(--muted); }
.applicant-summary { font-size: 0.85rem; color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.match-card h2 { display: flex; align-items: center; gap: 8px; }
.match-head { display: flex; gap: 20px; align-items: flex-start; }
.match-score { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 112px; height: 112px; border-radius: 50%; border: 6px solid currentColor; background: var(--surface); text-align: center; }
.match-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; color: var(--text); }
.match-num small { font-size: 0.9rem; margin-left: 1px; }
.match-text { font-size: 0.72rem; font-weight: 700; margin-top: 4px; line-height: 1.2; max-width: 84px; }
.match-summary { margin: 0; font-size: 1.02rem; color: var(--text); line-height: 1.6; }
.match-lists { margin-top: 18px; gap: 16px; }
.small-h { font-family: inherit; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px; }
.plus-list, .ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.925rem; }
.plus-list li, .ask-list li { position: relative; padding-left: 22px; }
.plus-list li::before { content: '+'; position: absolute; left: 0; font-weight: 800; color: var(--ok); }
.ask-list li::before { content: '?'; position: absolute; left: 0; font-weight: 800; color: #9A6B0F; }
.match-why { margin-top: 16px; font-size: 0.875rem; color: var(--text-2); }
.match-why summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.match-why ul { margin: 10px 0; padding-left: 1.2em; }
@media (max-width: 640px) { .match-head { flex-direction: column; } }

/* ---------- Förhandsvisning vid delning ---------- */
.share-preview { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.share-preview img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: #FBF6EF; }
.share-preview-text { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; }
.share-domain { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Plattform ---------- */
.org-list { list-style: none; margin: 0; padding: 0; }
.org-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.org-item:last-child { border-bottom: 0; }
.org-main { min-width: 0; flex: 1 1 360px; }
.org-main h3 { margin: 0; }
.org-main p { margin: 4px 0 6px; }
.org-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.org-users { font-size: 0.875rem; }
.org-users summary { cursor: pointer; color: var(--text-2); }
.org-users ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.org-users li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-greeting { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; }
.extent-sync { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; }

/* ---------- Ordning på frågor ---------- */
.chosen-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chosen-head .chosen-heading { margin: 0; }
.question-tools { display: flex; gap: 4px; }
.question-card { transition: box-shadow 0.15s, opacity 0.15s; }
.question-card.is-collapsed { padding: 10px 12px; }
.question-card.is-collapsed .question-head { margin-bottom: 0; }
.question-head { gap: 6px; }
.question-num { display: inline-grid; place-items: center; flex-shrink: 0; min-width: 26px; height: 26px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-size: 0.8rem; }
.drag-handle { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #B3A294; cursor: grab; touch-action: none; }
.drag-handle:hover { background: var(--surface-2); color: var(--text-2); }
.drag-handle:active { cursor: grabbing; }
.question-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 4px; font: inherit; text-align: left; cursor: pointer; color: var(--text); border-radius: 8px; }
.question-title:hover { background: var(--surface-2); }
.question-title-text { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.question-card:not(.is-collapsed) .question-title-text { white-space: normal; }
.question-tags { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }
.question-list.is-sorting { user-select: none; }
.question-card.is-dragging { box-shadow: var(--shadow-md); opacity: 0.92; border-color: var(--primary-600); position: relative; z-index: 2; }
@media (max-width: 640px) {
  .question-tags { display: none; }
  .question-head .icon-button[title="Flytta upp"], .question-head .icon-button[title="Flytta ner"] { display: none; }
}

/* ---------- Mobil: inget får gå utanför sidan ---------- */
.question-list { grid-template-columns: minmax(0, 1fr); }
.question-card, .question-head, .question-title { min-width: 0; max-width: 100%; }
/* På små skärmar visas frågetexten på upp till två rader i stället för att klippas */
@media (max-width: 640px) {
  .question-title-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
  .question-card.is-collapsed { padding: 8px 8px 8px 4px; }
  .question-head { gap: 4px; }
  .question-head .icon-button { width: 30px; height: 30px; }
}
/* Datumfält i Safari på iPhone har annars en egen minsta bredd och sticker ut */
input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.grid-2 > *, .grid-3 > * { min-width: 0; }

/* Kontaktformulär och meddelanden */
.job-question { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 0.95rem; }
.job-question .icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--primary); }
.contact-about { margin: 4px 0 18px; }
.message-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.message { display: grid; gap: 12px; min-width: 0; }
.message-new { border-color: var(--primary-100); box-shadow: inset 4px 0 0 var(--primary); }
.message-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.message-from { display: grid; gap: 2px; min-width: 0; }
.message-from .applicant-sub { overflow-wrap: anywhere; }
.message-about { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 0.9rem; color: var(--text-2); }
.message-about .icon { width: 15px; height: 15px; color: var(--muted); }
.message-text { overflow-wrap: anywhere; }
.message-text p:last-child { margin-bottom: 0; }

/* Appen i mobilen */
[hidden] { display: none !important; }
.push-box { display: grid; gap: 12px; margin: 14px 0 6px; }
.push-status { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 0.92rem; }
.push-status.is-on { background: var(--ok-50); border-color: #C9DAC5; color: var(--ok); }
.push-status.is-na { background: var(--warn-50); border-color: #fedf89; color: var(--warn); }
.app-install { margin-top: 12px; }

/* Bild i annonsen */
.job-photo { margin: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden; border: 1px solid var(--border); border-bottom: 0; background: var(--surface-2); }
.job-photo img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; }
.job-hero.has-photo { position: relative; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 32px; margin-top: 0; }
.job-photo + .job-hero.has-photo { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.job-card.has-photo { padding-top: 0; overflow: hidden; }
.job-card-photo { display: block; width: calc(100% + 44px); margin: 0 -22px 2px; aspect-ratio: 16 / 8; object-fit: cover; background: var(--surface-2); }
.photo-preview { margin-bottom: 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); max-width: 520px; background: var(--surface-2); }
.photo-preview img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.photo-pick { position: relative; cursor: pointer; }
.photo-alt { margin-top: 12px; margin-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .job-photo img { aspect-ratio: 4 / 3; }
  .job-photo { border-radius: 18px 18px 0 0; }
  .job-photo + .job-hero.has-photo { border-radius: 0 0 18px 18px; }
}

/* ---------- Intervjuer ---------- */
.guide-layout, .interview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.guide-questions, .iq-list { margin: 0; padding: 0; list-style: none; counter-reset: q; display: grid; gap: 0; }
.guide-questions li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); counter-increment: q; }
.guide-questions li:first-child { border-top: 0; padding-top: 4px; }
.guide-q { min-width: 0; }
.guide-q-text, .iq-text { margin: 0; font-weight: 600; color: var(--text); line-height: 1.45; }
.guide-q-text::before, .iq-text::before { content: counter(q) ". "; color: var(--primary); }
.guide-q-hint, .iq-hint { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: 0.875rem; color: var(--muted); }
.guide-q-hint .icon, .iq-hint .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; }
.iq { padding: 16px 0; border-top: 1px solid var(--border); counter-increment: q; }
.iq:first-child { border-top: 0; padding-top: 4px; }
.iq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-top: 10px; }
.iq-row textarea { min-height: 44px; resize: vertical; }
.score-group { display: inline-flex; gap: 4px; }
.score-option { position: relative; cursor: pointer; }
.score-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.score-option span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 0.9rem; color: var(--text-2); transition: background 0.15s, border-color 0.15s; }
.score-option:hover span { border-color: #B3A294; }
.score-option input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.score-option input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.interview-section.is-personal { border-color: var(--primary-100); box-shadow: inset 4px 0 0 var(--primary); }
.clarify-card { background: var(--accent-50); border-color: #F4DDA8; }
.clarify-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1.1rem; }
.score-summary { margin: 0 0 14px; color: var(--text-2); }
.score-summary strong { font-size: 1.4rem; color: var(--text); }
.rec-group { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.save-status { margin: 10px 0 0; text-align: center; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.92rem; }
.avoid-card summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.avoid-card .small-h { display: flex; gap: 8px; align-items: center; }
.regen-form { margin-top: 16px; }
.interview-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1.15rem; }
.interview-card p { margin: 0 0 10px; }
.interview-actions { margin-top: 14px; justify-items: stretch; }
.cancel-form { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 4px; }
.interview-result { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.rec-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-weight: 600; font-size: 0.82rem; }
.rec-badge.rec-yes { background: var(--ok-50); color: var(--ok); }
.rec-badge.rec-maybe { background: var(--accent-50); color: #8A5A0B; }
.rec-badge.rec-no { background: #F3EBE1; color: var(--muted); }
.mode-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.mode-option { cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-option span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-weight: 600; text-align: center; }
.mode-option span .icon { width: 22px; height: 22px; color: var(--primary); }
.mode-option input:checked + span { border-color: var(--primary-600); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary-600); }
.mode-option input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.mode-detail { display: grid; gap: 10px; margin-bottom: 16px; }
.narrow-field { max-width: 220px; }
.slot-list { display: grid; gap: 10px; margin: 12px 0; }
.slot-row { display: flex; gap: 8px; align-items: center; max-width: 340px; }
.slot-row input { flex: 1; min-width: 0; }
.interview-public h1 { margin-top: 12px; }
.small-lead { font-size: 1.02rem; margin-bottom: 18px; }
.booked-box { padding: 18px; border-radius: 16px; background: var(--primary-50); border: 1px solid var(--primary-100); margin: 8px 0 18px; }
.booked-box p { display: flex; gap: 10px; align-items: center; margin: 0; }
.booked-box p + p { margin-top: 8px; }
.booked-time { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--text); }
.booked-box .icon { color: var(--primary); flex-shrink: 0; }
.slot-form { display: grid; gap: 16px; margin: 16px 0; }
.other-time { margin-top: 18px; }
.other-time summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.other-time form { margin-top: 12px; }
@media (max-width: 960px) {
  .guide-layout, .interview-layout { grid-template-columns: minmax(0, 1fr); }
  .interview-side .sticky { position: static; }
}
@media (max-width: 640px) {
  .iq-row { grid-template-columns: minmax(0, 1fr); }
  .mode-picker { gap: 6px; }
  .mode-option span { font-size: 0.85rem; padding: 12px 4px; }
}
@media print {
  .sidebar, .back, .page-head .actions, .regen-form, .save-status, .interview-side .button, .skip-link { display: none !important; }
  .app-shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
  .interview-layout { grid-template-columns: 1fr; }
  textarea { border: 1px solid #ccc; }
}

/* ---------- Videosamtal ---------- */
.video-body { margin: 0; background: #1F1522; color: #FBF6EF; min-height: 100vh; min-height: 100dvh; }
.video-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); box-sizing: border-box; }
.video-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 0; }
.video-top .brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.video-title { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.video-title strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-title span { font-size: 0.85rem; color: #CBBFC6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-link { display: inline-flex; gap: 6px; align-items: center; color: #FBF6EF; text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.video-link:hover { color: #fff; background: rgba(255,255,255,0.18); }
.video-stage { position: relative; flex: 1; min-height: 0; margin: 0 12px; border-radius: 22px; overflow: hidden; background: #2B1B2E; }
.remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #2B1B2E; }
.local-video { position: absolute; right: 12px; bottom: 12px; width: 26%; max-width: 240px; min-width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: #3A2A3D; border: 2px solid rgba(255,255,255,0.25); transform: scaleX(-1); z-index: 3; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
.rear-camera .local-video { transform: none; }
.video-stage.is-preview .local-video { inset: 0; width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; aspect-ratio: auto; }
.video-stage.is-preview .remote-video { display: none; }
.cam-off .local-video { opacity: 0.15; }
.video-waiting { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; z-index: 2; background: #2B1B2E; }
.video-waiting p { margin: 0; color: #E9DEE4; max-width: 320px; }
.video-avatar { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, #B24A26, #E8B04B); color: #fff; font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.peer-status { position: absolute; top: 12px; left: 12px; right: 12px; margin: 0 auto; width: fit-content; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.88rem; z-index: 4; text-align: center; }
.video-unmute { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: inline-flex; gap: 8px; align-items: center; padding: 14px 20px; border-radius: 999px; border: 0; background: #fff; color: #2B1B2E; font: inherit; font-weight: 700; cursor: pointer; }
.video-prejoin, .video-ended { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; max-width: 460px; margin: 0 auto; padding: 20px; border-radius: 18px; background: rgba(31, 21, 34, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-align: center; }
.video-ended { top: 50%; bottom: auto; transform: translateY(-50%); }
.video-prejoin h1, .video-ended h1 { color: #fff; font-size: 1.4rem; margin: 0 0 8px; }
.video-prejoin p { margin: 0 0 16px; color: #E9DEE4; font-size: 0.95rem; }
.video-join { width: 100%; justify-content: center; }
.video-join:disabled { opacity: 0.55; }
.video-back { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; color: #CBBFC6; font-size: 0.9rem; }
.video-back:hover { color: #fff; }
.video-ended .actions { justify-content: center; }
.video-controls { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.vc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.vc-btn:hover:not(:disabled) { background: rgba(255,255,255,0.24); }
.vc-btn:disabled { opacity: 0.4; cursor: default; }
.vc-btn .icon { width: 24px; height: 24px; }
.vc-btn .vc-off, .vc-btn.is-off .vc-on { display: none; }
.vc-btn.is-off .vc-off { display: inline-flex; }
.vc-btn.is-off { background: #fff; color: #B42318; }
.vc-leave { width: auto; padding: 0 22px; border-radius: 999px; background: #D92D20; }
.vc-leave:hover:not(:disabled) { background: #B42318; }
.video-noscript { text-align: center; padding: 16px; }
@media (min-width: 900px) {
  .local-video { aspect-ratio: 16 / 9; width: 22%; }
}
@media (max-width: 640px) {
  .video-link span { display: none; }
  .video-stage { margin: 0 8px; border-radius: 18px; }
  .remote-video { object-fit: cover; }
  .local-video { width: 30%; right: 10px; bottom: 10px; }
}
.video-share { margin: 0 12px 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.08); display: grid; gap: 8px; font-size: 0.88rem; color: #E9DEE4; }
.video-share > span { display: flex; gap: 8px; align-items: flex-start; }
.video-share .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.video-share-row { display: flex; gap: 8px; min-width: 0; }
.video-share-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.25); color: #fff; font: inherit; font-size: 0.85rem; }
.vc-copy { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 0; background: #fff; color: #2B1B2E; font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
