﻿/* ═══════════════════════════════════════════════════════════════════ */
/* 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 {
  /* Single source of truth for the uniform content gutter (writing-tool pages). */
  --bb-content-gutter: 32px;
  /* Rail->content gutter shared by every robot that sits next to the 104px nav
     rail (skrivebord, oversaettelse, /kalender/, /email/). 22px is the canon
     the robots' own frames already use — see .text-area-container in
     skrivebord v2.css and .ugeplan-main. */
  --bb-rail-gutter: 22px;
  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%);
}

/* ── Content gutter (writing-tool pages). Oversaettelse overrides its
   minified-bundle padding here; the right side keeps the translator's own 32px
   frame. LEFT is the rail->content gutter and follows the canon every sibling
   robot already runs past the 104px rail: 22px (skrivebord .text-area-container,
   /kalender/ .ugeplan-main, /email/ list card). It used to be
   gutter-24px = 8px, which started this robot's content 14px left of all the
   others — the rail->content gap read visibly tighter here than anywhere else. ── */
.bb-oversaettelse .split-translator {
  padding-left: var(--bb-rail-gutter, 22px) !important;
  padding-right: var(--bb-content-gutter) !important;
}

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

/* Desktop sidebar: assets/css/bb-sidebar.css, loaded once by bb-left-sidebar.php. */
/* MORTENS KALD 12/7: bb-navigatoren bliver i VENSTRE hjoerne paa alle sprog - kun
   robotfladen spejles. dir=rtl paa html vender flex-hovedaksen, saa row-reverse
   laegger boernene fra venstre igen: rail fysisk venstre, main spejlet ved siden af. */
[dir="rtl"] .app, [dir="rtl"] .app-layout { flex-direction: row-reverse; }

@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));
  }
}
.bb-profile-dropdown.s-dropdown {
  direction: ltr; /* retningsfast som railen den hoerer til */
  position: fixed;
  inset-inline-start: 112px;
  bottom: 24px;
  width: min(248px, calc(100vw - 92px));
  max-height: min(78vh, 620px);
  overflow-y: auto;
  z-index: 10610;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    radial-gradient(130% 26% at 50% 0%, rgba(255,255,255,0.6), rgba(255,255,255,0) 60%) padding-box,
    linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(252,248,244,0.62) 100%) padding-box,
    linear-gradient(158deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.30) 40%, rgba(150,178,168,0.16) 82%, rgba(255,255,255,0.45) 100%) border-box;
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
  box-shadow:
    0 30px 70px rgba(60,50,42,0.18),
    0 8px 22px rgba(60,50,42,0.09),
    inset 0 1px 1px rgba(255,255,255,0.92),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transform-origin: left bottom;
  /* RTL: origin-hjoernet flipper - transform-origin har ingen logisk form (override nedenfor). */
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.26s cubic-bezier(0.34, 1.12, 0.66, 1);
  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: 9px 11px 11px;
}

.bb-profile-dropdown .s-dropdown-email {
  flex: 1;
  min-width: 0;
  color: #3A2F26;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  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: 700;
  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(110, 138, 126, 0.30);
  background: rgba(110, 138, 126, 0.15);
  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;
}

/* Language-row chevron — signals the picker opens (glass redesign) */
.bb-profile-dropdown .s-chevron {
  margin-left: auto;
  width: 15px;
  height: 15px;
  color: #9A8E82;
  transition: transform 0.2s ease;
}
#langSelectorItem[aria-expanded="true"] .s-chevron {
  transform: rotate(180deg);
}

/* Dark-mode row toggle switch (glass redesign — matches the approved mockup) */
.bb-profile-dropdown .switch {
  margin-left: auto;
  width: 34px;
  height: 20px;
  flex: none;
  border-radius: 999px;
  background: rgba(58, 47, 38, 0.16);
  position: relative;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bb-profile-dropdown .switch::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s cubic-bezier(0.34, 1.12, 0.66, 1);
}
[data-theme="dark"] .bb-profile-dropdown .switch { background: #6E8A7E; box-shadow: none; }
[data-theme="dark"] .bb-profile-dropdown .switch::after { transform: translateX(14px); }

/* 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-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: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5C4D43;
  font-family: var(--font-family);
  /* Account-menu items keep the app's dyslexia-first token baseline (15px/400).
     Do NOT hard-code px here for a mockup pixel-match (#4017 regressed this to
     13.5px/500 -> below baseline; guarded by the font-compliance contract). */
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease, color 0.12s ease;
}

