/* =========================================
   SKYLTFÖNSTRET — delad stilmall för marknadssidan och kundportalen.
   Egen identitet, medvetet skild från AIOS interna adminpanel
   (frontend/) — det här är kundernas produkt, inte byråns verktyg.

   2026-09-14: bytte bort den "futuristiska" glas-och-gradient-looken
   (lila/cyan ambient mesh-bakgrund, roterande gradient-ring) mot samma
   rena, ljusa identitet som hero-videon (skyltfonstret-bloom.html) redan
   etablerat: vit botten, nästan-svart text. --accent landade fel i ett
   första försök (satte den till blått) — bloom-sidan har nästan INGEN
   blå färg i sin egen gränssnittskrom; --wing:#1f6fe0 där används bara
   för scroll-mätaren och fokusringar, allt annat (knappar, chips) är
   svart/nästan-svart (--pill-bg:#0a0908). Samma mönster här: --accent
   är nu samma nästan-svarta som --text, och --wing är den enda platsen
   blått får synas alls. Samma variabelNAMN som innan (--bg, --text,
   --accent, --surface, osv.) återanvänds rakt av med nya värden, snarare
   än att döpas om — allt som redan pekar på dem (knappar, kort, chips,
   portalens kalender) ärver den nya paletten utan att varje regel
   behövde röras. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-solid: #FFFFFF;
  --surface-2: #F4F4F2;
  --border: rgba(10, 9, 8, 0.12);
  --text: #0A0908;
  --muted: rgba(10, 9, 8, 0.62);
  --accent: #0A0908;
  --accent-dark: #000000;
  --accent-tint: #EFEFEC;
  --wing: #1F6FE0;
  --success: #16A870;
  --success-tint: #E1F8EE;
  --danger: #E23F63;
  --danger-tint: #FCE4E9;
  --warn: #C4831A;
  --shadow: rgba(10, 9, 8, 0.14);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Code", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --display: "Inter Tight", "Inter", sans-serif;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  position: relative;
}

/* Signature device: a slow-rotating gradient ring traced along a card's
   own border-radius (mask technique — only the ring itself paints, the
   center stays transparent so it never covers content). Used sparingly,
   on the two or three moments meant to feel like "the AI is alive":
   the hero demo, pricing, the dashboard's live preview.

   The rotation animates a registered custom property (the gradient's own
   angle) rather than a CSS transform on the element — animating
   transform:rotate() on a large masked+gradient layer triggers a real
   Chromium compositor bug (confirmed by testing): the mask renders as
   stray diagonal seams instead of a clean ring on anything bigger than a
   small test box. Animating the angle only changes the painted gradient,
   never the element's own geometry, so the mask stays stable. */
@property --glow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.glow-ring { position: relative; }
.glow-ring::after {
  /* inset:0 (not a negative outward inset) so the ring traces just inside
     the edge — works whether or not the element also clips its own
     overflow (.browser-chrome does, for its rounded corners), since a
     protruding ring would get clipped by that same overflow:hidden. */
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--glow-angle), var(--accent), color-mix(in srgb, var(--accent) 35%, transparent), var(--accent), color-mix(in srgb, var(--accent) 35%, transparent), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: glow-ring-spin 9s linear infinite;
}
@keyframes glow-ring-spin { to { --glow-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .glow-ring::after { animation: none; } }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* ---- shared header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 92%, transparent) 0%,
    color-mix(in srgb, var(--bg) 62%, transparent) 62%,
    transparent 100%);
  transform: translateY(0);
  transition: transform 260ms var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
/* Portal (2026-10-14): a solid header, so the calendar's day row never shows through it. */
.portal .site-header { background: var(--bg); box-shadow: 0 1px 0 var(--border); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
/* flex-wrap: on a narrow screen, .brand + .header-actions (company name +
   logout button, on the portal dashboard) don't both fit on one row — real
   report: they visibly crowded/overlapped on mobile right after logging
   in. Wrapping to a second row is the fix, not shrinking either below its
   own min-content size. */
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; row-gap: 0.5rem; padding: 1rem clamp(1.25rem, 4vw, 2.5rem); max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; font-size: 1rem; letter-spacing: -0.012em; color: var(--text); }
.brand-mark { font-size: 1.05rem; opacity: 0.85; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
/* A long company name (this one included: "Kafé Lyktan (TEST)") shouldn't
   be able to push .header-actions wider than the row has room for — it
   truncates instead of forcing an overflow. */
#company-chip { display: inline-block; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
/* Wanted: the logo stays compact and .header-actions stays top-right on
   one row on mobile, same as desktop — not wrapped below the logo. The
   full wordmark next to the actions (company name + logout button) is
   what didn't fit; dropping to just the icon mark frees enough width that
   the row no longer needs flex-wrap's fallback to avoid overflowing. */
@media (max-width: 560px) { .brand-text { display: none; } }

@media (max-width: 720px) { .nav-links { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.65rem 1.2rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 600;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--wing); outline-offset: 3px; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 10px 24px -10px var(--shadow); transform: translateY(-1px); }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 0.98rem; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) { .btn, .btn-primary:hover { transition: none; transform: none; } }

/* ---- hero ---- */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem); background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.hero-eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.hero h1 { font-family: var(--display, inherit); font-weight: 600; font-size: clamp(2.1rem, 5.4vw, 3.4rem); line-height: 1.14; letter-spacing: -0.01em; margin: 0 0 1.2rem; text-wrap: balance; }
/* A highlighter-marker mark behind the word, not a gradient clipped onto
   the text — that gradient-text treatment is one of the most recognizable
   AI-generated-design tells, this reads as a deliberate, hand-marked
   emphasis instead. */
.hero h1 em { font-style: normal; font-weight: 700; color: var(--accent-dark); position: relative; z-index: 0; }
.hero h1 em::before {
  content: ""; position: absolute; z-index: -1; left: -0.06em; right: -0.06em; bottom: 0.05em; height: 0.4em;
  background: var(--accent-tint); border-radius: 3px;
}
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.chip.is-picked { background: var(--accent); color: #fff; }
/* Separate from .is-picked on purpose: .is-picked is a persistent state
   (selected or not), .chip-bounce is a one-off "this was just pressed"
   pulse — added fresh on every click (select AND deselect) so the press
   feedback isn't limited to the first time a chip is picked. */
.chip.chip-bounce { animation: demo-chip-pick 320ms var(--ease); }
@keyframes demo-chip-pick { 0% { transform: scale(1); } 45% { transform: scale(0.9); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .chip.chip-bounce { animation: none; } }

/* ---- steps ---- */
.section { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.section-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); text-align: center; margin: 0 0 0.6rem; }
.section-title { font-family: var(--display, inherit); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.2rem); text-align: center; letter-spacing: -0.005em; margin: 0 0 3rem; text-wrap: balance; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.75rem; counter-increment: step; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.step-num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); background: var(--accent-tint); width: 1.9em; height: 1.9em; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; position: relative; z-index: 1; }
.step h3 { font-size: 1.05rem; margin: 0 0 0.5rem; position: relative; z-index: 1; }
.step p { font-size: 0.92rem; color: var(--muted); margin: 0; position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .step:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px var(--shadow); }
}

