/*
 * ET-Team CMS - Visma Brand Design System
 * Typography: Plus Jakarta Sans (body) + JetBrains Mono (labels)
 * Palette: Visma brand colors on dark background
 */

:root {
  /* Visma Brand Colors */
  --visma-green: #0e7f88;
  --visma-turquoise: #009f93;
  --visma-lime: #8cb501;
  --visma-orange: #f97c00;
  --visma-orange-hover: #e06f00;
  --visma-coral: #ef564b;
  --visma-yellow: #f4cd4e;
  --visma-red: #e70641;

  /* Core palette (dark mode) */
  --color-bg: #0a1628;
  --color-surface: #111827;
  --color-surface-elevated: #1f2937;
  --color-surface-hover: #374151;

  /* Accent colors - using Visma green */
  --color-accent: var(--visma-green);
  --color-accent-hover: var(--visma-turquoise);
  --color-accent-glow: rgba(14, 127, 136, 0.2);
  --color-accent-subtle: rgba(14, 127, 136, 0.1);

  /* Text hierarchy */
  --color-text: #f9fafb;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;

  /* Borders & lines */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.15);

  /* Status colors */
  --color-draft: #fbbf24;
  --color-published: #34d399;

  /* Typography */
  --font-display:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-4xl: 10rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grain overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.hidden {
  display: none !important;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo-mark-svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring);
}

.logo:hover .logo-mark-svg {
  transform: scale(1.05) rotate(-2deg);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo-separator {
  color: var(--color-text-muted);
  font-weight: 300;
  margin: 0 0.4em;
  opacity: 0.5;
}

.logo-brand {
  font-weight: 400;
  color: var(--color-text-muted);
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-tagline {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  opacity: 0.7;
  margin-top: 1px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: all 0.25s var(--ease-out);
}

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

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Nav dropdown (Admin menu) */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-dropdown-chevron {
  transition: transform 0.2s var(--ease-out);
}

.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s var(--ease-out);
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s var(--ease-out);
}

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

.nav-dropdown-item.active {
  color: var(--color-accent);
}

/* User info */
.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

#user-email {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Login button */
.login-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-accent);
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 0 0 0 var(--color-accent-glow);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-accent-glow);
}

.login-btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out);
}

.login-btn:hover .login-btn-icon {
  transform: translateX(3px);
}

.login-btn.logged-in {
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  box-shadow: none;
}

.login-btn.logged-in:hover {
  color: var(--color-text);
  transform: none;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.user-menu-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.user-menu.open .user-menu-btn {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.user-menu-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-chevron {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform 0.2s var(--ease-out);
}

.user-menu.open .user-menu-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  min-width: 220px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s var(--ease-out);
  z-index: 1000;
  overflow: hidden;
}

.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md);
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--color-surface-hover);
}

.user-dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
}

.user-dropdown-item.logout-item {
  color: #ef4444;
}

.user-dropdown-item.logout-item svg {
  color: #ef4444;
}

.user-dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ===== MAIN ===== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
  min-height: calc(100vh - 80px);
}

/* ===== VIEW CONTAINER ===== */
.view-container {
  animation: viewFadeIn 0.4s var(--ease-out);
}

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

/* ===== FRONT PAGE ===== */

.hp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Home Hero (2-column) ── */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-lg);
  align-items: start;
}

.home-hero-text h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
}

.home-hero-text h1 em {
  font-style: italic;
  background: linear-gradient(90deg, var(--visma-turquoise), var(--visma-orange), var(--visma-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-text > p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 var(--space-lg);
  max-width: 440px;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--visma-green);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.home-hero-cta:hover {
  background: var(--visma-turquoise);
  transform: translateY(-1px);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Pulse-survey card — replaces Start Here */
.pulse-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: padding 0.2s ease;
}
.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--visma-green);
}
.pulse-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--visma-green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.pulse-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.pulse-card > p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}
.pulse-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  margin-top: var(--space-xs);
  background: var(--visma-green);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.pulse-cta:hover {
  background: var(--visma-turquoise);
  transform: translateY(-1px);
}
.pulse-cta-arrow { font-size: 1rem; }

/* Inline sign-in card (unauthenticated visitors) — mirrors the Pulse card structure */
.signin-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.signin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--visma-turquoise);
}
.signin-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--visma-turquoise);
}
.signin-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.signin-card > p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}
.signin-disclaimer {
  font-size: 0.78rem !important;
  line-height: 1.55 !important;
  color: var(--color-text-muted) !important;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}
.signin-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  margin-top: var(--space-xs);
  background: var(--visma-green);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.signin-cta:hover {
  background: var(--visma-turquoise);
  transform: translateY(-1px);
}
.signin-cta-arrow { font-size: 1rem; }
.signin-cta[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.signin-inline-error {
  color: var(--visma-coral) !important;
  font-size: 0.82rem !important;
  margin: var(--space-xs) 0 0 !important;
}
.signin-inline-error.hidden { display: none; }

/* ── Section Heading ── */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.section-heading-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.section-heading-link {
  font-size: 0.85rem;
  color: var(--visma-green);
  text-decoration: none;
  font-weight: 500;
}

.section-heading-link:hover {
  text-decoration: underline;
}

/* ── Technology Hub cards ── */
.tech-hubs {
  padding: var(--space-md) 0;
}

.tech-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.tech-hub-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tech-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tech-hub-card[data-color="orange"] { border-top: 3px solid var(--visma-orange); }
.tech-hub-card[data-color="blue"] { border-top: 3px solid #4285F4; }
.tech-hub-card[data-color="amber"] { border-top: 3px solid #D97706; }
.tech-hub-card[data-color="coral"] { border-top: 3px solid var(--visma-coral); }

.tech-hub-card:hover[data-color="orange"] { border-color: var(--visma-orange); }
.tech-hub-card:hover[data-color="blue"] { border-color: #4285F4; }
.tech-hub-card:hover[data-color="amber"] { border-color: #D97706; }
.tech-hub-card:hover[data-color="coral"] { border-color: var(--visma-coral); }

.tech-hub-icon {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.tech-hub-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.tech-hub-card p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0 0 var(--space-sm);
  flex: 1;
}

.tech-hub-stat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.tech-hub-stat strong {
  color: var(--visma-green);
  font-variant-numeric: tabular-nums;
}

/* ── Blog section ── */
.blog-section {
  padding: var(--space-md) 0;
}

/* Card link reset — cards rendered as <a> for right-click/new-tab support */
a.hero-card,
a.article-card,
a.content-row,
a.usecase-card {
  text-decoration: none;
  color: inherit;
}

/* Hero card (featured article) */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: var(--space-lg);
}

.hero-card:hover {
  border-color: var(--visma-green);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.hero-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card-tags {
  display: flex;
  gap: 0.4em;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.hero-card-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
  line-height: 1.25;
}

.hero-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--space-md);
}

/* Hero card inside content list — adapt to narrower container */
#content-list > .hero-card {
  grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 900px) {
  #content-list > .hero-card {
    grid-template-columns: 1fr;
  }
}

.hero-card-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* Article cards (3-column grid) */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.article-card:hover {
  border-color: var(--visma-green);
  transform: translateY(-2px);
}

.article-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-body {
  padding: var(--space-md);
}

.article-card-tags {
  display: flex;
  gap: 0.3em;
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.article-card-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
  line-height: 1.3;
}

.article-card-body p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0 0 var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  gap: var(--space-xs);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ── Use-case cards (2-column) ── */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.usecase-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-md);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.15s;
}

.usecase-card:hover {
  border-color: var(--visma-green);
  transform: translateY(-1px);
}

.usecase-card-image {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.usecase-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.usecase-card-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--color-text);
}

.usecase-card-body p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0 0 var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.usecase-card-meta {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ── Tag badges (homepage) ── */
.tag {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.tag-tech {
  background: rgba(14, 127, 136, 0.15);
  color: var(--visma-turquoise);
}

.tag-format {
  background: rgba(249, 124, 0, 0.15);
  color: var(--visma-orange);
}

.hp-hero-glow {
  position: absolute;
  top: -30%;
  left: 20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(14, 127, 136, 0.14) 0%,
    rgba(0, 159, 147, 0.06) 40%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: hp-glow-drift 8s ease-in-out infinite alternate;
}

@keyframes hp-glow-drift {
  0% {
    opacity: 0.7;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(40px, 20px) scale(1.1);
  }
}

.hp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 159, 147, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 159, 147, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  pointer-events: none;
}

.hp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--color-accent-subtle);
  color: var(--visma-green);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 100px;
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(14, 127, 136, 0.25);
}

.hp-hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--visma-lime);
  border-radius: 50%;
  animation: hp-pulse 2s infinite;
}

