:root {
  --deep-magenta: #D6218C;
  --pink: #E12F7C;
  --red-pink: #EE4A60;
  --bright-red: #F02C3F;
  --orange: #FC7C3A;
  --green: #4CAF50;
  --red: #F44336;
  --blue: #2196F3;
  --yellow: #FFEB3B;
  --purple: #9C27B0;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --primary: var(--deep-magenta);
  --primary-light: #e649a4;
  --primary-dark: #b01870;
  --sidebar-bg: #ffffff;
  --sidebar-text: var(--gray-700);
  --sidebar-text-muted: var(--gray-500);
  --sidebar-hover-bg: var(--gray-100);
  --sidebar-active-bg: var(--deep-magenta);
  --sidebar-active-text: #ffffff;
  --sidebar-border: var(--gray-200);
  --surface-page:
    radial-gradient(circle at top left, rgba(214, 33, 140, 0.08), transparent 22%),
    linear-gradient(180deg, #faf7fb 0%, #f6f7fb 100%);
  --surface-card: rgba(255, 255, 255, 0.96);
  --surface-card-alt: #ffffff;
  --surface-soft: #f7f4f8;
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border-light: var(--gray-200);
  --border-strong: rgba(214, 33, 140, 0.18);
  --shadow-sm: 0 8px 24px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 18px 40px rgba(17, 24, 39, 0.08);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --content-max: 1680px;
  --app-bg: var(--surface-page);
  --app-surface: var(--surface-card);
  --app-surface-strong: var(--surface-card-alt);
  --app-surface-muted: var(--surface-soft);
  --app-text: var(--text-primary);
  --app-text-secondary: var(--text-secondary);
  --app-text-muted: var(--text-muted);
  --app-border: var(--border-light);
  --app-border-strong: var(--border-strong);
  --app-primary: var(--primary);
  --app-primary-dark: var(--primary-dark);
  --app-primary-soft: rgba(214, 33, 140, 0.08);
  --app-success: var(--green);
  --app-warning: var(--orange);
  --app-danger: var(--red);
  --app-radius-sm: var(--radius-sm);
  --app-radius-md: var(--radius-md);
  --app-radius-lg: var(--radius-lg);
  --app-shadow-sm: var(--shadow-sm);
  --app-shadow-md: var(--shadow-md);
  --app-max-width: var(--content-max);
}

/* OSSi logo on login cards (`assets/logo/market-logo.png`) */
.auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.auth-brand img {
  height: 56px;
  width: auto;
  max-width: min(260px, 100%);
  object-fit: contain;
}

html, body {
  min-height: 100%;
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[data-bs-theme="dark"] {
  color-scheme: light;
}

.gs-main {
  min-width: 0;
  padding: 28px;
  background: transparent;
}

.shell,
.container,
.container-fluid {
  width: 100%;
  max-width: var(--app-max-width);
}

body[data-sidebar-current="products"] .gs-main .container-fluid {
  max-width: none;
  width: 100%;
}

.shell,
.container {
  margin: 0 auto;
}

.page-notify-bar {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 12px;
}

.gs-page-utils-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-head,
.header,
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head-copy,
.header-copy {
  min-width: 0;
}

.page-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--app-primary-soft);
  border: 1px solid var(--app-border-strong);
  color: var(--app-primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-head h1,
.page-head h2,
.header .title,
.topbar h1,
.topbar h2,
.topbar h3,
.topbar h4 {
  margin: 0;
  color: var(--app-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-head p,
.page-subtitle,
.subtitle,
.header-subtitle,
.muted,
.hint {
  color: var(--app-text-secondary);
}

.page-subtitle,
.header-subtitle {
  display: none !important;
}

.page-head p,
.subtitle {
  margin: 8px 0 0;
  max-width: 720px;
  font-size: 14px;
}

.page-head-actions,
.actions,
.right,
.toolbar,
.tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card,
.cardx,
.main-panel,
.panel,
.filters-card,
.shop-info-card,
.db-card,
.sheet,
.dialog,
.drawer,
.auth-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  box-shadow: var(--app-shadow-sm);
  backdrop-filter: blur(10px);
}

.card,
.cardx,
.main-panel,
.panel,
.db-card {
  overflow: hidden;
}

.card:hover,
.cardx:hover,
.main-panel:hover,
.panel:hover,
.db-card:hover {
  box-shadow: var(--app-shadow-md);
}

.btn,
.btnx,
button.btn,
.logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.18);
}

.btn:hover,
.btnx:hover,
button.btn:hover,
.logout:hover {
  transform: translateY(-1px);
}

.btn.secondary,
.btnx.secondary,
.btn.ghost,
.logout,
button.btn.secondary {
  background: var(--app-surface-strong);
  color: var(--app-text);
  border-color: var(--app-border);
  box-shadow: none;
}

.input,
.select,
.textarea,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface-strong);
  color: var(--app-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.pill,
.db-pill,
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--app-border);
  background: var(--app-surface-strong);
  color: var(--app-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.global-shop-badge {
  margin-bottom: 0;
}

.section-block {
  margin-bottom: 22px;
}

.section-title,
.card-header,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-responsive,
.table-container {
  border-radius: var(--app-radius-md);
}

.table thead th,
.tablex thead th {
  background: var(--app-surface-muted);
}

body,
.main,
main,
.wrap,
.layout,
.app,
.auth-wrap,
.payouts,
.shell,
.container-fluid,
.container,
.row:nth-child(odd),
.cardx,
.panel,
.db-card,
.sheet,
.dialog,
.drawer,
.shopbox,
.brand,
svg,
.list,
.row,
.hdr,
.banner,
.toast,
.modal,
.mobile-nav,
aside {
  color: var(--text-primary);
}

body,
.main,
main,
.wrap,
.app {
  background: var(--surface-page) !important;
}

.input,
.select,
.textarea,
.ta,
.form-control,
.form-select,
.db-input,
.input-group-text {
  background: #fff !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

.btn.brand,
.btn-primary,
.btnx,
.nav a.active,
.gs-nav a.active {
  background: linear-gradient(135deg, var(--deep-magenta), var(--red-pink)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.pill,
.db-pill,
#liveBadge,
.badge-soft {
  background: rgba(214, 33, 140, 0.08) !important;
  color: var(--deep-magenta) !important;
  border-color: rgba(214, 33, 140, 0.08) !important;
}

.empty,
.empty-state,
#emptyState,
#loadingState {
  border-radius: var(--app-radius-md);
}

@media (max-width: 980px) {
  .gs-main {
    padding: 18px 14px 24px;
  }

  .page-head h1,
  .page-head h2,
  .header .title,
  .topbar h1,
  .topbar h2,
  .topbar h3,
  .topbar h4 {
    font-size: 23px;
  }
}

.gd-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  z-index: 1200;
}

.gd-modal.is-open {
  display: flex;
}

.gd-dialog {
  width: min(480px, 100%);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

.gd-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--app-primary-soft);
  border: 1px solid var(--app-border-strong);
  color: var(--app-primary-dark);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.gd-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--app-text);
}

.gd-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--app-text-secondary);
}

.gd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.gd-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 16px;
  width: min(640px, calc(100vw - 32px));
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(214, 33, 140, 0.14);
  border-radius: 20px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
  z-index: 1250;
}

.gd-toast.is-open {
  display: flex;
}

.gd-toast-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gd-toast-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-text);
}

.gd-toast-text {
  font-size: 13px;
  color: var(--app-text-secondary);
}

.gd-toast-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gd-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff5fb;
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .gd-title {
    font-size: 23px;
  }

  .gd-actions,
  .gd-toast,
  .gd-toast-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gd-toast-actions {
    margin-left: 0;
    width: 100%;
  }

  .gd-timer,
  .gd-toast .btn,
  .gd-toast .btnx {
    width: 100%;
  }
}