/* ---- scroll-scene child stagger ----
   The parent .scroll-scene section already crossfades/scales as one
   block via animation-timeline: view() — this adds a small, faster,
   independent settle for the cards inside it (different magnitude, so
   it reads as "then its contents settle in" rather than fighting the
   section's own motion). One-shot via IntersectionObserver, see
   interactions.js. */
.stagger-group > * { opacity: 0; transform: translateY(14px); transition: opacity 380ms var(--ease), transform 380ms var(--ease); }
.stagger-group > *.is-visible { opacity: 1; transform: translateY(0); }
.stagger-group > *:nth-child(1) { transition-delay: 0ms; }
.stagger-group > *:nth-child(2) { transition-delay: 70ms; }
.stagger-group > *:nth-child(3) { transition-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  .stagger-group > * { opacity: 1; transform: none; transition: none; }
}

/* ---- trust row ---- */
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 780px) { .trust-row { grid-template-columns: 1fr; } }
.trust-item { text-align: center; padding: 0 1rem; }
.trust-item .icon { width: 36px; height: 36px; margin: 0 auto 0.85rem; color: var(--accent); }
.trust-item h3 { font-size: 0.98rem; margin: 0 0 0.4rem; }
.trust-item p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* Icons "draw" themselves in as the trust row scrolls into view, riding
   the same .is-visible toggle the stagger fade already uses — a large
   dasharray is enough to cover any of these icons' actual path length,
   no per-icon measuring needed. */
