/**
 * Company Dashboard Modern v2.0
 * Mörkgrått tema - matchar Profile & Reviews v2.0
 */

:root {
  /* Minimalist Neutral Color Scheme - Inspired by Stripe/Linear/Vercel */
  --primary: #0f172a;
  --primary-light: #1e293b;
  --secondary: #64748b;
  --accent: #0f172a;
  --accent-light: #334155;
  --success: #10b981;
  --success-light: #34d399;
  --warning: #ef4444;
  --danger: #ef4444;
  
  /* Backgrounds - Clean and neutral */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f8fafc;
  --bg-active: #f1f5f9;
  
  /* Text colors - Monochrome scale */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* Borders - Subtle and minimal */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Shadows - Subtle and minimal */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.12);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* ============================================
   DARK MODE: Uppdatera CSS-variabler
   ============================================ */
body.dark-mode {
  /* Bakgrunder - MÖRKA */
  --bg-primary: #111827;
  --bg-card: #1f2937;
  --bg-hover: #374151;
  --bg-active: #4b5563;
  
  /* Text - LJUSA */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* Borders - MÖRKARE */
  --border-color: #374151;
  --border-light: #4b5563;
  
  /* Primary/Secondary - Anpassade för dark mode */
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --secondary: #374151;
  
  /* Accent - Lite ljusare för bättre kontrast */
  --accent: #38bdf8;
  --accent-light: #7dd3fc;
  
  /* Shadows - Mörkare */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Base styling - Ljus bakgrund - MÅSTE overrida index.css gradient */
body {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  min-height: 100vh;
}

/* Container */
.dashboard-container {
  background-color: #f8fafc;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg);
  /* #header-placeholder reserverar redan fixed header — undvik dubbel offset */
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
}

.wicked-promo-slot {
  order: 99;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Dashboard Header - Minimalist and Clean */
.dashboard-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl) var(--spacing-2xl);
  margin-bottom: 32px;
  box-shadow: none;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
}

/* Hero med Unsplash-bild (Gabriel Alenius), svartvit via CSS – text ovanpå */
.dashboard-header--hero-bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  min-height: 13rem;
}

.dashboard-header--hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #e8edf2;
  background-image: url('/images/company-dashboard-hero-bg.jpg');
  background-size: cover;
  /* Virkesmotiv – centrerad beskärning */
  background-position: center center;
  filter: grayscale(100%);
  z-index: 0;
}

.dashboard-header--hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(248, 250, 252, 0.94) 0%,
    rgba(248, 250, 252, 0.85) 35%,
    rgba(248, 250, 252, 0.48) 58%,
    rgba(248, 250, 252, 0.18) 100%
  );
  z-index: 1;
}

.dashboard-header--hero-bg .dashboard-header-left,
.dashboard-header--hero-bg .dashboard-header-right {
  position: relative;
  z-index: 2;
}

.dashboard-header--hero-bg .dashboard-header-left h1,
.dashboard-header--hero-bg .dashboard-header-left p {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.dashboard-header--hero-bg .greeting-badge {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}

.greeting-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  text-transform: lowercase;
}

.dashboard-header-left h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dashboard-header-left p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.dashboard-header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.header-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

/* Plan Badges */
.plan-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-badge span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.badge-trial, .badge-free, .badge-basic, .badge-pro {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: none;
  border: 1px solid var(--border-color);
  animation: none;
  font-size: 0.6875rem;
  padding: 0.375rem 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0;
}

.badge-enterprise {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: none;
  border: 1px solid var(--border-color);
  animation: none;
  font-size: 0.6875rem;
  padding: 0.375rem 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
  }
}

/* Premium Feature Locks */
.feature-lock {
  display: none;
  margin-left: auto;
  font-size: 0.875rem;
  color: #f59e0b;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.quick-action-item[data-requires="premium"] {
  position: relative;
}

.quick-action-item[data-requires="premium"]:hover .feature-lock {
  opacity: 1;
  transform: scale(1.1);
}