@keyframes hp-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.hp-grad {
  background: linear-gradient(
    135deg,
    var(--visma-turquoise) 0%,
    var(--visma-green) 40%,
    var(--visma-orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hp-hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: var(--space-lg);
}

.hp-hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ── Shared Buttons ── */
.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    transform 0.2s,
    gap 0.3s var(--ease-out),
    box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.hp-btn svg {
  transition: transform 0.3s var(--ease-out);
}

.hp-btn:hover svg {
  transform: translateX(3px);
}

.hp-btn--primary {
  background: var(--visma-green);
  color: white;
  box-shadow: 0 4px 20px rgba(14, 127, 136, 0.25);
}

.hp-btn--primary:hover {
  background: var(--visma-turquoise);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(14, 127, 136, 0.3);
}

.hp-btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.hp-btn--outline:hover {
  border-color: var(--visma-turquoise);
  color: var(--visma-turquoise);
  transform: translateY(-2px);
}

.hp-btn--orange {
  background: var(--visma-orange);
  color: white;
  box-shadow: 0 4px 20px rgba(249, 124, 0, 0.25);
}

.hp-btn--orange:hover {
  background: var(--visma-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(249, 124, 0, 0.3);
}

/* ── Section Labels ── */
.hp-section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--visma-turquoise);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.hp-section-label--light {
  color: var(--visma-lime);
}

.hp-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.hp-section-title--light {
  color: white;
}

.hp-section-sub {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-top: calc(-1 * var(--space-xs));
}

/* ── Sign-in Pitch Popover (logged-out) ── */
.user-info {
  position: relative;
}

/* ── Sign-in Pitch Text (below login button, logged-out only) ── */
.signin-pitch-text {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* ── The Shift ── */
.hp-shift {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-2xl);
  align-items: end;
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}

.hp-shift-content {
  max-width: 480px;
}

.hp-shift-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.hp-shift-body strong {
  color: var(--color-text);
  font-weight: 700;
}

.hp-shift-body p + p {
  margin-top: var(--space-md);
}

.hp-shift-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 8px 40px rgba(0, 159, 147, 0.12),
    0 0 80px rgba(14, 127, 136, 0.06);
}

.hp-shift-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.hp-shift-visual:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .hp-shift {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hp-shift-content {
    max-width: 100%;
  }
}

/* ── Offerings ── */
.hp-offerings {
  margin-bottom: var(--space-2xl);
}

.hp-offerings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

/* Center the 4th card when it wraps to a new row */
.hp-offer-card:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

.hp-offer-card {
  --card-accent: var(--visma-green);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-xl) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  transition:
    border-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

/* Per-card accent colors matching icon palettes */
.hp-offer-card[data-section="explore"] {
  --card-accent: #0e7f88;
}
.hp-offer-card[data-section="learn"] {
  --card-accent: #00b4a0;
}
.hp-offer-card[data-section="discover"] {
  --card-accent: #ef564b;
}
.hp-offer-card[data-section="services"] {
  --card-accent: #f97c00;
}

.hp-offer-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
  transform: translateY(-6px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 0 48px color-mix(in srgb, var(--card-accent) 12%, transparent);
}

.hp-offer-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-lg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-accent) 15%, transparent);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.hp-offer-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-offer-card:hover .hp-offer-icon {
  transform: scale(1.06);
  box-shadow: 0 0 28px color-mix(in srgb, var(--card-accent) 30%, transparent);
}

.hp-offer-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.hp-offer-card p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.hp-offer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--card-accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: var(--space-md);
  transition: gap 0.25s var(--ease-out);
}

.hp-offer-card:hover .hp-offer-link {
  gap: 10px;
}

.hp-arrow {
  transition: transform 0.25s var(--ease-out);
}

.hp-offer-card:hover .hp-arrow {
  transform: translateX(4px);
}

/* ── Audience (dark panel) ── */
.hp-audience {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  margin-bottom: var(--space-2xl);
  overflow: hidden;
}

.hp-audience-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(0, 159, 147, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hp-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  position: relative;
  z-index: 1;
}

.hp-audience-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition:
    background 0.3s,
    border-color 0.3s;
}

.hp-audience-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 159, 147, 0.25);
}

.hp-audience-icon {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: var(--space-md);
}

.hp-audience-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.hp-audience-card p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ── Featured Content ── */
.hp-featured {
  margin-bottom: var(--space-2xl);
}

.hp-featured-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.hp-featured-all {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.hp-featured-all:hover {
  color: var(--visma-green);
}

.hp-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.hp-content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition:
    border-color 0.3s,
    transform 0.3s var(--ease-out),
    box-shadow 0.3s;
}

.hp-content-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.hp-content-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.hp-content-tag--explore {
  background: rgba(0, 159, 147, 0.12);
  color: var(--visma-turquoise);
}

.hp-content-tag--learn {
  background: rgba(140, 181, 1, 0.12);
  color: var(--visma-lime);
}

.hp-content-tag--discover {
  background: rgba(239, 86, 75, 0.12);
  color: var(--visma-coral);
}

.hp-content-tag--services {
  background: rgba(14, 127, 136, 0.12);
  color: var(--visma-green);
}

.hp-content-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.hp-content-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Team Teaser ── */
.hp-team-teaser {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
}

.hp-team-avatars {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.hp-team-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: -12px;
  border: 3px solid var(--color-bg);
  background: linear-gradient(135deg, var(--av-c1), var(--av-c2));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease-out);
}

.hp-team-av:first-child {
  margin-left: 0;
}

.hp-team-teaser:hover .hp-team-av {
  margin-left: 4px;
}

.hp-team-teaser:hover .hp-team-av:first-child {
  margin-left: 0;
}

.hp-team-teaser h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hp-team-teaser p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}

/* ── Footer CTA ── */
.hp-footer-cta {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.hp-footer-cta h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hp-footer-cta-btns {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ── Homepage Responsive ── */
@media (max-width: 900px) {
  .tech-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: var(--space-xl) 0;
  }

  .home-hero-text h1 {
    font-size: 1.9rem;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .usecase-grid {
    grid-template-columns: 1fr;
  }

  .usecase-card {
    grid-template-columns: 80px 1fr;
  }
}

@media (max-width: 480px) {
  .tech-hub-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ABOUT PAGE ===== */
.about-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.about-header {
  margin-bottom: var(--space-3xl);
}

.about-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.about-header p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.about-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: border-color 0.3s;
}

.about-section:hover {
  border-color: var(--color-border-strong);
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.about-section h2::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--color-accent);
  border-radius: 2px;
}

.about-section p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.about-section a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.about-section a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.about-steps {
  margin: var(--space-md) 0 0 var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.about-steps li {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-sm);
}

.about-steps li::marker {
  color: var(--color-accent);
  font-weight: 600;
}

.team-list {
  list-style: none;
  margin-top: var(--space-md);
}

.team-list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.team-list li:last-child {
  border-bottom: none;
}

.team-list li::before {
  content: "";
  width: 32px;
  height: 32px;
  background: var(--color-surface-elevated);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== TEAM PAGE ===== */

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.team-page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

/* ── Hero ── */
.team-hero {
  position: relative;
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.team-hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  translate: -50% 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(14, 127, 136, 0.18) 0%,
    rgba(0, 159, 147, 0.08) 40%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: hero-pulse 6s ease-in-out infinite alternate;
}

@keyframes hero-pulse {
  0% {
    opacity: 0.6;
    scale: 1;
  }
  100% {
    opacity: 1;
    scale: 1.15;
  }
}

.team-hero-content {
  position: relative;
  z-index: 1;
}

.team-hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--visma-green);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(14, 127, 136, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
}

.team-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--visma-green) 0%,
    var(--visma-turquoise) 50%,
    var(--visma-orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 620px;
  margin: 0 auto;
}

/* ── Mission & Vision ── */
.team-mv {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.team-mv-col {
  flex: 1;
}

.team-mv-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--visma-green);
  margin-bottom: var(--space-sm);
}

.team-mv-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.team-mv-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--visma-green),
    transparent
  );
  opacity: 0.4;
  flex-shrink: 0;
}

/* ── Roster ── */
.team-roster {
  margin-bottom: var(--space-3xl);
}

.team-roster-heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}

/* Person row */
.team-person {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.team-person:hover {
  border-color: rgba(14, 127, 136, 0.3);
  box-shadow: 0 0 40px rgba(14, 127, 136, 0.06);
}

.team-person--flip {
  grid-template-columns: 1fr 280px;
}

.team-person--flip .team-person-spirit {
  order: 2;
}

.team-person--flip .team-person-info {
  order: 1;
}

/* Spirit image column */
.team-person-spirit {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

.team-person-spirit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: scale 0.5s var(--ease-out);
}

.team-person:hover .team-person-spirit img {
  scale: 1.05;
}

.team-person-animal {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(6px);
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Info column */
.team-person-info {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-person--flip .team-person-info {
  padding: var(--space-lg) 0 var(--space-lg) var(--space-lg);
}

.team-person-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.team-person-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--avatar-c1), var(--avatar-c2));
}

.team-person-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.team-person-role {
  display: block;
  font-size: 0.8rem;
  color: var(--visma-green);
  font-weight: 500;
}

.team-person-bio {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.team-person-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.team-person-traits span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(14, 127, 136, 0.08);
  color: var(--visma-green);
  border: 1px solid rgba(14, 127, 136, 0.15);
}

.team-person-email {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.team-person-email:hover {
  color: var(--visma-green);
}

/* ── CTA ── */
.team-cta {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
}

.team-cta h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.team-cta p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}

.team-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--visma-green);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    gap 0.3s var(--ease-out);
}

.team-cta-btn:hover {
  background: var(--visma-turquoise);
  gap: 12px;
}

.team-cta-btn svg {
  transition: transform 0.3s var(--ease-out);
}

.team-cta-btn:hover svg {
  transform: translateX(2px);
}

/* ── Team Page Responsive ── */
@media (max-width: 768px) {
  .team-hero {
    padding: var(--space-2xl) var(--space-sm) var(--space-xl);
  }

  .team-hero-title {
    font-size: 1.75rem;
  }

  .team-mv {
    flex-direction: column;
    gap: var(--space-md);
  }

  .team-mv-divider {
    width: 100%;
    height: 1px;
    align-self: auto;
    background: linear-gradient(
      to right,
      transparent,
      var(--visma-green),
      transparent
    );
  }

  .team-person,
  .team-person--flip {
    grid-template-columns: 1fr;
  }

  .team-person-spirit {
    aspect-ratio: 16 / 10;
  }

  .team-person--flip .team-person-spirit {
    order: 0;
  }

  .team-person--flip .team-person-info {
    order: 0;
  }

  .team-person-info,
  .team-person--flip .team-person-info {
    padding: 0 var(--space-lg) var(--space-lg);
  }
}

/* ===== LOGIN PAGE ===== */
.login-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid background */
.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

/* Floating gradient orbs */
.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}

.login-bg-orb--1 {
  width: 500px;
  height: 500px;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, var(--visma-green), transparent 70%);
  animation: orbFloat 12s ease-in-out infinite alternate;
}

