/* Ungdomskväll – Svenska kyrkans grafiska profil
   Typsnitt: DM Sans (huvudtypsnitt) + Spectral Italic (betoning)
   Färger: beige grund, svart text, vinröd/rosa/orange/guld (varma skalan – grönt och lila blandas inte in) */

@font-face { font-family: 'DM Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/spectral/spectral-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-024F; }

:root {
  --beige: #FFEBE1;
  --beige-2: #FFF5F0;      /* ljusare ton av beige för kort */
  --beige-3: #F7DCCF;      /* mörkare ton av beige för linjer */
  --svart: #000000;
  --text-2: #4a3a3f;
  --vinrod: #7D0037;
  --vinrod-2: #5e0029;
  --rosa: #FFC3AA;
  --orange: #FF785A;
  --guld: #BC8E4C;
  --radius: 18px;
  --gap: 16px;
  --nav-h: 68px;
  --sans: 'DM Sans', Arial, sans-serif;
  --serif: 'Spectral', 'Times New Roman', serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--beige); color: var(--svart);
  font-family: var(--sans); font-size: 16px; line-height: 1.2;
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--vinrod); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
h1, h2, h3 { font-weight: 500; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 0.98; }
h2 { font-size: 24px; line-height: 1.0; }
h3 { font-size: 18px; line-height: 1.1; }
p { line-height: 1.2; margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------ Ram */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--beige); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--beige-3); }
.brand { display: flex; align-items: center; gap: 10px; min-height: 40px; text-decoration: none; color: inherit; }
.brand img { height: 34px; width: auto; display: block; }
.brand .parish { font-weight: 500; font-size: 16px; }
.brand .sep { width: 1px; height: 22px; background: var(--svart); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--rosa); color: var(--vinrod); font-weight: 700; font-size: 15px;
  display: grid; place-items: center;
}

main { max-width: 760px; margin: 0 auto; padding: 8px 16px calc(var(--nav-h) + 32px + var(--safe-b)); }
.page-head { padding: 12px 0 20px; }
.page-head p { margin-top: 10px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center;
  background: var(--svart); padding-bottom: var(--safe-b);
}
.bottomnav .inner { display: flex; width: 100%; max-width: 560px; }
.bottomnav a {
  flex: 1; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #cdb9b0; text-decoration: none; font-size: 12px; font-weight: 500; position: relative;
}
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--beige); }
.bottomnav a.active::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 28px; height: 14px; transform: translateX(-50%);
  background: var(--rosa); border-radius: 0 0 14px 14px;
}
.bottomnav .badge { position: absolute; top: 8px; right: calc(50% - 22px); }

@media (min-width: 900px) {
  .bottomnav { top: auto; }
}

/* ------------------------------------------------ Hjälte (layoutsystem: kvadrat + kvartscirkel) */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--vinrod); color: var(--beige); padding: 22px 20px 20px;
  margin-bottom: 20px;
}
.hero::after {
  content: ''; position: absolute; right: -1px; top: -1px; width: 96px; height: 96px;
  background: var(--rosa); border-bottom-left-radius: 96px;
}
.hero .kicker { font-size: 14px; color: var(--rosa); margin-bottom: 8px; position: relative; z-index: 1; max-width: calc(100% - 100px); }
.hero h1 { position: relative; z-index: 1; max-width: calc(100% - 70px); }
.hero h1 .serif { display: block; color: var(--rosa); }