.feature-limited {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.company-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: var(--radius-full);
  border: 3px solid rgba(255, 255, 255, 0.95);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.35rem;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.company-initials {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Hero: loggan som tydlig varumärkesmarkör */
.dashboard-header--hero-bg .company-avatar,
.dashboard-header--hero-bg .company-initials {
  width: 8.5rem;
  height: 8.5rem;
}

.dashboard-header--hero-bg .company-initials {
  font-size: 2.25rem;
}

.dashboard-header--hero-bg .plan-badge span {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.dashboard-header-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* 2-Kolumn Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--spacing-xl);
  align-items: start;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Sidebar scrollbar styling */
.dashboard-sidebar::-webkit-scrollbar {
  width: 8px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dashboard-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

/* Widget Cards */
.widget-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-light);
}

.widget-header i {
  color: var(--primary);
  font-size: 1.125rem;
}

.widget-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.notification-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Optimization Tips Widget — ARV: enkel lista, ingen “SaaS-pill”-känsla */
body.company-dashboard-page .tips-widget {
  background: var(--bg-card, #FBFaf7);
  border: 1px solid var(--border-color, rgba(199, 204, 209, 0.65));
  box-shadow: none;
}

body.company-dashboard-page .tips-widget .widget-header {
  border-bottom-color: var(--border-light, rgba(199, 204, 209, 0.4));
}

body.company-dashboard-page .tips-widget .widget-header i {
  color: var(--arv-forest, #1B2D26);
  opacity: 0.85;
}

body.company-dashboard-page .tips-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.company-dashboard-page .tip-item {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0.15rem;
  margin: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light, rgba(199, 204, 209, 0.4));
  border-radius: 0;
  border-left: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

body.company-dashboard-page .tip-item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

body.company-dashboard-page .tip-item:first-child {
  padding-top: 0.25rem;
}

body.company-dashboard-page .tip-item:hover {
  transform: none;
  box-shadow: none;
  background: rgba(27, 45, 38, 0.035);
}

body.company-dashboard-page .tip-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: var(--bg-secondary, #F2EFE9);
  border: 1px solid var(--border-color, rgba(199, 204, 209, 0.65));
  color: var(--arv-forest, #1B2D26);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  box-shadow: none;
}

body.company-dashboard-page .tip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #0F0F10);
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

body.company-dashboard-page .tip-description {
  font-size: 0.78rem;
  color: var(--text-secondary, #5C6560);
  line-height: 1.4;
}

body.company-dashboard-page .tip-impact {
  display: inline;
  padding: 0;
  margin-top: 0.35rem;
  background: none;
  border-radius: 0;
  color: var(--arv-muted, #5C6560);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
}

body.company-dashboard-page .tip-impact i {
  display: none;
}

body.company-dashboard-page .tip-item.completed {
  opacity: 0.5;
}

body.company-dashboard-page .tip-item.completed .tip-icon {
  background: var(--bg-tertiary, #EAE6DF);
  color: var(--arv-muted, #5C6560);
}

body.company-dashboard-page .tip-item.completed .tip-title {
  text-decoration: line-through;
  text-decoration-color: rgba(92, 101, 96, 0.5);
}

/* Legacy (icke-ARV) tips-stil behålls för andra sidor */
.tips-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.tips-widget .widget-header {
  border-bottom-color: var(--border-color);
}

.tips-widget .widget-header i {
  color: var(--text-secondary);
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  background: white;
  border-radius: var(--radius-md);
  border-left: 3px solid #10b981;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tip-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.tip-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.tip-content {
  flex: 1;
  min-width: 0;
}

.tip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.tip-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.tip-impact {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  margin-top: 0.375rem;
}

.tip-impact i {
  font-size: 0.625rem;
}

.tip-item.completed {
  opacity: 0.6;
  border-left-color: #94a3b8;
}

.tip-item.completed .tip-icon {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.tip-item.completed .tip-title {
  text-decoration: line-through;
}

/* Väder Widget */
.weather-widget--clickable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.weather-widget--clickable:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  border-color: var(--primary-light, #a5b4fc);
}

.weather-widget--clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.weather-content {
  text-align: center;
  padding: var(--spacing-md) 0;
}

.weather-loading {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.weather-icon {
  font-size: 3rem;
  color: var(--accent);
}

.weather-temp {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.weather-description {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-bottom: var(--spacing-sm);
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

.weather-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.weather-detail i {
  color: var(--accent);
}

/* Meetings Widget */
.meetings-widget {
  margin-bottom: var(--spacing-lg);
}

.meetings-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.meetings-loading,
.meetings-empty {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.meeting-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  cursor: pointer;
}

.meeting-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.meeting-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.meeting-details {
  flex: 1;
  min-width: 0;
}

.meeting-customer {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meeting-project {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meeting-time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meeting-time i {
  font-size: 0.75rem;
  color: var(--primary);
}

/* Meeting count badge in quick actions */
.meeting-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.375rem;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  margin-left: 0.375rem;
}

/* Quick action item styling for meetings link */
.quick-action-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
}

.quick-action-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateX(4px);
}

.quick-action-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.quick-action-item span:not(.meeting-count-badge) {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Highlight pulse animation for scrolling to widget */
@keyframes highlightPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.3);
  }
}

.highlight-pulse {
  animation: highlightPulse 1s ease-in-out 2;
}

.weather-error {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Activity Timeline */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.activity-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: var(--bg-hover);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.activity-icon.quote {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
}

.activity-icon.project {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.activity-icon.profile {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  line-height: 1.4;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Quick Actions Sidebar List */
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--company-text, var(--text-primary));
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid var(--company-border, var(--border-color));
  background: var(--company-bg, var(--bg-card));
}

.quick-action-item:hover {
  background: var(--company-bg-subtle, var(--bg-hover));
  border-color: var(--company-text-muted, var(--text-muted));
  transform: translateX(4px);
}

.quick-action-item i {
  width: 20px;
  color: var(--company-text-muted, var(--text-secondary));
  font-size: 1rem;
}

.quick-action-item span {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Primary CTA — Skapa offert */
.quick-action-item[data-feature="quote"]:not(.locked) {
  background: var(--company-cta, #0f172a);
  border-color: var(--company-cta, #0f172a);
  color: #ffffff;
}

.quick-action-item[data-feature="quote"]:not(.locked) i {
  color: #ffffff;
}

.quick-action-item[data-feature="quote"]:not(.locked):hover {
  background: var(--company-cta-hover, #1e293b);
  border-color: var(--company-cta-hover, #1e293b);
  color: #ffffff;
}

.quick-action-item[data-feature="quote"]:not(.locked):hover i {
  color: #ffffff;
}

/* Övriga upplåsta funktioner — neutral stil */
.quick-action-item[data-feature]:not([data-feature="quote"]):not(.locked):not(.coming-soon) {
  background: var(--company-bg, var(--bg-card));
  border: 1px solid var(--company-border, var(--border-color));
  color: var(--company-text, var(--text-primary));
}

.quick-action-item[data-feature]:not([data-feature="quote"]):not(.locked):not(.coming-soon) i {
  color: var(--company-text-muted, var(--text-secondary));
}

.quick-action-item[data-feature]:not([data-feature="quote"]):not(.locked):not(.coming-soon):hover {
  background: var(--company-bg-subtle, var(--bg-hover));
  border-color: var(--company-text-muted, var(--text-muted));
  color: var(--company-text, var(--text-primary));
}

.quick-action-item[data-feature]:not([data-feature="quote"]):not(.locked):not(.coming-soon):hover i {
  color: var(--company-text, var(--text-primary));
}

/* Verktygsväskan — kommer snart (inaktiv dashboard-genväg tills släppt) */
.quick-action-item.coming-soon {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.92;
}

.quick-action-item.coming-soon:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  transform: none;
}

.quick-action-item.coming-soon i {
  color: #94a3b8;
}

.quick-action-item.coming-soon:hover i {
  color: #94a3b8;
}

.quick-action-item .coming-soon-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}

.quick-action-item .coming-soon-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Premium features - gråmarkerade när locked (desktop) */
.quick-action-item.locked {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  opacity: 0.7;
  cursor: pointer;
}

.quick-action-item.locked:hover {
  background: #f1f5f9;
  opacity: 0.85;
  transform: translateX(2px);
}

.quick-action-item.locked i {
  color: #cbd5e1;
}

.quick-action-item.locked .feature-lock {
  display: inline-block;
  color: #f59e0b;
  margin-left: auto;
}

/* Sidebar Notifikationer */
.sidebar-notifications {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.sidebar-notification-item {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-notification-item:hover {
  background: var(--bg-active);
}

.sidebar-notification-item.unread {
  background: rgba(14, 165, 233, 0.05);
  border-left-color: var(--accent);
  color: var(--text-primary);
  font-weight: 600;
}

/* Hero Stats Grid - COMPACT TABLE LAYOUT */
.hero-stats-grid {
  margin-bottom: 48px;
}

/* Stats Compact - Table-like row layout */
.stats-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
  cursor: pointer;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row:hover {
  background: var(--bg-hover);
}

.stat-row:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -2px;
  background: var(--bg-hover);
}

.stat-row.non-clickable {
  cursor: default;
}

.stat-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.stat-row-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* Color Variants */
.stat-icon-neutral {
  background: var(--company-bg-subtle, var(--bg-tertiary));
  box-shadow: none;
}

.stat-icon-neutral svg {
  color: var(--company-text-muted, var(--text-secondary));
}

.stat-icon-success {
  background: var(--company-success, #10b981);
  box-shadow: none;
}

.stat-icon-info {
  background: var(--company-bg-subtle, var(--bg-tertiary));
  box-shadow: none;
}

.stat-icon-info svg {
  color: var(--company-text-muted, var(--text-secondary));
}

.stat-icon-purple {
  background: var(--company-bg-subtle, var(--bg-tertiary));
  box-shadow: none;
}

.stat-icon-purple svg {
  color: var(--company-text-muted, var(--text-secondary));
}

.stat-icon-gold {
  background: var(--company-bg-subtle, var(--bg-tertiary));
  box-shadow: none;
}

.stat-icon-gold svg {
  color: var(--company-text-muted, var(--text-secondary));
}

.stat-icon-warning {
  background: var(--company-warning, #ca8a04);
  box-shadow: none;
}

/* Hover Effect */
.stat-row:hover .stat-row-icon {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.stat-row-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.5;
}

.stat-row-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

.stat-row-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
  white-space: nowrap;
}

/* Desktop: 2-column grid for better space usage */
@media (min-width: 1024px) {
  .stats-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  
  .stat-row {
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
  }
  
  .stat-row:nth-child(2n) {
    border-right: none;
  }
  
  .stat-row:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* Tablet: 2-column but slightly smaller */
@media (min-width: 768px) and (max-width: 1023px) {
  .stats-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  
  .stat-row {
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 10px 14px;
  }
  
  .stat-row:nth-child(2n) {
    border-right: none;
  }
  
  .stat-row:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* Mobile: single column, touch-friendly */
@media (max-width: 767px) {
  .stat-row {
    padding: 14px 16px;
    min-height: 48px;
  }

  .stat-row-icon {
    width: 36px;
    height: 36px;
  }

  .stat-row-icon svg {
    width: 18px;
    height: 18px;
  }

  .stat-row-meta {
    min-width: 60px;
  }
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: none;
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  border-color: var(--text-muted);
}

/* Verification status card */
.stat-card.verified {
  border-color: var(--success);
  background: var(--bg-card);
}

.stat-card.verified .stat-card-icon {
  background: var(--success);
}

.stat-card.unverified {
  border-color: var(--warning);
  background: var(--bg-card);
}

.stat-card.unverified .stat-card-icon {
  background: var(--warning);
}

/* Subscription card */
.stat-card.subscription-card {
  background: var(--bg-card);
}

.stat-card.subscription-card .stat-card-icon {
  background: var(--primary);
}

/* Highlighted stat card (e.g. project value) */
.stat-card.stat-card-highlight {
  border-color: var(--success);
  background: var(--bg-card);
  position: relative;
  overflow: visible;
}

.stat-card.stat-card-highlight::before {
  display: none;
}

.stat-card-message {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-left: 2px solid var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.stat-card-message strong {
  font-weight: 700;
}

/* Onboarding Guide */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  animation: fadeIn 0.3s ease;
}

.onboarding-modal {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-2xl);
  animation: slideInUp 0.3s ease;
}

.onboarding-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: var(--spacing-xl) var(--spacing-2xl);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  text-align: center;
}

.onboarding-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.onboarding-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

.onboarding-body {
  padding: var(--spacing-2xl);
}

.onboarding-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xl) 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-lg);
  background: var(--bg-hover);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.checklist-item:hover {
  background: var(--bg-active);
  transform: translateX(4px);
}

.checklist-item.completed {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
}

.checklist-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
}

.checklist-item.completed .checklist-icon {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.checklist-content {
  flex: 1;
}

.checklist-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.checklist-description {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.onboarding-footer {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

.onboarding-footer .btn {
  min-width: 120px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick Search Modal */
.quick-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  animation: fadeIn 0.2s ease;
}

.quick-search-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.2s ease;
  overflow: hidden;
}

.quick-search-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.quick-search-icon {
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.quick-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.125rem;
  color: var(--text-primary);
  background: transparent;
}

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

.quick-search-kbd {
  padding: 0.25rem 0.5rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-secondary);
}

.quick-search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--spacing-sm);
}

.quick-search-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.quick-search-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-search-item:hover,
.quick-search-item.selected {
  background: var(--bg-hover);
}

.quick-search-item.selected {
  background: var(--primary);
  color: white;
}

.quick-search-item-icon {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.quick-search-item.selected .quick-search-item-icon {
  color: white;
}

.quick-search-item-title {
  flex: 1;
  font-weight: 500;
}

.quick-search-item-badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.quick-search-empty {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--text-secondary);
}

.quick-search-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--bg-hover);
}

.quick-search-hint {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.quick-search-hint kbd {
  padding: 0.125rem 0.375rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-family: monospace;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Keyboard Shortcuts Help Modal */
.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  animation: fadeIn 0.2s ease;
}

.shortcuts-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.2s ease;
}

.shortcuts-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: var(--spacing-xl) var(--spacing-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shortcuts-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.shortcuts-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shortcuts-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.shortcuts-body {
  padding: var(--spacing-2xl);
  max-height: calc(80vh - 100px);
  overflow-y: auto;
}

.shortcuts-section {
  margin-bottom: var(--spacing-xl);
}

.shortcuts-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}

.shortcuts-list {
  display: grid;
  gap: var(--spacing-sm);
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.shortcut-item:hover {
  background: var(--bg-hover);
}

.shortcut-description {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.shortcut-keys {
  display: flex;
  gap: 0.25rem;
}

.shortcut-key {
  padding: 0.25rem 0.5rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-secondary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .quick-search-modal {
    max-width: 100%;
    margin: 0 var(--spacing-md);
  }
  
  .shortcuts-modal {
    max-width: 100%;
  }
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.stat-card-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.2;
}

.stat-card-trend {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}

.stat-card-trend.up {
  background: transparent;
  color: var(--text-muted);
}

.stat-card-trend.down {
  background: transparent;
  color: var(--text-muted);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.5;
}

.stat-card-sublabel {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* Section Container */
.section-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-title i {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Projects Section - Minimal Header */
.projects-section-header {
  background: transparent;
  border-radius: 0;
  padding: 0 0 14px 0;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  border: none;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

.projects-header-content {
  flex: 1;
}

.projects-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.projects-section-title i {
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.projects-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .projects-section-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.projects-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: #334155;
  border: 2px solid #334155;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.projects-view-all-btn:hover {
  background: #334155;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 65, 85, 0.3);
}

.projects-view-all-btn i {
  transition: transform 0.2s;
}

.projects-view-all-btn:hover i {
  transform: translateX(4px);
}

/* Project Tabs */
.project-tabs {
  display: flex;
  gap: 2rem;
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  overflow-x: auto;
}

.project-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  margin-bottom: -1px;
}

.project-tab i {
  font-size: 0.875rem;
}

.project-tab:hover {
  background: transparent;
  color: var(--text-primary);
  border-bottom-color: var(--text-muted);
}

.project-tab.active {
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.375rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
}

.project-tab.active .tab-badge {
  background: var(--text-primary);
  color: white;
}

/* Project Filters */
.project-filters {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  align-items: center;
  flex-wrap: nowrap;
}

/*
 * Toolbar: alltid staplad — flikar på full bredd med understreck, filter på egen rad under.
 * (Rad-layout vid lg+ togs bort: den gav "flytande" filter bredvid flikar och bruten kantlinje.)
 */
#projectsSection .projects-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#projectsSection .projects-toolbar .project-tabs {
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
}

#projectsSection .projects-toolbar .project-filters {
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-self: stretch;
}

@media (min-width: 1024px) {
  #projectsSection .projects-toolbar .project-filters {
    padding: 0.75rem 1rem;
  }
}

.project-filters-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.project-filters-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  min-width: 120px;
}

.filter-label i {
  color: var(--accent);
  font-size: 0.875rem;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--text-secondary);
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: none;
}

.filter-chip.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: white;
  box-shadow: none;
}

.filter-chip i {
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .projects-section-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .projects-view-all-btn {
    width: 100%;
    justify-content: center;
  }
  
  .projects-section-title {
    font-size: 1.5rem;
  }
  
  .project-filters {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select,
  .sort-toggle {
    width: 100%;
  }
}

/* Quotes Section - Modern Header */
.quotes-section-header {
  background: transparent;
  border-radius: 0;
  padding: 0 0 24px 0;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  border: none;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

.quotes-header-content {
  flex: 1;
}

.quotes-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.quotes-section-title i {
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.quotes-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.quotes-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--company-bg, white);
  color: var(--company-text-muted, var(--text-secondary));
  border: 1px solid var(--company-border, var(--border-color));
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.quotes-view-all-btn:hover {
  background: var(--company-bg-subtle, var(--bg-hover));
  color: var(--company-text, var(--text-primary));
  border-color: var(--company-text-muted, var(--text-muted));
  transform: translateY(-1px);
  box-shadow: none;
}

.quotes-view-all-btn i {
  transition: transform 0.2s;
}

.quotes-view-all-btn:hover i {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  .quotes-section-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .quotes-view-all-btn {
    width: 100%;
    justify-content: center;
  }
  
  .quotes-section-title {
    font-size: 1.5rem;
  }
}

/* Feed List Container */
.feed-list {
  display: flex;
  flex-direction: column;
}

/* Project Feed Items */
.project-feed-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
  border-radius: 8px;
}

.project-feed-item:hover {
  background: var(--bg-hover);
  border-bottom-color: transparent;
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

/* Structured project info */
.badge-structured {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.project-structured-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.structured-info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #0c4a6e;
  font-size: 0.75rem;
}

.structured-info-header i {
  color: #64748b;
}

.structured-info-content {
  background: white;
  border-radius: 6px;
  padding: 0.75rem;
}

.answers-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.answer-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.answer-item:last-child {
  border-bottom: none;
}

.answer-key {
  font-weight: 600;
  color: #475569;
  font-size: 0.875rem;
}

.answer-value {
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Detailed Guided Answers */
.guided-answers-detailed {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.guided-answers-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guided-section {
  background: white;
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.guided-section-nested {
  background: #fefce8;
  border-left: 4px solid #eab308;
}

.guided-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.guided-section-title i {
  color: #64748b;
  width: 20px;
  height: 20px;
}

.guided-section-nested .guided-section-title i {
  color: #eab308;
}

.guided-answers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .guided-answers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.guided-answer-item {
  background: #fafafa;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid #64748b;
  transition: all 0.2s;
}

.guided-answer-item:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}

.guided-section-nested .guided-answer-item {
  background: white;
  border-left-color: #eab308;
}

.guided-question {
  font-weight: 600;
  color: #475569;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.guided-answer {
  color: #1e293b;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Compact Guided Answers (för project cards) */
.guided-answers-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compact-answer-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.25rem 0;
}

.compact-question {
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}

.compact-answer {
  color: #1e293b;
  font-weight: 500;
}

.compact-more {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.25rem;
  font-style: italic;
}

.info-badge {
  font-size: 0.625rem;
  background: #dbeafe;
  color: #0c4a6e;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Warning Section */
.detail-section-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.warning-text {
  color: #78350f;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.warning-text strong {
  color: #92400e;
}

/* Budget Section */
.budget-range {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
  margin: 0.5rem 0;
}

.budget-note {
  color: #64748b;
  font-size: 0.8125rem;
  margin: 0.5rem 0 0 0;
}

.project-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.project-feed-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

/* REMOVED: Värdeberäkningar borttagna
.project-value-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.project-value-badge i {
  font-size: 0.75rem;
}
*/

/* Project Description */
.project-description {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #64748b;
}

.project-description-text {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.project-description-text.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}

.read-more-btn:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Project Actions Row */
.project-actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.btn-view-details {
  flex: 1;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid #64748b;
  color: #64748b;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-view-details:hover {
  background: #f1f5f9;
  border-color: #475569;
  color: #475569;
}

.btn-feed-action {
  flex: 1.5;
}

/* Project Details Modal */
.project-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.project-details-modal .project-details-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 1200px !important; /* Bredare för desktop - lättare att läsa */
  width: 95% !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Mindre bredd på mobil */
@media (max-width: 768px) {
  .project-details-modal .project-details-content {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0;
  }
}

.project-details-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  border-bottom: none;
  color: white;
}

.project-details-modal .modal-header h2 {
  color: white !important;
}

.project-details-modal .modal-close-btn {
  color: white;
  opacity: 0.9;
}

.project-details-modal .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.modal-title-section h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
}

.project-meta-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-close-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #64748b;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.detail-section h3 i {
  color: #64748b;
}

.project-full-description {
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

.project-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.project-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.project-image:hover {
  transform: scale(1.05);
}

.urgent-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  color: #92400e;
  font-weight: 500;
}

/* General Info Grid Styles */
.timing-info-grid,
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

/* REMOVED: estimation-grid borttagen */

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.813rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 0.938rem;
  color: #0f172a;
  font-weight: 500;
}

.info-value-code {
  font-family: 'Courier New', monospace;
  font-size: 0.813rem;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

/* Timing Section */
.detail-section-timing {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
}

/* REMOVED: Värdeberäkningar borttagna
Estimation Section
.detail-section-estimation {
  background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #8b5cf6;
}

.estimation-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #6b21a8;
}

.confidence-level {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.confidence-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 0.3s ease;
}

.complexity-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
}

.complexity-simple {
  background: #d1fae5;
  color: #065f46;
}

.complexity-medium {
  background: #fef3c7;
  color: #92400e;
}

.complexity-complex {
  background: #fee2e2;
  color: #991b1b;
}
*/

/* Metadata Section */
.detail-section-metadata {
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #64748b;
}

.metadata-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Work Breakdown Section */
.detail-section-breakdown {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #6366f1;
}

.work-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.breakdown-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e7ff;
}

.breakdown-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.breakdown-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.breakdown-hours {
  font-size: 0.813rem;
  font-weight: 600;
  color: #6366f1;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #e0e7ff;
  border-radius: 4px;
}

/* Calculations Section */
.detail-section-calculations {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #ec4899;
}

.calculations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.calculation-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #fce7f3;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #fce7f3;
}

.calc-name {
  font-weight: 600;
  color: #0f172a;
}

.calc-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.calc-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calc-result-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.calc-result-value {
  font-size: 0.938rem;
  font-weight: 600;
  color: #0f172a;
}

/* Status badges */
.badge-status {
  text-transform: uppercase;
  font-size: 0.688rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-open {
  background: #10b981;
  color: white;
}

.badge-in_progress {
  background: #f59e0b;
  color: white;
}

.badge-awarded {
  background: #8b5cf6;
  color: white;
}

.badge-completed {
  background: #64748b;
  color: white;
}

.badge-cancelled,
.badge-closed {
  background: #ef4444;
  color: white;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.modal-footer .btn-secondary {
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
}

.modal-footer .btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border: none;
  color: white;
}

.modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 6px 16px rgba(100, 116, 139, 0.3);
}

/* Image Fullscreen */
.image-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-fullscreen img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.close-fullscreen {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* REMOVED: Värdeberäkningar borttagna
*/

/* REMOVED: Värdeberäkningar borttagna
Confidence Indicator
.confidence-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  margin-top: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
}

.confidence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.confidence-indicator.confidence-high .confidence-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.confidence-indicator.confidence-medium .confidence-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.confidence-indicator.confidence-low .confidence-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.confidence-text {
  font-weight: 600;
}

Value Color Coding
.project-value-badge.value-color-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.project-value-badge.value-color-blue {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.project-value-badge.value-color-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.project-value-badge.value-color-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

Value Details & Breakdown
.project-value-details {
  margin: 0.75rem 0;
}

.value-details-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.value-details-toggle:hover {
  background: var(--bg-active);
  border-color: var(--accent);
  color: var(--accent);
}

.value-details-toggle i:last-child {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.value-breakdown {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  animation: slideDown 0.2s ease;
}
*/

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* REMOVED: Värdeberäkningar borttagna - breakdown CSS
.breakdown-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-of-type {
  border-bottom: none;
}

.breakdown-item span:first-child {
  flex: 1;
}

.breakdown-item span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.quality-budget {
  color: #10b981;
}

.quality-standard {
  color: #0ea5e9;
}

.quality-luxury {
  color: #8b5cf6;
}

.complexity-simple {
  color: #10b981;
}

.complexity-medium {
  color: #f59e0b;
}

.complexity-complex {
  color: #ef4444;
}

.breakdown-divider {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 0.75rem 0;
}

.breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.breakdown-total span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breakdown-total strong {
  font-size: 1.125rem;
  color: #059669;
}

.breakdown-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem;
  background: rgba(14, 165, 233, 0.05);
  border-left: 3px solid #0ea5e9;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.breakdown-note i {
  color: #0ea5e9;
  margin-top: 0.125rem;
  flex-shrink: 0;
}
*/

.project-feed-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Quote Feed Items */
.quote-feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
}

.quote-feed-main {
  min-width: 0;
}

.quote-feed-item:hover {
  background: var(--bg-hover);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  border-bottom-color: transparent;
}

.quote-feed-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-feed-customer {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.quote-rejection-reason {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #b91c1c;
  font-style: italic;
}

.quote-cancelled-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #991b1b;
  font-weight: 500;
}

.quote-cancellation-reason {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  font-style: italic;
  color: #b91c1c;
}

.quote-feed-amount {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-feed-actions {
  display: flex;
  gap: 0.5rem;
}

/* Statusprick borttagen i feed — badge räcker, prickar läses som olästa notiser */
.quote-status-dot {
  display: none;
}

.quote-status-dot.sent,
.quote-status-dot.opened,
.quote-status-dot.accepted,
.quote-status-dot.rejected,
.quote-status-dot.cancelled,
.quote-status-dot.cancellation_pending,
.quote-status-dot.expired {
  background: transparent;
}

/* Notification Feed Items */
.notification-feed-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
}

.notification-feed-item:hover {
  background: var(--bg-hover);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  border-radius: 6px;
  border-bottom-color: transparent;
}

.notification-feed-item.unread {
  background: rgba(14, 165, 233, 0.02);
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
}

.notification-feed-icon {
  font-size: 1rem;
  color: var(--text-muted);
  width: auto;
  flex-shrink: 0;
}

.notification-feed-content {
  flex: 1;
  min-width: 0;
}

.notification-feed-text {
  font-size: 0.9375rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Inline Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  text-transform: lowercase;
  white-space: nowrap;
}

.badge i {
  font-size: 0.625rem;
}

.badge-category {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-location {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-time {
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
}

.badge-status {
  font-weight: 500;
}

.badge-status.sent {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-status.opened {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-status.accepted {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.badge-status.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-status.cancelled,
.badge-status.cancellation_pending {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid rgba(153, 27, 27, 0.25);
}

.badge-status.expired {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.badge-status.draft {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-status.archived {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.badge-status.signed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* "NY"-rad: en diskret accent — ingen grön wash (badge räcker) */
.quote-accepted-glow {
  position: relative;
  background: #fff;
  border-left: 3px solid #0f172a !important;
  box-shadow: none;
  overflow: hidden;
  padding-top: 1.35rem;
}

.quote-accepted-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  background: #059669;
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: none;
  z-index: 1;
  pointer-events: none;
}

/* Accepted Quotes Alert Banner */
.quote-accepted-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  animation: slideIn 0.4s ease-out;
  transition: all 0.3s ease;
}

.quote-accepted-alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
}

.alert-icon {
  font-size: 1.5rem;
  color: #047857;
  line-height: 1;
  display: flex;
  align-items: center;
}

.alert-content {
  flex: 1;
  color: #065f46;
  font-size: 0.938rem;
}

.alert-content strong {
  color: #047857;
  font-weight: 700;
  font-size: 1rem;
}

.alert-content small {
  color: #059669;
  font-size: 0.813rem;
}

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

@keyframes rotate {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

/* Feed Action Button */
.btn-feed-action {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-feed-action:hover {
  background: var(--primary-light);
  color: white;
  transform: none;
  box-shadow: none;
}

.btn-feed-action i {
  font-size: 0.875rem;
}

/* Carousel */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: var(--spacing-lg);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: var(--spacing-md);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.carousel-track::-webkit-scrollbar-track {
  background: transparent;
}

.carousel-card {
  min-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all var(--transition-base);
}

.carousel-card:hover {
  border-color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transform: none;
}

/* Project Card - Minimalist */
.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.project-card-badge {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: lowercase;
}

.project-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.project-card-meta i {
  width: 14px;
  margin-right: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Quote List - Mer kompakt */
.quote-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quote-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
}

.quote-card:hover {
  background: var(--bg-card);
  border-color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.quote-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.625rem;
}

.quote-card-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.quote-card-customer {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.quote-card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.quote-card-status.sent {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
}

.quote-card-status.accepted {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.quote-card-status.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.quote-card-status.expired {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
}

.quote-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.quote-card-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.quote-card-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.quote-card-actions {
  display: flex;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
}

/* Notification List */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notification-card {
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  display: flex;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.notification-card:hover {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.notification-card.unread {
  background: var(--bg-card);
  border-left-color: var(--accent);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9375rem;
}

.notification-icon.project {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
}

.notification-icon.quote {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.notification-icon.review {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.notification-icon.system {
  background: rgba(51, 65, 85, 0.1);
  color: var(--primary);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  line-height: 1.3;
}

.notification-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notification-actions {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.quick-action-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--text-primary);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border-color);
}

.quick-action-card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--text-secondary);
}

.quick-action-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.quick-action-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-action-description {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: var(--spacing-xs);
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: none;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-accent {
  background: var(--primary);
  color: var(--text-white);
}

.btn-accent:hover {
  background: var(--accent-light);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-full);
}

/* Verification Gate */
/* Verification Banner - Minimal */
.verification-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  animation: slideInDown 0.4s ease;
  margin-bottom: 24px;
}

.verification-banner-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-xl);
  max-width: 1400px;
  margin: 0 auto;
}

.verification-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  flex-shrink: 0;
}

.verification-banner-icon.verification-banner-warning {
  background: var(--bg-card);
  color: var(--warning);
}

.verification-banner-icon.verification-banner-info {
  background: var(--bg-card);
  color: var(--text-primary);
}

.verification-banner-icon.verification-banner-danger {
  background: var(--bg-card);
  color: var(--danger);
}

.verification-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.verification-banner-text strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #92400e;
}

.verification-banner-text span {
  font-size: 0.8125rem;
  color: #78350f;
  line-height: 1.4;
}

.verification-banner-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.3);
}

.verification-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 65, 85, 0.4);
}

.verification-banner-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(146, 64, 14, 0.1);
  border: none;
  color: #92400e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.verification-banner-close:hover {
  background: rgba(146, 64, 14, 0.2);
  transform: rotate(90deg);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.verification-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Lock Overlay */
.content-locked {
  position: relative;
  pointer-events: none;
  user-select: none;
}

.content-locked::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-locked .lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(51, 65, 85, 0.9);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.empty-state .empty-state-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: var(--spacing-md);
}

.empty-state .empty-state-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--spacing-md);
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.empty-state .empty-state-cta-row .empty-state-cta {
  margin-top: 0;
}

.empty-state .empty-state-cta:hover {
  background: #1e293b;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.empty-state .empty-state-cta:active {
  transform: scale(0.98);
}

.empty-state--error i {
  color: #dc2626;
  opacity: 0.85;
}

.empty-state-retry {
  margin-top: var(--spacing-md);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.empty-state-retry:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Partner Campaign Cards - ORIGINAL STYLES (återställda) */
#sponsorCampaignsSection.partner-campaigns {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#sponsorCampaignsSection.partner-campaigns::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 92% 10%, rgba(118, 75, 162, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 70% 90%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
  opacity: 0.9;
}

.partner-campaigns__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.partner-campaigns__titleWrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: min(520px, 100%);
}

.partner-campaigns__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  flex: 0 0 auto;
}

.partner-campaigns__title {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}

.partner-campaigns__subtitle {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.4;
}

.partner-campaigns__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.partner-campaigns__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.partner-campaigns__pill--count {
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.18);
}

.partner-campaigns__benefit {
  margin: 0.75rem 0 1.25rem;
  color: #334155;
  font-size: 0.95rem;
  max-width: 70ch;
}

.partner-campaign-card {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.partner-campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  border-color: rgba(59, 130, 246, 0.22);
}

.partner-campaign-card[onclick] {
  cursor: pointer;
}

.partner-campaign-card[onclick]:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.partner-campaign-card[onclick]:active {
  transform: translateY(-2px);
  transition: transform 80ms ease;
}

.partner-campaign-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.partner-campaign-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.partner-campaign-card__mediaLogo {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.partner-campaign-card__media--noimg .partner-campaign-card__mediaLogo {
  display: flex;
}

.partner-campaign-card__mediaLogo img {
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: saturate(1.05) contrast(1.02);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 18px;
  box-sizing: border-box;
}

.partner-campaign-card__mediaLogoFallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #64748b;
  font-weight: 900;
  font-size: 0.95rem;
}

.partner-campaign-card__mediaLogoFallback i {
  font-size: 1.6rem;
  opacity: 0.9;
}

.partner-campaign-card__partnerName {
  font-size: 0.78rem;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-campaign-card__body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 auto;
}

.partner-campaign-card__title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.partner-campaign-card__text {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.92rem * 1.5 * 3);
}

