/* Zoho CRM-inspired admin shell (Figma redesign) */

body.zs-crm {
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font-family: "Segoe UI", Inter, sans-serif !important;
}

body.zs-crm,
body.zs-crm #root {
  min-height: 100vh;
}

body.zs-crm .min-h-screen.bg-gray-950,
body.zs-crm .min-h-screen {
  min-height: 100vh;
  padding: 40px 0 0 79px !important;
  box-sizing: border-box !important;
}

@media (min-width: 1025px) {
  body.zs-crm header,
  body.zs-crm .zs-topbar,
  body.zs-crm footer.bg-gray-900 {
    display: none !important;
  }
}

/* Do not squeeze admin content to the storefront 1180px width */
body.zs-crm .max-w-\[1600px\] {
  max-width: none !important;
}

body.zs-crm-banners,
body.zs-crm-products,
body.zs-crm-collections {
  background: #111318 !important;
  color: #f5f5f7 !important;
}

body.zs-crm-banners .min-h-screen,
body.zs-crm-products .min-h-screen,
body.zs-crm-collections .min-h-screen {
  background: #111318 !important;
  color: #f5f5f7 !important;
  overflow: hidden !important;
}

body.zs-crm-banners .min-h-screen,
body.zs-crm-collections .min-h-screen {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  min-height: 100vh !important;
}

body.zs-crm-banners .flex.flex-1.overflow-hidden,
body.zs-crm-collections .flex.flex-1.overflow-hidden,
body.zs-crm-banners .min-h-screen.flex.flex-col > .flex.flex-1,
body.zs-crm-collections .min-h-screen.flex.flex-col > .flex.flex-1 {
  flex: 1 1 auto !important;
  height: calc(100vh - 40px) !important;
  max-height: calc(100vh - 40px) !important;
  width: 100% !important;
  overflow: hidden !important;
}

body.zs-crm-banners aside.w-72,
body.zs-crm-collections aside {
  height: 100% !important;
  overflow-y: auto !important;
  flex-shrink: 0 !important;
}

body.zs-crm-banners .flex-1.overflow-y-auto,
body.zs-crm-banners main,
body.zs-crm-collections main {
  height: 100% !important;
  overflow-y: auto !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

body.zs-crm-banners .max-w-2xl {
  max-width: 720px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.zs-crm-banners .sticky.top-0 {
  background: #111318 !important;
}

body.zs-crm-banners .zs-crm-foot,
body.zs-crm-products .zs-crm-foot,
body.zs-crm-collections .zs-crm-foot {
  display: none;
}

body.zs-crm-products .min-h-screen {
  overflow: auto !important;
}

body.zs-crm-dash .min-h-screen.bg-gray-950,
body.zs-crm-dash .min-h-screen {
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
}

.zs-crm-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 79px;
  background: #262626;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
}

.zs-crm-rail a,
.zs-crm-rail button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  color: #f5f5f7;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}

.zs-crm-rail a:hover,
.zs-crm-rail button:hover,
.zs-crm-rail a.is-on {
  background: #1a1a1a;
}

.zs-crm-rail img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  filter: brightness(10);
}

.zs-crm-rail-spacer {
  flex: 1;
}

.zs-crm-top {
  position: fixed;
  top: 0;
  left: 79px;
  right: 0;
  height: 40px;
  background: #34495e;
  z-index: 79;
  display: flex;
  align-items: center;
}

.zs-crm-tabs {
  display: flex;
  align-items: stretch;
  height: 40px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.zs-crm-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.zs-crm-tabs a.is-on {
  font-weight: 600;
  border-bottom-color: #fff;
}

.zs-crm-tools {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  height: 40px;
}

.zs-crm-tools img,
.zs-crm-tools button img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  filter: brightness(10);
}

.zs-crm-tools button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.zs-crm-foot {
  position: fixed;
  right: 8px;
  bottom: 0;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 78;
  background: #fff;
  padding: 0 8px 0 12px;
}

.zs-crm-foot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.zs-crm-help {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(113deg, #9f97f7 0%, #fd8ce5 100%);
  text-decoration: none;
}

body.zs-crm-dash .max-w-\[1600px\] {
  max-width: none !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

body.zs-crm-dash .text-white,
body.zs-crm-dash .font-bold.text-white,
body.zs-crm-dash .text-gray-300,
body.zs-crm-dash .text-gray-200 {
  color: #1d1d1f !important;
}

body.zs-crm-dash .text-gray-400,
body.zs-crm-dash .text-gray-500,
body.zs-crm-dash .text-gray-600 {
  color: #6e6e73 !important;
}

body.zs-crm-dash .bg-gray-900,
body.zs-crm-dash .bg-gray-800,
body.zs-crm-dash .bg-gray-800\/50,
body.zs-crm-dash .bg-gray-800\/40 {
  background: #fff !important;
}

body.zs-crm-dash .border-gray-800,
body.zs-crm-dash .border-gray-700,
body.zs-crm-dash .border-gray-800\/50 {
  border-color: #e8e8ed !important;
}

body.zs-crm-dash .rounded-2xl {
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.zs-crm-dash input,
body.zs-crm-dash select,
body.zs-crm-dash textarea {
  background: #fff !important;
  color: #1d1d1f !important;
  border-color: #d2d2d7 !important;
  color-scheme: light !important;
}

body.zs-crm-dash button.bg-gray-800,
body.zs-crm-dash .bg-gray-800.border {
  background: #fff !important;
  color: #1d1d1f !important;
  border-color: #d2d2d7 !important;
}

body.zs-crm-dash button.bg-white.text-gray-900 {
  background: #027ffe !important;
  color: #fff !important;
  border: 0 !important;
}

body.zs-crm-dash table thead th {
  color: #6e6e73 !important;
  background: #fafafa !important;
}

body.zs-crm-dash tbody tr:hover {
  background: #f5f9ff !important;
}

body.zs-crm-dash .bg-amber-500\/15,
body.zs-crm-dash .bg-blue-500\/15,
body.zs-crm-dash .bg-emerald-500\/15,
body.zs-crm-dash .bg-purple-500\/15,
body.zs-crm-dash .bg-red-500\/15,
body.zs-crm-dash .bg-violet-500\/15 {
  background: #eef6ff !important;
  color: #027ffe !important;
}

.zs-crm-charts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 16px 16px 0 16px;
}

.zs-crm-card {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 16px 18px 12px;
  min-height: 280px;
}

.zs-crm-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 12px;
}

.zs-crm-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.zs-crm-filters span {
  border: 1px solid #d2d2d7;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: #6e6e73;
}

.zs-crm-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.zs-crm-donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.zs-crm-donut::after {
  content: "";
  position: absolute;
  inset: 32px;
  background: #fff;
  border-radius: 50%;
}

.zs-crm-donut-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: #1d1d1f;
}

.zs-crm-donut-label small {
  font-size: 11px;
  font-weight: 400;
  color: #6e6e73;
}

.zs-crm-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #1d1d1f;
}

.zs-crm-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.zs-crm-bars {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 160px;
  padding: 8px 12px 0;
  border-bottom: 1px solid #eee;
}

.zs-crm-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.zs-crm-bar span {
  display: block;
  width: 100%;
}

@media (max-width: 1024px) {
  .zs-crm-charts {
    grid-template-columns: 1fr;
  }
  .zs-crm-rail,
  .zs-crm-top,
  .zs-crm-foot {
    display: none;
  }
  body.zs-crm .min-h-screen {
    padding: 0 !important;
  }
}
