/* ═══════════════════════════════════════════════════════════════════ */
/* SkrivSikkert — Blød Bølge Design System                           */
/* Delt CSS for alle sider. Importér denne fil, opfind ikke egne.    */
/* Reference: skrivsikkert-design-system.md                          */
/* Sidst opdateret: 2026-05-04                                       */
/* ═══════════════════════════════════════════════════════════════════ */

/* ── Reset ── */
/*
 * BEVIDST GLOBAL RESET - skrivsikkert-shared.css er base for alle sider.
 * Denne reset erstatter en dedikeret reset.css.
 * button outline:none kompenseres af :focus-visible regler i sidebar og shell.
 * Dokumenteret 2026-05-03 i ISSUES.md.
 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

/* ── Tokens ── */
:root {
  /* Baggrunde */
  --cream: #FAF7F3;
  --white: #FFFEFB;
  --sidebar-bg: #FCF9F6;
  --sidebar-border: #E8E0D8;
  --pill-bg: #F0EAE4;
  --divider: #E4DCD4;

  /* Tekst */
  --warm-text: #5C4D43;
  --warm-text-light: #8A7E72;
  --muted: #B8A898;
  --muted-light: #C8BEB2;
  --icon-active: #4A4044;
  --icon-inactive: #B8ACA0;

  /* Rose (handling/opgaver) */
  --rose: #D4A89A;
  --rose-dark: #9B6050;
  --rose-light: #F4E8E2;
  --rose-bg: #FBF3F0;

  /* Sage (kommunikation/email) */
  --sage: #A8C5B8;
  --sage-dark: #4A7A68;
  --sage-text: #3D6B57;
  --sage-light: #E0EDE6;
  --sage-bg: #F2F8F5;

  /* Slate (tid/kalender) */
  --slate: #A8B0C4;
  --slate-dark: #4E5370;
  --slate-light: #E0E4EE;
  --slate-bg: #F2F4F8;

  /* Kort-baggrunde */
  --card-todo-bg: #FDF7F3;
  --card-email-bg: #F5FAF7;
  --card-calendar-bg: #F5F7FC;

  /* Andet */
  --avatar-dark: #3A2E42;
  --online-green: #6BCB8A;
  --star-gold: #D4A060;

  /* Typography */
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --text-h1: 32px;
  --text-h2: 22px;
  --text-h3: 18px;
  --text-body: 14px;
  --text-small: 13px;
  --text-label: 13px;
  --weight-heading: 600;
  --weight-body: 400;
  --weight-label: 500;
  --lh-h1: 1.3;
  --lh-h2: 1.35;
  --lh-h3: 1.4;
  --lh-body: 1.5;
  --lh-small: 1.45;
  --lh-label: 1.4;
  --lh-heading: var(--lh-h1);
  --letter-spacing-heading: -0.02em;
  --letter-spacing-body: 0;
  --ls-heading: var(--letter-spacing-heading);
  --font-title: var(--font-heading);

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(92, 77, 67, 0.04), 0 4px 16px rgba(92, 77, 67, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(92, 77, 67, 0.06), 0 8px 24px rgba(92, 77, 67, 0.1);
  --shadow-button-hover: 0 4px 14px rgba(155, 96, 80, 0.18);
  --shadow-btn-hover: var(--shadow-button-hover);
  --shadow-focus: 0 0 0 3px rgba(212, 168, 154, 0.16);
  --shadow-ai: 0 2px 8px rgba(212, 168, 154, 0.35);
  --shadow-ai-hover: 0 4px 16px rgba(212, 168, 154, 0.45);
  --shadow-nav: 0 2px 8px rgba(92, 77, 67, 0.07);
  --shadow-input: 0 1px 3px rgba(92, 77, 67, 0.04);
  --shadow-input-focus: 0 0 0 2px rgba(212, 168, 154, 0.4), 0 2px 12px rgba(92, 77, 67, 0.08);
  --shadow-send-hover: 0 4px 16px rgba(212, 168, 154, 0.35);
  --shadow-quick-hover: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* Radius */
  --radius-card: 18px;
  --radius-button: 12px;
  --radius-btn: var(--radius-button);
  --radius-input: 12px;
  --radius-modal: 20px;
  --radius-pill: 999px;
  --radius-checkbox: 4px;

  /* Motion */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --hover-scale: scale(1.02);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --button-height: 44px;
  --button-padding: 10px 20px;
  --btn-height: var(--button-height);
  --btn-padding: var(--button-padding);
  --input-height: 44px;
  --card-padding: 24px;
  --card-padding-mobile: 16px;

  /* Z-index */
  --z-base: 1;
  --z-sidebar: 100;
  --z-tooltip: 110;
  --z-dropdown: 200;
  --z-overlay: 1000;
  --z-modal: 1001;
  --z-toast: 2000;
  --z-skip-link: 9000;
  --z-skip: var(--z-skip-link);
}

/* Dark-mode token overrides */
[data-theme="dark"] {
  /* Backgrounds */
  --cream: #1c1b18;
  --white: #232220;
  --sidebar-bg: #1a1918;
  --sidebar-border: rgba(232, 221, 212, 0.08);
  --pill-bg: rgba(255, 255, 255, 0.06);
  --divider: rgba(232, 221, 212, 0.08);

  /* Text */
  --warm-text: #E8DDD4;
  --warm-text-light: #B8ACA3;
  --muted: #8A7E72;
  --muted-light: #6B5E52;
  --icon-active: #D8CFC5;
  --icon-inactive: #6B5E52;

  /* Rose */
  --rose: #D4A89A;
  --rose-dark: #E8B8A8;
  --rose-light: rgba(212, 168, 154, 0.15);
  --rose-bg: rgba(212, 168, 154, 0.08);

  /* Sage */
  --sage: #A8C5B8;
  --sage-dark: #7CB8A4;
  --sage-text: #A8C5B8;
  --sage-light: rgba(168, 197, 184, 0.15);
  --sage-bg: rgba(168, 197, 184, 0.08);

  /* Slate */
  --slate: #A8B0C4;
  --slate-dark: #8E96B0;
  --slate-light: rgba(168, 176, 196, 0.15);
  --slate-bg: rgba(168, 176, 196, 0.08);

  /* Cards */
  --card-todo-bg: rgba(212, 168, 154, 0.06);
  --card-email-bg: rgba(168, 197, 184, 0.06);
  --card-calendar-bg: rgba(168, 176, 196, 0.06);

  /* Other */
  --avatar-dark: #E8DDD4;
  --online-green: #6BCB8A;
  --star-gold: #D4A060;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-button-hover: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-btn-hover: var(--shadow-button-hover);
  --shadow-focus: 0 0 0 3px rgba(212, 168, 154, 0.2);
  --shadow-ai: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-ai-hover: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-input: 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-input-focus: 0 0 0 2px rgba(212, 168, 154, 0.3), 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow-send-hover: 0 4px 16px rgba(212, 168, 154, 0.25);
  --shadow-quick-hover: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Focus utility — standard warm-rose ring for all interactive elements */
.focus-ring:focus-visible {
  outline: none;
}

/* Base reduced-motion: kill all animations/transitions for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ── Base ── */
html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--warm-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.app {
  display: flex;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 74% 18%, rgba(212, 168, 154, 0.055) 0%, transparent 48%),
    radial-gradient(ellipse at 22% 86%, rgba(168, 197, 184, 0.045) 0%, transparent 48%),
    linear-gradient(180deg, #FAF7F3 0%, var(--pill-bg, #F0EAE4) 100%);
}

.app::before {
  content: none;
  display: none;
  background-image: none;
}

[data-theme="dark"] .app::before {
  display: none;
  background-image: none;
}

/* ── Sidebar ──
   Scoped via #bb-sidebar so no external stylesheet can override.
   All pages must use <nav id="bb-sidebar" class="sidebar">.
   This is the ONE canonical sidebar - do NOT duplicate in page CSS. */

#bb-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 104px;
  min-width: 104px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 100px 0 24px;
  border-right: 0;
  background: transparent;
  z-index: 100;
  overflow: visible;
  box-shadow: none;
  transition: none;
  color: var(--warm-text);
  isolation: isolate;
}

#bb-sidebar a {
  text-decoration: none;
  color: inherit;
}