.partner-campaign-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.partner-campaign-card__metaRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.partner-campaign-card__validTo {
  font-size: 0.8rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.partner-campaign-card__validTo--empty {
  min-height: 1rem;
}

.partner-campaign-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  transition: all 150ms ease;
}

.partner-campaign-card__cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.partner-campaign-card__cta:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.partner-campaign-card__cta--disabled {
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.10);
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .partner-campaigns__benefit {
    margin-bottom: 1rem;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr 320px;
    gap: var(--spacing-lg);
  }

  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    max-height: none;
    overflow-y: visible;
  }
  
  .weather-widget {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: var(--spacing-sm);
    padding-top: 0.5rem;
  }

  .dashboard-sidebar {
    grid-template-columns: 1fr;
    max-height: none;
    overflow-y: visible;
  }
  
  .dashboard-header {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-lg);
  }

  .header-profile {
    order: -1;
  }
  
  .dashboard-header-actions {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .section-container {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .carousel-card {
    min-width: 280px;
  }
  
  .quote-card-body {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  
  .verification-modal {
    padding: var(--spacing-lg);
  }
  
  .verification-title {
    font-size: 1.5rem;
  }
  
  .verification-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .verification-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Hero stats - stack på mobil */
  .hero-stats-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-sm);
  }
  
  /* Dashboard header - kompaktare */
  .dashboard-header {
    padding: var(--spacing-md);
  }
  
  .dashboard-header-left h1 {
    font-size: 1.5rem;
  }
  
  /* Sidebar widgets - full width på mobil */
  .dashboard-sidebar {
    width: 100%;
  }
  
  .widget-card {
    margin-bottom: var(--spacing-md);
  }
  
  /* Quick actions - 2 kolumner på mobil */
  .quick-actions-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }
  
  /* Partner campaigns - 1 kolumn på mobil */
  .partner-campaigns__grid {
    grid-template-columns: 1fr !important;
  }
}

