/* ============================================================
   SDS Solutions IT Onboarding Portal
   layout.css — App shell, sidebar, main content area
   ============================================================ */

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--t-slow);
  box-shadow: var(--shadow-sm);
}

/* Logo / Brand */
.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26,86,232,0.35);
}

.logo-mark svg { width: 20px; height: 20px; }

.logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.logo-tagline {
  font-size: var(--font-xs);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Navigation */
.sidebar-nav {
  padding: 10px 12px;
  flex: 1;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-light);
  padding: 14px 8px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  font-size: 13.5px;
  color: var(--text-muted);
  user-select: none;
}

.nav-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.nav-item.done {
  color: var(--success);
}

.nav-item.done:hover {
  background: var(--success-soft);
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  transition: background var(--t-base), color var(--t-base);
}

.nav-item.active .step-badge { background: var(--brand); color: #fff; }
.nav-item.done .step-badge   { background: var(--success); color: #fff; }

.nav-item-home .step-badge {
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.nav-connector {
  width: 1px;
  height: 8px;
  background: var(--border);
  margin: 1px 0 1px 19px;
}

/* Sidebar Footer / Progress */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label-text {
  font-size: var(--font-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.progress-pct {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--brand);
}

.progress-track {
  height: 5px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: var(--r-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════
   MOBILE HEADER
══════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-logo-mark svg { width: 16px; height: 16px; }

.mobile-logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.mobile-prog {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--brand);
}

/* Hamburger */
.hamburger {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  width: 100%;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.show { display: block; }

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 44px 48px;
}

.page-container {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .mobile-header {
    display: flex;
  }

  .main-wrap {
    margin-left: 0;
    padding: calc(var(--header-h) + 28px) 24px 40px;
  }
}

@media (max-width: 560px) {
  .main-wrap {
    padding: calc(var(--header-h) + 20px) 16px 32px;
  }
}