.app > #bb-sidebar {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  height: 100vh;
}

#bb-sidebar::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 18px;
  width: 64px;
  height: 492px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.92) 0%, rgba(252, 249, 246, 0.82) 100%);
  border: 1px solid rgba(228, 220, 212, 0.9);
  box-shadow:
    0 18px 45px rgba(92, 77, 67, 0.08),
    0 2px 8px rgba(92, 77, 67, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -28px 45px rgba(244, 232, 226, 0.25);
  pointer-events: none;
  z-index: 1;
}

#bb-sidebar > * {
  position: relative;
  z-index: 2;
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  z-index: 1100;
  transition: transform 0.2s ease, filter 0.2s ease;
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo .bb-sidebar-tooltip-target {
  position: absolute;
  inset: 0;
  z-index: 110;
  pointer-events: none;
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo .bb-sidebar-tooltip-target::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  z-index: var(--z-tooltip, 110);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--warm-text);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  max-width: min(200px, calc(100vw - 128px));
  white-space: normal;
  overflow-wrap: break-word;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

#bb-sidebar .sidebar-ai {
  background: linear-gradient(135deg, #D99A7A 0%, #C98A6A 100%);
  color: #FFFEFB;
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 0 18px 30px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(58, 47, 38, 0.06),
    0 4px 12px rgba(201, 138, 106, 0.18);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  text-decoration: none;
}

#bb-sidebar .sidebar-ai:hover {
  transform: scale(1.06);
  box-shadow:
    0 1px 2px rgba(58, 47, 38, 0.06),
    0 6px 16px rgba(201, 138, 106, 0.24);
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:focus-visible {
  outline: 2px solid rgba(155, 96, 80, 0.6);
  outline-offset: 3px;
}

#bb-sidebar .sidebar-ai:focus-visible,
#bb-sidebar .sidebar-icon:focus-visible,
#bb-sidebar .sidebar-mic:focus-visible,
#bb-sidebar .sidebar-avatar:focus-visible {
  outline: 2px solid var(--rose, #D4A89A);
  outline-offset: 3px;
}

#bb-sidebar .sidebar-ai-mark {
  font-size: 0;
}

#bb-sidebar .sidebar-ai-mark::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1.8C12.3 7.1 14.9 9.7 20.2 11C14.9 12.3 12.3 14.9 11 20.2C9.7 14.9 7.1 12.3 1.8 11C7.1 9.7 9.7 7.1 11 1.8Z' fill='%23FFFEFB'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#bb-sidebar .sidebar-nav {
  margin-left: 18px;
  width: 64px;
  padding: 0;
  gap: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  flex: none;
}

