:root {
  --gs-sidebar-width: 286px;
  --gs-sidebar-bg: #ffffff;
  --gs-sidebar-bg-soft: #f7f4f8;
  --gs-sidebar-border: #e5e7eb;
  --gs-sidebar-text: #374151;
  --gs-sidebar-muted: #6b7280;
  --gs-sidebar-accent: linear-gradient(135deg, #D6218C, #EE4A60);
  --gs-sidebar-shadow: 12px 0 30px rgba(17, 24, 39, 0.04);
}

.gs-layout {
  display: grid;
  grid-template-columns: var(--gs-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.gs-main {
  min-width: 0;
}

@media (min-width: 981px) {
  .gs-layout,
  .layout.gs-layout,
  .wrap.gs-layout,
  .ship-layout.gs-layout {
    display: block;
    min-height: 100vh;
  }

  .gs-layout > .gs-main,
  .layout.gs-layout > .gs-main,
  .wrap.gs-layout > .gs-main,
  .ship-layout.gs-layout > .gs-main {
    margin-left: var(--gs-sidebar-width);
    min-height: 100vh;
    min-width: 0;
  }

  #globalSidebarMount {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--gs-sidebar-width);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 30;
  }

  #globalSidebarMount .gs-side,
  #globalSidebarMount .gs-side.side {
    position: relative;
    top: auto;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
  }

  #globalSidebarMount .gs-brand,
  #globalSidebarMount .gs-shopbox {
    flex-shrink: 0;
  }

  #globalSidebarMount .gs-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }

  #globalSidebarMount .gs-side-footer {
    flex-shrink: 0;
    margin-top: auto;
  }
}

#globalSidebarMount .gs-mobile-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--gs-sidebar-border);
}

#globalSidebarMount .gs-mobile-brand,
#globalSidebarMount .gs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

#globalSidebarMount .gs-mobile-brand img,
#globalSidebarMount .gs-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

#globalSidebarMount .gs-mobile-brand h2,
#globalSidebarMount .gs-brand h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  color: var(--gs-sidebar-text);
}

#globalSidebarMount .gs-side {
  box-sizing: border-box;
  padding: 22px 18px;
  color: var(--gs-sidebar-text);
  backdrop-filter: blur(16px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94)),
    var(--gs-sidebar-bg);
  border-right: 1px solid var(--gs-sidebar-border);
  box-shadow: var(--gs-sidebar-shadow);
}

#globalSidebarMount .gs-brand {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--gs-sidebar-border);
}

#globalSidebarMount .gs-brand-copy {
  min-width: 0;
}

#globalSidebarMount .gs-brand-copy span {
  display: block;
  font-size: 12px;
  margin-top: 2px;
  color: var(--gs-sidebar-muted);
}

#globalSidebarMount .gs-shopbox {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--gs-sidebar-border);
  background: var(--gs-sidebar-bg-soft);
}

#globalSidebarMount .gs-shopbox-label {
  font-size: 12px;
  color: var(--gs-sidebar-muted);
  margin-bottom: 8px;
}

#globalSidebarMount .gs-shopbox-name {
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

#globalSidebarMount .gs-shopbox-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gs-sidebar-muted);
}

.gs-notify-mount {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  align-self: center;
}

.page-notify-bar > .gs-notify-mount {
  margin: 0;
}

.topbar > .gs-notify-mount,
.header > .gs-notify-mount,
.ship-header > .gs-notify-mount,
.page-head > .gs-notify-mount,
.db-header > .gs-notify-mount {
  margin-right: 12px;
}

#gsNotifyMount .gs-notify {
  position: relative;
}

#gsNotifyMount .gs-notify-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(214, 33, 140, 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--gs-sidebar-text);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

#gsNotifyMount .gs-notify-btn:hover,
#gsNotifyMount .gs-notify-btn[aria-expanded="true"] {
  border-color: rgba(214, 33, 140, 0.34);
  background: #fff7fb;
}

#gsNotifyMount .gs-notify-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#gsNotifyMount .gs-notify-symbol {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(214, 33, 140, 0.1);
}

#gsNotifyMount .gs-notify-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  background: #d6218c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #fff;
}

#gsNotifyMount .gs-notify-count[hidden] {
  display: none;
}

#gsNotifyMount .gs-notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: min(360px, calc(100vw - var(--gs-sidebar-width) - 40px));
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

#gsNotifyMount .gs-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gs-sidebar-border);
}

#gsNotifyMount .gs-notify-head strong {
  color: var(--gs-sidebar-text);
  font-size: 14px;
}

#gsNotifyMount .gs-notify-head button {
  border: 0;
  background: transparent;
  color: #d6218c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

#gsNotifyMount .gs-notify-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

#gsNotifyMount .gs-notify-item {
  position: relative;
  border: 0;
  border-bottom: 1px solid var(--gs-sidebar-border);
  background: #fff;
  color: var(--gs-sidebar-text);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#gsNotifyMount .gs-notify-item:last-child {
  border-bottom: 0;
}

#gsNotifyMount .gs-notify-item.is-read {
  background: #f8fafc;
}

#gsNotifyMount .gs-notify-item.is-read .gs-notify-item-icon {
  opacity: 0.72;
}

#gsNotifyMount .gs-notify-item.is-read .gs-notify-item-copy strong {
  color: #6b7280;
  font-weight: 600;
}

#gsNotifyMount .gs-notify-item.is-read .gs-notify-item-copy small,
#gsNotifyMount .gs-notify-item.is-read .gs-notify-item-copy em {
  color: #9ca3af;
}

