/* Måltid · personalapp */
body { min-height: 100vh; }

/* Topp */
.top { position: sticky; top: 0; z-index: 50; background: rgba(246,244,240,.88); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(22,24,29,.05); }
.top-in { max-width: 1600px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 24px 12px; display: flex; align-items: center; gap: 10px; }
.top .store { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.1; }
.pill { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 13px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); font-weight: 650; font-size: 13.5px; max-width: 40vw; }
.pill .ell { max-width: 220px; }

/* Arbetsyta: lista + panel */
.work { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 24px; align-items: start; }
.listside { padding: 16px 0 100px; min-width: 0; }
.panelside { position: sticky; top: 76px; height: calc(100vh - 92px); margin-top: 16px; }
@media (max-width: 1199px) { .work { grid-template-columns: minmax(0, 1fr) 440px; } }
@media (max-width: 999px) { .work { grid-template-columns: 1fr; padding: 0 16px; } .panelside { display: none; } }

.searchbar { display: flex; gap: 10px; margin-bottom: 12px; }
.searchbar .input-wrap { flex: 1; }
.searchbar .input { height: 54px; border-radius: 16px; font-size: 17px; box-shadow: var(--sh-1); border-color: transparent; }
.searchbar .input:focus { border-color: #B9C8E8; }
.searchbar .input-wrap > svg { width: 20px; height: 20px; left: 16px; }
.searchbar .input-wrap > .input { padding-left: 46px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #ECE9E4; border-radius: 14px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; height: 38px; padding: 0 14px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.sec-h { display: flex; align-items: center; gap: 10px; margin: 18px 2px 8px; }
.sec-h h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-family: var(--body); font-weight: 750; flex: 1; }
.sec-h .n { font-size: 13px; color: var(--faint); font-weight: 650; }
.sec-h .btn svg { width: 14px; height: 14px; }

/* Receptrader */
.rows { display: flex; flex-direction: column; gap: 6px; }
.rrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 38px; align-items: center; gap: 14px; text-align: left; background: var(--card); border-radius: 14px; padding: 11px 12px 11px 12px;
  box-shadow: var(--sh-1), inset 0 0 0 1px rgba(22,24,29,.04); transition: box-shadow .15s, transform .12s var(--ease), background .15s; min-height: 64px; }