#bb-sidebar .sidebar-icon,
#bb-sidebar .sidebar-mic {
  width: 64px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #6B584D;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

#bb-sidebar .sidebar-icon::after,
#bb-sidebar .sidebar-mic::after {
  content: '';
  position: absolute;
  inset: 3px 15px;
  border-radius: 11px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.2s ease;
  z-index: 0;
}

#bb-sidebar .sidebar-icon svg,
#bb-sidebar .sidebar-mic svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

#bb-sidebar .sidebar-icon:hover,
#bb-sidebar .sidebar-mic:hover {
  color: var(--warm-text);
  background: transparent;
  transform: translateY(-1px);
}

#bb-sidebar .sidebar-icon.sidebar-icon:hover::after,
#bb-sidebar .sidebar-mic.sidebar-mic:hover::after {
  background: rgba(251, 243, 240, 0.88);
  border: 1px solid rgba(212, 168, 154, 0.35);
  opacity: 1;
}

#bb-sidebar .sidebar-icon.sidebar-icon.is-active::after,
#bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]::after {
  background: rgba(251, 243, 240, 0.92);
  border: 1px solid rgba(212, 168, 154, 0.5);
  box-shadow:
    0 2px 8px rgba(92, 77, 67, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  opacity: 1;
}

#bb-sidebar .sidebar-icon.sidebar-icon.is-active,
#bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"] {
  color: #4A4044;
}

#bb-sidebar .sidebar-icon.sidebar-icon.is-active::before,
#bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #D4A89A 0%, #C89888 100%);
  box-shadow: 0 0 6px rgba(212, 168, 154, 0.4);
  opacity: 1;
  z-index: 3;
  transition: opacity 0.2s ease, height 0.2s ease;
}

#bb-sidebar .sidebar-icon.sidebar-icon.is-active:hover,
#bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]:hover {
  transform: none;
  color: #4A4044;
}

#bb-sidebar .sidebar-icon.sidebar-icon.is-active:hover::after,
#bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]:hover::after {
  background: rgba(251, 243, 240, 0.95);
  border: 1px solid rgba(212, 168, 154, 0.55);
  box-shadow:
    0 2px 8px rgba(92, 77, 67, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 1;
}

#bb-sidebar .sidebar-icon[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.72;
  cursor: not-allowed;
}

#bb-sidebar .sidebar-badge {
  position: absolute;
  top: 5px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose-dark, #9B6050);
  pointer-events: none;
  z-index: 3;
}

#bb-sidebar .sidebar-badge[data-sidebar-badge="email"] {
  top: 8px;
  right: 17px;
  width: 10px;
  height: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #5f8d70;
  border: 2px solid rgb(255, 254, 251);
  box-shadow: 0 1px 1.5px rgba(58, 47, 38, 0.22);
  box-sizing: border-box;
  pointer-events: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
  display: block;
}

#bb-sidebar .sidebar-badge[data-sidebar-badge="opgaver"] {
  top: 8px;
  right: 17px;
  width: 10px;
  height: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #5f8d70;
  border: 2px solid rgb(255, 254, 251);
  box-shadow: 0 1px 1.5px rgba(58, 47, 38, 0.22);
  box-sizing: border-box;
  pointer-events: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
  display: block;
}

#bb-sidebar .sidebar-badge[hidden] {
  display: none;
}

#bb-sidebar .sidebar-mic {
  margin: 34px 0 0 18px;
}

#bb-sidebar .sidebar-mic::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 15px;
  width: 34px;
  height: 1px;
  background: rgba(212, 168, 154, 0.36);
}

#bb-sidebar .sidebar-mic--voice-active {
  color: #9B6050;
  background: rgba(212, 168, 154, 0.25);
  box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.3), 0 0 12px rgba(212, 168, 154, 0.2);
  animation: sidebar-mic-pulse 2s ease-in-out infinite;
}

@keyframes sidebar-mic-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.3), 0 0 12px rgba(212, 168, 154, 0.2);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(212, 168, 154, 0.2), 0 0 20px rgba(212, 168, 154, 0.3);
  }
}

#bb-sidebar .sidebar-spacer {
  flex: 1;
}

#bb-sidebar .sidebar-avatar {
  width: 42px;
  height: 42px;
  margin-left: 29px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #4A7A68;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(58, 47, 38, 0.12);
  transition: transform 0.2s ease;
}

#bb-sidebar .sidebar-avatar:hover {
  transform: scale(1.05);
}

#bb-sidebar .sidebar-avatar:focus-visible {
  outline: 2px solid var(--rose, #D4A89A);
  outline-offset: 3px;
}

#bb-sidebar #s-avatar-initial {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: #FFFEFB;
}

#bb-sidebar .sidebar-avatar::after {
  content: none;
  display: none;
}

#bb-sidebar .bb-sidebar-tooltip-target {
  position: absolute;
  inset: 0;
  z-index: var(--z-tooltip, 110);
  pointer-events: none;
}

#bb-sidebar .bb-sidebar-tooltip-target::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  z-index: var(--z-tooltip, 110);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--warm-text);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  max-width: min(200px, calc(100vw - 128px));
  white-space: normal;
  overflow-wrap: break-word;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

