/* =====================================================================
 * PerunPath Modern Design System (V3)
 * Unified visual language: Forest · Stone · Gold
 * ===================================================================== */

/* Self-hosted subset Material Symbols Outlined (~124 KB zamiast ~3,9 MB
 * z Google Fonts — subset 143 używanych ikon, fonttools + rlig closure) */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("../fonts/material-symbols-subset.750c7a6f5790.woff2") format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'rlig' 1, 'rclt' 1;
}

:root {
  /* --- Colors --- */
  --color-primary: #2c6e49;
  --color-primary-dark: #1b4332;
  --color-primary-light: #40916c;
  --color-accent: #ffc300;
  --color-accent-dark: #cc9c00;
  --color-stone: #f4f1eb;
  --color-stone-dark: #d2c8b4;
  --color-slate: #1c1f22;
  --color-slate-elevated: #2a2e33;
  --color-white: #ffffff;
  --color-danger: #c04b3a;
  --color-success: #40916c;
  --color-warning: #c9942a;

  /* --- Adaptive Tokens --- */
  --bg-app: var(--color-stone);
  --bg-surface: var(--color-white);
  --bg-nav: var(--color-slate);
  --text-main: var(--color-slate);
  --text-muted: #6b6558;
  --text-on-primary: var(--color-white);
  --border-main: var(--color-stone-dark);
  --shadow-main: 0 4px 20px rgba(0,0,0,0.06);
  --radius-main: 16px;

  /* --- Typography --- */
  --font-ui: "Inter", system-ui, sans-serif;
  --font-display: "Barlow Condensed", sans-serif;

  /* --- Extended tokens --- */
  --color-accent-text: #7a5c0f;    /* gold ciemniejsze — 4.6:1 na stone, zdaje WCAG AA */
  --color-primary-text: #2d6a4f;   /* adaptive: readable on light bg */
  --color-primary-subtle: rgba(45, 106, 79, 0.08);
  --color-accent-subtle: rgba(201, 148, 42, 0.10);
  --transition-base: 200ms ease-in-out;
  /* --- Semantic surface tokens --- */
  --bg-info: rgba(59, 130, 246, 0.10);
  --text-info: #1d4ed8;
  --bg-success-subtle: rgba(64, 145, 108, 0.10);
  --text-success: #1b5e3b;
  --bg-section-green: rgba(45, 106, 79, 0.10);
  --bg-section-blue: rgba(59, 130, 246, 0.10);
  --bg-section-amber: rgba(201, 148, 42, 0.10);
  --bg-section-purple: rgba(124, 58, 237, 0.10);
  --text-section-blue: #1e40af;
  --text-section-amber: #92400e;
  --text-section-purple: #5b21b6;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-app: var(--color-slate);
  --bg-surface: var(--color-slate-elevated);
  --text-main: var(--color-stone);
  --text-muted: #a8a296;
  --border-main: #3d4349;
  --shadow-main: 0 8px 30px rgba(0,0,0,0.3);
}

/* Dark Mode Overrides (extended) */
[data-theme="dark"] {
  --bg-app: var(--color-slate);
  --bg-surface: var(--color-slate-elevated);
  --text-main: var(--color-stone);
  --text-muted: #a8a296;
  --border-main: #3d4349;
  --shadow-main: 0 8px 30px rgba(0,0,0,0.3);
  --color-accent-text: #d4a84b;
  --color-primary-text: #52b788;   /* adaptive: readable on dark bg (4.7:1 vs #2a2e33) */
  --color-primary-subtle: rgba(64, 145, 108, 0.12);
  --color-accent-subtle: rgba(201, 148, 42, 0.12);
  /* --- Semantic surface tokens dark --- */
  --bg-info: rgba(96, 165, 250, 0.12);
  --text-info: #93c5fd;
  --bg-success-subtle: rgba(64, 145, 108, 0.14);
  --text-success: #74c69d;
  --bg-section-green: rgba(64, 145, 108, 0.15);
  --bg-section-blue: rgba(96, 165, 250, 0.12);
  --bg-section-amber: rgba(201, 148, 42, 0.15);
  --bg-section-purple: rgba(167, 139, 250, 0.12);
  --text-section-blue: #93c5fd;
  --text-section-amber: #fbbf24;
  --text-section-purple: #c4b5fd;
}

