/* ==========================================================================
   wine-info.de — EU Regulation 2021/2117 Digital E-Label Platform
   Color Palette & Design System (Light-First Editorial Winery Aesthetic)
   ========================================================================== */
:root {
  --fn-ink: #23211e;
  --fn-ink-soft: #6b6660;
  --fn-ink-ghost: #a39d8e;
  --fn-paper: #f9f8f6;
  --fn-surface: #ffffff;
  --fn-line: #e4ddd2;
  --fn-wine: #7b2d3b;
  --fn-wine-deep: #5e1f2b;
  --fn-wine-bg: #f7eced;
  --fn-sage: #4e6642;
  --fn-amber: #9c6b1a;
  --fn-gold: #d99a3d;
  --fn-gold-light: #fef8ee;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(35, 33, 30, 0.05);
  --shadow-card: 0 4px 16px rgba(35, 33, 30, 0.04);
  --shadow-float: 0 14px 40px rgba(35, 33, 30, 0.09);
  --font-sans:
    "Plus Jakarta Sans", "Noto Sans Georgian", -apple-system,
    BlinkMacSystemFont, sans-serif;
  --font-serif: "Fraunces", "Noto Sans Georgian", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--fn-paper);
  color: var(--fn-ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================================================
   FLOATING GLASS-EFFECT NAVBAR & MOBILE BURGER MENU
   ========================================================================== */
.nav-wrapper {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.glass-navbar {
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(228, 221, 210, 0.85);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-float);
  transition: all 0.25s ease;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fn-ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fn-wine), var(--fn-wine-deep));
  color: var(--fn-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(123, 45, 59, 0.25);
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-wrap: nowrap;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fn-ink-soft);
}

.nav-links a:hover {
  color: var(--fn-wine);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fn-ink);
}

.burger-lines {
  width: 18px;
  height: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-lines span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--fn-ink);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.glass-navbar.menu-open .burger-lines span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.glass-navbar.menu-open .burger-lines span:nth-child(2) {
  opacity: 0;
}
.glass-navbar.menu-open .burger-lines span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Mobile Dropdown inside Floating Glass Navbar */
@media (max-width: 860px) {
  .glass-navbar {
    border-radius: 22px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .burger-btn {
    display: inline-flex;
  }
  .nav-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
    margin-top: 14px;
    border-top: 1px solid var(--fn-line);
    gap: 16px;
  }
  .glass-navbar.menu-open .nav-collapse {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav-actions {
    flex-direction: column;
    width: 100%;
  }
  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 861px) {
  .nav-collapse {
    display: flex;
    align-items: center;
    gap: 32px;
  }
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--fn-wine);
  color: var(--fn-surface);
  box-shadow: 0 4px 14px rgba(123, 45, 59, 0.22);
}

.btn-primary:hover {
  background: var(--fn-wine-deep);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--fn-surface);
  color: var(--fn-ink);
  border-color: var(--fn-line);
}

.btn-outline:hover {
  border-color: var(--fn-wine);
  color: var(--fn-wine);
}

.btn-soft {
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
}

.btn-soft:hover {
  background: #efdadd;
}

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

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

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--fn-gold-light);
  color: var(--fn-amber);
  border: 1px solid rgba(217, 154, 61, 0.3);
}

.pill-sage {
  background: #eef3ec;
  color: var(--fn-sage);
  border-color: rgba(78, 102, 66, 0.25);
}

/* ==========================================================================
   LANDING PAGE SECTIONS
   ========================================================================== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-section {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.12;
  color: var(--fn-ink);
  margin: 18px 0 20px;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--fn-wine);
  font-style: italic;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--fn-ink-soft);
  margin-bottom: 30px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 32px;
}

.hero-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--fn-line);
  font-size: 0.85rem;
  color: var(--fn-ink-soft);
}

.hero-trust strong {
  color: var(--fn-ink);
}

/* Interactive Hero Demo Card */
.hero-showcase-card {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-float);
  position: relative;
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--fn-line);
}

.section-block {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-top: 10px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--fn-ink-soft);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--fn-wine);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--fn-ink-soft);
}

/* Free Forever Pricing Card */
.pricing-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--fn-surface);
  border: 2px solid var(--fn-wine);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-float);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.price-tag {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--fn-wine);
  line-height: 1;
}

.check-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef3ec;
  color: var(--fn-sage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   SIDEBAR-CONTROLLED DASHBOARD LAYOUT
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
  background: var(--fn-paper);
}

