/* jiransyria.com. Samma färger och typsnitt som appen (lib/branding.dart,
   lib/ui/jiran_ui.dart). Dator: sidomeny + rutnät. Mobil (< 861 px): en kolumn.
   Typsnittet: IBM Plex Sans Arabic som små woff2 (ca 55 KB per vikt,
   tool/make_web_fonts.py), font-display: swap = texten syns direkt. */
@font-face { font-family: "Plex Arabic"; src: url("/site/fonts/plex-arabic-regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/site/fonts/plex-arabic-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/site/fonts/plex-arabic-bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
:root {
  color-scheme: light;
  --green: #007a3d;
  --green-dark: #00562b;
  --gold: #f4c542;
  --gold-text: #6b5200;
  /* Mörkt, dämpat guld för små detaljer (som brandGoldDeep i appen). */
  --gold-deep: #9a7a34;
  --red: #ce1126;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --fg: #14181a;
  --muted: #5b6660;
  --line: #dfe5e0;
  --jobs: #e3f2e9; --jobs-fg: #007a3d;
  --rentals: #fdf3d4; --rentals-fg: #8a6a00;
  --services: #fbe4e7; --services-fg: #b00e20;
  --sales: #e6e8ea; --sales-fg: #14181a;
  --shadow: 0 1px 3px rgba(0, 40, 20, 0.08);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
    /* Datumfältens kalendersymbol m.m. blir ljusa (testrapporten 2026-10-13:
       symbolen var svart på mörk botten). */
    color-scheme: dark;
    --green: #6fdc9a;
    --green-dark: #0d2a1b;
    --gold-text: #f4c542;
    --gold-deep: #b8994f;
    --bg: #101412;
    --surface: #1a201c;
    --fg: #e8eeea;
    --muted: #a3b0a8;
    --line: #2b342e;
    --jobs: #1c3a2a; --jobs-fg: #6fdc9a;
    --rentals: #3a3218; --rentals-fg: #f4c542;
    --services: #41222a; --services-fg: #ff8a93;
    --sales: #2a2f33; --sales-fg: #e8eeea;
    --shadow: none;
  }

}
:root[data-theme="dark"] {
    /* Datumfältens kalendersymbol m.m. blir ljusa (testrapporten 2026-10-13:
       symbolen var svart på mörk botten). */
    color-scheme: dark;
    --green: #6fdc9a;
    --green-dark: #0d2a1b;
    --gold-text: #f4c542;
    --gold-deep: #b8994f;
    --bg: #101412;
    --surface: #1a201c;
    --fg: #e8eeea;
    --muted: #a3b0a8;
    --line: #2b342e;
    --jobs: #1c3a2a; --jobs-fg: #6fdc9a;
    --rentals: #3a3218; --rentals-fg: #f4c542;
    --services: #41222a; --services-fg: #ff8a93;
    --sales: #2a2f33; --sales-fg: #e8eeea;
    --shadow: none;
  }



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Plex Arabic", system-ui, "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--green); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px; }

