:root {
  --ink: #182c3d;
  --gold: #a37b36;
  --line: #e0e3e4;
  --muted: #66747d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f3ef;
  color: var(--ink);
  font:
    15px/1.8 system-ui,
    sans-serif;
}
header {
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 18px max(24px, calc((100vw - 1250px) / 2));
}
.brand {
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  direction: ltr;
  margin-left: auto;
}
.brand span {
  font-size: 12px;
  margin-inline-start: 10px;
  color: var(--muted);
}
header > a:not(.brand) {
  font-size: 13px;
}
main {
  max-width: 1250px;
  padding: 35px 24px 80px;
  margin: auto;
}
.intro > p:first-child {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold);
  font-weight: bold;
}
.intro h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin: 8px 0;
}
.intro p {
  color: var(--muted);
  margin: 4px 0;
}
h2 {
  font-size: 24px;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 8px;
  margin-top: 20px;
}
.panel > p,
.hint {
  font-size: 12px;
  color: var(--muted);
}
#login-area {
  max-width: 620px;
}
input,
textarea,
select,
button {
  font: inherit;
}
input:not([type="checkbox"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c9d0d4;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  margin-top: 6px;
  min-width: 0;
}
input[type="file"] {
  font-size: 12px;
}
input[type="number"] {
  direction: ltr;
  text-align: right;
}
label {
  display: block;
  font-size: 13px;
  margin-bottom: 17px;
  font-weight: 600;
}
.checkbox {
  display: flex;
  gap: 9px;
  align-items: center;
}
.checkbox input {
  width: 17px;
  height: 17px;
}
button,
.button {
  border: 1px solid var(--line);
  background: white;
  padding: 9px 17px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  font-size: 13px;
}
.button {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.tabs .selected {
  border-color: var(--gold);
  background: #f5ede0;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.section-top input {
  max-width: 380px;
  font-size: 13px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 35px;
  margin-top: 24px;
}
.product-list {
  max-height: 650px;
  overflow: auto;
  padding-left: 10px;
}
.item {
  width: 100%;
  display: block;
  text-align: right;
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
}
.item.selected {
  border-color: var(--gold);
  background: #faf7ef;
}
.item strong {
  display: block;
  direction: ltr;
  text-align: right;
}
.item small {
  color: var(--muted);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.code {
  direction: ltr;
  text-align: right;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-weight: 700;
}
.preview {
  max-width: 100%;
  max-height: 230px;
  object-fit: contain;
  margin: 15px auto;
  background: #f3f1ec;
}
.preview:not([src]),
.preview[src=""] {
  display: none;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.launch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.launch-grid article {
  padding: 23px;
  background: #f7f7f3;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.launch-grid p,
.supplier-info p {
  font-size: 13px;
}
.supplier-info {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 30px;
}
#status {
  min-height: 30px;
  font-size: 13px;
}
#status.error {
  color: #a43e2f;
}
#status.success {
  color: #276644;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 750px) {
  header {
    padding: 15px;
    gap: 12px;
  }
  .brand {
    font-size: 21px;
  }
  .brand span {
    display: none;
  }
  header a {
    font-size: 11px !important;
  }
  main {
    padding: 25px 15px;
  }
  .panel {
    padding: 20px 16px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-list {
    max-height: 260px;
  }
  .two,
  .launch-grid {
    grid-template-columns: 1fr;
  }
  .tabs button {
    font-size: 11px;
    padding: 8px 12px;
  }
  .section-top input {
    max-width: none;
  }
}

/* Reliable Arabic shaping and clear product previews. */
body,
input,
textarea,
select,
button {
  font-family: Tahoma, "Geeza Pro", Arial, "Segoe UI", sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.intro > p:first-child,
.brand,
.code {
  font-family: Arial, "Segoe UI", sans-serif;
}
.intro h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.4;
}
.preview {
  background: linear-gradient(145deg, #737e86, #4b565e);
  border-radius: 5px;
}