/* ------------------------------------------------ Sektioner och kort */
.section { margin: 28px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section h2 { font-size: 22px; }
.section a { font-weight: 500; font-size: 15px; text-decoration: none; }

.list { display: grid; gap: 10px; }
.card {
  background: var(--beige-2); border-radius: var(--radius); padding: 14px;
  display: flex; gap: 14px; align-items: flex-start; position: relative;
  border: 1px solid var(--beige-3);
}
.card.tap { cursor: pointer; transition: transform .08s ease; }
.card.tap:active { transform: scale(.99); }
.card .body { flex: 1; min-width: 0; }
.card h3 { margin-bottom: 4px; overflow-wrap: anywhere; }
.card .meta { color: var(--text-2); font-size: 14px; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.card .meta svg { width: 14px; height: 14px; flex: none; }
.card.mine { background: var(--rosa); border-color: var(--rosa); }
.card.mine .meta { color: #3d1b22; }
.card.past { opacity: .65; }
.card.empty { justify-content: center; text-align: center; color: var(--text-2); padding: 22px; background: transparent; border-style: dashed; }


.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: var(--beige); border: 1px solid var(--beige-3); white-space: nowrap;
}
.chip.full { background: var(--svart); color: var(--beige); border-color: var(--svart); }
.chip.few { background: var(--orange); border-color: var(--orange); color: var(--svart); }
.chip.ok { background: var(--vinrod); color: var(--beige); border-color: var(--vinrod); }
.chip.gold { background: var(--guld); color: var(--svart); border-color: var(--guld); }
.chip.pending { background: var(--orange); border-color: var(--orange); }

.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: var(--svart);
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center;
}

.day-label { font-size: 15px; font-weight: 500; margin: 22px 0 8px; color: var(--text-2); }
.day-label:first-child { margin-top: 4px; }
.day-label::first-letter { text-transform: uppercase; }

/* ------------------------------------------------ Knappar & formulär */
.btn {
  appearance: none; border: 2px solid var(--vinrod); background: var(--vinrod); color: var(--beige);
  border-radius: 999px; padding: 12px 20px; font-weight: 500; font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--vinrod-2); border-color: var(--vinrod-2); }
.btn svg { width: 18px; height: 18px; }
.btn.secondary { background: transparent; color: var(--vinrod); }
.btn.secondary:hover { background: rgba(125, 0, 55, .06); }
.btn.dark { background: var(--svart); border-color: var(--svart); }
.btn.danger { background: transparent; color: #a3001f; border-color: #a3001f; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1 1 140px; }
.icon-btn {
  border: 0; background: transparent; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn svg { width: 22px; height: 22px; }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 25;
  box-shadow: 0 6px 18px rgba(125, 0, 55, .3);
}
@media (min-width: 800px) { .fab { right: calc(50% - 360px); } }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 500; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--text-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 2px solid var(--beige-3); background: #fff; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; min-height: 48px; outline: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.3; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--vinrod); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .grid-2.stack { grid-template-columns: 1fr; } }
.error { background: #ffe1d9; border-left: 4px solid var(--orange); padding: 10px 12px; border-radius: 8px; font-size: 15px; margin-bottom: 14px; }

/* Segmenterad kontroll */
.seg { display: flex; background: var(--beige-3); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 10px 14px; border-radius: 999px; font-weight: 500; cursor: pointer; white-space: nowrap; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button.active { background: var(--svart); color: var(--beige); }

/* ------------------------------------------------ Inloggning */
.auth { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top {
  position: relative; background: var(--vinrod); color: var(--beige); padding: 28px 20px 36px; overflow: hidden;
  padding-top: max(28px, env(safe-area-inset-top));
}
.auth-top::before {
  content: ''; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--rosa);
}
.auth-top::after {
  content: ''; position: absolute; right: 80px; bottom: -1px; width: 60px; height: 60px; background: var(--orange); border-top-left-radius: 60px;
}
.auth-top .brand { color: var(--beige); margin-bottom: 40px; position: relative; z-index: 1; }
.auth-top .brand .sep { background: var(--beige); }
.auth-top h1 { font-size: 42px; position: relative; z-index: 1; max-width: 300px; }
.auth-top h1 .serif { display: block; color: var(--rosa); }
.auth-body { padding: 24px 20px 40px; max-width: 480px; width: 100%; margin: 0 auto; }
.auth-body .switch { text-align: center; margin-top: 18px; font-size: 15px; }
.auth-body .switch button { border: 0; background: none; color: var(--vinrod); font-weight: 500; text-decoration: underline; cursor: pointer; padding: 4px; }
@media (min-width: 800px) {
  .auth { flex-direction: row; }
  .auth-top { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
  .auth-top h1 { font-size: 56px; max-width: 420px; }
  .auth-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px; }
}

.waiting { text-align: left; }
.waiting .shape { width: 72px; height: 72px; background: var(--rosa); border-top-right-radius: 72px; margin-bottom: 20px; }

/* ------------------------------------------------ Bottenark / dialog */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(40, 0, 18, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
.sheet {
  background: var(--beige); width: 100%; max-width: 620px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 24px 24px 0 0; padding: 8px 20px calc(24px + var(--safe-b));
  animation: up .2s ease;
}
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 24px; max-height: 86dvh; }
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--beige-3); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { padding-top: 8px; overflow-wrap: anywhere; }
.sheet .desc { white-space: pre-wrap; line-height: 1.3; margin: 12px 0; }
.info-rows { display: grid; gap: 10px; margin: 14px 0; }
.info-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.3; }
.info-row svg { width: 20px; height: 20px; flex: none; color: var(--vinrod); margin-top: 1px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }


/* ------------------------------------------------ Toast */
.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%);
  background: var(--svart); color: var(--beige); padding: 12px 18px; border-radius: 14px; z-index: 60; font-weight: 500;
  max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: up .2s ease;
}
.toast.err { background: var(--orange); color: var(--svart); }

}

