/* ===== SAFAREJA — DESKTOP LAYOUT ===== */

/* Mobile: full screen */
.desktop-shell {
  display: contents;
}
.desktop-sidebar { display: none; }
.app-frame { display: contents; }
.app-inner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100%;
}

/* Desktop: floating phone shell */
@media (min-width: 900px) {
  body {
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
  }

  /* Full-page background texture */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse at 20% 50%, rgba(61,107,79,0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 20%, rgba(192,127,58,0.06) 0%, transparent 50%),
      radial-gradient(ellipse at 60% 80%, rgba(61,107,79,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .desktop-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    gap: 0;
    position: fixed;
    inset: 0;
    z-index: 1;
  }

  /* FLOATING APP FRAME */
  .app-frame {
    display: block;
    width: 390px;
    height: 844px;
    max-height: 92vh;
    border-radius: 44px;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.12),
      0 40px 80px rgba(0,0,0,0.25),
      0 0 120px rgba(61,107,79,0.15);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    animation: frameFloat 6s ease-in-out infinite;
    background: var(--bg-card);
  }

  /* Phone notch */
  .app-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 26px;
    background: var(--bg-card);
    border-radius: 0 0 18px 18px;
    z-index: 100;
  }

  /* Frame border ring */
  .app-frame::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 46px;
    background: linear-gradient(
      135deg,
      rgba(255,255,255,0.2) 0%,
      rgba(255,255,255,0.05) 40%,
      rgba(255,255,255,0.15) 100%
    );
    pointer-events: none;
    z-index: 10;
  }

  .app-inner {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 44px;
  }

  .main-scroll {
    flex: 1;
    overflow-y: auto;
  }

  /* SIDEBAR RIGHT (navigation) */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    flex-shrink: 0;
  }

  .desktop-sidebar--right {
    align-items: flex-end;
    padding-right: 32px;
  }

  .desktop-sidebar--left {
    align-items: flex-start;
    padding-left: 32px;
  }

  /* Sidebar Nav */
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 16px 12px;
    box-shadow: var(--shadow-md);
  }

  .sidebar-link {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: var(--ease);
    position: relative;
  }

  .sidebar-link:hover,
  .sidebar-link.active {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
  }

  /* Tooltip */
  .sidebar-link::after {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 10px);
    background: var(--text);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
    transition: 0.2s ease;
    font-family: var(--font);
  }
  .sidebar-link:hover::after {
    opacity: 1;
    transform: translateX(0);
  }

  /* LEFT SIDEBAR — Info & Promo */
  .sidebar-info {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    width: 100%;
  }

  .sidebar-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-stat:last-child { border-bottom: none; }

  .stat-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent);
  }
  .stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .sidebar-promo {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    width: 100%;
    text-align: center;
  }

  .promo-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .promo-btn {
    background: white;
    color: var(--accent);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    width: 100%;
    transition: var(--ease);
    font-family: var(--font);
  }
  .promo-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
  }
}

/* Floating animation */
@keyframes frameFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Extra wide: larger sidebars */
@media (min-width: 1200px) {
  .desktop-sidebar { width: 280px; }
  .desktop-sidebar--right { padding-right: 48px; }
  .desktop-sidebar--left { padding-left: 48px; }
}