:is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:hover .bb-sidebar-tooltip-target::after,
#bb-sidebar .sidebar-ai:hover .bb-sidebar-tooltip-target::after,
#bb-sidebar .sidebar-icon:hover .bb-sidebar-tooltip-target::after,
#bb-sidebar .sidebar-mic:hover .bb-sidebar-tooltip-target::after,
#bb-sidebar .sidebar-avatar:hover .bb-sidebar-tooltip-target::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

#bb-sidebar .sidebar-avatar[aria-expanded="true"] .bb-sidebar-tooltip-target::after {
  display: none !important;
}

[data-theme="dark"] #bb-sidebar {
  color: #E8E1D7;
}

[data-theme="dark"] #bb-sidebar::before {
  background: linear-gradient(180deg, rgba(31, 30, 27, 0.92) 0%, rgba(23, 21, 18, 0.82) 100%);
  border-color: rgba(232, 230, 225, 0.10);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] :is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:hover {
  filter: brightness(1.1);
}

[data-theme="dark"] #bb-sidebar .sidebar-ai {
  background: linear-gradient(135deg, #B88378 0%, #A87368 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #bb-sidebar .sidebar-ai:hover {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] #bb-sidebar .sidebar-icon,
[data-theme="dark"] #bb-sidebar .sidebar-mic {
  color: rgba(232, 225, 215, 0.58);
}

[data-theme="dark"] #bb-sidebar .sidebar-icon:hover,
[data-theme="dark"] #bb-sidebar .sidebar-mic:hover {
  color: #F5F0E8;
}

[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon:hover::after,
[data-theme="dark"] #bb-sidebar .sidebar-mic.sidebar-mic:hover::after {
  background: rgba(255, 252, 247, 0.08);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon.is-active::after,
[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]::after {
  background: rgba(255, 252, 247, 0.10);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon.is-active,
[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"] {
  color: #E8DDD4;
}

[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon.is-active:hover::after,
[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]:hover::after {
  background: rgba(255, 252, 247, 0.12);
}

[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon.is-active::before,
[data-theme="dark"] #bb-sidebar .sidebar-icon.sidebar-icon[aria-current="page"]::before {
  background: linear-gradient(180deg, #D4A89A 0%, #C89888 100%);
  box-shadow: 0 0 8px rgba(212, 168, 154, 0.3);
}

[data-theme="dark"] #bb-sidebar .sidebar-badge {
  background: var(--rose-dark, #9B6050);
}

[data-theme="dark"] #bb-sidebar .sidebar-badge[data-sidebar-badge="email"] {
  background: #5f8d70;
  border-color: #1f1e1b;
}

[data-theme="dark"] #bb-sidebar .sidebar-badge[data-sidebar-badge="opgaver"] {
  background: #5f8d70;
  border-color: #1f1e1b;
}

[data-theme="dark"] #bb-sidebar .sidebar-mic {
  color: rgba(232, 225, 215, 0.76);
}

[data-theme="dark"] #bb-sidebar .sidebar-mic:hover {
  color: #F7F2EA;
}

[data-theme="dark"] #bb-sidebar .sidebar-mic--voice-active {
  color: #D4A89A;
  background: rgba(212, 168, 154, 0.15);
  box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.2), 0 0 12px rgba(212, 168, 154, 0.15);
}

[data-theme="dark"] #bb-sidebar .sidebar-mic::before {
  background: rgba(212, 168, 154, 0.15);
}

[data-theme="dark"] #bb-sidebar .sidebar-avatar {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #bb-sidebar .bb-sidebar-tooltip-target::after,
[data-theme="dark"] :is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo .bb-sidebar-tooltip-target::after {
  background: #2b2a27 !important;
  color: #e8e6e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

@media (prefers-reduced-motion: reduce) {
  :is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:hover {
    transform: none;
    filter: none;
  }

  #bb-sidebar .sidebar-mic--voice-active {
    animation: none;
  }

  #bb-sidebar .sidebar-ai:hover,
  #bb-sidebar .sidebar-avatar:hover,
  #bb-sidebar .sidebar-icon:hover,
  #bb-sidebar .sidebar-mic:hover {
    transform: none;
  }
}

@media (max-width: 767px) and (min-width: 641px) {
  #bb-sidebar {
    padding-top: max(100px, env(safe-area-inset-top, 0px));
    padding-bottom: max(24px, calc(24px + env(safe-area-inset-bottom, 0px)));
  }

  #bb-sidebar .sidebar-icon,
  #bb-sidebar .sidebar-mic {
    min-height: 44px;
  }

  #bb-sidebar .sidebar-ai,
  #bb-sidebar .sidebar-avatar {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Mobile navigation moved to assets/css/bb-mobile-nav.css (V2).
   The #bb-sidebar kill-rule was removed in the #479 premium refresh on the
   assumption that the drawer block (lp/assets/css/bb-sidebar.css:
   display: flex !important + translateX) supersedes it — but only
   .app-layout.has-bb-sidebar pages (homepage, blog, lp) load that drawer
   CSS. The vendored app demos (.app wrappers: chat, opgaver, skrivebord,
   translator, kalender; .app-layout.email-page) never load it, so without
   a kill they render the desktop rail on phones (chat) or strand a 104px
   flex gutter from the in-flow sidebar box (oversaettelse). The scoped
   kill below restores app parity on those pages and deliberately exempts
   .has-bb-sidebar drawer pages. */