/* Utilities */
.text-center { text-align: center; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ============================================
   DARK MODE
   ============================================ */

/* ========== DARK MODE ONLY (when .dark-mode class is active) ========== */
body.dark-mode {
  background-color: #111827 !important;
  background: #111827 !important;
  background-image: none !important;
  color: #f9fafb !important;
}

body.dark-mode .dashboard-container {
  background-color: #111827 !important;
}

/* Undvik breda [style*="background…"]-selektorer — de kan färga fel ytor. */

/* Override gradient backgrounds IN DARK MODE ONLY */
body.dark-mode .stat-card {
  background: #1f2937 !important;
}

body.dark-mode .quick-action-card,
body.dark-mode .action-card {
  background: #1f2937 !important;
}

body.dark-mode .partner-campaign-card,
body.dark-mode .campaign-card {
  background: #1f2937 !important;
}

body.dark-mode .project-card,
body.dark-mode .offer-card {
  background: #1f2937 !important;
}

body.dark-mode .dashboard-header {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
  color: var(--dark-text-primary);
}

body.dark-mode .dashboard-header--hero-bg {
  background: transparent;
}

body.dark-mode .dashboard-header--hero-bg::after {
  background: linear-gradient(
    105deg,
    rgba(17, 24, 39, 0.92) 0%,
    rgba(17, 24, 39, 0.78) 40%,
    rgba(17, 24, 39, 0.45) 65%,
    rgba(17, 24, 39, 0.2) 100%
  );
}

body.dark-mode .dashboard-header--hero-bg::before {
  filter: grayscale(100%) brightness(0.55);
}

body.dark-mode .dashboard-header--hero-bg .dashboard-header-left h1,
body.dark-mode .dashboard-header--hero-bg .dashboard-header-left p {
  color: var(--dark-text-primary);
  text-shadow: none;
}

body.dark-mode .dashboard-header--hero-bg .greeting-badge {
  background: rgba(31, 41, 55, 0.9);
  color: var(--dark-text-secondary);
}

body.dark-mode .greeting-text h1,
body.dark-mode .greeting-text p {
  color: var(--dark-text-primary) !important;
}

body.dark-mode .stat-card {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .stat-value {
  color: var(--dark-text-primary);
}

body.dark-mode .stat-label {
  color: var(--dark-text-secondary);
}

body.dark-mode .stat-icon {
  background: var(--dark-bg-tertiary);
  color: var(--dark-primary);
}

body.dark-mode .recent-activity-item,
body.dark-mode .activity-item {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .activity-time {
  color: var(--dark-text-tertiary);
}

body.dark-mode .chart-container {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .dashboard-section {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .quick-action-card {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .quick-action-card:hover {
  background: var(--dark-bg-hover);
  border-color: var(--dark-border-secondary);
}

body.dark-mode .project-card {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .project-status {
  filter: brightness(1.1);
}

body.dark-mode .verification-banner {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--dark-warning);
}

body.dark-mode .partner-campaign-card,
body.dark-mode .campaign-card,
body.dark-mode .offer-card {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .campaign-title,
body.dark-mode .campaign-description,
body.dark-mode .offer-title {
  color: var(--dark-text-primary);
}

body.dark-mode .weather-widget {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .quick-actions-grid .action-card {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border-primary);
  color: var(--dark-text-primary);
}

body.dark-mode .quick-actions-grid .action-card:hover {
  background: var(--dark-bg-hover);
}

body.dark-mode .notification-item,
body.dark-mode .activity-item {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border-primary);
  color: var(--dark-text-primary);
}

/* ========== DARK MODE TEXT OVERRIDES ========== */
/* Inline color-overrides borttagna — för breda och riskabla. */

/* ========== NÄRHETSBADGES ========== */
.badge-proximity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-proximity i {
  width: 14px;
  height: 14px;
}

/* Metadata-taggar — dov ARV-stil, inte CTA/notis */
.proximity-home {
  background: rgba(22, 35, 30, 0.08);
  color: #16231E;
  border: 1px solid rgba(22, 35, 30, 0.14);
  box-shadow: none;
}

.proximity-neighbor {
  background: rgba(92, 101, 96, 0.1);
  color: #3D4540;
  border: 1px solid rgba(92, 101, 96, 0.22);
  box-shadow: none;
}

.proximity-county {
  background: rgba(199, 204, 209, 0.35);
  color: #3D4540;
  border: 1px solid rgba(199, 204, 209, 0.75);
  box-shadow: none;
}

.proximity-invited {
  background: rgba(22, 35, 30, 0.06);
  color: #16231E;
  border: 1px solid rgba(22, 35, 30, 0.12);
  box-shadow: none;
}

/* ========== EMERGENCY ALERT BANNER ========== */
.project-emergency-alert {
  border: 2px solid #ef4444 !important;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
}

body.dark-mode .project-emergency-alert {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%) !important;
  border-color: #dc2626 !important;
}

.emergency-banner {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 16px;
}

.emergency-banner > i {
  font-size: 2rem;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.emergency-content {
  flex: 1;
}

.emergency-content h4 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.emergency-content p {
  margin: 0 0 12px 0;
  opacity: 0.95;
  font-size: 0.9375rem;
}

.emergency-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-emergency-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  color: #dc2626;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.btn-emergency-help:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: #fef2f2;
}

.btn-emergency-help i {
  width: 18px;
  height: 18px;
}

.btn-emergency-quote {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9375rem;
}

.btn-emergency-quote:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ========== EMERGENCY MODAL ========== */
.emergency-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.emergency-modal .modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

body.dark-mode .emergency-modal .modal-content {
  background: var(--dark-bg-secondary);
}

.emergency-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.emergency-header i {
  font-size: 1.5rem;
}

.emergency-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.emergency-header .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emergency-header .close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.emergency-modal .modal-body {
  padding: 24px;
}

.emergency-disclaimer {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.6;
}

body.dark-mode .emergency-disclaimer {
  color: var(--dark-text-secondary);
}

.emergency-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.contact-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.contact-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  background: #f8fafc;
}

body.dark-mode .contact-card {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border-primary);
}

body.dark-mode .contact-card:hover {
  border-color: #3b82f6;
  background: var(--dark-bg-hover);
}

.contact-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: #1e293b;
}

body.dark-mode .contact-name {
  color: var(--dark-text-primary);
}

.contact-phone {
  font-size: 1.25rem;
  color: #3b82f6;
  font-weight: 600;
  margin: 8px 0;
  letter-spacing: 0.5px;
}

.contact-location {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .contact-location {
  color: var(--dark-text-secondary);
}

.emergency-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: #f0f9ff;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  margin-top: 16px;
}

body.dark-mode .emergency-note {
  background: rgba(59, 130, 246, 0.1);
}

.emergency-note i {
  flex-shrink: 0;
  margin-top: 2px;
  color: #3b82f6;
}

.emergency-note small {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

body.dark-mode .emergency-note small {
  color: var(--dark-text-secondary);
}

/* ========== URGENCY CHIP STYLING ========== */
.filter-chip.urgency-urgent {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  border-color: #f97316;
}

.filter-chip.urgency-urgent:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.filter-chip.urgency-urgent.active {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.filter-chip.urgency-urgent i {
  width: 14px;
  height: 14px;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
  .emergency-banner {
    flex-direction: column;
    gap: 12px;
  }

  .emergency-banner > i {
    font-size: 1.5rem;
  }

  .emergency-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-emergency-help,
  .btn-emergency-quote {
    width: 100%;
    justify-content: center;
  }

  .emergency-modal .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .emergency-header {
    padding: 20px;
  }

  .emergency-modal .modal-body {
    padding: 20px;
  }

  .contact-phone {
    font-size: 1.125rem;
  }
}

/* ========== PROXIMITY INFO MODAL ========== */

/* Proximity Info Modal */
.proximity-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.proximity-info-modal .modal-overlay {
  z-index: 99999;
}

.proximity-info-modal .modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  z-index: 100000;
}

body.dark-mode .proximity-info-modal .modal-content {
  background: var(--dark-bg-secondary);
}

.proximity-info-content .modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 4rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.proximity-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  flex-shrink: 0;
}

.proximity-header-icon i {
  width: 24px;
  height: 24px;
}

.proximity-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
}

.proximity-info-modal .modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fee2e2;
  border: 2px solid #ef4444;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #ef4444;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
}

