@import url("./market-react.css");

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 0 60px;
  background: rgba(16, 16, 17, 0.96);
  border-bottom: 1px solid #161619;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
}

.brand-logo {
  display: none;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.topnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #dadade;
  font-size: 15px;
  font-weight: 600;
}

.topnav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.topnav a:hover,
.topnav a.active {
  color: #fff;
}

.topnav a:hover::after,
.topnav a.active::after {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-button {
  display: none !important;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #fff;
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  border-radius: 999px;
  background: currentColor;
}

.theme-toggle .theme-toggle-icon {
  width: auto;
  height: auto;
  margin: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ececf0;
}

.language-switcher span {
  color: #9c9ca4;
}

.language-switcher select {
  max-width: 102px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.balance-pill,
.avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.balance-pill {
  padding: 0 14px;
  color: #fff;
  font-weight: 800;
}

.avatar-link {
  width: 42px;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.avatar-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-shell {
  width: min(100% - 120px, 1320px);
  margin: 0 auto;
  padding: 36px 0 80px;
}

.section-stack {
  display: grid;
  gap: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111112;
  padding: 22px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-box {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #101011;
}

.stat-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-box strong {
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-header h1,
.section-header h2,
.panel h1,
.panel h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
}

.muted,
.row-meta,
.text-tight {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 700;
}

.button.small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
}

.button.ghost:hover,
.button.primary:hover {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
}

.button-row,
.chip-row,
.tabs,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip,
.tabs a,
.filter-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #9c9ca4;
  font-size: 12px;
  font-weight: 600;
}

.tabs a.active,
.filter-pills a.active,
.chip.success {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.chip.warning {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.chip.dark {
  border-color: #5b5b62;
  background: #1b1b1e;
  color: #fff;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
}

.inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.inline-check input[type="checkbox"],
.field input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #101011;
}

.list-row.compact {
  padding: 12px;
}

.row-title {
  margin: 0;
}

.code-box {
  min-height: 260px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.announcement-hero-image {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0b0b0c;
}

.announcement-hero-image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.announcement-content {
  color: #e8e8ec;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #bfbfc7;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101011;
  color: #fff;
  outline: 0;
}

input,
select {
  min-height: 42px;
  padding: 0 13px;
}

textarea {
  min-height: 120px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #71717a;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

th {
  color: #fff;
  font-size: 12px;
}

td {
  color: #cfcfd5;
}

.notice {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101011;
  color: #d7d7dc;
}

.notice.success,
.form-hint.success {
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.notice.danger,
.form-hint.danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.readonly-box {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #101011;
}

.social-actions,
.status-cluster,
.admin-action-bar,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-cluster {
  justify-content: flex-end;
}

.store-summary-panel,
.store-hero-panel {
  overflow: hidden;
}

.store-summary-banner,
.store-hero-banner,
.store-banner-preview {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0a0a0b;
}

.store-summary-banner,
.store-hero-banner {
  margin-bottom: 18px;
  aspect-ratio: 16 / 5;
}

.store-summary-banner img,
.store-hero-banner img,
.store-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-summary-title,
.store-hero-title,
.store-brand-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.store-summary-logo,
.store-hero-logo,
.store-logo-preview {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(47, 88, 255, 0.45);
  border-radius: 50%;
  background: rgba(47, 88, 255, 0.12);
  object-fit: cover;
  flex: 0 0 auto;
}

.store-hero-logo {
  width: 86px;
  height: 86px;
}

.store-logo-preview {
  width: 58px;
  height: 58px;
}

.store-brand-preview-row input {
  min-width: 0;
}

.store-banner-preview {
  aspect-ratio: 16 / 5;
}

.store-admin-branding {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.store-hero-content {
  align-items: flex-start;
}

:root[data-theme="light"] .stat-box,
:root[data-theme="light"] .notice {
  background: #ffffff;
  border-color: #e0e3ea;
}

:root[data-theme="light"] .stat-box strong,
:root[data-theme="light"] th {
  color: #111318;
}

:root[data-theme="light"] td,
:root[data-theme="light"] .notice {
  color: #4c5562;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 120px, 1320px);
  margin: 0 auto;
  padding: 0 0 36px;
  color: #74747c;
}

.footer span:first-child {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 28px;
  }

  .mobile-menu-button {
    display: inline-grid !important;
    justify-self: end;
  }

  .topnav,
  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .topnav {
    display: none;
    overflow-x: auto;
  }

  .topnav.open {
    display: flex;
  }

  .page-shell,
  .footer {
    width: min(100% - 48px, 1320px);
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px 18px;
  }

  .top-actions,
  .section-header,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .page-shell,
  .footer {
    width: min(100% - 28px, 1320px);
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .store-summary-title,
  .store-hero-title,
  .store-brand-preview-row {
    align-items: flex-start;
  }

  .store-hero-logo {
    width: 68px;
    height: 68px;
  }

  .store-admin-branding {
    grid-template-columns: 1fr;
  }
}

/* Milion Studio delivery additions */
.notice-box {
    border: 1px solid var(--border-color, rgba(255,255,255,.12));
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,.04);
}
.notice-box pre,
.fulfillment-row pre,
details pre {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0,0,0,.22);
    overflow:auto;
}
.fulfillment-row {
    align-items: flex-start;
}
.fulfillment-actions {
    min-width: 260px;
    display: grid;
    gap: 10px;
}
.fulfillment-actions input {
    width: 100%;
}
