/* Sanisa — designsystem
   Ljus arbetsyta, en blå accent, Geist. Kort har kantlinje (ingen skugga);
   bara sådant som svävar (dialoger, menyer, toasts) har skugga. */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/geist-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: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/geist-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; }

:root {
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --sunken: #EDF1F7;
  --line: #E1E8F2;
  --line-2: #CCD6E4;
  --ink: #0E1A2F;
  --ink-2: #3D4B63;
  --ink-3: #5B6982;
  --blue: #1D56E0;
  --blue-600: #1849C4;
  --blue-700: #143CA2;
  --blue-50: #EEF3FE;
  --blue-100: #DCE6FD;
  --blue-200: #B9CCFA;
  --green: #0E7A52;
  --green-50: #E6F4EE;
  --amber: #9A5300;
  --amber-50: #FFF3E2;
  --red: #BF3328;
  --red-50: #FCEBE9;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --sh-pop: 0 12px 32px -8px rgba(14, 26, 47, .22), 0 2px 8px rgba(14, 26, 47, .08);
  --sh-dialog: 0 24px 64px -12px rgba(14, 26, 47, .32), 0 4px 14px rgba(14, 26, 47, .1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --rail: 72px;
  --side: 312px;
  --panel: 420px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on;
}
::selection { background: var(--blue-100); color: var(--ink); }
input, textarea, select, button { font: inherit; color: inherit; caret-color: var(--blue); }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 14px; height: 14px; }
.ic.lg { width: 24px; height: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- knappar */

.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r);
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-line);
  font-weight: 560; font-size: 14.5px; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out), box-shadow 160ms ease;
  text-decoration: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { --b-bg: var(--surface-2); --b-line: #B9C5D6; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { --b-bg: var(--blue); --b-fg: #fff; --b-line: var(--blue); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { --b-bg: var(--blue-600); --b-line: var(--blue-600); }
.btn.success { --b-bg: var(--green); --b-fg: #fff; --b-line: var(--green); }
.btn.success:hover { --b-bg: #0B6845; --b-line: #0B6845; }
.btn.ghost { --b-bg: transparent; --b-line: transparent; color: var(--ink-2); }
.btn.ghost:hover { --b-bg: var(--sunken); }
.btn.danger { --b-fg: var(--red); }
.btn.danger:hover { --b-bg: var(--red-50); --b-line: #F0C2BD; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; }
.btn.icon.sm { width: 34px; }
.btn .spin { display: none; }
.btn.loading { pointer-events: none; }
.btn.loading .spin { display: inline-block; }
.btn.loading .ic:not(.spin) { display: none; }

.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- formulär */

.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 560; color: var(--ink-2); }
.field small { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line-2);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  font-size: 15px;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%235B6982'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #B3C0D3; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); outline: none; }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: #8A96AA; }
.field .lockable { position: relative; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-content: center; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
.check input::after { content: ''; width: 11px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(.6); opacity: 0; transition: transform 160ms var(--ease-out), opacity 120ms ease; margin-top: -2px; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { opacity: 1; transform: rotate(-45deg) scale(1); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color 180ms ease; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(14,26,47,.25); transition: transform 220ms var(--ease-out); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(16px); }

.seg { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: var(--r); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 560; color: var(--ink-2); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(14,26,47,.1), 0 0 0 1px rgba(14,26,47,.04); }
.seg button .count { color: var(--ink-3); font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- pills */

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--sunken); color: var(--ink-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.open { background: var(--blue-50); color: var(--blue-700); }
.pill.taken, .pill.mine { background: var(--green-50); color: var(--green); }
.pill.done { background: var(--sunken); color: var(--ink-2); }
.pill.withdrawn, .pill.cancelled { background: var(--red-50); color: var(--red); }
.pill.warn { background: var(--amber-50); color: var(--amber); }
.pill.open .dot { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 650; display: inline-grid; place-content: center; font-variant-numeric: tabular-nums; }
.badge.pop { animation: pop 320ms var(--ease-out); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* -------------------------------------------------------------- skal/layout */

.app { display: grid; grid-template-columns: var(--rail) var(--side) minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.app.panel-open { grid-template-columns: var(--rail) var(--side) minmax(0, 1fr) var(--panel); }
.app.wide { grid-template-columns: var(--rail) minmax(0, 1fr); }
.app.wide.panel-open { grid-template-columns: var(--rail) minmax(0, 1fr) var(--panel); }
.app.wide .side { display: none; }

.rail { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; z-index: 3; }
.brand-tile { width: 40px; height: 40px; border-radius: 11px; background: var(--blue); color: #fff; display: grid; place-content: center; font-weight: 700; font-size: 21px; letter-spacing: -0.04em; margin-bottom: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.12); text-decoration: none; }
.rail-btn { position: relative; width: 60px; padding: 8px 0 7px; border: 0; background: none; border-radius: var(--r); display: grid; justify-items: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 560; cursor: pointer; transition: color 140ms ease, background-color 140ms ease; text-decoration: none; }
.rail-btn .ic { width: 22px; height: 22px; }
.rail-btn:hover { color: var(--ink); background: var(--sunken); }
.rail-btn[aria-current="page"] { color: var(--blue); }
.rail-btn[aria-current="page"]::before { content: ''; position: absolute; left: -6px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); animation: railin 260ms var(--ease-out); }
@keyframes railin { from { transform: scaleY(.3); opacity: 0; } }
.rail-btn .badge { position: absolute; top: 2px; right: 8px; height: 18px; min-width: 18px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--surface); }
.rail-spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); display: grid; place-content: center; font-weight: 650; font-size: 13px; letter-spacing: -0.01em; flex: none; }
.avatar.sq { border-radius: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.brand { background: var(--blue); color: #fff; }
.rail .avatar { cursor: pointer; border: 0; }
img.avatar, img.chan-ic { object-fit: cover; background: var(--sunken); display: block; padding: 0; }
img.chan-ic.dm { border: 0; }
.bubble-meta { display: flex; align-items: center; gap: 6px; }
.photo-edit { display: flex; align-items: center; gap: 18px; }
.photo-edit .avatar { flex: none; box-shadow: 0 0 0 1px rgba(14,26,47,.06); }

.side { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { height: 64px; padding: 0 16px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); flex: none; }
.side-head h2 { font-size: 19px; font-weight: 650; }
.side-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 24px; }
.side-group { margin-top: 12px; }
.side-group:first-child { margin-top: 2px; }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.chan { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); cursor: pointer; text-decoration: none; color: inherit; transition: background-color 120ms ease; position: relative; }
.chan:hover { background: var(--sunken); }
.chan[aria-current="true"] { background: var(--blue-50); }
.chan[aria-current="true"] .chan-name { color: var(--blue-700); }
.chan-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--blue); }
.chan-ic.dm { border-radius: 50%; background: var(--blue-100); border: 0; color: var(--blue-700); font-weight: 650; font-size: 13px; }
.chan-ic.dm.brand { background: var(--blue); color: #fff; }
.chan-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.chan-sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan.unread .chan-name, .chan.unread .chan-sub { color: var(--ink); }
.chan.unread .chan-sub { font-weight: 520; }
.chan-meta { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: var(--ink-3); }
.online { position: absolute; left: 36px; top: 34px; width: 11px; height: 11px; border-radius: 50%; background: #1FA971; box-shadow: 0 0 0 2px var(--surface-2); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.main-head { height: 64px; padding: 0 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.main-head .title { min-width: 0; flex: 1; }
.main-head h1 { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-head .sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: none; }
.main-body { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.page { max-width: 1080px; margin: 0 auto; padding: 28px 28px 64px; }
.page.narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; }
.page-head p { color: var(--ink-3); margin-top: 4px; max-width: 60ch; }

/* ------------------------------------------------------------------- flöde */

.feed { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 4px; max-width: 920px; width: 100%; margin: 0 auto; }
.day { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.day::before, .day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 6px 8px; border-radius: var(--r); }
.msg.cont { padding-top: 0; }
.msg { position: relative; transition: background-color 120ms ease; }
.msg:has(.msg-del):hover { background: var(--surface); }
.msg-del { position: absolute; top: 4px; right: 6px; opacity: 0; color: var(--ink-3); transition: opacity 120ms ease, color 120ms ease, background-color 120ms ease; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
.msg-del:hover { color: var(--red); background: var(--red-50); }
@media (hover: none) { .msg-del { opacity: .55; } }
.removing { animation: removeit 260ms ease-in forwards; pointer-events: none; }
@keyframes removeit { to { opacity: 0; transform: scale(.98); } }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-head b { font-weight: 620; font-size: 14.5px; letter-spacing: -0.01em; }
.msg-head time { font-size: 12px; color: var(--ink-3); }
.msg-body { font-size: 15px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-body.deleted { color: var(--ink-3); font-style: italic; }
.msg.enter, .job.enter, .bubble-row.enter { animation: enter 360ms var(--ease-out) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.sys { align-self: center; display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); max-width: 100%; text-align: center; }
.sys .ic { color: var(--green); }

/* privat chatt: bubblor */
.bubble-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 2px 0; }
.bubble-row.me { align-items: flex-end; }
.bubble-meta { font-size: 12px; color: var(--ink-3); padding: 0 4px; margin-top: 8px; }
.bubble { max-width: min(560px, 82%); padding: 9px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-row.me .bubble { background: var(--blue); border-color: var(--blue); color: #fff; }
.bubble-row:not(.me) .bubble { border-bottom-left-radius: 6px; }
.bubble-row.me .bubble { border-bottom-right-radius: 6px; }
.jobref { display: flex; align-items: center; gap: 10px; max-width: min(560px, 82%); padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 13px; color: var(--ink-2); transition: border-color 140ms ease, background-color 140ms ease; text-align: left; }
.jobref:hover { border-color: var(--blue-200); background: var(--blue-50); }
.jobref .ic { color: var(--blue); }
.jobref b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- uppdragskort */

.job { --accent: var(--blue); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color 200ms ease; }
.job:hover { border-color: var(--line-2); }
.job.flash { animation: flash 1600ms var(--ease-out); }
/* Bokat: grön och låst. Pulsen spelas en gång när uppdraget precis blivit bokat. */
.job.is-booked { border-color: rgba(14, 122, 82, .45); }
.job.is-booked .job-foot { background: #F2FAF6; border-top-color: rgba(14, 122, 82, .15); }
.pill.mine .ic { width: 13px; height: 13px; }
.job.booked-anim { animation: booked 1300ms var(--ease-out); }
.job.booked-anim .pill.mine { animation: pop 420ms var(--ease-out) 120ms both; }
@keyframes booked {
  0% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
  25% { border-color: #34D399; box-shadow: 0 0 0 6px rgba(52, 211, 153, .28), 0 0 36px rgba(52, 211, 153, .3); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
/* Tacka nej: rött och bortskjutet, sedan hopfällt till en rad. */
.job.declining { animation: declining 380ms cubic-bezier(.55, 0, .7, .2) forwards; pointer-events: none; }
@keyframes declining {
  0% { border-color: var(--line); }
  35% { border-color: #E5847B; box-shadow: 0 0 0 4px rgba(191, 51, 40, .14); background: #FFF7F6; transform: translateX(0); opacity: 1; }
  100% { border-color: #E5847B; background: #FFF7F6; transform: translateX(56px) rotate(.6deg); opacity: 0; }
}
.job.is-declined.slim { background: #FFF9F8; border-color: #F3D2CE; }
.job.is-declined .job-slimrow .ic { color: var(--red); }
@keyframes flash { 0%, 30% { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); } }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.job-top .who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.job-top .who b { color: var(--ink); font-weight: 620; font-size: 14px; }
.job-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 12px 18px 16px; align-items: start; }
.job-title { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.job-pay { text-align: right; }
.job-pay .amount { font-size: 24px; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.job-pay .rate { font-size: 13px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 2px; }
.fact { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.fact .ic { color: var(--ink-3); width: 18px; height: 18px; }
.fact b { color: var(--ink); font-weight: 600; }
.job-desc { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; max-width: 70ch; white-space: pre-wrap; }

.locked { margin: 0 18px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2); display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.locked .ic { color: var(--ink-3); grid-row: span 2; }
.locked b { font-size: 13.5px; font-weight: 600; }
.locked span { font-size: 13px; color: var(--ink-3); }
.ghostlines { display: flex; gap: 8px; margin-top: 4px; }
.ghostlines i { height: 8px; border-radius: 4px; background: var(--line); display: block; }

.unlocked { margin: 0 18px; border-radius: var(--r); background: var(--green-50); padding: 4px 14px; display: grid; }
.unlocked .row { display: grid; grid-template-columns: 22px 120px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid rgba(14, 122, 82, .12); font-size: 14.5px; }
.unlocked .row:last-child { border-bottom: 0; }
.unlocked .row .ic { color: var(--green); margin-top: 2px; width: 18px; height: 18px; }
.unlocked .row span { color: var(--ink-3); font-size: 13.5px; padding-top: 1px; }
.unlocked .row b { font-weight: 600; overflow-wrap: anywhere; }
.unlocked .row a { font-weight: 600; }
.unlocked.neutral { background: var(--surface-2); border: 1px solid var(--line); }
.unlocked.neutral .row { border-bottom-color: var(--line); }
.unlocked.neutral .row .ic { color: var(--ink-3); }
.reveal .row { animation: reveal 520ms var(--ease-out) both; }
.reveal .row:nth-child(2) { animation-delay: 70ms; } .reveal .row:nth-child(3) { animation-delay: 140ms; }
.reveal .row:nth-child(4) { animation-delay: 210ms; } .reveal .row:nth-child(5) { animation-delay: 280ms; } .reveal .row:nth-child(6) { animation-delay: 350ms; }
@keyframes reveal { from { opacity: 0; filter: blur(6px); transform: translateY(4px); } }

.job-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-top: 14px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.job-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.adminbar { margin: 12px 18px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); padding: 10px 14px; border-radius: var(--r); background: var(--blue-50); }
.adminbar b { font-weight: 620; color: var(--ink); font-variant-numeric: tabular-nums; }

/* hopfällt kort (tagen av annan / nej tack) */
.job.slim .job-collapse { display: grid; grid-template-rows: 0fr; }
.job-collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 420ms var(--ease-io); }
.job-collapse > div { overflow: hidden; min-height: 0; }
.job-slimrow { display: none; align-items: center; gap: 12px; padding: 12px 18px; font-size: 14px; color: var(--ink-3); }
.job.slim { background: var(--surface-2); }
.job.slim .job-slimrow { display: flex; animation: enter 300ms var(--ease-out) both; }
.job.slim .job-slimrow b { color: var(--ink-2); font-weight: 600; }
.job-slimrow .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* anonyma tittare */
.faces { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); min-height: 28px; }
.face-stack { display: flex; }
.face { width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; margin-left: -7px; box-shadow: 0 0 0 2px var(--surface-2); position: relative; animation: facein 360ms var(--ease-out) both; }
.face:first-child { margin-left: 0; }
.face .ic { width: 16px; height: 16px; }
.face.t1 { background: #DCE6FD; color: #143CA2; } .face.t2 { background: #D5F0F4; color: #0B5F6E; }
.face.t3 { background: #E4E9F2; color: #3D4B63; } .face.t4 { background: #E3EEFF; color: #1849C4; }
.face.t5 { background: #DDF3EA; color: #0E7A52; } .face.t6 { background: #EDE8FB; color: #4936A8; }
.face.live::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: #1FA971; box-shadow: 0 0 0 2px var(--surface-2); animation: breathe 1.8s ease-in-out infinite; }
.face.me { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3.5px var(--blue-200); }
@keyframes facein { from { transform: scale(.7); opacity: 0; } }
.faces .live-txt { color: var(--green); font-weight: 560; }

/* ------------------------------------------------------------- komponerare */

.composer { padding: 12px 24px 18px; background: linear-gradient(to bottom, rgba(243,246,251,0), var(--bg) 30%); flex: none; }
.composer-box { max-width: 872px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); transition: border-color 140ms ease, box-shadow 140ms ease; }
.composer-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.composer textarea { flex: 1; border: 0; resize: none; min-height: 24px; max-height: 180px; padding: 8px 0; background: transparent; line-height: 1.5; font-size: 15px; }
.composer textarea:focus { outline: none; }
.composer .ref { max-width: 872px; margin: 0 auto 8px; }
.readonly-note { max-width: 872px; margin: 0 auto; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-3); padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); }

/* ------------------------------------------------------------ detaljpanel */

.panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; animation: panelin 340ms var(--ease-drawer); }
@keyframes panelin { from { transform: translateX(24px); opacity: 0; } }
.panel-head { height: 64px; padding: 0 12px 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); flex: none; gap: 10px; }
.panel-head h2 { font-size: 16px; font-weight: 650; }
.panel-body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 20px; align-content: start; }
.panel .job { border: 0; border-radius: 0; }
.panel .job-top, .panel .job-main { padding-left: 0; padding-right: 0; }
.panel .locked, .panel .unlocked, .panel .adminbar { margin-left: 0; margin-right: 0; }
.panel .job-foot { margin: 16px -20px 0; padding: 14px 20px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 560; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.section-title { font-size: 13px; font-weight: 620; color: var(--ink-2); margin-bottom: 10px; }
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; font-size: 13.5px; padding-bottom: 12px; position: relative; }
.timeline > div::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); margin: 7px 0 0 2px; }
.timeline > div::after { content: ''; position: absolute; left: 5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline > div:last-child::after { display: none; }
.timeline time { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- dialoger */

.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(14, 26, 47, .38); display: grid; place-items: center; padding: 20px; animation: fade 200ms ease both; }
.scrim.closing { animation: fadeout 160ms ease both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.dialog { width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--sh-dialog); animation: dlgin 280ms var(--ease-out) both; }
.dialog.wide { width: min(960px, 100%); }
.scrim.closing .dialog { animation: dlgout 160ms ease-in both; }
@keyframes dlgin { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes dlgout { to { opacity: 0; transform: scale(.98); } }
.dialog-head { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.dialog-head p { color: var(--ink-3); margin-top: 4px; font-size: 14.5px; }
.dialog-body:empty { display: none; }
.dialog-body { padding: 18px 24px; overflow-y: auto; display: grid; gap: 16px; }
.dialog-foot { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.dialog-foot .left { margin-right: auto; }
.summary { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.summary-row { display: grid; grid-template-columns: 26px 110px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; align-items: center; }
.summary-row:last-child { border-bottom: 0; }
.summary-row .ic { color: var(--ink-3); width: 18px; height: 18px; }
.summary-row span { color: var(--ink-3); font-size: 13.5px; }
.summary-row b { font-weight: 600; }
.summary-row.total { background: var(--blue-50); }
.summary-row.total b { font-size: 20px; letter-spacing: -0.02em; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.terms { max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.terms ol { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.terms p { margin-top: 10px; }

.done-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 24px 12px; }
.done-state svg.draw { width: 64px; height: 64px; }
.done-state svg.draw circle { fill: var(--green-50); stroke: var(--green); stroke-width: 3; stroke-dasharray: 190; stroke-dashoffset: 190; animation: drawc 520ms var(--ease-out) forwards; }
.done-state svg.draw path { fill: none; stroke: var(--green); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: drawc 360ms 380ms var(--ease-out) forwards; }
@keyframes drawc { to { stroke-dashoffset: 0; } }
.done-state h2 { font-size: 22px; }
.done-state p { color: var(--ink-3); max-width: 40ch; }

/* ---------------------------------------------------------- registrering */

.ob-photo { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.ob-photo b { display: block; font-weight: 620; font-size: 15px; }
.ob-photo small { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.ob-avatar { position: relative; flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer; overflow: hidden;
  background: var(--blue-50); border: 1.5px dashed var(--blue-200); color: var(--blue); font-size: 12px; font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out); }
.ob-avatar:hover { border-color: var(--blue); background: var(--blue-100); }
.ob-avatar:active { transform: scale(0.97); }
.ob-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: obin 420ms var(--ease-out) both; }
@keyframes obin { from { opacity: 0; transform: scale(1.06); filter: blur(4px); } }
.ob-avatar.has { border: 0; }
.ob-avatar .ob-change { position: absolute; inset: auto 0 0 0; height: 30px; display: none; align-items: center; justify-content: center; gap: 4px; background: rgba(14,26,47,.55); color: #fff; font-size: 11.5px; backdrop-filter: blur(4px); }
.ob-avatar.has .ob-change { display: flex; opacity: 0; transition: opacity 160ms ease; }
.ob-avatar.has:hover .ob-change, .ob-avatar.has:focus-visible .ob-change { opacity: 1; }
@media (hover: none) { .ob-avatar.has .ob-change { opacity: 1; } }
.ob-avatar.loading::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%231D56E0' stroke-width='2.5' stroke-dasharray='40 20'/%3E%3C/svg%3E") center / 26px no-repeat; animation: spin 700ms linear infinite; }
.ob-left { font-size: 13px; margin-right: 4px; align-self: center; }

/* -------------------------------------------------------------------- toast */

.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 14px 14px 16px; background: var(--ink); color: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-pop); animation: toastin 360ms var(--ease-out) both; cursor: pointer; }
.toast.out { animation: toastout 200ms ease-in both; }
.toast .ic { color: #9DB8FF; margin-top: 1px; }
.toast b { display: block; font-weight: 620; font-size: 14.5px; }
.toast span { font-size: 13.5px; color: #C5CFDE; }
.toast.err { background: #fff; color: var(--ink); border: 1px solid #F0C2BD; }
.toast.err .ic { color: var(--red); }
.toast.err span { color: var(--ink-2); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- listor/tabell */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-pad { padding: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table th:first-child { border-top-left-radius: var(--r-lg); } .table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background-color 120ms ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 600; }
.table-wrap { overflow-x: auto; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; color: var(--ink-3); }
.empty .ic { width: 36px; height: 36px; color: var(--blue-200); }
.empty b { color: var(--ink); font-size: 16px; font-weight: 620; }
.empty p { max-width: 42ch; font-size: 14.5px; }

.notif { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color 120ms ease; align-items: start; }
.notif:hover { background: var(--surface-2); }
.notif:last-child { border-bottom: 0; }
.notif .nic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-content: center; background: var(--blue-50); color: var(--blue); }
.notif .nic.green { background: var(--green-50); color: var(--green); }
.notif .nic.amber { background: var(--amber-50); color: var(--amber); }
.notif .nic.red { background: var(--red-50); color: var(--red); }
.notif b { font-weight: 620; font-size: 14.5px; display: block; }
.notif span { color: var(--ink-2); font-size: 14px; }
.notif time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.notif.unread { background: #F7FAFF; }
.notif.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: 8px; vertical-align: middle; }

.firm-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.firm-card:last-child { border-bottom: 0; }
.firm-card h3 { font-size: 15.5px; font-weight: 620; letter-spacing: -0.01em; }
.firm-card .meta { font-size: 13.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--sunken); font-size: 12.5px; font-weight: 560; color: var(--ink-2); }
.chip .ic { width: 13px; height: 13px; color: var(--ink-3); }
.chip-toggle { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.chip-toggle[aria-pressed="true"] { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }
.chip-toggle[aria-pressed="true"] .ic { color: var(--blue); }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px; }
.stat b { display: block; font-size: 22px; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------------- nytt uppdrag */

.composer-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.form-section { display: grid; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.form-section:first-child { padding-top: 0; }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { font-size: 15px; font-weight: 640; display: flex; align-items: center; gap: 8px; }
.form-section h3 .ic { color: var(--ink-3); width: 18px; height: 18px; }
.form-section h3 .pill { margin-left: auto; }
.calc { position: sticky; top: 0; display: grid; gap: 14px; }
.calc-opt { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; transition: border-color 200ms ease, background-color 200ms ease; }
.calc-opt.win { border-color: var(--blue-200); background: var(--blue-50); }
.calc-opt .top { display: flex; justify-content: space-between; align-items: center; font-weight: 620; font-size: 14px; }
.calc-opt .m { font-size: 20px; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-opt small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.preview-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
@media (max-width: 1100px) { .composer-form { grid-template-columns: 1fr; } .calc { position: static; } }

/* --------------------------------------------------------------- kalender */

.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { font-size: 20px; font-weight: 650; min-width: 180px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cal-day { background: var(--surface); min-height: 112px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.other { background: var(--surface-2); }
.cal-day.other .d { color: #9AA6B8; }
.cal-day .d { font-size: 13px; font-weight: 600; color: var(--ink-2); width: 26px; height: 26px; display: grid; place-content: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-day.today .d { background: var(--blue); color: #fff; }
.cal-ev { display: block; text-align: left; border: 0; width: 100%; padding: 5px 8px; border-radius: 7px; background: var(--green-50); color: var(--green); font-size: 12.5px; font-weight: 580; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter 120ms ease; }
.cal-ev:hover { filter: brightness(.97); }
.cal-ev.open { background: var(--blue-50); color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue-200); }
.cal-ev.done { background: var(--sunken); color: var(--ink-2); }
.cal-ev time { font-variant-numeric: tabular-nums; opacity: .8; margin-right: 4px; }
.agenda { display: grid; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color 140ms ease; }
.agenda-item:hover { border-color: var(--blue-200); }
.agenda-date { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.agenda-date b { display: block; font-size: 24px; font-weight: 680; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.agenda-date span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.agenda-item h4 { font-size: 15px; font-weight: 620; }
.agenda-item p { font-size: 13.5px; color: var(--ink-3); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .cal-layout { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- inloggning */

.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-form { display: flex; flex-direction: column; padding: 32px clamp(24px, 6vw, 88px); background: var(--surface); }
.auth-form .wordmark { display: flex; align-items: center; gap: 10px; font-weight: 680; font-size: 20px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.auth-form .wordmark .brand-tile { margin: 0; width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
.auth-inner { margin: auto 0; width: 100%; max-width: 400px; padding: 48px 0; display: grid; gap: 22px; }
.auth-inner h1 { font-size: clamp(28px, 3.2vw, 36px); font-weight: 680; letter-spacing: -0.035em; line-height: 1.08; }
.auth-inner > p { color: var(--ink-3); font-size: 15.5px; margin-top: -10px; }
.auth-foot { font-size: 13px; color: var(--ink-3); }
.alert { padding: 11px 14px; border-radius: var(--r); background: var(--red-50); color: #8E231B; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.ok { background: var(--green-50); color: #0A5C3D; }
.auth-art { position: relative; overflow: hidden; background: var(--blue); color: #fff; display: grid; place-items: center; padding: 48px; isolation: isolate; }
.auth-art::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(900px 520px at 85% -10%, #4C7DF0 0%, transparent 60%), radial-gradient(700px 600px at -10% 110%, #123A9C 0%, transparent 60%), var(--blue); }
.auth-art .stage { width: min(460px, 100%); display: grid; gap: 14px; }
.auth-art .caption { font-size: 15px; color: #DCE6FD; max-width: 38ch; line-height: 1.55; }
.auth-art .caption b { color: #fff; font-weight: 620; display: block; font-size: 22px; letter-spacing: -0.025em; margin-bottom: 6px; line-height: 1.2; }
.demo .job { border: 0; border-radius: 0; }
.demo-chat { display: grid; gap: 8px; }
.demo-chat .note { justify-self: start; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); color: #fff; padding: 9px 14px; border-radius: 14px 14px 14px 6px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.demo-chat .note.in { opacity: 1; transform: none; }
/* Exempeldemon på inloggningssidan: pekare → Tacka ja → bekräfta → grönt och upplåst. */
.demo-frame { position: relative; display: grid; gap: 12px; }
.demo-tag { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #DCE6FD; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; background: #fff; color: var(--blue-700); font-weight: 680; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 18px -6px rgba(6,20,60,.5); }
.demo-pause { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; display: grid; place-content: center; cursor: pointer; transition: background-color 180ms ease; }
.demo-pause:hover { background: rgba(255,255,255,.22); }
.demo-pause .ic:last-child, .demo-frame.is-paused .demo-pause .ic:first-child { display: none; }
.demo-frame.is-paused .demo-pause .ic:last-child { display: block; }
.demo { position: relative; color: var(--ink); transition: opacity 400ms ease; }
.demo.fading { opacity: 0; }
.demo .job { border: 0; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(6, 20, 60, .5); transition: transform 300ms var(--ease-out), box-shadow 450ms ease; }
.demo-job.is-hover { transform: translateY(-3px); box-shadow: 0 0 0 3px rgba(255,255,255,.45), 0 36px 70px -20px rgba(6, 20, 60, .55); }
.demo-job.is-done { box-shadow: 0 0 0 3px #34D399, 0 0 0 9px rgba(52,211,153,.22), 0 36px 70px -20px rgba(6, 40, 30, .5); }
.demo-pill .t-done, .demo-job.is-done .demo-pill .t-open { display: none; }
.demo-job.is-done .demo-pill .t-done { display: inline; }
.demo-job.is-done .demo-pill { background: var(--green-50); color: var(--green); animation: pop 380ms var(--ease-out); }
.demo-lock { display: grid; margin: 0 18px; }
.demo-lock > * { grid-area: 1 / 1; margin: 0 !important; }
.demo-locked { transition: opacity 280ms ease, filter 280ms ease, transform 280ms ease; }
.demo-unlocked { opacity: 0; visibility: hidden; }
.demo-unlocked .row { padding: 6px 0; font-size: 13.5px; grid-template-columns: 22px 64px minmax(0, 1fr); }
.demo-job.is-done .demo-locked { opacity: 0; filter: blur(4px); transform: scale(.98); }
.demo-job.is-done .demo-unlocked { opacity: 1; visibility: visible; }
.demo-job.is-done .demo-unlocked .row { animation: reveal 520ms var(--ease-out) both; }
.demo-job.is-done .demo-unlocked .row:nth-child(2) { animation-delay: 90ms; }
.demo-job.is-done .demo-unlocked .row:nth-child(3) { animation-delay: 180ms; }
.demo .job-foot { margin-top: 14px; min-height: 64px; }
.demo .job-foot { flex-wrap: nowrap; }
.demo .faces { transition: opacity 220ms ease; }
.demo-job.confirming .faces { opacity: 0; }
.demo-actions { position: relative; margin-left: auto; }
.demo-a2 { position: absolute; top: 0; bottom: 0; right: 0; white-space: nowrap; }
.demo-actions > div { display: flex; align-items: center; gap: 8px; justify-content: flex-end; transition: opacity 220ms ease, transform 300ms var(--ease-out); }
.demo-a2 { opacity: 0; transform: translateY(8px); pointer-events: none; }
.demo-job.confirming .demo-a1 { opacity: 0; transform: translateY(-8px); }
.demo-job.confirming .demo-a2 { opacity: 1; transform: none; }
.demo .btn { transition: transform 140ms var(--ease-out), background-color 300ms ease, box-shadow 300ms ease; }
.demo .btn.is-hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(29,86,224,.6); }
.demo .btn.pressed { transform: scale(.95); }
.demo-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.demo-check span { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-content: center; transition: background-color 160ms ease, border-color 160ms ease; }
.demo-check.on span { background: var(--blue); border-color: var(--blue); }
.demo-check.on span::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); margin-top: -2px; animation: pop 220ms var(--ease-out); }
.demo-confirm { position: relative; min-width: 104px; overflow: hidden; }
.demo-confirm .spin, .demo-confirm .done { position: absolute; inset: 0; margin: auto; }
.demo-confirm .spin { display: block; width: 15px; height: 15px; opacity: 0; transition: opacity 180ms; }
.demo-confirm .done { display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; transform: translateY(12px); transition: opacity 260ms, transform 450ms var(--ease-out); }
.demo-confirm .done path { stroke-dasharray: 26; stroke-dashoffset: 26; transition: stroke-dashoffset 450ms ease 160ms; }
.demo-confirm .lbl { transition: opacity 180ms, transform 300ms var(--ease-out); }
.demo-confirm.is-pending .lbl, .demo-confirm.is-done .lbl { opacity: 0; transform: translateY(-12px); }
.demo-confirm.is-pending .spin { opacity: 1; }
.demo-confirm.is-done { background: #0B6845; box-shadow: 0 0 0 4px rgba(52,211,153,.3); }
.demo-confirm.is-done .done { opacity: 1; transform: none; }
.demo-confirm.is-done .done path { stroke-dashoffset: 0; }
.demo-cursor { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; opacity: 0; margin: -3px 0 0 -5px; transition: transform 850ms cubic-bezier(.65,0,.35,1), opacity 300ms ease; filter: drop-shadow(0 3px 6px rgba(6,20,60,.35)); }
.demo-cursor.show { opacity: 1; }
.demo-cursor svg { display: block; transition: transform 140ms ease; transform-origin: 5px 3px; }
.demo-cursor.press svg { transform: scale(.8); }
.demo-ripple { position: absolute; left: 0; top: 0; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(29,86,224,.35); pointer-events: none; animation: ripple 650ms ease-out forwards; }
@keyframes ripple { from { scale: 0; opacity: .6; } to { scale: 3.2; opacity: 0; } }
.demo-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.3; color: rgba(220,230,253,.7); padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease; }
.demo-steps i { font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-content: center; font-size: 11.5px; font-weight: 680; background: rgba(255,255,255,.14); color: #fff; transition: background-color 300ms ease, color 300ms ease; }
.demo-steps li.on { background: #fff; color: var(--ink); border-color: #fff; }
.demo-steps li.on i { background: var(--blue); }
.demo-steps li.done { color: #fff; }
.demo-steps li.done i { background: #34D399; color: #04140B; }
.demo-steps li:last-child.on i, .demo-steps li:last-child.done i { background: #34D399; color: #04140B; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 36px 16px 44px; }
  .auth-art .caption b { font-size: 19px; }
  .demo-steps { grid-template-columns: 1fr; }
  .demo .job-main { grid-template-columns: minmax(0, 1fr) auto; }
  .demo .job-pay { text-align: right; display: block; }
  .demo .job-foot { flex-direction: row; align-items: center; }
  .demo .job-foot .faces { display: none; }
}

/* ------------------------------------------------------------- mobil */

.tabbar { display: none; }
@media (max-width: 1100px) {
  :root { --side: 280px; --panel: 380px; }
}
@media (max-width: 900px) {
  .app, .app.panel-open, .app.wide, .app.wide.panel-open { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { display: none; }
  .side { display: none; grid-row: 1; border-right: 0; }
  .main { grid-row: 1; }
  .app.show-side .side { display: flex; }
  .app.show-side .main { display: none; }
  .back { display: inline-flex; }
  .panel { position: fixed; inset: 0; z-index: 40; border-left: 0; animation: sheetin 380ms var(--ease-drawer); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheetin { from { transform: translateY(100%); } }
  .panel.closing { animation: sheetout 240ms ease-in both; }
  @keyframes sheetout { to { transform: translateY(100%); } }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-row: 2; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
  .tabbar .rail-btn { width: auto; padding: 6px 0; }
  .tabbar .rail-btn[aria-current="page"]::before { left: 30%; right: 30%; top: -7px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .tabbar .rail-btn .badge { right: calc(50% - 22px); }
  .feed { padding: 14px 12px 16px; }
  .composer { padding: 8px 12px calc(10px); }
  .page { padding: 20px 16px 48px; }
  .main-head, .side-head { padding: 0 12px 0 16px; height: 58px; }
  .job-main { grid-template-columns: 1fr; }
  .job-pay { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .job-foot { flex-direction: column; align-items: stretch; }
  .job-actions { margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .job-actions .btn.primary, .job-actions .btn.success { grid-column: 1 / -1; order: -1; min-height: 46px; }
  .unlocked .row { grid-template-columns: 22px 92px minmax(0, 1fr); }
  .dialog { border-radius: 18px 18px 0 0; align-self: end; max-height: 92dvh; }
  .scrim { padding: 0; place-items: end stretch; }
  .dialog { width: 100%; animation: sheetin 340ms var(--ease-drawer) both; }
  .scrim.closing .dialog { animation: sheetout 200ms ease-in both; }
  .dialog-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .dialog-foot .btn { flex: 1; }
  .cal-grid { display: none; }
  .toasts { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
  .firm-card { grid-template-columns: auto 1fr; }
  .firm-card > :last-child { grid-column: 1 / -1; }
  .table-mobile-hide { display: none; }
}
@media (min-width: 901px) { .cal-mobile-only { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