/* --- Core Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { 
  font-family: var(--font-ui); 
  background: var(--bg-app); 
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout Components --- */
.pp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pp-main-content {
  padding: 40px 0 100px;
}

/* --- Modern Glass Capsule Navbar --- */
.app-header, .pp-navbar {
  min-height: 56px !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(17, 21, 26, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .app-header,
[data-theme="light"] .pp-navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-brand-link:hover {
  transform: scale(1.02);
}

.header-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}
.brand-bolt-svg {
  width: 17px;
  height: 17px;
}

.header-brand-text .brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}
[data-theme="light"] .header-brand-text .brand-name {
  color: #0f172a;
}
.brand-ai {
  background: linear-gradient(135deg, #10b981 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.header-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: livePulse 2s infinite ease-in-out;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.header-icon-svg {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* ── Floating Glass Capsule (Center Nav) ── */
.header-nav-capsule {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 3px 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .header-nav-capsule {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.capsule-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .capsule-nav-item {
  color: #475569;
}
.capsule-icon {
  font-size: 13px;
  line-height: 1;
}
.capsule-nav-item:hover,
.capsule-nav-item.active-capsule {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
[data-theme="light"] .capsule-nav-item:hover,
[data-theme="light"] .capsule-nav-item.active-capsule {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.capsule-nav-item.active-capsule {
  color: #10b981 !important;
  font-weight: 700;
}

/* ── Header Right: Actions, Auth, Icons ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-prompt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.header-prompt-badge.is-pro {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-login-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.header-login-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 185, 129, 0.5);
}
[data-theme="light"] .header-login-btn {
  color: #475569;
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .header-login-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.header-signup-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.32);
}
.header-signup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.header-user-btn {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.header-user-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
}
.user-avatar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.header-btn {
  background: #11151a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
[data-theme="light"] .header-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}
.header-btn:hover {
  color: #f1f5f9;
  border-color: rgba(16, 185, 129, 0.5);
  background: #181e25;
}
[data-theme="light"] .header-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.header-icon-btn {
  padding: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Mobile Menu & Dropdown Drawer ── */
.header-mobile-menu-wrapper {
  display: none;
  position: relative;
}

.header-hamburger-btn {
  position: relative;
  z-index: 1001;
}
.header-hamburger-btn .header-close-svg {
  display: none;
}
.header-hamburger-btn.is-active .header-hamburger-svg {
  display: none;
}
.header-hamburger-btn.is-active .header-close-svg {
  display: inline-block;
}

.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.mobile-menu-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.header-mobile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #181e25;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 8px;
  min-width: 230px;
  max-width: calc(100vw - 24px);
  max-height: calc(85vh - env(safe-area-inset-top));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}
[data-theme="light"] .header-mobile-dropdown {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}
.header-mobile-dropdown.is-open {
  display: block;
}
.header-mobile-dropdown::-webkit-scrollbar {
  width: 4px;
}
.header-mobile-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}
[data-theme="light"] .dropdown-item {
  color: #0f172a;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.dropdown-item-highlight {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  font-weight: 700 !important;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 6px;
}
[data-theme="light"] .dropdown-divider {
  background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 860px) {
  .header-nav-capsule {
    display: none !important;
  }
  .header-mobile-menu-wrapper {
    display: block !important;
  }
}
@media (max-width: 640px) {
  .header-login-btn,
  .header-signup-btn,
  .header-user-btn {
    display: none !important;
  }
}
@media (max-width: 380px) {
  .header-brand-text .brand-name {
    font-size: 14.5px;
  }
  .header-prompt-badge {
    padding: 3px 7px;
    font-size: 11px;
  }
  .header-actions {
    gap: 4px;
  }
}

/* --- Modern Buttons --- */
.pp-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-ui);
}

.pp-btn-primary { 
  background: var(--color-primary); 
  color: white; 
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}
.pp-btn-primary:hover { background: var(--color-primary-light); transform: translateY(-2px); }

.pp-btn-accent { 
  background: var(--color-accent); 
  color: var(--color-slate); 
}
.pp-btn-accent:hover { background: var(--color-accent-dark); transform: translateY(-2px); }

/* --- Glass Cards --- */
.pp-card {
  background: var(--bg-surface);
  border-radius: var(--radius-main);
  padding: 24px;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-main);
  transition: transform 0.2s;
}

.pp-card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

/* --- Grid System --- */
.pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* --- Mobile Bottom Nav --- */
.pp-mobile-nav {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  height: 66px;
  background: rgba(28, 31, 34, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border-radius: 20px;
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 8px;
}

@media (max-width: 768px) {
  .pp-navbar .pp-nav-links { display: none; }
  .pp-mobile-nav { display: flex; }
  .pp-main-content { padding-bottom: 100px; } /* Prevent nav bar covering content */
}

.mobile-nav-item {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  height: 100%;
}

.mobile-nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
}

.mobile-nav-item.active {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.mobile-nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.mobile-nav-item .material-symbols-outlined {
  font-size: 24px;
  transition: transform 0.2s ease;
}

.mobile-nav-item.active .material-symbols-outlined {
  transform: scale(1.1);
}

/* Center CTA Button */
.mobile-nav-item.mobile-nav-btn-center {
  background: var(--color-primary);
  color: var(--color-white);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex: none;
  margin-top: -20px;
  box-shadow: 0 6px 20px rgba(44, 110, 73, 0.4);
  border: 4px solid #1c1f22;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item.mobile-nav-btn-center:hover,
.mobile-nav-item.mobile-nav-btn-center:active {
  transform: scale(1.08) translateY(-4px);
  background: var(--color-primary-light);
  color: var(--color-white);
}

.mobile-nav-item.mobile-nav-btn-center .material-symbols-outlined {
  font-size: 28px;
  color: var(--color-white);
}

/* --- Button Variants --- */
.pp-btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-main);
}
.pp-btn-ghost:hover { background: var(--color-stone); color: var(--text-main); }

.pp-navbar .pp-btn-ghost {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.28);
}
.pp-navbar .pp-btn-ghost:hover {
  color: white;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.45);
}

