/* Logofactory Företagsportal */
:root {
  --bg: #F7F7F4;
  --card: #FFFFFF;
  --ink: #141413;
  --ink-2: #3A3A36;
  --muted: #5C5C57;
  --line: #E4E3DC;
  --line-2: #D5D4CC;
  --soft: #EFEEE8;
  --gold: #D7A663;
  --gold-soft: #F3E7D3;
  --gold-ink: #6E4A17;
  --dark-2: #232320;
  --dark-line: #4A4A44;
  --on-dark: #F7F7F4;
  --on-dark-muted: #BDBCB4;
  --green: #2F7A4B;
  --green-soft: #E3F0E7;
  --green-ink: #1F5434;
  --red: #B4532A;
  --red-soft: #F8E4DA;
  --red-ink: #8A3A17;
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 16px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: #8A5F22; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; letter-spacing: -0.01em; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 240px; max-width: 100%; background: var(--ink); color: var(--on-dark); padding: 28px 18px; display: flex; flex-direction: column; gap: 26px; }
.main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 26px; max-width: 1220px; }
.brand { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; text-decoration: none; color: var(--on-dark); }
.brand:hover { color: var(--on-dark); }
.brand b { font-family: var(--head); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.brand b span { color: var(--gold); }
.brand small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; }
.co { background: var(--dark-2); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.co-mark { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; }
.co b { display: block; font-size: 14px; }
.co small { display: block; font-size: 12px; color: var(--on-dark-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 46px; border-radius: 100px; text-decoration: none; color: #E8E7E0; font-weight: 600; }
.nav a:hover { background: var(--dark-2); color: var(--on-dark); }
.nav a.on { background: var(--gold); color: var(--ink); font-weight: 700; }
.nav svg { flex: none; }
.nav .count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 100px; background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav a.on .count { background: var(--ink); color: var(--gold); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.contact { background: var(--dark-2); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.contact small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; }
.contact b { font-size: 15px; }
.contact .row { display: flex; gap: 8px; flex-wrap: wrap; }
.me { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; font-size: 13px; color: var(--on-dark-muted); }
.me a, .me button { color: var(--on-dark); }
@media (max-width: 820px) {
  .side { gap: 16px; padding: 18px 14px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .side-foot .contact { display: none; }
}

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .sub { font-size: 15px; color: var(--muted); margin-top: 6px; }
.eyebrow { font-size: 14px; color: var(--muted); font-weight: 600; }
.back { font-size: 14px; font-weight: 700; text-decoration: none; display: inline-block; margin-bottom: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1 1 320px; min-width: 0; }
.grow-2 { flex: 2 1 460px; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }

/* ---------- Kort ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card.tight { padding: 20px 22px; gap: 6px; border-radius: var(--r-md); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.dark { background: var(--ink); color: var(--on-dark); border: 0; position: relative; overflow: hidden; }
.dark p, .dark .muted { color: #D4D3CB; }
.dark > * { position: relative; }
.dark .blob { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: var(--gold); opacity: .33; filter: blur(70px); right: -90px; top: -100px; pointer-events: none; }
.hero { padding: 36px; gap: 18px; min-height: 300px; }
.hero h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.08; max-width: 560px; }
.hero p { font-size: 16px; line-height: 1.6; max-width: 520px; }
.stat { font-family: var(--head); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.label { font-size: 13px; color: var(--muted); font-weight: 600; }
.soft { background: var(--bg); border-radius: 18px; padding: 16px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- Knappar & pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 100px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #CB9852; }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.btn.ink:hover { background: #2B2B27; color: var(--on-dark); }
.btn.soft-gold { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn.on-dark { border-color: var(--dark-line); color: var(--on-dark); }
.btn.on-dark:hover { border-color: var(--on-dark); color: var(--on-dark); }
.btn.danger { color: var(--red-ink); }
.btn.danger:hover { border-color: var(--red); color: var(--red-ink); }
.btn[disabled] { opacity: 1; background: transparent; border-color: var(--dark-line); color: var(--on-dark-muted); cursor: not-allowed; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; color: inherit; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 100px; background: var(--card); border: 1px solid var(--line-2); text-decoration: none; font-weight: 700; font-size: 14px; }
.pill.on { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.pill.on:hover { color: var(--on-dark); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink); white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.ink { background: var(--ink); color: #E7C995; }
.chip { padding: 8px 14px; border-radius: 100px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }

/* ---------- Meddelanden ---------- */
.flash { padding: 14px 18px; border-radius: 18px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.flash.ok { background: var(--green-soft); color: var(--green-ink); }
.flash.error { background: var(--red-soft); color: var(--red-ink); }
.note { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 20px; background: var(--gold-soft); font-size: 15px; flex-wrap: wrap; }

/* ---------- Formulär ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .input { min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--card); width: 100%; }
.field textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.field .hint { font-weight: 500; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--bg); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }
.check b { display: block; font-size: 14px; }
.check small { display: block; font-size: 13px; color: var(--muted); }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; }
.radio:has(input:checked) { border: 1.5px solid var(--ink); background: var(--bg); }
.radio input { width: 18px; height: 18px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }
.radio b { display: block; font-size: 14px; }
.radio small { display: block; font-size: 13px; color: var(--muted); white-space: pre-line; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; padding: 0; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 100px; padding: 0 18px; min-height: 48px; width: 300px; max-width: 100%; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; flex: 1; min-width: 0; }

/* ---------- Produkter ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.product { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.product:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,20,19,.07); }
.pimg { position: relative; height: 210px; background: var(--soft); margin: 8px; border-radius: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 12px; }
.pimg .tl { position: absolute; top: 12px; left: 12px; }
.pimg .tr { position: absolute; top: 12px; right: 12px; }
.pimg .tl.badge { background: var(--card); }
.pbody { padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pbody h3 a { text-decoration: none; }
.deco { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.deco::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 5px; }
.pfoot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.price b { font-family: var(--head); font-weight: 600; font-size: 18px; }
.product-big { display: flex; flex-wrap: wrap; gap: 24px; }
.product-big .pimg { flex: 1 1 340px; height: 380px; margin: 0; }

/* ---------- Storleksmatris ---------- */
.matrix { display: flex; flex-wrap: wrap; gap: 10px; }
.matrix label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.matrix input { width: 60px; height: 46px; text-align: center; border-radius: 14px; border: 1px solid var(--line-2); font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); background: var(--card); -moz-appearance: textfield; }
.matrix input::-webkit-inner-spin-button, .matrix input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.matrix input.has { background: var(--gold-soft); border-color: var(--gold); }
.matrix input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }

.bar { height: 10px; border-radius: 100px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 100px; background: var(--ink); transition: width .2s; }
.bar.sm { height: 8px; }
.bar > i.gold { background: var(--gold); }
.bar > i.green { background: var(--green); }
.bar > i.red { background: var(--red); }

.item { border-top: 1px solid var(--soft); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.personal { display: flex; flex-wrap: wrap; gap: 8px; }
.personal .pp { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border-radius: 100px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.personal input { width: 48px; height: 36px; text-align: center; border-radius: 100px; border: 1px solid var(--line-2); font: inherit; font-weight: 700; }

/* ---------- Tidslinje ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps li::before { content: ''; height: 8px; border-radius: 100px; background: var(--soft); }
.steps li.done::before { background: var(--ink); }
.steps li.now::before { background: var(--gold); }
.steps b { font-size: 14px; }
.steps small { font-size: 13px; color: var(--muted); }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.events li { display: flex; gap: 14px; }
.events li::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 6px; }

/* ---------- Tabeller ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 12px; font-weight: 700; white-space: nowrap; }
td { padding: 14px 12px; border-top: 1px solid var(--soft); vertical-align: middle; }
tr.link-row:hover td { background: var(--bg); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.who { display: flex; align-items: center; gap: 12px; }
.who b { display: block; }
.who small { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Summering ---------- */
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #D4D3CB; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid #3A3A36; padding-top: 14px; }
.sum-total b:last-child { font-family: var(--head); font-size: 26px; font-weight: 600; }
.sticky { position: sticky; top: 20px; }
@media (max-width: 900px) { .sticky { position: static; } }

/* ---------- Inloggning ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-art { flex: 1 1 420px; background: var(--ink); color: var(--on-dark); padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.auth-art h1 { font-size: clamp(34px, 4.4vw, 54px); max-width: 520px; position: relative; }
.auth-art p { color: #D4D3CB; max-width: 440px; font-size: 16px; line-height: 1.6; position: relative; margin-top: 16px; }
.auth-art .blob { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--gold); opacity: .3; filter: blur(80px); right: -140px; bottom: -160px; }
.auth-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 64px) 16px; }
.auth-form .box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }

/* ---------- Plaggikoner ---------- */
.garment { width: 128px; height: 128px; }
.garment.lg { width: 220px; height: 220px; }