.app-sidebar {
  background: var(--fn-surface);
  border-right: 1px solid var(--fn-line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-nav {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--fn-ink-soft);
}

.sidebar-nav a:hover {
  background: var(--fn-paper);
  color: var(--fn-ink);
}

.sidebar-nav a.active {
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
  font-weight: 600;
}

.app-main {
  padding: 32px 40px;
  max-width: 1440px;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fn-line);
  flex-wrap: wrap;
  gap: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fn-ink-soft);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--fn-ink);
  margin-top: 4px;
}

/* Cards, Forms & Tables */
.panel-card {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--fn-ink);
}

.form-control {
  padding: 10px 13px;
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  background: var(--fn-paper);
  color: var(--fn-ink);
  font-size: 0.92rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--fn-wine);
  background: var(--fn-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--fn-line);
}

.data-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fn-ink-soft);
  background: var(--fn-paper);
}

/* ==========================================================================
   PRODUCT EDITOR + ADJUSTABLE LIVE PREVIEW SPLIT STUDIO
   ========================================================================== */
.studio-split {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.sticky-preview-column {
  position: sticky;
  top: 24px;
}

.phone-mockup {
  background: #000;
  border: 8px solid #1a1a1a;
  border-radius: 36px;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    inset 0 0 0 2px #333;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 32px;
  background: #1a1a1a;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #888;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-notch::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #0a0a0a;
  border-radius: 50%;
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.2);
  margin-right: 8px;
}

.phone-body {
  background: var(--fn-paper);
  height: 700px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 40px 16px 20px;
  border-radius: 30px;
  scrollbar-width: none;
  word-break: break-word;
}

.phone-body::-webkit-scrollbar {
  display: none;
}

/* EU Nutrition Table */
.eu-nutrition-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 14px 0;
  font-size: 0.88rem;
}

.eu-nutrition-table th,
.eu-nutrition-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--fn-line);
  word-wrap: break-word;
}

.eu-nutrition-table th {
  background: var(--fn-wine-bg);
  color: var(--fn-wine-deep);
  text-align: left;
  font-weight: 700;
}

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

.eu-nutrition-table tr.sub-row td:first-child {
  padding-left: 26px;
  color: var(--fn-ink-soft);
  font-style: italic;
}

.checkbox-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-pill);
  background: var(--fn-paper);
  font-size: 0.83rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.checkbox-pill input:checked + span {
  color: var(--fn-wine);
  font-weight: 600;
}

.checkbox-pill:has(input:checked) {
  border-color: var(--fn-wine);
  background: var(--fn-wine-bg);
}

.lang-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.lang-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fn-ink-soft);
  cursor: pointer;
}

.lang-tab.active {
  background: var(--fn-wine);
  color: var(--fn-surface);
}

.qr-canvas-box {
  background: var(--fn-surface);
  border: 1px dashed var(--fn-line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-canvas-box svg,
.qr-canvas-box img {
  max-width: 100%;
  height: auto;
}

.alert-banner {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: #fdeeed;
  color: #9e2a2b;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #eef3ec;
  color: var(--fn-sage);
  border: 1px solid rgba(78, 102, 66, 0.3);
}

/* ==========================================================================
   INTERACTIVE SPOTLIGHT TUTORIAL OVERLAY
   ========================================================================== */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 33, 30, 0.58);
  backdrop-filter: blur(2px);
  z-index: 9000;
}

.tour-highlight {
  position: relative;
  z-index: 9001 !important;
  box-shadow:
    0 0 0 4px var(--fn-gold),
    0 18px 48px rgba(0, 0, 0, 0.35) !important;
  transition: box-shadow 0.25s ease;
}

.tour-popover {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--fn-surface);
  border: 2px solid var(--fn-wine);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 9002;
}

.tour-step-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   V3 UPGRADES: FLAG+INITIALS DROPDOWN, SIDEBAR FOLDER-FILE TREE,
   SEARCH TOOLBARS, INTERACTIVE SANDBOX HERO, BENTO GRID & FAQ ACCORDION
   ========================================================================== */

/* 1. Flag + Country Initials Navbar Dropdown */
.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--fn-ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown-trigger:hover {
  border-color: var(--fn-wine);
  background: var(--fn-surface);
}

.lang-dropdown-Caret {
  font-size: 0.7rem;
  color: var(--fn-ink-soft);
  transition: transform 0.2s ease;
}

