.page-tool .tool-shell {
  padding-bottom: 48px;
}
.tool-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}
.tool-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.tool-tabs .ghost.on {
  background: var(--maroon);
  color: #fff;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.tool-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.tool-wide { grid-column: 1 / -1; }
.tool-form {
  display: grid;
  gap: 10px;
}
.tool-form label,
.field {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.tool-form input,
.tool-form select,
.tool-form textarea,
.field input,
.field select,
.field textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.tool-form textarea,
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.tool-form .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tool-form .row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tool-table th,
.tool-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tool-table th {
  font-size: 12px;
  color: var(--muted);
}
.tool-table button.link {
  border: none;
  background: none;
  color: var(--maroon);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}
.drop {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: #fffdfb;
}
.drop.over {
  border-color: var(--maroon);
  background: #f8eee9;
}
.linkish {
  border: none;
  background: transparent;
  color: var(--maroon);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}
.bars {
  display: grid;
  gap: 8px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.bar-track {
  height: 10px;
  background: var(--bg-2);
  border-radius: 8px;
  overflow: hidden;
}
.bar-track i {
  display: block;
  height: 100%;
  background: var(--maroon);
}
.preview-box {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1a1012;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.preview-box img,
.preview-box canvas {
  max-width: 100%;
  max-height: 360px;
}
.timer {
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 750;
  letter-spacing: -0.04em;
  color: var(--maroon-deep);
  margin: 8px 0 16px;
}
.sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  color: #111;
  position: relative;
  overflow: hidden;
}
.sheet .wm {
  position: absolute;
  inset: 8%;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: clamp(48px, 12vw, 92px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(109, 24, 42, 0.14);
  transform: rotate(-28deg);
  text-transform: uppercase;
  user-select: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.sheet h1 {
  font-size: 22px;
  margin: 0 0 8px;
  color: #4e101e;
}
.sheet .muted { color: #666; font-size: 13px; }
.nr {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--maroon);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}
.jump-card .nr { margin-bottom: 6px; }
.tool-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--maroon-deep);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 40;
  max-width: min(420px, calc(100% - 24px));
}
.pwd {
  font-family: Consolas, ui-monospace, monospace;
  letter-spacing: 0.04em;
}
.status-dot {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-2);
}
.status-dot.paid,
.status-dot.accepted { background: var(--green-bg); color: var(--green); }
.status-dot.sent,
.status-dot.bokad { background: #f3e4df; color: var(--maroon); }
.status-dot.kommit { background: #e5eef6; color: #2a4a6b; }
.status-dot.klar { background: var(--green-bg); color: var(--green); }
.status-dot.avbokad { background: #efe4da; color: var(--muted); }

.vinst-varor,
.vinst-extras {
  display: grid;
  gap: 12px;
}
.vinst-costs-label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.vinst-vara {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffdfb;
  display: grid;
  gap: 10px;
}
.vinst-vara-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}
.vinst-vara-top input,
.vinst-pack input,
.vinst-pack select,
.vinst-extra input,
.vinst-extra select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.vinst-vara-top .ghost,
.vinst-extra-top .ghost {
  min-height: 40px;
  padding: 0;
}
.vinst-pack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.vinst-sum {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--maroon-deep);
}
.vinst-extra {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffdfb;
}
.vinst-extra-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}
.vinst-batch {
  margin: 0 0 12px;
  font-size: 14px;
}
.vinst-break {
  margin: 0 0 12px;
}
.vinst-floor {
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin: 0 0 14px;
  background: #eef6ee;
  border: 1px solid var(--line);
}
.vinst-floor.wait { background: #f8eee9; }
.vinst-floor .vinst-pct { color: var(--green); }
.vinst-floor.wait .vinst-pct { color: var(--maroon-deep); }
.vinst-floor-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.vinst-floor .ghost { min-height: 40px; }
.vinst-cmp {
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin: 0 0 14px;
  background: #f7f3e6;
  border: 1px solid var(--line);
}
.vinst-cmp.good { background: #eef6ee; }
.vinst-cmp.ok { background: #f7f3e6; }
.vinst-cmp.low { background: #f8eee9; }
.vinst-cmp.loss { background: #f6e8e8; }
.vinst-cmp.good .vinst-pct { color: var(--green); }
.vinst-cmp.loss .vinst-pct { color: #8a1f1f; }
.vinst-cmp-rows {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.vinst-cmp-row {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) 6.5em;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.vinst-cmp-row span:first-child { color: var(--muted); font-weight: 650; }
.vinst-cmp-row strong { text-align: right; font-size: 14px; }
.vinst-cmp-track {
  height: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
}
.vinst-cmp-track i { display: block; height: 100%; }
.vinst-cmp-track .ditt { background: var(--maroon); }
.vinst-cmp-track .minsta { background: #8a5a4a; }
.vinst-cmp-track .mal { background: var(--green); }
.vinst-cmp.loss .vinst-cmp-track .ditt { background: #8a1f1f; }
.vinst-cmp.good .vinst-cmp-track .ditt { background: var(--green); }
.vinst-cmp-kpis { margin: 0; }
.vinst-cmp-kpis small {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.vinst-hero {
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin: 0 0 14px;
  background: #f8eee9;
  border: 1px solid var(--line);
}
.vinst-hero.good { background: #eef6ee; }
.vinst-hero.ok { background: #f7f3e6; }
.vinst-hero.low { background: #f8eee9; }
.vinst-hero.loss { background: #f6e8e8; }
.vinst-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.vinst-pct {
  margin: 4px 0 0;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 750;
  letter-spacing: -0.04em;
  color: var(--maroon-deep);
  line-height: 1.05;
}
.vinst-hero.good .vinst-pct { color: var(--green); }
.vinst-hero.loss .vinst-pct { color: #8a1f1f; }
.vinst-sub {
  margin: 4px 0 14px;
  font-size: 15px;
  font-weight: 650;
}
.vinst-bar {
  display: flex;
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
}
.vinst-bar i {
  display: block;
  height: 100%;
}
.vinst-bar .cost { background: #8a5a4a; }
.vinst-bar .tax { background: #6b5a2a; }
.vinst-bar .gain { background: var(--maroon); }
.vinst-hero.good .vinst-bar .gain { background: var(--green); }
.vinst-hero.loss .vinst-bar .gain { width: 0 !important; }
.vinst-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.vinst-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.vinst-kpis div {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfb;
}
.vinst-kpis dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.vinst-kpis dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 750;
}
.vinst-goal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfb;
}
.vinst-goal p { margin: 0; font-size: 14px; flex: 1; }
.vinst-saved-title {
  margin: 22px 0 10px;
  font-size: 18px;
}

.bok-week-wrap {
  margin: 0 0 14px;
}
.bok-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.bok-week button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  padding: 6px 4px;
  text-align: center;
}
.bok-week button small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.bok-week button.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}
.bok-week button.on small { color: #f3e4df; }
.bok-week button.shut { opacity: 0.5; }
.bok-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.bok-nav h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
}
.bok-nav .short { display: none; }
.bok-grid-wrap {
  overflow-x: auto;
}
.bok-grid {
  display: grid;
  gap: 8px;
  min-width: 560px;
  align-items: start;
}
.bok-times {
  display: grid;
  padding-top: 34px;
}
.bok-times span {
  height: 22px;
  font-size: 11px;
  color: var(--muted);
  line-height: 22px;
}
.bok-times span.hour {
  font-weight: 750;
  color: var(--ink);
}
.bok-col h3 {
  margin: 0 0 6px;
  font-size: 14px;
  min-height: 28px;
}
.bok-slots {
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff8f2;
}
.bok-slot {
  border: 0;
  border-bottom: 1px solid #f0e4dc;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-height: 22px;
}
.bok-slot:hover { background: #f3e4df; }
.bok-apt {
  position: absolute;
  left: 3px;
  right: 3px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  padding: 4px 6px;
  cursor: pointer;
  overflow: hidden;
  line-height: 1.25;
  z-index: 1;
}
.bok-apt small { display: block; font-weight: 500; opacity: 0.9; }
.bok-apt.kommit { box-shadow: inset 0 0 0 2px #fff; }
.bok-apt.klar { opacity: 0.72; }
.bok-apt.avbokad {
  background: #b9a8a2 !important;
  text-decoration: line-through;
}
.bok-list { display: grid; gap: 8px; }
.bok-list article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffdfb;
}
.bok-list article h3 { margin: 0 0 4px; font-size: 15px; }
.bok-list article p { margin: 0; font-size: 13px; color: var(--muted); }
.boka-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.boka-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.boka-steps li em {
  font-style: normal;
}
.boka-steps li span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ead6cf;
  color: var(--maroon-deep);
  font-size: 12px;
}
.boka-steps li.on { color: var(--maroon-deep); }
.boka-steps li.on span,
.boka-steps li.done span {
  background: var(--maroon);
  color: #fff;
}
.boka-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}
.boka-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfb;
  padding: 14px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.boka-card strong { display: block; font-size: 16px; }
.boka-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.boka-card:hover { border-color: var(--maroon); }
.boka-card.on {
  border-color: var(--maroon);
  box-shadow: inset 0 0 0 1px var(--maroon);
  background: #f8eee9;
}
.boka-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.boka-days {
  margin-bottom: 14px;
}
.boka-done h2 { color: var(--maroon-deep); }
.boka-avtal {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8eee9;
}
.boka-avtal p { margin: 0 0 8px; font-size: 14px; }
.boka-avtal label { font-weight: 650; }
.bok-firm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfb;
}
.bok-firm p { margin: 0; font-size: 14px; }
.bok-firm .tool-actions { margin: 0; }
@media (max-width: 860px) {
  .tool-grid,
  .tool-form .row2,
  .tool-form .row3 {
    grid-template-columns: 1fr;
  }
  .tool-form input,
  .tool-form select,
  .tool-form textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .tool-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-right: -14px;
    padding-right: 14px;
  }
  .tool-tabs .ghost {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .bok-week-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-right: -14px;
    padding-right: 14px;
  }
  .bok-week {
    display: flex;
    grid-template-columns: none;
    width: max-content;
  }
  .bok-week button {
    flex: 0 0 68px;
    min-height: 68px;
  }
  .bok-nav {
    gap: 6px;
  }
  .bok-nav h2 {
    flex: 1 1 100%;
    font-size: 16px;
  }
  .bok-nav .full { display: none; }
  .bok-nav .short { display: inline; }
  .bok-nav .ghost,
  .bok-nav .cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }
  .bok-desk { display: none; }
  .bok-daylist { margin-top: 0 !important; }
  .boka-cards { grid-template-columns: 1fr; }
  .boka-card { min-height: 64px; padding: 16px; }
  .boka-times .ghost {
    min-width: 72px;
    min-height: 44px;
  }
  .boka-bar {
    position: sticky;
    bottom: 0;
    z-index: 8;
    margin: 12px -4px 0;
    padding: 10px 4px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, var(--bg) 18%);
  }
  .boka-bar .cta,
  .boka-bar .ghost {
    flex: 1 1 calc(50% - 8px);
  }
  .bok-firm {
    flex-direction: column;
    align-items: stretch;
  }
  .page-tool .tool-actions .cta,
  .page-tool .tool-actions .ghost {
    min-height: 44px;
  }
  .vinst-pack {
    grid-template-columns: 1fr;
  }
  .vinst-vara-top input,
  .vinst-pack input,
  .vinst-pack select,
  .vinst-extra input,
  .vinst-extra select {
    font-size: 16px;
    min-height: 44px;
  }
  .vinst-kpis {
    grid-template-columns: 1fr;
  }
  .vinst-cmp-row {
    grid-template-columns: 1fr auto;
  }
  .vinst-cmp-track {
    grid-column: 1 / -1;
  }
  .tool-card { padding: 14px; }
  .sheet {
    padding: 16px;
    overflow-x: auto;
  }
  .tool-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 12px -4px 0;
    padding: 10px 4px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, var(--bg) 22%);
  }
  .tool-actions .cta,
  .tool-actions .ghost {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .boka-steps {
    justify-content: space-between;
    gap: 4px;
  }
  .boka-steps li em { display: none; }
  .boka-avtal label { font-size: 15px; }
}

@media print {
  .top, .subnav, .menu-btn, footer, .hero, .tool-tabs, .tool-actions, .no-print, .tool-toast, .vinst-saved-title, .vinst-goal button, .vinst-floor .ghost {
    display: none !important;
  }
  .sheet .wm {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .tool-card, .sheet {
    box-shadow: none;
    border: none;
  }
  body { background: #fff; }
}
