/* 商户后台侧栏 — 靛紫主题 */
:root {
  --mch-sidebar-w: 260px;
  --mch-sidebar-bg: #4f46e5;
  --mch-sidebar-active: #ffffff;
  --mch-sidebar-text: rgba(255, 255, 255, 0.88);
  --mch-sidebar-icon: rgba(255, 255, 255, 0.72);
}

.mch-layout {
  display: flex;
  min-height: 100vh;
  background: #eef1f5;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.mch-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--mch-sidebar-w);
  background: var(--mch-sidebar-bg);
  border-right: 1px solid #4338ca;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

.mch-sidebar__brand {
  flex-shrink: 0;
  padding: 20px 16px 12px;
  text-align: center;
}

.mch-sidebar__logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.mch-sidebar__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mch-sidebar__logo-ph {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.mch-sidebar__logo-ph.is-hidden,
.mch-sidebar__logo.is-hidden {
  display: none;
}

.mch-sidebar__shop-name {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mch-sidebar-active);
  line-height: 1.3;
}

.mch-sidebar__stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  font-size: 0.875rem;
  line-height: 1;
  color: #f59e0b;
  letter-spacing: 1px;
}

.mch-sidebar__stars .is-empty {
  color: rgba(255, 255, 255, 0.35);
}

.mch-sidebar__search {
  flex-shrink: 0;
  padding: 0 14px 12px;
}

.mch-sidebar__search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.8125rem;
  color: #334155;
  box-sizing: border-box;
}

.mch-sidebar__search input::placeholder {
  color: #94a3b8;
}

.mch-sidebar__search input:focus {
  outline: none;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.mch-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 20px;
}

.mch-sidebar__nav::-webkit-scrollbar {
  width: 6px;
}

.mch-sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 3px;
}

.mch-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--mch-sidebar-text);
  font-size: 0.875rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  transition: color 0.12s, background 0.12s;
}

.mch-nav-item:hover {
  color: var(--mch-sidebar-active);
  background: rgba(255, 255, 255, 0.12);
}

.mch-nav-item.is-active {
  color: var(--mch-sidebar-active);
  font-weight: 600;
}

.mch-nav-item.is-active .mch-nav-item__icon {
  color: var(--mch-sidebar-active);
}

.mch-nav-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--mch-sidebar-icon);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mch-nav-item__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.mch-nav-item__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mch-nav-item__arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s;
}

.mch-nav-group.is-open > .mch-nav-item .mch-nav-item__arrow {
  transform: rotate(90deg);
}

.mch-nav-sub {
  display: none;
  padding: 2px 0 6px 0;
}

.mch-nav-group.is-open .mch-nav-sub {
  display: block;
}

.mch-nav-sub__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 40px;
  color: var(--mch-sidebar-text);
  font-size: 0.8125rem;
  text-decoration: none;
  border-radius: 4px;
  margin: 1px 0;
}

.mch-nav-sub__link::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.55;
}

.mch-nav-sub__link:hover {
  color: var(--mch-sidebar-active);
  background: rgba(255, 255, 255, 0.08);
}

.mch-nav-sub__link.is-active {
  color: var(--mch-sidebar-active);
  font-weight: 600;
}

.mch-nav-sub__link.is-active::before {
  border-color: #fff;
  background: #fff;
  opacity: 1;
}

.mch-nav-item.is-hidden,
.mch-nav-group.is-hidden {
  display: none !important;
}

.mch-main {
  flex: 1;
  margin-left: var(--mch-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mch-main__header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e4e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.mch-main__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1e293b;
}

.mch-main__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: #64748b;
}

.mch-main__cs {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 6px;
  background: #4f46e5;
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.mch-main__cs:hover {
  background: #4338ca;
}

.mch-main__cs.is-hidden {
  display: none;
}

.mch-pending-bar {
  flex-shrink: 0;
  padding: 10px 24px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.8125rem;
}

.mch-main__logout {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
}

.mch-main__logout:hover {
  border-color: #cbd5e1;
  color: #334155;
}

.mch-main__content {
  flex: 1;
  padding: 24px 28px 40px;
}