.lang-dropdown.open .lang-dropdown-Caret {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 165px;
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 2000;
}

.lang-dropdown.open .lang-dropdown-menu {
  display: flex;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--fn-ink-soft);
}

.lang-dropdown-item:hover {
  background: var(--fn-paper);
  color: var(--fn-ink);
}

.lang-dropdown-item.active {
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
}

/* 2. Sidebar Folder-File Tree Explorer */
.sidebar-tree-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--fn-line);
  overflow-y: auto;
  max-height: calc(100vh - 360px);
}

.sidebar-tree-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fn-ink-ghost);
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tree-folder {
  margin-bottom: 4px;
}

.tree-folder-toggle {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fn-ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.tree-folder-toggle:hover {
  background: var(--fn-paper);
}

.tree-folder-left {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-caret {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--fn-ink-soft);
  transition: transform 0.2s ease;
  width: 12px;
}

.tree-folder.open .tree-caret {
  transform: rotate(90deg);
  color: var(--fn-wine);
}

.tree-folder-count {
  font-size: 0.7rem;
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  color: var(--fn-ink-soft);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.tree-files {
  list-style: none;
  margin-left: 16px;
  padding-left: 10px;
  border-left: 1px dashed var(--fn-line);
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-top: 3px;
  margin-bottom: 6px;
}

.tree-folder.open .tree-files {
  display: flex;
}

.tree-file-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--fn-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-file-link:hover {
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
}

.tree-file-link.active {
  background: var(--fn-wine);
  color: var(--fn-surface);
  font-weight: 600;
}

/* 3. Instant Search Filter Bar for Product Types & Products */
.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-pill);
  background: var(--fn-surface);
  font-size: 0.88rem;
  color: var(--fn-ink);
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--fn-wine);
  box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.12);
}

.search-count-badge {
  font-size: 0.8rem;
  color: var(--fn-ink-soft);
  font-weight: 600;
}

/* 4. Reworked Home Page Concept: Interactive Compliance Workbench & Bento Grid */
.workbench-hero {
  padding: 135px 0 70px;
  background:
    radial-gradient(
      circle at 12% 18%,
      rgba(123, 45, 59, 0.06) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 88% 25%,
      rgba(217, 154, 61, 0.08) 0%,
      transparent 45%
    ),
    var(--fn-paper);
  border-bottom: 1px solid var(--fn-line);
}

.workbench-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 44px;
}

.workbench-console {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.console-topbar {
  background: var(--fn-ink);
  color: var(--fn-surface);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 10px;
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.console-dots span:nth-child(1) {
  background: #e06c75;
}
.console-dots span:nth-child(2) {
  background: #e5c07b;
}
.console-dots span:nth-child(3) {
  background: #98c379;
}

.console-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}

.console-left {
  padding: 32px;
  border-right: 1px solid var(--fn-line);
  background: var(--fn-surface);
}

.console-right {
  padding: 32px;
  background: var(--fn-paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Bento Architecture Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-span-7 {
  grid-column: span 7;
}
.bento-span-5 {
  grid-column: span 5;
}
.bento-span-4 {
  grid-column: span 4;
}
.bento-span-8 {
  grid-column: span 8;
}

.mini-tree-demo {
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  font-family: monospace;
  font-size: 0.84rem;
  line-height: 1.75;
}

/* 5. FAQ Accordion */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.faq-item.open {
  border-color: var(--fn-wine);
  box-shadow: var(--shadow-card);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--fn-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: inherit;
}

.faq-trigger:hover {
  color: var(--fn-wine);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--fn-wine);
  color: var(--fn-surface);
}

.faq-content {
  display: none;
  padding: 0 24px 20px;
  color: var(--fn-ink-soft);
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid var(--fn-paper);
}

.faq-item.open .faq-content {
  display: block;
}

/* ==========================================================================
   V4 UPGRADES:
   1. REAL SVG FLAG ICONS (`flag-icons` + Font Awesome 6)
   2. UNIFIED SIDEBAR ACTIVE PRODUCT INDICATOR ("Editing" Pulse Badge)
   3. MOBILE APP-LIKE BOTTOM NAVIGATION + COLLAPSIBLE OFF-CANVAS SIDEBAR
   4. QR STUDIO CUSTOM DIMENSIONS (MM/PX), OFFICIAL EU PRESETS & PRINT SHEET
   ========================================================================== */

/* 1. SVG Flag Icon Styling */
.flag-svg {
  width: 1.25em;
  height: 0.95em;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  display: inline-block;
  vertical-align: middle;
  background-size: cover;
  flex-shrink: 0;
}

/* 2. Active Product Highlighting in Unified Sidebar Dropdown */
.tree-folder.has-active-file > .tree-folder-toggle {
  background: var(--fn-wine-bg);
  color: var(--fn-wine);
}

.tree-file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.81rem;
  color: var(--fn-ink-soft);
  transition: all 0.18s ease;
}

.tree-file-main {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-file-link.active-editing {
  background: linear-gradient(135deg, var(--fn-wine), var(--fn-wine-deep));
  color: var(--fn-surface) !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(123, 45, 59, 0.25);
  border-left: 3px solid var(--fn-gold);
}

.editing-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.4);
}