@media (max-width: 767px) {
  .app #bb-sidebar,
  .app-layout:not(.has-bb-sidebar) #bb-sidebar {
    display: none !important;
  }

  :is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo {
    display: none !important;
  }

  body:has(#bb-sidebar) .mobile-nav {
    display: none !important;
    pointer-events: none;
  }
}

/* Drawer trigger/overlay — hidden by default, shown only on pages that need
   a mobile fallback (via lp/assets/css/bb-sidebar.css). */
.bb-mkt-drawer-trigger {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(228, 220, 212, 0.6);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.94);
  color: var(--warm-text);
  box-shadow: 0 2px 8px rgba(92, 77, 67, 0.08);
  cursor: pointer;
}

.bb-mkt-drawer-trigger svg {
  width: 20px;
  height: 20px;
}

.bb-mkt-sidebar-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(36, 30, 26, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 99;
}

body.bb-mkt-sidebar-open {
  overflow: hidden;
}

body.bb-mkt-sidebar-open .bb-mkt-sidebar-overlay {
  display: block;
  opacity: 1;
}

[data-theme="dark"] .bb-mkt-drawer-trigger {
  background: rgba(31, 30, 27, 0.94);
  color: #E8E1D7;
  border-color: rgba(232, 230, 225, 0.10);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
  .main,
  .main-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 640px) {
  .main,
  .main-content {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
}
#settingsDropdown.s-dropdown,
#settingsDropdown.s-dropdown * {
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.bb-profile-dropdown.s-dropdown {
  position: fixed;
  left: 112px;
  bottom: 24px;
  width: 248px;
  min-width: 248px;
  max-height: min(78vh, 620px);
  overflow-y: auto;
  z-index: 10610;
  padding: 8px;
  border: 1px solid rgba(212, 199, 184, 0.42);
  border-radius: 14px;
  background: #FFFEFB;
  box-shadow: 0 8px 32px rgba(58, 47, 38, 0.08), 0 2px 6px rgba(58, 47, 38, 0.04);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 152, 136, 0.25) transparent;
}

.bb-profile-dropdown.s-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.bb-profile-dropdown.s-dropdown::-webkit-scrollbar {
  width: 5px;
}

.bb-profile-dropdown.s-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.bb-profile-dropdown.s-dropdown::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 136, 0.25);
  border-radius: 3px;
}

.bb-profile-dropdown.s-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 152, 136, 0.4);
}

.chat-sidebar.collapsed .bb-profile-dropdown.s-dropdown {
  left: calc(3.05rem + 4px);
  bottom: 8px;
}

.bb-profile-dropdown .s-dropdown-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
}

.bb-profile-dropdown .s-dropdown-email {
  flex: 1;
  min-width: 0;
  color: #8A7E72;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-profile-dropdown .s-dropdown-plan {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(138, 126, 114, 0.22);
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.78);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #8A7E72;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.bb-profile-dropdown .s-dropdown-plan[data-plan="free"]:hover,
.bb-profile-dropdown .s-dropdown-plan[data-plan="free"]:focus-visible {
  border-color: rgba(212, 168, 154, 0.4);
  background: rgba(212, 168, 154, 0.12);
  color: #9B6050;
  outline: none;
}

.bb-profile-dropdown .s-dropdown-plan[data-plan="pro"] {
  border-color: rgba(74, 122, 104, 0.28);
  background: rgba(226, 241, 233, 0.76);
  color: #4A7A68;
}

.bb-profile-dropdown .s-dropdown-plan[data-plan="pro"]:hover,
.bb-profile-dropdown .s-dropdown-plan[data-plan="pro"]:focus-visible {
  border-color: rgba(74, 122, 104, 0.45);
  background: rgba(226, 241, 233, 0.95);
  outline: none;
}

/* Extension promo card */
.bb-profile-dropdown .sk-ext-promo {
  margin: 8px 12px 10px;
  padding: 14px;
  border-radius: 14px;
  background: #FBF8F2;
  border: 1px solid rgba(58, 47, 38, 0.08);
}

.bb-profile-dropdown .sk-ext-promo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bb-profile-dropdown .sk-ext-promo-header > .calm-chrome-icon {
  width: 32px;
  height: 32px;
  flex: none;
}

.bb-profile-dropdown .sk-ext-promo-cta > .calm-chrome-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.bb-profile-dropdown .sk-ext-promo-landmark {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #9A8E82;
}

.bb-profile-dropdown .sk-ext-promo-dismiss {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9A8E82;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.bb-profile-dropdown .sk-ext-promo-dismiss:hover {
  background: rgba(58, 47, 38, 0.06);
  color: #3A2F26;
}

.bb-profile-dropdown .sk-ext-promo-dismiss:focus-visible {
  outline: 2px solid #6E8A7E;
  outline-offset: 2px;
}

.bb-profile-dropdown .sk-ext-promo-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #3A2F26;
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.bb-profile-dropdown .sk-ext-promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(58, 47, 38, 0.14);
  border-radius: 10px;
  background: #FFFEFB;
  color: #3A2F26;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}

.bb-profile-dropdown .sk-ext-promo-cta:hover {
  background: #FFFFFF;
  border-color: rgba(58, 47, 38, 0.22);
  transform: translateY(-1px);
}

.bb-profile-dropdown .sk-ext-promo-cta:focus-visible {
  outline: 2px solid #6E8A7E;
  outline-offset: 2px;
}

.bb-profile-dropdown .s-dropdown-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3A2F26;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.bb-profile-dropdown .s-dropdown-meta {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(58, 47, 38, 0.05);
  border: 1px solid rgba(58, 47, 38, 0.08);
  color: #5C4D43;
  font-size: 12.5px;
  font-weight: 500;
}

.bb-profile-dropdown .s-dropdown-meta:empty {
  display: none;
}

#langSelectorLabel.s-dropdown-meta::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #5C4D43;
  border-bottom: 1.5px solid #5C4D43;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.15s ease;
}

