:root {
  --sticky-viewer-height: calc(100vh - 210px);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, var(--bg-orb-top), transparent 24%),
    radial-gradient(circle at bottom right, var(--bg-orb-bottom), transparent 22%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  padding: 32px;
  min-height: 100vh;
}
.page { max-width: 1600px; margin: 96px auto 0; }
.language-switch {
  position: fixed; top: 20px; right: 32px; z-index: 100; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px; background: rgba(var(--surface-rgb), 0.78);
  border: 1px solid var(--language-switch-border); box-shadow: var(--language-switch-shadow); backdrop-filter: blur(12px);
}
.lang-pill {
  min-width: 52px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  transition: background 0.22s ease, color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
}
.lang-pill:hover { background: var(--lang-pill-hover-bg); color: var(--primary); transform: translateY(-1px); }
.lang-pill.active { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: var(--lang-pill-active-shadow); }
.app-shell { display: flex; gap: 24px; align-items: stretch; }
.sidebar {
  width: 280px; flex: 0 0 280px; background: rgba(var(--surface-rgb), 0.72); border: 1px solid rgba(var(--surface-rgb), 0.78);
  border-radius: 28px; box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); padding: 22px 18px; display: flex; flex-direction: column;
  min-height: calc(100vh - 64px); position: sticky; top: 24px;
}
.sidebar-brand { display:flex; align-items:center; gap:14px; padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--sidebar-separator); }
.sidebar-brand img { max-width: 150px; height: 34px; width: auto; object-fit: contain; display:block; }
.sidebar-section-title { margin:0 0 10px; font-size:11px; font-weight:800; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted); opacity:0.8; }
.sidebar-nav { display:grid; gap:6px; }
.nav-item, .subnav-item {
  display:flex; align-items:center; gap:10px; text-decoration:none; transition:0.2s ease; font-weight:700;
}
.nav-item {
  min-height:46px; padding:10px 14px; border-radius:16px; color:var(--text); background:transparent; border:1px solid transparent; position:relative;
}
.nav-item:hover { background: rgba(var(--surface-rgb),0.55); border-color: var(--nav-border); }
.nav-item.active { background: var(--nav-active-bg); border-color: var(--nav-border); color: var(--primary); }
.nav-item-icon {
  width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); flex:0 0 auto; border-radius:10px;
  background: rgba(var(--surface-rgb),0.55); border:1px solid var(--nav-border); box-shadow: inset 0 1px 0 rgba(var(--surface-rgb),0.45);
}
.nav-item.active .nav-item-icon { color:var(--primary); background: rgba(var(--surface-rgb),0.78); border-color: var(--nav-active-icon-border); }
.nav-item-label { flex:1 1 auto; min-width:0; }
.nav-item-chevron { color:var(--muted); font-size:16px; flex:0 0 auto; opacity:0.8; }
.sidebar-subnav { display:grid; gap:6px; margin-top:8px; margin-left:12px; padding-left:14px; border-left:1px solid var(--sidebar-subnav-border); }
.subnav-item {
  min-height:42px; padding:10px 14px; border-radius:14px; color:var(--muted);
}
.subnav-item:hover { background: rgba(var(--surface-rgb),0.5); color: var(--text); }
.subnav-item.active { background: var(--subnav-active-bg); color: var(--primary); }
.subnav-icon {
  width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center; color:currentColor; border-radius:8px;
  background: rgba(var(--surface-rgb),0.46); border:1px solid var(--subnav-icon-border); flex:0 0 auto;
}
.content-area { flex:1 1 auto; min-width:0; }
.hero {
  display:flex; flex-direction:column; gap:16px; margin-bottom:24px; padding:20px 28px; border-radius:28px;
  background: linear-gradient(135deg, var(--hero-gradient-start), var(--hero-gradient-end)), rgba(var(--surface-rgb),0.82);
  border:1px solid var(--hero-border); box-shadow: var(--shadow-soft); backdrop-filter: blur(10px);
}
.hero-main { display:flex; justify-content:space-between; align-items:flex-start; gap:28px; }
.hero h1 { margin:0; font-size:36px; line-height:1.05; letter-spacing:-0.04em; font-weight:800; }
.hero p { margin:10px 0 0; color: var(--muted); font-size: 15px; }
.card {
  background: rgba(var(--surface-rgb), 0.9); backdrop-filter: blur(16px); border:1px solid rgba(var(--surface-rgb),0.75);
  border-radius:28px; box-shadow: var(--shadow); overflow:hidden; display:flex; flex-direction:column;
}
.viewer-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 22px; border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, var(--toolbar-gradient-start), var(--toolbar-gradient-end));
}
.viewer-chip {
  display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:0 14px; border-radius:999px; background: rgba(var(--surface-rgb),0.84);
  border:1px solid var(--button-outline-border); color: var(--primary); font-size:13px; font-weight:700;
}
.dashboard-frame { padding: 18px; }
.dashboard-stage {
  background: rgba(var(--surface-rgb),0.95); border:1px solid var(--border); border-radius:22px; overflow:auto; box-shadow: var(--shadow-soft);
}
.dashboard-stage img { display:block; width:100%; height:auto; min-width:900px; }
.mobile-nav-trigger {
  position: fixed; top: 12px; left: 16px; z-index: 205; width: 42px; height: 42px; border: 1px solid var(--mobile-button-border);
  background: rgba(var(--surface-rgb), 0.92); color: var(--primary); border-radius: 14px; display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft); cursor: pointer; padding: 0;
}
.mobile-sidebar-backdrop {
  position: fixed; inset:0; background: rgba(15,23,42,0.38); backdrop-filter: blur(3px); z-index:210; opacity:0; pointer-events:none; transition:opacity 0.22s ease;
}
.mobile-sidebar-backdrop.visible { opacity:1; pointer-events:auto; }
.mobile-sidebar-close {
  width:40px; height:40px; display:none; align-items:center; justify-content:center; margin-left:auto; margin-bottom:14px; padding:0; border:none;
  background: rgba(var(--surface-rgb),0.9); color:var(--primary); border-radius:14px; font-size:22px; line-height:1; cursor:pointer;
}
@media (max-width: 1100px) {
  .app-shell { flex-direction: column; }
  .sidebar { width:100%; min-height:auto; position:static; }
  body { padding:20px; }
  .hero-main { flex-direction:column; align-items:stretch; }
}
@media (max-width: 900px) {
  body { padding:16px; }
  .language-switch { top:12px; right:16px; padding:5px; gap:4px; }
  .lang-pill { min-width:46px; height:36px; padding:0 14px; font-size:11px; }
  .app-shell { display:block; }
  .page { margin-top:72px; }
  .hero { padding:16px; gap:12px; border-radius:22px; }
  .hero h1 { font-size:28px; line-height:1.1; }
  .card { border-radius:22px; }
  .viewer-toolbar { padding:16px; flex-direction:column; align-items:flex-start; }
  .dashboard-frame { padding:14px; }
  .dashboard-stage img { min-width:760px; }
  .mobile-nav-trigger { display:inline-flex !important; }
  .sidebar {
    position: fixed; top:0; left:0; bottom:0; width:min(86vw, 320px); min-height:100vh; border-radius:0 24px 24px 0; z-index:220; transform: translateX(-104%);
    transition: transform 0.28s ease; padding:18px 16px 22px; overflow-y:auto; background: rgba(var(--surface-rgb),0.96); border:1px solid rgba(var(--surface-rgb),0.82);
    box-shadow: 0 20px 60px rgba(4,0,25,0.18); backdrop-filter: blur(16px);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-sidebar-close { display:inline-flex !important; }
}


/* Persistent page header */
.page-top-header {
  position: sticky;
  top: 16px;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  justify-content: space-between;
  margin: 16px auto 18px;
  padding: 14px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--hero-gradient-start, rgba(37, 0, 191, 0.06)), var(--hero-gradient-end, rgba(131, 102, 255, 0.03))),
    rgba(var(--surface-rgb, 255, 255, 255), 0.88);
  border: 1px solid var(--hero-border, rgba(221, 214, 255, 0.95));
  box-shadow: var(--shadow-soft, 0 18px 44px rgba(37, 0, 191, 0.12));
  backdrop-filter: blur(14px);
}