.login-bg-orb--2 {
  width: 400px;
  height: 400px;
  bottom: -15%;
  right: -5%;
  background: radial-gradient(circle, var(--visma-turquoise), transparent 70%);
  animation: orbFloat 10s ease-in-out 2s infinite alternate-reverse;
}

@keyframes orbFloat {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(30px, -20px) scale(1.08);
  }
}

/* Split layout */
.login-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 920px;
  width: 100%;
}

/* ── Left: Sales pitch ── */
.login-pitch {
  animation: pitchReveal 0.7s var(--ease-out) both;
}

@keyframes pitchReveal {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-pitch-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--visma-green);
  margin-bottom: var(--space-sm);
}

.login-pitch-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.login-pitch-accent {
  background: linear-gradient(
    135deg,
    var(--visma-green),
    var(--visma-turquoise)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-pitch-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 440px;
  margin-bottom: var(--space-lg);
}

/* Feature list */
.login-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  animation: featureReveal 0.5s var(--ease-out) var(--delay, 0s) both;
}

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

.login-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border: 1px solid rgba(14, 127, 136, 0.15);
  border-radius: 10px;
  color: var(--visma-green);
}

.login-feature strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.login-feature span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Right: Login card ── */
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: cardEntrance 0.6s var(--ease-out) 0.2s both;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

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

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--visma-green),
    var(--visma-turquoise),
    var(--visma-lime),
    var(--visma-turquoise),
    var(--visma-green)
  );
  background-size: 300% auto;
  animation: shimmer 4s linear infinite;
}

.login-card-header {
  margin-bottom: var(--space-md);
}

.login-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.login-card-header p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.login-disclaimer {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0 var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.login-domain-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.login-domain-note strong {
  color: var(--color-text-secondary);
}

/* Login error message */
.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Google sign-in button */
.google-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-sm) !important;
  width: 100% !important;
  padding: 0.7rem var(--space-sm) !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: var(--radius-md) !important;
  color: #3c4043 !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--ease-out) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  position: relative !important;
  overflow: hidden !important;
}

.google-btn::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(66, 133, 244, 0.05),
    rgba(234, 67, 53, 0.05)
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.2s !important;
}

.google-btn:hover:not(:disabled) {
  background: #f8f9fa !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-1px) !important;
}

.google-btn:hover:not(:disabled)::before {
  opacity: 1 !important;
}

.google-btn:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.google-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.google-btn span {
  position: relative !important;
  z-index: 1 !important;
}

.google-icon {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Reusable login elements */
.login-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 4px 20px var(--color-accent-glow);
  margin-bottom: var(--space-xl);
}

.login-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-accent-glow);
}

.login-retry svg {
  width: 20px;
  height: 20px;
}

/* ===== CONTENT LIST ===== */
.content-list-hero {
  margin-bottom: var(--space-sm);
}

.content-list-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* Section hero styles moved to SECTION HERO block below */

/* Filter toggle button — magnifying glass */
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.25s var(--ease-out);
  position: relative;
}

.filter-toggle:hover {
  color: var(--color-text);
}

.filter-toggle-icon {
  transition:
    transform 0.3s var(--ease-out),
    color 0.25s var(--ease-out);
}

.filter-toggle-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-toggle[aria-expanded="true"] {
  color: var(--color-accent);
}

.filter-toggle[aria-expanded="true"] .filter-toggle-icon {
  transform: rotate(-45deg);
}

.filter-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  letter-spacing: 0;
}

.filter-badge.hidden {
  display: none;
}

/* Collapsible filters panel */
.filters-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-out);
}

.filters-panel-inner {
  overflow: hidden;
}

.filters-panel.open {
  grid-template-rows: 1fr;
}

.filters-panel-content {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-top: 1px solid var(--color-border);
}

.filters-panel-content .search-bar {
  margin-bottom: var(--space-md);
}

.search-bar {
  position: relative;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  max-width: 480px;
  padding: var(--space-sm) var(--space-md) var(--space-sm)
    calc(var(--space-md) + 26px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition:
    border-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Filters */
.content-filters {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-right: var(--space-xs);
  white-space: nowrap;
}

.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-elevated);
}

.filter-chip.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(14, 127, 136, 0.1);
}

.filter-chip .chip-count {
  font-size: 0.6rem;
  opacity: 0.6;
  margin-left: 2px;
}

.filter-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.sort-select {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Featured + list layout */
.content-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* --- Featured card (hero, 2-column) --- */
.content-featured {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.content-featured:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.content-featured:hover .content-card-img {
  transform: scale(1.03);
}

.content-featured-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.content-featured-image {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-elevated);
  min-height: 320px;
}

.content-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-featured-body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}

.content-featured-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.content-featured-description {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- List rows --- */
.content-list-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.content-row {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.2s var(--ease-out);
}

.content-row:hover {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  margin-left: calc(-1 * var(--space-md));
  margin-right: calc(-1 * var(--space-md));
}

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

.content-row-thumb {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.content-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.content-row-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-row-description {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: auto;
}

.content-row-readmore {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  white-space: nowrap;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.content-row:hover .content-row-readmore {
  background: var(--color-accent);
  color: #fff;
}

.content-row-readmore--start {
  background: var(--color-accent-subtle);
  color: var(--visma-green);
  border-color: var(--visma-green);
}

.course-row:hover .content-row-readmore--start {
  background: var(--visma-green);
  color: #fff;
}

/* Legacy .content-card kept for admin or other uses */
.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

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

.content-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.content-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.4s var(--ease-out);
}

.content-card-img.loaded {
  opacity: 1;
}

.content-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--color-surface-elevated) 0%,
    var(--color-surface) 100%
  );
}

.content-card-image--placeholder span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.content-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.content-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.content-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-description {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: var(--space-sm);
}

.content-card-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Badges (shared with admin) */
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.draft {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-draft);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.published {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-published);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.section-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.topic-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-strong);
  white-space: nowrap;
}

.topic-badge.tag-tech {
  color: var(--visma-turquoise);
  border-color: var(--visma-turquoise);
  background: rgba(0, 159, 147, 0.12);
}

.topic-badge.tag-primary {
  color: var(--visma-orange);
  border-color: var(--visma-orange);
  background: rgba(249, 124, 0, 0.12);
}

.topic-badge.tag-service {
  color: var(--visma-lime);
  border-color: var(--visma-lime);
  background: rgba(140, 181, 1, 0.12);
}

.topic-badge.tag-format {
  color: var(--visma-orange);
  border-color: var(--visma-orange);
}

.topic-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.admin-table .topic-badge {
  font-size: 0.65rem;
  padding: 2px var(--space-xs);
}

/* Pagination */
.content-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
}

.pagination-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pagination-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-xs);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(14, 127, 136, 0.1);
}

.pagination-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-ellipsis {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 0 var(--space-xs);
}

.pagination-prev,
.pagination-next {
  min-width: 32px;
}

/* Empty state in grid */
.content-list .empty-state {
  grid-column: 1 / -1;
}

/* Responsive layout */
@media (max-width: 768px) {
  .search-input {
    max-width: 100%;
  }

  .content-featured-image {
    aspect-ratio: 16 / 9;
  }

  .content-featured-title {
    font-size: 1.3rem;
  }

  .content-featured-body {
    padding: var(--space-lg) var(--space-md);
  }

  .content-row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .content-row-thumb {
    width: 100%;
  }

  .content-row:hover {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
  }

  .content-filters {
    flex-direction: column;
  }

  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }
}

/* ===== CONTENT VIEW ===== */
.content-view {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  max-width: 900px;
  margin: 0 auto;
}

.content-view-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.content-view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.content-view-toolbar .back-link {
  margin-bottom: 0;
}

.copy-markdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.copy-markdown-btn:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.copy-markdown-btn:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.copy-markdown-btn.copied {
  color: var(--visma-green);
  border-color: var(--visma-green);
}

.content-hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.content-hero-image.loaded {
  opacity: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-accent);
}

.content-view-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.content-view-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

