/* Zackgo Executive Shell — unified dashboard layout for Pro feature pages */

:root {
  --zg-shell-sidebar: 264px;
  --zg-shell-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

html.zg-exec-shell-page,
html.zg-exec-shell-page body {
  min-height: 100%;
}

body.zg-exec-shell-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

body.zg-exec-shell-body .zg-shell-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 20, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 45;
}

html[data-theme='light'] body.zg-exec-shell-body .zg-shell-overlay {
  background: rgba(15, 23, 42, 0.35);
}

body.zg-exec-shell-body .zg-shell-overlay.open {
  display: block;
}

body.zg-exec-shell-body .sidebar.zg-sidebar-premium {
  width: var(--zg-shell-sidebar);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.32s var(--zg-shell-ease);
}

body.zg-exec-shell-body .sidebar-company {
  margin: 8px 12px 10px;
}

body.zg-exec-shell-body .sidebar-user {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding: 14px 16px 16px;
  margin-top: auto;
}

body.zg-exec-shell-body .zg-shell-main {
  margin-left: var(--zg-shell-sidebar);
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

body.zg-exec-shell-body .rv-toolbar {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  border-left: none;
  border-radius: 0;
}

body.zg-exec-shell-body .rv-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

body.zg-exec-shell-body .rv-toolbar-left > a,
body.zg-exec-shell-body .rv-toolbar-left > .rv-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: var(--text-strong, #fff);
}

body.zg-exec-shell-body .rv-toolbar-left > a > div:last-child,
body.zg-exec-shell-body .rv-toolbar-left > .rv-toolbar-brand > div:last-child {
  min-width: 0;
  flex: 1;
}

body.zg-exec-shell-body .rv-toolbar-left .zg-logo.rv-toolbar-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

body.zg-exec-shell-body .rv-toolbar-left .zg-logo.rv-toolbar-mark .zg-logo__text {
  display: none;
}

body.zg-exec-shell-body .rv-toolbar::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 181, 68, 0.22) 20%,
    rgba(245, 181, 68, 0.22) 80%,
    transparent
  );
  pointer-events: none;
}

body.zg-exec-shell-body .zg-shell-content {
  flex: 1;
  min-height: 0;
}

body.zg-exec-shell-body .zg-shell-content > [id$='-root'],
body.zg-exec-shell-body .zg-shell-content > .rv-loading {
  min-height: calc(100vh - 64px);
}

body.zg-exec-shell-body .nav-item.zg-shell-active {
  color: var(--text-strong, #fff);
  background: var(--surface-2, rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px var(--border-strong, rgba(255, 255, 255, 0.14));
}

body.zg-exec-shell-body .nav-item.zg-shell-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 100px;
  background: linear-gradient(180deg, var(--accent, #F97316), var(--accent-2, #EA580C));
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

body.zg-exec-shell-body .nav-item.zg-shell-active .nav-item-icon {
  color: var(--accent, #F97316);
}

body.zg-exec-shell-body .zg-shell-back-dashboard {
  margin: 4px 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--surface-2, rgba(255, 255, 255, 0.05));
  color: var(--text-dim, rgba(230, 236, 247, 0.68));
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.zg-exec-shell-body .zg-shell-back-dashboard:hover {
  color: var(--text-strong, #fff);
  background: var(--surface-3, rgba(255, 255, 255, 0.1));
  transform: translateX(2px);
}

body.zg-exec-shell-body .zg-shell-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--surface, rgba(255, 255, 255, 0.04));
  color: var(--text, #e6ecf7);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

@media (max-width: 900px) {
  body.zg-exec-shell-body .sidebar.zg-sidebar-premium {
    transform: translateX(-100%);
  }

  body.zg-exec-shell-body .sidebar.zg-sidebar-premium.zg-shell-open {
    transform: translateX(0);
    box-shadow: 12px 0 48px rgba(0, 0, 0, 0.35);
  }

  body.zg-exec-shell-body .zg-shell-main {
    margin-left: 0;
  }

  body.zg-exec-shell-body .zg-shell-hamburger {
    display: inline-flex;
    flex-shrink: 0;
  }

  body.zg-exec-shell-body .rv-toolbar-left > a,
  body.zg-exec-shell-body .rv-toolbar-left > .rv-toolbar-brand {
    flex: 1;
    min-width: 0;
  }

  body.zg-exec-shell-body .rv-toolbar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.zg-exec-shell-body .rv-toolbar-sub {
    display: block !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(280px, 48vw);
    font-size: 11px;
  }

  body.zg-exec-shell-body .zg-shell-back-dashboard {
    padding: 12px;
    min-height: 44px;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.zg-exec-shell-body .sidebar.zg-sidebar-premium,
  body.zg-exec-shell-body .zg-shell-back-dashboard {
    transition: none;
  }
}

/* ── Sidebar base (shared with executive dashboard) ── */
body.zg-exec-shell-body .sidebar-logo {
  padding: 22px 20px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

body.zg-exec-shell-body .sidebar-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  box-shadow: 0 8px 20px -6px rgba(245, 181, 68, 0.35);
  font-size: 13px;
  font-weight: 800;
}

body.zg-exec-shell-body .sidebar-logo-mark .zg-mark-wrap {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.zg-exec-shell-body .sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong, #fff);
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

body.zg-exec-shell-body .sidebar-logo-text em {
  font-style: normal;
}

body.zg-exec-shell-body .sidebar-logo-text::before {
  content: 'Zackgo ';
}

body.zg-exec-shell-body .sidebar-company-label,
body.zg-exec-shell-body .sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-mute, rgba(230, 236, 247, 0.42));
  font-weight: 700;
  padding: 14px 10px 8px;
}

body.zg-exec-shell-body .sidebar-company-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.zg-exec-shell-body .sidebar-company-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft, rgba(245, 181, 68, 0.12));
  border: 1px solid rgba(245, 181, 68, 0.28);
  border-radius: 100px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-2, #e89a1c);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.zg-exec-shell-body .sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

body.zg-exec-shell-body .nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim, rgba(230, 236, 247, 0.68));
  margin-bottom: 2px;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body.zg-exec-shell-body .nav-item:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  color: var(--text-strong, #fff);
}

body.zg-exec-shell-body .nav-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-mute, rgba(230, 236, 247, 0.42));
}

body.zg-exec-shell-body .nav-item-icon svg {
  width: 18px;
  height: 18px;
}

body.zg-exec-shell-body .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #071A14;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent, #f5b544), var(--accent-2, #e89a1c));
}

body.zg-exec-shell-body .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong, #fff);
  line-height: 1.2;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.zg-exec-shell-body .user-role {
  font-size: 10px;
  color: var(--text-mute, rgba(230, 236, 247, 0.42));
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  font-weight: 600;
}