/* 3. Desktop & Mobile Collapsible Sidebar + App-Like Bottom Navigation */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--fn-surface);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--fn-ink);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  border-color: var(--fn-wine);
  color: var(--fn-wine);
}

.sidebar-close-btn {
  display: none;
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fn-ink);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(35, 33, 30, 0.48);
  backdrop-filter: blur(3px);
  z-index: 2900;
}

/* Desktop Sidebar Collapse Support */
@media (min-width: 981px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0px 1fr;
  }
  .app-shell.sidebar-collapsed .app-sidebar {
    transform: translateX(-100%);
    width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
  }
}

/* Mobile App-Like Bottom Nav & Off-Canvas Collapsible Sidebar */
.mobile-bottom-nav {
  display: none;
}

/* 4. QR Code Official Presets & Custom Dimensions Studio */
.qr-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.qr-preset-btn {
  background: var(--fn-paper);
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.qr-preset-btn:hover {
  border-color: var(--fn-wine);
  background: var(--fn-surface);
}

.qr-preset-btn.active {
  border-color: var(--fn-wine);
  background: var(--fn-wine-bg);
}

.qr-preset-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fn-ink);
  display: block;
}

.qr-preset-sub {
  font-size: 0.7rem;
  color: var(--fn-ink-soft);
}

.qr-dim-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 8px;
  align-items: end;
  margin-bottom: 14px;
}

/* ==========================================================================
   V4.1 STYLE ADJUSTMENTS: Responsive tables & Button wrap safety
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
  border: 1px solid var(--fn-line);
  border-radius: var(--radius-md);
  background: var(--fn-surface);
}

/* Hide desktop toggle button if user prefers a clean permanent sidebar */
@media (min-width: 981px) {
  .sidebar-toggle-btn {
    display: none !important;
  }
}

/* ==========================================================================
   V4.2 & MOBILE OVERFLOW RESOLUTION (CRITICAL MEDIA QUERIES)
   ========================================================================== */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 980px) {

  .console-body {
    display: flex !important;
    flex-direction: column !important;
  }
  .console-left {
    border-right: none !important;
    border-bottom: 1px solid var(--fn-line);
  }
  .bento-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .bento-card {
    width: 100% !important;
  }
  .pricing-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 24px !important;
    gap: 24px !important;
  }
  .workbench-console {
    border-radius: 14px;
  }
  /* Prevent horizontal scrolling & clamping */
  .app-shell {
    display: block;
    width: 100%;
  }
  .app-main {
    padding: 16px 12px 80px 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .studio-split {
    grid-template-columns: 1fr;
  }
  .sticky-preview-column {
    position: relative;
    top: 0;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  .pricing-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .workbench-console {
    border-radius: 14px;
  }

  /* Table padding shrink */
  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 0.84rem;
  }
  .eu-nutrition-table th,
  .eu-nutrition-table td {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  /* Grid stacking safety for small screens */
  .qr-presets-grid {
    grid-template-columns: 1fr;
  }
  .qr-dim-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .qr-dim-inputs .form-group:last-child {
    grid-column: span 2;
  }

  /* Mobile drawer and bottom nav integration */
  body {
    padding-bottom: 76px;
  }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 292px;
    max-width: 85vw;
    height: 100vh;
    z-index: 3000;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  }
  .app-shell.mobile-drawer-open .app-sidebar {
    transform: translateX(0);
  }
  .app-shell.mobile-drawer-open .sidebar-backdrop {
    display: block;
  }
  .sidebar-close-btn {
    display: inline-flex;
  }
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--fn-line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    z-index: 2800;
    box-shadow: 0 -6px 24px rgba(35, 33, 30, 0.07);
    padding: 0 6px;
  }
  .mob-nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.69rem;
    font-weight: 600;
    color: var(--fn-ink-soft);
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
  }
  .mob-nav-item i {
    font-size: 1.08rem;
  }
  .mob-nav-item.active {
    color: var(--fn-wine);
  }
  .mob-nav-item.active i {
    background: var(--fn-wine-bg);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
  }

  /* Dashboard mobile cards overrides */
  .table-responsive {
    display: none !important;
  }
  .dashboard-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  .mob-item-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mob-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--fn-line);
    padding-bottom: 10px;
  }
  .mob-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fn-ink);
    margin: 0;
  }
  .mob-card-subtitle {
    font-size: 0.8rem;
    color: var(--fn-ink-soft);
    margin-top: 2px;
  }
  .mob-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.84rem;
  }
  .mob-card-field {
    display: flex;
    flex-direction: column;
  }
  .mob-card-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fn-ink-ghost);
    font-weight: 600;
  }
  .mob-card-val {
    color: var(--fn-ink);
    font-weight: 600;
  }
  .mob-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--fn-line);
    justify-content: flex-end;
  }
  .mob-card-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

