:root {
  --sidebar-width: 72px;          /* narrow vertical rail */
  --bg-body: #fcfcf9;
  --bg-sidebar: #f3f5f2;
  --bg-canvas: #ffffff;
  --accent: #0f766e;              /* teal */
  --accent-soft: rgba(15, 118, 110, 0.08);
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --border-subtle: #e2e8f0;
  --radius-pill: 999px;
  --radius-lg: 18px;
  --transition-fast: 150ms ease-out;
  --sidebar-header-right-pad: 4px;
  --sidebar-anim-color: rgba(15, 118, 110, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; }
body {
  min-height:100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.1;
  background-color: var(--bg-body);
  color: var(--text-main);
  display:flex;
}

.layout { display:flex; width:100%; }

/* Hamburger button – hidden by default (desktop) */
.mobile-menu-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  width: 32px;
  height: 32px;
  display: none;           /* still hidden on desktop; shown in @media */
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #335b60;
  cursor: pointer;
}

/* Optional subtle hover background */
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
  background: rgba(15, 118, 110, 0.08);
  border-radius: 999px;
}

/* Simple hamburger lines */
.mobile-menu-lines {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.mobile-menu-lines::before,
.mobile-menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.mobile-menu-lines::before { top: -5px; }
.mobile-menu-lines::after  { top: 5px; }

/* Collapse button in sidebar – hidden on desktop */
.sidebar-close {
  display: none;
  border: none;
  background: transparent;
  color: #335b60;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Sidebar: icon above label, narrow column */
.sidebar {
  position:fixed;
  inset-block:0;
  inset-inline-start:0;
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-inline-end: 1px solid var(--border-subtle);
  padding: 20px 0 16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
  z-index:20;
}

/* Logo at top */
.sidebar-logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Menu group */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;/* vertical spacing between items */
  width: 100%;
}

.logo-mark {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.4);
  display:flex; align-items:center; justify-content:center;
  font-weight: 600; font-size: 20px;
  background-color: #0f766e;
  color: #f9fafb;
  text-decoration:none;
  margin-bottom: 16px;
}

/* Header row inside the slide-out sidebar (logo + collapse arrow) */
.sidebar-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;  /* logo left, arrow right */
}

