/* ═══════════════════════════════════════════════════════════════════
   SHARED STYLESHEET — Success Software Services Process Asset Library
   Used by: index.html, dx.html (and future pages)
═══════════════════════════════════════════════════════════════════ */

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  --green:        #2E7D32;
  --green-lt:     #E8F5E9;
  --green-light:  #4CAF50;
  --green-dark:   #1B5E20;
  --red:          #E64A19;
  --blue:         #1565C0;
  --blue-lt:      #E3F2FD;
  --sidebar-bg:   #161C24;
  --sidebar-txt:  #919EAB;
  --bg:           #F4F6F8;
  --card:         #FFFFFF;
  --txt1:         #212B36;
  --txt2:         #637381;
  --border:       #E0E3E7;
  --shadow:       0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
  --r:            12px;
  --rs:           8px;
  --sw:           272px;
}

/* ── BASE ────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
html, body {
  font-family: 'Public Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt1);
}

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sw);
  min-width: var(--sw);
  background: var(--sidebar-bg);
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── SIDEBAR LOGO ───────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sidebar-logo img {
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* ── SIDEBAR NAV SCROLLBAR ──────────────────────────────────────── */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0 24px; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── MAIN CONTENT AREA ──────────────────────────────────────────── */
.main {
  margin-left: var(--sw);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 1280px;
  transition: margin-left 0.28s cubic-bezier(0.4,0,0.2,1);
}
.main.expanded { margin-left: 0; }

/* ── SIDEBAR OVERLAY (mobile) ───────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(22,28,36,0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s;
}
.sidebar-overlay.visible { opacity: 1; }

/* ── HAMBURGER BUTTON ───────────────────────────────────────────── */
.ham-btn {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; border: none; background: transparent;
  padding: 0; transition: background 0.15s;
}
.ham-btn:hover { background: var(--bg); }
.ham-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--txt2); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, width 0.25s;
  transform-origin: center;
}
.ham-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.is-open span:nth-child(2) { opacity: 0; width: 0; }
.ham-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── TOPBAR ─────────────────────────────────────────────────────── */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
  flex-shrink: 0;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt2); }
.bc-root { flex-shrink: 0; }
.bc-sep  { color: var(--border); flex-shrink: 0; font-size: 16px; }
.bc-cur  { color: var(--txt1); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-tag { flex-shrink: 0; }

/* ── CONTENT ────────────────────────────────────────────────────── */
.content { flex: 1; padding: 28px; min-width: 0; width: 100%; }

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.card-lbl {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--txt2); margin-bottom: 16px;
}

/* ── PILLS ──────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  padding: 3px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── SCROLL-TO-TOP BUTTON ───────────────────────────────────────── */
#scrollBtn {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff; border: none; font-size: 18px;
  cursor: pointer; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px); transition: all 0.2s;
  pointer-events: none;
}
#scrollBtn.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ── ANIMATIONS ─────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE (shared mobile rules) ──────────────────────────── */
@media (max-width: 720px) {
  .main { margin-left: 0 !important; min-width: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .sidebar-overlay { display: block; }
}