.trust-item .icon path,
.trust-item .icon circle,
.trust-item .icon polyline,
.trust-item .icon line {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  transition: stroke-dashoffset 700ms var(--ease) 150ms;
}
.trust-item.is-visible .icon path,
.trust-item.is-visible .icon circle,
.trust-item.is-visible .icon polyline,
.trust-item.is-visible .icon line {
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .trust-item .icon path,
  .trust-item .icon circle,
  .trust-item .icon polyline,
  .trust-item .icon line {
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* ---- pricing ---- */
.pricing-card { position: relative; overflow: hidden; max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2.25rem; text-align: center; box-shadow: 0 30px 60px -35px var(--shadow); }
.pricing-card > * { position: relative; z-index: 1; }
.price-line { display: flex; align-items: baseline; justify-content: center; gap: 0.4em; margin: 0.5rem 0 0.2rem; }
.price-amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-unit { color: var(--muted); font-size: 0.95rem; }
.price-sub { color: var(--muted); font-size: 0.88rem; margin: 0 0 1.5rem; }
.price-list { list-style: none; margin: 0 0 1.75rem; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 0.6rem; }
.price-list li { display: flex; gap: 0.6em; font-size: 0.9rem; align-items: flex-start; }
.price-list svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 0.15em; }
.price-setup { border-top: 1px dashed var(--border); margin-top: 1.5rem; padding-top: 1.25rem; font-size: 0.85rem; color: var(--muted); }
.price-setup strong { color: var(--text); }

/* ---- faq ---- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 1.25rem; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.75rem 1.1rem 0; font-weight: 600; font-size: 0.98rem;
  position: relative; transition: color 180ms var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 0.1rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg); transition: transform 220ms var(--ease), border-color 180ms var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-35%) rotate(225deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:hover::after { border-color: var(--accent); }
.faq-item p { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.92rem; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* ---- final cta ---- */
.final-cta { text-align: center; }
.final-cta h2 { font-family: var(--display, inherit); font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 0 0 0.75rem; text-wrap: balance; }
.final-cta p { color: var(--muted); margin: 0 0 1.75rem; }

/* ---- scroll-driven section transitions ----
   The fin.com feel the whole redesign was chasing isn't content fading
   in on top of a static page — it's each section transitioning as a
   block, tied directly to scroll position, so scrolling reads as moving
   between views rather than sliding down one long page. That's exactly
   what CSS scroll-driven animations are for: animation-timeline: view()
   ties a section's own animation progress to how far it's scrolled
   through the viewport — no scroll-hijacking, no JS, native scrolling
   throughout (keyboard/wheel/touch/screen-reader all still work
   normally, unlike a hand-rolled scroll-jacking implementation).
   Feature-detected and skipped entirely for reduced-motion or
   unsupported browsers — sections just render normally visible. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .scroll-scene {
      animation: scroll-scene-transition linear both;
      animation-timeline: view();
    }
  }
}
@keyframes scroll-scene-transition {
  0%   { opacity: 0; transform: translateY(64px) scale(0.965); }
  18%  { opacity: 1; transform: translateY(0) scale(1); }
  82%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-64px) scale(0.965); }
}

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: 0.82rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-contact { display: flex; gap: 1.25rem; }
.footer-contact a { color: var(--muted); }
.footer-contact a:hover { color: var(--accent); }
@media (max-width: 560px) { .footer-inner { flex-direction: column; text-align: center; } }

/* =========================================
   PORTAL (login + kunddashboard)
========================================= */
#view-login {
  min-height: calc(100vh - 65px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.25rem 2rem;
  box-shadow: 0 24px 48px -24px var(--shadow);
}
.login-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; margin-bottom: 1.25rem; }
.login-card h1 { font-size: 1.4rem; margin: 0 0 0.35rem; letter-spacing: -0.01em; text-wrap: balance; }
.login-card .lede { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.6rem; line-height: 1.5; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input {
  width: 100%; padding: 0.65rem 0.8rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  /* iOS Safari auto-zooms the whole page on focus for any text input under
     16px — this was that bug (real report: header looked "zoomed in" right
     after logging in on mobile). 1rem = 16px here (no root font-size
     override), so this is the floor, not a stylistic choice. */
  font-size: 1rem; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.field-input-row { position: relative; }
.field-input-row input { padding-right: 2.5rem; }
.field-toggle-visibility {
  position: absolute; top: 50%; right: 0.55rem; transform: translateY(-50%);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--muted); border-radius: 6px;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.field-toggle-visibility:hover { color: var(--text); background: var(--surface-2); }
.field-toggle-visibility svg { width: 18px; height: 18px; }
.field-toggle-visibility .icon-eye-off { display: none; }
.field-toggle-visibility.is-visible .icon-eye { display: none; }
.field-toggle-visibility.is-visible .icon-eye-off { display: block; }

.login-note { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px dashed var(--border); font-size: 0.78rem; color: var(--muted); text-align: center; line-height: 1.5; }
.login-note code { font-family: var(--mono); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 4px; }

#view-dashboard { display: none; }
#view-dashboard.is-active { display: block; }
#view-bookings { display: none; }
#view-bookings.is-active { display: block; }
#view-login.is-hidden { display: none; }

/* Tab-style switcher in the header, between "Ändringar" and "Bokningar" —
   two clearly separate pages/views, not panels stacked on one dashboard. */
.view-toggle { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.view-toggle-btn { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.view-toggle-btn:hover { color: var(--text); }
.view-toggle-btn.is-active { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
@media (max-width: 720px) { .view-toggle-btn { padding: 0.4rem 0.65rem; font-size: 0.76rem; } }

.bookings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 1.5rem; }
@media (max-width: 680px) { .stats-row { grid-template-columns: 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.stat-value { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--muted); }

.schedule-grid-padded { padding: 1.3rem; }
.schedule-day-view-inline { border-top: 1px solid var(--border); }
.schedule-day-view-head { padding: 1rem 1.3rem; }
.schedule-day-list-padded { padding: 0.6rem 1.3rem 1.3rem; }
.chip-link-btn { background: none; border: none; padding: 0; font: inherit; font-size: 0.74rem; font-weight: 600; color: var(--accent); cursor: pointer; letter-spacing: 0.01em; transition: opacity 0.15s var(--ease); }
.chip-link-btn:hover { opacity: 0.7; }
.chip-link-danger { color: var(--danger); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { border-color: var(--danger); }
.btn-danger-ghost[hidden] { display: none; }
.entity-status { font-size: 0.74rem; font-weight: 600; color: var(--muted); }
/* Notification bell in the portal header. */
.notif-wrap { position: relative; }
.notif-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.notif-btn:hover, .notif-btn[aria-expanded="true"] { border-color: var(--muted); background: var(--surface-2); }
.notif-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); }
.notif-badge[hidden] { display: none; }
.notif-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(400px, 100%); overflow-y: auto; animation: notif-in 220ms var(--ease); background: var(--surface); border: 0; border-left: 1px solid var(--border); border-radius: 0; box-shadow: -12px 0 30px rgba(10, 9, 8, 0.14); }
.notif-panel[hidden], .notif-scrim[hidden] { display: none; }
.notif-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(10, 9, 8, 0.3); animation: notif-fade 180ms ease; }
@keyframes notif-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes notif-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .notif-panel, .notif-scrim { animation: none; } }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.notif-close { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; padding: 0.35rem 0.7rem; font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer; }
.notif-close:hover { background: var(--surface-2); }
.notif-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notif-head { position: sticky; top: 0; z-index: 1; padding: 1.1rem 1rem; font-weight: 700; font-size: 1.15rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-empty { padding: 1.2rem 1rem; font-size: 0.85rem; color: var(--muted); }
/* 2026-10-08: same look as "Händelser" in the agreed bookings mockup: summary for today, + / × square per event, customer in bold, "Ny" on unread. */
.notif-summary { display: grid; gap: 0.1rem; margin: 0.75rem 1rem 0.35rem; padding: 0.6rem 0.75rem; border-radius: 6px; background: var(--surface-2); font-size: 0.82rem; line-height: 1.4; }
.notif-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0.7rem; align-items: start; width: 100%; padding: 0.7rem 1rem; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color 120ms var(--ease); }
li:last-child > .notif-item { border-bottom: 0; }
.notif-item:hover, .notif-item:focus-visible { background: var(--surface-2); outline: none; }
.notif-ic { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; font-weight: 700; font-size: 16px; line-height: 1; }
.notif-ic.new { background: #E4EDFB; color: #1D5FC4; }
.notif-ic.cancel { background: #FBE7EC; color: #B8264A; }
.notif-text { display: block; min-width: 0; font-size: 0.86rem; line-height: 1.45; }
.notif-text b { font-weight: 600; }
.notif-when { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.notif-item.is-unread .notif-when::before { content: "Ny · "; font-weight: 600; color: #1D5FC4; }
.notify-panel { margin-top: 1.5rem; }
.notify-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; padding: 0.2rem 1.3rem 1.2rem; }
.notify-form .add-booking-field { flex: 1 1 240px; min-width: 0; }
.notify-form input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text); }
.notify-form .edit-schedule-saved[hidden] { display: none; }
.notify-status { margin: -0.4rem 1.3rem 1.1rem; font-size: 0.8rem; color: var(--muted); }
.notify-status.is-error { color: var(--danger); }
.notify-status[hidden] { display: none; }
.entity-title .entity-role { font-weight: 400; }
.entity-item.is-editing { flex-direction: column; align-items: stretch; background: var(--surface-2); }
.staff-edit-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.staff-edit-form .add-booking-field { flex: 1 1 160px; min-width: 0; }
.staff-edit-form input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; background: var(--surface); color: var(--text); }
.staff-edit-form .btn { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
.staff-edit-error { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--danger); }
.staff-edit-error[hidden] { display: none; }

.add-booking-panel { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.add-booking-panel .chat-note { padding-top: 1rem; border-bottom: none; }
.add-booking-panel .add-booking-form input, .add-booking-panel .add-booking-form select { background: var(--surface); }
.add-booking-form select { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; color: var(--text); min-width: 10rem; cursor: pointer; }
.add-toggle[hidden] { display: none; }
.add-booking-form { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0 1.3rem 1.3rem; align-items: flex-end; }
.add-booking-field { display: flex; flex-direction: column; gap: 0.25rem; }
.add-booking-field span { font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.add-booking-form input { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text); }
.add-booking-form input[type="text"], .add-booking-form input[type="tel"] { flex: 1 1 160px; min-width: 0; }

.staff-services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 780px) { .staff-services-grid { grid-template-columns: 1fr; } }
.add-toggle { display: inline-flex; align-items: center; gap: 0.45rem; }
.add-toggle-icon { position: relative; width: 10px; height: 10px; flex-shrink: 0; transition: transform 220ms var(--ease); }
.add-toggle-icon::before, .add-toggle-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: currentColor; border-radius: 1px; }
.add-toggle-icon::after { transform: rotate(90deg); }
.add-toggle[aria-expanded="true"] { background: var(--accent-tint); border-color: var(--muted); }
.add-toggle[aria-expanded="true"] .add-toggle-icon { transform: rotate(45deg); }