/* Presentation embed with iframe + header bar */
.presentation-embed {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.presentation-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--color-surface-elevated, #1F2937);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.presentation-embed-label {
  font-size: 0.8rem;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.presentation-embed-open {
  font-size: 0.8rem;
  color: var(--visma-green, #0E7F88);
  text-decoration: none;
}

.presentation-embed-open:hover {
  color: var(--visma-turquoise, #009F93);
  text-decoration: underline;
}

.presentation-iframe {
  width: 100%;
  height: 80vh;
  border: none;
  background: var(--color-bg, #0a1628);
}

/* ===== SERVICE DETAILS ===== */
.service-details {
  margin: var(--space-xl) 0;
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.service-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.service-type-badge {
  background: var(--visma-green);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-audience {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin: 0;
  line-height: 1.6;
}

.service-section {
  margin-bottom: var(--space-xl);
}

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

.service-section h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
}

.service-outcomes {
  margin: 0;
  padding-left: 1.25rem;
}

.service-outcomes li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.service-formats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.service-format-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.booking-btn {
  display: inline-block;
  background: var(--color-accent, #0e7f88);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.booking-btn:hover {
  opacity: 0.85;
}

/* Content body */
.content-body {
  line-height: 1.8;
  font-size: 1.05rem;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
  font-family: var(--font-display);
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.content-body h1 {
  font-size: 2rem;
  font-weight: 700;
}
.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.content-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.content-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

.content-body p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.content-body code {
  background: var(--color-surface-elevated);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.9em;
}

.content-body pre {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

.content-body pre code {
  background: none;
  padding: 0;
}

.code-block-wrapper {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  opacity: 0;
  transition:
    opacity 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.code-block-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.code-copy-btn.copied {
  color: var(--visma-green);
  border-color: var(--visma-green);
  opacity: 1;
}

.content-body ul,
.content-body ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
  color: var(--color-text-secondary);
}

.content-body li {
  margin-bottom: var(--space-sm);
}

.content-body a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.content-body a:hover {
  text-decoration: underline;
}

.content-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.content-body thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border-strong);
}

.content-body tbody td {
  padding: 0.75rem 1rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.content-body tbody tr:last-child td {
  border-bottom: none;
}

.content-body tbody tr:hover {
  background: var(--color-accent-subtle);
}

.content-body tbody td:first-child {
  font-variant-numeric: tabular-nums;
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  display: block;
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-lg) 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--color-text-muted);
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

/* ===== DRAFTS MANAGEMENT ===== */
.drafts-management {
  max-width: 1200px;
  margin: 0 auto;
}

.drafts-header {
  margin-bottom: var(--space-xl);
}

.drafts-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.drafts-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drafts-header p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Drafts actions container */
.drafts-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Base action button styles */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.action-btn:disabled,
.action-btn[disabled] {
  background: var(--color-surface-elevated) !important;
  color: var(--color-text-muted) !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Publish button - green */
.action-btn.publish {
  background: var(--color-published);
  color: var(--color-bg);
}

.action-btn.publish:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

/* Archive button - visma green/teal */
.action-btn.archive {
  background: var(--visma-green);
  color: white;
}

.action-btn.archive:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(14, 127, 136, 0.3);
}

/* Delete button - red */
.action-btn.delete {
  background: var(--visma-coral);
  color: white;
}

.action-btn.delete:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 86, 75, 0.3);
}

/* Legacy publish-btn for backwards compatibility */
.publish-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-published);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.publish-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.publish-btn:disabled {
  background: var(--color-surface-elevated);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.drafts-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.drafts-table thead {
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
}

.drafts-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drafts-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.drafts-table tbody tr:last-child td {
  border-bottom: none;
}

.draft-row {
  cursor: pointer;
  transition: background 0.15s;
}

.draft-row:hover {
  background: var(--color-surface-hover);
}

.col-checkbox {
  width: 40px;
  text-align: center;
}

.col-title {
  font-weight: 500;
  color: var(--color-text);
}

.col-topic {
  width: 120px;
}

.col-section {
  width: 120px;
  text-transform: capitalize;
}

.col-author {
  width: 150px;
}

.col-date {
  width: 150px;
}

.col-expires {
  width: 140px;
}

.expires-input {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.expires-input:hover {
  border-color: var(--color-border-strong);
}

.expires-input:focus {
  outline: none;
  border-color: var(--visma-orange);
  box-shadow: 0 0 0 2px rgba(249, 124, 0, 0.15);
}

.expires-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.expires-label.expired {
  color: var(--visma-coral);
  font-weight: 600;
}

.drafts-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-accent);
}

/* ===== ADMIN PAGE ===== */
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: var(--space-xl);
}

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-header p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.admin-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Admin Title Group (title + help button) */
.admin-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.workflow-help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
}

.workflow-help-btn:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* Workflow Help Dialog */
.workflow-help-dialog {
  max-width: 560px;
}

.workflow-section {
  margin-bottom: var(--space-sm);
}

.workflow-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.workflow-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.workflow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin: var(--space-sm) 0;
}

.workflow-arrow-line {
  display: block;
  width: 2px;
  height: 20px;
  background: var(--color-border-strong);
}

.workflow-arrow-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workflow-diagram {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-top: var(--space-sm);
}

.workflow-transitions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.workflow-transition {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.workflow-transition.danger {
  color: var(--visma-coral);
}

.wt-arrow {
  color: var(--color-text-muted);
}

.wt-from,
.wt-to {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.wt-from.draft,
.wt-to.draft {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-draft);
}

.wt-from.published,
.wt-to.published {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-published);
}

.wt-from.archived,
.wt-to.archived {
  background: rgba(107, 114, 128, 0.15);
  color: var(--color-text-muted);
}

.wt-to.deleted {
  background: rgba(239, 86, 75, 0.15);
  color: var(--visma-coral);
}

.wt-from.review,
.wt-to.review {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.wt-from.to-publish,
.wt-to.to-publish {
  background: rgba(249, 124, 0, 0.15);
  color: var(--visma-orange);
}

.workflow-notes {
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workflow-notes p {
  margin: 0;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
}

.admin-tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--space-xs);
  background: var(--color-surface-elevated);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.admin-tab.active .tab-count {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

/* Admin Filter Bar */
.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-select {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.admin-select:hover {
  border-color: var(--color-border-strong);
}

.admin-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.admin-search-input {
  flex: 1;
  max-width: 300px;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s var(--ease-out);
}

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

.admin-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table thead {
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-row {
  cursor: pointer;
  transition: background 0.15s;
}

.admin-row:hover {
  background: var(--color-surface-hover);
}

.admin-row.own-item {
  opacity: 0.6;
}

.admin-row.own-item .item-checkbox {
  cursor: not-allowed;
}

.yours-badge {
  display: inline-block;
  background: var(--visma-orange);
  color: #1a1a2e;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-accent);
}

/* Archived badge */
.status-badge.archived {
  background: rgba(107, 114, 128, 0.15);
  color: var(--color-text-muted);
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Republish button - turquoise */
.action-btn.republish {
  background: var(--visma-turquoise);
  color: white;
}

.action-btn.republish:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 159, 147, 0.3);
}

.action-btn.expiry {
  background: var(--visma-orange);
  color: white;
}

.action-btn.expiry:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(249, 124, 0, 0.3);
}

/* Recall/draft button - neutral blue */
.action-btn.draft {
  background: #4b5563;
  color: white;
}

.action-btn.draft:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(75, 85, 99, 0.3);
}

/* Expiry badges for content cards and detail view */
.expiry-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--visma-orange);
  background: rgba(249, 124, 0, 0.1);
  border: 1px solid rgba(249, 124, 0, 0.25);
  border-radius: var(--radius-sm);
}

.expiry-badge.expiring-soon {
  color: var(--visma-coral);
  background: rgba(239, 86, 75, 0.1);
  border-color: rgba(239, 86, 75, 0.25);
}

/* Admin pagination */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: var(--space-sm) 0;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.pagination-btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Admin page responsive */
@media (max-width: 768px) {
  .admin-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search-input {
    max-width: 100%;
  }

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  margin-top: auto;
}

.made-with-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.badge-icon {
  flex-shrink: 0;
}

.made-with-badge .heart {
  color: var(--visma-coral);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .section-cards {
    grid-template-columns: 1fr;
  }

  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .content-featured-inner {
    grid-template-columns: 1fr;
  }

  .content-featured-image {
    min-height: 200px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    padding: var(--space-md);
  }

  .logo-text {
    font-size: 0.85rem;
  }

  .logo-tagline {
    font-size: 0.55rem;
  }

  .nav {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    margin-top: var(--space-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-xs);
    gap: var(--space-xs);
  }

  .nav-link {
    padding: var(--space-xs) var(--space-sm);
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .user-info {
    margin-left: auto;
  }

  #user-email {
    display: none;
  }

  /* User dropdown: anchor to right edge of header on mobile */
  .user-menu {
    position: static;
  }

  .user-dropdown {
    position: absolute;
    top: auto;
    right: var(--space-md);
    margin-top: var(--space-xs);
  }

  /* Pitch text: slightly smaller on tablet */
  .signin-pitch-text {
    font-size: 0.6rem;
  }

  /* Admin dropdown: anchor to center on mobile */
  .nav-dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
  }

  .nav-dropdown.open .nav-dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }

  .main {
    padding: var(--space-md);
  }

  .hero {
    padding: var(--space-xl);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .recent-grid {
    grid-template-columns: 1fr;
  }

  .login-split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    max-width: 420px;
  }

  .login-pitch {
    text-align: center;
  }

  .login-pitch-title {
    font-size: 1.75rem;
  }

  .login-pitch-sub {
    font-size: 0.92rem;
    margin: 0 auto var(--space-md);
  }

  .login-features {
    gap: 0.75rem;
  }

  .login-feature {
    text-align: left;
  }

  .login-card {
    padding: var(--space-lg);
    max-width: 100%;
  }

  .login-bg-orb--1 {
    width: 300px;
    height: 300px;
  }

  .login-bg-orb--2 {
    width: 250px;
    height: 250px;
  }

  .content-view {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .content-view-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
  }

  /* Content body mobile adjustments */
  .content-body {
    font-size: 0.95rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .content-body h1 {
    font-size: 1.5rem;
  }

  .content-body h2 {
    font-size: 1.25rem;
  }

  .content-body h3 {
    font-size: 1.1rem;
  }

  .content-body table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content-body thead th,
  .content-body tbody td {
    padding: 0.5rem;
  }

  .content-body tbody td:first-child {
    white-space: normal;
    width: auto;
  }

  .content-body ul,
  .content-body ol {
    padding-left: var(--space-md);
  }

  .content-body h1,
  .content-body h2,
  .content-body h3,
  .content-body h4 {
    margin: var(--space-lg) 0 var(--space-sm);
  }

  .content-body blockquote {
    padding-left: var(--space-md);
    margin: var(--space-md) 0;
  }

  .content-body pre {
    padding: var(--space-md);
    font-size: 0.8rem;
  }

  .service-details {
    padding: var(--space-md);
  }

  .booking-iframe {
    height: 450px;
  }

  .service-section h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: var(--space-xs);
  }

  .nav-link {
    padding: var(--space-xs) var(--space-sm);
  }

  .login-btn-text {
    display: none;
  }

  .login-btn {
    padding: var(--space-sm);
  }

  .content-view {
    padding: var(--space-sm);
  }
  .main {
    padding: var(--space-sm);
  }

  /* Pitch text: hidden on mobile (button is small enough) */
  .signin-pitch-text {
    display: none;
  }

  .service-details {
    padding: var(--space-sm);
  }

  .booking-iframe {
    height: 350px;
  }

  .service-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── CUSTOM DIALOG / MODAL ─── */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.dialog-overlay.visible {
  opacity: 1;
}

