/* Core Lexes — modern chrome (sidebar + header).
   Explicit Workspace redesign authority: sans-serif SaaS chrome.
   Destinations/permissions unchanged. */

:root {
  --clx-chrome-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --clx-chrome-navy: #0f172a;
  --clx-chrome-navy-2: #1e293b;
  --clx-chrome-gold: #c9a227;
  --clx-chrome-gold-soft: #f5e7b0;
  /* Content-fit sidebar: driven by --clx-sidebar-width (app.css + fitSidebarWidth). */
  --clx-chrome-sidebar-w: var(--clx-sidebar-width, 158px);
  /* Authoritative left-nav menu-item label size (~1px above prior 13.5px). */
  --clx-sidebar-nav-label-size: 14.5px;
  /* Section headings stay subordinate to menu labels. */
  --clx-sidebar-section-title-size: 10px;
}

.app-sidebar,
.app-sidebar *,
.app-header,
.app-header * {
  font-family: var(--clx-chrome-font) !important;
}

.app-sidebar {
  width: var(--clx-sidebar-width, 158px) !important;
  background: var(--clx-chrome-navy) !important;
  padding: 6px 4px 10px !important;
  gap: 6px !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.35);
}

.app-sidebar .sidebar-brand {
  padding: 2px 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2px;
}

.app-sidebar .brand-logo {
  max-width: 88px !important;
  width: auto;
  height: auto;
  margin: 0 auto;
  filter: brightness(0.94) saturate(0.9) contrast(1.05);
}

.sidebar-nav-flat {
  gap: 2px !important;
}

.sidebar-section-title-office,
.sidebar-section-title-user,
.sidebar-section-title-draft,
.sidebar-section-title-email {
  font-family: var(--clx-chrome-font) !important;
  font-size: var(--clx-sidebar-section-title-size, 10px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  color: rgba(255, 255, 255, 0.45) !important;
  padding: 14px 10px 6px !important;
  margin: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
  cursor: default !important;
}

.app-sidebar .sidebar-nav-flat > .sidebar-section-title-office {
  padding-top: 4px !important;
}

.app-sidebar .sidebar-nav-flat .nav-link,
.app-sidebar .nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: var(--clx-sidebar-nav-label-size, 14.5px) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-sidebar .sidebar-nav-flat .sidebar-doc-drafting-block__links .nav-link {
  padding-left: 6px !important;
}

.app-sidebar .nav-ico {
  flex: 0 0 14px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.app-sidebar .nav-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-sidebar .sidebar-nav-flat .nav-link:hover,
.app-sidebar .sidebar-nav-flat .nav-link:focus,
.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.app-sidebar .sidebar-nav-flat .nav-link:hover .nav-ico,
.app-sidebar .nav-link:hover .nav-ico {
  color: var(--clx-chrome-gold);
}

.app-sidebar .sidebar-nav-flat .nav-link.active,
.app-sidebar .nav-link.active {
  background: var(--clx-chrome-gold) !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.app-sidebar .sidebar-nav-flat .nav-link.active .nav-ico,
.app-sidebar .nav-link.active .nav-ico {
  color: #0f172a !important;
}

.app-sidebar .sidebar-nav-flat .nav-link.active::before,
.app-sidebar .nav-link.active::before {
  display: none !important;
}

/* Header */
.app-header {
  background: var(--clx-chrome-navy) !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28) !important;
  padding: 10px 18px !important;
  gap: 16px !important;
  min-height: 56px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.22) !important;
}

.app-header .header-label {
  font-family: "Times New Roman", Times, serif !important;
  font-size: 12pt !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: #fff !important;
  line-height: 1.2 !important;
  max-width: min(42vw, 34rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header .header-app-kicker {
  font-family: var(--clx-chrome-font) !important;
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-weight: 400 !important;
}

.app-header .header-actions {
  gap: 14px !important;
}

.app-search {
  width: min(340px, 36vw) !important;
  position: relative;
}

.app-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.app-search-ico {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 1;
}

.app-search-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-search .form-control {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  padding: 8px 14px 8px 36px !important;
  min-height: 36px !important;
  font-size: 13px !important;
  font-family: var(--clx-chrome-font) !important;
  box-shadow: none !important;
}

.app-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.48) !important;
}

.app-search .form-control:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--clx-chrome-gold) !important;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25) !important;
  color: #fff !important;
}

.app-header .header-actions .user-avatar {
  width: 32px !important;
  height: 32px !important;
  background: var(--clx-chrome-gold) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}

.app-header .header-actions .user-name {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: var(--clx-chrome-font) !important;
}

@media (max-width: 991px) {
  .app-sidebar {
    width: var(--clx-sidebar-width, 158px) !important;
  }
  .app-search {
    width: min(220px, 40vw) !important;
  }
}