#gsNotifyMount .gs-notify-item.is-unread {
  background: linear-gradient(90deg, rgba(214, 33, 140, 0.1), #fff7fb 28%, #fff 100%);
  border-left: 3px solid #d6218c;
  padding-left: 9px;
}

#gsNotifyMount .gs-notify-item.is-unread .gs-notify-item-copy strong {
  color: #111827;
  font-weight: 800;
}

#gsNotifyMount .gs-notify-item.is-unread:hover {
  background: linear-gradient(90deg, rgba(214, 33, 140, 0.14), #fff0f7 28%, #fff7fb 100%);
}

#gsNotifyMount .gs-notify-item.is-read:hover {
  background: #f1f5f9;
}

#gsNotifyMount .gs-notify-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(214, 33, 140, 0.1);
  color: #d6218c;
  font-size: 14px;
  font-weight: 900;
}

#gsNotifyMount .gs-notify-type-seller_order {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

#gsNotifyMount .gs-notify-type-return_request {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

#gsNotifyMount .gs-notify-type-commission_rule {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

#gsNotifyMount .gs-notify-item-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#gsNotifyMount .gs-notify-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#gsNotifyMount .gs-notify-unread-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #d6218c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

#gsNotifyMount .gs-notify-item-copy strong,
#gsNotifyMount .gs-notify-item-copy small,
#gsNotifyMount .gs-notify-item-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#gsNotifyMount .gs-notify-item-title-row strong {
  flex: 1 1 auto;
  min-width: 0;
}

#gsNotifyMount .gs-notify-item-copy strong {
  color: #111827;
  font-size: 13px;
}

#gsNotifyMount .gs-notify-item-copy small {
  color: var(--gs-sidebar-muted);
  font-size: 12px;
}

#gsNotifyMount .gs-notify-item-copy em {
  color: #9ca3af;
  font-size: 11px;
  font-style: normal;
}

#gsNotifyMount .gs-notify-empty {
  padding: 18px 14px;
  color: var(--gs-sidebar-muted);
  font-size: 13px;
  text-align: center;
}

.gs-notify-modal[hidden] {
  display: none;
}

.gs-notify-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.38);
}

.gs-notify-dialog {
  width: min(520px, 100%);
  position: relative;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.gs-notify-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--gs-sidebar-border);
  background: #fff;
  color: var(--gs-sidebar-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.gs-notify-modal-kicker {
  color: #d6218c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.gs-notify-dialog h3 {
  margin: 0 34px 10px 0;
  color: #111827;
  font-size: 20px;
}

.gs-notify-dialog p {
  margin: 0;
  color: #374151;
  line-height: 1.55;
}

.gs-notify-modal-meta {
  margin-top: 14px;
  color: var(--gs-sidebar-muted);
  font-size: 12px;
}

#globalSidebarMount .gs-nav {
  display: grid;
  gap: 6px;
}

#globalSidebarMount .gs-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--gs-sidebar-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#globalSidebarMount .gs-nav a:hover {
  transform: translateX(2px);
  color: var(--gs-sidebar-text);
  background: rgba(59, 130, 246, 0.08);
  color: #D6218C;
  border-color: rgba(214, 33, 140, 0.08);
}

#globalSidebarMount .gs-nav a.active {
  color: #fff;
  background: var(--gs-sidebar-accent);
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.25);
  box-shadow: 0 12px 24px rgba(214, 33, 140, 0.18);
}

#globalSidebarMount .gs-nav-sep {
  height: 1px;
  margin: 8px 0;
  background: var(--gs-sidebar-border);
}

#globalSidebarMount .gs-side-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gs-sidebar-border);
}

#globalSidebarMount .gs-datetime {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--gs-sidebar-border);
  background: var(--gs-sidebar-bg-soft);
}

#globalSidebarMount .gs-datetime-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gs-sidebar-muted);
}

#globalSidebarMount .gs-datetime-time {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--gs-sidebar-text);
  letter-spacing: -0.03em;
}

#globalSidebarMount .gs-datetime-date {
  font-size: 13px;
  color: var(--gs-sidebar-muted);
}

#globalSidebarMount .gs-menu-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
  color: var(--gs-sidebar-text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

#globalSidebarMount .gs-logout-btn {
  width: 100%;
  margin-top: 10px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--gs-sidebar-border);
  background: var(--gs-sidebar-bg-soft);
  color: var(--gs-sidebar-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

#globalSidebarMount .gs-logout-btn:hover {
  background: linear-gradient(135deg, #D6218C, #EE4A60);
  border-color: transparent;
  color: #fff;
}

@media (max-width: 980px) {
  .gs-layout {
    grid-template-columns: 1fr;
  }

  #globalSidebarMount {
    position: static;
    width: auto;
    height: auto;
    display: block;
    overflow: visible;
  }

  #globalSidebarMount .gs-mobile-nav {
    display: flex;
  }

  #globalSidebarMount .gs-side {
    display: none;
    position: fixed;
    inset: 67px 0 0 0;
    height: auto;
    max-height: calc(100dvh - 67px);
    z-index: 35;
    border-right: none;
    border-bottom: 1px solid var(--gs-sidebar-border);
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: none;
  }

  #globalSidebarMount .gs-side.gs-open {
    display: flex;
    flex-direction: column;
  }

  #globalSidebarMount .gs-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  #gsNotifyMount .gs-notify-panel {
    width: min(360px, calc(100vw - 28px));
  }
}
