/* Header */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--gold);
  color: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { height: 30px; width: auto; }
.header-title { font-size: 0.88rem; font-family: sans-serif; font-weight: bold; letter-spacing: 0.02em; color: #0f0f0f; }
.header-right { display: flex; align-items: center; gap: 6px; }
.header-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.2);
  background: transparent;
  color: #0f0f0f;
  font-family: sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
}
.header-btn:hover { background: rgba(0,0,0,0.1); }
.header-btn.active { background: rgba(0,0,0,0.15); }

/* User menu (inside header) */
.user-menu { position: relative; display: flex; align-items: center; }
.user-menu-toggle { display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(0,0,0,0.2); border-radius: 20px; padding: 3px 10px 3px 4px; cursor: pointer; font-family: sans-serif; font-size: 0.78rem; color: #0f0f0f; transition: background 0.15s; }
.user-menu-toggle:hover { background: rgba(0,0,0,0.1); }
.user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }
.user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface, #fff); border: 1px solid var(--border, #ddd); border-radius: 8px; min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 300; overflow: hidden; }
.user-dropdown-email { padding: 10px 14px 6px; font-size: 0.72rem; color: var(--muted, #888); border-bottom: 1px solid var(--border, #ddd); word-break: break-all; }
.user-dropdown-item { display: block; padding: 10px 14px; font-size: 0.83rem; color: var(--text, #111); text-decoration: none; cursor: pointer; }
.user-dropdown-item:hover { background: var(--hover, rgba(0,0,0,0.05)); }

/* Lang dropdown (inside header) */
.lang-dropdown { position: relative; }

/* App layout */
.app-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  background: var(--bg);
  border-right: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.25s ease;
}

/* Hamburger button (hidden on desktop) */
.btn-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #0f0f0f;
  padding: 4px 8px;
  line-height: 1;
}

/* Sidebar close button (hidden on desktop) */
.sidebar-close {
  display: none;
  align-self: flex-end;
  margin: 8px 12px 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}
.sidebar-close:hover { color: var(--text); }

/* Sidebar overlay (mobile backdrop) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }
.sidebar-items { padding: 16px 0; display: flex; flex-direction: column; }
.sidebar-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  font-family: sans-serif;
  font-size: 0.88rem;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.sidebar-item:hover { color: var(--gold-light); background: var(--surface2); }
.sidebar-item.active { color: var(--gold-light); border-left-color: var(--gold); }
.sidebar-footer { padding: 12px 0; border-top: 1px solid var(--border); }
.sidebar-coming-soon {
  padding: 10px 20px;
  font-family: sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-line;
}
.coming-soon-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
  opacity: 0.7;
}

/* Main content */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Screens */
.screen { display: none; width: 100%; max-width: 680px; padding: 48px 24px; }
.screen.active { display: flex; flex-direction: column; gap: 32px; }
#screen-principles { max-width: 1100px; padding: 48px 24px; }

/* Page content screens */
.screen-page { max-width: 760px; }
.page-hero-image {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
  margin: 24px auto 32px;
  border-radius: 18px;
}
.page-hero-image.shadow { box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.page-hero-heading { font-size: 1.5rem; font-weight: normal; color: var(--gold-light); line-height: 1.35; }
.page-section { display: flex; flex-direction: column; gap: 8px; }
.page-section-heading { font-size: 1.05rem; color: var(--gold-light); font-weight: normal; }
.page-section-body { font-size: 0.95rem; line-height: 1.8; color: var(--text); opacity: 0.92; }

/* Mobile */
@media (max-width: 768px) {
  .app-sidebar { transform: translateX(-100%); z-index: 150; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .btn-hamburger { display: flex; align-items: center; }
  .sidebar-close { display: flex; }
  .options-grid { grid-template-columns: 1fr; }
  .landing-headline { font-size: 1.5rem; }
  .principles-layout { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .principle-detail { position: static; }
}
