:root {
  --navy: #08233f;
  --navy-soft: #12385d;
  --gold: #f7b500;
  --gold-dark: #d89200;
  --paper: #fffaf0;
  --surface: #ffffff;
  --line: #e8edf3;
  --text: #102033;
  --muted: #647184;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 18px 50px rgba(8, 35, 63, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(140deg, rgba(247, 181, 0, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #fff9ed 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.merchant-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(8, 35, 63, 0.96);
  color: #fff;
  box-shadow: 0 12px 32px rgba(8, 35, 63, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--gold);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.panel-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.notice.success {
  border-color: rgba(6, 118, 71, 0.22);
  color: var(--success);
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.22);
  color: var(--danger);
}

.login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: calc(100vh - 160px);
}

.login-copy h1,
.merchant-hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}

.login-copy p,
.merchant-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 10px;
  color: #9a6600;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-card,
.panel-section,
.empty-state {
  border: 1px solid rgba(8, 35, 63, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.register-account-link {
  color: var(--navy);
  text-align: center;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(247, 181, 0, 0.7);
  text-underline-offset: 4px;
}

.merchant-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(247, 181, 0, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(247, 181, 0, 0.22), transparent 34%);
  box-shadow: var(--shadow);
}

.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(247, 181, 0, 0.35);
  background: #fff7df;
  color: #6f4a00;
  font-size: 0.84rem;
  font-weight: 900;
}

.panel-tabs {
  position: sticky;
  top: 74px;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 20px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.panel-tabs a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 7px;
  color: var(--navy);
  font-weight: 900;
}

.public-link-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-link-field small {
  padding-left: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.public-link-field input {
  border: 0;
}

.share-store-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid rgba(247, 181, 0, .35);
  border-radius: 8px;
  background: #fff9e8;
}

.share-store-box input {
  flex: 1 1 320px;
}

.panel-tabs a:hover {
  background: #fff2c7;
}

.panel-section {
  margin-bottom: 20px;
  padding: clamp(18px, 3vw, 28px);
}

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

.section-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.6rem;
}

.section-head span {
  color: var(--muted);
  font-size: 0.95rem;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(247, 181, 0, 0.16);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.compact {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.wide {
  grid-column: 1 / -1;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7df;
}

.option-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-row input {
  width: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.quiet-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold), #ffcb32);
  color: var(--navy);
  box-shadow: 0 12px 24px rgba(247, 181, 0, 0.23);
}

.ghost-button,
.quiet-button {
  border: 1px solid rgba(8, 35, 63, 0.16);
  background: #fff;
  color: var(--navy);
}

.merchant-topbar .ghost-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.danger-button {
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: #fff4f2;
  color: var(--danger);
}

.primary-button:hover,
.ghost-button:hover,
.quiet-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.list-stack,
.product-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.list-item,
.product-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.list-item p,
.product-main span {
  margin: 5px 0 0;
  color: var(--muted);
}

.row-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.row-form small,
.list-item small {
  color: var(--muted);
  font-weight: 800;
}

.product-item.is-paused {
  opacity: 0.72;
}

.product-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.product-main strong,
.list-item strong {
  color: var(--navy);
  font-size: 1.05rem;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

details .form-grid {
  margin-top: 12px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.empty-state {
  padding: 34px;
  text-align: center;
}

.empty-state h1 {
  color: var(--navy);
}

@media (max-width: 760px) {
  .merchant-topbar {
    align-items: flex-start;
  }

  .login-wrap,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .merchant-hero,
  .section-head,
  .list-item,
  .product-main {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-tabs {
    top: 82px;
  }

  .row-form,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .item-actions {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button,
  .quiet-button,
  .danger-button {
    width: 100%;
  }
}