/* ------------------------------------------------ Ledare */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stat {
  background: var(--beige-2); border: 1px solid var(--beige-3); border-radius: var(--radius); padding: 14px 12px;
}
.stat b { display: block; font-size: 28px; font-weight: 500; line-height: 1; }
.stat span { font-size: 13px; color: var(--text-2); display: block; margin-top: 6px; line-height: 1.2; }
.stat.accent { background: var(--vinrod); color: var(--beige); border-color: var(--vinrod); }
.stat.accent span { color: var(--rosa); }

.person { align-items: center; }
.person .initials {
  flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--beige); border: 1px solid var(--beige-3);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--vinrod);
}
.count { font-weight: 500; font-size: 15px; white-space: nowrap; text-align: right; }
.count small { display: block; color: var(--text-2); font-weight: 400; font-size: 12px; margin-top: 2px; }

  border: 2px solid var(--beige-3); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.divider { height: 1px; background: var(--beige-3); margin: 18px 0; }
.search { margin-bottom: 12px; }
.note { background: var(--beige-2); border: 1px solid var(--beige-3); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.3; }

.logo-preview { background: #fff; border: 1px solid var(--beige-3); border-radius: 12px; padding: 14px; display: flex; align-items: center; min-height: 64px; }
.logo-preview img { max-height: 44px; max-width: 100%; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--beige-3); border-top-color: var(--vinrod); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.btn-row .btn.small { flex: 0 0 auto; }

/* Tips: lägg appen på hemskärmen */
.install-card { display: flex; gap: 14px; align-items: flex-start; background: var(--beige-2); border: 2px dashed var(--guld); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.install-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-card .body { flex: 1; min-width: 0; }
.install-card h3 { margin-bottom: 6px; }
.install-card p { line-height: 1.35; font-size: 15px; }
.install-card .btn { margin-top: 10px; }
.install-card .icon-btn { margin: -8px -8px 0 0; }

/* Notiser */
.push-card { border-color: var(--vinrod); }
.push-card .bell { width: 48px; height: 48px; border-radius: 12px; border-top-right-radius: 24px; background: var(--vinrod); color: var(--beige); display: grid; place-items: center; flex: none; }
.push-card .bell svg { width: 26px; height: 26px; }
.radio input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--vinrod); margin: 0; flex: none; }
.leader-chips { margin-top: 2px; }
.leader-chips .chip { cursor: pointer; font-size: 14px; padding: 7px 12px; }
/* Ledarens startsida */
.leader-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.leader-stats div { background: rgba(255, 235, 225, .12); border-radius: 12px; padding: 12px 10px; }
.leader-stats div.warn { background: var(--rosa); color: var(--vinrod); }
.leader-stats b { display: block; font-size: 28px; font-weight: 500; line-height: 1; }
.leader-stats span { display: block; font-size: 13px; margin-top: 6px; line-height: 1.2; }
.card.needs { border-left: 4px solid var(--orange); }

/* ================================================ Ungdomskväll */
.brand .app-name { font-weight: 500; font-size: 16px; }