.dialog-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  max-width: 480px;
  width: 90%;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.25s var(--ease-spring);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dialog-overlay.visible .dialog-box {
  transform: scale(1) translateY(0);
}

.dialog-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.dialog-icon.danger {
  background: rgba(239, 86, 75, 0.15);
  color: var(--visma-coral);
}

.dialog-icon.warning {
  background: rgba(249, 124, 0, 0.15);
  color: var(--visma-orange);
}

.dialog-icon.info {
  background: rgba(14, 127, 136, 0.15);
  color: var(--visma-green);
}

.dialog-icon.success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-published);
}

.dialog-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.dialog-message {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.dialog-confirm-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  transition: border-color 0.2s;
}

.dialog-confirm-input:focus {
  outline: none;
  border-color: var(--visma-coral);
  box-shadow: 0 0 0 3px rgba(239, 86, 75, 0.15);
}

.dialog-confirm-input::placeholder {
  color: var(--color-text-muted);
}

.dialog-confirm-hint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.dialog-confirm-hint code {
  background: rgba(239, 86, 75, 0.1);
  color: var(--visma-coral);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.dialog-btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.dialog-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dialog-btn.cancel {
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.dialog-btn.cancel:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.dialog-btn.confirm {
  background: var(--visma-green);
  color: white;
}

.dialog-btn.confirm:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 127, 136, 0.3);
}

.dialog-btn.danger {
  background: var(--visma-coral);
  color: white;
}

.dialog-btn.danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 86, 75, 0.3);
}

.dialog-btn.ok {
  background: var(--visma-green);
  color: white;
}

.dialog-btn.ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 127, 136, 0.3);
}

.dialog-item-list {
  max-height: 120px;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.dialog-item-list li {
  padding: 0.25rem 0;
  list-style: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== ANALYTICS DASHBOARD ========== */
.analytics-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
}

.analytics-range-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.analytics-range-select {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}

.analytics-range-select:hover {
  border-color: var(--color-border-strong);
}

.analytics-custom-dates {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.analytics-custom-dates.hidden {
  display: none;
}

.analytics-date-input {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color-scheme: dark;
}

.analytics-date-separator {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Analytics Tabs --- */
.analytics-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 4px;
  border: 1px solid var(--color-border);
}

.analytics-tab {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
  font-weight: 500;
}

.analytics-tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.analytics-tab.active {
  color: var(--color-text);
  background: var(--color-surface-elevated);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Metric Cards --- */
.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.analytics-metric-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(17, 24, 39, 0.7) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.analytics-metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--visma-green) 0%, var(--visma-turquoise) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.analytics-metric-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.analytics-metric-card:hover::before {
  opacity: 1;
}

.analytics-metric-card .metric-value {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--color-text);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-metric-card .metric-value--text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.analytics-metric-card .metric-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  margin-top: -0.25rem;
}

.analytics-metric-card .metric-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Chart Row --- */
.analytics-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.analytics-chart-container {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(17, 24, 39, 0.7) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 0.3s var(--ease-out);
}

.analytics-chart-container:hover {
  border-color: var(--color-border-strong);
}

.analytics-chart-container h3 {
  margin: 0 0 var(--space-md) 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Content Library Section --- */
.analytics-content-library {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.analytics-content-library > h3 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin: 0;
}

/* --- Popular Content Table --- */
.analytics-popular {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(17, 24, 39, 0.7) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-md);
}

.analytics-popular h3 {
  margin: 0 0 var(--space-md) 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-popular-table {
  width: 100%;
  border-collapse: collapse;
}

.analytics-popular-table th {
  text-align: left;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.analytics-popular-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-size: 0.875rem;
}

.analytics-popular-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.analytics-popular-table th:last-child,
.analytics-popular-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Studio Activity Cards --- */
.analytics-studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.analytics-studio-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(17, 24, 39, 0.7) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 0.3s var(--ease-out);
}

.analytics-studio-card:hover {
  border-color: var(--color-border-strong);
}

.analytics-studio-card h3 {
  margin: 0 0 var(--space-md) 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-studio-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: var(--space-xs);
}

.analytics-studio-stats .analytics-metric-card {
  padding: var(--space-md) var(--space-sm);
  background: rgba(255, 255, 255, 0.02);
  border-color: transparent;
}

.analytics-studio-stats .analytics-metric-card:hover {
  border-color: var(--color-border);
  transform: none;
  box-shadow: none;
}

.analytics-studio-stats .analytics-metric-card::before {
  display: none;
}

.analytics-studio-stats .metric-value {
  font-size: 1.5rem;
}

/* --- Ask Tab (NL Chat — centered welcome, pinned input bar) --- */
.ask-status-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.ask-sync-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
}

.ask-sync-label.has-data {
  color: var(--visma-green);
  border-color: rgba(14, 127, 136, 0.3);
}

.ask-sync-btn {
  background: var(--visma-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out);
}

.ask-sync-btn:hover {
  background: var(--visma-turquoise);
}

.ask-sync-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ask-container {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}

.ask-chat-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ask-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  gap: 0.4rem;
}

.ask-icon {
  margin-bottom: 0.25rem;
  opacity: 0.9;
}

.ask-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.ask-subtitle {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

.ask-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  max-width: 680px;
}

.ask-example-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-secondary);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.ask-example-btn:hover {
  background: var(--color-surface-elevated);
  border-color: var(--visma-green);
  color: var(--color-text);
}

.ask-example-arrow {
  color: var(--visma-green);
  font-weight: 700;
  margin-right: 0.2rem;
}

.ask-recent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: var(--space-md);
  width: 100%;
  max-width: 600px;
}

.ask-recent-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.ask-recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0;
  cursor: pointer;
  transition: background-color 0.15s;
  text-align: left;
}

.ask-recent-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ask-recent-text {
  color: var(--color-text);
  font-size: 0.875rem;
}

.ask-recent-time {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  margin-left: var(--space-md);
}

/* Input bar — pinned to bottom */
.ask-input-bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-md);
  position: sticky;
  bottom: 0;
  background: var(--color-bg);
}

.ask-input-arrow {
  color: var(--visma-green);
  font-size: 1.2rem;
  font-weight: 700;
  padding-left: 0.25rem;
}

.ask-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text);
  padding: 0.5rem 0.5rem;
  font-size: 0.9rem;
}

.ask-input:focus {
  outline: none;
}

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

.ask-btn {
  background: var(--visma-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out);
}

.ask-btn:hover {
  background: var(--visma-turquoise);
}

.ask-clear-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.ask-clear-btn:hover {
  color: var(--color-text);
}

/* Chat messages */
#ask-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

.ask-msg {
  max-width: 800px;
}

.ask-msg-user {
  color: var(--color-text);
  font-weight: 600;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ask-msg-answer {
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(17, 24, 39, 0.7) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.analytics-interpretation {
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.analytics-big-number {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--visma-green);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.analytics-chat-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-sm) 0;
}

.analytics-chat-table th {
  text-align: left;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.analytics-chat-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.analytics-bar-chart {
  margin: var(--space-md) 0;
}

.analytics-sql {
  margin-top: var(--space-md);
}

.analytics-sql summary {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  cursor: pointer;
  letter-spacing: 0.05em;
}

.analytics-sql code {
  display: block;
  background: rgba(10, 22, 40, 0.6);
  padding: var(--space-md);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  margin-top: var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.analytics-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.analytics-loading-dots {
  color: var(--color-text-muted);
}

.analytics-error {
  color: var(--visma-coral);
}

.analytics-no-results {
  color: var(--color-text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .analytics-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-charts-row {
    grid-template-columns: 1fr;
  }
  .analytics-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .analytics-studio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .analytics-metrics {
    grid-template-columns: 1fr;
  }
}

/* ========== APPROVAL WORKFLOW ========== */
.pending-review-badge {
  background: var(--visma-orange) !important;
  color: #000 !important;
}

.status-badge.pending-review {
  background: rgba(249, 124, 0, 0.15);
  color: var(--visma-orange);
  border: 1px solid rgba(249, 124, 0, 0.3);
}

/* ===== COMMENT COUNT BADGE ===== */

.comment-count-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ===== COMMENT SIDE PANEL ===== */

.comment-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  justify-content: flex-end;
}

.comment-panel-overlay.visible {
  opacity: 1;
}

.comment-panel {
  width: min(400px, 90vw);
  height: 100vh;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
}

.comment-panel-overlay.visible .comment-panel {
  transform: translateX(0);
}

.comment-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-sm);
}

.comment-panel-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.3;
}

.comment-panel-link {
  font-size: 0.8rem;
  color: var(--visma-green);
  text-decoration: none;
}

.comment-panel-link:hover {
  text-decoration: underline;
}

.comment-panel-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.comment-panel-close:hover {
  color: var(--color-text);
}

.comment-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.comment-loading,
.comment-empty {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
  padding: var(--space-lg) 0;
}

.comment-item {
  display: flex;
  gap: var(--space-sm);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--visma-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.comment-item.own .comment-avatar {
  background: var(--visma-orange);
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.comment-author {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text);
}

.comment-date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.comment-delete {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  margin-left: auto;
}

.comment-delete:hover {
  color: var(--visma-coral);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.comment-panel-input {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.comment-panel-input textarea {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
}

.comment-panel-input textarea:focus {
  outline: none;
  border-color: var(--visma-green);
}

.comment-panel-input .action-btn {
  align-self: flex-end;
}

/* ===== SECTION HERO (all content sections) ===== */

.section-hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-md);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-hero-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  animation: section-hero-pulse 6s ease-in-out infinite alternate;
}
@keyframes section-hero-pulse {
  0% {
    opacity: 0.6;
    scale: 1;
  }
  100% {
    opacity: 1;
    scale: 1.15;
  }
}
.section-hero-content {
  position: relative;
  z-index: 1;
  max-width: 960px;
}
.section-hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--space-sm);
  padding: 6px 16px;
  border-radius: 100px;
}
.section-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  /* Fixed 2-line height so hero is consistent across all sections */
  min-height: 2.3em;
}
.section-hero-lead {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 620px;
  /* Fixed 3-line height for consistent hero sizing across all sections */
  min-height: 4.95em;
}