/* Generic nav item: icon stacked above label */
.nav-icon-button {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 0px;
  padding: 6px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  color: #335b60; /* grey-teal icons */
  font-size: 0.8rem;
  font-weight: 400;
  background: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-icon-button:hover,
.nav-icon-button:focus-visible {
  outline: none;
  color: var(--accent);
}

.nav-icon-button.is-active {
  color: var(--accent);
  border-color: transparent;
}

.nav-icon {
  width: 36px;           /* original icon size */
  height: 36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;    /* less rounded for a more square feel */
  background-color: transparent;
  transition: background var(--transition-fast);
}

/* Hover target only affects icon tile */
.nav-icon-button:hover .nav-icon,
.nav-icon-button:focus-visible .nav-icon {
  background-color: var(--sidebar-anim-color); /* hover square */
}

/* Active icon tile */
.nav-icon-button.is-active .nav-icon {
  background-color: rgba(15, 118, 110, 0.16);
}

/* Hover target only affects icon tile */
.nav-icon-button:hover .nav-icon,
.nav-icon-button:focus-visible .nav-icon {
  background-color: var(--sidebar-anim-color); /* slightly stronger */
}

/* Active icon tile */
.nav-icon-button.is-active .nav-icon {
  background-color: rgba(15, 118, 110, 0.16);
}

.nav-icon-button:hover .nav-icon,
.nav-icon-button:focus-visible .nav-icon {
  background-color: rgba(15, 118, 110, 0.08);
}

.nav-icon-button.is-active .nav-icon {
  background-color: rgba(15, 118, 110, 0.14);
}

.nav-icon svg {
  width: 22px;          
  height: 22px;
  display:block;
  color: inherit; /* mono-color SVG using currentColor */
}

.nav-label {
  font-size: 11px;
}

.sidebar-divider {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, #d1d5db, transparent);
  margin-top: 8px;
}

/* Main region */
.main {
  margin-inline-start: var(--sidebar-width);
  flex:1; min-height:100vh;
  display:flex; flex-direction:column;
}

.main-inner {
  /* Always leave 32px of space on each side: 2 × 25px = 50px */
  max-width: min(960px, 100% - 50px);
  width: 100%;
  margin: 0 auto;
  padding: 10px 0px 10px;
  display:flex; flex-direction:column; gap:24px;
}

/* Top banner pill inside main content */
.top-banner {
  display:flex; align-items:center; justify-content:space-between;
  gap: 16px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background-color: #ffffff;
  margin-right: 5px;
  margin-left: 5px;
}

.banner-text-group {
  display:flex; flex-wrap:wrap; align-items:center;
  gap: 8px;
  font-size: 0.875rem;
}

.banner-title {
  font-weight: 500;
  color: var(--text-main);
}

.banner-dot {
  width: 4px; height: 4px; border-radius: 999px;
  background-color: #d1d5db;
}

.banner-vendor-row {
  display:flex; align-items:center; flex-wrap:wrap;
  gap: 6px;
  color: var(--text-muted);
}

.banner-free {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

.vendor-badge {
  width: 22px; height: 22px; border-radius: 999px;
  border: 1px solid #d1d5db;
  display:grid; place-items:center;
  font-size: 11px;
  color: var(--text-muted);
  background-color: #f9fafb;
}

/* Central blank area card */
.page-canvas {
  flex:1;  
  display:flex;
  align-items:center;
  justify-content:center;
}

.page-canvas-inner {
  width: 80%;
  text-align:center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.bottom-hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align:center;
}

/* Desktop-only vertical centering of the menu group */
@media (min-width: 769px) {
  .sidebar-menu {
    margin-top: auto;
    margin-bottom: auto;
  }
}

@media (max-width: 1024px) {
  .page-canvas-inner {
    width: 90%;
  }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 80px; }

  .page-canvas-inner {
    width: 100%;
  }
  
  /* Show hamburger */
  .mobile-menu-toggle {
    display: inline-flex;
  }

  /* Main content should no longer be shifted right */
  .main {
    margin-inline-start: 0;
  }

  /* Sidebar becomes off-canvas and wider */
  .sidebar {
    width: 220px;
    align-items: stretch;
    padding-inline: 5px;
    transform: translateX(-100%);
    transition: transform 180ms ease-out;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  }
  
  .sidebar {
    justify-content: flex-start;   /* stop centering — stack at top */
  }
  .sidebar-bottom {
    margin-top: auto;              /* push "Get help" to bottom */
  }

  .sidebar-header {
    padding-right: var(--sidebar-header-right-pad);
    padding-left: 0;
  }

  .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  /* When body has .sidebar-open, slide it in */
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    margin-bottom: 16px;
  }

  /* When sidebar is open: hide hamburger, show arrow */
  body.sidebar-open .mobile-menu-toggle {
    display: none;
  }

  body.sidebar-open .sidebar-close {
    display: inline-flex;
  }

  /* When sidebar is closed: hide arrow (safety) */
  body:not(.sidebar-open) .sidebar-close {
    display: none;
  }

  /* Menu items become horizontal (icon + text) */
  .nav-icon-button {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0px;  
    border-radius: 8px;
    padding: 3px 0px;
  }

  /* FULL-ROW hover: background on the whole set {icon + text} */
  .nav-icon-button:hover,
  .nav-icon-button:focus-visible {
    background-color: var(--sidebar-anim-color);  
    color: var(--accent);
  }
  /* FULL-ROW active (selected item) */
  .nav-icon-button.is-active {
    background-color: rgba(15, 118, 110, 0.14);  /* same as desktop active */
    color: var(--accent);
  }
   /* Disable tile hover on mobile (remove inner square) */
  .nav-icon-button:hover .nav-icon,
  .nav-icon-button:focus-visible .nav-icon,
  .nav-icon-button.is-active .nav-icon {
    background-color: transparent !important;
  }

  .nav-label {
    font-size: 0.9rem;
  }

  @media (max-width: 480px) {
    .main-inner {
      max-width: min(960px, 100% - 5px);    
    }    
  }
  
}