.bb-profile-dropdown .s-dropdown-item:hover,
.bb-profile-dropdown .s-dropdown-item:focus-visible {
  background: rgba(110, 138, 126, 0.10);
  color: #3A2F26;
}

.bb-profile-dropdown .s-dropdown-item:focus-visible {
  outline: none;
}

.bb-profile-dropdown .s-dropdown-item:active {
  transform: scale(0.98);
  transition-duration: 0.05s;
}

.bb-profile-dropdown .s-dropdown-item svg {
  width: 17px;
  height: 17px;
  color: #9A8E82;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

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

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

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

.bb-profile-dropdown .s-dropdown-logout:hover,
.bb-profile-dropdown .s-dropdown-logout:focus-visible {
  background: rgba(166, 89, 75, 0.10);
  color: #A6594B;
}

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

.bb-profile-dropdown .s-dropdown-sep {
  height: 1px;
  margin: 6px 8px;
  background: linear-gradient(90deg, transparent, rgba(58, 47, 38, 0.08) 18%, rgba(58, 47, 38, 0.08) 82%, transparent);
}

.bb-profile-dropdown .s-lang-list {
  display: none;
  margin: 2px 0 6px 0;
  padding: 4px;
  border-radius: 10px;
  background: rgba(244, 232, 226, 0.5);
  border: 1px solid rgba(228, 220, 212, 0.3);
}

.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: 8px;
  background: transparent;
  color: #5C4D43;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  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: rgba(255, 254, 251, 0.8);
}

.bb-profile-dropdown .s-lang-option:focus-visible {
  outline: none;
}

.bb-profile-dropdown .s-lang-option[aria-checked="true"],
.bb-profile-dropdown .s-lang-option.active {
  font-weight: 600;
  color: #4A7A68;
  background: rgba(255, 254, 251, 0.6);
}

.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;
  /* Fallback only — lang-selector.js writes the real width inline (positionFlyout). */
  width: 156px;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(252,248,244,0.62) 100%) padding-box,
    linear-gradient(158deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.30) 40%, rgba(150,178,168,0.16) 82%, rgba(255,255,255,0.45) 100%) border-box;
  box-shadow: 0 26px 60px rgba(60,50,42,0.18), 0 8px 22px rgba(60,50,42,0.09), inset 0 1px 1px rgba(255,255,255,0.92);
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
  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: 31px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.3;
}

.bb-lang-flyout.s-lang-list .s-lang-option:hover,
.bb-lang-flyout.s-lang-list .s-lang-option:focus-visible {
  background: rgba(92, 77, 67, 0.06);
}

.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: rgba(255, 254, 251, 0.6);
}

.bb-lang-flyout.s-lang-list .s-lang-option[aria-checked="true"]::after {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  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: transparent;
  background:
    linear-gradient(180deg, rgba(44,40,35,0.80) 0%, rgba(34,30,26,0.70) 100%) padding-box,
    linear-gradient(158deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 40%, rgba(150,178,168,0.12) 82%, rgba(255,255,255,0.10) 100%) border-box;
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.5),
    0 8px 22px rgba(0,0,0,0.3),
    inset 0 1px 1px rgba(255,255,255,0.12);
}

[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-item:hover,
[data-theme="dark"] .bb-profile-dropdown .s-dropdown-item:focus-visible,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option:hover,
[data-theme="dark"] .bb-profile-dropdown .s-lang-option:focus-visible {
  background: rgba(120, 150, 138, 0.18);
}

[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-sep {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

[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: rgba(42, 38, 34, 0.96);
  color: #E8DDD4;
  border-color: rgba(200, 190, 178, 0.15);
  box-shadow: 0 8px 24px rgba(23, 21, 18, 0.34);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="dark"] .bb-profile-dropdown .s-lang-option[aria-checked="true"],
[data-theme="dark"] .bb-profile-dropdown .s-lang-option.active {
  color: #A6CBBB;
}

[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(212, 168, 154, 0.10);
}

[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: #A6CBBB;
  background: rgba(120, 150, 138, 0.16);
}

[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='%23A6CBBB' 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-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: rgba(255, 255, 255, 0.85);
}

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

[data-theme="dark"] .bb-profile-dropdown .s-dropdown-logout:hover {
  background: rgba(166, 89, 75, 0.18);
}

[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 .s-dropdown-item:hover,
  .bb-profile-dropdown .s-dropdown-item:active {
    transform: none;
  }

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

  .bb-profile-dropdown .sk-ext-promo-cta:hover {
    transform: 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;
  opacity: 0.6;
}

.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;
  opacity: 0.5;
}

.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;
  opacity: 0.45;
}

.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) {
  .card:hover,
  .quick-action: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); }