.pp-btn-soft {
  background: var(--color-stone);
  color: var(--text-main);
  border: 1px solid var(--border-main);
}
.pp-btn-soft:hover { background: var(--color-stone-dark); }

.pp-btn-success {
  background: var(--color-success);
  color: white;
  box-shadow: 0 4px 12px rgba(64, 145, 108, 0.3);
}
.pp-btn-success:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

.pp-btn-danger {
  background: var(--color-danger);
  color: white;
}
.pp-btn-danger:hover { filter: brightness(1.1); transform: translateY(-1px); }

.pp-btn-sm { padding: 8px 16px !important; font-size: 13px !important; border-radius: 8px; }
.pp-btn-xs { padding: 6px 12px !important; font-size: 12px !important; border-radius: 6px; }
.pp-btn-lg { padding: 16px 36px !important; font-size: 16px !important; }

/* --- Nav active state --- */
.pp-nav-links .pp-nav-active { color: var(--color-accent) !important; }

/* --- Hamburger Menu --- */
.pp-nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.pp-nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}
.pp-nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.pp-hamburger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pp-hamburger-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.pp-hamburger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Nav Actions Cluster (AI, Theme, Hamburger) --- */
.pp-nav-actions-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pp-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.pp-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}
.pp-theme-toggle .material-symbols-outlined {
  font-size: 19px;
}

