:root {
  --green: #087d3d;
  --green-dark: #046732;
  --surface: #ffffff;
  --bg: #edf2f4;
  --text: #17302a;
  --muted: #667873;
  --border: #d7e0dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: linear-gradient(135deg, #087d3d, #075f32);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.topbar h1 {
  margin: 0 0 5px;
  font-size: 28px;
}

.topbar p {
  margin: 0;
  opacity: .88;
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 2px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 9px 15px;
}

.workspace {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(25,55,45,.07);
}

.form-panel {
  padding: 20px;
}

.preview-panel {
  padding: 20px;
  min-width: 0;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.size-badge {
  background: #edf8f2;
  border: 1px solid #cde7d8;
  color: var(--green);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label.full {
  grid-column: 1 / -1;
}

label span,
.logo-row strong {
  font-size: 12px;
  font-weight: 700;
  color: #294b41;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cfdad7;
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  font-size: 13px;
  color: #17302a;
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8,125,61,.10);
}

textarea {
  resize: vertical;
}

small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.logo-row {
  margin-top: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed #c7d8d1;
  border-radius: 10px;
  background: #f8fbfa;
}

.logo-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo-row span {
  max-width: 240px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.actions .ghost {
  grid-column: 1 / -1;
}

button {
  border: none;
  border-radius: 9px;
  padding: 11px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}

button:active {
  transform: translateY(1px);
}

button:hover {
  filter: brightness(.97);
}

.primary {
  background: var(--green);
  color: #fff;
}

.success {
  background: #155e75;
  color: #fff;
}

.secondary {
  background: #eaf4ef;
  color: var(--green-dark);
}

.ghost {
  background: #f1f4f3;
  color: #546660;
}

.status-message {
  margin-top: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  background: #f2f6f4;
  color: #53665f;
}

.canvas-wrap {
  width: 100%;
  background:
    linear-gradient(45deg, #eef1f0 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f0 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  padding: 18px;
  border: 1px solid #dbe3e0;
  border-radius: 12px;
  overflow: auto;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 5px 24px rgba(0,0,0,.16);
}

footer {
  padding: 0 22px 22px;
  color: #6a7a75;
  text-align: center;
  font-size: 12px;
}

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


.sticker-preview-block {
  margin-top: 18px;
}

.sticker-preview-block + .sticker-preview-block {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.sticker-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.sticker-title-row h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.sticker-title-row span {
  color: var(--muted);
  font-size: 12px;
}

.preview-actions {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.preview-actions .primary {
  width: 100%;
}


.combined-wrap {
  background: #ffffff;
}

.combined-wrap canvas {
  background: #ffffff;
}

.sticker-preview-block {
  margin-top: 12px;
}

.sticker-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.sticker-title-row h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.sticker-title-row span {
  color: var(--muted);
  font-size: 12px;
}


/* Website deployment refinements */
html {
  min-height: 100%;
}

body {
  min-height: 100vh;
}

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

  .topbar h1 {
    font-size: 22px;
  }

  .brand-mark {
    display: none;
  }

  .workspace {
    padding: 12px;
  }

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

  label.full {
    grid-column: auto;
  }

  .preview-heading,
  .sticker-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sticker-title-row button {
    width: 100%;
  }

  .canvas-wrap {
    padding: 8px;
  }
}

/* MCBTSI header logo - corrected visibility/orientation */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.topbar > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 440px;
  width: 440px;
  height: 105px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 440px;
  max-height: 105px;
  object-fit: contain;
  object-position: right center;
  filter: none;
}

@media (max-width: 900px) {
  .topbar {
    align-items: center;
  }

  .brand-mark {
    flex-basis: 300px;
    width: 300px;
    height: 82px;
  }

  .brand-mark img {
    max-width: 300px;
    max-height: 82px;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-mark {
    display: flex !important;
    flex: none;
    width: min(100%, 360px);
    height: 90px;
    justify-content: flex-start;
  }

  .brand-mark img {
    width: 100%;
    height: 90px;
    max-width: 360px;
    max-height: 90px;
    object-position: left center;
  }
}