.add-dropdown { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 240ms var(--ease), opacity 180ms var(--ease); }
.add-dropdown.is-open { grid-template-rows: 1fr; opacity: 1; }
.add-dropdown-clip { overflow: hidden; min-height: 0; }
.add-dropdown-body { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.9rem 1.3rem 1.1rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.add-dropdown-body input { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { .add-dropdown, .add-toggle-icon { transition: none; } }
.entity-list { list-style: none; margin: 0; padding: 0; }
.entity-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.3rem; border-top: 1px solid var(--border); font-size: 0.86rem; }
.entity-item:first-child { border-top: none; }
.entity-item .entity-main { min-width: 0; }
.entity-item .entity-title { display: block; font-weight: 600; }
.entity-item .entity-sub { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 0.1rem; }
.entity-item .entity-actions { display: flex; gap: 0.7rem; flex-shrink: 0; }

.entity-main-clickable { cursor: pointer; border-radius: 8px; padding: 0.2rem 0.4rem; margin: -0.2rem -0.4rem; transition: background-color 0.15s var(--ease); }
.entity-main-clickable:hover, .entity-main-clickable:focus-visible { background: var(--accent-tint); outline: none; }

/* ============ Staff weekly schedule — own full-size view ============ */
#view-staff-schedule { display: none; }
#view-staff-schedule.is-active { display: block; }
.schedule-head { flex-wrap: wrap; }
.schedule-head-left { display: flex; align-items: center; gap: 1.1rem; }
.schedule-back-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.schedule-head-right { display: flex; align-items: center; gap: 1.2rem; }
.week-nav { display: flex; align-items: center; gap: 0.9rem; }
.week-nav span { font-size: 0.8rem; font-weight: 600; color: var(--muted); min-width: 9ch; text-align: center; }
.week-nav .week-label { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-width: 15ch; }
.week-nav .wk-num { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; min-width: 0; font-variant-numeric: tabular-nums; }
.week-nav .wk-sub { font-size: 0.74rem; font-weight: 500; color: var(--muted); min-width: 0; white-space: nowrap; }
.week-today-btn { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.week-nav { position: relative; }
.week-label-btn { font: inherit; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 0.3rem 0.8rem; cursor: pointer; color: inherit; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.week-label-btn:hover, .week-label-btn:focus-visible { background: var(--accent-tint); border-color: var(--border); outline: none; }
.week-popover { position: fixed; z-index: 60; width: 304px; box-sizing: border-box; padding: 0.8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 44px rgba(10, 9, 8, 0.16); opacity: 0; transform: translateY(-4px) scale(0.97); transform-origin: top center; transition: opacity 160ms var(--ease), transform 200ms var(--ease); }
.week-popover.is-open { opacity: 1; transform: none; }
.wp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.55rem; }
.wp-title { font-weight: 700; font-size: 0.92rem; }
.wp-nav { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; cursor: pointer; transition: background-color 160ms var(--ease); }
.wp-nav:hover, .wp-nav:focus-visible { background: var(--accent-tint); outline: none; }
.wp-grid { display: flex; flex-direction: column; gap: 2px; }
.wp-row { display: grid; grid-template-columns: 2.6rem repeat(7, 1fr); align-items: center; justify-items: center; width: 100%; padding: 0.2rem 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: 0.8rem; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 120ms var(--ease); }
button.wp-row:hover, button.wp-row:focus-visible { background: var(--surface-2); outline: none; }
.wp-row-head { cursor: default; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.3rem; }
.wp-wk { min-width: 2rem; padding: 0.15rem 0; border-radius: 6px; background: var(--surface-2); font-size: 0.74rem; font-weight: 700; }
.wp-day { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; }
.wp-day.is-out { color: var(--muted); opacity: 0.55; }
.wp-day.is-today { box-shadow: inset 0 0 0 1.5px currentColor; font-weight: 700; }
.wp-row.is-selected, button.wp-row.is-selected:hover { background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--border); }
.wp-row.is-selected .wp-wk { background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .week-popover, .wp-row, .wp-nav { transition: none; } .week-popover { transform: none; } }
.week-label-btn .wk-num::after { content: "▾"; display: inline-block; margin-left: 0.35rem; font-size: 0.75em; color: var(--muted); transform: translateY(-1px); }
.week-today-btn[hidden] { display: none; }
.week-nav-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer;
}
.week-nav-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Week overview (2026-09-12 redesign) — a day tile shows ONLY weekday,
   date and a booking count, all the same fixed height regardless of how
   busy that day is. The earlier version rendered every booking inline
   per day, which meant one busy day (e.g. Friday with 3 bookings) forced
   uneven layouts and — worse — a hard-to-diagnose case where a very tall
   day pushed a later day (Sunday) far enough down some browsers stopped
   rendering it within view. A tile is just a button now; the actual
   bookings for that day only render after clicking into #schedule-day-view. */