#langSelectorItem[aria-expanded="true"] #langSelectorLabel.s-dropdown-meta::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.bb-profile-dropdown .s-dropdown-item:hover .s-dropdown-meta {
  background: rgba(110, 138, 126, 0.10);
  border-color: rgba(110, 138, 126, 0.18);
  color: #6E8A7E;
}

.bb-profile-dropdown .s-dropdown-item:hover .s-dropdown-meta::after {
  border-color: #6E8A7E;
}

.bb-profile-dropdown .s-dropdown-item:hover,
.bb-profile-dropdown .s-dropdown-item:focus-visible {
  background: rgba(58, 47, 38, 0.04);
  color: #3A2F26;
}

.bb-profile-dropdown .s-dropdown-item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(74, 122, 104, 0.4);
}

.bb-profile-dropdown .s-dropdown-item[aria-checked="true"] {
  background: #EEF3EF;
}

.bb-profile-dropdown .s-dropdown-item[aria-checked="true"] svg {
  color: #4A7A68;
}

.bb-profile-dropdown .s-dropdown-item.is-active,
.bb-profile-dropdown .s-dropdown-item[aria-current="page"] {
  background: rgba(110, 138, 126, 0.12);
  color: #3A2F26;
  font-weight: 600;
}

.bb-profile-dropdown .s-dropdown-item.is-active svg,
.bb-profile-dropdown .s-dropdown-item[aria-current="page"] svg {
  color: #6E8A7E;
  stroke: #6E8A7E;
}

.bb-profile-dropdown .s-dropdown-item.is-active:hover,
.bb-profile-dropdown .s-dropdown-item[aria-current="page"]:hover {
  background: rgba(110, 138, 126, 0.16);
}

.bb-profile-dropdown .s-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: #8A7E72;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.bb-profile-dropdown .s-dropdown-item:hover svg {
  color: #5C4D43;
}

.bb-profile-dropdown .s-dropdown-item.calm-primary {
  color: #4A7A68;
  font-weight: 600;
}

.bb-profile-dropdown .s-dropdown-item.calm-primary:hover {
  background: #EEF3EF;
}

.bb-profile-dropdown .s-dropdown-item.calm-primary svg {
  color: #4A7A68;
}

.bb-profile-dropdown .s-dropdown-logout {
  color: #b91c1c;
}

.bb-profile-dropdown .s-dropdown-logout svg {
  color: #b91c1c;
}

.bb-profile-dropdown .s-dropdown-logout:hover,
.bb-profile-dropdown .s-dropdown-logout:focus-visible {
  background: rgba(185, 28, 28, 0.06);
  color: #991b1b;
}

.bb-profile-dropdown .s-dropdown-logout:hover svg {
  color: #991b1b;
}

.bb-profile-dropdown .s-dropdown-sep {
  height: 1px;
  margin: 4px 10px;
  background: rgba(212, 199, 184, 0.42);
}

.bb-profile-dropdown .s-lang-list {
  display: none;
  margin: 2px 0 6px 0;
  padding: 4px;
  border-radius: 10px;
  background: rgba(238, 243, 239, 0.5);
  border: 1px solid rgba(212, 199, 184, 0.25);
}

.bb-profile-dropdown .s-lang-list.open {
  display: grid;
  gap: 2px;
}

.bb-profile-dropdown .s-lang-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3A2F26;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.bb-profile-dropdown .s-lang-option:hover,
.bb-profile-dropdown .s-lang-option:focus-visible {
  background: #FBF8F2;
}

.bb-profile-dropdown .s-lang-option:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(74, 122, 104, 0.4);
}

.bb-profile-dropdown .s-lang-option[aria-checked="true"],
.bb-profile-dropdown .s-lang-option.active {
  font-weight: 600;
  color: #4A7A68;
  background: #EEF3EF;
}

.bb-profile-dropdown .s-lang-option[aria-checked="true"]::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A7A68' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Sidebar language picker: fixed flyout so profile menu geometry stays identical on all BB pages. */
.bb-lang-flyout.s-lang-list {
  position: fixed;
  display: none;
  width: 220px;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(212, 199, 184, 0.42);
  border-radius: 14px;
  background: #FFFEFB;
  box-shadow: 0 8px 32px rgba(58, 47, 38, 0.08), 0 2px 6px rgba(58, 47, 38, 0.04);
  z-index: 10611;
}

.bb-lang-flyout.s-lang-list.open {
  display: grid;
  gap: 2px;
}

.bb-lang-flyout.s-lang-list .s-lang-option {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.bb-lang-flyout.s-lang-list .s-lang-option:hover,
.bb-lang-flyout.s-lang-list .s-lang-option:focus-visible {
  background: #FBF8F2;
}

.bb-lang-flyout.s-lang-list .s-lang-option:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(74, 122, 104, 0.4);
}

