/* ============================================================
   JOSAY — HARMONIVITA  ·  Design System v2
   layout.css — App Shell, Sidebar, Topbar, Mobile Layout
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   APP LAYOUT (Desktop — sidebar + content)
════════════════════════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; background: var(--bg); }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 220px; min-height: 100vh;
  background: var(--brand-dark);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: var(--z-stick);
  overflow: hidden;
}
.sidebar::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(34,197,94,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.sidebar-brand {
  padding: 22px 18px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06); position: relative;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 3px 10px rgba(34,197,94,0.3);
  letter-spacing: -0.5px;
}
.brand-name { font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1; }
.brand-sub  { font-size: 9.5px; color: rgba(255,255,255,0.3); letter-spacing: 0.3px; margin-top: 2px; }

.nav-section { padding: 8px 10px; flex: 1; overflow-y: auto; }
.nav-label {
  font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.22);
  letter-spacing: 1.3px; text-transform: uppercase;
  padding: 12px 8px 5px; margin-bottom: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  color: rgba(255,255,255,0.48); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all 0.15s; margin-bottom: 1px; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.82); }
.nav-item.active { background: rgba(34,197,94,0.12); color: #4ade80; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 2.5px; background: #4ade80; border-radius: 0 2px 2px 0;
}
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.sidebar-footer {
  padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.06);
}
.user-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
}
.user-card:hover { background: rgba(255,255,255,0.06); }
.user-av {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.82); }
.user-role { font-size: 10.5px; color: rgba(255,255,255,0.3); margin-top: 1px; }
.user-online {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-left: auto; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(74,222,128,0.2);
}

/* ── Main content area ────────────────────────────────────── */
.main-content { margin-left: 220px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: 56px; background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 14px;
  position: sticky; top: 0; z-index: var(--z-stick);
}
.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: var(--sz-sm); }
.topbar-brand { font-weight: 700; color: var(--text); }
.topbar-sep   { color: var(--n300); }
.topbar-page  { color: var(--text-muted); font-weight: 400; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.datetime-pill {
  background: var(--n100); border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 4px 11px; font-size: 12px; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.live-dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; animation: blink 1.8s ease infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--border);
  background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--t); position: relative; color: var(--text-muted);
}
.icon-btn:hover { background: var(--n100); color: var(--text); }
.notif-count {
  position: absolute; top: -4px; right: -4px;
  width: 15px; height: 15px; background: var(--danger); color: white;
  font-size: 9px; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid white;
}

/* ── Page content ─────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }
.page-title { font-size: var(--sz-2xl); font-weight: 800; color: var(--text); letter-spacing: -0.04em; margin-bottom: 2px; }
.page-sub   { font-size: var(--sz-sm); color: var(--text-muted); margin-bottom: var(--s6); }

/* ════════════════════════════════════════════════════════════
   AUTH LAYOUT (centered card)
════════════════════════════════════════════════════════════ */
.auth-layout {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: var(--s4);
  background-image: radial-gradient(ellipse at 30% 40%, rgba(34,197,94,0.06) 0%, transparent 55%),
                    radial-gradient(ellipse at 70% 70%, rgba(13,148,136,0.05) 0%, transparent 55%);
}
.auth-card {
  background: var(--white); border-radius: var(--r-2xl); border: 1px solid var(--border);
  box-shadow: var(--sh-xl); width: 100%; max-width: 420px; padding: var(--s8);
}
.auth-card-wide { max-width: 500px; }
.auth-logo { text-align: center; margin-bottom: var(--s8); }
.auth-logo .logo-mark {
  width: 44px; height: 44px; background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 13px; margin: 0 auto var(--s3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: white; letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(34,197,94,0.3);
}
.auth-logo h1 { font-size: var(--sz-2xl); letter-spacing: -0.04em; }
.auth-logo p  { font-size: var(--sz-sm); color: var(--text-muted); margin-top: var(--s1); }

/* ════════════════════════════════════════════════════════════
   MOBILE LAYOUT (Customer / Therapist app feel)
════════════════════════════════════════════════════════════ */
.mobile-wrap { max-width: 430px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.mobile-header {
  background: var(--white); padding: var(--s4) var(--s5);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: var(--z-stick);
}
.mobile-header-title { font-size: var(--sz-base); font-weight: 700; letter-spacing: -0.02em; }
.mobile-back-btn {
  width: 30px; height: 30px; border-radius: var(--r); border: none;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 1.1rem;
}
.mobile-content { flex: 1; padding: var(--s4) var(--s5); padding-bottom: 5.5rem; }

.mobile-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; background: var(--white); border-top: 1px solid var(--border);
  display: flex; z-index: var(--z-stick);
}
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: var(--s2) 0; cursor: pointer; color: var(--text-muted);
  font-size: 11px; font-weight: 500; text-decoration: none;
  transition: color var(--t); border: none; background: transparent;
}
.mobile-nav-item:hover, .mobile-nav-item.active { color: var(--brand-green); }
.mobile-nav-icon { width: 22px; height: 22px; }

/* ════════════════════════════════════════════════════════════
   LANDING PAGE SECTIONS
════════════════════════════════════════════════════════════ */
.landing-nav {
  position: sticky; top: 0; z-index: var(--z-stick);
  background: rgba(255,255,255,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--s8); height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.landing-logo { display: flex; align-items: center; gap: 10px; }
.landing-logo-mark {
  width: 30px; height: 30px; background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: white;
}
.landing-logo-name { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.landing-nav-links { display: flex; align-items: center; gap: var(--s6); }
.landing-nav-links a { font-size: var(--sz-sm); color: var(--text-muted); font-weight: 500; }
.landing-nav-links a:hover { color: var(--text); }

.hero-section {
  background: linear-gradient(165deg, var(--brand-dark) 0%, #0d2f1c 50%, #0a2a20 100%);
  padding: 100px var(--s8) 80px;
  text-align: center; position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--r-full); padding: 4px 12px;
  font-size: 12px; font-weight: 600; color: #4ade80;
  margin-bottom: var(--s5); letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; color: white;
  letter-spacing: -0.04em; line-height: 1.1; margin-bottom: var(--s5);
}
.hero-title span { color: #4ade80; }
.hero-desc { font-size: var(--sz-lg); color: rgba(255,255,255,0.6); max-width: 520px; margin: 0 auto var(--s8); line-height: 1.6; }
.hero-cta { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }

.section { padding: 80px var(--s8); }
.section-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--brand-green); margin-bottom: var(--s3);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800;
  letter-spacing: -0.04em; margin-bottom: var(--s4); color: var(--text);
}
.section-desc { font-size: var(--sz-lg); color: var(--text-muted); max-width: 560px; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--ts); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .page-content { padding: var(--s4); }
  .landing-nav-links { display: none; }
  .hero-section { padding: 60px var(--s5) 50px; }
  .section { padding: 50px var(--s5); }
}
