/* ============================================================
   🚗 Förarplatsen — Huvudstilmall (Light & Modern)
   Light theme · Inter font · Mobile-first · Modulär struktur
   ============================================================ */

/* ── 1. Root-variabler (Design tokens) ─────────────────── */
:root {
  /* Färger - Ljust tema */
  --bg:              #F8FAFC;
  --bg-secondary:    #F1F5F9;
  --surface:         #FFFFFF;
  --surface2:        #F8FAFC;
  --surface-hover:   #F1F5F9;
  --border:          #E2E8F0;
  --border2:         #CBD5E1;
  --text:            #0F172A;
  --text-secondary:  #334155;
  --text-muted:      #64748B;
  --text-muted2:     #94A3B8;
  
  /* Primär - Modern blå */
  --primary:         #2563EB;
  --primary-hover:   #1D4ED8;
  --primary-light:   #DBEAFE;
  --primary-dim:     rgba(37, 99, 235, 0.08);
  --primary-border:  rgba(37, 99, 235, 0.2);
  
  /* Sekundär - Ljus blå */
  --secondary:       #3B82F6;
  --secondary-light: #EFF6FF;
  
  /* Accentfärger */
  --accent:          #2563EB;
  --accent-hover:    #1D4ED8;
  --blue:            #3B82F6;
  --blue-light:      #93C5FD;
  --green:           #22C55E;
  --gold:            #EAB308;
  --purple:          #8B5CF6;
  --red:             #EF4444;
  --orange:          #F97316;

  /* Avrundningar */
  --radius-sm:       6px;
  --radius:          8px;
  --radius-lg:       12px;
  --radius-xl:       16px;
  --radius-full:     9999px;

  /* Skuggor - Mjuka för ljust tema */
  --shadow-sm:       0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:       0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg:       0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl:       0 12px 40px rgba(0, 0, 0, 0.10);

  /* Typografi */
  --font-family:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base:  15px;
  --line-height:     1.6;

  /* Layout */
  --container-width: 1280px;
  --nav-height:      64px;
}

/* ── 2. Reset & Baseline ──────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── 3. Flash-meddelanden ──────────────────────────────── */
.flash {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.flash-success {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  color: #166534;
}

.flash-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── 4. Navigering ──────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--nav-height);
  gap: 16px;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Logotyp */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-logo-text strong {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigationslänkar */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-link-auction {
  color: var(--gold);
}

.nav-link-auction:hover {
  background: #FEFCE8;
}

/* Höger-actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.nav-icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-light);
}

/* Användarmeny */
.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.nav-user-btn:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
}

.nav-dropdown.open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.1s, color 0.1s;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item-danger:hover {
  background: #FEF2F2;
  color: var(--red);
}

.dropdown-item-admin {
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Hamburgermeny */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 12px 0;
  background: var(--surface);
}

.nav-mobile.open {
  display: flex;
}

.mobile-link {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}

.mobile-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-link-primary {
  color: var(--primary);
  font-weight: 600;
}

.mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ── 5. Knappar ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-primary.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  font-size: 13px;
  padding: 6px 14px;
}

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border2);
}

.btn-ghost-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.btn-ghost-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* ── 6. Layout ───────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}

.section-link:hover {
  gap: 8px;
}

/* ── 7. Hero ──────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--secondary-light) 0%, var(--bg) 100%);
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* Hero-sök */
.hero-search {
  max-width: 600px;
  margin: 0 auto;
}

.hero-search-inner {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}

.hero-search-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.hero-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  padding: 8px 0;
}

.hero-search-input::placeholder {
  color: var(--text-muted);
}

.hero-search-select {
  background: var(--bg-secondary);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  outline: none;
  cursor: pointer;
  border-radius: 0;
}

.hero-search-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.chip-active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── 8. Kategorier ───────────────────────────────────────── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-icon {
  font-size: 28px;
}

.cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cat-card-more {
  border-style: dashed;
  color: var(--text-muted);
}

/* ── 9. Annonser (listings) ────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Annonskort */
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.listing-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.listing-card-sold {
  opacity: 0.7;
}

.listing-card-img-wrap {
  position: relative;
  display: block;
  height: 200px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.listing-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.listing-card:hover .listing-card-img {
  transform: scale(1.05);
}

.listing-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border2);
  font-size: 40px;
  background: var(--bg-secondary);
}

/* Badges */
.listing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.listing-badge-auction {
  background: #FEFCE8;
  color: #A16207;
  border: 1px solid #FDE68A;
}

.listing-badge-featured {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  top: auto;
  bottom: 12px;
}

.listing-badge-sold {
  background: #FEF2F2;
  color: var(--red);
  border: 1px solid #FCA5A5;
}

/* Kort-innehåll */
.listing-card-body {
  padding: 16px;
}

.listing-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  transition: color 0.15s;
}

.listing-card-title:hover {
  color: var(--primary);
}

.listing-card-year {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.listing-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.listing-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.price-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}