.bb-lang-flyout.s-lang-list .s-lang-option[aria-checked="true"],
.bb-lang-flyout.s-lang-list .s-lang-option.active {
  font-weight: 600;
  color: #4A7A68;
  background: #EEF3EF;
}

.bb-lang-flyout.s-lang-list .s-lang-option[aria-checked="true"]::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A7A68' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Language picker created by assets/js/lang-selector.js.
   Keep it with the shared sidebar styles so bb-left-sidebar pages don't render raw menu text. */
.chat-lang-picker {
  position: fixed;
  min-width: 180px;
  padding: 6px;
  border: 1px solid rgba(228, 220, 212, 0.6);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.94);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 4px 12px rgba(92, 77, 67, 0.06), 0 18px 42px rgba(92, 77, 67, 0.12);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
  pointer-events: none;
  display: none;
  z-index: 10502;
}

.chat-lang-picker.open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-lang-picker-title {
  padding: 6px 12px 4px;
  color: #8A7E72;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.chat-lang-list {
  display: grid;
  gap: 2px;
}

.chat-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5C4D43;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.chat-lang-option:hover,
.chat-lang-option:focus-visible {
  background: rgba(244, 232, 226, 0.7);
  outline: none;
}

.chat-lang-option.active {
  font-weight: 600;
}

.chat-lang-option .toggle-check {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #9B6050;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.chat-lang-option.active .toggle-check {
  opacity: 1;
}