/* Incheckning */
.checkin-hero { padding-bottom: 22px; }
.checkin-hero .when { position: relative; z-index: 1; margin-top: 10px; color: var(--beige); font-size: 16px; }
.big-check {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  margin-top: 26px; min-height: 92px; border: 0; cursor: pointer; border-radius: 26px 70px 26px 26px;
  background: var(--beige); color: var(--vinrod); font-size: 26px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 8px 0 var(--vinrod-2); transition: transform .08s ease, box-shadow .08s ease; -webkit-tap-highlight-color: transparent;
}
.big-check svg { width: 34px; height: 34px; }
.big-check:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--vinrod-2); }
.big-check:disabled { opacity: .7; }
.checked-box {
  position: relative; z-index: 1; margin-top: 24px; background: var(--rosa); color: var(--svart);
  border-radius: 26px 70px 26px 26px; padding: 18px 18px 20px; display: flex; gap: 14px; align-items: center;
}
.checked-box .tick { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--vinrod); color: var(--beige); display: grid; place-items: center; animation: pop .35s ease; }
.checked-box .tick svg { width: 30px; height: 30px; }
.checked-box b { display: block; font-size: 22px; font-weight: 500; line-height: 1.05; }
.checked-box span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.3; }
.closed-box {
  position: relative; z-index: 1; margin-top: 24px; border: 2px dashed rgba(255, 235, 225, .6); border-radius: 26px;
  padding: 16px 18px; line-height: 1.35;
}
.closed-box b { display: block; font-size: 20px; font-weight: 500; margin-bottom: 2px; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }

.welcome { line-height: 1.4; margin: 4px 2px 20px; white-space: pre-wrap; }
.bday { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; position: relative; z-index: 1; background: var(--guld); color: var(--svart); border-radius: 999px; padding: 6px 12px; font-weight: 500; font-size: 14px; }
.visits-line { position: relative; z-index: 1; margin-top: 14px; font-size: 15px; color: var(--rosa); }

.profile-line { display: flex; align-items: center; gap: 12px; }
.profile-line .initials { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--rosa); color: var(--vinrod); display: grid; place-items: center; font-weight: 700; }
.foot-link { text-align: center; margin: 34px 0 0; font-size: 14px; }
.foot-link a { color: var(--text-2); }

/* Födelsedag */
.bdate { display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 8px; }
.bdate select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237D0037' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 30px; }
.age-hint { font-size: 14px; color: var(--vinrod); font-weight: 500; min-height: 18px; }

/* Ledare: kvällen */
.count-hero { display: flex; align-items: flex-end; gap: 14px; position: relative; z-index: 1; margin-top: 18px; }
.count-hero b { font-size: 76px; font-weight: 500; line-height: .85; letter-spacing: -0.03em; }
.count-hero span { font-size: 17px; line-height: 1.2; padding-bottom: 6px; }
.status-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; background: rgba(255, 235, 225, .14); }
.status-pill i { width: 10px; height: 10px; border-radius: 50%; background: #cdb9b0; display: block; }
.status-pill.open i { background: #7CE0A0; box-shadow: 0 0 0 4px rgba(124, 224, 160, .25); }
.hero .btn.light { background: var(--beige); border-color: var(--beige); color: var(--vinrod); }
.hero .btn.ghost { background: transparent; border-color: rgba(255, 235, 225, .6); color: var(--beige); }
.hero .actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero .actions .btn { flex: 1 1 150px; }

.person .who { flex: 1; min-width: 0; }
.person .who h3 { margin: 0 0 3px; font-size: 17px; }
.person .who .meta { gap: 2px 10px; }
.call-btns { display: flex; gap: 6px; flex: none; }
.call {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: var(--vinrod); color: var(--beige); border: 2px solid var(--vinrod);
}
.call.sms { background: transparent; color: var(--vinrod); }
.call svg { width: 20px; height: 20px; }
.tel-link { font-weight: 500; text-decoration: none; white-space: nowrap; }
.chip.new { background: var(--orange); border-color: var(--orange); color: var(--svart); }
.chip.bd { background: var(--guld); border-color: var(--guld); }
.chip.tiny { font-size: 12px; padding: 2px 8px; }

/* Ledare: statistik */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 8px 2px 0; }
.bars .bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; cursor: pointer; background: none; border: 0; padding: 0; }
.bars .bar i { display: block; width: 100%; max-width: 40px; background: var(--vinrod); border-radius: 8px 8px 3px 3px; min-height: 4px; }
.bars .bar:nth-child(even) i { border-top-right-radius: 20px; }
.bars .bar b { font-size: 13px; font-weight: 500; }
.bars .bar small { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.bars .bar.last i { background: var(--orange); }
.chart-card { background: var(--beige-2); border: 1px solid var(--beige-3); border-radius: var(--radius); padding: 14px 12px 10px; }
.ev-row { align-items: center; }
.ev-row .num { font-size: 24px; font-weight: 500; min-width: 44px; text-align: right; }
.ev-row .meter { height: 6px; border-radius: 3px; background: var(--beige-3); margin-top: 8px; overflow: hidden; }
.ev-row .meter i { display: block; height: 100%; background: var(--vinrod); border-radius: 3px; }

/* Ledare: veckodagar */
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { position: relative; }
.days input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.days span { display: inline-grid; place-items: center; min-width: 48px; height: 44px; padding: 0 10px; border-radius: 999px; border: 2px solid var(--beige-3); background: #fff; font-weight: 500; font-size: 15px; }
.days input:checked + span { background: var(--vinrod); border-color: var(--vinrod); color: var(--beige); }
.days input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.msg-log { display: grid; gap: 8px; }
.msg-log .note b { display: block; margin-bottom: 2px; }
.pick-list { display: grid; gap: 6px; max-height: 50dvh; overflow-y: auto; margin-top: 8px; }
.pick-list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--beige-3); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 16px; }
.pick-list button:disabled { opacity: .5; cursor: default; }
.back-link { font-weight: 500; text-decoration: none; color: var(--vinrod); display: inline-flex; align-items: center; gap: 4px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; background: var(--beige-2); border: 1px solid var(--beige-3); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.35; margin-bottom: 18px; }
.privacy-note svg { color: var(--vinrod); flex: none; margin-top: 1px; }
.section .btn { flex: none; }

