/* Gemensam stil för backoffice och admin. Färger som tokens, ljust och mörkt läge. */
:root {
  /* Pingsys designkoder (samma som på webbplatsen): elfenben, skogsgrönt och dämpad mässing. */
  --bg: #F3EEE2; --surface: #FCFBF7; --surface-2: #F6F2E9; --ink: #101E19; --muted: #536157; --line: #D8D1C3;
  --accent: #183B30; --accent-ink: #FCFBF7; --accent-soft: #E8F0E9; --accent-hover: #102B23;
  --brass: #B39B68; --brass-ink: #75613B; --control: #7B8477;
  --draft: #79571D; --draft-soft: #F6EDD8; --live: #24583F; --live-soft: #E8F0E9;
  --warn: #9B302B; --warn-soft: #F9EAE6; --allergen: #79571D; --allergen-soft: #F6EDD8; --phone: #101E19;
  --field: #FCFBF7;
  --radius: 10px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --heading: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Mörkt läge: varm skogsgrön i tre tydliga nivåer (bakgrund, kort, fält), elfenbensvit text och mässing.
   Följer telefonen, men kan väljas fast under "Utseende" (data-theme="light" eller "dark" på html). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E3029; --surface: #2A3F36; --surface-2: #33493F; --field: #22362E; --ink: #F3EEE2; --muted: #C3CCC2; --line: #42594E;
    --accent: #D4BE8C; --accent-ink: #1A2B24; --accent-soft: #3A4F42; --accent-hover: #E2CEA2;
    --brass: #D4BE8C; --brass-ink: #E2CEA2; --control: #8E9B90;
    --draft: #EBCB8B; --draft-soft: #4B3F25; --live: #9AD3AF; --live-soft: #2C4A39;
    --warn: #F4A991; --warn-soft: #52332A; --allergen: #EBCB8B; --allergen-soft: #4B3F25; --phone: #0E1814;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #1E3029; --surface: #2A3F36; --surface-2: #33493F; --field: #22362E; --ink: #F3EEE2; --muted: #C3CCC2; --line: #42594E;
    --accent: #D4BE8C; --accent-ink: #1A2B24; --accent-soft: #3A4F42; --accent-hover: #E2CEA2;
    --brass: #D4BE8C; --brass-ink: #E2CEA2; --control: #8E9B90;
    --draft: #EBCB8B; --draft-soft: #4B3F25; --live: #9AD3AF; --live-soft: #2C4A39;
    --warn: #F4A991; --warn-soft: #52332A; --allergen: #EBCB8B; --allergen-soft: #4B3F25; --phone: #0E1814;
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, .card h2, .pagehead h1 { font-family: var(--heading); font-weight: 400; letter-spacing: -0.02em; }
[hidden] { display: none !important; }

.app { max-width: 600px; margin: 0 auto; padding: 0 16px 120px; display: flex; flex-direction: column; gap: 14px; }
.app.wide { max-width: 1180px; }

/* Topprad */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; }
.brand .mark { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--accent); font-weight: 800; }
.brand .mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
select.pick { appearance: none; -webkit-appearance: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 34px 9px 12px; font-weight: 700; min-width: 0; max-width: 62vw;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; border: 0; background: none; border-radius: 9px; padding: 8px 7px; font-weight: 700; font-size: 12.5px; letter-spacing: -.01em; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs.more { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.tabs.more.less { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent); }
.tabs.less:not(.more) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Kort och fält */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2, .card h3 { margin: 0; font-size: 17px; }
.card h2 { font-size: 19px; }
.card p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=month], select.input, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--field); border-radius: 8px; padding: 10px 12px; font-size: 16px; min-width: 0;
}
input[type=text]:focus, input[type=search]:focus, input[type=email]:focus, input[type=password]:focus, input[type=tel]:focus, input[type=number]:focus, select.input:focus, textarea:focus { border-color: var(--control); }
textarea { resize: vertical; min-height: 70px; }
input:disabled, textarea:disabled, select:disabled { opacity: .6; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

.btn { font-weight: 600; font-size: 15px; border-radius: 8px; padding: 11px 16px; min-height: 44px; transition: background-color .16s ease; border: 1px solid transparent; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn:not(.ghost):not(.danger):not(:disabled):hover { background: var(--accent-hover); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.btn.sm { font-size: 13px; padding: 8px 12px; border-radius: 8px; min-height: 36px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.draft { background: var(--draft-soft); color: var(--draft); }
.pill.live { background: var(--live-soft); color: var(--live); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.none { background: var(--surface-2); color: var(--muted); }
.pill.info { background: var(--accent-soft); color: var(--accent); }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.empty h2 { margin: 0; font-size: 19px; }
.empty p { margin: 0; color: var(--muted); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-family: var(--mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--surface-2); }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.scroll-x { overflow-x: auto; }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 10; }
.bottom .in { max-width: 568px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.bottom .btn { flex: 1; }
.bottom .hint { font-size: 12px; color: var(--muted); max-width: 46%; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 50; max-width: min(90vw, 480px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.error { background: var(--warn); color: #fff; }

/* Inloggning */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 400px; }
.auth h1 { margin: 0; font-size: 22px; }
/* Inloggningen: ljus grund, foto, logga och läsbara fält (samma designkoder som webbplatsen) */
.auth2 { padding: 0; place-items: stretch; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.auth-photo { display: block; position: relative; overflow: hidden; }
.auth-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-side { display: grid; place-items: center; padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 5vw, 40px); display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 24px rgb(16 30 25 / 6%); }
.auth-card h1 { font-family: var(--heading); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -0.025em; text-align: center; text-wrap: balance; }
.auth-sub { text-align: center; margin: -6px 0 0; }
.auth-resto { display: grid; place-items: center; margin-top: -4px; }
.auth-rlogo { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; color: #fff; font: 600 34px/1 var(--heading); box-shadow: 0 6px 18px rgb(16 30 25 / 14%); }
.auth-rlogo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.auth-brand-sm { font-size: 13px; opacity: .75; }
.auth-brand-sm .auth-mark { transform: scale(.75); }
.auth-other { align-self: center; text-align: center; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; justify-content: center; text-decoration: none; color: var(--ink); font: 400 24px/1 var(--heading); letter-spacing: -0.03em; }
.auth-mark { width: 36px; height: 36px; border-radius: 9px; background: #183B30; display: grid; place-items: center; }
.authform { display: flex; flex-direction: column; gap: 14px; }
.authform .field .lbl { font-weight: 500; color: var(--ink); font-size: 14px; }
.authform input { min-height: 48px; border-color: var(--control) !important; }
.authform .btn { min-height: 48px; font-size: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pw-eye[aria-pressed="true"] { color: var(--ink); }
.auth-links { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: 14px; }
.auth-links::before { content: ""; grid-column: 2; grid-row: 1; width: 1px; height: 26px; background: var(--line); }
.auth-links > :first-child { grid-column: 1; grid-row: 1; justify-self: start; }
.auth-links > :last-child { grid-column: 3; grid-row: 1; justify-self: end; }
.auth-links a, .linkbtn { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: .3em; background: none; border: 0; padding: 10px 0; font: inherit; cursor: pointer; }
.auth-foot { border-top: 1px solid var(--line); padding-top: 14px; text-align: center; font-size: 13.5px; color: var(--muted); display: grid; gap: 10px; }
.auth-foot b { display: block; color: var(--ink); font-weight: 500; }
.auth-install:empty { display: none; }
@media (max-width: 860px) { .auth2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: 180px auto; } .auth-side { place-items: start center; padding-top: 0; } .auth-card { margin-top: -48px; position: relative; } }

/* Meny-redigering */
.weekrow { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.navbtn { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.weekinfo { text-align: center; }
.weekinfo .w { font-weight: 800; font-size: 20px; line-height: 1.1; }
.weekinfo .d { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.statusbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.save { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dayhead .n { font-weight: 800; }
.dayhead .dt { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; }
.tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 8px; margin-left: 6px; }
.dish { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.dishtop { display: flex; gap: 8px; align-items: flex-start; }
.dishtop textarea { flex: 1; min-height: 46px; resize: none; overflow: hidden; background: var(--field); font-weight: 600; }
.iconbtn { width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--muted); font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.chip.diet[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.alg[aria-pressed="true"] { background: var(--allergen-soft); border-color: var(--allergen); color: var(--allergen); }
.chip.more { border-style: dashed; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--allergen-soft); color: var(--allergen); }
.add { border: 1px dashed var(--line); background: none; border-radius: 12px; padding: 10px; font-weight: 700; color: var(--accent); cursor: pointer; }
.lock { background: var(--phone); border-radius: 22px; padding: 14px; }
.notif { background: var(--surface); border-radius: 16px; padding: 10px 12px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.notif .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.notif .ic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.notif .t { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.notif .t span { font-weight: 400; color: var(--muted); }
.notif .m { font-size: 13px; line-height: 1.35; }
.suggest { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.tpl { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.tpl ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.rotrow { display: grid; grid-template-columns: minmax(0, 12.5em) minmax(0, 1fr); gap: 8px; align-items: center; }
.rotrow .no { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.rotrow .no small { font-family: var(--font, inherit); opacity: .8; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.seg3 button { padding: 9px 6px; font-size: 13.5px; }
.kindhelp { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.logoedit { display: flex; gap: 14px; align-items: center; }
.logoedit .big { width: 88px; height: 88px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 28px; color: var(--accent); flex: none; }
.logoedit .big img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.codein { font-family: var(--mono); font-size: 24px !important; letter-spacing: .2em; text-transform: uppercase; text-align: center; }
.stampres { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Admin-layout */
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; }
.side button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--muted); cursor: pointer; display: flex; justify-content: space-between; }
.side button[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.side .count { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border-radius: 99px; padding: 1px 8px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .side { position: static; flex-direction: row; overflow-x: auto; } .side button { white-space: nowrap; } }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-size: 24px; }
.status-lead { background: var(--surface-2); color: var(--muted); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.subtabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.subtabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline .item { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.timeline .item.task { border-left-color: var(--draft); }
.timeline .item.done { opacity: .6; }
.timeline .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invrows td:last-child { text-align: right; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Lista över skickade notiser (läsbar i mobilen) */
.nlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nlist li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.nlist .nmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.nlist p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }

/* QR-kod i admin */
.qrrow { display: flex; gap: 16px; align-items: center; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.qrrow > div:last-child { flex: 1 1 220px; }
.qr { width: 132px; height: 132px; flex: none; background: #fff; border-radius: 8px; overflow: hidden; }
.qr svg { width: 100%; height: 100%; display: block; }

/* Veckomeny: verktygsrad, utfällbara dagar, spartillstånd */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select.input { flex: 1 1 200px; min-width: 0; }
.day { padding: 0; overflow: hidden; }
.daysum { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "dn chev" "ds chev" "dp chev"; gap: 2px 10px; align-items: center; text-align: left; background: none; border: 0; padding: 14px 16px; cursor: pointer; color: inherit; min-height: 56px; }
.daysum:hover { background: var(--surface-2); }
.daysum .dn { grid-area: dn; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.daysum .dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.daysum .ds { grid-area: ds; font-size: 13px; font-weight: 600; color: var(--live); }
.daysum .ds.closed { color: var(--muted); }
.daysum .ds.empty { color: var(--draft); }
.daysum .dp { grid-area: dp; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.daysum .chev { grid-area: chev; color: var(--muted); font-size: 14px; }
.daybody { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.copyday { flex-wrap: nowrap; padding-top: 4px; }
.copyday select.input { flex: 1; min-width: 0; }
.save.error { color: var(--warn); font-weight: 700; }
.save.saved { color: var(--live); }
.save.saving, .save.pending { color: var(--muted); }
.plan { font-size: 13px; border-radius: 10px; padding: 8px 12px; margin-top: 8px; background: var(--accent-soft); color: var(--accent); }
.plan.soon { background: var(--draft-soft); color: var(--draft); }
.plan.past { background: var(--surface-2); color: var(--muted); }
.dish textarea, .dishtop textarea { overflow-wrap: anywhere; }

/* Blad (dialog) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(10,14,12,.45); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .sheet { align-items: center; padding: 24px; } }
.sheetin { background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { .sheetin { border-radius: 20px; padding: 22px; } }
.sheetin h2 { margin: 0; font-size: 20px; }
.sheetbody { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sheetactions { justify-content: flex-end; flex-direction: row-reverse; }
.sheetactions .btn { flex: 1 1 140px; }

/* Granskning */
.review { display: flex; flex-direction: column; gap: 10px; }
.review p { margin: 0; }
.rv-h { font-weight: 700; }
.rv-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv-days li { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 14px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.rv-days li span { overflow-wrap: anywhere; }
.rv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.rv-row b { text-align: right; overflow-wrap: anywhere; }
.rv-n { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rv-n p { font-size: 14px; }
.rv-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rv-facts { margin: 0; display: grid; gap: 0; }
.rv-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rv-facts dt { color: var(--muted); }
.rv-facts dd { margin: 0; font-weight: 700; text-align: right; }
.ok { font-weight: 700; color: var(--live); font-size: 17px; }

/* Gästförhandsvisning */
.gprev { background: #12302A; color: #F4EEDF; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.gh { display: flex; flex-direction: column; gap: 2px; }
.gh b { font-size: 18px; }
.gh span { font-size: 12px; opacity: .75; }
.gday { background: rgba(244,238,223,.08); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.gd { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.gdish { display: flex; flex-direction: column; gap: 2px; }
.gt { font-weight: 700; overflow-wrap: anywhere; }
.gs { font-size: 13px; opacity: .85; overflow-wrap: anywhere; }
.gv { font-size: 12px; color: #A8DDB0; font-weight: 600; }
.ga { font-size: 12px; color: #F2C98A; }
.gm { font-size: 13px; opacity: .7; }
.gf { font-size: 13px; opacity: .85; }

/* Stämpling */
.stamprow { flex-wrap: nowrap; }
.stamprow .codein { flex: 1; min-width: 0; }
@media (max-width: 420px) { .stamprow { flex-wrap: wrap; } .stamprow .codein { flex-basis: 100%; } .stamprow .btn { flex: 1; } }
.stampres { border: 1px solid transparent; }
.stampres.stamp { background: var(--live-soft); }
.stampres.undo { background: var(--surface-2); }
.stampres.error { background: var(--warn-soft); border-color: var(--warn); }
.sr-main { display: flex; flex-direction: column; gap: 2px; }
.sr-main b { font-size: 17px; }
.sr-count { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.sr-ref { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--live); background: var(--live-soft); border-radius: 8px; padding: 6px 10px; }
.scanner { position: relative; border-radius: 14px; overflow: hidden; background: #000; display: flex; flex-direction: column; }
.scanvideo { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.scanframe { position: absolute; inset: 18% 18% auto; aspect-ratio: 1; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; pointer-events: none; }
.scanner .small { background: var(--surface); padding: 10px 0 0; }

/* Notiser */
.nplan { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.npreview { background: var(--phone); border-radius: 16px; padding: 12px; }
.npreview .np-app { font-size: 12px; font-weight: 700; color: #fff; opacity: .8; margin-bottom: 4px; }
.npreview .np-body { background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.senderr:empty { display: none; }
.senderr { color: var(--warn); }

/* Säljflöde i admin */
.salesform { display: flex; flex-direction: column; gap: 14px; }
.salesform input[type=color] { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex: none; }
.salesform textarea { min-height: 220px; font-family: var(--mono); font-size: 13px; }
.hoursgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.sp { width: 220px; border-radius: 16px; overflow: hidden; background: #F6F1E7; box-shadow: 0 1px 3px rgba(0,0,0,.12); font-size: 13px; color: #1D2420; }
.sp-hd { display: flex; gap: 8px; align-items: center; padding: 10px 12px; }
.sp-hd img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; }
.sp-hd b { font-family: Georgia, serif; font-size: 16px; color: var(--b); }
.sp-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--b); color: #fff; display: grid; place-items: center; font-weight: 700; }
.sp-lunch { margin: 0 10px 10px; background: var(--b); color: #F6F1E7; border-radius: 12px; padding: 10px 12px; display: grid; gap: 1px; }
.sp-lunch small { color: var(--a); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
.sp-lunch b { font-family: Georgia, serif; font-size: 20px; }
.parsed { display: grid; gap: 6px; align-content: start; }
.pd { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 14px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.flow li { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; counter-increment: f; }
.flow li::before { content: counter(f); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.flow li.done::before { content: "✓"; background: var(--live-soft); color: var(--live); }
.flow li.warn::before { background: var(--warn-soft); color: var(--warn); }
.flow li span { font-size: 13px; color: var(--muted); }
.linkrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.linkrow span { color: var(--muted); }
.linkrow a { overflow-wrap: anywhere; }
@media (max-width: 640px) { .linkrow { grid-template-columns: 1fr auto; } .linkrow span { grid-column: 1 / -1; } }
.mailprev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mailprev > div { display: grid; grid-template-columns: 60px 1fr; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mailprev > div span { color: var(--muted); }
.mailprev pre { margin: 0; padding: 12px; white-space: pre-wrap; font: 14px/1.5 var(--font); max-height: 320px; overflow: auto; background: var(--surface-2); }

/* Kundens startsida */
.start { min-height: 100vh; display: flex; flex-direction: column; }
.st-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.st-brand { display: flex; gap: 10px; align-items: center; }
.st-brand .mark { width: 36px; height: 36px; border-radius: 10px; background: #183B30; display: grid; place-items: center; flex: none; }
.st-brand .mark svg { width: 25px; height: 25px; display: block; }
.st-brand b { display: block; font-size: 16px; line-height: 1.1; }
.st-brand small { color: var(--muted); font-size: 12px; }
.st-steps { list-style: none; display: flex; gap: 6px; justify-content: center; margin: 18px auto 0; padding: 0 16px; flex-wrap: wrap; }
.st-steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.st-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.st-steps li.on { color: var(--ink); border-color: var(--accent); }
.st-steps li.on span { background: var(--accent); color: var(--accent-ink); }
.st-steps li.done span { background: var(--live-soft); color: var(--live); }
.st-main { width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.st-main h1 { margin: 0; font-size: 28px; line-height: 1.15; }
.st-main .lead { margin: -4px 0 4px; color: var(--muted); font-size: 16px; }
.st-app { flex-direction: row; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.st-appinfo { display: flex; gap: 14px; align-items: center; min-width: 0; }
.st-appinfo img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.st-appinfo b { display: block; font-size: 18px; }
.st-appinfo a { font-size: 14px; overflow-wrap: anywhere; }
.st-qrbox { display: grid; justify-items: center; gap: 6px; }
.st-qr { width: 132px; height: 132px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
.st-qr svg, .qp-code svg { width: 100%; height: 100%; display: block; }
.st-actions { gap: 12px; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.st-form { display: flex; flex-direction: column; gap: 14px; }
.st-form textarea { min-height: 84px; }
.st-price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-price div { display: grid; gap: 2px; }
.st-price span { font-size: 13px; color: var(--muted); }
.st-price b { font-size: 18px; }
.st-price p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 560px) { .st-price { grid-template-columns: 1fr; } }
.st-agreement { max-height: 460px; overflow-y: auto; }
.agreement h2 { font-size: 20px; margin: 0 0 6px; }
.agreement h3 { font-size: 15px; margin: 14px 0 4px; }
.agreement p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; }
.st-accept { align-items: flex-start; font-weight: 500; line-height: 1.45; }
.st-done { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 16px 0 6px; }
.st-check { width: 64px; height: 64px; border-radius: 50%; background: var(--live-soft); color: var(--live); display: grid; place-items: center; font-size: 32px; font-weight: 800; }
.sigblock { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.sigblock p { margin: 0 0 6px; overflow-wrap: anywhere; }
.st-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px; }
@media print {
  .no-print, .st-top, .st-foot, .st-steps, .toast { display: none !important; }
  body, .start, .st-main { background: #fff !important; color: #000 !important; }
  .st-agreement { max-height: none; overflow: visible; border: 0; box-shadow: none; }
}

/* QR-utskrift */
.qp-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 2; }
.qp-wrap { max-width: 600px; margin: 60px auto; padding: 0 16px; }
.qp-page { width: 210mm; min-height: 297mm; margin: 20px auto; background: #fff; color: #111; box-shadow: 0 2px 12px rgba(0,0,0,.12); box-sizing: border-box; }
.qp-poster { padding: 22mm 18mm; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8mm; border-top: 10mm solid var(--b); }
.qp-poster h1 { font: 700 34pt/1.1 Georgia, serif; color: var(--b); margin: 0; }
.qp-logo { max-width: 90mm; max-height: 36mm; object-fit: contain; }
.qp-name { font: 700 22pt Georgia, serif; color: var(--b); }
.qp-sub { font-size: 15pt; margin: 0; max-width: 150mm; color: #333; }
.qp-code { width: 34mm; height: 34mm; }
.qp-code.big { width: 110mm; height: 110mm; }
.qp-foot { font-size: 13pt; color: #333; margin-top: auto; }
.qp-tents { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.qp-tent { border: 1px dashed #bbb; padding: 10mm 8mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4mm; border-top: 5mm solid var(--b); }
.qp-tent img { max-width: 55mm; max-height: 18mm; object-fit: contain; }
.qp-tent .qp-code { width: 50mm; height: 50mm; }
.qp-t1 { font: 700 16pt/1.15 Georgia, serif; color: var(--b); text-wrap: balance; }
.qp-t2 { font-size: 9.5pt; color: #333; max-width: 70mm; }
.qp-t3 { font-size: 7.5pt; color: #777; letter-spacing: .02em; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  .qp-page { margin: 0; box-shadow: none; page-break-after: always; break-after: page; height: 297mm; }
}
@media screen and (max-width: 840px) { .qp-page { transform-origin: top left; zoom: .45; } }

/* Pipeline */
.pipe-stages { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.pipe-stage { flex: none; display: flex; gap: 8px; align-items: baseline; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px; }
.pipe-stage b { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pipe-stage[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pipe-stage[aria-pressed="true"] b { color: inherit; }
.pipe-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 10px; }
@media (max-width: 760px) { .pipe-filters { grid-template-columns: 1fr 1fr; } .pipe-filters > :first-child { grid-column: 1 / -1; } }
.pipe-table td { vertical-align: top; }
.pipe-name { min-width: 220px; max-width: 340px; }
.pipe-note { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pipe-contact { min-width: 170px; font-size: 14px; overflow-wrap: anywhere; }
.pipe-select { min-width: 170px; }
.pipe-date { min-width: 140px; }
.pipe-add { flex-wrap: wrap; align-items: center; }
.pipe-add .input { flex: 1 1 180px; }
.pipe-sender summary { cursor: pointer; font-weight: 700; }
.prio { margin-left: 8px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.prio.p1 { background: var(--live-soft); color: var(--live); }
.prio.p2 { background: var(--draft-soft); color: var(--draft); }
.prio.p3 { background: var(--surface-2); color: var(--muted); }
.warn-text { color: var(--warn); font-weight: 700; }
.kpi.plain { text-decoration: none; color: inherit; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Erbjudanden och rabatter per kund */
.offer-presets { margin-bottom: 12px; }
.offer-presets .chip { min-height: 34px; }
.offer-presets .chip:hover { border-color: var(--accent); color: var(--accent); }
.offer-form .field[hidden] { display: none; }
.offer-preview { min-height: 1.4em; margin: 4px 0 10px; color: var(--ink); }
.offer-list { display: flex; flex-direction: column; }
.offer-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.offer-item:first-child { border-top: 0; padding-top: 0; }
.offer-main { min-width: 0; }
.offer-desc { margin: 4px 0 0; }
tr.muted td { color: var(--muted); }
.st-offers { grid-column: 1 / -1; margin: 4px 0 0; padding-left: 18px; font-weight: 600; display: grid; gap: 4px; }
.offer-item > .btn { flex: none; white-space: nowrap; }
.st-pkgs { grid-column: 1 / -1; }
.st-pkgtable { width: 100%; border-collapse: collapse; margin-top: 4px; font-variant-numeric: tabular-nums; }
.st-pkgtable td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-pkgtable td:first-child { font-weight: 700; width: 30%; }
.st-pkgtable td.num { text-align: right; font-weight: 700; }

/* CRM ↔ backoffice */
.brand .mark.lp { background: #183B30; border: 0; }
.brand .mark.lp svg { width: 26px; height: 26px; display: block; }
ul.issues { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.issues li { padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; background: var(--surface); border-left: 3px solid var(--line); }
ul.issues li.warn { border-left-color: var(--warn, #B5462F); }
ul.issues li.info { border-left-color: var(--brass); }
ul.issues.compact { margin: 0; gap: 3px; }
ul.issues.compact li { padding: 3px 8px; font-size: 12px; }
.timeline .item.auto { opacity: .85; }
.timeline .item.auto .tag { margin-left: 0; }
.kpi .v .pill { font-family: inherit; }

/* Admin i backoffice: byta restaurang, adminläge och appen i en telefon */
.pickbtn { cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink, inherit);
  background-color: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 34px 9px 12px; font: inherit; font-weight: 700; min-width: 0; max-width: 62vw;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.adminbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 10px 0 0; padding: 10px 12px;
  border-radius: 12px; background: var(--draft-soft); border: 1px solid var(--brass); color: var(--draft); font-size: 13px; line-height: 1.4; }
.adminbar .row { gap: 6px; }
.picker { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pickq { width: 100%; }
.picklist { display: flex; flex-direction: column; gap: 6px; max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.pickrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.pickrow:hover, .pickrow:focus-visible { border-color: var(--accent); }
.pickrow.on { border-color: var(--brand, #183B30); box-shadow: inset 0 0 0 1px var(--brand, #183B30); }
.pickrow .pr-main { display: flex; flex-direction: column; min-width: 0; }
.pickrow .pr-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickrow .pr-st { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 50%; }
.pickrow .pill { font-size: 11px; }
.appview .phone { position: relative; margin: 8px auto; width: min(390px, 100%); height: min(780px, 78vh); border-radius: 36px; border: 10px solid #0B211A;
  background: #0B211A; overflow: hidden; box-shadow: 0 10px 30px rgba(20, 37, 29, .18); }
.appview .phone .notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 110px; height: 18px; background: #0B211A; border-radius: 0 0 12px 12px; z-index: 1; }
.appview .phoneframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; border-radius: 26px; }

/* Chatt */
.navbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: #C2410C; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.navbadge[hidden] { display: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.chat-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 820px) { .chat-layout { grid-template-columns: minmax(0, 1fr); } .chat-side { max-height: 260px; } }
.chat-side { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; max-height: calc(100vh - 180px); min-width: 0; }
.chat-channels { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.chat-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; }
.chat-ch { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; min-width: 0; }
.chat-ch:hover { background: var(--surface-2); }
.chat-ch.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.chat-ch .cc-top, .chat-ch .cc-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.chat-ch .cc-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-ch .cc-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.badge-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #C2410C; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; height: min(76vh, 820px); }
.chat-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 18px; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; min-height: 0; }
.chat-empty { margin: auto; }
.chat-day { display: flex; justify-content: center; margin: 12px 0 6px; }
.chat-day span { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; display: inline-block; }
.chat-day span::first-letter { text-transform: uppercase; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; margin-top: 8px; }
.msg.grouped { margin-top: 2px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-who { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 4px 2px; }
.msg.dgsw:not(.mine) .msg-who { color: var(--live); }
.msg-bubble { padding: 8px 12px; border-radius: 14px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; font-size: 14px; }
.msg.mine .msg-bubble { background: #183B30; color: #FCFBF7; }
.msg.mine .msg-bubble a { color: #E7D3A3; }
.msg:not(.mine) .msg-bubble { background: #24583F; color: #FCFBF7; }
.msg:not(.mine) .msg-bubble a { color: #E7D3A3; }
.msg-time { font-size: 10.5px; color: var(--muted); margin: 2px 6px 0; }
.msg.grouped .msg-time { display: none; }
.msg:hover .msg-time { display: block; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 4px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 180px; }
.chat-hint { margin: 0; padding: 0 14px 10px; }
.bo-chat .chat { height: calc(100vh - 230px); min-height: 420px; }

/* Chatten i egen ruta */
.chatfab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px; border: 0; border-radius: 999px; background: #183B30; color: #FCFBF7; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 37, 29, .28); }
.chatfab:hover { background: #0B211A; }
.chatfab.has-new { animation: chatpulse 2s ease-in-out 3; }
.chatfab .navbadge { margin-left: 0; background: #B39B68; color: #0B211A; }
@keyframes chatpulse { 0%, 100% { box-shadow: 0 8px 24px rgba(20, 37, 29, .28); } 50% { box-shadow: 0 0 0 8px rgba(242, 183, 5, .35); } }
/* Backoffice har en fast knapprad längst ner på veckomenyn: lyft knappen över den. */
body:has(.bottom:not([hidden])) .chatfab { bottom: calc(var(--bottom-h, 112px) + 10px + env(safe-area-inset-bottom, 0px)); }
/* Chattknappen ska aldrig ligga över ett blad eller en dialog, och sidans sista knappar ska gå att nå. */
body:has(.sheet:not([hidden])) .chatfab { display: none; }
#main { padding-bottom: 84px; }
body:has(.bottom:not([hidden])) #main { padding-bottom: calc(var(--bottom-h, 112px) + 72px); }
.chatdock { position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 61; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 48px rgba(20, 37, 29, .28); }
.chatdock[hidden] { display: none; }
body:has(.bottom:not([hidden])) .chatdock { bottom: calc(148px + env(safe-area-inset-bottom, 0px)); height: min(620px, calc(100vh - 176px)); }
.chatdock-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; background: #183B30; color: #FCFBF7; }
.chatdock-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.chatdock-actions { display: flex; gap: 2px; }
.chatdock .iconbtn { background: transparent; border: 0; color: inherit; width: 32px; height: 32px; border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.chatdock .iconbtn:hover { background: rgba(255, 255, 255, .12); }
.chatdock-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chatdock-body .chat { height: 100%; border: 0; border-radius: 0; }
.chatdock-body .chat-head { padding: 8px 14px; }
.chatdock-body .chat-head h2 { display: none; }
.chatdock-body .msg { max-width: 86%; }
.chatdock-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; flex: 1; }
.chatdock-list .chat-channels { flex: 1; }
.chatdock .chat-ch { border: 0; background: none; font: inherit; text-align: left; width: 100%; cursor: pointer; }
@media (max-width: 560px) {
  .chatdock, body:has(.bottom:not([hidden])) .chatdock { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; bottom: 0; right: 0; }
  .chatfab .chatfab-l { display: none; }
  .chatfab { padding: 14px; }
}
/* Eget fönster: bara chatten. */
body.chat-only #app, body.chat-only .bottom { display: none !important; }
body.chat-only .chatdock { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }

/* Appen-fliken: telefon och QR sida vid sida */
.appgrid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .appgrid { grid-template-columns: minmax(0, 1fr); } }
.appgrid .phone { margin: 0; }
.qrside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qrside h3 { margin: 0; }
/* Erbjudanden */
.camplist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.campitem { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Filer ---------- */
.dropzone { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--line); border-radius: 16px; padding: 26px 16px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fname { display: flex; gap: 10px; align-items: flex-start; min-width: 220px; }
.fname .link { font-weight: 700; text-align: left; }
.fkind { flex: none; display: inline-grid; place-items: center; width: 40px; height: 28px; border-radius: 7px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.fkind.k-pdf { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.fkind.k-bild, .fkind.k-film { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.fkind.k-doc, .fkind.k-xls, .fkind.k-ppt { background: var(--live-soft); color: var(--live); border-color: transparent; }
.pillbtn { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.doclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.doclist li { display: flex; gap: 12px; align-items: center; }
.doclist li > div { flex: 1; min-width: 0; }
@media (max-width: 720px) { .grid3 { grid-template-columns: 1fr; } }
button.link { background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Ruta (dialog) ---------- */
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(15, 20, 18, .45); }
.dlg > p { padding: 20px; margin: 0; }
.dlg-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dlg-body h2 { margin: 0; font-size: 20px; }
.dlg-body .row.small { gap: 8px; color: var(--muted); }

/* ---------- Avtal att skriva ut ---------- */
.avtal-doc { max-width: 820px; }
.avtal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.avtal-head b { display: block; font-size: 22px; }
.avtal-head span { color: var(--muted); font-size: 13px; }
.avtal-price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.avtal-price > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.avtal-price span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.avtal-price small { color: var(--muted); }
.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; }
.sigcol h4 { margin: 0; }
.sigline { border-top: 1px solid var(--ink); margin-top: 38px; padding-top: 4px; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .avtal-price, .sigs { grid-template-columns: 1fr; } }
@media print {
  header.top, nav.side, .chatfab, .chatdock, .adminbar { display: none !important; }
  .layout { display: block !important; }
  .app, .app main, main { padding: 0 !important; margin: 0 !important; max-width: none !important; background: #fff !important; }
  .avtal-doc { border: 0 !important; box-shadow: none !important; max-width: none; padding: 14mm 16mm !important; background: #fff !important; color: #000 !important; }
  .avtal-doc section, .sigblock { break-inside: avoid-page; }
  .avtal-price > div { background: #f3f3f0 !important; }
}

/* ---------- Lathundar ---------- */
.guides { display: flex; flex-direction: column; gap: 14px; }
.guide-ch h2 { margin: 0 0 4px; }
.guide { border-top: 1px solid var(--line); }
.guide summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 12px 28px 12px 0; position: relative; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 20px; color: var(--muted); }
.guide[open] summary::after { content: "–"; }
.guide ol { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.guide-tips { margin: 0 0 14px; padding: 10px 12px 10px 28px; background: var(--accent-soft); border-radius: 10px; font-size: 14px; }
table.files .btn, .doclist .btn { white-space: nowrap; }
table.files td.num, table.files th.num { font-family: var(--font); }

/* ---------- Välkomstpaket /valkommen/ ---------- */
.kit { background: #e9ebe6; min-height: 100vh; padding-bottom: 40px; color: #16211b; }
.kit .kp-page, .kit .kp-flow { background: #fff; max-width: 820px; margin: 20px auto; padding: 44px 48px; border-radius: 6px; box-shadow: 0 2px 14px rgba(0,0,0,.10); }
.kit h2 { font: 800 28px/1.1 var(--font); letter-spacing: -.02em; margin: 0 0 16px; color: var(--b); }
.kit h3 { font-size: 17px; margin: 0 0 8px; }
.kp-mut { color: #5b665f; }
.kp-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5b665f; margin-bottom: 2px; }
.kp-cover { background: var(--b) !important; color: #fff; display: flex; flex-direction: column; gap: 22px; min-height: 900px; position: relative; overflow: hidden; }
.kp-cover::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; border: 44px solid var(--a); opacity: .22; }
.kp-brandline { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.kp-logo { background: #fff; border-radius: 18px; padding: 26px 30px; align-self: flex-start; max-width: 380px; margin-top: 60px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.kp-logo img { display: block; max-width: 320px; max-height: 120px; object-fit: contain; }
.kp-logo b { font: 800 30px Georgia, serif; color: var(--b); }
.kp-cover h1 { font: 900 46px/1.05 var(--font); letter-spacing: -.025em; margin: 10px 0 0; max-width: 620px; text-wrap: balance; }
.kp-lead { font-size: 18px; line-height: 1.5; max-width: 560px; margin: 0; opacity: .92; }
.kp-toc { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 600px; counter-reset: k; }
.kp-toc li { counter-increment: k; background: rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px 12px 50px; position: relative; font-size: 14px; opacity: .95; }
.kp-toc li::before { content: counter(k); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--a); color: #111; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.kp-toc b { display: block; font-size: 15px; }
.kp-coverfoot { margin-top: auto; position: relative; z-index: 1; }
.kp-coverfoot span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.kp-coverfoot b { font-size: 18px; }
.kp-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--b); padding-bottom: 10px; margin-bottom: 22px; }
.kp-head span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #5b665f; }
.kp-hlogo img { display: block; max-height: 40px; max-width: 180px; object-fit: contain; }
.kp-hlogo b { font: 800 18px Georgia, serif; color: var(--b); }
.kp-login { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; background: #f3f5f1; border-left: 5px solid var(--a); border-radius: 10px; padding: 14px 16px; }
.kp-login b { font-size: 14.5px; line-height: 1.35; }
.kp-steps { list-style: none; padding: 0; margin: 20px 0; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.kp-steps li { counter-increment: s; position: relative; padding-left: 48px; line-height: 1.5; }
.kp-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--b); color: #fff; font-weight: 800; display: grid; place-items: center; }
.kp-steps b { display: block; }
.kp-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; border-top: 1px solid #dde2dc; padding-top: 14px; font-size: 13.5px; overflow-wrap: anywhere; }
.kp-scene > svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.kp-qrrow { display: grid; grid-template-columns: 210px 1fr; gap: 26px; margin-top: 22px; align-items: start; }
.kp-sign > svg { display: block; width: 100%; height: auto; border: 1px solid #dde2dc; border-radius: 6px; }
.kp-tips { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.kp-lead2 { margin: 0 0 14px; color: #3d4a42; }
.kp-prices { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-bottom: 20px; }
.kp-prices th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #5b665f; padding: 8px 10px; border-bottom: 2px solid var(--b); }
.kp-prices td { padding: 12px 10px; border-bottom: 1px solid #dde2dc; font-size: 15px; }
.kp-prices td:last-child, .kp-prices th:last-child { text-align: right; }
.kp-incl { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.kp-incl > div { background: #f3f5f1; border-radius: 12px; padding: 14px 16px; }
.kp-incl ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.55; }
.kp-ch { margin-bottom: 18px; }
.kp-ch > h3 { font-size: 19px; color: var(--b); border-bottom: 1px solid #dde2dc; padding-bottom: 4px; margin: 18px 0 10px; break-after: avoid; }
.kp-guide { break-inside: avoid; margin-bottom: 12px; }
.kp-guide h4 { margin: 0; font-size: 15px; }
.kp-guide p { margin: 2px 0 4px; font-size: 13.5px; }
.kp-guide ol { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 14px; }
.kp-gtips { margin: 6px 0 0; padding: 8px 10px 8px 26px; background: #f3f5f1; border-radius: 8px; font-size: 13px; }
@media (max-width: 640px) {
  .kit .kp-page, .kit .kp-flow { margin: 10px; padding: 24px 18px; }
  .kp-cover { min-height: 0; } .kp-cover h1 { font-size: 32px; }
  .kp-toc, .kp-login, .kp-links, .kp-qrrow, .kp-incl { grid-template-columns: 1fr; }
  .kp-sign { max-width: 220px; }
}
@page kitflow { size: A4; margin: 14mm 0 14mm; }
@media print {
  .kit { background: #fff; padding: 0; }
  .kit .kp-page { width: 210mm; height: 297mm; max-width: none; margin: 0; border-radius: 0; box-shadow: none; padding: 16mm 17mm; break-after: page; overflow: hidden; }
  .kit .kp-flow { page: kitflow; max-width: none; margin: 0; padding: 0 17mm; box-shadow: none; border-radius: 0; }
  .kp-cover { min-height: 0; }
  .kp-scene > svg { border-radius: 8px; }
}
.dlg-scene > svg { display: block; width: 100%; height: auto; border-radius: 12px; max-height: 260px; object-fit: cover; }
.kitcard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.kitcard h2 { margin: 0 0 6px; }
.bo-scene > svg { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 720px) { .kitcard { grid-template-columns: 1fr; } }

/* QR-skylten på bardisken (foto) */
.qrphoto { margin: 0; border-radius: 14px; overflow: hidden; background: #2a1d14; }
.qrphoto img { display: block; width: 100%; height: auto; }
.kp-qrrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kp-photo { max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.dlg-scene .qrphoto { max-width: 220px; margin: 0 auto; }
.kitcard .bo-scene { max-width: 300px; }
@media (max-width: 640px) { .kp-qrrow { grid-template-columns: 1fr; } .kp-photo { max-width: 100%; } }

/* Rätt på flera dagar */
.dishdays { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dishdays .dd-l { font-weight: 700; margin-right: 2px; }
.dishdays .dd-n { color: var(--muted); }
.daychip { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 5px 11px; border-radius: 99px; border: 1.5px dashed var(--line);
  background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.daychip i { font-style: normal; font-weight: 800; }
.daychip[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.daychip[aria-pressed="true"]:hover { background: #8a2c1f; border-color: #8a2c1f; color: #fff; }
.daychip[aria-pressed="true"]:hover i::before { content: "×"; }
.daychip[aria-pressed="true"]:hover i { font-size: 0; }
.daychip[aria-pressed="true"]:hover i::before { font-size: 13px; }
.daychip[aria-pressed="false"]:hover { border-color: var(--accent); color: var(--ink); }
.daychip.here { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--ink); cursor: default; }
.iconbtn.del:hover { color: #8a2c1f; border-color: #8a2c1f; }
.qrrow > div:last-child { min-width: 0; }
.qrrow p { overflow-wrap: anywhere; }
.qrrow .qrurl { margin-top: -4px; color: var(--muted); font-weight: 600; }
.qrside, .qrside > * { min-width: 0; max-width: 100%; }
.qrside .row input { flex: 1; min-width: 0; }
.notifybox { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid #183B30; border-radius: 12px; background: var(--surface-2); }
.notifybox h3 { margin: 0 0 8px; }
.notifyrow { align-items: flex-end; }
.notifyrow .field { flex: 0 1 180px; margin: 0; }

/* Import av leads */
.dlg.dlg-wide { width: min(980px, calc(100vw - 24px)); }
.imp-h { margin: 8px 0 0; }
.imp-cols td { vertical-align: top; }
.imp-cols select { min-width: 190px; }
.imp-samples { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conf { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.conf.hi { background: var(--live); } .conf.mid { background: #B39B68; } .conf.lo { background: var(--warn); }
.imp-sum { display: flex; flex-wrap: wrap; gap: 10px; }
.imp-sum > div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.imp-sum b { display: block; font-size: 22px; }
.imp-sum span { font-size: 13px; color: var(--muted); }
.imp-sum p { width: 100%; margin: 0; }
tr.muted td { color: var(--muted); }
.pkgbar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 8px; }
.pkgbar span { display: block; height: 100%; background: #183B30; border-radius: 99px; }
.dpricebox { display: flex; align-items: center; gap: 4px; flex: none; }
.dpricebox input { width: 74px; text-align: right; background: var(--surface); }
.dpricebox input.wide { width: 92px; }
.dpricebox span { font-size: 13px; color: var(--muted); font-weight: 700; }
.gp { font-weight: 600; color: var(--muted); }
.weekpick { display: flex; flex-direction: column; gap: 8px; }
.wkchip { display: grid; grid-template-columns: 28px auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.wkchip i { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--accent-ink); }
.wkchip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.wkchip[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); }
.wkchip span:not(.pill) { color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .wkchip { grid-template-columns: 28px 1fr; } .wkchip span:not(.pill) { grid-column: 2; } .wkchip .pill { grid-column: 2; justify-self: start; } }
.rotlist { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.rotlist li { display: flex; gap: 12px; align-items: baseline; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.rotlist .no { color: var(--muted); font-size: 13px; font-weight: 700; min-width: 64px; }

/* Kampanjtips i backoffice */
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.tip { border: 1px solid var(--line); border-top: 3px solid var(--brass); border-radius: var(--radius); background: var(--surface-2); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tip h3 { margin: 0; font-family: var(--heading); font-weight: 400; font-size: 19px; letter-spacing: -0.01em; }
.tip-when { font-size: 12.5px; font-weight: 600; color: var(--brass-ink); }
.tip p { margin: 0; }
.tip-text { font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.tip .row { margin-top: auto; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presets .small { flex-basis: 100%; }

/* Notisandel */
.share-top { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.share-pct { display: grid; gap: 2px; }
.share-pct b { font-family: var(--heading); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.share-facts { display: grid; gap: 2px; font-size: 14px; }
.share-facts b { font-variant-numeric: tabular-nums; }
.sharebar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.sharebar span { display: block; height: 100%; background: var(--brass); border-radius: 99px; }
.sharebar.live span { background: var(--live); }
.sharebar.warn span { background: var(--draft); }
.sharetips summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; }
.sharetips ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

/* Skicka nu / Schemalägg */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.seg button { border: 0; background: var(--surface); padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 40px; color: var(--ink); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.schedbox { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--brass); border-radius: 8px; background: var(--surface-2); }

/* Menyfliken: Lunch/Kväll och typ av lunchmeny */
.menutop { display: flex; flex-direction: column; gap: 10px; }
.mtype { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mtype button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; min-width: 0; color: var(--ink); }
.mtype button b { font-size: 14px; }
.mtype button span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.mtype button[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.mtype button[aria-checked="true"] b::before { content: "✓ "; color: var(--accent); }
@media (max-width: 520px) {
  .mtype { grid-template-columns: 1fr; gap: 6px; }
  .mtype button { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; }
  .mtype button b { flex: none; }
  .mtype button span { min-width: 0; }
}
.card.listed { gap: 10px; }
.movebtns { display: inline-flex; gap: 4px; margin-left: auto; }
.movebtns .iconbtn { width: 32px; height: 32px; font-size: 15px; }
.movebtns .iconbtn:disabled { opacity: .35; cursor: default; }

/* Utseende: ljust, mörkt eller som telefonen */
.themepick { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); }
.themepick button { border: 0; background: none; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.themepick button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.vouchers { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.vouchers .btn { white-space: nowrap; flex: none; }

/* Alkoholmärkning, kampanjkoder, födelsedagar och åldrar */
.chip.diet.alc[aria-pressed="true"] { background: #7A2E3A; border-color: #7A2E3A; color: #fff; }
.usage { margin-top: 6px; font-size: 14px; }
.usage b { font-variant-numeric: tabular-nums; }
.codes { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 12px; }
.coderow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; opacity: .7; }
.coderow.live { opacity: 1; }
.coderow .code { font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.codes .btn { justify-self: start; }
.bdays { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bdays li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.agebars { display: grid; gap: 6px; margin: 12px 0; }
.ab { display: grid; grid-template-columns: 70px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.abt { height: 10px; border-radius: 6px; background: var(--surface-2, rgba(0,0,0,.06)); overflow: hidden; }
.abt span { display: block; height: 100%; background: var(--accent, #B39B68); border-radius: 6px; }
.abn { text-align: right; font-variant-numeric: tabular-nums; }
.dishmeta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.dishmeta select { flex: 1 1 150px; min-width: 0; max-width: 240px; padding: 6px 10px; font-size: 14px; }
.dishmeta .vint { flex: 0 0 92px; width: 92px; padding: 6px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.dishmeta .vint.bad { border-color: #B3261E; box-shadow: 0 0 0 2px color-mix(in srgb, #B3261E 20%, transparent); }
.evlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evitem { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.evitem.past { opacity: .6; }
.evitem img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.evitem .row { margin-top: 6px; }
.evdate { width: 72px; height: 72px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-content: center; text-align: center; }
.evdate b { font-size: 24px; line-height: 1; }
.evdate span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.evimg { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.evimg img { width: 160px; max-width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }

/* ---------- Underflikar (kategorier) ---------- */
.subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: 0 0 4px; -webkit-overflow-scrolling: touch; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; min-height: 38px; }
.subnav button:hover { border-color: var(--control); }
.subnav button[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.subnav .subn { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.subnav button[aria-current="page"] .subn { background: color-mix(in srgb, var(--accent-ink) 20%, transparent); color: var(--accent-ink); }

/* Typ av lunchmeny: hopfälld, man byter sällan */
.menutype { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.menutype summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.menutype summary::-webkit-details-marker { display: none; }
.menutype summary b { flex: 1; }
.menutype summary .small:last-child { text-decoration: underline; }
.menutype[open] summary .small:last-child { visibility: hidden; }
.menutype .mtype { padding: 0 12px 12px; }

/* Inställningar */
.settings { display: grid; gap: 14px; }
.sechead { font-family: var(--heading); font-size: 22px; margin: 14px 0 -4px; }
.settings > .sechead:first-child { margin-top: 2px; }
.hours { display: grid; gap: 6px; }
.hourrow { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.opt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; align-content: start; }
.opt.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.opt .opthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.opt p { margin: 0; }
.opt .btn { justify-self: start; }
.appcard { display: grid; gap: 12px; }
@media (max-width: 560px) { .appcard { grid-template-columns: 1fr; } }
.appview .phone { margin: 8px auto 0; }

/* Reglage */
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--control); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch:checked { background: var(--live); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.swrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
#subhead[hidden] { display: none; }
#subhead .subnav { margin: 0; padding: 0; }

/* Egna knappar i Inställningar */
.customlinks { display: grid; gap: 8px; }
.clrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
@media (max-width: 560px) { .clrow { grid-template-columns: 1fr; padding-bottom: 6px; border-bottom: 1px solid var(--line); } }

/* Läs in meny från foto eller PDF */
.importcard { padding-block: 12px; }
.importcard.drop, .importsheet.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.importrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.importrow > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.importsheet, .review { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.targets { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.targets legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.targets.compact { grid-template-columns: 1fr 1fr; }
.targets.compact legend { grid-column: 1 / -1; }
.target { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; min-height: 44px; }
.target.on { border-color: var(--accent); background: var(--accent-soft); }
.target input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.target span { display: grid; gap: 2px; min-width: 0; }
.target small { color: var(--muted); font-size: 13px; }
.pickrow { display: flex; gap: 8px; flex-wrap: wrap; }
.pickrow .btn { flex: 1 1 160px; min-height: 48px; }
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
@media (hover: none) { .dropzone { display: none; } }
.picked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.picked li { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.picked img, .picked .pdf { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.picked .pdf { display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 800; }
.picked .pn { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.picked .pn small { color: var(--muted); font-size: 12px; }
.reading { display: grid; justify-items: center; gap: 8px; padding: 32px 8px; text-align: center; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: lpspin 0.9s linear infinite; }
@keyframes lpspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.rsum { margin: 0; }
.warnpill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--draft-soft); color: var(--draft); }
.rgroup { display: grid; gap: 8px; }
.rghead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.rghead b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.rghead .small { color: var(--muted); }
.rghead select, .rghead .check { margin-left: auto; }
.check.sm { font-size: 13px; }
.ritem { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.ritem.unsure { border-color: var(--draft); background: var(--draft-soft); }
.rtop { display: flex; gap: 6px; align-items: center; min-width: 0; }
.rtop .input:first-child { flex: 1; min-width: 0; }
.rtop .rprice { width: 84px; flex: none; }
.rmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rmeta select { min-height: 36px; }
.badge.diet { background: var(--accent-soft); color: var(--accent); }
.chip.ok { border-color: var(--draft); color: var(--draft); }
.why { color: var(--draft); }

/* Bilder i appen (Inställningar) */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gal figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gal img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gal figcaption { padding: 6px; justify-content: space-between; }
.ownernote p { margin: 0; }
.nlprev { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); }
.nlprev p { margin: 8px 0 0; }

/* Menyskärm (TV) */
html.ms-tvroot, html.ms-tvroot body { margin: 0; height: 100%; background: #0f1a16; overflow: hidden; cursor: none; }
.ms-tv { --b: #183B30; --a: #B39B68; box-sizing: border-box; height: 100vh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 2.2vh;
  padding: 4vh 4.5vw; color: #fcfbf7; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--a) 22%, transparent), transparent 60%), var(--b); font-family: system-ui, sans-serif; }
.ms-head { display: flex; align-items: center; gap: 2vw; }
.ms-head img { height: 7vh; max-width: 18vw; object-fit: contain; background: #fff; border-radius: 1.2vh; padding: .6vh; }
.ms-head div { display: grid; flex: 1; min-width: 0; }
.ms-head b { font: 400 3.4vh/1.1 Georgia, serif; }
.ms-head span { font-size: 2.2vh; opacity: .8; }
.ms-head time { font: 600 4.2vh/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; opacity: .9; }
.ms-tv h1 { margin: 0; font: 400 7vh/1.05 Georgia, serif; color: color-mix(in srgb, var(--a) 70%, #fff); }
.ms-body { min-height: 0; overflow: hidden; }
.ms-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4vw; height: 100%; }
.ms-today .ms-dish { padding: 2vh 0; border-bottom: 1px solid rgb(252 251 247 / 18%); }
.ms-today .ms-dt { font: 400 5vh/1.15 Georgia, serif; }
.ms-today .ms-ds { font-size: 2.9vh; opacity: .85; margin-top: .6vh; }
.ms-dt { display: flex; justify-content: space-between; gap: 2vw; align-items: baseline; }
.ms-dt b { font-family: system-ui, sans-serif; font-weight: 600; white-space: nowrap; color: color-mix(in srgb, var(--a) 70%, #fff); }
.ms-tags { display: flex; gap: .8vw; margin-top: .8vh; }
.ms-tags span { font-size: 1.8vh; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3vh .8vw; border-radius: 99px; background: rgb(252 251 247 / 14%); }
.ms-week { border-left: 1px solid rgb(252 251 247 / 18%); padding-left: 3vw; display: grid; align-content: start; gap: 2vh; }
.ms-week h3, .ms-cat h3 { margin: 0 0 .5vh; font-size: 2vh; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--a) 70%, #fff); }
.ms-wd b { display: block; font: 400 2.8vh Georgia, serif; }
.ms-wd span { font-size: 2.3vh; opacity: .85; }
.ms-cols { columns: 2; column-gap: 5vw; height: 100%; }
.ms-cat { break-inside: avoid; margin-bottom: 2.5vh; }
.ms-cols .ms-dish { padding: 1vh 0; }
.ms-cols .ms-dt { font: 400 3.1vh/1.2 Georgia, serif; }
.ms-cols .ms-ds { font-size: 2.1vh; opacity: .8; }
.ms-big { font: 400 5vh Georgia, serif; opacity: .9; }
.ms-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 3vw; font-size: 2.6vh; }
.ms-qr { display: flex; align-items: center; gap: 1.2vw; font-size: 2vh; opacity: .95; }
.ms-code { width: 12vh; height: 12vh; background: #fff; padding: .8vh; border-radius: 1vh; box-sizing: border-box; }
.ms-code svg { width: 100%; height: 100%; display: block; }
@media (orientation: portrait) { .ms-split { grid-template-columns: 1fr; } .ms-week { border-left: 0; padding-left: 0; } .ms-cols { columns: 1; } }

/* Meny på papper (A4 och A5) */
.qp-page.mp { padding: 16mm 16mm 12mm; display: flex; flex-direction: column; gap: 5mm; border-top: 8mm solid var(--b); }
.mp h1 { margin: 0; font: 400 28pt/1.1 Georgia, serif; color: var(--b); }
.mp-logo { max-width: 60mm; max-height: 22mm; object-fit: contain; align-self: flex-start; }
.mp-sub { margin: -2mm 0 0; color: #555; font-size: 11pt; }
.mp-days { display: grid; gap: 4mm; }
.mp-days section { border-bottom: 0.3mm solid #ddd; padding-bottom: 3mm; }
.mp-days h3, .mp-list h3 { margin: 0 0 1.5mm; font: 700 9pt system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--b); }
.mp .ms-dish { margin: 1.5mm 0; }
.mp .ms-dt { font: 400 13pt/1.25 Georgia, serif; color: #111; }
.mp .ms-dt b { color: #111; font-size: 11pt; }
.mp .ms-ds { font-size: 10pt; color: #555; }
.mp .ms-tags span { font-size: 7pt; padding: .6mm 2mm; background: #f1ede4; color: #333; }
.mp-list { columns: 2; column-gap: 10mm; }
.mp-closed { color: #888; margin: 0; }
.mp-foot { margin: 0; font-size: 11pt; color: #333; }
.mp-qr { margin-top: auto; display: flex; align-items: center; gap: 4mm; font-size: 10pt; color: #333; }
.mp-qr .qp-code { width: 28mm; height: 28mm; }
.qp-page.mp-a5pair { display: grid; grid-template-rows: 1fr 1fr; padding: 0; }
.mp-a5pair .qp-page.mp { width: auto; min-height: 0; height: 148.5mm; margin: 0; box-shadow: none; border-bottom: 0.3mm dashed #bbb; padding: 9mm 12mm 7mm; gap: 2.5mm; border-top-width: 5mm; overflow: hidden; }
.mp-a5pair h1 { font-size: 18pt; }
.mp-a5pair .mp-days { gap: 1.5mm; }
.mp-a5pair .mp-days section { padding-bottom: 1mm; display: grid; grid-template-columns: 22mm 1fr; gap: 2mm; align-items: baseline; }
.mp-a5pair .ms-dish { margin: 0; }
.mp-a5pair .ms-dt { font-size: 10pt; }
.mp-a5pair .ms-ds, .mp-a5pair .ms-tags { display: none; }
.mp-a5pair .mp-qr .qp-code { width: 20mm; height: 20mm; }
.qp-page.mp.full .mp-days { grid-template-columns: 1fr 1fr; column-gap: 9mm; }
.qp-page.mp.full .ms-dt { font-size: 12pt; }
.qp-page.mp.full .ms-ds { font-size: 9pt; }
.mp-a5pair .mp-days { grid-template-columns: 1fr; }

/* ---------- Förhandsvisning som gäst (kvällsmeny, dryck, inläst meny) ---------- */
.pv-wrap { display: grid; gap: 10px; justify-items: center; }
.pv-phone { width: min(100%, 360px); border-radius: 34px; padding: 10px; background: #111; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pv-screen { background: #F6F1E7; color: #1D2420; border-radius: 26px; padding: 14px 14px 18px; max-height: 64vh; overflow: auto; display: grid; gap: 10px; font-size: 14px; }
.pv-head { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.pv-head img, .pv-ini { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; background: var(--pv-brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pv-status { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8A6A1F; font-weight: 700; }
.pv-hero { background: var(--pv-brand); color: #F6F1E7; border-radius: 16px; padding: 12px 14px; display: grid; gap: 3px; }
.pv-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .85; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-w { font-size: 13px; opacity: .9; }
.pv-p { font-size: 26px; font-weight: 700; }
.pv-n { font-size: 13px; opacity: .9; }
.pv-group { background: #fff; border-radius: 16px; padding: 4px 14px; }
.pv-cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #646C66; padding: 10px 0 2px; }
.pv-dish { padding: 9px 0; border-bottom: 1px solid #EEE8DC; display: grid; gap: 2px; }
.pv-dish:last-child { border-bottom: 0; }
.pv-t { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.pv-t b { white-space: nowrap; font-weight: 600; font-size: 13px; background: #F3EEE2; border-radius: 99px; padding: 1px 8px; align-self: start; }
.pv-s { color: #646C66; font-size: 13px; }
.pv-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.pv-tag { background: #E7F1EA; color: #2E6B3F; border-radius: 99px; padding: 0 7px; font-weight: 600; }
.pv-tag.alc { background: color-mix(in srgb, #8A2F3E 12%, #fff); color: #8A2F3E; font-size: 10px; letter-spacing: 0; text-transform: none; }
.pv-alg { color: #8A4B0F; }
.pv-empty { color: #646C66; text-align: center; }
input.bad, .clrow input.bad { border-color: #B3261E !important; box-shadow: 0 0 0 2px color-mix(in srgb, #B3261E 18%, transparent); }
.linkbad { color: #B3261E; display: block; margin-top: 4px; }
.imphist { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #E2DBCD); }
.imphist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.histrow { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #E2DBCD); background: var(--surface, #fff); color: inherit; cursor: pointer; font: inherit; }
.histrow small { display: block; color: var(--muted, #646C66); font-size: 12.5px; }
.histrow:disabled { opacity: .55; cursor: default; }

/* Personal: långa e-postadresser bryts i stället för att trycka ut tabellen. */
.list.team td.email { overflow-wrap: anywhere; min-width: 0; }
.list.team td:last-child { white-space: nowrap; }
/* Ändrat men inte sparat i Inställningar. */
.unsaved { outline: 2px solid var(--warn); outline-offset: 1px; }

/* Månadens mejl: mejltips och knappar som klistrar in menyn, event och erbjudanden. */
.mailtools { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.mailtools .row { flex-wrap: wrap; gap: 6px; }

/* CRM: anteckningssidan på en kund */
.notes-new { display: flex; flex-direction: column; gap: 10px; }
.notes-list { display: flex; flex-direction: column; gap: 10px; }
.note { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.note.pinned { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.note.editing { gap: 10px; }
.note-head { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.note-head h3 { margin: 4px 0 0; font-size: 16px; }
.note-actions { gap: 6px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Servering och öppettider: knapparna Lunch och Kväll per dag */
.hourrow.serve { grid-template-columns: 86px minmax(0, 1fr) auto; }
.daychips { display: inline-flex; gap: 6px; }
.daychip { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; }
.daychip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.daychip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.daychip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.daychip.ph { visibility: hidden; border: 0; }
.daychip[hidden] { display: none; }
.day.off .daysum { cursor: default; opacity: .75; }
.day.off .daysum > button { grid-area: chev; }
@media (max-width: 520px) {
  .hourrow.serve { grid-template-columns: 1fr auto; row-gap: 4px; }
  .hourrow.serve > input { grid-column: 1 / -1; grid-row: 2; }
}