.rrow:hover { box-shadow: var(--sh-2); }
.rrow:active { transform: scale(.993); }
.rrow.cur { box-shadow: inset 0 0 0 2px #9DB4E6, var(--sh-1); }
.rrow.sel { box-shadow: inset 0 0 0 2px var(--ink), var(--sh-2); }
.rrow .plu { font-family: var(--mono); font-weight: 750; font-size: 15px; text-align: center; background: var(--sunk); border-radius: 9px; padding: 8px 4px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; text-overflow: ellipsis; }
.rrow .plu.none { color: var(--faint); font-weight: 500; }
.rrow .mid { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rrow .nm { font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.25; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.rrow .nm .badge { height: 19px; font-size: 10.5px; padding: 0 7px; flex: none; }
.rrow .fav { width: 15px; height: 15px; color: #F2A900; fill: #F2A900; flex: none; }
.rrow .meta { font-size: 12.5px; color: var(--muted); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow .meta b { color: var(--ink-2); }
.rrow .pr { font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.rrow .pr small { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.rrow .go { width: 38px; height: 38px; border-radius: 11px; background: var(--red-50); color: var(--red); display: grid; place-items: center; }
.rrow .go svg { width: 18px; height: 18px; }
.rrow.sel .go { background: var(--red); color: #fff; }
.rrow mark { background: #FFE9A8; color: inherit; border-radius: 3px; padding: 0 1px; }

/* Panel (desktop) och ark (mobil) delar .pp */
.pp { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 22px; box-shadow: var(--sh-2), inset 0 0 0 1px rgba(22,24,29,.04); overflow: hidden; }
.pp-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.pp-h h2 { font-size: 20px; line-height: 1.2; }
.pp-h .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.pp-h .sub b { color: var(--ink); }
.pp-h .grab { width: 40px; height: 5px; border-radius: 9px; background: #DDD9D3; margin: -4px auto 10px; }
.pp-b { flex: 1; overflow: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.pp-f { padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--card); }
.pp-f .btn { width: 100%; }
.prev-card { background: #E9E6E0; border-radius: 16px; padding: 12px; background-image: radial-gradient(rgba(22,24,29,.06) 1px, transparent 1px); background-size: 12px 12px; }
.panel-empty { height: 100%; border-radius: 22px; border: 2px dashed #DCD8D1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 30px; color: var(--muted); }
.panel-empty > svg { width: 46px; height: 46px; color: #CFCBC4; }
.panel-empty h3 { color: var(--ink); font-size: 19px; }
.panel-empty p { max-width: 320px; line-height: 1.7; font-size: 14px; }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: var(--card); box-shadow: inset 0 -1px 0 #D9D5CE, 0 0 0 1px var(--line); font: 600 12px var(--mono); color: var(--ink-2); }

.ctrls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ctrl { background: var(--card); border-radius: 14px; padding: 11px 12px; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ctrl.need { box-shadow: inset 0 0 0 2px #F2C27A, var(--sh-1); }
.ctrl .lbl { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 42px; height: 42px; border-radius: 12px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; flex: none; }
.stepper button:active { transform: scale(.94); }
.stepper button svg { width: 19px; height: 19px; }
.stepper .val { flex: 1; text-align: center; font-family: var(--head); font-size: 24px; font-weight: 800; border: 0; background: transparent; width: 100%; min-width: 0; outline: none; }
.stepper .val.date { font-size: 16px; white-space: nowrap; }
.stepper.big button { width: 54px; height: 54px; border-radius: 15px; }
.stepper.big .val { font-size: 34px; }
.copies-ctrl { padding: 12px 14px 14px; }
.qty { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.qty button { height: 38px; border-radius: 10px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); font-weight: 750; font-size: 15px; font-family: var(--head); }
.qty button.on { background: var(--ink); color: #fff; box-shadow: none; }
.big-input { height: 46px; font-size: 20px; font-weight: 700; text-align: center; }
.price-out { font-family: var(--head); font-size: 14px; font-weight: 750; color: var(--green); }
.done-anim { animation: donePulse .5s var(--ease); background: var(--green) !important; box-shadow: 0 6px 16px -6px rgba(19,138,75,.6) !important; }
@keyframes donePulse { 50% { transform: scale(1.015); } }

/* Mobilark */
.sheet-scrim { position: fixed; inset: 0; background: rgba(22,24,29,.42); z-index: 400; animation: fade .2s; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 760px; height: 94vh; height: 94dvh; animation: up .32s var(--ease); }
.sheet .pp { border-radius: 24px 24px 0 0; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

/* Inloggning */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #fff 0%, var(--bg) 60%); }
.login-card { width: min(380px, 100%); text-align: center; }
.login-card .logo { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px; }
.login-card .logo svg { width: 34px; height: 34px; }
.login-card h1 { font-size: 30px; margin-bottom: 4px; }
.pins { display: flex; justify-content: center; gap: 12px; margin: 28px 0 22px; height: 16px; }
.pins i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px #CFCBC4; transition: all .15s; }
.pins i.on { background: var(--ink); box-shadow: none; transform: scale(1.1); }
.pins.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pad button { height: 66px; border-radius: 20px; background: var(--card); box-shadow: var(--sh-1), inset 0 0 0 1px rgba(22,24,29,.04); font-family: var(--head); font-size: 26px; font-weight: 700; transition: transform .1s, background .1s; }
.pad button:active { transform: scale(.95); background: #EEEBE6; }
.pad button.fn { background: transparent; box-shadow: none; font-size: 15px; font-family: var(--body); color: var(--muted); font-weight: 650; }

/* Historik, meny, skrivarval */
.hist { display: flex; flex-direction: column; gap: 8px; }
.hrow { display: flex; align-items: center; gap: 12px; background: var(--sunk); padding: 12px 14px; border-radius: 14px; }
.hrow .t { font-size: 12.5px; color: var(--muted); }
.menu { position: absolute; right: 24px; top: 62px; background: var(--card); border-radius: 16px; box-shadow: var(--sh-3); padding: 6px; min-width: 230px; z-index: 60; animation: pop .2s var(--ease); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; text-decoration: none; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--sunk); }
.menu svg { width: 18px; height: 18px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 6px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; width: 100%; text-align: left; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.prow.on { box-shadow: inset 0 0 0 2px var(--ink); }
.prow[disabled] { opacity: .5; }

@media (max-width: 640px) {
  .top-in { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .brand-wrap .store, .free-btn span { display: none; }
  .free-btn { width: 40px; padding: 0; }
  .pill { max-width: 46vw; }
  .work { padding: 0 12px; }
  .listside { padding-top: 12px; }
  .rrow { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .rrow .go { display: none; }
  .rrow .plu { font-size: 14px; padding: 7px 2px; }
  .rrow .nm { font-size: 15px; }
  .rrow .pr { font-size: 17px; }
  .tabs button { font-size: 13.5px; padding: 0 10px; }
  .pp-b { padding: 12px; } .pp-h, .pp-f { padding-left: 14px; padding-right: 14px; }
  .stepper.big button { width: 50px; height: 50px; }
  .ctrls { grid-auto-flow: dense; }
  .ctrl.dctrl { grid-column: 1 / -1; }
  .stepper .val.date { font-size: 19px; }
}

/* Live-status mot ICA Måltid */
.live { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12.5px; font-weight: 650; padding: 4px 10px; border-radius: 99px; background: var(--sunk); color: var(--muted); }
.live .spin { width: 12px; height: 12px; border-width: 2px; }
.live.ok { background: var(--green-50); color: var(--green); }
.live.ok i { width: 7px; height: 7px; border-radius: 50%; background: #18B25F; box-shadow: 0 0 0 3px rgba(24,178,95,.2); animation: livepulse 2s infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 5px rgba(24,178,95,.05); } }
.live.err { background: var(--amber-50); color: var(--amber); }
.live svg { width: 14px; height: 14px; }