.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 900px) { .schedule-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .schedule-grid { grid-template-columns: repeat(2, 1fr); } }
.schedule-day-tile {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1.1rem 0.6rem; cursor: pointer; font: inherit; color: var(--text);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.schedule-day-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.schedule-day-tile.is-today { background: var(--accent-tint); border-color: var(--accent); }
.schedule-day-tile.is-past { opacity: 0.55; }
.schedule-day-tile .sdt-weekday { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.schedule-day-tile .sdt-date { font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.schedule-day-tile .sdt-count { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.schedule-day-tile .sdt-count-label { font-size: 0.68rem; color: var(--muted); }
.schedule-day-tile .sdt-count.is-zero { color: var(--muted); font-size: 1rem; }

.schedule-day-list { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.4rem 0; }
.schedule-day-empty { font-size: 0.85rem; color: var(--muted); padding: 2rem 0.5rem; text-align: center; }

/* ============ Per-staff schedule editor (2026-09-12) — standing weekly
   hours + one-off time-off ranges (sick days/vacation). ============ */
.edit-schedule-panel { margin-bottom: 1.5rem; padding: 0 0 1.3rem; }
.edit-schedule-panel .chat-note { padding: 0 1.3rem; margin: 0.6rem 0; }
.edit-schedule-panel .panel-head { padding: 1.1rem 1.3rem 0.8rem; border-bottom: none; }
.weekly-hours-editor { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 1.3rem; }
.weekly-hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; padding: 0.5rem 0; border-top: 1px solid var(--border); }
.weekly-hours-row:first-child { border-top: none; }
.weekly-hours-row .whr-day { flex: 0 0 60px; font-weight: 600; font-size: 0.85rem; }
.weekly-hours-row label.whr-closed { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); flex: 0 0 auto; }
.weekly-hours-row input[type="time"] {
  border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.5rem;
  font: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text);
}
.weekly-hours-row input[type="time"]:disabled { opacity: 0.4; }
.weekly-hours-row .whr-sep { color: var(--muted); font-size: 0.8rem; }
.edit-schedule-actions { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.3rem 0; }
.edit-schedule-saved { font-size: 0.82rem; color: var(--success); font-weight: 600; }

.time-off-row { display: flex; flex-direction: column; }
.time-off-row .entity-sub { font-style: italic; }
.add-time-off-form { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.9rem 1.3rem 0; align-items: flex-end; }
.add-time-off-form .time-off-arrow { padding-bottom: 0.55rem; color: var(--muted); font-size: 1rem; }
.add-time-off-form .time-off-note-field { flex: 1 1 180px; min-width: 0; }
.add-time-off-form .time-off-note-field input { width: 100%; box-sizing: border-box; }
.add-time-off-form .add-booking-field input { flex: none; }
.time-off-summary { margin: 0.7rem 1.3rem 0; font-size: 0.84rem; font-weight: 600; color: var(--text); }
.time-off-summary[hidden] { display: none; }
.toggle-chevron { transition: transform 220ms var(--ease); }
.add-toggle[aria-expanded="true"] .toggle-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .toggle-chevron { transition: none; } }
@media (max-width: 560px) { .add-time-off-form .time-off-arrow { display: none; } .add-time-off-form .add-booking-field { flex: 1 1 140px; } .add-time-off-form .add-booking-field input { width: 100%; box-sizing: border-box; } }
.add-time-off-form input { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text); }

/* ============ Compact single-line booking row — used in both the main
   Kalender overview and the per-staff schedule. Replaces the old bulky
   multi-line "chip" card so a day with 5+ bookings doesn't force scrolling
   just to read them (2026-09-11 feedback). Reschedule expands an inline
   form below the row on demand; nothing else ever grows the row itself. */
.booking-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem; border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.8rem;
  transition: background-color 0.15s var(--ease);
}
.booking-row:hover { background: var(--accent-tint); }
.booking-row { flex-wrap: wrap; }
.booking-row { cursor: pointer; }
.booking-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.booking-row .br-extras { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1 1 100%; order: 6; min-width: 0; }
.booking-row .br-chip { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; padding: 0.08rem 0.5rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.7rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-row .br-chip.is-msg { color: var(--muted); min-width: 0; flex: 0 1 auto; }
.booking-row .br-chip.is-msg span { overflow: hidden; text-overflow: ellipsis; }
.booking-row .br-chip svg { flex-shrink: 0; }

/* Booking detail dialog (click a booking in any day view). */
.booking-detail-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(10, 9, 8, 0.38); opacity: 0; transition: opacity 180ms var(--ease); }
.booking-detail-backdrop.is-open { opacity: 1; }
.booking-detail { width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(10, 9, 8, 0.22); transform: translateY(8px) scale(0.98); transition: transform 220ms var(--ease); }
.booking-detail-backdrop.is-open .booking-detail { transform: none; }
.booking-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.3rem 0.9rem; border-bottom: 1px solid var(--border); }
.booking-detail-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.booking-detail-when { margin: 0.2rem 0 0; font-family: var(--mono); font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.booking-detail-close { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.booking-detail-close:hover { border-color: var(--muted); }
.booking-detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.1rem; margin: 0; padding: 1rem 1.3rem; font-size: 0.88rem; }
.booking-detail-list dt { color: var(--muted); }
.booking-detail-list dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.booking-detail-list dd.is-message { font-weight: 400; white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 0.5rem 0.65rem; }
.booking-detail-list dd.is-muted { font-weight: 400; color: var(--muted); }
.booking-detail-tel { color: var(--text); text-decoration: underline; text-underline-offset: 2px; font-variant-numeric: tabular-nums; }
.booking-detail-move { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.3rem 0.9rem; }
.booking-detail-move[hidden] { display: none; }
.booking-detail-move input { border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.6rem; font: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text); }
.booking-detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.9rem 1.3rem 1.2rem; border-top: 1px solid var(--border); }
.booking-detail-actions .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
.booking-detail-actions .btn-danger-ghost { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .booking-detail-backdrop, .booking-detail { transition: none; } .booking-detail { transform: none; } }
.booking-row .br-time { font-family: var(--mono); font-weight: 700; color: var(--accent-dark); flex: 0 0 auto; }
/* The customer's name is the one thing that must never disappear — a long
   staff name ("Annikas Klipperia AB") or service name used to shrink right
   past it down to nothing (found 2026-09-11). Name gets first claim on
   space (bigger flex-basis, shrinks last); the tag/service get a hard
   max-width instead of an equal share, so THEY truncate first if anything
   has to give. Full text is still on the row's title tooltip either way. */
