/* Skvalberget Portal – samma grafiska profil som skvalberget.se
   Grafit #1E2124 · text #3A4047 · yta #F3F4F5 · accent bygg-amber #C2853B */

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/archivo-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/archivo-latin-ext-wght-normal.woff2) format("woff2-variations");
  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: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --g900: #1e2124;
  --g800: #2a2e33;
  --g700: #3a4047;
  --g500: #6b7178;
  --g300: #d5d8dc;
  --g200: #e6e8ea;
  --g100: #f3f4f5;
  --white: #fff;
  --accent: #c2853b;
  --accent-hover: #a66e2c;
  --accent-soft: #f1e4ce;
  --ok: #2f7d4f;
  --ok-soft: #e3f1e8;
  --err: #b4332f;
  --err-soft: #f8e3e2;
  --warn-soft: #fbf1df;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 33, 36, 0.06), 0 4px 14px rgba(30, 33, 36, 0.05);
  --font: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-h: "Archivo Variable", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--g100);
  color: var(--g700);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-h); color: var(--g900); letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--g900); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.muted { color: var(--g500); }
.small { font-size: .85rem; }
.center { text-align: center; }
.eyebrow { font-family: var(--font-h); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 600; color: var(--accent); margin-bottom: .4rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ── Topp ───────────────────────── */
.top { background: var(--g900); color: #fff; position: sticky; top: 0; z-index: 20; }
.top__inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand__logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-h); }
.brand__text strong { font-size: 1rem; }
.brand__text span { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.mainnav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { color: #c9ccd0; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: .92rem; white-space: nowrap; }
.mainnav a:hover { color: #fff; background: var(--g800); }
.mainnav a.is-active { color: #fff; background: var(--g800); box-shadow: inset 0 -2px 0 var(--accent); }
.top__home { color: #c9ccd0; margin-left: auto; font-size: .9rem; text-decoration: none; }
.top__home:hover { color: #fff; }
.usermenu { position: relative; margin-left: auto; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #fff; padding: 4px; border-radius: 999px; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; font-family: var(--font-h); }
.usermenu__name { font-size: .88rem; }
.usermenu__panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--white); color: var(--g700); border: 1px solid var(--g300); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.usermenu__panel a, .usermenu__panel .linklike { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; text-align: left; width: 100%; font-size: .92rem; }
.usermenu__panel a:hover, .usermenu__panel .linklike:hover { background: var(--g100); }
.usermenu__panel p { padding: 4px 10px 8px; border-bottom: 1px solid var(--g200); margin-bottom: 6px; }
.devbar { background: var(--accent-soft); color: var(--g900); text-align: center; font-size: .82rem; padding: 6px 16px; }

/* ── Layout ─────────────────────── */
.main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.foot { text-align: center; font-size: .78rem; color: var(--g500); padding: 20px 16px 28px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.pagehead h1 { margin: 0; }
.pagehead p { margin: 4px 0 0; }
.crumbs { font-size: .85rem; color: var(--g500); margin-bottom: 6px; }
.crumbs a { color: var(--g500); }
.card { background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card, .card + .grid, .grid + .card { margin-top: 20px; }
.card h2 { margin-bottom: 14px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__head h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack > * + * { margin-top: 12px; }

/* ── Startkort ───────────────────── */
.tile { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.tile:hover { border-color: var(--g300); transform: translateY(-1px); color: inherit; }
.tile:hover::before { opacity: 1; }
.tile h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--g500); font-size: .9rem; }
.tile__num { font-family: var(--font-h); font-size: 2rem; font-weight: 800; color: var(--g900); line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.tile__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ── Flikar ──────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--g300); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; text-decoration: none; color: var(--g500); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--g900); }
.tab.is-active { color: var(--g900); border-bottom-color: var(--accent); }
.tab__count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--g200); color: var(--g700); font-size: .75rem; text-align: center; }
.tab.is-active .tab__count { background: var(--accent-soft); color: var(--g900); }

/* ── Knappar ─────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .9rem/1 var(--font); padding: 11px 16px; border-radius: 8px; border: 1px solid var(--g300); background: var(--white); color: var(--g900); text-decoration: none; cursor: pointer; min-height: 42px; white-space: nowrap; }
.btn:hover { border-color: var(--g500); color: var(--g900); }
.btn--primary { background: var(--g900); border-color: var(--g900); color: #fff; }
.btn--primary:hover { background: var(--g800); color: #fff; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn--danger { color: var(--err); }
.btn--danger:hover { border-color: var(--err); color: var(--err); }
.btn--sm { padding: 7px 11px; min-height: 34px; font-size: .82rem; }
.btn--block { width: 100%; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--g900); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
form.inline { display: inline; }

/* ── Formulär ───────────────────── */
.form { display: grid; gap: 14px; }
.form--2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .86rem; color: var(--g900); }
label .hint { font-weight: 400; color: var(--g500); font-size: .8rem; }
input, select, textarea { font: 400 1rem/1.4 var(--font); color: var(--g900); background: var(--white); border: 1px solid var(--g300); border-radius: 8px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex-shrink: 0; }
.checkline { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
fieldset { border: 1px solid var(--g200); border-radius: var(--radius); padding: 16px; margin: 0; }
legend { font-family: var(--font-h); font-weight: 700; color: var(--g900); padding: 0 6px; }
.formactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 6px; }

/* ── Tabeller ───────────────────── */
.tablewrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th { text-align: left; font-weight: 600; color: var(--g500); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--g300); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--g200); vertical-align: middle; }
tbody tr:hover td { background: #fafafa; }
th.th-wrap { white-space: normal; min-width: 84px; max-width: 110px; line-height: 1.3; }
tfoot td { font-weight: 700; color: var(--g900); border-top: 1px solid var(--g300); border-bottom: 0; }
td a.rowlink { font-weight: 600; text-decoration: none; }
td a.rowlink:hover { text-decoration: underline; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--g200); color: var(--g700); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: #8a5a17; }
.badge--err { background: var(--err-soft); color: var(--err); }
.badge--accent { background: var(--accent-soft); color: #7a4f1b; }
.chk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; font-weight: 800; color: #fff; }
.chk--ok { background: var(--ok); }
.chk--no { background: var(--err); }

/* ── Meddelanden & tomt ─────────── */
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.flash--ok { background: var(--ok-soft); color: #1f5a37; border-color: #c7e3d1; }
.flash--error { background: var(--err-soft); color: #8b2522; border-color: #efc9c7; }
.flash--info { background: var(--warn-soft); color: #6d4712; border-color: #f0dcb8; }
.secret { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.3rem; letter-spacing: .06em; background: var(--g900); color: #fff; padding: 10px 14px; border-radius: 8px; display: inline-block; margin: 6px 0; user-select: all; }
.empty { text-align: center; padding: 36px 16px; color: var(--g500); border: 1px dashed var(--g300); border-radius: var(--radius); background: #fcfcfc; }
.empty p { margin-bottom: 12px; }

/* ── Inloggning ─────────────────── */
.auth { display: grid; place-items: center; min-height: calc(100vh - 220px); }
.auth__card { width: 100%; max-width: 420px; padding: 32px 28px; }
.auth__card h1 { margin-bottom: 6px; }

/* ── Projekt & dagbok ───────────── */
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pcard { background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; color: var(--g700); }
.pcard:hover { border-color: var(--accent); color: var(--g700); }
.pcard__top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pcard h3 { margin: 0; font-size: 1.05rem; }
.pcard__meta { font-size: .85rem; color: var(--g500); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pcard__foot { display: flex; gap: 16px; font-size: .82rem; color: var(--g500); border-top: 1px solid var(--g200); padding-top: 10px; margin-top: auto; }
.pcard__foot strong { color: var(--g900); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); font-weight: 600; }
.facts dd { margin: 2px 0 0; color: var(--g900); font-weight: 500; }
.diary { border: 1px solid var(--g200); border-radius: var(--radius); background: var(--white); }
.diary + .diary { margin-top: 12px; }
.diary__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--g200); background: #fbfbfb; border-radius: var(--radius) var(--radius) 0 0; }
.diary__head h3 { margin: 0; }
.diary__body { padding: 14px 16px; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.diary__body h4 { margin: 0 0 2px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); }
.diary__body p { margin: 0; white-space: pre-line; color: var(--g900); }
.weeknav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weeknav strong { font-family: var(--font-h); color: var(--g900); min-width: 140px; text-align: center; }
.teamlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; max-height: 280px; overflow-y: auto; border: 1px solid var(--g200); border-radius: 8px; padding: 12px; background: #fcfcfc; }
.teamlist .checkline { font-size: .9rem; }
.sumrow td { background: #fafafa; }
.cell-abs { color: #8a5a17; font-weight: 600; }
.searchbox { position: relative; }
.searchbox input { font-size: 1rem; min-height: 46px; }
.searchbox svg + input { padding-left: 40px; }
.searchbox svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--g500); }
.is-hidden { display: none !important; }

/* ── Personfoton ─────────────────── */
.pavatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--g200); color: var(--g700); font-family: var(--font-h); font-weight: 700; }
.pavatar--sm { width: 30px; height: 30px; font-size: .68rem; }
.pavatar--lg { width: 112px; height: 112px; font-size: 1.8rem; border: 3px solid #fff; box-shadow: var(--shadow); }
.pavatar--empty { background: var(--accent-soft); color: #7a4f1b; }
.namecell { display: inline-flex; align-items: center; gap: 10px; }
.personhead { display: flex; gap: 20px; align-items: center; }
.personhead__photo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photoform__pick { position: relative; overflow: hidden; cursor: pointer; }
.photoform__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photoform__pick.is-busy { opacity: .6; pointer-events: none; }

/* ── Dagbok ─────────────────────── */
.diarytop { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 20px; margin-bottom: 20px; }
.card--tight { padding: 16px; }
.facts--boxed { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--g200); border-radius: 8px; overflow: hidden; }
.facts--boxed > div { padding: 10px 12px; border-right: 1px solid var(--g200); border-bottom: 1px solid var(--g200); margin-right: -1px; margin-bottom: -1px; }
.kpis--wide { margin: 0 0 20px; }
.kpis--wide > div { background: var(--white); border: 1px solid var(--g200); box-shadow: var(--shadow); padding: 14px 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.kpis > div { background: var(--g100); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.kpis span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); font-weight: 600; }
.kpis strong { font-family: var(--font-h); font-size: 1.5rem; color: var(--g900); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpis small { color: var(--g500); font-size: .78rem; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__head strong { font-family: var(--font-h); color: var(--g900); }
.cal__grid { table-layout: fixed; }
.cal__grid th { text-align: center; padding: 4px 0; border: 0; font-size: .7rem; }
.cal__grid td { padding: 2px; border: 0; text-align: center; }
.cal__grid tbody tr:hover td { background: none; }
.cal__day { display: grid; place-items: center; height: 34px; border-radius: 6px; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--g700); font-variant-numeric: tabular-nums; }
.cal__day:hover { outline: 2px solid var(--g300); color: var(--g900); }
.cal__day--out { color: var(--g300); font-weight: 400; }
.cal__day.is-today { box-shadow: inset 0 0 0 2px var(--g900); }
.cal__day.is-selected { outline: 3px solid var(--accent); outline-offset: 1px; }
.st-done { background: #cfe9b8; color: #24521a; }
.st-more_diary { background: #f6e8a3; color: #6b5300; }
.st-more_time { background: #f6c58f; color: #7a3b00; }
.st-missing { background: #f1b5b2; color: #7d1c18; }
.cal__legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: .74rem; color: var(--g500); }
.cal__legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
table.rows td { padding: 6px 6px; }
table.rows th { padding: 8px 6px; }
table.rows input:not([type=checkbox]), table.rows select { min-height: 38px; padding: 7px 9px; font-size: .92rem; }
.input--sm { max-width: 120px; }
#setall { width: 80px; min-height: 34px; padding: 5px 8px; }
.w-moment { width: 26%; }
.meter { height: 8px; background: var(--g200); border-radius: 999px; overflow: hidden; width: 140px; margin-bottom: 3px; }
.meter span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; }
.meter span.over { background: var(--err); }
.inlineedit { display: flex; gap: 6px; align-items: center; }
.inlineedit input { min-height: 36px; padding: 6px 9px; }
.inlineedit input:first-of-type { min-width: 180px; }
tr.is-dim td { opacity: .6; }
tr.is-current td { background: var(--accent-soft) !important; }
tr.is-weekend td { background: #f7f7f8; }
.yeartable td, .yeartable th { padding: 9px 10px; }
.w-hours { width: 96px; } .w-pct { width: 110px; } .w-no { width: 110px; } .w-kind { width: 170px; }
.btn--icon { width: 34px; padding: 0; color: var(--g500); }
.btn--icon:hover { color: var(--err); border-color: var(--err); }
.addrow { display: flex; gap: 8px; margin-top: 12px; max-width: 560px; }
.addrow select { flex: 1; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; background: rgba(243,244,245,.94); backdrop-filter: blur(4px); border-top: 1px solid var(--g300); padding: 12px 0; margin-top: 8px; }
.bal-ok { color: var(--ok); font-weight: 600; }
.bal-warn { color: #8a5a17; font-weight: 600; }
.form--3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex-direction: row; font-weight: 500; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 7px 13px; border: 1px solid var(--g300); border-radius: 999px; cursor: pointer; font-size: .88rem; background: var(--white); }
.chip input:checked + span { background: var(--g900); border-color: var(--g900); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--g300); border-radius: 999px; font-size: .74rem; white-space: nowrap; color: var(--g700); background: var(--white); }
.monthgrid { font-size: .82rem; }
.monthgrid th, .monthgrid td { padding: 6px 4px; text-align: center; border: 1px solid var(--g200); }
.monthgrid th { font-size: .68rem; letter-spacing: 0; }
.monthgrid td.name, .monthgrid th.name { text-align: left; white-space: nowrap; padding-left: 8px; }
.monthgrid .we { background: #f7f7f8; }
.monthgrid a { text-decoration: none; display: block; color: inherit; }
.monthgrid a:hover { color: var(--accent-hover); }
.monthgrid .tot { font-weight: 700; color: var(--g900); }
.monthgrid .abs { color: #8a5a17; font-weight: 600; font-size: .72rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

@media (max-width: 900px) {
  .diarytop { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 1.45rem; }
  .top__inner { gap: 10px; }
  .brand__text { display: none; }
  .usermenu__name { display: none; }
  .card { padding: 16px; }
  .tablewrap { margin: 0 -16px; padding: 0 16px; }
  .main { padding-top: 20px; }
  .hide-sm { display: none; }
  #staff td.nowrap { white-space: normal; }
  #staff .input--sm { max-width: 76px; }
  #staff select.input--sm { max-width: 110px; }
}
.namecell span { white-space: nowrap; }
@media (max-width: 1100px) { .hide-md { display: none; } }

/* Personallista utan sidscroll */
table.fixedlist { table-layout: fixed; width: 100%; }
table.fixedlist td, table.fixedlist th { padding: 9px 8px; }
table.fixedlist .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.fixedlist .namecell { max-width: 100%; }
table.fixedlist .namecell span { overflow: hidden; text-overflow: ellipsis; }
col.c-nr { width: 76px; } col.c-name { width: 26%; } col.c-title { width: 11%; } col.c-phone { width: 13%; }
col.c-mail { width: 20%; } col.c-chk { width: 46px; } col.c-status { width: 92px; } col.c-act { width: 76px; }
.rowacts { display: inline-flex; gap: 4px; }
.iconbtn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--g300); background: var(--white); color: var(--g700); cursor: pointer; }
.iconbtn:hover { border-color: var(--g700); color: var(--g900); }
.iconbtn--danger:hover { border-color: var(--err); color: var(--err); }
.btnrow a.is-on { font-weight: 700; color: var(--g900); text-decoration: none; }
@media (max-width: 720px) { .fixedlist col.hide-sm { display: none; } col.c-name { width: auto; } }

/* ÄTA */
@media (min-width: 760px) { .form .span2 { grid-column: span 2; } }
.w-date { width: 150px; } .w-qty { width: 90px; } .w-unit { width: 90px; } .w-price { width: 120px; } .w-sum { width: 130px; }
#mat td.js-rowsum { white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
#mat tfoot td { font-weight: 600; }
.atatable .c-no { width: 70px; }
.card__head label.markupfield { display: inline-flex; flex-direction: row; margin: 0; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--g700); }
.card__head label.markupfield input { margin: 0; width: 72px; min-height: 34px; padding: 5px 8px; text-align: right; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain[disabled] input, fieldset.plain[disabled] textarea, fieldset.plain[disabled] select { background: var(--g100); color: var(--g900); }

/* Behörigheter */
.access { display: grid; gap: 14px; }
.access__preset { max-width: 520px; }
.access__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; transition: opacity .15s; }
.access__groups.is-dim { opacity: .55; }
.access__group { border: 1px solid var(--g200); border-radius: 10px; padding: 12px 14px 8px; margin: 0; min-width: 0; }
.access__group legend { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); padding: 0 6px; }
.access__group .checkline { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 7px 0; font-weight: 500; }
.access__group .checkline input { margin-top: 3px; flex: none; }
.access__item > span { display: flex; flex-direction: column; gap: 1px; }
.access__projects { max-height: 320px; overflow: auto; }
tr.is-opening td { background: var(--accent-soft, #f6eadb); font-weight: 600; }
tr.subrow td { padding-top: 2px; padding-bottom: 6px; border-bottom-color: transparent; font-size: .82rem; }
tr.is-paylocked td { background: #f3f8f3; }

/* ───── Lön & tid ───── */
.segtabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--g100); border-radius: 10px; }
.segtabs a { padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--g700); font-size: .9rem; }
.segtabs a.is-on { background: var(--g900); color: #fff; }
.segtabs--sm a { padding: 5px 11px; font-size: .82rem; }
.payfilter { display: grid; gap: 14px; }
.payfilter__row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 14px; align-items: end; }
.stepper { display: flex; align-items: flex-end; gap: 6px; }
.stepper label { flex: 1; min-width: 0; }
.stepper select { width: 100%; }
.stepper__btn { flex: none; display: grid; place-items: center; width: 38px; height: 44px; border-radius: 8px; text-decoration: none; font-size: 1.2rem; color: var(--g500); }
.stepper__btn:hover { background: var(--g100); color: var(--g900); }
.stepper__btn.is-off { opacity: .3; pointer-events: none; }
@media (max-width: 820px) { .payfilter__row { grid-template-columns: 1fr; } }
.payhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--g200); padding-bottom: 12px; margin-bottom: 14px; }
.payhead h2 { margin: 0; }
.payhead__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.payhead__note { margin: -6px 0 12px; }
.lockbtn { font: inherit; font-weight: 700; font-size: .88rem; padding: 7px 14px; border-radius: 8px; cursor: pointer; border: 1px solid #e3c48f; background: var(--warn-soft); color: #8a5a17; }
.lockbtn.is-locked { border-color: #9fd0b2; background: var(--ok-soft); color: var(--ok); }
.payperson { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 24px; margin-bottom: 16px; }
@media (max-width: 760px) { .payperson { grid-template-columns: 1fr; } }
.paycal table { border-collapse: collapse; width: 100%; }
.paycal th { font-size: .66rem; color: var(--g500); font-weight: 700; padding: 2px; text-align: center; }
.paycal th.wk { color: var(--g500); font-weight: 600; font-size: .66rem; }
.paycal td { padding: 2px; text-align: center; }
.pc { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: .85rem; color: var(--g900); }
.pc--out { color: var(--g300); }
.pc--we { color: var(--err); }
.pc--work { background: #7fc68c; color: #0f3d1d; font-weight: 600; }
.pc--abs { background: #f2c27b; color: #5a3a08; font-weight: 600; }
.paycal .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin: 0 3px 0 8px; }
.payinfo { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-content: start; }
.payinfo .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.payinfo .paycomment { grid-column: 1 / -1; display: grid; gap: 8px; }
.paytitle { text-align: center; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g700); margin: 18px 0 8px; }
.paygrid { border-collapse: collapse; width: 100%; font-size: .8rem; font-variant-numeric: tabular-nums; }
.paygrid th, .paygrid td { border: 1px solid var(--g200); padding: 4px 3px; text-align: center; white-space: nowrap; }
.paygrid thead th { background: var(--g100); color: var(--g900); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: .74rem; }
.paygrid .pg-day { min-width: 26px; line-height: 1.15; }
.paygrid .is-sun, .paygrid .is-sat { color: var(--err); }
.paygrid td.is-we { background: #fafafa; }
.paygrid .pg-who { text-align: left; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.paygrid .pg-proj { text-align: left; font-weight: 600; }
.paygrid .pg-tot { font-weight: 700; min-width: 70px; }
.paygrid tfoot td { text-align: center; font-weight: 600; background: var(--g100); }
.paygrid tfoot td.pg-proj, .paygrid tfoot td[colspan] { text-align: left; }
.paygrid .abs, .paylist .abs { display: inline-block; font-size: .66rem; font-weight: 700; color: #8a5a17; background: var(--warn-soft); border-radius: 4px; padding: 0 3px; margin-right: 3px; }

/* Röda dagar */
.pc--hol { box-shadow: inset 0 0 0 2px #e6a3a1; }
.pc--holdot { background: var(--white); box-shadow: inset 0 0 0 2px #e6a3a1; }
.paygrid .is-hol { background: #fbeaea; }
.monthgrid th.hol { color: var(--err); }
.holtag { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--err); background: var(--err-soft); border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.holtag--lg { font-size: .8rem; font-family: var(--font); letter-spacing: 0; }
.monthinfo { margin: 2px 0 0; }
.holtxt { color: var(--err); }
.center { text-align: center; }

/* Projektlista – kompakt med adress */
.plist .c-nr { width: 84px; }
.plist td { vertical-align: middle; }
.pcell { min-width: 220px; }
.pcell .rowlink { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.paddr { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--g500); text-decoration: none; white-space: nowrap; }
.paddr:hover { color: var(--accent-hover); text-decoration: underline; }
.paddr svg { flex: none; color: var(--accent); }
.paddr--lg { font-size: inherit; color: var(--g900); white-space: normal; }
.pcell__sm { display: none; font-size: .8rem; color: var(--g500); }
@media (max-width: 720px) { .pcell__sm { display: block; } .pcell .rowlink { max-width: 220px; } .paddr { white-space: normal; } }
.tags--nowrap { flex-wrap: nowrap; max-width: none; }
.tag--more { background: var(--g100); color: var(--g500); cursor: help; }
.facts .span-all { grid-column: 1 / -1; }
@media (max-width: 720px) { .pcell { min-width: 0; } .plist .c-nr { width: auto; } .plist td, .plist th { padding-left: 6px; padding-right: 6px; } }
.plist ~ .empty, .card__head .searchbox input { min-width: 0; }

/* UE */
.grid--wide-first { align-items: start; }
@media (min-width: 900px) { .grid--wide-first { grid-template-columns: 2fr 1fr; } }
.ueadd { margin-top: 10px; }
.ueadd summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent-hover); display: inline-block; padding: 4px 0; }
.ueadd__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding: 12px; background: var(--g100); border-radius: 10px; }
.ueadd__form select, .ueadd__form input { min-height: 38px; padding: 7px 9px; font-size: .92rem; flex: 1 1 160px; }
.grid > .card + .card { margin-top: 0; }
label .lbl .hint { margin-left: 4px; }
label .lbl .hint::before { content: "("; } label .lbl .hint::after { content: ")"; }
.form--3 { align-items: end; }

.ueadd__new { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 4px; border-bottom: 1px dashed var(--g300, #d1d5db); }
.ueadd__new > span { flex: 1 1 100%; }
.ueadd__form .is-invalid { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192,57,43,.15); }

/* Resultat */
.rtable td { padding: 7px 10px; }
.rtable td.num { white-space: nowrap; }
.rtable__head td { padding-top: 16px; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); border-bottom: 1px solid var(--g200, #e5e7eb); }
.rtable__head a { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 6px; }
.rtable__sum td { border-top: 2px solid var(--g900); background: var(--g100); }
.rtable__res td { font-size: 1.05rem; }
.neg { color: #b42318; }
.pos { color: #1e7a46; }
.kpis strong.neg { color: #b42318; } .kpis strong.pos { color: #1e7a46; }
tr.is-selected td { background: #fbf3e6; }
.rchart { width: 100%; height: auto; display: block; margin: 6px 0 14px; }
.rchart__rev { fill: #c98a3c; } .rchart__cost { fill: #9aa3ad; } .rchart__pos { fill: #1e7a46; } .rchart__neg { fill: #b42318; }
.rchart__zero { stroke: #1f2328; stroke-width: 1; }
.rchart__tick, .rchart__lbl { font-size: 11px; fill: #6b7280; font-family: inherit; }
.rlegend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--g500); }
.rl { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.rl--rev { background: #c98a3c; } .rl--cost { background: #9aa3ad; } .rl--pos { background: #1e7a46; }
.inp-sm { min-height: 34px; padding: 5px 8px; font-size: .9rem; width: 110px; }
.inp-sm.is-invalid { border-color: #c0392b; }
.matcalc { margin: 4px 0 0; }
h3 .muted.small { font-weight: 400; }
.checklist { display: grid; gap: 6px; margin: 8px 0; }

.rateblock { padding: 10px 0 12px; border-bottom: 1px solid var(--g200, #e5e7eb); }
.rateblock h3 { margin: 0 0 6px; }
.raterow { display: grid; grid-template-columns: minmax(110px, 1fr) 84px 150px 62px 38px; gap: 8px; align-items: center; padding: 4px 0; }
.raterow__amt { white-space: nowrap; }
.ratenew summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--accent-hover); padding: 4px 0; }
.ratenew .raterow { grid-template-columns: auto 1fr 150px auto; }
.ratenew input[type=date] { min-height: 34px; padding: 4px 8px; font-size: .9rem; }
@media (max-width: 560px) { .raterow, .ratenew .raterow { grid-template-columns: 1fr auto; } }
.closetable td { vertical-align: middle; }

.segmented { display: flex; gap: 6px; margin-bottom: 12px; }
.salbox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.salbox.is-hidden { display: none; }
.salbox .span-all { grid-column: 1 / -1; }

.abscell { display: inline-flex; gap: 6px; align-items: center; }
.abscell .js-abshours { width: 64px; }

.card--warn { border-left: 4px solid #e0a43a; }
.gaprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.gaprow strong { margin-right: 6px; }
.gapday { font-size: .82rem; padding: 3px 9px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.gapday--missing { background: #f6d5d3; color: #8b2522; }
.gapday--more_diary { background: #f7e7b4; color: #6d4712; }
.gapday--more_time { background: #f9d9b5; color: #7a3e0c; }
.plainlist { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; }
.diarytop > * { min-width: 0; }
@media (max-width: 900px) { .diarytop { grid-template-columns: minmax(0, 1fr); } }
.logentry { white-space: pre-wrap; word-break: break-word; font-size: .8rem; background: var(--g100); padding: 10px 12px; border-radius: 8px; margin: 0 0 10px; max-height: 260px; overflow: auto; }

.flag { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; overflow: hidden; vertical-align: middle; margin-left: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); flex: 0 0 auto; }
.flag svg { width: 100%; height: 100%; display: block; }
.flag--txt { align-items: center; justify-content: center; font-size: 8px; font-weight: 700; background: var(--g200, #e5e7eb); color: var(--g700, #374151); }
h1 .flag { width: 22px; height: 22px; }
.filterbox { min-height: 36px; padding: 6px 10px; font-size: .9rem; max-width: 260px; flex: 1 1 200px; }
tr.is-hidden { display: none; }
.sortbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yeartable--matrix td, .yeartable--matrix th { padding: 8px 7px; white-space: nowrap; }
.yeartable--matrix tbody tr:hover { background: var(--g50, #f7f7f5); }
.yeartable--matrix td.yabs { white-space: normal; width: 130px; min-width: 110px; line-height: 1.9; }
.yeartable--matrix td, .yeartable--matrix th { padding-left: 6px; padding-right: 6px; }
.yeartable--matrix td.yabs .abs { white-space: nowrap; display: inline-block; }
/* Aktivitet */
.avatar--sm { width: 26px; height: 26px; font-size: .68rem; display: inline-grid; vertical-align: middle; flex: none; }
.online { display: inline-flex; align-items: center; gap: 6px; color: #1f7a3d; font-weight: 600; font-size: .85rem; }
.online__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22a04b; box-shadow: 0 0 0 3px rgba(34, 160, 75, .18); margin-right: 6px; vertical-align: middle; }
.online .online__dot { margin-right: 0; }
.actonline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.actonline li { display: flex; gap: 10px; align-items: flex-start; }
.actonline li > div { min-width: 0; }
.actlog td { vertical-align: top; }
.actlog .actdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--g300, #c9c9c4); margin-right: 8px; vertical-align: middle; }
.act--andring .actdot { background: var(--accent); }
.act--radering .actdot { background: #c0392b; }
.act--radering .actwhat { color: #a5281b; }
.act--login .actdot { background: #22a04b; }
.act--utskrift .actdot { background: #6b7a90; }
.act--admin .actdot { background: #6c4bb4; }
.actlog--compact td { padding-top: 7px; padding-bottom: 7px; }
.actkinds { margin-bottom: 12px; }
.actfilter select { min-width: 200px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }
.actgrid { align-items: start; }
.actgrid > .card { margin-bottom: 0; min-width: 0; }
@media (min-width: 900px) { .actgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }
.actgrid { margin-bottom: 20px; }
/* Lönerapport */
.payreport { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.payreport h2 { margin: 0 0 2px; font-size: 1.05rem; }
.payreport p { margin: 0; }
.payreport--ready { border: 1.5px solid var(--accent); }
.rate-sub { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--g200); }
.paycard__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.paycard__nums span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--g500); font-weight: 600; }
.paycard__nums strong { font-family: var(--font-h); font-size: 1.35rem; }
/* ÄTA-bilder */
.photoup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photoup__btn { position: relative; overflow: hidden; cursor: pointer; }
.photoup__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.photoup__btn.is-busy { opacity: .6; pointer-events: none; }
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photogrid__item { margin: 0; }
.photogrid__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--g100); border: 1px solid var(--g200); height: auto; }
.photogrid__item figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 4px; min-height: 30px; }
@media (max-width: 560px) { .photogrid { grid-template-columns: 1fr 1fr; gap: 8px; } .photoup__btn { width: 100%; justify-content: center; } }
.photocount { font-size: .78rem; color: var(--g600, #555); text-decoration: none; background: var(--g100); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }

/* ───────────── Mörkt tema ───────────── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --g900: #eceef0;
  --g800: #c9ccd1;
  --g700: #c3c7cc;
  --g500: #8d949c;
  --g300: #3a3f46;
  --g200: #2a2e34;
  --g100: #111316;
  --white: #1a1d21;
  --accent: #d0944a;
  --accent-hover: #e0a55b;
  --accent-soft: #3a2d1a;
  --ok: #5cc185;
  --ok-soft: #173023;
  --err: #ef7a74;
  --err-soft: #3b1c1b;
  --warn-soft: #382c16;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
:root[data-theme="dark"] .top { background: #0a0b0d; border-bottom: 1px solid #22262b; }
:root[data-theme="dark"] .mainnav a:hover, :root[data-theme="dark"] .mainnav a.is-active { background: #1f2328; }
:root[data-theme="dark"] .btn--primary, :root[data-theme="dark"] .segtabs a.is-on,
:root[data-theme="dark"] .chip input:checked + span { background: #eceef0; border-color: #eceef0; color: #111316; }
:root[data-theme="dark"] .btn--primary:hover { background: #fff; color: #111316; }
:root[data-theme="dark"] .secret { background: #000; }
:root[data-theme="dark"] img.pavatar, :root[data-theme="dark"] .photogrid__item img { filter: brightness(.92); }
:root[data-theme="dark"] tbody tr:hover td, :root[data-theme="dark"] .sumrow td, :root[data-theme="dark"] .paygrid td.is-we { background: #20242a; }
:root[data-theme="dark"] .empty, :root[data-theme="dark"] .teamlist, :root[data-theme="dark"] .diary__head { background: #16191c; }
:root[data-theme="dark"] tr.is-weekend td, :root[data-theme="dark"] .monthgrid .we { background: #16191c; }
:root[data-theme="dark"] .yeartable--matrix tbody tr:hover { background: #20242a; }
:root[data-theme="dark"] .savebar { background: rgba(17, 19, 22, .94); }
:root[data-theme="dark"] .badge--warn, :root[data-theme="dark"] .monthgrid .abs, :root[data-theme="dark"] .paygrid .abs, :root[data-theme="dark"] .paylist .abs { color: #e8b366; }
:root[data-theme="dark"] .badge--accent { color: #e8b366; }
:root[data-theme="dark"] .flash--ok { color: #8fdcae; border-color: #24563a; }
:root[data-theme="dark"] .flash--error { color: #f4a7a2; border-color: #5c2a28; }
:root[data-theme="dark"] .flash--info { color: #ecc485; border-color: #5a4320; }
:root[data-theme="dark"] .st-done { background: #2a4429; color: #bfe6a6; }
:root[data-theme="dark"] .st-more_diary { background: #463c12; color: #f2db7e; }
:root[data-theme="dark"] .st-more_time { background: #4c3315; color: #f5c389; }
:root[data-theme="dark"] .st-missing { background: #4b2322; color: #f4aca8; }
:root[data-theme="dark"] .gapday--missing { background: #4a2523; color: #f4b4ae; }
:root[data-theme="dark"] .gapday--more_diary { background: #463a17; color: #f0d48a; }
:root[data-theme="dark"] .gapday--more_time { background: #4a3218; color: #f3c08c; }
/* Ljust/mörkt läge – knapp i toppen, alltid synlig */
.themebtn { margin-left: auto; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3a4047; background: transparent; color: #e6e8ea; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.themebtn:hover { background: var(--g800); color: #fff; }
:root[data-theme="dark"] .themebtn:hover { background: #1f2328; }
.themebtn + .usermenu { margin-left: 6px; }
.themebtn__sun { display: none; }
:root[data-theme="dark"] .themebtn__moon { display: none; }
:root[data-theme="dark"] .themebtn__sun { display: block; color: #f2c46d; }
/* Profilbilder */
img.avatar.avatar--photo { object-fit: cover; background: var(--g200); padding: 0; }
.usermenu summary img.avatar { border: 2px solid rgba(255, 255, 255, .85); }
.profilepic { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profilepic .avatar { width: 96px; height: 96px; font-size: 1.8rem; }
.profilepic__forms { display: grid; gap: 12px; flex: 1; min-width: 260px; }
.userrow { display: flex; align-items: center; gap: 10px; }
.paygrid .pg-pname { display: block; font-weight: 400; font-size: .7rem; color: var(--g500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.paygrid tr.pg-daysum td { font-weight: 700; color: var(--g900); background: var(--g100); border-top: 2px solid var(--g300); }

/* ── Översikt (kompakt) ── */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 16px 28px; align-items: start; background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 14px; }
.hero h1 { margin: 0; }
.hero .eyebrow { margin-bottom: .25rem; }
.hero__msg { margin: 8px 0 0; padding: 8px 12px; background: var(--g100); border-left: 3px solid var(--accent); border-radius: 6px; max-width: 62ch; }
.hero__edit { margin-top: 8px; }
.hero__edit summary { cursor: pointer; color: var(--g500); }
.hero__edit form { margin-top: 8px; max-width: 520px; }
.hero__actions { margin-top: 12px; }
.wx { min-width: 250px; border-left: 1px solid var(--g200); padding-left: 22px; }
.wx__now { display: flex; gap: 12px; align-items: center; }
.wx__icon { font-size: 2.2rem; line-height: 1; }
.wx__now strong { display: block; font-family: var(--font-h); font-size: 1.7rem; line-height: 1; color: var(--g900); }
.wx__now .small { display: block; }
.wx__days { display: flex; gap: 18px; margin-top: 10px; }
.wx__days > div { display: flex; flex-direction: column; font-size: .88rem; }
.wx__tip { margin: 10px 0 0; padding: 6px 10px; border-radius: 6px; background: #fdf3df; color: #6d4712; }
:root[data-theme="dark"] .wx__tip { background: #463a17; color: #f0d48a; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { display: flex; flex-direction: column; text-decoration: none; background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; color: var(--g700); }
.stat:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--g700); }
.stat strong { font-family: var(--font-h); font-size: 1.55rem; font-weight: 800; line-height: 1.1; color: var(--g900); font-variant-numeric: tabular-nums; }
.stat span { font-size: .86rem; font-weight: 600; }
.stat em { font-style: normal; font-size: .76rem; color: var(--g500); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.quick__label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g500); margin: 0 2px 0 8px; }
.quick__label:first-child { margin-left: 0; }
.todo__list { list-style: none; margin: 0; padding: 0; }
.todo__list li { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(110px, .6fr) 2fr; gap: 6px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--g200); }
.todo__list li:first-child { border-top: 0; }
.todo__proj { text-decoration: none; color: var(--g900); }
.todo__proj:hover { text-decoration: underline; }
.todo__days { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.dash { display: grid; gap: 14px; }
.dash--2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.dash .card { margin-bottom: 14px; }
.dash__side .actlog td { padding: 6px 6px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .wx { border-left: 0; padding-left: 0; border-top: 1px solid var(--g200); padding-top: 12px; }
  .dash--2 { grid-template-columns: 1fr; }
  .todo__list li { grid-template-columns: 1fr; }
}
.todo__more summary { cursor: pointer; color: var(--g500); padding: 6px 0; }
.todo__more .todo__list li:first-child { border-top: 1px solid var(--g200); }
.hero__side { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--g200); padding-left: 22px; min-width: 250px; }
.hero__side .wx { border-left: 0; padding-left: 0; min-width: 0; }
.clock { font-family: var(--font-h); font-weight: 800; font-size: 2.3rem; line-height: 1; color: var(--g900); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock__s { font-size: 1rem; font-weight: 600; color: var(--g500); margin-left: 2px; }
.hero__tag { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.hero__msg--pin { border-left-color: #c0392b; }
.hero__msg--pin .hero__tag { color: #c0392b; }
.hero__edit form + form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--g200); }
.hero__edit form { max-width: 640px; }
@media (max-width: 900px) {
  .hero__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--g200); padding-top: 12px; }
}
@media (max-width: 700px) { .clock { display: none; } }

/* ── Frånvarostatistik ── */
.warnbox { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: #6d4712; border-left: 4px solid #e0a43a; }
:root[data-theme="dark"] .warnbox { color: #f0d48a; }
.abstable th a { color: inherit; text-decoration: none; white-space: nowrap; }
.abstable th a:hover { text-decoration: underline; }
.abstable th.is-sorted { color: var(--g900); }
.abstable .abs-sick { color: #b23b33; font-weight: 700; }
.abstable tfoot td { font-weight: 700; border-top: 2px solid var(--g300); }
.pctbar { display: inline-block; width: 46px; height: 6px; background: var(--g200); border-radius: 3px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.pctbar i { display: block; height: 100%; background: #c0392b; width: 0; }
.absbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 190px; align-items: end; padding-top: 6px; }
.absbars__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; text-decoration: none; color: var(--g500); border-radius: 6px; padding: 2px; }
.absbars__col:hover, .absbars__col.is-on { background: var(--g100); color: var(--g900); }
.absbars__stack { width: 70%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.absbars__seg { display: block; min-height: 2px; }
.absbars__n { font-size: .72rem; font-weight: 700; color: var(--g700); margin-bottom: 3px; }
.absbars__lbl { font-size: .74rem; margin-top: 4px; }
.absbars__seg--sjuk { background: #c0392b; }
.absbars__seg--vab { background: #e08a3a; }
.absbars__seg--semester { background: #3a7bd5; }
.absbars__seg--atf { background: #6aa84f; }
.absbars__seg--ledig { background: #8e6cc0; }
.absbars__seg--ovrigt { background: #9aa0a6; }
.abslegend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--g500); }
.abslegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ── Körjournal ── */
.card--ok { border-left: 4px solid var(--ok); }
.kj-closed { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.kj-kpis { margin-top: 0; }
.kj-grid { display: grid; grid-template-columns: 180px 1fr; gap: 12px 16px; }
.kj-day { margin: 12px 0; padding: 9px 12px; border-radius: 8px; font-size: .9rem; background: var(--g100); }
.kj-day--arbete { background: var(--ok-soft); color: #1f5a37; }
.kj-day--franvaro { background: var(--err-soft); color: #8b2522; font-weight: 600; }
.kj-day--saknas { background: var(--warn-soft); color: #6d4712; }
:root[data-theme="dark"] .kj-day--arbete { color: #8fdcae; }
:root[data-theme="dark"] .kj-day--franvaro { color: #f4a7a2; }
:root[data-theme="dark"] .kj-day--saknas { color: #ecc485; }
.kj-legs { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.kj-legs legend { margin-bottom: 4px; color: var(--g500); }
.kj-odo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kj-odo__box { border: 1px solid var(--g200); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.kj-odo__box h3 { margin: 0; font-size: 1rem; }
.kj-odo__box p { margin: 0; }
.kj-odo input { font-size: 1.1rem; }
.kj-sum { font-weight: 700; color: var(--g900); min-height: 1.2em; }
.kj-sum--bad { color: #b23b33; }
.kj-reason { display: block; margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); font-weight: 600; }
.kj-reason textarea { margin-top: 6px; width: 100%; }
.kj-table td { vertical-align: top; }
.kj-why { font-style: italic; color: var(--g700); margin-top: 3px; max-width: 260px; }
.kj-ok { color: var(--ok); font-weight: 600; }
.kj-row--bad td { background: var(--err-soft); }
.kj-row--denied td { opacity: .6; text-decoration: line-through; }
.kj-row--denied td:last-child { text-decoration: none; opacity: 1; }
.kj-receipts { list-style: none; margin: 0 0 14px; padding: 0; }
.kj-receipts li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--g200); }
.kj-receipts li > div { flex: 1; }
.kj-pdf { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 50px; border-radius: 6px; background: #c0392b; color: #fff; font-weight: 800; font-size: .75rem; text-decoration: none; }
.kj-pdf:hover { color: #fff; opacity: .85; }
.kj-upload { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; }
.kj-upload__btn { position: relative; overflow: hidden; }
.kj-upload__btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kj-closecard { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.kj-closecard h2 { margin: 0 0 4px; }
.kj-closecard p { margin: 0; max-width: 60ch; }
@media (max-width: 640px) {
  .kj-grid, .kj-odo { grid-template-columns: 1fr; }
}

/* ── Kläder ── */
.cl-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.cl-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; }
.cl-stats > div + div { border-left: 1px solid var(--g200); }
.cl-stats > div > span { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); font-weight: 600; }
.cl-stats strong { font-family: var(--font-h); font-size: 1.35rem; color: var(--g900); }
.cl-stats em { font-style: normal; font-size: .85rem; color: var(--g600, var(--g500)); }
@media (max-width: 640px) {
  .cl-stats { grid-template-columns: 1fr; }
  .cl-stats > div { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; }
  .cl-stats > div + div { border-left: 0; border-top: 1px solid var(--g200); }
  .cl-stats > div > span { flex-basis: 100%; }
  .cl-stats strong { font-size: 1.1rem; }
}
.cl-last { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font-size: .84rem; padding: 7px 10px; border-radius: 8px; background: var(--g100, #f1efea); color: var(--g700, var(--g900)); }
.cl-last > span:first-child { flex-basis: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--g500); font-weight: 600; }
.cl-last.is-recent { background: var(--warn-soft); box-shadow: inset 3px 0 0 #e0a43a; color: #7a4f12; }
.cl-last.is-recent strong { color: #7a4f12; }
.cl-again input { margin-top: 4px; }
.cl-again .small { display: block; margin-top: 2px; }
.cl-reason { margin-top: 4px; font-size: .82rem; color: var(--g700, var(--g900)); }
.cl-reason span { font-weight: 700; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cl-card__img { aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--g200); }
.cl-card__img img { width: 100%; height: 100%; object-fit: contain; }
.cl-card__ph { font-size: 4rem; opacity: .5; }
.cl-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cl-card__body h3 { margin: 0; font-size: 1.02rem; }
.cl-card__body p { margin: 0; }
.cl-card__price { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; color: var(--g900); }
.cl-card__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.cl-card__opts label { display: flex; flex-direction: column; flex: 1; min-width: 70px; }
.cl-card__btn { width: 100%; margin-top: 6px; }
.cl-over td { color: #b23b33; font-weight: 700; }
.cl-checkout { display: grid; gap: 12px; }
.cl-consent { padding: 12px 14px; border-radius: 8px; background: var(--warn-soft); border-left: 4px solid #e0a43a; }
.cl-consent p { margin: 0 0 8px; }
.cl-ded { color: #b23b33; }
.cl-orders tr.is-hl td { background: var(--accent-soft); }
.cl-list { list-style: none; margin: 0; padding: 0; }
.cl-list li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--g200); }
.cl-list li > div { flex: 1; }
.cl-list li.is-off { opacity: .55; }
.cl-list__img { width: 48px; height: 48px; border-radius: 8px; background: var(--g100); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.5rem; flex: none; }
.cl-list__img img { width: 100%; height: 100%; object-fit: cover; }
:root[data-theme="dark"] .cl-card__img { background: #f4f4f4; }
.kj-remind { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 14px 18px; margin-bottom: 14px; }
.empcards { margin-bottom: 14px; }
.empcard { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.empcard:hover { border-color: var(--accent); transform: translateY(-1px); color: inherit; }
.empcard h2 { margin: 0 0 4px; }
.empcard p { margin: 2px 0; }
.empcard__icon { font-size: 2.2rem; line-height: 1; }
.empcard__warn { color: #b23b33; font-weight: 600; font-size: .9rem; }
.kj-legs input[type="radio"] { width: 20px; height: 20px; min-height: 0; flex: none; padding: 0; margin: 0; accent-color: var(--g900); }
.kj-legs .checkline { display: inline-flex; white-space: nowrap; }
@media (max-width: 480px) {
  .mainnav { gap: 0; }
  .mainnav a { padding: 8px 8px; font-size: .86rem; }
}
@media (max-width: 520px) {
  .cl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cl-card__body { padding: 10px; }
  .cl-card__opts label { min-width: 0; }
}
.absbars { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 520px) { .absbars { gap: 3px; height: 150px; } .absbars__n, .absbars__lbl { font-size: .62rem; } }
/* Tabeller som kort i mobilen */
@media (max-width: 640px) {
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td, table.stack-sm tfoot { display: block; width: 100%; }
  table.stack-sm thead { display: none; }
  table.stack-sm tbody tr { border: 1px solid var(--g200); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--white); }
  table.stack-sm tbody td { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; border: 0 !important; padding: 4px 0 !important; text-align: right; }
  table.stack-sm tbody td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g500); text-align: left; flex: none; }
  table.stack-sm tbody td:first-child { font-size: 1.02rem; }
  table.stack-sm tbody td.hide-sm { display: none; }
  table.stack-sm tbody td:last-child::before, table.stack-sm tbody td[data-label=""]::before { content: none; }
  table.stack-sm tbody td:last-child { justify-content: flex-end; padding-top: 8px !important; }
  table.stack-sm tbody td > div, table.stack-sm .kj-why { text-align: right; }
  table.stack-sm tfoot tr { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 4px; font-weight: 700; }
  table.stack-sm tfoot td { width: auto; border: 0; padding: 0; }
  table.stack-sm tfoot td.hide-sm { display: none; }
  .tablewrap:has(table.stack-sm) { overflow: visible; }
  .kj-row--bad td { background: transparent; }
  tr.kj-row--bad { border-color: #e7a19c !important; background: var(--err-soft) !important; }
  .cl-card__opts label { flex: 1 1 40%; }
}
@media (max-width: 420px) {
  .mainnav a { padding: 7px 6px; font-size: .82rem; }
}
@media (max-width: 640px) {
  table.stack-sm tbody td { display: block; text-align: right; overflow: hidden; }
  table.stack-sm tbody td::before { float: left; margin-right: 12px; line-height: 1.6; }
  table.stack-sm tbody td:last-child { display: flex; }
  table.stack-sm tbody tr:nth-child(even) td, table.stack-sm tbody tr:hover td { background: transparent; }
}
@media (max-width: 640px) { table.stack-sm .kj-why { max-width: none; margin-left: 0; } }
.kj-maptest { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 18px; margin-bottom: 14px; }
.kj-receipts--lon { margin: 14px 0 6px; }

/* Inkorg (hemsidans formulär) */
.mailbtn { margin-left: auto; position: relative; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3a4047; color: #e6e8ea; display: grid; place-items: center; text-decoration: none; transition: background .15s; }
.mailbtn:hover, .mailbtn.is-active { background: #2c3136; color: #fff; }
.mailbtn + .themebtn { margin-left: 8px; }
.mailbtn__n { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent, #c8873a); color: #fff; font-size: .7rem; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #1e2124; }
.inbox-msg { white-space: normal; line-height: 1.6; background: var(--g100); border-radius: 8px; padding: 14px 16px; overflow-wrap: anywhere; }
.inbox-files { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.inbox-files li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--g200); border-radius: 8px; }
.inbox-files a { font-weight: 600; overflow-wrap: anywhere; }
.inbox-safe { color: var(--ok); }
.inbox-list tr.is-new td { font-weight: 600; }
.inbox-list tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--accent, #c8873a); }
@media (max-width: 640px) { .inbox-list tr.is-new td:first-child { box-shadow: none; } .inbox-list tr.is-new { border-left: 3px solid var(--accent, #c8873a); } }
.btnrow--wrap { margin-bottom: 8px; }
.inbox-h { margin: 22px 0 8px; }

/* Meddelanden och notiser */
.card--threads { padding: 6px 0; }
.card--threads > div { padding: 0 22px; }
.threads, .notices { list-style: none; margin: 0; padding: 0; }
.threads li + li, .notices li + li { border-top: 1px solid var(--g200); }
.threads a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 22px; text-decoration: none; color: var(--g700); }
.threads a:hover, .notices a:hover { background: var(--g100); }
.threads__who { font-weight: 600; color: var(--g900); }
.threads__when { text-align: right; white-space: nowrap; }
.threads__subj { grid-column: 1 / -1; color: var(--g900); }
.threads__last { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads li.is-new a { box-shadow: inset 3px 0 0 var(--accent); }
.threads li.is-new .threads__subj, .threads li.is-new .threads__who { font-weight: 700; }
.threads li.is-new .threads__who::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }
.notices a { display: flex; gap: 14px; align-items: flex-start; padding: 13px 8px; text-decoration: none; color: var(--g700); border-radius: 8px; }
.notices__ic { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--g100); display: grid; place-items: center; font-size: 1rem; }
.notices__txt { display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.notices li.is-new .notices__txt { color: var(--g900); font-weight: 600; }
.notices li.is-new .notices__ic { background: var(--accent-soft); }
.msg-markall { display: flex; justify-content: flex-end; gap: 18px; margin: -4px 0 6px; }
.notices li { display: flex; align-items: center; gap: 6px; }
.notices li > a { flex: 1; min-width: 0; }
.notices__del { flex: none; }
.notices__del .btn { color: var(--g500); }
.chat { display: flex; flex-direction: column; gap: 16px; }
.chat__msg { max-width: min(640px, 88%); align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.chat__msg--me { align-self: flex-end; align-items: flex-end; }
.chat__meta { font-size: .8rem; }
.chat__bubble { padding: 12px 15px; border-radius: 14px 14px 14px 4px; background: var(--g100); color: var(--g900); line-height: 1.55; overflow-wrap: anywhere; }
.chat__msg--me .chat__bubble { border-radius: 14px 14px 4px 14px; background: var(--g900); color: #fff; }
.chat__msg--me .chat__bubble a { color: #fff; }
.chat__reply { border-top: 1px solid var(--g200); padding-top: 16px; margin-top: 4px; }
.msg-preview { margin: 10px 0 18px; border-radius: 10px; }
.msg-compose { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.msg-to { border: 0; padding: 0; margin: 0; }
.msg-to legend { font-weight: 600; margin-bottom: 8px; }
.msg-people { margin-top: 12px; }
.msg-people summary { cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--g700); }
.msg-filter { margin: 10px 0 6px; }
.msg-people__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; max-height: 300px; overflow: auto; border: 1px solid var(--g200); border-radius: 8px; padding: 8px 12px; }
.msg-people__list label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding: 5px 0; }
.msg-people__list input { width: 17px; height: 17px; flex: none; margin: 0; }
.msg-ok { color: var(--ok); font-weight: 700; }
.readbar { display: inline-block; width: 70px; height: 7px; border-radius: 99px; background: var(--g200); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.readbar span { display: block; height: 100%; background: var(--ok); }
.msgcard { display: flex; flex-direction: column; gap: 0; }
.msgcard a.msgcard__row { display: flex; gap: 12px; padding: 10px 0; text-decoration: none; color: var(--g700); border-top: 1px solid var(--g200); }
.msgcard a.msgcard__row:first-of-type { border-top: 0; }
.msgcard__row strong { color: var(--g900); }
@media (max-width: 640px) {
  .threads a { padding: 13px 16px; }
  .card--threads > div { padding: 0 16px; }
  .chat__msg { max-width: 94%; }
}
:root[data-theme="dark"] .chat__msg--me .chat__bubble { background: #3a2a14; color: #f3ead9; }
:root[data-theme="dark"] .chat__msg--me .chat__bubble a { color: #f3ead9; }

/* Mina uppgifter */
.profile-wrap { max-width: 720px; }
.profile-intro h1 { margin-bottom: .3em; }
.profile-intro p { margin: 0; }
.profile-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.profile-form h2 { margin: 0; }
.profile-form > p.small { margin: -6px 0 0; }
.profile-h { margin-top: 14px !important; }
.profile-help summary { cursor: pointer; color: var(--g700); font-weight: 600; }
.profile-help p { margin: 8px 0 0; line-height: 1.5; }

/* Kläder: historik, varningar, storlekar */
.cl-flag { margin-top: 4px; color: #8a5a17; background: var(--warn-soft); border-radius: 6px; padding: 3px 8px; font-size: .8rem; font-weight: 600; display: inline-block; }
.cl-hist-pick { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.cl-hist-pick label { min-width: 260px; }
.cl-hist-pick p { margin: 0; flex: 1 1 300px; }
.cl-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cl-cat { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--g200); border-radius: 10px; padding: 12px 14px; }
.cl-cat > span:first-child { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--g500); font-weight: 600; }
.cl-cat strong { font-size: 1.35rem; font-family: var(--font-h); }
.cl-cat.is-recent { border-color: var(--accent); background: var(--accent-soft); }
.cl-hist tr.cl-hist__first td { border-top: 2px solid var(--g200); }
.cl-hist tr.is-off td { color: var(--g500); text-decoration: line-through; }
.pagehead--sub { align-items: center; margin-bottom: 14px; }
.pagehead--sub p { margin: 0; max-width: 680px; }
.sizes .card { padding-bottom: 14px; }
.sizerow summary { list-style: none; display: grid; grid-template-columns: 58px 1fr 30px; gap: 10px; align-items: center; padding: 5px 0; cursor: pointer; }
.sizerow summary::-webkit-details-marker { display: none; }
.sizerow__sz { font-weight: 600; font-size: .9rem; }
.sizerow__bar { height: 14px; background: var(--g100); border-radius: 4px; overflow: hidden; }
.sizerow__bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.sizerow strong { text-align: right; }
.sizerow p { margin: 2px 0 8px 68px; color: var(--g700); }
.sizerow[open] .sizerow__sz { color: var(--accent); }
.sizerow--missing { border-top: 1px dashed var(--g300); margin-top: 6px; padding-top: 4px; }
.sizerow--missing .sizerow__sz { color: var(--err); }
.cl-hist-m { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 640px) {
  table.cl-hist { display: none; }
  .cl-hist-m { display: block; }
  .cl-hist-m li { border-top: 1px solid var(--g200); padding: 12px 0; }
  .cl-hist-m li.is-off { opacity: .55; text-decoration: line-through; }
  .cl-hist-m__head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
  .cl-hist-m__head .badge { margin-left: auto; }
  .cl-hist-m__line { font-size: .92rem; padding: 2px 0; }
  .cl-hist-m__line > span:first-child { font-weight: 700; }
}

/* Användare: grupper och sök, radera-knapp */
#userlist tr.grouprow th { background: var(--g100); text-align: left; font-family: var(--font-h); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g700); padding: 9px 12px; }
.userfilter { margin: 0 0 12px; max-width: 360px; }
.btn--ghost-danger { border-color: transparent; background: transparent; padding-left: 8px; padding-right: 8px; }
.btn--ghost-danger:hover { border-color: var(--err); background: var(--err-soft); }

/* ═════════════ Utseende 0.8.0 – samma känsla som hemsidan ═════════════
   Varm papperston, mörk grafit, koppar som accent, rakare hörn. Mörkt läge påverkas inte. */
:root:not([data-theme="dark"]) {
  --g900: #202321;
  --g800: #2d312e;
  --g700: #3d413d;
  --g500: #686b67;
  --g300: #d8d6ce;
  --g200: #e7e5df;
  --g100: #f4f2ed;
  --white: #fdfcf9;
  --accent: #bd8745;
  --accent-hover: #a6722f;
  --accent-soft: #efe2cc;
  --warn-soft: #f6ebd8;
  --radius: 4px;
  --shadow: 0 1px 0 rgba(32, 35, 33, 0.05);
}
:root:not([data-theme="dark"]) body { background: #f4f2ed; }
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .tile,
:root:not([data-theme="dark"]) .stat { border-color: #dedbd2; }

/* Topp: grafit som hemsidans sidfot, koppar som markering */
.top { background: #202321; border-bottom: 2px solid var(--accent); }
.brand__text strong { font-size: .92rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.brand__text span { font-size: .62rem; letter-spacing: .26em; color: #d3a265; }
.mainnav { gap: 2px; }
.mainnav a { position: relative; border-radius: 0; color: #c9cac5; font-weight: 600; padding: 8px 12px; }
.mainnav a:hover { background: transparent; color: #fff; }
.mainnav a.is-active { background: transparent; box-shadow: none; color: #fff; }
.mainnav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.mainnav a:hover::after, .mainnav a.is-active::after { transform: scaleX(1); }
.themebtn, .mailbtn { border-color: #3d413d; }

/* Rubriker som på hemsidan */
h1 { font-weight: 600; letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }

/* Knappar: rakare, tydligare */
.btn { border-radius: 2px; font-weight: 700; }
.btn--accent { color: #171a18; }
.btn--accent:hover { color: #171a18; background: #d4a66d; border-color: #d4a66d; }
:root:not([data-theme="dark"]) .btn--primary:hover { background: #3d413d; border-color: #3d413d; }
.badge { border-radius: 3px; }
.tab__count { border-radius: 3px; }
input, select, textarea { border-radius: 2px; }
.flash { border-radius: 2px; }
.usermenu__panel { box-shadow: 0 10px 30px rgba(32,35,33,.16); }

/* Väder: min plats och per projekt */
.wx__geo { display: block; margin-top: 8px; color: var(--g700); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.wx__note:empty { display: none; }
.wx__note { display: block; margin-top: 6px; }
.wxproj { padding: 14px 18px; }
.wxproj__h { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--g500); margin: 0 0 10px; }
.wxproj__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.wxproj__list li { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border: 1px solid var(--g200); border-radius: var(--radius); background: var(--g100); }
.wxproj__list strong { font-family: var(--font-h); color: var(--g900); }
.wxproj__now { font-size: 1.15rem; font-weight: 700; color: var(--g900); }
.wxproj__n { margin-top: 2px; }
@media (max-width: 640px) { .wxproj__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wx__geo[hidden], .wx__tip[hidden] { display: none; }

/* Paus / uppehåll i projekt */
.st-paus { background: #e4e1d8; color: #5c5f5a; background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(32,35,33,.06) 5px 7px); }
:root[data-theme="dark"] .st-paus { background: #34373a; color: #b9bcb6; }
.pausebox { border-top: 1px solid var(--g200); margin-top: 18px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pausebox h3 { margin: 0; }
.pausebox p { margin: 0; }
.pauseform { align-items: end; }
.pauselist { margin: 0; padding-left: 18px; }
.pauselist form { margin-left: 8px; }

/* ───────── Planering ───────── */
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.pl-label { min-width: 0; font-size: .98rem; }
.pl-seg { gap: 4px; }
.seg { display: inline-block; padding: 7px 12px; border: 1px solid var(--g300); border-radius: var(--radius); font-size: .85rem; color: var(--g700); text-decoration: none; background: var(--white); }
.seg:hover { border-color: var(--g900); color: var(--g900); }
.pl-seg a.seg.is-on { background: var(--g900); border-color: var(--g900); color: #fff; font-weight: 600; }
.pl-sep { width: 10px; }
.pl-filter select { min-width: 190px; }
.pl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.pl-stats > div { background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pl-stats strong { font-size: 1.5rem; line-height: 1.1; }
.pl-stats span { font-size: .8rem; color: var(--g500); }
.pl-stats .is-warn { border-left: 4px solid #d9534f; }
.plan { padding-bottom: 14px; }
.pl-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .86rem; }
.pl-table th, .pl-table td { border-bottom: 1px solid var(--g200); padding: 0; }
.pl-table thead th { font-weight: 600; font-size: .74rem; color: var(--g500); padding: 6px 2px; text-align: center; white-space: nowrap; }
.pl-day span { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .66rem; }
.pl-day.is-today { color: var(--accent); }
.pl-name { position: sticky; left: 0; z-index: 2; background: var(--white); text-align: left !important; padding: 8px 12px 8px 0 !important; min-width: 220px; max-width: 280px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name a { color: var(--g900); text-decoration: none; }
.pl-name a:hover { text-decoration: underline; }
.pl-nr { font-variant-numeric: tabular-nums; color: var(--g500); font-size: .8rem; }
.pl-c { text-align: center; height: 38px; min-width: 44px; position: relative; border-left: 1px solid var(--g200); }
.plan--month .pl-c { min-width: 32px; }
.pl-c.is-off { background: repeating-linear-gradient(0deg, rgba(0,0,0,.025), rgba(0,0,0,.025) 1px, transparent 1px, transparent 4px); background-color: var(--g100); }
.pl-c.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.pl-sum { text-align: right; padding: 0 0 0 10px !important; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-table tfoot th, .pl-table tfoot td { border-top: 2px solid var(--g900); border-bottom: 0; font-weight: 700; height: 34px; }
.pl-pop { display: inline-block; }
.pl-pop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.pl-pop > summary::-webkit-details-marker { display: none; }
.pl-pop[open] > summary .pl-n { outline: 2px solid var(--accent); outline-offset: 1px; }
.pl-pop__box { position: absolute; z-index: 20; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); min-width: 230px; max-width: 300px; background: var(--white); border: 1px solid var(--g300); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 10px 12px; text-align: left; font-size: .84rem; white-space: normal; }
.pl-pop__box strong { display: block; margin-bottom: 6px; font-size: .8rem; }
.pl-pop__box ul, .pl-drow ul { list-style: none; margin: 0; padding: 0; }
.pl-pop__box li, .pl-drow li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-top: 1px solid var(--g200); }
.pl-miss { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #f1b5b2; color: #7d1c18; font-weight: 800; text-decoration: none; }
.pl-c.st-paus { background: repeating-linear-gradient(135deg, #e4e1da, #e4e1da 4px, #f1efea 4px, #f1efea 8px); }
.pl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; }
.pl-key { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 18px; border-radius: 3px; border: 1px solid var(--g200); font-size: .7rem; font-weight: 700; }
.pl-key--n { background: var(--g900); color: #fff; border-color: var(--g900); }
.pl-key--miss { background: #f1b5b2; color: #7d1c18; border-radius: 50%; }
.pl-key.st-paus { background: repeating-linear-gradient(135deg, #e4e1da, #e4e1da 3px, #f1efea 3px, #f1efea 6px); }
.pl-key.is-off { background: var(--g100); }
.pl-tag { display: inline-block; padding: 3px 5px; border-radius: 3px; font-size: .74rem; font-weight: 700; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default; }
.pl-tag--multi { background: var(--g900); color: #fff; cursor: pointer; list-style: none; }
.pl-tag--multi::-webkit-details-marker { display: none; }
.pl-abs { display: inline-block; padding: 3px 4px; border-radius: 3px; font-size: .68rem; font-weight: 700; color: var(--g500); border: 1px dashed var(--g300); }
.pc0 { background: #e6d3b8; color: #5b3a12; } .pc1 { background: #c9dcea; color: #1d4363; }
.pc2 { background: #d2e3c4; color: #2d4d1a; } .pc3 { background: #ecc9c4; color: #6d2620; }
.pc4 { background: #dccfe6; color: #46305c; } .pc5 { background: #c6e2dd; color: #1c4f47; }
.pc6 { background: #efe0a8; color: #5c4a09; } .pc7 { background: #d9d6cf; color: #333; }
.pc8 { background: #f0cfe0; color: #6a2549; } .pc9 { background: #cfd9c0; color: #3c4a20; }
.pl-plegend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.pl-plegend > span { display: inline-flex; align-items: center; gap: 6px; }
.pl-mob { display: none; }
.pl-dcard + .pl-dcard { margin-top: 10px; }
.pl-dcard.is-today { border-left: 4px solid var(--accent); }
.pl-dcard.is-off { background: var(--g100); }
.pl-dcard__h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.pl-drow { display: block; border-top: 1px solid var(--g200); color: var(--g900); text-decoration: none; }
.pl-drow > summary, a.pl-drow { list-style: none; display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; cursor: pointer; font-size: .9rem; }
.pl-drow > summary::-webkit-details-marker { display: none; }
.pl-drow b { flex: none; min-width: 26px; text-align: center; background: var(--g900); color: #fff; border-radius: var(--radius); padding: 1px 6px; font-size: .82rem; }
.pl-drow ul { padding: 0 0 8px; font-size: .86rem; }
.pl-drow--miss b { background: #f1b5b2; color: #7d1c18; }
:root[data-theme="dark"] .pl-c.st-paus, :root[data-theme="dark"] .pl-key.st-paus { background: repeating-linear-gradient(135deg, #2c2f2d, #2c2f2d 4px, #232624 4px, #232624 8px); }
:root[data-theme="dark"] .pl-miss, :root[data-theme="dark"] .pl-key--miss, :root[data-theme="dark"] .pl-drow--miss b { background: #4b2322; color: #f4aca8; }
:root[data-theme="dark"] .pl-n, :root[data-theme="dark"] .pl-key--n, :root[data-theme="dark"] .pl-tag--multi, :root[data-theme="dark"] .pl-drow b, :root[data-theme="dark"] .pl-seg a.seg.is-on { background: #e9e6df; color: #171a18; border-color: #e9e6df; }
@media (max-width: 640px) {
  .pl-desk { display: none; }
  .pl-mob { display: block; }
  .pl-name { min-width: 130px; max-width: 150px; }
  .pl-sep { display: none; }
  .pl-filter, .pl-filter select { width: 100%; }
  .pl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plan--month .pl-c { min-width: 27px; }
.plan--month .pl-name { min-width: 170px; max-width: 200px; }
.plan--month .pl-pop > summary { flex-direction: column; gap: 1px; } .plan--month .pl-n { min-width: 22px; height: 20px; padding: 0 3px; font-size: .76rem; } .plan--month .pl-n--ue { height: 15px; font-size: .66rem; }
.plan--month .pl-miss { width: 20px; height: 20px; font-size: .78rem; }
.plan--month .pl-table thead th { padding: 6px 0; }
.plan--month .pl-day span { letter-spacing: 0; font-size: .6rem; }
.pl-drow b { white-space: nowrap; align-self: center; } .pl-drow > summary > span, a.pl-drow > span { min-width: 0; }

.pl-n { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--radius); background: var(--g900); color: #fff; font-weight: 700; font-size: .84rem; }
.pl-n--ue, :root[data-theme="dark"] .pl-n--ue { min-width: 22px; height: 22px; padding: 0 4px; background: transparent; color: #8a5a1f; border: 1.5px solid var(--accent); font-size: .76rem; }
:root[data-theme="dark"] .pl-n--ue { color: #e3b679; }
.pl-key--ue { background: transparent; border: 1.5px solid var(--accent); color: #8a5a1f; }
.pl-grp { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); border-top: 0 !important; padding-top: 8px !important; }
.pl-grp:first-child { padding-top: 0 !important; }
.pl-table tfoot .pl-uerow th, .pl-table tfoot .pl-uerow td { font-weight: 600; color: #8a5a1f; height: 28px; }
.pl-table tfoot .pl-uerow + tr th, .pl-table tfoot .pl-uerow + tr td { border-top: 1px solid var(--g200); }
/* Sidhuvud: tätare så att alla flikar får plats */
.top__inner { gap: 14px; }
.mainnav a { padding: 8px 9px; font-size: .9rem; }
.mainnav a::after { left: 9px; right: 9px; }
.mailbtn { margin-left: 4px; }
.mailbtn + .themebtn { margin-left: 6px; }
.themebtn + .usermenu { margin-left: 4px; }
@media (min-width: 1100px) { .top__inner { max-width: 1320px; } }

.pl-table tfoot .pl-duprow th, .pl-table tfoot .pl-duprow td { border-top: 1px solid var(--g200); font-weight: 500; color: var(--g500); font-size: .8rem; height: 28px; }

.pl-table tfoot .pl-subrow th, .pl-table tfoot .pl-subrow td { border-top: 1px solid var(--g200); font-weight: 500; font-size: .82rem; color: var(--g500); height: 28px; }
.pl-table tfoot .pl-subrow.pl-uerow th, .pl-table tfoot .pl-subrow.pl-uerow td { color: #8a5a1f; }

/* ── Planering framåt ── */
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.pl-c.is-plan { background-image: linear-gradient(0deg, rgba(189,135,69,.07), rgba(189,135,69,.07)); }
.pl-c.is-plan .pl-n:not(.pl-n--ue) { background: transparent; color: var(--g900); border: 1.5px dashed var(--g900); }
.pl-c.is-plan .pl-n--ue { border-style: dashed; }
.pl-key--plan { background: transparent; border: 1.5px dashed var(--g900); color: var(--g900); }
.pl-tag.is-plan { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.55) 3px, transparent 3px, transparent 6px); outline: 1px dashed currentColor; outline-offset: -1px; }
.pl-tag.is-missed { opacity: .55; text-decoration: line-through; }
.pl-tag.is-dev { box-shadow: 0 0 0 2px #d9534f; }
.pl-abs.is-plan { border-style: dotted; }
.pl-grprow th { text-align: left; padding: 14px 0 6px !important; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g500); border-bottom: 1px solid var(--g300) !important; position: sticky; left: 0; }
.pl-table.is-planner td[data-d] { cursor: cell; user-select: none; -webkit-user-select: none; }
.pl-table.is-planner td[data-d]:hover { box-shadow: inset 0 0 0 1px var(--g300); }
.pl-table td.is-sel { background: rgba(189,135,69,.28) !important; box-shadow: inset 0 0 0 1px var(--accent) !important; }
.pl-hint { margin: 0; }
.pl-stats .is-warn--soft { border-left-color: #e0a43a; }
.pl-planlbl { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8a5a1f; margin-left: 6px; }
.pl-drow.is-plan b { background: transparent; color: var(--g900); border: 1.5px dashed var(--g900); }
.pl-uecard .card__head h2 { margin: 0; font-size: 1.05rem; }
.pl-uelist { list-style: none; margin: 0; padding: 0; }
.pl-uelist li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--g200); }
.pl-uelist li:first-child { border-top: 0; }
.pl-sheet { position: fixed; z-index: 60; right: 20px; bottom: 20px; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 100px); overflow-y: auto; background: var(--white); border: 1px solid var(--g300); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.pl-sheet[hidden] { display: none; }
.pl-sheet__in { display: grid; gap: 12px; padding: 18px 20px 20px; }
.pl-sheet__h { display: flex; justify-content: space-between; align-items: center; }
.pl-sheet__h h2 { margin: 0; font-size: 1.1rem; }
.pl-sheet__h .linklike { text-decoration: none; font-size: 1.1rem; }
.pl-emps { display: grid; gap: 8px; }
.pl-emps__h { display: flex; justify-content: space-between; align-items: baseline; font-size: .86rem; }
.pl-emplist { max-height: 230px; overflow-y: auto; border: 1px solid var(--g200); border-radius: var(--radius); padding: 4px 10px; }
.pl-emplist label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding: 6px 0; border-bottom: 1px solid var(--g100); }
.pl-emplist label:last-child { border-bottom: 0; }
.pl-emplist label.is-hidden { display: none; }
.pl-free { margin-left: auto; font-size: .68rem; font-weight: 700; color: #8a5a1f; background: rgba(189,135,69,.15); padding: 2px 6px; border-radius: 3px; }
:root[data-theme="dark"] .pl-c.is-plan .pl-n:not(.pl-n--ue), :root[data-theme="dark"] .pl-key--plan, :root[data-theme="dark"] .pl-drow.is-plan b { background: transparent; color: #e9e6df; border-color: #e9e6df; }
:root[data-theme="dark"] .pl-tag.is-plan { background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.25) 3px, transparent 3px, transparent 6px); }
@media (max-width: 640px) {
  .pl-sheet { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 88vh; border-radius: 12px 12px 0 0; }
  .pl-hint { display: none; }
}
.minplan__list { list-style: none; margin: 0; padding: 0; }
.minplan__list li { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--g200); }
.minplan__list li:first-child { border-top: 0; }
.minplan__when { font-weight: 600; font-size: .9rem; }
.minplan__list li.is-empty .minplan__when { color: var(--g500); font-weight: 500; }
@media (max-width: 520px) { .minplan__list li { grid-template-columns: 1fr; gap: 2px; } }
@media (max-width: 640px) { .mainnav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }
.carplate { display: inline-block; font-family: "Archivo Variable", "Archivo", sans-serif; font-weight: 800; letter-spacing: .08em; font-size: 1.15rem; padding: 4px 12px 4px 26px; border: 2px solid var(--g900); border-radius: 4px; background: linear-gradient(90deg, #2f5aa8 0 16px, transparent 16px); }
.carnow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.carchange > summary { list-style: none; display: inline-flex; }
.carchange > summary::-webkit-details-marker { display: none; }
.carchange[open] > summary { margin-bottom: 14px; }
.carstop { margin-top: 12px; }
input.carreg { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kj-carbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.kj-car { display: flex; align-items: center; gap: 12px; }
.kj-print { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.kj-print label { font-size: .78rem; gap: 3px; width: 150px; }
.kj-print input { padding: 6px 8px; min-height: 34px; width: 100%; }
.kj-pdflink { margin-left: 8px; font-weight: 600; }
@media (max-width: 640px) { .kj-print { width: 100%; } .kj-print label { flex: 1 1 40%; width: auto; } .kj-print button { width: 100%; } }
.hr-car { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-weight: 600; font-size: .86rem; }
input.carreg::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.addrbox { margin: 0 0 6px; padding: 12px 14px; border: 1px solid var(--g200); border-radius: var(--radius); background: var(--g100); line-height: 1.5; }
.kj-devs { margin-bottom: 16px; }
.kj-devs h2 { margin-bottom: 6px; }
.kj-devlist { list-style: none; margin: 12px 0 0; padding: 0; }
.kj-devlist > li { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--g200); }
.kj-devtxt { color: #9a3b12; }
.kj-devbtns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.kj-dispute > summary { list-style: none; }
.kj-dispute > summary::-webkit-details-marker { display: none; }
.kj-dispute[open] { flex-basis: 100%; }
.kj-dispute form { margin-top: 10px; }
:root[data-theme="dark"] .kj-devtxt { color: #f0a77c; }
@media (max-width: 640px) { .kj-devlist > li { grid-template-columns: 1fr; } .kj-devbtns { justify-content: flex-start; } }
.kj-priv { display: grid; grid-template-columns: 220px 1fr; gap: 6px 16px; align-items: end; margin: 4px 0 12px; }
.kj-priv p { margin: 0 0 8px; }
@media (max-width: 640px) { .kj-priv { grid-template-columns: 1fr; } }
/* Språkval */
.langpick { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--g200); margin-top: 4px; }
.langpick select { padding: 6px 8px; min-height: 34px; font-size: .88rem; flex: 1; }
.langlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 14px 0 12px; font-size: .86rem; }
.langlinks a { color: var(--g500); text-decoration: none; }
.langlinks a.is-on { color: var(--g900); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); }
.cl-rule { display: inline-block; margin-left: 6px; font-size: .74rem; font-weight: 600; color: var(--g700); background: var(--g100); border-radius: 999px; padding: 1px 8px; }