/* --- Mobile / Desktop Display Switchers --- */
.pp-mobile-only {
  display: none;
}
.pp-nav-links-desktop,
.pp-nav-links-desktop-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 991px) {
  .pp-navbar {
    height: 62px;
    padding: 0 12px;
  }
  .pp-nav-hamburger {
    display: flex;
  }
  .pp-nav-links-desktop,
  .pp-nav-links-desktop-actions {
    display: none !important;
  }
  .pp-mobile-only {
    display: block;
  }
  .pp-nav-links {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(14, 22, 17, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 16px 40px;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    animation: ppMenuSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pp-nav-links.pp-nav-open {
    display: flex;
  }
}

@keyframes ppMenuSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Menu Drawer Internal Elements --- */
.pp-mobile-menu-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.pp-mobile-menu-label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  padding: 0 4px;
}
.pp-mobile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: rgba(255, 255, 255, 0.95);
  transition: all 0.15s ease;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.pp-mobile-item:hover,
.pp-mobile-item:active {
  background: rgba(255, 255, 255, 0.06);
}
.pp-mobile-item.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
}
.pp-mobile-item-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pp-mobile-item.active .pp-mobile-item-icon {
  background: rgba(16, 185, 129, 0.25);
}
.pp-mobile-item-body {
  flex: 1;
  min-width: 0;
}
.pp-mobile-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: block;
}
.pp-mobile-item.active .pp-mobile-item-title {
  color: #10b981;
}
.pp-mobile-item-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-mobile-badge-live {
  font-size: 9.5px;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  margin-left: auto;
  flex-shrink: 0;
}

/* User Card in Mobile Drawer */
.pp-mobile-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pp-mobile-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

/* Language selector grid */
.pp-mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.pp-mobile-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.15s;
}
.pp-mobile-lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.pp-mobile-lang-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.4);
}

/* Light Theme Overrides for Mobile Nav */
[data-theme="light"] .pp-navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #1c1f22;
}
[data-theme="light"] .pp-theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1c1f22;
}
[data-theme="light"] .pp-nav-hamburger {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .pp-nav-hamburger span {
  background: #1c1f22;
}
[data-theme="light"] .pp-nav-links {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .pp-mobile-item {
  color: #1c1f22;
}
[data-theme="light"] .pp-mobile-item:hover,
[data-theme="light"] .pp-mobile-item:active {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .pp-mobile-item.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .pp-mobile-item-icon {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .pp-mobile-item-title {
  color: #1c1f22;
}
[data-theme="light"] .pp-mobile-item-sub {
  color: #6b7280;
}
[data-theme="light"] .pp-mobile-menu-label {
  color: #9ca3af;
}
[data-theme="light"] .pp-mobile-menu-section {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .pp-mobile-user-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
[data-theme="light"] .pp-mobile-lang-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1c1f22;
}
[data-theme="light"] .pp-mobile-lang-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.2; margin-top: 0; }
a { color: var(--color-primary); }
p { margin-top: 0; }

/* --- Section Layout --- */
.pp-section { margin-bottom: 48px; }
.pp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.pp-section-header-end { align-items: center; }
.pp-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}
.pp-section-link {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}
.pp-section-link:hover { text-decoration: underline; }

/* --- Card Enhancements --- */
.pp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,0.1); }
.pp-card a { color: var(--color-primary); }

/* --- Text Utilities --- */
.pp-muted-text { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; }
.pp-muted-text-xs { color: var(--text-muted); font-size: 0.75rem; }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--text-muted); }

/* --- Form Elements --- */
.pp-textarea-full {
  width: 100%;
  border: 1.5px solid var(--border-main);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-surface);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pp-textarea-full:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

/* --- Spacing Utilities --- */
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.mt-60 { margin-top: 60px; }
.mt-80 { margin-top: 80px; }

/* pp- prefixed spacing (used in trip_detail) */
.pp-mt-0_25 { margin-top: 0.25rem; }
.pp-mt-0_5  { margin-top: 0.5rem; }
.pp-mt-0_75 { margin-top: 0.75rem; }
.pp-mt-1    { margin-top: 1rem; }
.pp-mt-1_5  { margin-top: 1.5rem; }
.pp-section-mt-1_5 { margin-top: 1.5rem; }