/* Desktop Fixed Sidebar Engine */
@media (min-width: 981px) {
  body {
    overflow-x: hidden;
  }
  .app-shell {
    display: block;
    position: relative;
    min-height: 100vh;
  }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 100;
    background: var(--fn-surface);
    border-right: 1px solid var(--fn-line);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition:
      transform 0.25s ease,
      width 0.25s ease;
  }
  .app-main {
    margin-left: 270px;
    padding: 32px 40px;
    max-width: calc(1440px + 270px);
    width: auto;
    transition: margin-left 0.25s ease;
  }
}


@media (max-width: 980px) {
  .glass-navbar {
    border-radius: 22px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .burger-btn {
    display: flex !important;
  }
  .nav-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
    margin-top: 14px;
    border-top: 1px solid var(--fn-line);
    gap: 16px;
  }
  .glass-navbar.menu-open .nav-collapse {
    display: flex !important;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav-actions {
    flex-direction: column;
    width: 100%;
  }
  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 981px) {
  .nav-collapse {
    display: flex !important;
    align-items: center;
    gap: 32px;
  }
  .burger-btn {
    display: none !important;
  }
}


@media (max-width: 980px) {
  .glass-navbar {
    border-radius: 22px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .burger-btn {
    display: flex !important;
  }
  .nav-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
    margin-top: 14px;
    border-top: 1px solid var(--fn-line);
    gap: 16px;
  }
  .glass-navbar.menu-open .nav-collapse {
    display: flex !important;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav-actions {
    flex-direction: column;
    width: 100%;
  }
  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 981px) {
  .nav-collapse {
    display: flex !important;
    align-items: center;
    gap: 32px;
  }
  .burger-btn {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY OVERRIDES & MOBILE CARD STYLING
   ========================================================================== */

/* 1. Hide mobile cards by default on desktop */
.dashboard-mobile-cards {
  display: none;
}

@media (max-width: 980px) {
  /* 2. Hide desktop tables marked with this class on mobile */
  .hide-on-mobile {
    display: none !important;
  }

  /* 3. Display and structure the mobile cards */
  .dashboard-mobile-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .mob-item-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .mob-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--fn-line);
    padding-bottom: 10px;
  }
  
  .mob-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fn-ink);
    margin: 0;
  }
  
  .mob-card-subtitle {
    font-size: 0.8rem;
    color: var(--fn-ink-soft);
    margin-top: 2px;
  }
  
  .mob-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.84rem;
  }
  
  .mob-card-field {
    display: flex;
    flex-direction: column;
  }
  
  .mob-card-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fn-ink-ghost);
    font-weight: 600;
  }
  
  .mob-card-val {
    color: var(--fn-ink);
    font-weight: 600;
  }
  
  .mob-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--fn-line);
    justify-content: flex-end;
  }
  
  .mob-card-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  /* 4. Force grid structures to stack vertically on mobile */
  .app-shell {
    display: block;
    width: 100%;
  }
  
  .app-main {
    padding: 16px 12px 80px 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .studio-split, 
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .topbar > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
}