.booking-row .br-name { font-weight: 600; flex: 2 1 0%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-row .br-name:has(+ .br-phone) { flex: 0 1 auto; }
.booking-row .br-phone { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.35rem; margin-right: auto; padding: 0.12rem 0.55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.74rem; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.booking-row .br-phone svg { color: var(--muted); flex-shrink: 0; }
.booking-row .br-phone ~ .br-service { flex: 0 1 auto; }
.booking-row .br-phone:hover, .booking-row .br-phone:focus-visible { border-color: var(--accent); outline: none; }
.booking-row .br-service { color: var(--muted); font-size: 0.74rem; flex: 1 1 0%; min-width: 0; max-width: 45%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-row .br-staff-tag { flex: 0 1 auto; max-width: 80px; font-size: 0.68rem; font-weight: 700; color: var(--accent); background: var(--accent-tint); border-radius: 999px; padding: 0.1rem 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-row .br-actions { flex: 0 0 auto; display: flex; gap: 0.2rem; }
.br-icon-btn {
  width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.br-icon-btn:hover { background: var(--surface-solid); color: var(--accent); }
.br-icon-btn.br-icon-danger:hover { color: var(--danger); }

/* Day timeline: hour labels in a left gutter, bookings as blocks sized by duration. */
.day-timeline { position: relative; margin: 0.8rem 0 0.8rem; --dt-gutter: 3.6rem; }
.dt-hour, .dt-half, .dt-now, .dt-area { position: absolute; left: var(--dt-gutter); right: 0; }
.dt-hour { border-top: 1px solid var(--border); }
.dt-hour-label { position: absolute; right: calc(100% + 0.6rem); top: -0.62em; font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.dt-half { border-top: 1px dashed var(--border); opacity: 0.5; }
.dt-area { top: 0; bottom: 0; }
.dt-block { position: absolute; box-sizing: border-box; margin-left: 2px; background: var(--accent-tint); border-left: 3px solid var(--accent); border-radius: 8px; z-index: 1; }
.dt-block .booking-row, .dt-block .booking-row:hover { background: transparent; }
.dt-block:focus-within { z-index: 3; }
.dt-now { border-top: 2px solid var(--danger); z-index: 4; pointer-events: none; }

/* Whole-salon day view: fixed hour gutter + one scrollable column per staff member. */
.dt-multi { display: flex; margin: 0.8rem 0; }
.dt-gutter { position: relative; flex: 0 0 3.6rem; }
.dt-gutter-label { position: absolute; right: 0.6rem; transform: translateY(-0.62em); font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.dt-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.dt-inner { position: relative; }
.dt-col-heads { display: grid; grid-template-columns: repeat(var(--dt-cols, 1), minmax(0, 1fr)); align-items: end; }
.dt-col-head { padding: 0 0.6rem 0.5rem; font-size: 0.82rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 1px solid var(--border); }
.dt-col-head:first-child { border-left: none; }
.dt-body { position: relative; }
.dt-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.dt-line.is-half { border-top-style: dashed; opacity: 0.5; }
.dt-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--dt-cols, 1), minmax(0, 1fr)); }
.dt-col { position: relative; border-left: 1px solid var(--border); }
.dt-col:first-child { border-left: none; }
.dt-body .dt-now { left: 0; right: 0; }
.dt-col .booking-row { flex-wrap: wrap; row-gap: 0.2rem; }
.dt-col .booking-row .br-name { flex: 1 1 auto; }
.dt-col .booking-row .br-phone { margin-right: 0; }
.dt-col .booking-row .br-actions { order: 4; margin-left: auto; }
.dt-col .booking-row .br-service { flex: 1 1 100%; max-width: none; text-align: left; order: 5; }
.dt-col { container-type: inline-size; }
@container (max-width: 230px) { .dt-col .booking-row .br-phone, .dt-col .booking-row .br-service, .dt-col .booking-row .br-chip.is-msg span { display: none; } }
.dt-now::before { content: ""; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.booking-row-form { display: none; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem; margin: 0 0.1rem 0.25rem; align-items: center; background: var(--surface-2); border-radius: 8px; }
.booking-row-form input { border: 1px solid var(--border); border-radius: 8px; padding: 0.35rem 0.5rem; font: inherit; font-size: 0.78rem; background: var(--surface-solid); color: var(--text); }
.booking-row-form .btn { padding: 0.35rem 0.7rem; font-size: 0.76rem; }

.dash-wrap { max-width: 1240px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem) 4rem; }
.greeting { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.3rem; }
.greeting-sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 2rem; }

.dash-grid { display: grid; grid-template-columns: minmax(340px, 1.1fr) minmax(300px, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 680px) { .dash-grid { grid-template-columns: 1fr; } }
/* A 1fr track still sizes to its content's min-content width by default
   (an implicit minmax(auto, 1fr)) — the preview panel's browser-chrome
   mockup is built at a fixed 1280px virtual width and only scaled down
   with a CSS transform, which doesn't shrink its layout box, so without
   this the grid track (and the whole page) blew out to ~700px wide on a
   375px phone screen instead of collapsing to one column. */
.dash-grid > * { min-width: 0; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.panel-head { padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.panel-head h2 { font-size: 0.95rem; margin: 0; font-weight: 700; }
.calendar-head { display: grid; grid-template-columns: 1fr auto 1fr; }
.calendar-head-right { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; }
.icon-btn.is-spinning svg { animation: spin 700ms linear infinite; }
@media (prefers-reduced-motion: reduce) { .icon-btn.is-spinning svg { animation: none; opacity: 0.5; } }
@media (max-width: 560px) {
  .calendar-head { grid-template-columns: 1fr auto; row-gap: 0.8rem; }
  .calendar-head .week-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
.panel-body { padding: 1.3rem; }

.browser-chrome { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.browser-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.browser-url { flex: 1; background: var(--bg); border-radius: 6px; padding: 0.3rem 0.6rem; font-size: 0.74rem; color: var(--muted); font-family: var(--mono); text-align: center; }

/* The iframe renders at a real desktop virtual size (see portal.js) so
   the embedded site lays out with its actual desktop breakpoint, then
   gets visually shrunk with a CSS transform to fit the panel — this is
   what "sant utseende" (true appearance) means here, not a
   mobile-breakpoint render squeezed into a narrow column. Height stays
   fixed rather than resized to fit page content (see the JS comment on
   scaleSitePreview for why that broke sites using vh units) — content
   taller than the virtual window scrolls natively inside the iframe,
   same as actually visiting the site. The wrap's own height is set by
   JS to exactly match the scaled iframe, so no separate outer scrollbar. */
.site-preview-scale-wrap { position: relative; width: 100%; height: 315px; overflow: hidden; background: #fff; }
.site-preview-frame { display: block; width: 1280px; height: 900px; border: 0; background: #fff; transform-origin: top left; }

.site-status-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.95rem 1.3rem; border-top: 1px solid var(--border); }
.status-left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.status-live { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.82rem; font-weight: 600; color: var(--success); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); position: relative; }
.status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--success); animation: pulse-ring 2.4s var(--ease) infinite; }
@keyframes pulse-ring { 0% { transform: scale(0.7); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status-dot::after { animation: none; display: none; } }

/* Unpublished draft state — a confirmed chat edit updates the preview
   immediately but not the live site (see the portal.js/portal.ts change
   this belongs to): the dot switches from teal-green to amber so "Live"
   still reads as true (the published version really is still up) while
   making it obvious something newer is waiting. */
.status-live.is-draft { color: var(--warn); }
.status-live.is-draft .status-dot { background: var(--warn); }
.status-live.is-draft .status-dot::after { border-color: var(--warn); }
.publish-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: 0; padding: 0 1.3rem 0.95rem; }

.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.history-item { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.3rem; border-top: 1px solid var(--border); font-size: 0.86rem; }
.history-item > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.history-item:first-child { border-top: none; }
.history-meta { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.history-time { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); }
.pill { font-size: 0.7rem; font-weight: 700; padding: 0.2em 0.6em; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.pill-done { background: var(--success-tint); color: var(--success); }
.pill-failed { background: var(--danger-tint); color: var(--danger); }
.pill-pending { background: var(--surface-2); color: var(--muted); }

.chat-note { font-size: 0.8rem; color: var(--muted); line-height: 1.5; padding: 0 1.3rem 1rem; margin: 0; border-bottom: 1px solid var(--border); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem 1.3rem 0; }
.chip { background: var(--accent-tint); color: var(--accent-dark); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 0.8rem; font-weight: 600; padding: 0.4rem 0.8rem; border-radius: 999px; transition: transform 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease); }
.chip:hover { transform: translateY(-1px); background: var(--accent); color: #fff; border-color: var(--accent); }
.chip:disabled { opacity: 0.45; pointer-events: none; transform: none; }

/* Chips embedded inside a bot chat bubble (guided question flow — pick a
   day, pick a category) — same chip, tighter spacing, no outer padding
   since the bubble already has its own. */
.chip-row-inline { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.chip-sm { padding: 0.3rem 0.65rem; font-size: 0.76rem; }

.chat-log { padding: 1rem 1.3rem; display: flex; flex-direction: column; gap: 0.85rem; height: 360px; overflow-y: auto; }
.msg { max-width: 84%; font-size: 0.9rem; line-height: 1.5; opacity: 0; transform: translateY(8px); animation: msg-in 380ms var(--ease) forwards; }
@keyframes msg-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .msg { animation: none; opacity: 1; transform: none; } }
.msg-user { align-self: flex-end; }
.msg-user .bubble { background: var(--accent); color: #fff; padding: 0.6rem 0.85rem; border-radius: 12px 12px 2px 12px; white-space: pre-line; }
.msg-bot { align-self: flex-start; }
.msg-bot .bubble { background: var(--surface-2); color: var(--text); padding: 0.6rem 0.85rem; border-radius: 12px 12px 12px 2px; }

.typing-dots { display: inline-flex; gap: 3px; align-items: center; padding: 0.2rem 0; }
.typing-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: bounce 1.1s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing-dots span { animation: none; opacity: 0.8; } }

.diff-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 0.9rem; margin-top: 0.5rem; }
.diff-row { display: flex; gap: 0.6rem; font-family: var(--mono); font-size: 0.78rem; padding: 0.2rem 0; align-items: baseline; }
.diff-label { color: var(--muted); flex-shrink: 0; }
.diff-before { color: var(--muted); text-decoration: line-through; }
.diff-after { color: var(--success); font-weight: 600; }
.diff-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.diff-actions .btn { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.confirmed-note { display: inline-flex; align-items: center; gap: 0.4em; color: var(--success); font-size: 0.82rem; font-weight: 600; margin-top: 0.6rem; }
.diff-error { color: var(--danger); font-size: 0.82rem; margin-top: 0.5rem; }
.cancelled-note { display: inline-flex; align-items: center; gap: 0.4em; color: var(--muted); font-size: 0.82rem; font-style: italic; margin-top: 0.6rem; }

.image-upload-label { margin-top: 0.65rem; cursor: pointer; }
.image-upload-label svg { flex-shrink: 0; }
.image-upload-label-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-upload-label.is-disabled { opacity: 0.55; cursor: default; pointer-events: none; }
.image-upload-preview { margin-top: 0.65rem; }
.image-crop-frame {
  max-width: 320px; width: 100%; border-radius: 8px; border: 1px solid var(--border);
  background-size: cover; background-repeat: no-repeat; cursor: grab;
  touch-action: none; user-select: none;
}
.image-crop-frame.is-dragging { cursor: grabbing; border-color: var(--accent); }
.image-crop-hint { margin: 0.4rem 0 0; font-size: 0.76rem; color: var(--muted); }

/* A real backend call — can take up to a minute or more — so this needs
   to read clearly as "working", not just static text someone might miss
   or mistake for a stalled page. */
.working-row {
  display: flex; align-items: center; gap: 0.6em;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text);
  padding: 0.6rem 0; border-top: 1px dashed var(--border); margin-top: 0.5rem;
}
.spinner {
  width: 15px; height: 15px; flex-shrink: 0;
  border: 2px solid var(--accent-tint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }

.working-bar { position: relative; height: 3px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 0.6rem; }
.working-bar::after {
  content: ""; position: absolute; inset: 0; width: 40%; border-radius: 999px;
  background: var(--accent); animation: working-sweep 1.3s ease-in-out infinite;
}
@keyframes working-sweep { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .working-bar::after { animation: none; left: 0; width: 100%; opacity: 0.35; }
}

.chat-input-row { display: flex; align-items: flex-end; gap: 0.6rem; padding: 1rem 1.3rem; border-top: 1px solid var(--border); }
/* One box for everything — a normal message wraps and grows instead of
   scrolling sideways forever, and the same element is reused (pre-filled,
   line per item) for the guided flows' "fill in a value per item" step.
   resize:none + overflow:hidden + JS-driven height (autoResizeChatInput in
   portal.js) is what makes it grow AND shrink back as text is added or
   removed, rather than only ever growing. */
.chat-input-row textarea {
  flex: 1; resize: none; overflow-y: auto; overflow-x: hidden; padding: 0.65rem 0.9rem; border-radius: 16px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  /* Same 16px floor as .field input above — this is the field people
     actually focus most on mobile (every guided-flow answer goes through
     it), so it was the main source of the reported auto-zoom-on-login. */
  font-family: inherit; font-size: 1rem; line-height: 1.5;
  min-height: 2.6em; max-height: 9rem; transition: height 120ms var(--ease);
  /* Read by chatInput.scrollIntoView({block:'end'}) in portal.js (the
     mobile-keyboard fix) — without this the input landed flush against the
     very bottom edge of the shrunk viewport, so close to the keyboard that
     what was being typed was hard to see. This leaves breathing room. */
  scroll-margin-bottom: 44px;
}
@media (prefers-reduced-motion: reduce) { .chat-input-row textarea { transition: none; } }
.chat-input-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.chip-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.send-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: none; }
.send-btn:hover { background: var(--accent-dark); }
.send-btn svg { width: 16px; height: 16px; }

/* Bokningar tab (2026-10-08): bookings.js draws its own page; let it use the full width on phones. */
.bookings-wrap { padding-top: 1.25rem; }
@media (max-width: 760px) { .bookings-wrap { padding-left: 0; padding-right: 0; } }
/* Ändringar (2026-10-13): the editor fills the window, so no empty band under it to scroll to. */
@media (min-width: 761px) { .editor-wrap { padding-bottom: .5rem; } }
/* 2026-10-08: with the notification bell the phone header no longer fit
   (109px sideways scroll on every tab). The company name is already the
   page's greeting, so it steps aside on small screens. */
@media (max-width: 560px) {
  #company-chip { display: none; }
  .header-actions { gap: 0.5rem; }
  #logout-btn { padding-left: 0.7rem; padding-right: 0.7rem; }
}

/* =========================================
   Ändringar in the same theme as the Bokningar tab (bookings.css), 2026-10-13:
   one framed page, grafit instead of black, 6px corners, calm panels.
   Only inside #view-dashboard, so the landing page and login keep their look.
   ========================================= */
#view-dashboard {
  --text: #23211F;
  --muted: rgba(10, 9, 8, 0.64);
  --border: rgba(10, 9, 8, 0.13);
  --surface-2: #F4F3F1;
  --accent: #3A3734;
  --accent-dark: #23211F;
  --accent-tint: #F4F3F1;
  --success: #137A52;
  --ch-r: 6px;
  font-family: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}
#view-dashboard .ch-stage { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px 22px; display: grid; gap: 16px; }
#view-dashboard .ch-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
#view-dashboard .greeting { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; line-height: 1.25; }
#view-dashboard .greeting-sub { margin: 0; font-size: 15px; color: var(--muted); }
#view-dashboard .dash-grid { gap: 16px; }
#view-dashboard .dash-grid > div { gap: 16px !important; }

#view-dashboard .btn { border-radius: var(--ch-r); padding: 8px 13px; min-height: 40px; font-size: 14px; font-weight: 500; }
#view-dashboard .btn:active { transform: none; filter: brightness(.92); }
#view-dashboard .btn-ghost { background: #fff; border-color: var(--border); }
#view-dashboard .btn-ghost:hover { border-color: rgba(10, 9, 8, 0.38); }
#view-dashboard .btn-primary { background: var(--accent); border-color: var(--accent); }
#view-dashboard .btn-primary:hover { background: var(--accent); filter: brightness(1.15); box-shadow: none; transform: none; }

#view-dashboard .panel { border-radius: var(--ch-r); border-color: var(--border); }
#view-dashboard .panel-head { padding: 12px 16px; min-height: 52px; box-sizing: border-box; }
#view-dashboard .panel-head h2 { font-size: 16px; font-weight: 600; }
#view-dashboard .panel-body { padding: 16px; }
#view-dashboard .chat-note { padding: 12px 16px; font-size: 13px; }
#view-dashboard .site-status-row { padding: 12px 16px; }
#view-dashboard .publish-hint { padding: 0 16px 12px; font-size: 13px; }
#view-dashboard .history-item { padding: 11px 16px; font-size: 14px; }

/* The preview: a plain frame, no spinning glow. */
#view-dashboard .browser-chrome { border-radius: var(--ch-r); background: var(--surface-2); }
#view-dashboard .glow-ring::after { content: none; }
#view-dashboard .browser-url { border-radius: 4px; }

/* Chat: square-ish like the booking cards, grafit for what you wrote. */
#view-dashboard .chat-log { padding: 16px; }
#view-dashboard .msg-user .bubble { background: var(--accent); border-radius: var(--ch-r); }
#view-dashboard .msg-bot .bubble { background: var(--surface-2); border-radius: var(--ch-r); }
#view-dashboard .chip { border-radius: var(--ch-r); background: #fff; color: var(--text); border: 1px solid var(--border); font-weight: 500; font-size: 13.5px; padding: 6px 10px; }
#view-dashboard .chip:hover { transform: none; background: #fff; color: var(--text); border-color: rgba(10, 9, 8, 0.38); }
#view-dashboard .chip.is-picked { background: var(--accent); color: #fff; border-color: var(--accent); }
#view-dashboard .chat-input-row { padding: 12px 16px; }
#view-dashboard .chat-input-row textarea { border-radius: var(--ch-r); font-size: 15px; }
#view-dashboard .chat-input-row textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 55, 52, 0.12); }
#view-dashboard .send-btn { border-radius: var(--ch-r); width: 42px; height: 42px; }
#view-dashboard .send-btn:hover { background: var(--accent); filter: brightness(1.15); }

@media (max-width: 760px) {
  #view-dashboard .ch-stage { border-radius: 0; border-left: 0; border-right: 0; padding: 16px 14px 18px; }
}


/* =========================================
   Same look as the portal's Bokningar and Ändringar (2026-10-15, Edwin): grafit
   instead of black, 6px corners, hairlines, soft fill-swap hover (no lift).
   Buttons apply everywhere (portal header and login too); the rest only on the
   landing page (body.landing).
   ========================================= */
:root { --accent: #3A3734; --accent-dark: #2C2A27; --accent-tint: #F1F0EE; --text: #23211F; --surface-2: #F4F3F1; }
.btn { border-radius: 6px; font-weight: 500; transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); box-shadow: none; transform: none; }
.btn-ghost:hover { border-color: var(--accent); }

.landing .hero { background: none; padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.landing .hero h1 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; font-size: clamp(2.2rem, 5.6vw, 3.6rem); }
.landing .hero h1 em { font-weight: 600; color: var(--muted); }
.landing .hero h1 em::before { display: none; }
.landing .section-label { color: var(--muted); font-weight: 600; letter-spacing: 0.06em; font-size: 0.75rem; }
.landing .section-title { letter-spacing: -0.02em; margin-bottom: 2.25rem; }
.landing .step { border-radius: 10px; padding: 1.4rem 1.5rem; box-shadow: none; }
.landing .step:hover { transform: none; box-shadow: none; }
.landing .step::before, .landing .step::after { display: none; }
.landing .step-num { border-radius: 6px; background: var(--surface-2); color: var(--text); font-weight: 600; width: 1.8em; height: 1.8em; }
.landing .trust-item { text-align: left; padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.landing .trust-item .icon { margin: 0 0 0.85rem; width: 30px; height: 30px; color: var(--text); }
.landing .pricing-card { border-radius: 10px; box-shadow: none; padding: 2rem; }
.landing .price-amount { font-weight: 600; letter-spacing: -0.03em; }
.landing .price-setup { border-top-style: solid; border-top-color: var(--border); }
.landing .faq-list { gap: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.landing .faq-item { border: 0; border-radius: 0; background: none; border-top: 1px solid var(--border); }
.landing .faq-item:first-child { border-top: 0; }
.landing .faq-item summary:hover { color: var(--text); }
.landing .faq-item summary:hover::after { border-color: var(--text); }
.landing .site-header { background: var(--bg); box-shadow: 0 1px 0 var(--border); }

/* Phone, Bokningar open: "Logga ut" lives under Mer in the bookings page (bookings.js), the header keeps the switch and the bell. */
@media (max-width: 760px) { body.portal.on-bookings #logout-btn, body.portal.on-bookings #company-chip { display: none; } }