.proximity-info-modal .modal-close-btn:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

.proximity-info-modal .modal-close-btn i {
  width: 20px;
  height: 20px;
}

.proximity-info-content .modal-body {
  padding: 1.5rem;
}

.info-section {
  margin-bottom: 1.5rem;
}

.info-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.info-section h3 i {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.info-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.proximity-levels {
  background: var(--bg-hover);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.proximity-levels h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.proximity-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem;
  background: white;
  border: 2px solid transparent;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

body.dark-mode .proximity-level {
  background: var(--dark-bg-card);
}

.proximity-level:last-child {
  margin-bottom: 0;
}

.proximity-level.active {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.05);
}

body.dark-mode .proximity-level.active {
  background: rgba(14, 165, 233, 0.15);
}

.level-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-hover);
  flex-shrink: 0;
}

.proximity-level.active .level-icon {
  background: var(--accent);
  color: white;
}

.level-icon i {
  width: 20px;
  height: 20px;
}

.level-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.level-info strong {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.level-info span {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.info-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
}

.info-tip i {
  width: 20px;
  height: 20px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-tip p {
  margin: 0;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Klickbar badge — info, inte CTA */
.badge-proximity.clickable {
  cursor: help;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.badge-proximity.clickable:hover {
  transform: none;
  box-shadow: none;
  background: rgba(22, 35, 30, 0.12);
  border-color: rgba(22, 35, 30, 0.2);
}

.badge-proximity .info-icon {
  width: 14px;
  height: 14px;
  margin-left: 0.25rem;
  opacity: 0.55;
}

/* No campaigns placeholder - från inline till CSS */
#noCampaignsPlaceholder {
  display: none;
  text-align: center;
  padding: 1.5rem 1rem;
}

.no-campaigns-inner {
  max-width: 400px;
  margin: 0 auto;
}

.no-campaigns-icon {
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.no-campaigns-icon i {
  width: 24px;
  height: 24px;
  color: #94a3b8;
}

.no-campaigns-title {
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 0.5rem 0;
}

.no-campaigns-text {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.no-campaigns-contact {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.no-campaigns-contact p {
  color: #94a3b8;
  font-size: 0.8125rem;
  margin: 0 0 0.375rem 0;
}

.no-campaigns-contact a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}

.no-campaigns-contact a i {
  width: 13px;
  height: 13px;
}

/* ============================================
   ARV visual polish — scoped to company-dashboard only
   Brand: skogsgrön / varm off-white / silver / soft black
   No layout/JS/copy changes. Logo insertion = fas 2.
   ============================================ */
body.company-dashboard-page,
body.company-page {
  --arv-forest: #16231E;
  --arv-forest-hover: #1B2A24;
  --arv-offwhite: #F2EFE9;
  --arv-offwhite-card: #FBFaf7;
  --arv-soft-black: #0F1112;
  --arv-silver: #C7CCD1;
  --arv-silver-border: rgba(199, 204, 209, 0.65);
  --arv-muted: #5C6560;
  --arv-success: #2F6B4F;
  --arv-warning: #B45309;
  --arv-danger: #B42318;

  --primary: var(--arv-forest);
  --primary-light: var(--arv-forest-hover);
  --secondary: var(--arv-muted);
  --accent: var(--arv-forest);
  --accent-light: var(--arv-forest-hover);
  --success: var(--arv-success);
  --success-light: #3D8A64;
  --warning: var(--arv-warning);
  --danger: var(--arv-danger);

  --bg-primary: var(--arv-offwhite-card);
  --bg-secondary: var(--arv-offwhite);
  --bg-tertiary: #EAE6DF;
  --bg-card: var(--arv-offwhite-card);
  --bg-hover: #EAE6DF;
  --bg-active: #E3DED6;

  --text-primary: var(--arv-soft-black);
  --text-secondary: var(--arv-muted);
  --text-muted: #8A928C;
  --text-white: #ffffff;

  --border-color: var(--arv-silver-border);
  --border-light: rgba(199, 204, 209, 0.4);

  --shadow-sm: 0 1px 2px rgba(15, 15, 16, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 15, 16, 0.05);
  --shadow-lg: 0 10px 28px rgba(15, 15, 16, 0.06);
  --shadow-xl: 0 18px 40px rgba(15, 15, 16, 0.08);

  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.125rem;
  --radius-2xl: 1.5rem;

  --company-cta: var(--arv-forest);
  --company-cta-hover: var(--arv-forest-hover);
  --company-text: var(--arv-soft-black);
  --company-text-muted: var(--arv-muted);
  --company-border: var(--arv-silver-border);
  --company-bg: var(--arv-offwhite-card);
  --company-bg-subtle: var(--arv-offwhite);
  --company-success: var(--arv-success);
  --company-warning: var(--arv-warning);
  --company-danger: var(--arv-danger);

  background: var(--arv-offwhite) !important;
  background-color: var(--arv-offwhite) !important;
  background-image: none !important;
  color: var(--arv-soft-black);
  letter-spacing: -0.01em;
}

body.company-dashboard-page.dark-mode,
body.company-page.dark-mode {
  --arv-forest: #C7CCD1;
  --arv-forest-hover: #E8EBEE;
  --arv-offwhite: #121614;
  --arv-offwhite-card: #1A201C;
  --arv-soft-black: #F2EFE9;
  --arv-silver: #5A635C;
  --arv-silver-border: rgba(199, 204, 209, 0.18);
  --arv-muted: #A8B0AA;
  --arv-success: #4ADE80;
  --arv-warning: #FBBF24;
  --arv-danger: #F87171;

  --primary: #E8EBEE;
  --primary-light: #F2EFE9;
  --secondary: #2A322E;
  --accent: #C7CCD1;
  --accent-light: #E8EBEE;

  --bg-primary: #121614;
  --bg-secondary: #121614;
  --bg-tertiary: #243028;
  --bg-card: #1A201C;
  --bg-hover: #243028;
  --bg-active: #2E3832;

  --text-primary: #F2EFE9;
  --text-secondary: #C7CCD1;
  --text-muted: #8A928C;

  --border-color: rgba(199, 204, 209, 0.18);
  --border-light: rgba(199, 204, 209, 0.12);

  --company-cta: #E8EBEE;
  --company-cta-hover: #F2EFE9;
  --company-cta-text: #0F0F10;
  --company-text: #F2EFE9;
  --company-text-muted: #A8B0AA;
  --company-border: rgba(199, 204, 209, 0.18);
  --company-bg: #1A201C;
  --company-bg-subtle: #121614;

  background: #121614 !important;
  background-color: #121614 !important;
}

body.company-dashboard-page .dashboard-container {
  /* Shell-max ~1600: innehållet centreras, stretchar inte på ultrawide */
  background-color: transparent;
  width: 100%;
  max-width: var(--arv-shell-max, 1600px);
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--arv-pad-y, 1rem);
  padding-bottom: calc(var(--arv-pad-y, 1rem) + 1.25rem);
  padding-left: var(--arv-pad-x, 1.5rem);
  padding-right: var(--arv-pad-x, 1.5rem);
  box-sizing: border-box;
}

body.company-dashboard-page .dashboard-header {
  border-radius: 1.25rem;
  border-color: transparent;
  margin-bottom: 1.25rem;
  box-shadow: none;
}

body.company-dashboard-page .dashboard-header--hero-bg {
  padding-top: clamp(1.35rem, 2.4vw, 2rem);
  padding-bottom: clamp(1.35rem, 2.4vw, 2rem);
  /* Inre padding som sektionskort — yttre luft kommer från dashboard-container */
  padding-left: 1.35rem;
  padding-right: 1.35rem;
  min-height: 0;
  border: 1px solid rgba(27, 45, 38, 0.1);
  box-sizing: border-box;
}

body.company-dashboard-page .dashboard-header--hero-bg::before {
  background-color: var(--arv-forest);
  filter: grayscale(55%) contrast(1.05) brightness(0.72);
}

body.company-dashboard-page .dashboard-header--hero-bg::after {
  background: linear-gradient(
    105deg,
    rgba(27, 45, 38, 0.88) 0%,
    rgba(27, 45, 38, 0.72) 38%,
    rgba(27, 45, 38, 0.38) 62%,
    rgba(15, 15, 16, 0.22) 100%
  );
}

body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left h1,
body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left p {
  color: #F2EFE9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left p {
  color: rgba(242, 239, 233, 0.82);
  text-shadow: none;
}

/* Variant B: ingen greeting-pill */
body.company-dashboard-page .dashboard-header--brand-hero .greeting-badge,
body.company-dashboard-page .dashboard-header--hero-bg .greeting-badge {
  display: none !important;
}

body.company-dashboard-page .dashboard-header--hero-bg .plan-badge span,
body.company-dashboard-page .dashboard-header--hero-bg .badge-enterprise,
body.company-dashboard-page .dashboard-header--hero-bg .badge-trial,
body.company-dashboard-page .dashboard-header--hero-bg .badge-free,
body.company-dashboard-page .dashboard-header--hero-bg .badge-basic,
body.company-dashboard-page .dashboard-header--hero-bg .badge-pro {
  background: rgba(242, 239, 233, 0.92);
  color: var(--arv-forest);
  border: 1px solid rgba(199, 204, 209, 0.55);
  box-shadow: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  font-weight: 700;
}

body.company-dashboard-page .dashboard-header--hero-bg .company-initials {
  background: rgba(242, 239, 233, 0.92);
  color: var(--arv-forest);
  border: 1px solid rgba(199, 204, 209, 0.5);
}

body.company-dashboard-page .hero-stats-grid {
  margin-bottom: 2rem;
}

body.company-dashboard-page .stats-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

body.company-dashboard-page .stat-row {
  padding: 0.9rem 1.15rem;
  gap: 1rem;
  border-bottom-color: var(--border-light);
}

body.company-dashboard-page .stat-row:hover {
  background: rgba(27, 45, 38, 0.035);
}

body.company-dashboard-page .stat-icon-neutral {
  background: #EAE6DF;
}

body.company-dashboard-page .stat-icon-neutral svg {
  color: var(--arv-forest);
}

body.company-dashboard-page .section-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.85rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

body.company-dashboard-page .section-header,
body.company-dashboard-page .quotes-section-header,
body.company-dashboard-page .projects-section-header {
  border-bottom-color: var(--border-light);
}

body.company-dashboard-page .quotes-section-title,
body.company-dashboard-page .projects-section-title,
body.company-dashboard-page .section-title {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.015em;
}

body.company-dashboard-page .quotes-section-subtitle,
body.company-dashboard-page .projects-section-subtitle {
  color: var(--text-secondary);
}

body.company-dashboard-page .quotes-view-all-btn,
body.company-dashboard-page .projects-view-all-btn {
  border-radius: 9999px;
  border-color: var(--border-color);
  color: var(--text-primary);
  background: transparent;
}

body.company-dashboard-page .quotes-view-all-btn:hover,
body.company-dashboard-page .projects-view-all-btn:hover {
  background: var(--bg-hover);
  border-color: var(--arv-silver);
}

body.company-dashboard-page .widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.35rem;
}

body.company-dashboard-page .widget-header {
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

body.company-dashboard-page .widget-header i {
  color: var(--arv-forest);
}

body.company-dashboard-page .widget-header h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.company-dashboard-page .quick-actions-list {
  gap: 0.55rem;
}

body.company-dashboard-page .quick-action-item {
  border-radius: 9999px;
  padding: 0.8rem 1rem;
  border-color: var(--border-color);
  background: var(--bg-card);
  transform: none;
}

body.company-dashboard-page .quick-action-item:hover {
  transform: none;
  background: var(--bg-hover);
  border-color: var(--arv-silver);
}

body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked) {
  background: var(--arv-forest);
  border-color: var(--arv-forest);
  color: #F2EFE9;
  box-shadow: 0 6px 18px rgba(27, 45, 38, 0.18);
}

body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked) i {
  color: #F2EFE9;
}

body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked):hover {
  background: var(--arv-forest-hover);
  border-color: var(--arv-forest-hover);
  color: #F2EFE9;
}

body.company-dashboard-page.dark-mode .quick-action-item[data-feature="quote"]:not(.locked) {
  background: #E8EBEE;
  border-color: #E8EBEE;
  color: #0F0F10;
}

body.company-dashboard-page.dark-mode .quick-action-item[data-feature="quote"]:not(.locked) i {
  color: #0F0F10;
}

body.company-dashboard-page .quick-action-item.coming-soon {
  background: #EAE6DF;
  border-color: var(--border-color);
  color: var(--arv-muted);
}

body.company-dashboard-page .quick-action-item.coming-soon:hover {
  background: #EAE6DF;
  border-color: var(--border-color);
  color: var(--arv-muted);
}

body.company-dashboard-page .project-tab {
  border-radius: 9999px;
  border-color: var(--border-color);
}

body.company-dashboard-page .project-tab.active {
  background: var(--arv-forest);
  border-color: var(--arv-forest);
  color: #F2EFE9;
}

body.company-dashboard-page .filter-select,
body.company-dashboard-page .sort-toggle,
body.company-dashboard-page .project-filters-toggle {
  border-radius: 0.75rem;
  border-color: var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
}

body.company-dashboard-page .feed-item,
body.company-dashboard-page .quote-card,
body.company-dashboard-page .project-card {
  border-color: var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

body.company-dashboard-page .no-campaigns-contact a {
  color: var(--arv-forest);
}

body.company-dashboard-page .partner-campaigns,
body.company-dashboard-page .bg-white.partner-campaigns {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm) !important;
}

/* ============================================
   ARV rhythm + viewport system
   Proportioner, whitespace, balans — ingen smal container
   Avsiktlig responsivitet per desktop-storlek
   ============================================ */

body.company-dashboard-page {
  --arv-space-1: 0.5rem;
  --arv-space-2: 0.75rem;
  --arv-space-3: 1rem;
  --arv-space-4: 1.25rem;
  --arv-space-5: 1.5rem;
  --arv-space-6: 2rem;
  /* Laptop-first: shell-max + measure-baserade moduler */
  --arv-pad-x: 2rem;
  --arv-pad-y: 1rem;
  --arv-gap: 1.05rem;
  --arv-sidebar: 280px;
  --arv-stat-value: 1.0625rem;
  --arv-hero-title: 1.55rem;
  --arv-shell-max: 1600px;
  --arv-quotes-measure: 46rem;
}

/* Fluid main grid — sidebar från laptop-bredd så ytan inte blir tom */
body.company-dashboard-page .dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--arv-gap);
  align-items: start;
  width: 100%;
}

