:root {
  --wf-blue: #2f66e8;
  --wf-blue-dark: #2454c8;
  --wf-navy: #111827;
  --wf-muted: #667085;
  --wf-line: #e5eaf3;
  --wf-panel: #ffffff;
  --wf-bg: #f5f8fc;
  --wf-soft-blue: #eef5ff;
  --wf-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body {
  background: #f5f7fb;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--wf-line);
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.035);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid #eef2f7;
}

.nav-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  padding-bottom: 24px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #c7d2e4 transparent;
}

.nav-section::-webkit-scrollbar {
  width: 8px;
}

.nav-section::-webkit-scrollbar-thumb {
  background: #c7d2e4;
  border-radius: 999px;
}

.nav-section::-webkit-scrollbar-track {
  background: transparent;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--wf-blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(47, 102, 232, 0.24);
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--wf-navy);
}

.brand-subtitle {
  margin: 2px 0 0;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}

.nav-section-title {
  margin: 0 10px 8px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-list,
.subnav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link,
.subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: #475467;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover,
.subnav-link:hover {
  background: #f4f7fb;
  color: var(--wf-blue-dark);
}

.nav-link.active {
  background: var(--wf-blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 102, 232, 0.22);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
}

.subnav-list {
  margin: 8px 0 0 18px;
  padding-left: 12px;
  border-left: 1px solid #dbe4f0;
}

.subnav-link {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
  color: #667085;
}

.subnav-link.active {
  background: #edf4ff;
  color: var(--wf-blue-dark);
}

.subnav-divider {
  height: 1px;
  margin: 6px 8px;
  background: #eef2f7;
}

.subnav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subnav-group-label {
  display: block;
  padding: 8px 10px 2px;
  color: #344054;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.agent-subnav-list,
.doc-subnav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 0 10px;
  padding: 0 0 0 10px;
  border-left: 1px solid #e6edf6;
  list-style: none;
}

.agent-subnav-list .subnav-link,
.doc-subnav-list .subnav-link {
  min-height: 32px;
  font-size: 12px;
}

.content-shell {
  min-width: 0;
  padding: 24px 32px 44px;
}

.topbar {
  width: min(1480px, 100%);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 850;
}

.breadcrumb-current {
  color: var(--wf-blue-dark);
}

.breadcrumb-separator {
  color: #c0c9d8;
}

.page {
  width: min(1480px, 100%);
  padding-top: 0 !important;
}

.page-hero {
  overflow: hidden;
  position: relative;
  border: 1px solid #e1e8f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--wf-shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.page-hero::after {
  content: none;
}

.page-hero .header {
  position: relative;
  z-index: 1;
  margin-bottom: 0 !important;
}

.card,
.metric-card {
  border-color: #e6edf6 !important;
  box-shadow: var(--wf-shadow) !important;
}

button {
  background: var(--wf-blue) !important;
  box-shadow: 0 10px 20px rgba(47, 102, 232, 0.18);
}

button:hover { background: var(--wf-blue-dark) !important; }

.button-secondary {
  background: #fff !important;
  color: #344054 !important;
  box-shadow: none !important;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: #475467;
  background: #f8fafc;
  font-weight: 900;
}

.data-table td {
  color: #344054;
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--wf-line);
  }
  .nav-section {
    overflow: visible;
    padding-right: 0;
  }
  .content-shell { padding: 18px 16px 32px; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