/* --- Sidhuvud --------------------------------------------------------- */
#top { background: var(--green-dark); color: #fff; border-bottom: 2px solid var(--gold-deep); }
.top-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 16px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.brand img { border-radius: 50%; background: #fff; }
.search { flex: 1 1 320px; display: flex; gap: 6px; min-width: 0; }
.search input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 0;
  font: inherit; background: #fff; color: #14181a;
}
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Knappar ------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button.primary { background: var(--green); border-color: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .button.primary { color: #0d2a1b; }
 }
:root[data-theme="dark"] .button.primary { color: #0d2a1b; }
 
.button.gold { background: var(--gold); border-color: var(--gold); color: #3a2d00; }
.button.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.button.wide { width: 100%; }
.button.more { display: flex; margin: 20px auto; }

/* --- Layout ------------------------------------------------------------ */
main { max-width: 1280px; margin: 0 auto; padding: 16px; outline: none; }
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.content { min-width: 0; }
.page-title { font-size: 1.3rem; margin: 16px 0 10px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; order: 2; }
  .content { order: 1; }
  .top-actions { width: 100%; justify-content: flex-end; }
}

/* --- Sidomenyn och filter ------------------------------------------------ */
.tree, .filters, .seller, .row-section, .prose, .listing {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.tree-title, .filters h2 { font-size: 1rem; margin: 0 0 8px; }
.tree details { border-top: 1px solid var(--line); padding: 6px 0; }
.tree summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.tree ul { list-style: none; margin: 4px 0; padding-inline-start: 18px; }
.tree li { padding: 2px 0; }
.tree a { color: var(--fg); text-decoration: none; }
.tree a:hover, .tree a.active { color: var(--green); text-decoration: underline; font-weight: 600; }
.filters { display: flex; flex-direction: column; gap: 6px; }
.filters label { font-size: 0.9rem; color: var(--muted); }
.filters select, .filters input[type=number] {
  width: 100%; min-height: 40px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit;
}
.filters .row { display: flex; gap: 6px; flex-wrap: wrap; }
.filters .row > * { flex: 1 1 80px; }
.filters .check { display: flex; align-items: center; gap: 6px; color: var(--fg); min-height: 32px; }
.count { color: var(--green); }

/* --- Kategorirutor och knappar ------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; text-decoration: none; min-height: 110px; }
.tile-icon { font-size: 1.8rem; }
.tile-name { font-weight: 700; font-size: 1.1rem; }
.tile-groups { font-size: 0.8rem; opacity: 0.85; }
.cat-jobs { background: var(--jobs); color: var(--jobs-fg); }
.cat-rentals { background: var(--rentals); color: var(--rentals-fg); }
.cat-services { background: var(--services); color: var(--services-fg); }
.cat-sales { background: var(--sales); color: var(--sales-fg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); text-decoration: none; font-size: 0.9rem;
}
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }

/* --- Annonskort ----------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; color: var(--fg); text-decoration: none; box-shadow: var(--shadow);
}
.card:hover { border-color: var(--green); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.badge-video { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; border-radius: 999px; padding: 2px 8px; }
.card-body { padding: 8px 10px 10px; }
.card-title { margin: 0; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin: 4px 0 0; color: var(--green); font-weight: 700; }
.card-place { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skeleton { min-height: 260px; background: linear-gradient(90deg, var(--surface), var(--line), var(--surface)); background-size: 200% 100%; animation: pulse 1.4s infinite; }
@keyframes pulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* --- Rader på startsidan --------------------------------------------------- */
.row-section:empty { display: none; }
.row-section { margin-top: 16px; }
.row-section h2 { font-size: 1.05rem; margin: 0 0 8px; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.deals { list-style: none; margin: 0; padding: 0; }
.deals li { padding: 6px 0; border-top: 1px solid var(--line); }
.deals li:first-child { border-top: 0; }

/* --- Annonssidan ------------------------------------------------------------ */
.crumbs { font-size: 0.9rem; margin-bottom: 10px; color: var(--muted); }
.listing-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .listing-grid { grid-template-columns: 1fr; } }
.listing h1 { font-size: 1.5rem; margin: 12px 0 4px; }
.listing .price { font-size: 1.4rem; font-weight: 700; color: var(--green); margin: 0; }
.deposit, .closed { margin: 6px 0; }
.closed { color: var(--red); font-weight: 700; }
.gallery-main { width: 100%; max-height: 520px; object-fit: contain; background: #000; border-radius: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; width: 72px; height: 72px; cursor: pointer; background: none; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.facts { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 4px; }
.attrs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.attrs dt { color: var(--muted); }
.attrs dd { margin: 0; font-weight: 600; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.listing-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.seller h2 { font-size: 1rem; margin: 0; }
.seller-name { font-weight: 700; font-size: 1.1rem; margin: 4px 0; }
.verified { color: var(--green); margin: 0; }
.badge { display: inline-block; background: var(--rentals); color: var(--gold-text); border-radius: 8px; padding: 2px 8px; margin: 4px 0; }

/* --- Övrigt ------------------------------------------------------------------ */
.empty { text-align: center; padding: 40px 16px; }
.prose { max-width: 760px; margin: 0 auto; }
#footer { border-top: 1px solid var(--line); margin-top: 32px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 16px; text-align: center; }
/* Googles reCAPTCHA-märke syns i hörnet (krävs när texten saknas i sidfoten). */
.grecaptcha-badge { visibility: visible; }
.footer-inner nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Konto och formulär (fas B och D) ------------------------------------- */
.account, .listing-form { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.account-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; width: 100%;
}
.account .account-card { max-width: none; }
.account-card h1 { font-size: 1.4rem; margin-top: 0; }
.account-card h2 { font-size: 1.05rem; margin: 0 0 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; }
.field input, .field select, .field textarea, .account-card input, .account-card select, .account-card form.stack textarea {
  min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; width: 100%;
}
.row input { flex: 1 1 180px; width: auto; }
.field textarea, .account-card form.stack textarea { min-height: 140px; resize: vertical; }
.field-error, .form-error { color: var(--red); margin: 0; font-size: 0.9rem; }
.field-error:empty, .form-error:empty { display: none; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .field-error, :root:not([data-theme="light"]) .form-error { color: #ff8a93; }
 }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .form-error { color: #ff8a93; }
 
.success { color: var(--green); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; min-height: 36px; }
/* hidden gäller även element som har egen display (rutor, rader). */
[hidden] { display: none !important; }
.check input { width: 20px; height: 20px; }
/* Val- och kryssrutor i ett fält ärver inte textfältens storlek och ram. */
.field input[type=radio], .field input[type=checkbox] {
  width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--brand);
}
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.listing-form fieldset {
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 16px;
  background: var(--surface); display: flex; flex-direction: column; gap: 10px;
}
.listing-form legend { font-weight: 700; padding: 0 6px; }
.listing-form h1 { font-size: 1.4rem; margin: 0; }
.attrs-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photo { position: relative; width: 110px; height: 110px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.add { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 2rem; color: var(--green); cursor: pointer; border-style: dashed; }
.photo-remove { position: absolute; top: 4px; inset-inline-end: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 1.2rem; cursor: pointer; }
/* Små rutor i Excel-importens tabell (📷 per rad, 2026-10-26). */
.photos.compact { gap: 4px; flex-wrap: nowrap; overflow-x: auto; max-width: 260px; }
.photos.compact .photo { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 8px; }
.photos.compact .photo.add { font-size: 1.3rem; }
.photos.compact .photo-remove, .photos.compact .photo-make-cover { width: 22px; height: 22px; font-size: 0.8rem; top: 2px; bottom: auto; }
.photos.compact .photo-make-cover { top: auto; bottom: 2px; }
.photos.compact .photo-cover { font-size: 0.6rem; }
/* Den första bilden = omslaget; ★ på de andra flyttar dem först. */
.photo-cover { position: absolute; inset-inline: 0; bottom: 0; padding: 2px 0; text-align: center; font-size: 0.75rem; font-weight: 600; background: rgba(0, 122, 61, 0.88); color: #fff; }
.photo-make-cover { position: absolute; bottom: 4px; inset-inline-start: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.65); color: #f4c542; font-size: 1rem; cursor: pointer; }
.button.danger { border-color: var(--red); color: var(--red); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.channel { display: flex; flex-direction: column; gap: 4px; text-align: start; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.channel-whatsapp.channel { border-color: #25d366; }
.channel-telegram.channel { border-color: #2aabee; }
.button.channel-whatsapp { background: #25d366; border-color: #25d366; color: #073b1c; }
.button.channel-telegram { background: #2aabee; border-color: #2aabee; color: #062a3d; }
.waiting::before { content: '⏳ '; }
.phone { font-weight: 700; font-size: 1.1rem; }
.account-links { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-zone summary { color: var(--red); cursor: pointer; }
.my-list { display: flex; flex-direction: column; gap: 10px; }
.my-row { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.my-thumb { flex: 0 0 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-body { flex: 1; min-width: 0; }
.my-body p { margin: 2px 0; }
.actions .button { min-height: 40px; padding: 6px 12px; font-size: 0.9rem; }
.status { font-weight: 700; }
.status-active { color: var(--green); }
.status-review, .status-paused { color: var(--gold-text); }
.status-rejected, .status-hidden { color: var(--red); }
.card.missing { padding: 10px; justify-content: space-between; }
.favorite-slot:empty { display: none; }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; }

/* --- Chatten (fas C) ---------------------------------------------------------- */
.badge-count { background: var(--red); color: #fff; border-radius: 999px; font-size: 0.75rem; padding: 0 6px; margin-inline-start: 4px; }
.chat-list { display: flex; flex-direction: column; gap: 8px; }
.chat-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; color: var(--fg); text-decoration: none; }
.chat-row p { margin: 2px 0; }
.chat-row.unread .chat-title { font-weight: 800; }
.chat-title { font-weight: 600; color: var(--fg); text-decoration: none; }
.chat-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60ch; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); flex: 0 0 12px; }
.chat-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; height: calc(100vh - 150px); min-height: 480px; }
.chat-head { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-head-text p { margin: 0; }
.button.ghost-dark { border-color: var(--line); background: transparent; color: var(--fg); min-width: 44px; }
.chat-menu { position: relative; }
.chat-menu summary { list-style: none; cursor: pointer; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.chat-menu[open] > div { position: absolute; inset-inline-end: 0; top: 48px; z-index: 5; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.chat-menu h3 { font-size: 0.95rem; margin: 8px 0 0; }
.chat-menu select, .chat-menu textarea { width: 100%; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.safety { margin: 0; background: var(--rentals); color: var(--gold-text); border-radius: 10px; padding: 6px 10px; }
.deal { background: var(--surface); border: 1px solid var(--rentals-fg); border-radius: 14px; padding: 8px 12px; }
.deal .steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 6px; flex-wrap: wrap; }
.deal .steps li { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.deal .steps li.done { background: var(--green); color: #fff; border-color: var(--green); }
.deal .steps li.current { border-color: var(--green); color: var(--green); font-weight: 700; }
.deal-text { margin: 0 0 6px; font-weight: 600; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--green); color: #fff; border-color: var(--green); }
.bubble.mine .muted { color: rgba(255, 255, 255, 0.8); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .bubble.mine { color: #0d2a1b; }
:root:not([data-theme="light"]) .bubble.mine .muted { color: rgba(13, 42, 27, 0.75); }
 }
:root[data-theme="dark"] .bubble.mine { color: #0d2a1b; }
:root[data-theme="dark"] .bubble.mine .muted { color: rgba(13, 42, 27, 0.75); }
 
.bubble p { margin: 0; }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.type-offer { border: 2px solid var(--gold); }
.bubble.type-accept, .bubble.type-paidClaim, .bubble.type-paidConfirm, .bubble.type-bookingAccept, .bubble.type-bookingDecline { align-self: center; background: var(--jobs); color: var(--jobs-fg); border-color: transparent; }
.bubble time { display: block; margin-top: 2px; }
.scam { margin-top: 6px !important; background: var(--rentals); color: var(--gold-text); border-radius: 8px; padding: 4px 8px; font-size: 0.85rem; }
.composer { display: flex; flex-direction: column; gap: 6px; }
.composer-form { display: flex; gap: 8px; align-items: flex-end; }
.composer-form textarea { flex: 1; min-height: 48px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; resize: vertical; }
.offer summary { cursor: pointer; color: var(--gold-text); font-weight: 600; min-height: 32px; }
.offer input, .offer select { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; }
.blocked { background: var(--surface); border: 1px solid var(--red); border-radius: 14px; padding: 10px; }

/* Omräknat pris i den andra valutan (som ConvertedPrice i appen). */
.card-converted { margin: 0; color: var(--muted); font-size: 0.8rem; }
.listing .converted { margin: 2px 0 0; color: var(--muted); }
.typical { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--card-alt, #EEF2EE); }
.typical p { margin: 0 0 2px; }
.typical-title { font-weight: 600; font-size: .9rem; }
.typical-line { font-weight: 600; }
.typical-verdict { font-weight: 600; font-size: .9rem; margin-top: 4px; }
.typical-verdict.below { color: var(--green); }
.typical-verdict.above { color: var(--gold-deep, #9A7A34); }
.typical-verdict.around { color: var(--muted); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .typical { background: #1E2A22; }
 }
:root[data-theme="dark"] .typical { background: #1E2A22; }
 

/* --- Omgång 1: reklam, profil, rapport, omdöme -------------------------------- */
.ad-carousel:empty { display: none; }
.ad-carousel { margin-bottom: 14px; }
.ad { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.ad img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.sponsored { position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.dot-btn { width: 24px; height: 24px; border: 0; background: transparent; cursor: pointer; position: relative; }
.dot-btn::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--line); }
.dot-btn.active::after { background: var(--green); }
.grid .ad-card { grid-column: span 2; align-self: start; }
@media (max-width: 480px) { .grid .ad-card { grid-column: 1 / -1; } }
.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 2px solid var(--gold); }
.avatar.letter { display: inline-flex; align-items: center; justify-content: center; background: var(--jobs); color: var(--jobs-fg); font-weight: 700; }
.seller-link { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; margin: 6px 0; }
.seller-link:hover .seller-name { text-decoration: underline; }
.profile-page { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.profile-head h1 { margin: 0; font-size: 1.5rem; }
.profile-head p { margin: 2px 0; }
.stars { color: #c99a00; letter-spacing: 1px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .stars { color: var(--gold); }
 }
:root[data-theme="dark"] .stars { color: var(--gold); }
 
.reviews { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.reviews li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.reviews p { margin: 2px 0; }
.report-box summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; min-height: 32px; }
.report-box select, .report-box textarea { width: 100%; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.rate-banner:empty { display: none; }
.rate-banner { background: var(--surface); border: 2px solid var(--gold); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rate-banner textarea { width: 100%; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.star-row { display: flex; gap: 4px; }
.star { width: 44px; height: 44px; font-size: 1.8rem; border: 0; background: transparent; color: var(--line); cursor: pointer; }
.star.on { color: #c99a00; }

/* --- Omgång 2: kalender, video, avstånd -------------------------------------- */
.card-distance { margin: 0; color: var(--green); font-size: 0.8rem; font-weight: 600; }
.video video { width: 100%; max-height: 480px; background: #000; border-radius: 12px; margin-top: 8px; }
#showOnMap { margin-bottom: 8px; }
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-top: 12px; }
.calendar h2 { margin-top: 0; font-size: 1.05rem; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 0.8rem; color: var(--muted); }
.cal-day { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.legend .cal-day { display: inline-block; min-height: 0; width: 16px; height: 16px; vertical-align: middle; cursor: default; }
.cal-day.free { background: var(--jobs); color: var(--jobs-fg); border-color: transparent; }
.cal-day.busy { background: var(--services); color: var(--services-fg); text-decoration: line-through; cursor: not-allowed; }
.cal-day.blocked { background: var(--sales); color: var(--muted); }
.cal-day.selected { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.cal-day.past { opacity: 0.35; cursor: not-allowed; }

/* --- Omgång 3: konto, formulär, chatt -------------------------------------- */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.save-slot:empty { display: none; }
.plain-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.theme-picker select { min-height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; padding: 2px 8px; }
.video-preview { position: relative; width: 110px; height: 110px; border-radius: 12px; overflow: hidden; background: var(--bg); }
.video-preview:empty { display: none; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.draft-banner { background: var(--rentals); color: var(--gold-text); border-radius: 14px; padding: 10px 14px; }
.draft-banner p { margin: 0 0 6px; }
.quick-replies { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-replies .chip { cursor: pointer; font: inherit; }
.avatar-preview { display: flex; }

/* Kontaktformulärets robotfälla: osynlig för människor. */
.trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Tvåstegsinloggning (bara admin på /me): QR-koden alltid svart på vitt. */
.qr { width: 220px; max-width: 100%; background: #fff; border-radius: 8px; padding: 4px; }
.qr svg { display: block; width: 100%; height: auto; }
.totp-key { font-size: 1.05rem; letter-spacing: 1px; user-select: all; overflow-wrap: anywhere; }

/* Avbokning i chatten: röd textknapp och rutan med skäl. */
.button.link-danger { background: none; border: none; color: var(--red); padding: 4px 0; text-decoration: underline; }
.cancel-box { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.cancel-box .check { display: block; padding: 6px 0; }

/* --- Datorlayout (2026-10-12) --------------------------------------------
   Kategoriraden under sidhuvudet, startsidan utan filterspalt, antal och
   rutnät/lista ovanför resultaten, hopfällda filter på mobil, sidfot i
   kolumner. Mobil (< 861 px) behåller den enkla layouten. */
main { max-width: 1360px; }
.top-inner { max-width: 1360px; }
.cat-nav { background: rgba(0, 0, 0, 0.18); }
.cat-nav-inner { max-width: 1360px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-link { color: #fff; text-decoration: none; padding: 10px 14px; white-space: nowrap; font-weight: 600; border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.cat-link:hover { background: rgba(255, 255, 255, 0.08); }
.cat-link.active { border-bottom-color: var(--gold); }

.home { display: flex; flex-direction: column; gap: 8px; }
.home-hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.home-hero > .ad-carousel { flex: 3 1 460px; min-width: 0; }
.home-hero > .ad-carousel:empty { display: none; }
.home-hero > .tiles { flex: 2 1 340px; grid-template-columns: repeat(2, 1fr); align-content: stretch; }
.home .ad-carousel img { max-height: 340px; object-fit: cover; }
@media (min-width: 1100px) { .home .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.results-count { margin: 0; color: var(--muted); font-weight: 600; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-btn { border: 0; background: var(--surface); color: var(--fg); padding: 8px 14px; min-height: 40px; font: inherit; cursor: pointer; }
.view-btn + .view-btn { border-inline-start: 1px solid var(--line); }
.view-btn.active { background: var(--green); color: #fff; }

/* Listvy: bild vid sidan av texten, en annons per rad. */
.grid.list { grid-template-columns: 1fr; }
.grid.list .card { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.grid.list .card-media { aspect-ratio: 4 / 3; }
.grid.list .card-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.grid.list .card-title { font-size: 1.1rem; -webkit-line-clamp: 2; }
.grid.list .card-price { font-size: 1.15rem; }
@media (max-width: 480px) { .grid.list .card { grid-template-columns: 120px minmax(0, 1fr); } }

.filter-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.filter-summary { cursor: pointer; font-weight: 700; padding: 12px 14px; min-height: 44px; }
.filter-box > .filters { border: 0; border-radius: 0; padding-top: 0; }
@media (max-width: 860px) {
  .side { order: 0; }
  .side .tree { display: none; }
}

.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; text-align: start; padding-block: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h2 { font-size: 0.95rem; margin: 0 0 4px; }
.footer-col a { color: var(--fg); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; margin: 0; }
.footer-brand img { border-radius: 50%; background: #fff; }

/* Annonsens innehåll från servern (syns innan JavaScript har laddats). */
.ssr-listing { max-width: 860px; }
.ssr-images { display: flex; gap: 8px; flex-wrap: wrap; }
.ssr-images img { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; }
.ssr-listing .price { font-size: 1.4rem; font-weight: 700; color: var(--green); }
/* Reklamen tar inte över kategorisidan på dator: lågt band. */
.content > .ad-carousel img { max-height: 220px; width: 100%; object-fit: cover; }
.filter-box .filters > h2:first-child { display: none; }

/* Delning direkt till WhatsApp, Telegram och Facebook. */
.share-row { display: flex; gap: 6px; flex-wrap: wrap; }
.share-btn { flex: 1 1 90px; text-align: center; padding: 8px 10px; min-height: 40px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.share-btn.wa { background: #1f8f4e; }
.share-btn.tg { background: #2a7fb8; }
.share-btn.fb { background: #3b5998; }

/* Landningssidorna /join och /advertise. */
.mk { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.mk-hero { background: var(--green-dark); color: #fff; border-radius: 20px; padding: 36px 28px; border-bottom: 3px solid var(--gold-deep); }
.mk-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 10px; text-wrap: balance; }
.mk-lead { font-size: 1.15rem; margin: 0 0 18px; max-width: 60ch; opacity: 0.95; }
.mk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.mk-cta { font-size: 1.1rem; padding-inline: 22px; min-height: 52px; }
.mk-live { margin: 14px 0 0; }
.mk-live strong { font-size: 1.4rem; color: var(--gold); }
.mk-tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.mk-section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.mk-section h2 { margin: 0 0 10px; font-size: 1.2rem; }
.mk-steps, .mk-points { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 1.05rem; }
.mk-points { list-style: none; padding-inline-start: 0; }
.mk-fingerprint { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; word-break: break-all; background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; margin: 0; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.province-chips { margin-top: 8px; }
.ssr-links ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* Startsidans innehåll innan JavaScript (Google). */
.ssr-home { max-width: 980px; margin: 0 auto; }
.ssr-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ssr-cat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ssr-cat h2 { margin: 0 0 6px; font-size: 1.1rem; }
.ssr-cat ul, .ssr-links-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Sidfoten i Doushesh-stil: länkrad, appknapp, juridisk rad. */
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: 24px; }
.footer-note { margin: 0; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; font-weight: 600; }
/* Kakrutan (bara när mät-id:n finns): fast längst ner, över innehållet. */
.consent { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 50; max-width: 560px; margin-inline: auto; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: var(--fg); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); border: 1px solid var(--line, #d9e0da); }
.consent p { margin: 0 0 8px; font-size: .95rem; }
.consent-title { font-weight: 700; }
.app-notice { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface); color: var(--fg); border-bottom: 1px solid var(--line, #d9e0da); font-weight: 600; }
.app-notice p { margin: 0; flex: 1; }
.app-notice-warning { background: #f4c542; color: #1d1d1d; }
.app-notice-close { background: none; border: 0; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a { color: var(--fg); text-decoration: none; }
.footer-links a:hover { color: var(--green); text-decoration: underline; }
.footer-links .sep { color: var(--line); }
.social-row { display: flex; gap: 14px; }
.social { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; text-decoration: none; background: var(--green); }
.store-row { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border-radius: 10px; padding: 6px 16px; text-decoration: none; direction: ltr; min-height: 48px; }
.store-badge.soon { opacity: 0.75; }
.store-icon { font-size: 1.4rem; color: #34a853; }
.store-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-small { font-size: 0.7rem; }
.store-big { font-size: 1.15rem; font-weight: 700; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 14px; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 4px; }
.footer-legal p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-legal a { color: var(--muted); }
.footer-copy { color: var(--fg) !important; font-weight: 600; }

/* Antal, egenskapschips, flikar och reklamkortet (fas 1). */
.count-badge { color: var(--muted); font-weight: 500; font-size: 0.85em; }
.tile-name .count-badge { color: inherit; opacity: 0.8; }
.card-attrs { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.attr-chip { background: var(--bg); border-radius: 6px; padding: 1px 7px; font-size: 0.78rem; color: var(--fg); }
.condition-tabs { margin-top: 8px; }
.brand-chips { margin-top: 8px; }
.place-chips { margin-top: 8px; }
.map-box { margin: 8px 0; }
.map-box .map { height: 280px; border-radius: 12px; overflow: hidden; background: var(--card); }
.map-page .map { height: 60vh; min-height: 360px; border-radius: 12px; overflow: hidden; margin: 8px 0; }
.map-page .grid { margin-top: 12px; }
.map-popup-link { font-weight: 700; color: var(--green); }
.maplibregl-popup-content { color: #14181A; }
.promo-card { background: var(--jobs); border-color: transparent; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 120px; }
.promo-card .card-title { color: var(--jobs-fg); font-size: 1.1rem; }
.grid.list .promo-card { display: flex; }

/* Notislistan */
.notification { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.notification.unread { border-color: var(--green); background: var(--jobs); }
.notification-body { flex: 1; min-width: 0; }
.notification-body p { margin: 0; }
.notification-title { font-weight: 700; }

/* --- Nytt utseende (2026-10-12) ---------------------------------------------
   Läggs SIST i site.css (build.mjs), så att det går före äldre regler.
   Förslaget: https://claude.ai/artifact/Snn4aEpFxbynqpBzugo594
   Sidhuvud med stor sökruta och ikonlänkar, vit kategorirad, hero på
   startsidan, jämna kort 4:3, annonssida med fast köpruta, mörk sidfot i
   kolumner. SVG-ikoner (icons.js) i stället för emoji. */
:root {
  --brand: #007a3d;          /* Loggans gröna, samma i båda lägena (knappar på mörk/ljus grund) */
  --radius: 16px;
  --shadow-hover: 0 8px 22px rgba(0, 40, 20, 0.12);
  --footer-bg: #0e1f16;
  --footer-fg: #cfd8d1;
  --footer-muted: #93a69a;
  --footer-line: #1f3428;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { --shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.45); --footer-bg: #0a120d; }

}
:root[data-theme="dark"] { --shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.45); --footer-bg: #0a120d; }



body { font-size: 15px; }
main:focus, main:focus-visible { outline: none; }
.icon { flex: none; vertical-align: middle; }
[dir="ltr"] .icon.flip { transform: scaleX(-1); }
.cat-fg-jobs { color: var(--jobs-fg); }
.cat-fg-rentals { color: var(--rentals-fg); }
.cat-fg-services { color: var(--services-fg); }
.cat-fg-sales { color: var(--sales-fg); }
h1, h2, h3 { text-wrap: balance; }

/* Knappar */
.button { gap: 8px; border-radius: 12px; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.button:hover { border-color: var(--green); }
.button.primary:hover { filter: brightness(1.06); }
.button.gold { background: var(--gold); border-color: var(--gold-deep); color: #3a2d00; }
.button.gold:hover { filter: brightness(1.04); border-color: var(--gold-deep); }

/* --- Sidhuvud --------------------------------------------------------------- */
#top { border-bottom: 0; }
@media (min-width: 861px) { #top { position: sticky; top: 0; z-index: 40; } }
.top-inner { max-width: 1320px; padding: 12px 24px; gap: 18px; flex-wrap: nowrap; }
.brand { font-size: 1.35rem; gap: 10px; flex: none; }
.search {
  flex: 1 1 auto; max-width: 720px; height: 48px; gap: 0; background: #fff; border-radius: 12px;
  overflow: hidden; align-items: stretch;
}
.search:focus-within { box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.65); }
.search input { border-radius: 0; padding: 0 14px; background: transparent; font-size: 1rem; outline: none; color: #14181a; }
.search input::placeholder { color: #6b756f; }
.search-scope {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap;
  background: #f1f4f1; color: #14181a; font-weight: 600; font-size: 0.9rem; border-inline-end: 1px solid #dfe5e0;
}
.search-go { width: 54px; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search-go:hover { background: #00672f; }
.top-actions { flex-wrap: nowrap; gap: 2px; margin-inline-start: auto; align-items: center; }
.act {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 10px; border-radius: 10px;
  color: #fff; background: none; border: 0; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.act:hover { background: rgba(255, 255, 255, 0.1); }
.act-icon { position: relative; display: inline-flex; }
.act-icon .badge-count { position: absolute; top: -7px; inset-inline-end: -9px; margin: 0; line-height: 1.5; }
.post-btn { margin-inline-start: 8px; white-space: nowrap; }
.fab-post { display: none; }

/* Kategoriraden: vit (ljus yta) under det gröna, guldlinje under. */
.cat-nav { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: inset 0 2px 0 var(--gold-deep); }
.cat-nav-inner { max-width: 1320px; padding: 0 24px; gap: 2px; }
.cat-link { color: var(--fg); gap: 8px; padding: 12px 14px 10px; border-bottom: 3px solid transparent; font-weight: 600; }
.cat-link:hover { background: var(--bg); }
.cat-link.active { color: var(--green); border-bottom-color: var(--green); }
.cat-n { color: var(--muted); font-weight: 500; font-size: 0.8rem; background: var(--bg); border-radius: 999px; padding: 0 8px; }

@media (max-width: 860px) {
  .top-inner { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .brand { order: 1; font-size: 1.2rem; }
  .brand img { width: 34px; height: 34px; }
  .top-actions { order: 2; width: auto; }
  .search { order: 3; flex: 1 1 100%; max-width: none; height: 46px; }
  .search-scope { display: none; }
  .act { padding: 6px 8px; }
  .act-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .post-btn { display: none; }
  .cat-nav-inner { padding: 0 8px; }
  .cat-link { padding: 10px 10px 8px; font-size: 0.92rem; }
  .fab-post {
    display: inline-flex; align-items: center; gap: 6px; position: fixed; z-index: 45;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 50%; transform: translateX(-50%);
    background: var(--gold); color: #3a2d00; border: 1px solid var(--gold-deep); border-radius: 999px;
    padding: 12px 22px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  }
  [dir="rtl"] .fab-post { transform: translateX(50%); }
  main { padding-bottom: 84px; }
}

/* --- Sidans ram -------------------------------------------------------------- */
main { max-width: 1320px; padding: 22px 24px; }
@media (max-width: 860px) { main { padding: 14px; } }
.page-title { font-size: 1.5rem; margin: 6px 0 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-head h2 { font-size: 1.25rem; margin: 0; }
.see-all { display: inline-flex; align-items: center; gap: 2px; color: var(--green); font-weight: 600; text-decoration: none; }
.see-all:hover { text-decoration: underline; }
.row-section, .row-section.plain { background: none; border: 0; box-shadow: none; padding: 0; margin-top: 0; }

/* --- Startsidan ---------------------------------------------------------------- */
.home { gap: 30px; }
.home-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.hero-text {
  flex: 1 1 460px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  min-height: 280px; padding: 34px 36px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #00562b 0%, #007a3d 100%);
}
.hero-text::before {
  content: ''; position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
  background-image: radial-gradient(circle at 22px 22px, #fff 2px, transparent 2.5px), radial-gradient(circle at 0 0, #fff 1px, transparent 1.5px);
  background-size: 44px 44px, 22px 22px;
}
.hero-text > * { position: relative; }
.hero-text h1 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.2; }
.hero-lead { margin: 0; font-size: 1.05rem; opacity: 0.93; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .button.ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; background: rgba(255, 255, 255, 0.06); }
.hero-actions .button.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 4px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-size: 1.45rem; line-height: 1.2; }
.hero-stat span { font-size: 0.88rem; opacity: 0.85; }
.home-hero > .ad-carousel { flex: 1 1 420px; margin: 0; display: flex; flex-direction: column; min-width: 0; }
.home-hero .ad-slot, .home-hero .ad { flex: 1; display: flex; }
.home-hero .ad img { width: 100%; height: 100%; max-height: none; min-height: 240px; aspect-ratio: auto; object-fit: cover; }
.home-hero .ad { border-radius: 22px; }
@media (max-width: 860px) {
  .hero-text { min-height: 0; padding: 22px 20px; border-radius: 18px; }
  .hero-stats { gap: 18px; }
  .home-hero .ad img { min-height: 0; aspect-ratio: 2 / 1; }
  .home-hero .ad { border-radius: 16px; }
}

/* Kategorikort: ikon i färgad ruta, namn, grupper, antal. */
.tiles { gap: 14px; }
.tile {
  flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 16px 18px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--green); box-shadow: var(--shadow-hover); }
.tile.cat-jobs, .tile.cat-rentals, .tile.cat-services, .tile.cat-sales { background: var(--surface); color: var(--fg); }
.tile-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; flex: none; font-size: inherit; }
.tile.cat-jobs .tile-icon { background: var(--jobs); color: var(--jobs-fg); }
.tile.cat-rentals .tile-icon { background: var(--rentals); color: var(--rentals-fg); }
.tile.cat-services .tile-icon { background: var(--services); color: var(--services-fg); }
.tile.cat-sales .tile-icon { background: var(--sales); color: var(--sales-fg); }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-name { font-weight: 700; font-size: 1.08rem; }
.tile-groups { font-size: 0.82rem; color: var(--muted); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-count { margin-inline-start: auto; font-weight: 700; font-size: 0.85rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; }
@media (max-width: 860px) {
  .tiles { gap: 10px; }
  .tile { padding: 12px; gap: 10px; }
  .tile-icon { width: 42px; height: 42px; border-radius: 12px; }
  .tile-groups { display: none; }
}

/* Avslutade affärer */
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.deals li, .deals li:first-child { border: 0; padding: 0; }
.deal-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none;
}
.deal-link:hover { border-color: var(--green); }
.deal-check { width: 38px; height: 38px; border-radius: 50%; background: var(--jobs); color: var(--jobs-fg); display: grid; place-items: center; flex: none; }
.deal-text { display: flex; flex-direction: column; min-width: 0; }
.deal-text strong { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Annonskortet ----------------------------------------------------------------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.grid-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-row > :nth-child(n+9) { display: none; } }
@media (max-width: 860px) {
  .grid, .grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-row > :nth-child(n+5) { display: none; }
}
.card { border-radius: 14px; box-shadow: none; transition: box-shadow .18s, transform .18s; }
.card:hover { border-color: var(--line); box-shadow: var(--shadow-hover); }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-2px); } }
.card-media { aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.card-media img { transition: transform .3s; }
.card-icon { font-size: inherit; }
.media-count {
  position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, 0.62); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600;
}
.badge-video { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.card-title { font-size: 0.95rem; line-height: 1.45; min-height: 2.9em; }
.card-price { margin: 4px 0 0; font-size: 1.05rem; }
.card-converted { font-size: 0.78rem; }
.card-attrs { margin: 6px 0 0; }
.card-place { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 4px; font-size: 0.82rem; }
.card-place > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-delivery { margin-inline-start: auto; color: var(--green); display: inline-flex; }
.promo-card { border: 1px dashed var(--green); background: var(--jobs); }
.promo-card .card-body { align-items: center; justify-content: center; gap: 6px; text-align: center; }
.promo-card .card-title { min-height: 0; }
.promo-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--jobs-fg); }
.grid.list .card-title { min-height: 0; }
.grid.list .card-place { margin-top: 6px; }
.skeleton { min-height: 280px; }

/* Rutnät/lista och antal träffar */
.view-btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .view-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* --- Kategorisidan ------------------------------------------------------------ */
.layout { gap: 22px; }
.tree, .filters, .filter-box { border-radius: var(--radius); box-shadow: none; }
.tree { padding: 14px 16px; }
.tree-title { color: var(--muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; }
.tree summary { display: flex; align-items: center; gap: 8px; }
.tree summary a { font-weight: 700; }
.tree ul { padding-inline-start: 30px; }
.filter-summary { display: flex; align-items: center; gap: 8px; }
.filters select, .filters input[type=number] { min-height: 42px; border-radius: 10px; }
.chips { gap: 8px; }
.chip { padding: 6px 14px; font-weight: 500; transition: border-color .15s, background-color .15s; }
.chip:hover { border-color: var(--green); }
.title-row { margin-top: 6px; }

/* --- Annonssidan ---------------------------------------------------------------- */
.listing-page { display: flex; flex-direction: column; gap: 22px; }
.crumbs { margin: 0; font-size: 0.88rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.lp {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: minmax(0, 1fr) 390px;
  grid-template-areas: "gallery side" "body side";
}
.lp-gallery { grid-area: gallery; min-width: 0; }
.lp-side { grid-area: side; position: sticky; top: 132px; min-width: 0; }
.lp-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1000px) {
  .lp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gallery" "side" "body"; }
  .lp-side { position: static; }
}
.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.gallery-frame { position: relative; aspect-ratio: 16 / 10; background: #0d1210; display: flex; align-items: center; justify-content: center; }
.gallery-main { width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; background: transparent; }
.gallery-frame .media-count { bottom: 12px; inset-inline-start: 12px; font-size: 0.8rem; }
.gallery-empty { aspect-ratio: 16 / 9; }
.gallery .thumbs { margin: 0; padding: 10px; gap: 8px; overflow-x: auto; }
.gallery .thumbs button { flex: none; width: 88px; height: 66px; border-radius: 10px; border: 2px solid transparent; }
.gallery .thumbs button.active { border-color: var(--green); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.panel h2 { font-size: 1.12rem; margin: 0 0 12px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.fact { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.fact-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--jobs); color: var(--jobs-fg); }
.fact-text { display: flex; flex-direction: column; min-width: 0; }
.fact-text small { color: var(--muted); font-size: 0.78rem; }
.fact-text strong { font-size: 0.92rem; font-weight: 600; overflow-wrap: anywhere; }
.attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.attrs > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.attrs dt { color: var(--muted); }
.attrs dd { margin: 0; font-weight: 600; text-align: end; }
@media (max-width: 640px) { .attrs { grid-template-columns: minmax(0, 1fr); } }
.description { margin: 0; line-height: 1.85; }
.credits { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
.panel .map-box { margin: 0; }
.map-load { width: 100%; min-height: 120px; border-style: dashed; background: var(--bg); }

.buy-box { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.buy-box .price { margin: 0; font-size: 1.95rem; font-weight: 700; line-height: 1.2; color: var(--green); }
.buy-box .converted { margin: -6px 0 0; color: var(--muted); }
.buy-box h1 { margin: 2px 0 0; font-size: 1.3rem; line-height: 1.4; }
.buy-box .deposit { display: flex; align-items: center; gap: 6px; margin: 0; }
.buy-box .typical { margin: 2px 0; }
.buy-box #contactButton { min-height: 52px; font-size: 1.05rem; }
.buy-box .seller { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 14px 0 0; margin-top: 4px; }
.seller-link { margin: 0; gap: 12px; }
.seller-text { display: flex; flex-direction: column; min-width: 0; }
.seller-name { margin: 0; font-size: 1.05rem; }
.seller-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.seller-sub .badge { margin: 0; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--gold-deep); font-weight: 600; }
.rating .icon { fill: currentColor; }
.avatar { border: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold-deep); }
.verified-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--jobs); color: var(--jobs-fg); font-size: 0.8rem; font-weight: 600; margin: 0; }
.safety-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 0.83rem; }
.safety-hint .icon { color: var(--gold-deep); margin-top: 2px; }
.share-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.share-btn { min-height: 38px; padding: 6px; gap: 4px; border: 0; border-radius: 10px; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.share-btn.copy { background: var(--bg); color: var(--fg); border: 1px solid var(--line); }
.buy-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.buy-foot .views { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.buy-foot .report-box { flex: 1 1 100%; }
.contact-bar { display: none; }
@media (max-width: 1000px) {
  .contact-bar {
    display: block; position: fixed; z-index: 45; inset-inline: 0; bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }
  .contact-bar .button { min-height: 50px; }
  .listing-page { padding-bottom: 76px; }
  .buy-box #contactButton { display: none; }
  .gallery { border-radius: 16px; }
  .gallery-frame { aspect-ratio: 4 / 3; }
}

/* --- Sidfoten ---------------------------------------------------------------- */
#footer { background: var(--footer-bg); color: var(--footer-fg); border-top: 0; margin-top: 56px; box-shadow: inset 0 2px 0 var(--gold-deep); }
#footer .footer-inner { display: block; max-width: 1320px; padding: 42px 24px 22px; text-align: start; }
.footer-cols { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0; }
.footer-col { gap: 4px; }
.footer-col h2 { color: #fff; font-size: 1rem; margin: 0 0 8px; }
.footer-col a { color: var(--footer-fg); text-decoration: none; padding: 3px 0; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-brand { color: #fff; font-size: 1.25rem; gap: 10px; margin: 0 0 6px; }
#footer .footer-note { color: var(--footer-muted); font-size: 0.9rem; margin: 0; max-width: 40ch; }
#footer .store-row { align-items: flex-start; margin-top: 12px; gap: 6px; }
#footer .store-row .small { color: var(--footer-muted); }
.store-badge { border: 1px solid #2c3b31; }
.store-icon { color: #34a853; display: inline-flex; }
#footer .footer-legal {
  max-width: none; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--footer-line);
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
#footer .footer-legal p { color: var(--footer-muted); margin: 0; font-size: 0.85rem; }
#footer .footer-copy { color: var(--footer-fg) !important; font-weight: 500; }
#footer .footer-legal a { color: var(--footer-fg); }
.footer-tools { display: flex; align-items: center; gap: 14px; }
#footer .theme-picker select { background: #16291e; color: var(--footer-fg); border-color: #2c3b31; }
@media (max-width: 860px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .footer-about { grid-column: 1 / -1; }
  #footer { margin-top: 36px; }
  #footer .footer-inner { padding: 30px 16px 90px; }
}

/* Rättelser efter granskning: rutnätet får aldrig bli bredare än sidan,
   sidfotens kolumner börjar överst (äldre regel gjorde nav till en rad),
   chipsrader svepbara på mobilen. */
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { min-width: 0; }
#footer .footer-col { display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; gap: 4px; }
@media (max-width: 860px) {
  .content > .chips, .province-chips, .brand-chips, .place-chips, .condition-tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    margin-inline: -14px; padding-inline: 14px;
  }
  .content > .chips::-webkit-scrollbar, .province-chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; }
}

/* Tillbaka-pilen i sidhuvudet (inte på startsidan). */
.back-btn { padding: 6px; min-width: 44px; justify-content: center; }
[dir="rtl"] .back-btn .back-icon { transform: scaleX(-1); }
@media (max-width: 860px) { .back-btn { order: 0; } .brand { order: 1; } }
/* Mobil: loggan leder till startsidan, så hemknappen tar inte plats där. */
@media (max-width: 860px) { #homeLink { display: none; } .back-btn { padding: 4px; min-width: 36px; } .top-actions .act { padding: 6px 6px; } }

/* --- Grupperna under dörrarna (2026-10-17): färgade rutor med symbol, som appen --- */
.group-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.group-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 2px solid transparent; text-decoration: none; font-weight: 600; text-align: center; min-width: 0; transition: border-color .15s, transform .15s; }
.group-tile:hover { border-color: currentColor; transform: translateY(-1px); }
.group-tile-icon { display: grid; place-items: center; }
.group-tile-name { font-size: 0.92rem; line-height: 1.25; }
.group-tiles .count-badge { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.group-tiles.cat-jobs .group-tile { background: var(--jobs); color: var(--jobs-fg); }
.group-tiles.cat-rentals .group-tile { background: var(--rentals); color: var(--rentals-fg); }
.group-tiles.cat-services .group-tile { background: var(--services); color: var(--services-fg); }
.group-tiles.cat-sales .group-tile { background: var(--sales); color: var(--sales-fg); }
@media (max-width: 600px) { .group-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .group-tile { padding: 12px 6px; } .group-tile-name { font-size: 0.82rem; } }
/* Länkarna «افتح متجراً» / «أنشئ ملفك المهني» på kontosidan. */
.me-start-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Övriga sidor i nytt utseende (2026-10-12) ---------------------------------
   Läggs efter redesign.css (build.mjs). Inloggning, konto, mina annonser,
   formuläret, chatten (två kolumner på dator, helskärm på mobil), notiser,
   sparade sökningar, hjälp, support, offentlig profil och landningssidorna. */

/* Gemensamma delar */
.account { max-width: 880px; gap: 16px; }
.account.wide { max-width: 1320px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1, .account > h1 { margin: 0; font-size: 1.6rem; line-height: 1.3; }
.page-lead { margin: -6px 0 0; }
.account-card { border-radius: 18px; padding: 18px 20px; box-shadow: none; }
.account-card h2 { font-size: 1.05rem; margin: 0 0 10px; }
.notice { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--jobs); color: var(--jobs-fg); }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 42px 16px; text-align: center; list-style: none;
  background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; color: var(--muted);
}
.empty-state p { margin: 0; }
.empty-icon { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: var(--jobs); color: var(--jobs-fg); }
.empty h1 { font-size: 1.6rem; }

/* Formulärfält: samma ram och fokus överallt. */
.field label { font-size: 0.92rem; }
.field input, .field select, .field textarea, .account-card input, .account-card select, .account-card textarea,
.filters select, .filters input[type=number], .report-box select, .report-box textarea, .chat-menu select, .chat-menu textarea {
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .account-card input:focus, .account-card select:focus,
.account-card textarea:focus, .filters select:focus, .filters input:focus, .composer-form textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 122, 61, 0.15);
}
.account-card form.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.92rem; }
.account-card input[type=checkbox], .check input { accent-color: var(--brand); }

/* --- Inloggning, konto, glömt lösenord ----------------------------------------- */
.auth-page {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); max-width: 1000px; margin: 12px auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 40, 20, 0.08);
}
.auth-brand {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 44px 38px; color: #fff;
  background: linear-gradient(150deg, #00562b 0%, #007a3d 100%);
}
.auth-brand::before {
  content: ''; position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
  background-image: radial-gradient(circle at 22px 22px, #fff 2px, transparent 2.5px); background-size: 44px 44px;
}
.auth-brand > * { position: relative; }
.auth-brand img { border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.auth-brand h2 { margin: 0; font-size: 1.8rem; line-height: 1.25; }
.auth-brand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-brand li { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.auth-point-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.16); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 36px 40px; min-width: 0; }
.auth-form .account-card { border: 0; padding: 0; background: transparent; max-width: none; }
.auth-form .account-card h1 { font-size: 1.6rem; margin: 0 0 16px; }
.auth-form .button.primary { min-height: 50px; font-size: 1.02rem; }
.auth-form p a { font-weight: 600; }
@media (max-width: 860px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); margin: 0; border-radius: 20px; }
  .auth-brand { padding: 22px 20px; gap: 10px; flex-direction: row; align-items: center; }
  .auth-brand img { width: 44px; height: 44px; }
  .auth-brand h2 { font-size: 1.2rem; }
  .auth-brand ul { display: none; }
  .auth-form { padding: 22px 18px; }
}

/* --- Kontosidan (/me) ------------------------------------------------------------ */
.me-page { max-width: 1120px; }
.me-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 24px 26px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #00562b 0%, #007a3d 100%);
}
.me-head .avatar { box-shadow: 0 0 0 3px #00562b, 0 0 0 5px var(--gold); }
.me-head-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.me-head-text h1 { margin: 0; font-size: 1.6rem; }
.me-head-text .muted { color: rgba(255, 255, 255, 0.82); margin: 0; overflow-wrap: anywhere; }
.me-head .verified-row { margin-top: 6px; }
.me-head .verified, .profile-head .verified { background: rgba(255, 255, 255, 0.16); color: #fff; }
.me-public { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.me-public:hover { background: rgba(255, 255, 255, 0.18); border-color: #fff; }
.me-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.me-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: 16px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.me-tile:hover { border-color: var(--green); box-shadow: var(--shadow-hover); }
.me-tile-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--jobs); color: var(--jobs-fg); }
.me-tile.gold { background: var(--gold); border-color: var(--gold-deep); color: #3a2d00; }
.me-tile.gold .me-tile-icon { background: rgba(255, 255, 255, 0.5); color: #3a2d00; }
.me-invite { display: flex; }
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.me-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.me-col > * { min-width: 0; }
.me-links { display: flex; flex-wrap: wrap; gap: 18px; }
.me-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.danger-zone { border-color: rgba(206, 17, 38, 0.35); }
.danger-zone summary { font-weight: 600; }
@media (max-width: 860px) {
  .me-grid { grid-template-columns: minmax(0, 1fr); }
  .me-head { padding: 18px; gap: 14px; }
  .me-public { width: 100%; }
  .me-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* --- Mina annonser ---------------------------------------------------------------- */
.my-list { gap: 12px; }
.my-row { gap: 14px; padding: 12px; border-radius: 16px; align-items: stretch; }
.my-thumb { flex: 0 0 132px; height: 100px; border-radius: 12px; }
.my-thumb .card-icon { width: 100%; height: 100%; display: grid; place-items: center; }
.my-body { display: flex; flex-direction: column; gap: 4px; }
.my-body .card-title { min-height: 0; font-size: 1rem; }
.status { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; }
.status-active { background: var(--jobs); color: var(--jobs-fg); }
.status-review, .status-paused { background: var(--rentals); color: var(--rentals-fg); }
/* Utkast från Excel (2026-10-26): grått, inte publicerat. */
.status-draft { background: var(--sales); color: var(--muted); }
.warn { color: var(--gold-text); }
.listing-tabs { display: flex; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.listing-tabs .tab { padding: 8px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.listing-tabs .tab.active { color: var(--green); border-bottom-color: var(--green); }
.status-rejected, .status-hidden { background: var(--services); color: var(--services-fg); }
.status-done { background: var(--sales); color: var(--sales-fg); }
.actions { margin-top: auto; padding-top: 6px; gap: 6px; }
.actions .button { min-height: 36px; padding: 4px 12px; font-size: 0.85rem; }
@media (max-width: 600px) {
  .my-row { flex-direction: column; }
  .my-thumb { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* --- Lägg upp / redigera ------------------------------------------------------------ */
.listing-form { max-width: 860px; gap: 16px; }
.listing-form fieldset { border-radius: 18px; padding: 18px 20px 20px; gap: 12px; }
.listing-form legend {
  float: right; float: inline-start; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 0; margin: 0 0 4px; font-size: 1.08rem; font-weight: 700;
}
.listing-form legend + * { clear: both; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--green); color: var(--surface); font-size: 0.85rem; }
.cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; }
.attrs-form { gap: 12px; }
.photo { border-radius: 14px; }
.photo.add { border: 2px dashed var(--line); background: var(--bg); gap: 4px; }
.photo.add:hover { border-color: var(--green); }
.form-submit {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}
.form-submit p { margin: 0; }
.form-submit .button.primary { min-height: 52px; font-size: 1.05rem; }
.draft-banner { border-radius: 16px; }

/* --- Chatten ---------------------------------------------------------------------- */
.chat-shell {
  display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 168px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.chat-side { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); background: var(--surface); }
.chat-side-head { padding: 16px 18px 10px; }
.chat-side-head h1 { margin: 0; font-size: 1.3rem; }
.chat-side > .account-card { margin: 0 12px 8px; padding: 10px 12px; }
.chat-side > .account-card h2 { font-size: 0.95rem; margin-bottom: 4px; }
.chat-side .chat-list { flex: 1; overflow-y: auto; gap: 2px; padding: 0 8px 8px; }
.chat-side .empty-state { border: 0; background: none; padding: 30px 10px; }
.chat-row {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--fg);
}
.chat-row:hover { background: var(--bg); }
.chat-row.active { background: var(--jobs); }
.chat-row-text { flex: 1; min-width: 0; }
.chat-row p { margin: 0; }
.chat-row-top { display: flex; align-items: baseline; gap: 2px; min-width: 0; }
.chat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .chat-title { font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-preview { max-width: none; }
.chat-row.unread .chat-preview { color: var(--fg); font-weight: 600; }
.chat-avatar { flex: none; display: inline-flex; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-placeholder { align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: var(--bg); text-align: center; padding: 20px; }
.chat-page { max-width: none; height: 100%; min-height: 0; margin: 0; gap: 0; }
.chat-head { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 14px; gap: 12px; }
.chat-back { display: none; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--fg); text-decoration: none; flex: none; }
.chat-back:hover { background: var(--bg); }
[dir="rtl"] .back-icon { transform: scaleX(-1); }
.chat-head-text { display: flex; flex-direction: column; gap: 2px; }
.chat-head-name { margin: 0; display: flex; align-items: baseline; gap: 2px; min-width: 0; }
.chat-head .chat-title { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--green); text-decoration: none; }
.chat-head .chat-title:hover { text-decoration: underline; }
.chat-menu summary { border-radius: 50%; }
.chat-menu summary:hover { background: var(--bg); }
.chat-page .safety { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; border-radius: 0; font-size: 0.82rem; }
.deal { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 16px 10px; background: var(--surface); }
.deal .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 8px; }
.deal .steps li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0;
  background: none; color: var(--muted); font-size: 0.78rem; text-align: center;
}
.deal .steps li::before {
  content: ''; position: absolute; top: 14px; height: 2px; background: var(--line);
  inset-inline-start: calc(-50% + 18px); inset-inline-end: calc(50% + 18px);
}
.deal .steps li:first-child::before { display: none; }
.deal .steps li.done::before, .deal .steps li.current::before { background: var(--green); }
.deal .steps li.done, .deal .steps li.current { background: none; border: 0; }
.deal .steps li.done { color: var(--fg); }
.deal .steps li.current { color: var(--green); font-weight: 700; }
.step-dot {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--line); font-weight: 700; font-size: 0.8rem;
}
.deal .steps li.done .step-dot { background: var(--green); border-color: var(--green); color: var(--surface); }
.deal .steps li.current .step-dot { border-color: var(--green); background: var(--surface); }
.deal-text { margin: 0 0 6px; text-align: center; font-weight: 600; }
.deal .row { justify-content: center; }
.messages {
  flex: 1; min-height: 0; padding: 16px; gap: 8px; border: 0; border-radius: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 12px 12px, rgba(0, 86, 43, 0.06) 1.5px, transparent 2px);
  background-size: 28px 28px;
}
.bubble { max-width: 72%; border: 0; border-radius: 16px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); padding: 8px 12px 6px; }
.bubble.theirs { background: var(--surface); border-start-start-radius: 4px; }
.bubble.mine { border-start-end-radius: 4px; }
.bubble time { text-align: end; font-size: 0.72rem; margin-top: 2px; }
.bubble.type-offer { border: 2px solid var(--gold); background: var(--surface); color: var(--fg); }
.bubble.type-accept, .bubble.type-paidClaim, .bubble.type-paidConfirm, .bubble.type-bookingAccept, .bubble.type-bookingDecline {
  border-radius: 999px; padding: 4px 14px; font-size: 0.85rem; box-shadow: none;
}
.scam { display: flex; align-items: center; gap: 4px; }
.chat-page > .form-error { margin: 0; padding: 0 16px; }
.chat-page .rate-banner { margin: 10px 16px; }
.composer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 8px; border-top: 1px solid var(--line); background: var(--surface); }
.composer-form { align-items: center; }
.composer-form textarea { border-radius: 24px; min-height: 46px; max-height: 140px; resize: none; padding: 11px 16px; background: var(--bg); }
.send-btn { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--brand); color: #fff; cursor: pointer; }
.send-btn:hover { filter: brightness(1.08); }
.send-btn[disabled] { opacity: 0.6; }
.offer summary { display: inline-flex; align-items: center; gap: 6px; }
.offer .row { margin-top: 6px; }
.quick-replies { gap: 6px; }
.blocked { margin: 10px 14px; border-radius: 14px; }
@media (max-width: 1000px) {
  .chat-shell { display: block; height: auto; min-height: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
  .chat-side { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .chat-shell.has-chat .chat-side, .chat-shell:not(.has-chat) .chat-placeholder { display: none; }
  /* En öppen chatt tar hela skärmen, som i appen (tillbaka-pilen visas). */
  .chat-shell.has-chat .chat-pane { position: fixed; inset: 0; z-index: 60; background: var(--surface); height: 100dvh; }
  .chat-back { display: grid; }
  .bubble { max-width: 84%; }
  .deal .steps li { font-size: 0.72rem; }
}

/* Supportchatten på /support använder samma bubblor, i en ruta. */
.account-card .messages { max-height: 420px; min-height: 200px; border-radius: 14px; border: 1px solid var(--line); overflow-y: auto; }

/* --- Notiser, sparade sökningar, blockerade --------------------------------------- */
#notificationsList { gap: 8px; }
.notification { align-items: center; gap: 12px; padding: 14px; border-radius: 14px; }
.notification:hover { border-color: var(--green); }
.notification.unread { background: var(--surface); border-color: var(--line); border-inline-start: 4px solid var(--green); }
.notification-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--jobs); color: var(--jobs-fg); }
.notification .button.ghost { color: var(--muted); border-color: transparent; background: none; min-width: 40px; padding: 6px; }
.notification .button.ghost:hover { color: var(--red); }
.plain-list { gap: 8px; }
.plain-list li { padding: 12px 16px; border-radius: 14px; }
.plain-list li.empty-state { justify-content: center; }
.list-icon { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--jobs); color: var(--jobs-fg); margin-inline-end: 6px; }

/* --- Hjälp och support -------------------------------------------------------------- */
.faq { padding: 0; border-radius: 14px; overflow: hidden; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--jobs); color: var(--jobs-fg); font-weight: 700; }
.faq[open] summary::after { content: '–'; }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq .description { margin: 0; padding: 12px 16px 16px; }
#supportWhatsappButton { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }

/* --- Offentlig profil ------------------------------------------------------------------ */
.profile-page { max-width: 1320px; gap: 18px; }
.profile-head { flex-wrap: wrap; gap: 20px; padding: 24px 26px; border: 0; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #00562b 0%, #007a3d 100%); }
.profile-head .avatar { box-shadow: 0 0 0 3px #00562b, 0 0 0 5px var(--gold); }
.profile-head-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.profile-head-text h1 { margin: 0; }
.profile-head .rating { color: var(--gold); }
.profile-head .stars { color: var(--gold); }
.profile-stats { display: flex; gap: 10px; }
.profile-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 90px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); }
.profile-stats strong { font-size: 1.35rem; line-height: 1.2; }
.profile-stats span { font-size: 0.8rem; opacity: 0.85; }
.reviews li { border-radius: 14px; padding: 12px 16px; }

/* --- Landningssidor, karta, kalender ------------------------------------------------- */
.mk-points li, .mk-section p { display: flex; align-items: center; gap: 8px; }
.mk-section .icon { color: var(--green); }
.mk-section { border-radius: 18px; }
.mk-hero { border-radius: 22px; border-bottom: 0; background: linear-gradient(135deg, #00562b 0%, #007a3d 100%); }
.map-page .map { border-radius: 18px; border: 1px solid var(--line); }
.calendar { border-radius: 18px; }
.calendar h2 { display: flex; align-items: center; gap: 6px; }
.prose { border-radius: 18px; padding: 22px 26px; }
.prose h2 { font-size: 1.15rem; margin-top: 18px; }

/* Dolda fält (filval): får aldrig ärva full bredd från formulärreglerna. */
.visually-hidden { width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; margin: -1px; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
.me-tiles { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }

/* Ögat i lösenordsfältet. */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-inline-end: 48px; }
.pw-toggle {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--fg); background: var(--surface); }

/* Välj kategori för en ny annons: bredare kort, två kolumner, namnen
   radbryts i stället för att hamna över symbolerna. */
.account-card.choose-cat { max-width: 760px; margin-inline: auto; }
.tiles.choose-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choose-tiles .tile { min-height: 76px; }
.choose-tiles .tile-name { overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 420px) { .tiles.choose-tiles { grid-template-columns: minmax(0, 1fr); } }

/* Bilder i helskärm (lightbox.js). */
body.no-scroll { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.94); display: flex; align-items: center; justify-content: center; }
.lightbox-stage { max-width: 100vw; max-height: 100vh; overflow: auto; display: flex; align-items: center; justify-content: center; }
.lightbox-img { max-width: 96vw; max-height: 92vh; object-fit: contain; cursor: zoom-in; transition: transform .2s; }
.lightbox-img.zoomed { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
.lightbox-close, .lightbox-nav { position: absolute; background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.lightbox-close { top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-end: 12px; }
.lightbox-nav.prev { inset-inline-start: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { inset-inline-end: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); inset-inline-start: 16px; color: #fff; font-size: 0.95rem; }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery-frame { position: relative; }
.gallery-main { cursor: zoom-in; }
.gallery-open { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* Bilder och video i chatten. */
.chat-media { display: block; padding: 0; border: 0; background: none; border-radius: 14px; overflow: hidden; cursor: zoom-in; max-width: 240px; }
.chat-media img, video.chat-media { display: block; width: 240px; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.attach-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.attach-btn.busy { opacity: 0.5; cursor: progress; }

/* Priset i bokningskalendern. */
.booking-price { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.booking-price p { margin: 0; }
.booking-price .row-between { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.booking-total { font-weight: 700; color: var(--green); }

/* --- Jobbansökningar (jobs_views.js) ------------------------------------ */
.job-profile-card .row { align-items: center; gap: 12px; }
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 1.1rem;
}
.applicant-row { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.applicant-row.unseen .card-title { font-weight: 700; }
.badge-new {
  display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--gold-deep, #9A7A34); color: #fff; font-size: .75rem; vertical-align: middle;
}
.chip { cursor: pointer; font: inherit; }
.apply-settings { margin-top: 8px; }
.apply-settings .stack { display: grid; gap: 8px; margin-bottom: 8px; }
.applicants-btn { margin-top: 4px; }
.qa + .qa { margin-top: 10px; }
.app-status-hired { color: var(--green); font-weight: 600; }
.app-status-rejected, .app-status-closed { opacity: .75; }

/* --- "محادثاتي" uppdelad: mina annonser / andras, och kategorier ------------ */
.chat-filters { display: grid; gap: 8px; padding: 0 0 8px; }
.chat-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.chat-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.chat-tab.active { background: var(--green); color: #fff; }
.chat-tab .badge-count { position: static; }
.chat-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.chat-cats .chip { white-space: nowrap; flex: none; }

/* --- Butiker (store_views.js) ------------------------------------------- */
.store-cover { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 18px; }
.store-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 16px 0 8px; }
.store-logo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-deep, #9A7A34); background: var(--surface); }
.store-logo-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.store-head-text { flex: 1 1 220px; min-width: 0; }
.store-head-text h1 { margin: 0 0 4px; }
.store-verified { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-deep, #9A7A34); font-weight: 600; }
.store-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.store-about { max-width: 70ch; white-space: pre-line; }
.store-tools { display: flex; gap: 8px; margin: 12px 0; }
.store-tools input { flex: 1; min-width: 0; }
.store-cats { margin-bottom: 12px; }
.visit-store { margin: 8px 0; }

/* --- Butiker del 2: lager, massval ------------------------------------- */
.out-of-stock { margin: 0 0 4px; color: var(--red, #CE1126); font-weight: 700; font-size: .85rem; }
.my-pick { display: flex; align-items: flex-start; padding-top: 6px; }
.select-row { margin: 4px 0 10px; }
.bulk-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0,0,0,.08); }
.bulk-count { font-weight: 600; margin-inline-end: auto; }

/* --- Excel-import (import_views.js) -------------------------------------- */
.import-page .panel { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
.import-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.import-table th, .import-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.import-table tr.bad td:last-child { color: var(--red, #CE1126); }
.import-table .ok-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; }

/* Medarbetare i butiken (omgång 2): raden "تعمل الآن باسم …" och teamet. */
.acting-bar { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 6px 16px; background: var(--gold); color: #1d1d1d; font-weight: 600; font-size: 0.95rem; }
.acting-bar .link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.team-row { justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.team-row:last-child { border-bottom: 0; }
.team-join .store-logo { border-radius: 12px; object-fit: cover; }
#teamInviteLink { width: 100%; }

/* Intervjutider (omgång 2). */
#interviewPanel li.chosen { font-weight: 700; color: var(--green); }
.interview-choice { margin-top: 8px; }
.interview-choice .stack { gap: 6px; }