@media (min-width: 1025px) {
  body.company-dashboard-page .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) var(--arv-sidebar);
  }

  body.company-dashboard-page .dashboard-main {
    display: flex;
    flex-direction: column;
  }

  body.company-dashboard-page .dashboard-sidebar {
    display: flex;
    flex-direction: column;
    /* Sticky OK — men ingen egen scroll (den fångade sidans scroll) */
    position: sticky;
    top: calc(var(--header-height, 69px) + 1rem);
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }
}

body.company-dashboard-page .dashboard-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--arv-gap);
  container-type: inline-size;
  container-name: dash-main;
}

body.company-dashboard-page .dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--arv-gap);
  position: static;
  top: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}

/* Hero: integrerad yta, inte fristående “marketing-kort” */
body.company-dashboard-page .dashboard-header {
  margin-bottom: 0;
  width: 100%;
}

body.company-dashboard-page .dashboard-header--hero-bg {
  border-radius: 1.15rem;
}

body.company-dashboard-page .dashboard-header--hero-bg::after {
  background: linear-gradient(
    100deg,
    rgba(27, 45, 38, 0.9) 0%,
    rgba(27, 45, 38, 0.78) 42%,
    rgba(27, 45, 38, 0.42) 68%,
    rgba(15, 15, 16, 0.28) 100%
  );
}

body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left h1 {
  font-size: var(--arv-hero-title);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.company-dashboard-page .dashboard-header--hero-bg .dashboard-header-left p {
  font-size: 0.9rem;
  margin-top: 0.35rem;
  opacity: 0.9;
}

body.company-dashboard-page .dashboard-header--hero-bg .greeting-badge {
  display: none !important;
}

/* Stats: hierarki och jämn radrytm */
body.company-dashboard-page .hero-stats-grid {
  margin-bottom: 0;
  width: 100%;
}

body.company-dashboard-page .stats-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.15rem;
  box-shadow: none;
}

body.company-dashboard-page .stat-row {
  padding: 0.95rem 1.2rem;
  gap: 0.85rem;
  min-height: 3.35rem;
  border-bottom-color: var(--border-light);
}

body.company-dashboard-page .stat-row-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

body.company-dashboard-page .stat-row-value {
  font-size: var(--arv-stat-value);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

body.company-dashboard-page .stat-row-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 4.5rem;
}

body.company-dashboard-page .stat-row-icon {
  width: 2.25rem;
  height: 2.25rem;
}

body.company-dashboard-page .stat-row-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