/* Guide: hemskärmen och notiser */
.guide-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-weight: 500; font-size: 15px; text-decoration: none; }
.guide-link svg { width: 16px; height: 16px; }
.install-card .btn + .guide-link { margin-left: 12px; }
.help-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--beige-3); background: var(--beige-2); color: inherit; text-decoration: none; line-height: 1.3; }
.help-row > svg { width: 24px; height: 24px; flex: none; color: var(--vinrod); }
.help-row > svg:last-child { width: 18px; height: 18px; margin-left: auto; }
.help-row .muted { font-size: 14px; }
.hbadge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border-top-right-radius: 4px; background: var(--vinrod); color: var(--beige); font-size: 16px; font-weight: 700; margin-right: 10px; vertical-align: 2px; }
.hsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hstep { display: flex; gap: 12px; align-items: flex-start; background: var(--beige-2); border: 1px solid var(--beige-3); border-radius: var(--radius); padding: 14px; line-height: 1.35; }
.hstep b { display: block; font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.hstep p { font-size: 15px; line-height: 1.45; }
.hstep p b { display: inline; font-size: inherit; margin: 0; }
.hnum { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--rosa); color: var(--vinrod); display: grid; place-items: center; font-weight: 700; }
.kbd { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; background: #fff; border: 1px solid var(--beige-3); border-radius: 8px; padding: 2px 7px; font-weight: 500; white-space: nowrap; }
.kbd svg { width: 16px; height: 16px; color: #0a63d6; }
#installBtn, #pushBtn { margin-top: 12px; }
#installBtn:empty, #pushBtn:empty { margin: 0; }
.hstatus { background: #fff; border: 2px solid var(--beige-3); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.hstat { display: flex; gap: 10px; align-items: flex-start; line-height: 1.3; }
.hstat b { display: block; font-weight: 500; }
.hstat span { font-size: 14px; color: var(--text-2); }
.hdot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed #b49a8f; display: grid; place-items: center; }
.hstat.ok .hdot { background: var(--vinrod); border: 2px solid var(--vinrod); color: var(--beige); }
.hdot svg { width: 15px; height: 15px; }
.hfix { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; font-size: 15px; }

/* Sms till de utan notiser */
.sms-list { max-height: 34dvh; }
.sms-pick { display: flex; align-items: center; gap: 12px; border: 2px solid var(--beige-3); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; line-height: 1.3; }
.sms-pick input { width: 20px; height: 20px; accent-color: var(--vinrod); flex: none; margin: 0; }
.sms-one { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 2px solid var(--beige-3); background: #fff; border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit; line-height: 1.3; }
.sms-go { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--vinrod); color: var(--beige); display: grid; place-items: center; }
.sms-go svg { width: 18px; height: 18px; }
.sms-one.done { opacity: .6; }
.sms-one.done .sms-go { background: var(--rosa); color: var(--vinrod); }
.seg-small button { padding: 8px 12px; font-size: 14px; }
.link-btn { border: 0; background: none; color: var(--vinrod); font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; cursor: pointer; padding: 4px 2px; }