/* --- Participants (trip_detail) --- */
.pp-participants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.pp-participant-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-stone);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border-main);
}
.pp-participant-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.pp-participant-name { font-size: 13px; font-weight: 600; }
.pp-participant-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-danger);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.15s;
}
.pp-participant-remove-btn:hover { background: rgba(192,75,58,0.1); }

/* --- Forum styles (trip_detail chat) --- */
.pp-forum-replies-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; padding: 0; }
.pp-forum-reply-item { border-left: 3px solid var(--color-stone-dark); padding: 8px 12px; }
.pp-forum-reply-meta { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.pp-forum-topic-body-inner { font-size: 14px; line-height: 1.6; }

/* --- Share buttons (trip_detail) --- */
.pp-share-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pp-share-button { font-size: 13px !important; padding: 8px 16px !important; }

/* --- Footer --- */
.pp-footer {
  background: var(--color-slate);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
  margin-top: 80px;
}
.pp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.pp-footer-brand p {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.6;
  line-height: 1.6;
  max-width: 220px;
}
.pp-footer-social { margin-top: 16px; display: flex; gap: 10px; }
.pp-footer-app-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background 0.2s;
}
.pp-footer-app-badge:hover { background: rgba(255,255,255,0.18); color: white; }
.pp-footer-heading {
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.pp-footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.pp-footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.pp-footer-links a:hover { color: rgba(255,255,255,0.9); }
.pp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  font-size: 12px;
  opacity: 0.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 900px) {
  .pp-footer-grid { grid-template-columns: 1fr 1fr; }
  .pp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .pp-footer-grid { grid-template-columns: 1fr; }
}

/* --- Forum & Section Utilities --- */
.pp-section-header-vertical { flex-direction: column; align-items: flex-start; gap: 4px; }
.pp-section-title-lg { font-size: clamp(1.5rem, 4vw, 2.25rem); }
.pp-section-title-md { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
.pp-section-title-sm { font-size: 1rem; }
.pp-muted-text-sm { font-size: 0.8rem; color: var(--text-muted); }
.pp-m-0 { margin: 0; }

.pp-forum-topic-body { padding: 24px; }
.pp-forum-attachments { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-main); }
.pp-attachment-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.pp-attachment-list li a { color: var(--color-primary); text-decoration: none; font-size: 14px; }
.pp-attachment-list li a:hover { text-decoration: underline; }
.pp-forum-replies-header { margin-top: 8px; }

/* The pp-forum-replies-list class is also used as a card wrapper */
.pp-forum-replies-list.pp-card { padding: 0; }
.pp-forum-reply-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-main);
}
.pp-forum-reply-item:last-child { border-bottom: none; }

/* --- Breadcrumbs --- */
.pp-breadcrumbs {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted);
    padding: 16px 0 8px; flex-wrap: wrap;
}
.pp-breadcrumbs a { color: var(--color-primary); text-decoration: none; }
.pp-breadcrumbs a:hover { text-decoration: underline; }
.pp-breadcrumbs .sep { opacity: 0.5; }

/* --- Badge --- */
.pp-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pp-badge-success { background: rgba(64,145,108,0.1); color: var(--color-success); border: 1px solid rgba(64,145,108,0.2); }
.pp-badge-warning { background: rgba(201,148,42,0.1); color: var(--color-warning); border: 1px solid rgba(201,148,42,0.2); }
.pp-badge-danger  { background: rgba(192,75,58,0.1);  color: var(--color-danger);  border: 1px solid rgba(192,75,58,0.2); }

/* --- Alert boxes --- */
.pp-alert {
    padding: 14px 18px; border-radius: 12px;
    font-size: 14px; line-height: 1.5; margin-bottom: 16px;
}
.pp-alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.pp-alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pp-alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.pp-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* --- Focus visible (EU Accessibility Act 2025) --- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* --- Dark mode toggle button --- */
.pp-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
  flex-shrink: 0;
}
.pp-theme-toggle:hover {
  background: rgba(255,255,255,0.18);
  color: white;
}
.pp-theme-toggle .material-symbols-outlined { font-size: 18px; }