/* Stats: 2 kolumner först när main har plats — annars en ren kortlista */
@media (min-width: 1024px) {
  body.company-dashboard-page .stats-compact {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    box-shadow: none;
    overflow: hidden;
  }

  body.company-dashboard-page .stat-row {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 0.95rem 1.25rem;
  }

  body.company-dashboard-page .stat-row:last-child {
    border-bottom: none;
  }

  body.company-dashboard-page .stat-row:nth-child(odd),
  body.company-dashboard-page .stat-row:nth-child(even) {
    border-right: none;
  }

  body.company-dashboard-page .stat-row:nth-child(1),
  body.company-dashboard-page .stat-row:nth-child(2) {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  body.company-dashboard-page .stat-row:hover {
    background: rgba(27, 45, 38, 0.028);
  }
}

@media (min-width: 1280px) {
  body.company-dashboard-page .stats-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--arv-gap);
    row-gap: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    border-radius: 0;
  }

  body.company-dashboard-page .stat-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.95rem 1.2rem;
    grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, auto) minmax(0, 5.5rem);
    gap: 0.55rem 0.65rem;
  }

  body.company-dashboard-page .stat-row:nth-child(odd) {
    border-right: none;
  }

  body.company-dashboard-page .stat-row:nth-child(even) {
    border-right: 1px solid var(--border-color);
  }

  /* Vänster kort: rad 1,3,5… */
  body.company-dashboard-page .stat-row:nth-child(1) {
    border-top-left-radius: 1.15rem;
    border-top-right-radius: 1.15rem;
  }

  body.company-dashboard-page .stat-row:nth-child(2) {
    border-top-left-radius: 1.15rem;
    border-top-right-radius: 1.15rem;
  }

  body.company-dashboard-page .stat-row:nth-last-child(2):nth-child(odd),
  body.company-dashboard-page .stat-row:nth-last-child(1):nth-child(even),
  body.company-dashboard-page .stat-row:last-child:nth-child(odd) {
    border-bottom: 1px solid var(--border-color);
    border-bottom-left-radius: 1.15rem;
    border-bottom-right-radius: 1.15rem;
  }

  body.company-dashboard-page .stat-row-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.company-dashboard-page .stat-row-meta {
    min-width: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 5.5rem;
  }
}

/* Sektioner & sidebar: samma kortspråk */
body.company-dashboard-page .section-container,
body.company-dashboard-page .widget-card {
  margin-bottom: 0;
  padding: 1.35rem 1.45rem;
  border-radius: 1.15rem;
  border: 1px solid var(--border-color);
  box-shadow: none;
  background: var(--bg-card);
}

body.company-dashboard-page .quotes-section-header,
body.company-dashboard-page .projects-section-header,
body.company-dashboard-page .section-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

body.company-dashboard-page .quotes-section-title,
body.company-dashboard-page .projects-section-title,
body.company-dashboard-page .section-title,
body.company-dashboard-page .widget-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

body.company-dashboard-page .quotes-section-subtitle,
body.company-dashboard-page .projects-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

body.company-dashboard-page .widget-header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-light);
}

body.company-dashboard-page .widget-header i {
  color: var(--arv-forest);
  opacity: 0.85;
}

body.company-dashboard-page .feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

body.company-dashboard-page .quick-actions-list {
  gap: 0.45rem;
}

body.company-dashboard-page .quick-action-item {
  min-height: 2.75rem;
  padding: 0.7rem 0.95rem;
}

button.quick-action-item {
  width: 100%;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: inherit;
}

body.company-dashboard-page #dashboardThemeToggle.is-dark-active {
  border-color: rgba(27, 45, 38, 0.28);
  background: rgba(27, 45, 38, 0.06);
}

body.company-dashboard-page .partner-campaigns,
body.company-dashboard-page .bg-white.partner-campaigns {
  margin-bottom: 0 !important;
  border-radius: 1.15rem !important;
  box-shadow: none !important;
}

/* Skärmklasser: generös sidluft som följer viewport — containern växer innanför */
/* OBS: 768–1024 = kompakt (bottennav) — en kolumn, minimalt innehåll (ingen 2-kolumn-stats) */
@media (min-width: 768px) and (max-width: 1024px) {
  body.company-dashboard-page {
    --arv-pad-x: clamp(1.75rem, 4vw, 2.5rem);
    --arv-pad-y: 0.9rem;
    --arv-gap: 1rem;
  }

  body.company-dashboard-page .dashboard-layout {
    grid-template-columns: 1fr;
  }

  /* Stats: EN kolumn — 2-kolumn kläms sönder här */
  body.company-dashboard-page .stats-compact {
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 1.15rem !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.company-dashboard-page .stat-row {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    border-radius: 0 !important;
    padding: 0.85rem 1rem !important;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto !important;
    gap: 0.65rem !important;
  }

  body.company-dashboard-page .stat-row:last-child {
    border-bottom: none !important;
  }

  body.company-dashboard-page .stat-row-meta {
    display: none !important;
  }

  body.company-dashboard-page .stat-row-value {
    font-size: 0.9375rem !important;
    text-align: right;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Partner: en rad + sidescroll (inte 2-kolumn wrap) */
  body.company-dashboard-page #sponsorCampaignsGrid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 0.75rem !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
  }

  body.company-dashboard-page #sponsorCampaignsGrid > * {
    flex: 0 0 min(15.5rem, 72vw) !important;
    width: min(15.5rem, 72vw) !important;
    min-width: min(15.5rem, 72vw) !important;
    max-width: min(15.5rem, 72vw) !important;
    scroll-snap-align: start;
  }

  /* Offerter: en kolumn */
  body.company-dashboard-page #quotesList .quotes-compact-feed {
    display: flex !important;
    flex-direction: column !important;
  }

  body.company-dashboard-page #quotesList .quote-accepted-alert {
    grid-column: auto !important;
  }

  body.company-dashboard-page .dashboard-sidebar {
    grid-template-columns: 1fr !important;
  }
}

/* ≤1279: minimalt — dölj meta, undvik krock värde↔detalj */
@media (max-width: 1279px) {
  body.company-dashboard-page .stat-row {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto !important;
    gap: 0.65rem !important;
  }

  body.company-dashboard-page .stat-row-meta {
    display: none !important;
  }

  body.company-dashboard-page .stat-row-value {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.company-dashboard-page .partner-campaigns__titleWrap {
    min-width: 0 !important;
    flex: 1 1 12rem;
  }

  body.company-dashboard-page .partner-campaigns__header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  body.company-dashboard-page .partner-campaigns__meta {
    width: 100%;
  }
}

/* ≤1024: offertrader staplas — titel/kund vs badge/pris får inte kriga */
@media (max-width: 1024px) {
  body.company-dashboard-page #quotesList .quote-feed-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "main amount"
      "badge badge" !important;
    gap: 0.35rem 0.75rem !important;
    align-items: start !important;
    padding: 0.85rem 0.9rem !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-main {
    grid-area: main !important;
    min-width: 0 !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-title {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-customer {
    display: block !important;
    margin-left: 0 !important;
    margin-top: 0.15rem !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-item .badge-status {
    grid-area: badge !important;
    justify-self: start !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-amount {
    grid-area: amount !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }

  body.company-dashboard-page #quotesList .quote-feed-actions {
    display: none !important;
  }

  body.company-dashboard-page .quotes-section-header {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
}

/* Laptop (~13–15") */
@media (min-width: 1025px) and (max-width: 1439px) {
  body.company-dashboard-page {
    --arv-pad-x: 2rem;
    --arv-pad-y: 1rem;
    --arv-sidebar: 280px;
    --arv-gap: 1.05rem;
    --arv-hero-title: 1.55rem;
    --arv-stat-value: 1.0625rem;
  }
}

/* Desktop ~1440–1919 */
@media (min-width: 1440px) and (max-width: 1919px) {
  body.company-dashboard-page {
    --arv-pad-x: 2.25rem;
    --arv-pad-y: 1.1rem;
    --arv-sidebar: 300px;
    --arv-gap: 1.15rem;
    --arv-hero-title: 1.7rem;
    --arv-stat-value: 1.075rem;
  }
}

/* Full HD 1920+ — shell 1600px, måttlig inre padding */
@media (min-width: 1920px) {
  body.company-dashboard-page {
    --arv-pad-x: 2.5rem;
    --arv-pad-y: 1.2rem;
    --arv-sidebar: 320px;
    --arv-gap: 1.2rem;
    --arv-hero-title: 1.85rem;
    --arv-stat-value: 1.1rem;
  }
}

/* ≤1024 (bottennav): snabbåtgärder högst upp — 2-kolumns app-knappar i ARV-färger */
@media (max-width: 1024px) {
  body.company-dashboard-page .dashboard-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--arv-gap);
    width: 100% !important;
  }

  body.company-dashboard-page .dashboard-main,
  body.company-dashboard-page .dashboard-sidebar {
    display: contents !important;
  }

  body.company-dashboard-page .quick-actions-widget,
  body.company-dashboard-page #heroStatsGrid,
  body.company-dashboard-page #quotesSection,
  body.company-dashboard-page .dashboard-modules-grid,
  body.company-dashboard-page .section-container,
  body.company-dashboard-page .widget-card,
  body.company-dashboard-page .partner-campaigns {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.company-dashboard-page .quick-actions-widget {
    order: -40 !important;
    margin-bottom: 0;
    background: var(--bg-card, #FBFaf7) !important;
    color: var(--text-primary, #0F0F10) !important;
    border: 1px solid var(--border-color, rgba(199, 204, 209, 0.65)) !important;
    border-radius: 1.15rem !important;
    padding: 1rem 1rem 1.1rem !important;
    box-shadow: none !important;
  }

  body.company-dashboard-page #heroStatsGrid {
    order: -30 !important;
  }

  body.company-dashboard-page #quotesSection {
    order: -20 !important;
  }

  body.company-dashboard-page .dashboard-modules-grid {
    order: -10 !important;
  }

  body.company-dashboard-page .weather-widget,
  body.company-dashboard-page .tips-widget,
  body.company-dashboard-page .activity-widget {
    order: 40 !important;
  }

  body.company-dashboard-page .quick-actions-widget .widget-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light, rgba(199, 204, 209, 0.4)) !important;
    color: var(--text-primary, #0F0F10) !important;
  }

  body.company-dashboard-page .quick-actions-widget .widget-header h3 {
    color: var(--text-primary, #0F0F10) !important;
    font-size: 1.05rem !important;
  }

  body.company-dashboard-page .quick-actions-widget .widget-header i {
    color: var(--arv-forest, #1B2D26) !important;
  }

  body.company-dashboard-page .quick-actions-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    overflow: visible !important;
    width: 100% !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
  }

  body.company-dashboard-page .quick-action-item {
    position: relative !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.45rem !important;
    min-height: 5.5rem !important;
    padding: 1rem 0.65rem !important;
    border-radius: 0.9rem !important;
    white-space: normal !important;
    transform: none !important;
    background: var(--bg-secondary, #F2EFE9) !important;
    border: 1px solid var(--border-color, rgba(199, 204, 209, 0.65)) !important;
    color: var(--text-primary, #0F0F10) !important;
    box-shadow: none !important;
  }

  body.company-dashboard-page .quick-action-item:hover,
  body.company-dashboard-page .quick-action-item:active {
    transform: none !important;
    background: #EAE6DF !important;
    border-color: rgba(27, 45, 38, 0.22) !important;
  }

  body.company-dashboard-page .quick-action-item i:first-child {
    width: 1.65rem !important;
    height: 1.65rem !important;
    margin-bottom: 0.15rem !important;
    flex-shrink: 0;
    color: var(--arv-forest, #1B2D26) !important;
  }

  body.company-dashboard-page .quick-action-item span:not(.meeting-count-badge):not(.coming-soon-label):not(.coming-soon-badge) {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    color: var(--text-primary, #0F0F10) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }

  body.company-dashboard-page .quick-action-item .feature-lock {
    position: absolute !important;
    top: 0.45rem !important;
    right: 0.45rem !important;
    width: 0.85rem !important;
    height: 0.85rem !important;
    margin: 0 !important;
    color: var(--arv-muted, #5C6560) !important;
  }

  body.company-dashboard-page .quick-action-item .meeting-count-badge {
    position: absolute !important;
    top: 0.35rem !important;
    right: 0.35rem !important;
  }

  body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked) {
    background: var(--arv-forest, #1B2D26) !important;
    border-color: var(--arv-forest, #1B2D26) !important;
    color: #F2EFE9 !important;
    box-shadow: none !important;
  }

  body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked) i:first-child,
  body.company-dashboard-page .quick-action-item[data-feature="quote"]:not(.locked) span {
    color: #F2EFE9 !important;
  }

  body.company-dashboard-page .quick-action-item.locked,
  body.company-dashboard-page .quick-action-item.coming-soon {
    background: #EAE6DF !important;
    border-color: var(--border-color, rgba(199, 204, 209, 0.65)) !important;
    color: var(--arv-muted, #5C6560) !important;
    opacity: 1;
  }

  body.company-dashboard-page .quick-action-item.locked i:first-child,
  body.company-dashboard-page .quick-action-item.locked span,
  body.company-dashboard-page .quick-action-item.coming-soon i:first-child,
  body.company-dashboard-page .quick-action-item.coming-soon span {
    color: var(--arv-muted, #5C6560) !important;
  }
}

/* Header chrome flyttad till header-modern.css (body.company-page) */

body.company-dashboard-page {
  /* Partner: min-measure för 3 kort när den delar rad */
  --arv-partner-card: 16.25rem;
  --arv-partner-gap: 0.85rem;
  --arv-partner-pad-x: 2.6rem;
  --arv-partner-measure: calc(
    (3 * var(--arv-partner-card)) + (2 * var(--arv-partner-gap)) + var(--arv-partner-pad-x)
  );
  --arv-projects-min: 28rem;
  --arv-project-card-min: 20rem;
  --arv-quotes-measure: 46rem;
}

@media (min-width: 1025px) and (max-width: 1439px) {
  body.company-dashboard-page {
    --arv-partner-card: 15.75rem;
    --arv-projects-min: 26rem;
  }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  body.company-dashboard-page {
    --arv-partner-card: 16.25rem;
    --arv-partner-gap: 1rem;
    --arv-projects-min: 28rem;
  }
}

@media (min-width: 1920px) {
  body.company-dashboard-page {
    --arv-partner-card: 17rem;
    --arv-partner-gap: 1.1rem;
    --arv-partner-pad-x: 2.8rem;
    --arv-projects-min: 30rem;
    --arv-project-card-min: 19rem;
  }
}

body.company-dashboard-page #quotesSection {
  width: 100%;
  min-width: 0;
  container-type: inline-size;
  container-name: quotes-module;
}

/* Offerter: fyll sektionen — ingen smal measure som lämnar tom yta */
body.company-dashboard-page #quotesSection .feed-list,
body.company-dashboard-page #quotesList.feed-list,
body.company-dashboard-page #quotesList .quotes-compact-feed {
  width: 100%;
  max-width: 100%;
}

body.company-dashboard-page #quotesList .quotes-compact-feed {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

body.company-dashboard-page #quotesList .quote-accepted-alert {
  width: 100%;
  box-sizing: border-box;
}

body.company-dashboard-page #quotesList .quote-feed-item {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  /* Titel | badge | pris | åtgärd — samma kolumner på varje rad */
  grid-template-columns: minmax(0, 1fr) 7.5rem 6.75rem 2.5rem;
  gap: 0.75rem 1rem;
  align-items: center;
  min-height: 3.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  background: #FAF9F6;
}

body.company-dashboard-page #quotesList .quote-feed-item:hover {
  transform: none;
  margin: 0;
  padding-left: 1rem;
  padding-right: 1rem;
  background: #FFFFFF;
  box-shadow: none;
}

body.company-dashboard-page #quotesList .quote-feed-main {
  min-width: 0;
  overflow: hidden;
}

body.company-dashboard-page #quotesList .quote-feed-title,
body.company-dashboard-page #quotesList .quote-feed-customer {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.company-dashboard-page #quotesList .quote-feed-item .badge-status {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  padding: 0.3rem 0.55rem;
  box-sizing: border-box;
}

body.company-dashboard-page #quotesList .quote-feed-amount {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
  font-weight: 600;
}

body.company-dashboard-page #quotesList .quote-feed-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  justify-self: end;
}

body.company-dashboard-page #quotesList .quote-feed-actions .btn-feed-action {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  flex-shrink: 0;
}

body.company-dashboard-page #quotesList .quote-feed-actions-spacer {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

/* Stora skärmar: två kolumner med offertrader — fyller ytan smart */
@container quotes-module (min-width: 64rem) {
  body.company-dashboard-page #quotesList .quotes-compact-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
  }

  body.company-dashboard-page #quotesList .quote-accepted-alert {
    grid-column: 1 / -1;
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 1400px) {
    body.company-dashboard-page #quotesList .quotes-compact-feed {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.75rem;
    }

    body.company-dashboard-page #quotesList .quote-accepted-alert {
      grid-column: 1 / -1;
    }
  }
}