/* Per-section glow */
.section-hero[data-section="blog"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(249, 124, 0, 0.18) 0%,
    rgba(249, 124, 0, 0.08) 40%,
    transparent 70%
  );
}
.section-hero[data-section="usecases"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(140, 181, 1, 0.18) 0%,
    rgba(140, 181, 1, 0.08) 40%,
    transparent 70%
  );
}
.section-hero[data-section="explore"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(249, 124, 0, 0.18) 0%,
    rgba(249, 124, 0, 0.08) 40%,
    transparent 70%
  );
}
.section-hero[data-section="learn"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(140, 181, 1, 0.18) 0%,
    rgba(140, 181, 1, 0.08) 40%,
    transparent 70%
  );
}
.section-hero[data-section="discover"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(239, 86, 75, 0.18) 0%,
    rgba(239, 86, 75, 0.08) 40%,
    transparent 70%
  );
}
.section-hero[data-section="services"] .section-hero-glow {
  background: radial-gradient(
    circle,
    rgba(14, 127, 136, 0.18) 0%,
    rgba(0, 159, 147, 0.08) 40%,
    transparent 70%
  );
}

/* Per-section label colors */
.section-hero[data-section="blog"] .section-hero-label {
  color: var(--visma-orange);
  border: 1px solid rgba(249, 124, 0, 0.3);
}
.section-hero[data-section="usecases"] .section-hero-label {
  color: var(--visma-lime);
  border: 1px solid rgba(140, 181, 1, 0.3);
}
.section-hero[data-section="explore"] .section-hero-label {
  color: var(--visma-orange);
  border: 1px solid rgba(249, 124, 0, 0.3);
}
.section-hero[data-section="learn"] .section-hero-label {
  color: var(--visma-lime);
  border: 1px solid rgba(140, 181, 1, 0.3);
}
.section-hero[data-section="discover"] .section-hero-label {
  color: var(--visma-coral);
  border: 1px solid rgba(239, 86, 75, 0.3);
}
.section-hero[data-section="services"] .section-hero-label {
  color: var(--visma-green);
  border: 1px solid rgba(14, 127, 136, 0.3);
}

/* Per-section gradient text */
.hero-grad-explore {
  background: linear-gradient(135deg, var(--visma-orange) 0%, #ffb347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-grad-learn {
  background: linear-gradient(135deg, var(--visma-lime) 0%, #b8e046 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-grad-discover {
  background: linear-gradient(135deg, var(--visma-coral) 0%, #ff8a80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-grad-services {
  background: linear-gradient(
    135deg,
    var(--visma-green) 0%,
    var(--visma-turquoise) 50%,
    var(--visma-orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section hero responsive */
@media (max-width: 600px) {
  .section-hero {
    padding: var(--space-xl) 0 var(--space-md);
    min-height: auto;
  }
  .section-hero-title {
    min-height: auto;
  }
  .section-hero-lead {
    min-height: auto;
  }
}

/* ========================================
   LOADING STATE
   ======================================== */

.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.app-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--visma-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   FIREBASE ERROR BANNER
   ======================================== */

.firebase-error-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(249, 124, 0, 0.1);
  border: 1px solid rgba(249, 124, 0, 0.3);
  border-radius: var(--radius-md);
  color: var(--visma-orange);
  font-size: 0.85rem;
  margin: var(--space-sm) auto;
  max-width: 600px;
}

.firebase-error-banner button {
  background: rgba(249, 124, 0, 0.15);
  border: 1px solid rgba(249, 124, 0, 0.3);
  color: var(--visma-orange);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  white-space: nowrap;
}

.firebase-error-banner button:hover {
  background: rgba(249, 124, 0, 0.25);
}

.firebase-error-banner .banner-text {
  flex: 1;
}

.version-update-banner {
  position: fixed;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(14, 127, 136, 0.15);
  border: 1px solid rgba(14, 127, 136, 0.4);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  max-width: calc(100vw - var(--space-lg));
}

.version-update-banner .banner-text {
  flex: 1;
}

.version-update-banner button {
  background: var(--visma-green);
  border: 1px solid var(--visma-green);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  white-space: nowrap;
}

.version-update-banner button:hover {
  background: var(--visma-turquoise);
  border-color: var(--visma-turquoise);
}

.version-update-banner .banner-dismiss {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.version-update-banner .banner-dismiss:hover {
  background: transparent;
  color: var(--color-text);
}

/* ========================================
   COURSES PAGE
   ======================================== */

.courses-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-lg);
}

.courses-hero {
  text-align: center;
  margin-bottom: var(--space-md);
  padding: var(--space-md) 0 var(--space-sm);
}

.courses-hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--visma-green);
  margin-bottom: var(--space-xs);
}

.courses-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.courses-hero-sub {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

.courses-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* --- Course featured card --- */
.course-featured {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.course-featured:hover {
  border-color: var(--visma-green);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.course-featured:hover .course-card-cover {
  transform: scale(1.03);
}

.course-featured:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.course-featured-visual {
  height: 280px;
  background: var(--color-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.course-featured-body {
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.course-featured-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.course-featured-desc {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Course list rows --- */
.course-list-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.course-row {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s var(--ease-out);
}

.course-row:hover {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  margin-left: calc(-1 * var(--space-md));
  margin-right: calc(-1 * var(--space-md));
}

.course-row:hover .course-card-cover {
  transform: scale(1.05);
}

.course-row:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.course-row-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 112px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.course-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.course-row-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-row-desc {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: auto;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.course-card:hover {
  border-color: var(--visma-green);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(14, 127, 136, 0.12);
}

.course-card:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.course-card-visual {
  height: 140px;
  background: var(--color-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.course-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.course-card:hover .course-card-cover {
  transform: scale(1.04);
}

.course-card-placeholder {
  color: var(--color-text-muted);
  opacity: 0.4;
}

.course-card-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.course-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.35;
}

.course-card-desc {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 0.25rem;
}

.course-card-meta span + span::before {
  content: "·";
  margin-right: var(--space-sm);
  opacity: 0.4;
}

.course-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.course-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  background: var(--color-accent-subtle);
  color: var(--visma-green);
  border-radius: var(--radius-sm, 6px);
}

.courses-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-lg) 0;
  color: var(--color-text-secondary);
}

.courses-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--visma-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-xs);
}

.courses-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-text-secondary);
}

.courses-empty svg {
  color: var(--color-text-muted);
  opacity: 0.4;
  margin-bottom: var(--space-sm);
}

.courses-empty h3 {
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.courses-empty p {
  margin: 0;
}

@media (max-width: 640px) {
  .courses-page {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }

  .courses-hero {
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
  }

  .course-featured-visual {
    height: 180px;
  }

  .course-featured-title {
    font-size: 1.3rem;
  }

  .course-featured-body {
    padding: var(--space-md);
  }

  .course-row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .course-row-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .course-row:hover {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
  }
}

/* ========================================
   COURSE CARD STATUS BADGES & PROGRESS
   ======================================== */

.course-card-visual {
  position: relative;
}

.course-card-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.course-card-badge--completed {
  background: rgba(140, 181, 1, 0.85);
  color: var(--color-text);
  border: 1px solid rgba(140, 181, 1, 0.9);
}

.course-card-badge--in-progress {
  background: rgba(249, 124, 0, 0.85);
  color: var(--color-text);
  border: 1px solid rgba(249, 124, 0, 0.9);
}

.course-card-badge--deactivated {
  background: rgba(148, 163, 184, 0.9);
  color: #1e293b;
}

.course-card-progress {
  height: 3px;
  background: var(--color-border);
}

.course-card-progress-fill {
  height: 100%;
  background: var(--visma-green);
  transition: width 0.3s var(--ease-out);
}

.course-card-leave {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.course-card-leave:hover {
  color: var(--visma-coral);
  border-color: var(--visma-coral);
}
.course-card-leave:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.course-card.is-leaving {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s, transform 0.3s;
}

.course-card-enroll {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--visma-green);
  border: 1px solid var(--visma-green);
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.course-card:hover .course-card-enroll {
  background: var(--visma-green);
  color: #fff;
}

/* ========================================
   COURSE FILTERS
   ======================================== */

.courses-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.courses-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.courses-tag-filters {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  padding-bottom: 2px;
}

.courses-tag-filters::-webkit-scrollbar {
  height: 4px;
}

.courses-tag-filters::-webkit-scrollbar-track {
  background: transparent;
}

.courses-tag-filters::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.filter-chip--tag {
  font-size: 0.65rem;
}

@media (max-width: 640px) {
  .courses-status-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* ========================================
   PROFILE PAGE
   ======================================== */

.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--visma-green), var(--visma-turquoise));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.profile-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}

.profile-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.profile-team-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 127, 136, 0.15);
  color: var(--visma-green);
  border: 1px solid rgba(14, 127, 136, 0.3);
  width: fit-content;
}

.profile-section {
  margin-bottom: var(--space-xl);
}

.profile-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-section-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-surface-elevated);
  color: var(--color-text-muted);
}

/* Certificates grid */

.profile-certs-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.profile-cert-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s var(--ease-out);
}

.profile-cert-card:hover {
  border-color: var(--color-border-strong);
}

.profile-cert-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(140, 181, 1, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--visma-lime);
}

.profile-cert-info {
  flex: 1;
  min-width: 0;
}

.profile-cert-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.profile-cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.profile-cert-id {
  color: var(--visma-green);
}

.profile-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--visma-green);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.profile-cert-btn:hover {
  border-color: var(--visma-green);
  background: var(--color-accent-subtle);
}

/* Learning history */

.profile-history {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-history-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.profile-history-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-border-strong);
  flex-shrink: 0;
  margin-top: 4px;
}