.page-top-header-title {
  flex: 1 1 auto;
  min-width: 0;
}

.page-top-header-title .hero-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.page-top-header-title-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.page-top-header-client-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 44px;
  display: block;
}

.page-top-header-title {
  min-width: 0;
}

.page-top-header-title h1,
.page-top-header-title .page-top-header-title-text {
  margin: 0;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--text, #040019);
}

.page-top-header-title p,
.page-top-header-title .subtle,
.page-top-header-title .hero-subtitle,
.page-top-header-title .page-top-header-subtitle {
  margin: 0 !important;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted, rgba(4, 0, 25, 0.68));
}

.page-top-header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: fit-content;
}

body.with-fixed-top-header .language-switch {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0;
  z-index: auto;
}

body.with-fixed-top-header .page {
  margin-top: 24px !important;
}

body.with-fixed-top-header .hero {
  margin-top: 0;
}

body.with-fixed-top-header .hero-main {
  min-height: 0;
}

body.with-fixed-top-header .hero h1.page-title-relocated,
body.with-fixed-top-header .hero .page-subtitle-relocated {
  display: none !important;
}

@media (max-width: 980px) {

  .page-top-header-title-wrapper {
    gap: 10px;
    align-items: center;
  }

  .page-top-header-client-logo {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .page-top-header {
    top: 12px;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .page-top-header-title h1,
  .page-top-header-title .page-top-header-title-text {
    font-size: 22px;
    line-height: 1.1;
  }

  .page-top-header-title p,
  .page-top-header-title .subtle,
  .page-top-header-title .hero-subtitle,
  .page-top-header-title .page-top-header-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 720px) {
  .page-top-header {
    top: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .page-top-header-title {
    order: 2;
    width: 100%;
  }

  .page-top-header-title h1,
  .page-top-header-title .page-top-header-title-text {
    font-size: 24px;
  }

  .page-top-header-right {
    order: 1;
    margin-left: auto;
  }

  body.with-fixed-top-header .page {
    margin-top: 12px !important;
  }
}