[data-theme="dark"] .bb-profile-dropdown.s-dropdown {
  border-color: rgba(255, 255, 255, 0.08);
  background: #2A2622;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-email {
  color: #B3AEA5;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan {
  border-color: rgba(168, 158, 146, 0.24) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #A89E92 !important;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan[data-plan="pro"] {
  border-color: rgba(124, 184, 164, 0.32) !important;
  background: rgba(124, 184, 164, 0.12) !important;
  color: #7CB8A4 !important;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan[data-plan="free"]:hover,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan[data-plan="free"]:focus-visible {
  border-color: rgba(212, 168, 154, 0.35) !important;
  background: rgba(212, 168, 154, 0.10) !important;
  color: #C4917E !important;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan[data-plan="pro"]:hover,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-plan[data-plan="pro"]:focus-visible {
  border-color: rgba(124, 184, 164, 0.48) !important;
  background: rgba(124, 184, 164, 0.18) !important;
  outline: none !important;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item svg {
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-meta {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] #langSelectorLabel.s-dropdown-meta::after {
  border-color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:hover .s-dropdown-meta {
  background: rgba(124, 184, 164, 0.12);
  border-color: rgba(124, 184, 164, 0.20);
  color: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:hover .s-dropdown-meta::after {
  border-color: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:hover,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:focus-visible,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 2px rgba(124, 184, 164, 0.4);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-checked="true"] {
  background: rgba(124, 184, 164, 0.10);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-checked="true"] svg {
  color: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.is-active,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-current="page"] {
  background: rgba(124, 184, 164, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.is-active svg,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-current="page"] svg {
  color: #7CB8A4;
  stroke: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.is-active:hover,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-current="page"]:hover {
  background: rgba(124, 184, 164, 0.18);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.is-active:hover svg,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item[aria-current="page"]:hover svg {
  color: #7CB8A4;
  stroke: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:hover svg {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.calm-primary {
  color: #7CB8A4;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item.calm-primary:hover {
  background: rgba(124, 184, 164, 0.10);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-sep {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bb-profile-dropdown .s-lang-list {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .bb-lang-flyout.s-lang-list {
  background: #2A2622;
  color: #E8DDD4;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .bb-profile-dropdown .s-lang-option[aria-checked="true"],
[data-theme="dark"] .bb-profile-dropdown .s-lang-option.active {
  color: #7CB8A4;
  background: rgba(124, 184, 164, 0.10);
}

[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option {
  color: #E8DDD4;
}

[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option:hover,
[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option[aria-checked="true"],
[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option.active {
  color: #7CB8A4;
  background: rgba(124, 184, 164, 0.10);
}

[data-theme="dark"] .bb-lang-flyout.s-lang-list .s-lang-option[aria-checked="true"]::after,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option[aria-checked="true"]::after {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237CB8A4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo {
  background: #3A2F26;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-landmark {
  color: #B8AC9F;
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-dismiss {
  color: #B8AC9F;
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFEFB;
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-title {
  color: #FFFEFB;
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-cta {
  background: #4A3F36;
  color: #FFFEFB;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .bb-profile-dropdown .sk-ext-promo-cta:hover {
  background: #554940;
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-logout {
  color: #ef4444;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-logout svg {
  color: #ef4444;
}

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .bb-profile-dropdown {
  scrollbar-color: rgba(168, 152, 136, 0.35) transparent;
}

@media (prefers-reduced-motion: reduce) {
  .bb-profile-dropdown.s-dropdown {
    transition: none;
  }

  .bb-profile-dropdown .sk-ext-promo-cta {
    transition: none;
  }
}

[data-theme="dark"] .chat-lang-picker {
  border-color: rgba(232, 230, 225, 0.12);
  background: #1f1e1b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .chat-lang-picker-title {
  color: var(--text-muted, #b8b2a8);
}

[data-theme="dark"] .chat-lang-option {
  color: var(--text-primary, #f4f1eb);
}

[data-theme="dark"] .chat-lang-option:hover,
[data-theme="dark"] .chat-lang-option:focus-visible {
  background: rgba(232, 230, 225, 0.08);
}

[data-theme="dark"] .chat-lang-option .toggle-check {
  color: var(--text-primary, #f4f1eb);
}

/* ── Main area ── */
.main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Dekorative buer — øverste højre */
.main::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 154, 0.16);
  pointer-events: none;
}

.main::after {
  content: '';
  position: absolute;
  top: -160px;
  right: -120px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 154, 0.10);
  pointer-events: none;
}

.decorative-arcs {
  display: none !important;
  position: absolute;
  top: -200px;
  right: -160px;
  width: 660px;
  height: 660px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 154, 0.12);
  pointer-events: none;
}

.decorative-arcs-2 {
  display: none !important;
  position: absolute;
  top: -80px;
  right: -40px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 154, 0.26);
  pointer-events: none;
}

.decorative-arcs-bl {
  position: absolute;
  bottom: -190px;
  left: 38px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(168, 197, 184, 0.09);
  pointer-events: none;
}

.bottom-wave {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  pointer-events: none;
  z-index: 2;
}

.bottom-wave svg {
  width: 100%;
  height: 100%;
}

/* ── Content container ── */
.content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 40px 100px;
}

/* ── Greeting ── */
.greeting {
  text-align: center;
  margin-bottom: 32px;
}

.greeting h1 {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--warm-text);
  margin-bottom: 10px;
}

.greeting p {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Input area ── */
.input-wrapper {
  position: relative;
  margin: 0 auto 24px;
  max-width: 720px;
}

.input-glow {
  position: absolute;
  inset: -12px;
  border-radius: 34px;
  background: radial-gradient(ellipse at center, rgba(212, 168, 154, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.input-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  box-shadow: var(--shadow-input);
  transition: box-shadow 0.2s ease;
}

.input-card:focus-within {
  box-shadow: none;
}

.input-field {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--warm-text);
  background: transparent;
  margin-bottom: 12px;
}

.input-field::placeholder {
  color: var(--muted);
  opacity: 1;
  font-family: var(--font-body);
}

.input-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-hint {
  font-size: 12px;
  color: var(--warm-text-light);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.input-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rose);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.input-send:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-send-hover);
}

.input-send:focus-visible {
  outline: none;
}

.input-send svg {
  width: 18px;
  height: 18px;
  color: var(--white);
  margin-left: 2px;
}

/* ── Quick actions ── */
.quick-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.quick-action {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: #6A5C52;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  font-family: 'Inter', sans-serif;
}

.quick-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-quick-hover);
}

.quick-action--rose { background: var(--rose-bg); border-color: #E8D4CE; }
.quick-action--sage { background: var(--sage-bg); border-color: #C8DDD2; }
.quick-action--slate { background: var(--slate-bg); border-color: #CCD2DC; }

/* ── Section divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 0 20px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.section-divider span {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--warm-text-light);
  white-space: nowrap;
}

/* ── Cards grid ── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Card ── */
.card {
  border-radius: var(--radius-card);
  padding: 26px;
  position: relative;
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

@media (prefers-reduced-motion: reduce) {
  #bb-sidebar .sidebar-mic--voice-active {
    animation: none;
  }

  :is(.app-layout.has-bb-sidebar, .app-layout, .app) > .sidebar-home-logo:hover {
    transform: none;
    filter: none;
  }

  .card:hover,
  .quick-action:hover,
  #bb-sidebar .sidebar-ai:hover,
  #bb-sidebar .sidebar-avatar:hover,
  .input-send:hover {
    transform: none;
  }
}

.card--todo { background: var(--card-todo-bg); border-color: var(--rose-light); }
.card--email { background: var(--card-email-bg); border-color: var(--sage-light); }
.card--calendar { background: var(--card-calendar-bg); border-color: var(--slate-light); }

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.card-dot--rose { background: var(--rose); }
.card-dot--sage { background: var(--sage); }
.card-dot--slate { background: var(--slate); }

.card-title {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--warm-text);
  flex: 1;
}

.card-count {
  font-size: 12px;
  color: var(--warm-text-light);
}

.card-divider {
  height: 1px;
  margin: 14px 0;
}

.card--todo .card-divider { background: var(--rose-light); }
.card--email .card-divider { background: var(--sage-light); }
.card--calendar .card-divider { background: var(--slate-light); }

/* ── Card items ── */
.card-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--warm-text);
  line-height: 1.5;
}

.card-item-checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: var(--radius-checkbox);
  border: 1.5px solid var(--rose);
  margin-top: 1px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.card-item-checkbox:hover {
  background: var(--rose-light);
}

.card-item-checkbox:focus-visible {
  outline: none;
}

.card-item-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  margin-top: 4px;
}

.card-item-dot--sage { background: var(--sage); }
.card-item-dot--slate { background: var(--slate); }

/* ── Sofia insight ── */
.sofia-insight {
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--warm-text-light);
}

.card--todo .sofia-insight { background: var(--rose-light); }
.card--email .sofia-insight { background: var(--sage-light); }
.card--calendar .sofia-insight { background: var(--slate-light); }

.sofia-badge {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: white;
  font-style: normal;
}

.sofia-badge::before { content: "S"; }
.sofia-insight-text { min-width: 0; overflow-wrap: anywhere; }

.sofia-badge--rose { background: var(--rose); }
.sofia-badge--sage { background: var(--sage); }
.sofia-badge--slate { background: var(--slate); }