.profile-history-dot--completed {
  background: var(--visma-lime);
  border-color: var(--visma-lime);
}

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

.profile-history-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s;
}

.profile-history-title:hover {
  color: var(--visma-green);
}

.profile-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.profile-history-status {
  color: var(--visma-orange);
}

.profile-history-status--completed {
  color: var(--visma-lime);
}

.profile-history-progress {
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  margin-top: var(--space-xs);
}

.profile-history-progress-fill {
  height: 100%;
  background: var(--visma-green);
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

/* Profile empty states */

.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
}

.profile-empty svg {
  opacity: 0.4;
}

.profile-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* Profile dropdown item style */

.user-dropdown-item[href="/profile"] {
  text-decoration: none;
  color: var(--color-text);
}

.user-dropdown-item[href="/profile"]:hover {
  background: var(--color-surface-hover);
}

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .profile-cert-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-cert-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   COURSE PLAYER
   ======================================== */

/* Remove main padding and overflow when course player is active to avoid double scrollbar */
html:has(body.course-player-active),
body.course-player-active {
  overflow: hidden;
  height: 100%;
}

body.course-player-active .main {
  padding: 0;
  max-width: none;
  overflow: hidden;
  height: calc(100vh - 64px);
}

.course-player-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.course-player-iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  background: var(--color-bg);
}

.course-cert-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem auto 0.5rem;
  padding: 0.625rem 1.25rem;
  background: #B8963E;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.course-cert-print-btn:hover {
  background: #D4A853;
}

.course-cert-print-btn:focus-visible {
  outline: 2px solid #D4A853;
  outline-offset: 2px;
}

@media print {
  .course-cert-print-btn,
  .course-player-back {
    display: none !important;
  }
}

.course-player-back {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6rem 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100;
  transition: border-color 0.15s, background-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.course-player-back:hover {
  border-color: var(--visma-green);
  background: var(--color-surface-elevated);
}

.course-player-back:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.course-player-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-secondary);
  gap: var(--space-sm);
}

.course-player-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: var(--space-xl);
}

.course-player-error h2 {
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.course-player-error p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.course-player-error-link {
  color: var(--visma-green);
  font-weight: 600;
  text-decoration: none;
}

.course-player-error-link:hover {
  text-decoration: underline;
}

.course-deactivated-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.course-deactivated-banner svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ─── Course Enrollment Banner ─── */
.course-enroll-banner {
  flex-shrink: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  padding: var(--space-md) var(--space-lg);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.course-enroll-banner-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.course-enroll-banner-text {
  flex: 1;
  min-width: 0;
}

.course-enroll-banner-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem;
}

.course-enroll-banner-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.course-enroll-banner-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.course-enroll-banner-back {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.course-enroll-banner-back:hover {
  color: var(--color-text);
  background: var(--color-surface-elevated);
}

.course-enroll-banner-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.5rem;
  background: var(--visma-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}

.course-enroll-banner-cta:hover {
  background: var(--visma-turquoise);
  transform: translateY(-1px);
}

.course-enroll-banner-cta:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

.course-enroll-banner-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.course-enroll-banner-dismiss {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
  transition: color 0.15s;
}

.course-enroll-banner-dismiss:hover {
  color: var(--color-text-secondary);
}

.course-enroll-banner--enrolled {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

@media (max-width: 640px) {
  .course-player-back span {
    display: none;
  }

  .course-player-back {
    bottom: var(--space-md);
    left: var(--space-md);
    padding: 0.5rem;
  }

  .course-enroll-banner {
    padding: var(--space-sm) var(--space-md);
  }

  .course-enroll-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    text-align: center;
  }

  .course-enroll-banner-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .course-enroll-banner-cta {
    width: 100%;
    padding: 0.75rem;
  }
}

/* ==========================================================================
   TEAM MANAGEMENT PAGE
   ========================================================================== */

.team-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.team-header {
  margin-bottom: var(--space-lg);
}

.team-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.team-subtitle {
  color: var(--color-text-secondary);
  margin: 0;
}

/* Stat cards */
.team-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.team-stat-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
  color: inherit;
  font: inherit;
}

.team-stat-card:hover {
  border-color: var(--color-text-muted);
  background: var(--color-surface-elevated);
}

.team-stat-card.active {
  border-color: var(--visma-green);
  background: color-mix(in srgb, var(--visma-green) 8%, var(--color-surface));
}

.team-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.25rem;
}

.team-stat-card.active .team-stat-value {
  color: var(--visma-green);
}

.team-stat-label {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

/* Table */
.team-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-lg);
}

.team-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.team-table tbody tr {
  transition: background 0.15s ease;
}

.team-table tbody tr:hover {
  background: var(--color-surface-elevated);
}

.team-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

/* Member cell */
.team-member-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.team-member-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.team-member-name {
  font-weight: 600;
  color: var(--color-text);
}

.team-member-email {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* Role badge */
.team-role-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.team-role-badge.admin {
  background: var(--visma-green);
  color: #fff;
}

.team-role-badge.member {
  background: var(--color-surface-elevated);
  color: var(--color-text);
}

/* Status */
.team-status {
  font-size: 0.85rem;
}

.team-status.active {
  color: var(--visma-lime);
}

.team-status.pending {
  color: var(--visma-yellow);
}

/* Actions cell */
.team-actions-cell {
  text-align: right;
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.team-btn {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.team-btn:hover {
  background: var(--color-surface-elevated);
}

.team-btn.remove {
  border-color: color-mix(in srgb, var(--visma-coral) 30%, transparent);
  color: var(--visma-coral);
}

.team-btn.remove:hover {
  background: color-mix(in srgb, var(--visma-coral) 10%, transparent);
}

/* Modal */
.team-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.team-modal {
  background: var(--color-surface);
  border-radius: 12px;
  padding: var(--space-xl);
  max-width: 450px;
  width: 90%;
}

.team-modal h2 {
  margin: 0 0 var(--space-lg);
}

/* Email input row */
.team-email-input {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-md);
}

.team-email-input input {
  flex: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0.6rem 0.75rem;
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
}

.team-email-input input:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

.team-email-suffix {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Role select */
.team-role-select {
  margin-bottom: var(--space-lg);
}

.team-role-select label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.team-role-select select {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.6rem;
  color: var(--color-text);
  font-size: 0.9rem;
}

/* Modal error */
.team-modal-error {
  color: var(--visma-coral);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
  padding: 0.5rem;
  background: color-mix(in srgb, var(--visma-coral) 10%, transparent);
  border-radius: 6px;
}

.team-modal-error.hidden {
  display: none;
}

/* Modal actions */
.team-modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--color-text-muted);
}

/* Team management responsive */
@media (max-width: 768px) {
  .team-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .team-stats {
    grid-template-columns: 1fr;
  }

  .team-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* Primary button */
.btn-primary {
  background: var(--visma-green);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--visma-turquoise);
}

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

.btn-primary:focus-visible {
  outline: 2px solid var(--visma-green);
  outline-offset: 2px;
}

/* Team toast notifications */
.team-toast {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--visma-green);
  color: var(--color-text);
  animation: team-toast-in 0.2s ease-out;
}

.team-toast-error {
  border-color: var(--visma-coral);
  background: color-mix(in srgb, var(--visma-coral) 10%, var(--color-surface));
  color: var(--visma-coral);
}

@keyframes team-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.team-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Report Tab ─────────────────────────────────────────────────────────── */

.report-container {
  max-width: 720px;
  padding: var(--space-lg) 0;
}

.report-loading {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.report-error {
  color: var(--visma-coral);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.report-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.report-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin: 0;
}

.report-copy-btn {
  flex-shrink: 0;
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.report-copy-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.report-copy-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.report-section {
  margin-bottom: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.report-section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface);
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.report-section-body {
  background: var(--color-bg);
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-md);
}

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

.report-row--highlight {
  background: color-mix(in srgb, var(--color-accent) 6%, transparent);
}

.report-row-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  min-width: 0;
}

.report-row-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  text-align: right;
  flex-shrink: 0;
}

.report-row--highlight .report-row-value {
  color: var(--color-accent);
  font-weight: 600;
}

.report-generated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  text-align: right;
}

@media print {
  .analytics-tabs,
  .analytics-range-row,
  .report-copy-btn {
    display: none !important;
  }

  .report-container {
    max-width: 100%;
  }

  .report-section {
    border-color: #ccc;
    break-inside: avoid;
  }

  .report-section-title {
    background: #f0f0f0;
    color: #333;
  }

  .report-section-body {
    background: #fff;
  }

  .report-row {
    border-color: #ddd;
  }

  .report-row-label,
  .report-row-value {
    color: #000;
  }

  .report-row--highlight .report-row-value {
    color: #0E7F88;
  }

  .report-title,
  .report-period,
  .report-generated {
    color: #000;
  }
}

/* ========================================
   PRESENTATIONS PAGE
   ======================================== */

.pres-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-lg);
}

.pres-hero {
  text-align: center;
  margin-bottom: var(--space-md);
  padding: var(--space-md) 0 var(--space-sm);
}

.pres-hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--visma-green);
  margin-bottom: var(--space-xs);
}

.pres-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.pres-hero-sub {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.pres-back-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

.pres-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Toolbar — upload button left, filters right, sticky under hero */
.pres-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  padding: var(--space-md) 0;
}

.pres-toolbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
  flex: 1;
  max-width: 400px;
}

.pres-upload-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Upload modal */
.pres-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.pres-upload-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: var(--space-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 2 * var(--space-md));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pres-upload-modal-form {
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-right: -0.25rem;
}

.pres-upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.pres-upload-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.pres-upload-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: color 0.15s;
}

.pres-upload-close:hover {
  color: var(--color-text);
}

.pres-upload-modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.pres-form-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.pres-upload-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: var(--space-xs);
}