/* Default: alltid staplade — Partner överst, Projekt under (som från början) */
body.company-dashboard-page .dashboard-modules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--arv-gap, 1.05rem);
  width: 100%;
  align-items: start;
  justify-items: stretch;
}

body.company-dashboard-page .dashboard-modules-grid > #sponsorCampaignsSection,
body.company-dashboard-page .dashboard-modules-grid > #projectsSection {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  align-self: start;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  container-type: inline-size;
}

body.company-dashboard-page .dashboard-modules-grid > #sponsorCampaignsSection {
  container-name: partner-module;
}

body.company-dashboard-page .dashboard-modules-grid > #projectsSection {
  container-name: projects-module;
}

/* Partnerkampanjer: 3 kort på en rad när det får plats */
body.company-dashboard-page #sponsorCampaignsGrid {
  display: grid !important;
  width: 100%;
  max-width: 100%;
  gap: var(--arv-partner-gap, 0.85rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  align-content: start;
}

/* För smalt för 3 kort → en rad + sidescroll (aldrig wrap med ensamt kort under) */
@container partner-module (max-width: 52rem) {
  body.company-dashboard-page #sponsorCampaignsGrid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 0.75rem !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
  }

  body.company-dashboard-page #sponsorCampaignsGrid > * {
    flex: 0 0 min(15.5rem, 72vw) !important;
    width: min(15.5rem, 72vw) !important;
    min-width: min(15.5rem, 72vw) !important;
    max-width: min(15.5rem, 72vw) !important;
    scroll-snap-align: start;
  }
}

body.company-dashboard-page .partner-campaign-card {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: auto;
  box-shadow: none;
  border-color: var(--border-color);
}

body.company-dashboard-page .partner-campaign-card:hover {
  border-color: rgba(27, 45, 38, 0.22);
  box-shadow: var(--shadow-sm);
}

/* Partnerkampanjer — kompakt på mobil/tablett */
@media (max-width: 1024px) {
  body.company-dashboard-page #sponsorCampaignsSection.partner-campaigns,
  body.company-dashboard-page #sponsorCampaignsSection.bg-white {
    padding: 1rem 1.1rem !important;
  }

  body.company-dashboard-page .partner-campaigns__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  body.company-dashboard-page .partner-campaigns__title {
    font-size: 1.15rem !important;
    font-weight: 700;
  }

  body.company-dashboard-page .partner-campaigns__subtitle {
    font-size: 0.8125rem !important;
    margin-top: 0.2rem;
  }

  body.company-dashboard-page .partner-campaigns__benefit {
    font-size: 0.8125rem;
    line-height: 1.4;
    margin: 0.45rem 0 0.85rem;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.company-dashboard-page .partner-campaigns__pill {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }

  body.company-dashboard-page .partner-campaign-card {
    border-radius: 12px;
    transform: none;
  }

  body.company-dashboard-page .partner-campaign-card:hover {
    transform: none;
  }

  body.company-dashboard-page .partner-campaign-card__media {
    aspect-ratio: 2.2 / 1;
  }

  body.company-dashboard-page .partner-campaign-card__body {
    padding: 0.7rem 0.8rem 0.85rem;
    gap: 0.35rem;
  }

  body.company-dashboard-page .partner-campaign-card__partnerName {
    font-size: 0.68rem;
  }

  body.company-dashboard-page .partner-campaign-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
  }

  body.company-dashboard-page .partner-campaign-card__text {
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    min-height: 0;
  }

  body.company-dashboard-page .partner-campaign-card__footer {
    gap: 0.45rem;
  }

  body.company-dashboard-page .partner-campaign-card__validTo {
    font-size: 0.72rem;
  }

  body.company-dashboard-page .partner-campaign-card__cta {
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 10px;
    min-height: 2.5rem;
  }

  /* Viewport ≤1024: always sidescroll (fallback om container query saknas) */
  body.company-dashboard-page #sponsorCampaignsGrid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 0.75rem !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
  }

  body.company-dashboard-page #sponsorCampaignsGrid > * {
    flex: 0 0 min(15.5rem, 72vw) !important;
    width: min(15.5rem, 72vw) !important;
    min-width: min(15.5rem, 72vw) !important;
    max-width: min(15.5rem, 72vw) !important;
    scroll-snap-align: start;
  }
}

body.company-dashboard-page #projectsSection .feed-list,
body.company-dashboard-page #projectsCarousel.feed-list {
  display: grid;
  /* auto-fit: 3 kort växer och fyller raden — ingen tom rest till höger */
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, var(--arv-project-card-min, 18rem)), 1fr)
  );
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  align-content: start;
  justify-content: stretch;
}

/* Exakt 3 kort på bred yta: jämn tredelning */
@container projects-module (min-width: 56rem) {
  body.company-dashboard-page #projectsSection .feed-list,
  body.company-dashboard-page #projectsCarousel.feed-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--arv-gap, 1.05rem);
  }
}

@container projects-module (max-width: 28rem) {
  body.company-dashboard-page #projectsSection .feed-list,
  body.company-dashboard-page #projectsCarousel.feed-list {
    grid-template-columns: 1fr !important;
  }
}

body.company-dashboard-page #projectsSection .project-feed-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 1rem 1.1rem;
  box-sizing: border-box;
}

body.company-dashboard-page #projectsSection .project-feed-item .project-actions-row {
  margin-top: auto;
}

body.company-dashboard-page #projectsSection .project-feed-item:hover {
  transform: none;
  background: rgba(27, 45, 38, 0.025);
  box-shadow: none;
}

body.company-dashboard-page #projectsSection .projects-toolbar,
body.company-dashboard-page #projectsSection .projects-section-header {
  max-width: 100%;
}

/* "Se alla" under topp-3 — full rad i projektgriden */
body.company-dashboard-page #projectsSection .mobile-expand-projects-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary, var(--arv-offwhite));
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  text-decoration: none;
  box-sizing: border-box;
}

body.company-dashboard-page #projectsSection .mobile-expand-projects-btn:hover {
  background: rgba(27, 45, 38, 0.05);
  border-color: rgba(27, 45, 38, 0.18);
}

body.company-dashboard-page #projectsSection .mobile-expand-projects-btn i {
  width: 1.1rem;
  height: 1.1rem;
}
