:root {
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  color: #172033;
  background: #eef2f7;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 30px;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.19), transparent 38%),
    linear-gradient(135deg, #0f2e5d, #174f86);
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(15, 46, 93, .2);
}

.hero h1 {
  margin: 5px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
}

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #f7b955;
  border-radius: 50%;
}

.status.ready .status-dot {
  background: #64e59a;
}

.status.error .status-dot {
  background: #ff7b7b;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: stretch;
}

.panel {
  background: white;
  border: 1px solid #dfe6ef;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(29, 43, 68, .07);
}

.editor-panel,
.options-panel,
.preview-panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 17px;
}

.panel-heading h2 {
  margin: 0 0 3px;
  font-size: 1.18rem;
}

.panel-heading p {
  margin: 0;
  color: #667085;
  font-size: .91rem;
}

textarea {
  width: 100%;
  min-height: 500px;
  resize: vertical;
  direction: ltr;
  text-align: left;
  padding: 17px;
  color: #d8e4ff;
  background: #101827;
  border: 1px solid #263750;
  border-radius: 13px;
  font-family: Consolas, "Courier New", monospace;
  font-size: .9rem;
  line-height: 1.65;
  outline: none;
}

textarea:focus {
  border-color: #3c82d2;
  box-shadow: 0 0 0 3px rgba(60, 130, 210, .16);
}

.options-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: .9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 10px 11px;
  color: #172033;
  background: #fff;
  border: 1px solid #ccd5e2;
  border-radius: 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #2769ad;
  box-shadow: 0 0 0 3px rgba(39, 105, 173, .12);
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  font-weight: 500 !important;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.margin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.primary-button,
.secondary-button {
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  font-weight: 700;
  transition: transform .15s ease, opacity .15s ease;
}

.primary-button {
  width: 100%;
  padding: 13px 18px;
  color: white;
  background: linear-gradient(135deg, #175b9b, #113f78);
  box-shadow: 0 8px 20px rgba(23, 91, 155, .22);
}

.secondary-button {
  padding: 9px 13px;
  color: #174f86;
  background: #eaf2fb;
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: .65;
  transform: none;
}

.message {
  min-height: 24px;
  margin: 12px 0 0;
  color: #667085;
  font-size: .88rem;
  text-align: center;
}

.message.error {
  color: #b42318;
}

.message.success {
  color: #067647;
}

.preview-panel {
  margin-top: 22px;
}

#preview {
  width: 100%;
  min-height: 650px;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
}

@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 18px, 1500px);
    padding-top: 12px;
  }

  .hero,
  .panel {
    border-radius: 14px;
  }

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