.pres-title-input,
.pres-description-input,
.pres-year-input,
.pres-tag-custom-input,
.pres-form-select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pres-title-input::placeholder,
.pres-description-input::placeholder,
.pres-tag-custom-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.pres-title-input:focus-visible,
.pres-description-input:focus-visible,
.pres-year-input:focus-visible,
.pres-tag-custom-input:focus-visible,
.pres-form-select:focus-visible {
  outline: none;
  border-color: var(--visma-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--visma-green) 20%, transparent);
}

.pres-description-input {
  resize: vertical;
  min-height: 4.5rem;
  font-family: var(--font-body);
  line-height: 1.5;
}

.pres-year-input {
  width: 9rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.pres-year-input::-webkit-outer-spin-button,
.pres-year-input::-webkit-inner-spin-button {
  opacity: 0.6;
}

.pres-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem;
  background: color-mix(in srgb, var(--color-surface-elevated) 55%, transparent);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.pres-tag-custom-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.pres-tag-custom-row .pres-tag-custom-input {
  flex: 1;
}

.pres-tag-custom-row .pres-btn {
  white-space: nowrap;
}

.pres-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: none;
  margin-left: 0.4rem;
  font-weight: 400;
}

.pres-upload-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--visma-green) 6%, transparent);
  border-left: 2px solid var(--visma-green);
  border-radius: 4px;
}

.pres-file-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.pres-file-input {
  display: none;
}

.pres-file-btn {
  padding: 0.55rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: border-color 0.15s;
}

.pres-file-label:hover .pres-file-btn {
  border-color: var(--visma-green);
}

.pres-file-name {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pres-submit-btn {
  padding: 0.55rem 1.2rem;
  background: var(--visma-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.pres-submit-btn:hover {
  background: var(--visma-turquoise);
}

.pres-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Pagination */
.pres-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-md);
  padding: var(--space-xs) 0;
}

.pres-pagination-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.pres-page-btns {
  display: flex;
  gap: 0.3rem;
}

.pres-page-btn {
  min-width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.pres-page-btn:hover {
  border-color: var(--visma-green);
  color: var(--color-text);
}

.pres-page-btn.active {
  background: var(--visma-green);
  border-color: var(--visma-green);
  color: #fff;
}

.pres-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.pres-search-bar .search-icon {
  position: absolute;
  left: 0.8rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.pres-search-input {
  width: 100%;
  padding: 0.6rem 0.8rem 0.6rem 2.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.pres-search-input:focus {
  outline: none;
  border-color: var(--visma-green);
}

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

.pres-uploader-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Grid */
.pres-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pres-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  transition: border-color 0.15s;
}

.pres-card:hover {
  border-color: var(--color-text-muted);
}

.pres-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-elevated);
  border-radius: 14px;
  color: var(--visma-green);
}

.pres-card-body {
  flex: 1;
  min-width: 0;
}

.pres-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pres-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.pres-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Buttons */
.pres-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.pres-btn--primary {
  background: var(--visma-green);
  color: #fff;
}

.pres-btn--primary:hover {
  background: var(--visma-turquoise);
}

.pres-btn--secondary {
  background: var(--color-surface-elevated);
  color: var(--color-text);
  border-color: var(--color-border);
}

.pres-btn--secondary:hover {
  border-color: var(--visma-green);
}

.pres-btn--danger {
  background: transparent;
  color: var(--visma-coral);
  border-color: transparent;
}

.pres-btn--danger:hover {
  background: rgba(239, 86, 75, 0.1);
  border-color: var(--visma-coral);
}

.pres-btn--danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: auto;
}

.card-visibility-select {
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  background: var(--color-surface-elevated);
  color: var(--color-text);
  cursor: pointer;
}

.card-visibility-select:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Version badge */
.pres-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  background: var(--visma-green);
  color: #fff;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Version list */
.pres-version-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}

.pres-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
}

.pres-version-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pres-version-uploader {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
}

.pres-version-date {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.pres-version-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Empty state */
.pres-empty {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-text-muted);
}

.pres-empty svg {
  margin-bottom: var(--space-sm);
  opacity: 0.4;
}

.pres-empty h3 {
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.pres-empty p {
  margin: 0;
}

/* Loading */
.pres-loading {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .pres-toolbar {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .pres-toolbar-right {
    max-width: none;
    align-items: stretch;
  }

  .pres-card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .pres-card-icon {
    display: none;
  }

  .pres-card-actions {
    flex-wrap: wrap;
  }

  .pres-file-name {
    max-width: 150px;
  }

  .pres-version-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .pres-upload-modal {
    margin: var(--space-sm);
    padding: var(--space-md);
  }

  .pres-pagination {
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
  }
}

/* Presentations Hub — Wave 2 additions */

.pres-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pres-tag-chip:hover {
  background: var(--color-surface-elevated);
  border-color: var(--visma-turquoise);
}

.pres-tag-chip:focus-visible {
  outline: 2px solid var(--visma-turquoise);
  outline-offset: 2px;
}

.pres-tag-chip.active {
  background: var(--visma-green);
  color: white;
  border-color: var(--visma-green);
}

.pres-tag-chip--custom {
  font-style: italic;
}

.pres-year-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pres-year-chip:hover {
  background: var(--color-surface-elevated);
  border-color: var(--visma-turquoise);
}

.pres-year-chip:focus-visible {
  outline: 2px solid var(--visma-turquoise);
  outline-offset: 2px;
}

.pres-year-chip.active {
  background: var(--visma-green);
  color: white;
  border-color: var(--visma-green);
}

.pres-sort-select {
  background: var(--color-surface-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pres-sort-select:hover {
  border-color: var(--visma-turquoise);
}

.pres-sort-select:focus-visible {
  outline: 2px solid var(--visma-turquoise);
  outline-offset: 2px;
  border-color: var(--visma-turquoise);
}

.pres-description {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.25rem;
}

.pres-viewer-header {
  margin-bottom: var(--space-md);
}

.pres-viewer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.pres-viewer-meta-row .pres-card-meta {
  margin: 0;
}

.pres-viewer-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pres-viewer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.pres-viewer-split {
  display: flex;
  gap: var(--space-md);
  width: 100%;
}

@media (max-width: 768px) {
  .pres-viewer-split {
    flex-direction: column;
  }
}

.pres-viewer-pane {
  flex: 1;
  min-height: 70vh;
  border: 1px solid var(--color-border);
  border-radius: var(--space-sm);
  background: var(--color-surface);
}

.pres-video-player {
  flex: 1;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: var(--space-sm);
}

.pres-edit-metadata-btn {
  background: var(--color-surface-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pres-edit-metadata-btn:hover {
  border-color: var(--visma-green);
  color: var(--color-text);
}

.pres-edit-metadata-btn:focus-visible {
  outline: 2px solid var(--visma-turquoise);
  outline-offset: 2px;
}

.pres-filter-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.pres-filter-panel.open {
  max-height: 500px;
}

@media (prefers-reduced-motion: reduce) {
  .pres-filter-panel {
    transition: none;
  }
}

/* =========================================================================
   Chat widget — etgo.ai content guide
   Floating button bottom-right, expands to a side drawer.
   ========================================================================= */

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  font-family: var(--font-body, system-ui);
}

.chat-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 4px var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}
.chat-fab:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}
.chat-fab:focus-visible {
  outline: 2px solid var(--color-accent-hover);
  outline-offset: 2px;
}

.chat-drawer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 70vh;
  max-height: 640px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.chat-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.chat-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}
.chat-close {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}
.chat-close:hover {
  color: var(--color-text);
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.chat-new-chat {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  border-radius: 4px;
  line-height: 1;
}
.chat-new-chat:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scrollbar-width: thin;
}

.chat-msg {
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  word-wrap: break-word;
}
.chat-msg-system {
  background: var(--color-accent-subtle);
  color: var(--color-text-secondary);
  font-style: normal;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--color-accent);
  color: var(--color-text);
  max-width: 85%;
}
.chat-msg-assistant {
  align-self: flex-start;
  background: var(--color-surface-elevated);
  color: var(--color-text);
  max-width: 92%;
}
.chat-msg-error {
  background: rgba(239, 86, 75, 0.15);
  color: var(--visma-coral);
  border: 1px solid rgba(239, 86, 75, 0.3);
}
.chat-thinking {
  color: var(--color-text-secondary);
  font-style: italic;
}

.chat-msg-body p {
  margin: 0 0 0.5rem 0;
}
.chat-msg-body p:last-child {
  margin-bottom: 0;
}
.chat-msg-body ul,
.chat-msg-body ol {
  margin: 0.4rem 0 0.4rem 1.1rem;
  padding: 0;
}
.chat-msg-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.chat-citation-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--color-accent-subtle);
  color: var(--color-accent-hover);
  border-radius: 4px;
  padding: 0 0.35rem;
  margin: 0 0.1rem;
  text-decoration: none;
  vertical-align: baseline;
  cursor: pointer;
  transition: background 120ms var(--ease-out);
}
.chat-citation-chip:hover {
  background: var(--color-accent);
  color: var(--color-text);
}

.chat-citations {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.chat-citations-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-citation-link {
  display: flex;
  gap: 0.45rem;
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--color-text-secondary);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 120ms var(--ease-out);
}
.chat-citation-link:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}
.chat-citation-index {
  color: var(--color-accent-hover);
  font-weight: 600;
  flex-shrink: 0;
}
.chat-citation-title {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.3rem;
}
.chat-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
}
.chat-article-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.chat-article-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 120ms var(--ease-out), background 120ms var(--ease-out);
}
.chat-article-card:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
}
.chat-article-section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.chat-article-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}
.chat-article-sub {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.chat-input-row {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid var(--color-border);
  align-items: flex-end;
}
.chat-input {
  flex: 1 1 auto;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
}
.chat-input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.chat-send {
  background: var(--color-accent);
  border: none;
  color: var(--color-text);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms var(--ease-out);
}
.chat-send:hover:not(:disabled) {
  background: var(--color-accent-hover);
}
.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .chat-drawer {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: none;
  }
}
