/* Mijozlar boshqaruvi uses the same tabs, headings and cards across staff views. */
#appShell .desk-main:has(> #crmAdminView) {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  overflow: clip;
}

#crmAdminView {
  flex: 1;
  min-height: 0;
  padding-bottom: 24px;
  overflow: auto;
  overscroll-behavior: contain;
}

#appShell .crm-admin-nav {
  flex: none;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

#appShell .crm-admin-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

body.catalog-app #appShell .crm-admin-nav a[aria-current="page"] {
  border-color: var(--green);
  background: transparent;
  color: var(--text);
}

#appShell .crm-admin-nav a:hover { color: var(--greenText); }
#appShell .crm-admin-nav a:focus-visible { outline-offset: -3px; }

#appShell .cc-admin {
  --cc-card-shadow: 0 1px 2px rgb(24 44 34 / 10%);
  container-type: inline-size;
  gap: 18px;
}

body[data-theme="dark"] #appShell .cc-admin { --cc-card-shadow: var(--shadow); }

#appShell .cc-hero {
  align-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

#appShell .cc-hero::after { content: none; }

#appShell .cc-hero h1,
#appShell #crmAdminView > .desk-intro h1 {
  margin: 0 0 5px;
  font-size: clamp(23px, 2.15vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
}

#appShell .cc-hero p { color: var(--muted); }
#appShell .cc-hero .primary-button { min-height: 40px; }
#appShell .cc-hero .program-admin-add { border-color: transparent; background: var(--green); color: white; }
body[data-theme="dark"] #appShell .cc-admin .primary-button { color: var(--mintInk); }

#appShell .cc-shortcuts button {
  border-color: var(--border);
  background: var(--panel);
  color: var(--sub);
}

#appShell .cc-shortcuts button:hover {
  border-color: var(--green);
  background: var(--greenWash);
  color: var(--greenText);
}

#appShell .cc-filters,
#appShell .cc-panel,
#appShell .cc-metric {
  border-radius: 13px;
  box-shadow: var(--cc-card-shadow);
}

#appShell .cc-summary h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#appShell .cc-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#appShell .cc-metric {
  min-height: 127px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr;
  align-items: start;
  padding: 16px 17px;
}

#appShell .cc-metric-featured { border-color: var(--border); background: var(--panel); }
#appShell .cc-metric-icon { grid-area: 1 / 2; background: var(--greenWash); }
#appShell .cc-metric-label { grid-area: 1 / 1; align-self: center; color: var(--sub); font-weight: 600; }
#appShell .cc-metric > strong { font-size: clamp(20px, 2.1vw, 26px); letter-spacing: -.025em; }
#appShell .cc-metric-featured > strong { color: var(--greenText); }
#appShell .cc-panel-heading h2 { font-size: 18px; font-weight: 700; }
#appShell .cc-table-scroll { border-radius: 9px; }

#appShell .cc-admin .editor-header h2 {
  font-family: inherit;
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
}

@container (width < 790px) {
  #appShell .cc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appShell .cc-employee-history { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 710px) {
  #appShell .crm-admin-nav { margin-bottom: 14px; }
  #appShell .crm-admin-nav a { padding: 9px 11px; font-size: 13px; }
  #appShell .cc-hero { gap: 12px; }
  #appShell .cc-metrics { gap: 9px; }
  #appShell .cc-metric { min-height: 116px; padding: 11px; }
  #appShell .cc-metric-icon { width: 28px; height: 28px; }
  #appShell .cc-metric-icon svg { width: 16px; height: 16px; }
  #appShell .cc-metric-label { font-size: 12px; }
}

@container (width < 335px) {
  #appShell .cc-metric { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; }
  #appShell .cc-metric-icon { grid-area: 1 / 1; }
  #appShell .cc-metric-label { grid-area: auto; }
}