.auction-end {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.listing-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.listing-loc {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Gilla-knapp */
.fav-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-muted);
}

.fav-btn:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: var(--red);
}

.fav-btn.fav-active {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: var(--red);
}

/* ── 10. Features ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.feat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border2);
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.feat-icon-blue {
  background: var(--primary-light);
  color: var(--primary);
}
.feat-icon-green {
  background: #F0FDF4;
  color: var(--green);
}
.feat-icon-gold {
  background: #FEFCE8;
  color: var(--gold);
}
.feat-icon-purple {
  background: #F5F3FF;
  color: var(--purple);
}
.feat-icon-orange {
  background: #FFF7ED;
  color: var(--orange);
}

.feat-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.feat-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── 11. Företags-CTA ────────────────────────────────────── */
.company-cta {
  background: linear-gradient(135deg, var(--secondary-light) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.company-cta-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.company-cta h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
  color: var(--text);
}

.company-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
}

.company-cta-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge-item {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.badge-item i {
  color: var(--green);
}

.company-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

/* ── 12. Formulär ────────────────────────────────────────── */
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 32px;
  color: var(--text);
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row-2 > .form-group {
  flex: 1;
  min-width: 200px;
}

.form-row-3 > .form-group {
  flex: 1;
  min-width: 160px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
  background: var(--surface);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Registreringsnummer */
.reg-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reg-prefix {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
}

.reg-input {
  flex: 1;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

.lookup-status {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lookup-status.loading {
  color: var(--text-muted);
}
.lookup-status.success {
  color: var(--green);
}
.lookup-status.error {
  color: var(--red);
}

/* Kategoriväljare */
.cats-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-radio input {
  display: none;
}

.cat-radio span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.cat-radio input:checked + span {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Radioknappar */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.sale-type-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.sale-radio input {
  display: none;
}

.sale-radio span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.sale-radio input:checked + span {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Bildladdning */
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  background: var(--bg-secondary);
}

.img-upload-area:hover,
.img-upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.img-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.img-upload-placeholder i {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.img-upload-placeholder p {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.img-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.img-preview-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}

.img-preview-item {
  position: relative;
  width: 100px;
  height: 76px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
}

.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-primary-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(37, 99, 235, 0.9);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 3px;
  color: #fff;
}

.form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── 13. Chatt ────────────────────────────────────────────── */
.chat-layout {
  display: flex;
  height: calc(100vh - var(--nav-height));
  background: var(--bg);
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface);
}

.chat-sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.chat-sidebar-inner {
  flex: 1;
  overflow-y: auto;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-secondary);
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.chat-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.chat-header-listing {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.chat-e2e-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-e2e-notice {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-msg-sent {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-received {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.chat-msg-sent .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-received .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.chat-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--surface);
}

.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: none;
  max-height: 140px;
  transition: all 0.15s;
}

.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.chat-send-btn {
  border-radius: var(--radius);
  padding: 10px 16px;
  flex-shrink: 0;
}

/* ── 14. Admin ────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg);
}

.admin-sidebar {
  width: 240px;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
  background: var(--surface);
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.1s;
  border-left: 3px solid transparent;
}

.admin-nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.admin-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.admin-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ── 15. Tabeller ──────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-secondary);
  text-align: left;
  border-bottom: 2px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--primary-light);
}

/* ── 16. Footer ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  background: var(--surface);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1;
  min-width: 200px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin: 8px 0 16px;
  max-width: 280px;
}

.footer-lang {
  display: flex;
  gap: 8px;
}

.lang-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: none;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0 56px;
}

.footer-links-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.footer-links-grid a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 17. Utility-klasser ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 52px;
  color: var(--border2);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 20px;
}

.chat-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 18. Responsiv design ────────────────────────────────── */
/* Tablet */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-hamburger {
    display: block;
  }
  
  .nav-user-name {
    display: none;
  }
  
  .admin-sidebar {
    width: 64px;
    padding: 16px 0;
  }
  
  .admin-nav-link span {
    display: none;
  }
  
  .admin-nav-link {
    justify-content: center;
    padding: 12px;
    border-left: none;
  }
  
  .admin-nav-link:hover {
    border-left: none;
  }
  
  .hero {
    padding: 48px 16px 32px;
  }
  
  .company-cta {
    padding: 32px 24px;
  }
}

/* Mobil stor */
@media (max-width: 640px) {
  .listings-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .chat-sidebar {
    display: none;
  }
  
  .hero-search-inner {
    flex-wrap: wrap;
    padding: 12px;
  }
  
  .hero-search-select {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 10px 12px;
    width: 100%;
  }
  
  .company-cta-actions {
    width: 100%;
  }
  
  .company-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobil liten */
@media (max-width: 480px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row-2 > .form-group,
  .form-row-3 > .form-group {
    min-width: 100%;
  }
  
  .cats-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }
  
  .company-cta {
    padding: 24px 16px;
  }
  
  .company-cta h2 {
    font-size: 20px;
  }
}