/* --- Stats bar (home page) --- */
.pp-stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 0;
  max-width: 720px;
  margin: 0 auto 48px;
  overflow: hidden;
}
.pp-stat-item {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  border-right: 1px solid var(--border-main);
  transition: background var(--transition-base);
}
.pp-stat-item:last-child { border-right: none; }
.pp-stat-item:hover { background: var(--color-primary-subtle); }
.pp-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.pp-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}
@media (max-width: 600px) {
  .pp-stats-bar { gap: 0; border-radius: 12px; }
  .pp-stat-item { min-width: 90px; padding: 14px 10px; border-right: none; border-bottom: 1px solid var(--border-main); }
  .pp-stat-item:last-child { border-bottom: none; }
}

/* --- Home route cards --- */
.pp-route-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-main);
  border: 1px solid var(--border-main);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-main);
}
.pp-route-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.pp-route-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.pp-route-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.pp-route-card:hover .pp-route-thumb img { transform: scale(1.05); }
.pp-route-body { padding: 16px; flex: 1; }
.pp-route-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0 0 8px;
  line-height: 1.2;
}
.pp-route-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.pp-route-meta span { display: flex; align-items: center; gap: 3px; }

/* --- Home community section --- */
.pp-community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) { .pp-community-grid { grid-template-columns: 1fr; } }

.pp-blog-mini-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-main);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.pp-blog-mini-card:last-child { border-bottom: none; }
.pp-blog-mini-card:hover .pp-blog-mini-title { color: var(--color-primary); }
.pp-blog-mini-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pp-blog-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-blog-mini-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 4px;
  transition: color 0.15s;
}
.pp-blog-mini-date { font-size: 11px; color: var(--text-muted); }

.pp-forum-mini-item {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-main);
  text-decoration: none;
  color: inherit;
}
.pp-forum-mini-item:last-child { border-bottom: none; }
.pp-forum-mini-item:hover .pp-forum-mini-title { color: var(--color-primary); }
.pp-forum-mini-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  transition: color 0.15s;
}
.pp-forum-mini-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* --- Forum pagination --- */
.pp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pp-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border-main);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.15s;
}
.pp-page-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pp-page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.pp-page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }

/* --- Modern Bottom Sheet / Drawer --- */
.pp-bottom-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.pp-bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pp-bottom-sheet-content {
  position: relative;
  background: var(--bg-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 85vh;
  padding: 20px 20px 40px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  z-index: 2;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pp-bottom-sheet.open .pp-bottom-sheet-content {
  transform: translateY(0);
}
.pp-bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-main);
  padding-bottom: 12px;
}
.pp-bottom-sheet-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.pp-bottom-sheet-close {
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.pp-bottom-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.drawer-action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border-main);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}
[data-theme="dark"] .drawer-action-item {
  background: rgba(255,255,255,0.02);
  border-color: #3d4349;
}
.drawer-action-item:hover, .drawer-action-item:active {
  background: rgba(44, 110, 73, 0.08);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.drawer-action-item .emoji {
  font-size: 24px;
  flex-shrink: 0;
}
.drawer-action-item .text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-action-item .text strong {
  font-size: 15px;
  color: var(--text-main);
}
.drawer-action-item .text span {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Offline Badge --- */
.pp-offline-badge {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-danger);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(192, 75, 58, 0.3);
  z-index: 10005;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ── iPhone safe-area (notch / Dynamic Island / home indicator) ──
   Krytyczne dla trybu standalone PWA: status bar black-translucent
   nakłada się na treść, a dolny pasek wchodzi pod home indicator. */
.pp-navbar {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(72px + env(safe-area-inset-top, 0px));
}

.pp-mobile-nav {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.pp-offline-badge {
  top: calc(84px + env(safe-area-inset-top, 0px));
}
