* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  color: #111;
  min-height: 100vh;
}


/* TOP BAR */

.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #ddd;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 42px;
  height: 42px;

  border-radius: 10px;

  background: #f2c94c;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 900;
  font-size: 20px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  color: #777;
  font-size: 12px;
  margin-top: 2px;
}

.secure {
  font-size: 13px;
  color: #666;
}


/* DASHBOARD */

.dashboard {
  max-width: 1250px;
  margin: 40px auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 25px;
}


/* CARDS */

.composer,
.preview-section {
  background: #fff;

  border: 1px solid #ddd;
  border-radius: 16px;

  padding: 28px;
}

.section-heading {
  margin-bottom: 25px;
}

.section-heading h1 {
  font-size: 26px;
  margin-bottom: 7px;
}

.section-heading p,
.preview-header p {
  color: #777;
  font-size: 14px;
}


/* FORM */

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;

  font-size: 14px;
  font-weight: 700;

  margin-bottom: 8px;
}

.field small {
  display: block;

  margin-top: 6px;

  color: #888;

  font-size: 11px;
}

input,
textarea {
  width: 100%;

  border: 1px solid #ccc;
  border-radius: 10px;

  padding: 13px 14px;

  font-family: inherit;
  font-size: 14px;

  outline: none;
}

input:focus,
textarea:focus {
  border-color: #111;
}

textarea {
  min-height: 420px;

  resize: vertical;

  font-family: monospace;

  line-height: 1.5;
}


/* LABEL */

.label-row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 8px;
}

.label-row label {
  margin-bottom: 0;
}


/* SMALL BUTTON */

.small-button {
  border: 1px solid #ccc;

  background: #fff;

  padding: 7px 10px;

  border-radius: 7px;

  font-size: 12px;

  cursor: pointer;
}

.small-button:hover {
  background: #f5f5f5;
}


/* ACTIONS */

.actions {
  display: flex;

  gap: 10px;

  margin-top: 5px;
}

.actions button {
  flex: 1;

  border-radius: 10px;

  padding: 14px;

  font-weight: 700;

  font-size: 14px;

  cursor: pointer;
}

.primary-button {
  background: #111;

  color: #fff;

  border: 1px solid #111;
}

.secondary-button {
  background: #fff;

  color: #111;

  border: 1px solid #ccc;
}

.actions button:hover {
  opacity: 0.85;
}

.actions button:disabled {
  opacity: 0.5;

  cursor: not-allowed;
}


/* STATUS */

#status {
  min-height: 22px;

  margin-top: 15px;

  text-align: center;

  font-size: 14px;
}


/* PREVIEW */

.preview-header {
  margin-bottom: 20px;
}

.preview-header h2 {
  font-size: 21px;

  margin-bottom: 5px;
}

.email-preview {
  width: 100%;

  min-height: 520px;

  border: 1px solid #ddd;

  border-radius: 10px;

  overflow: hidden;

  background: #fafafa;
}

.preview-placeholder {
  min-height: 520px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-align: center;

  padding: 30px;

  color: #777;
}

.preview-icon {
  font-size: 40px;

  margin-bottom: 15px;
}

.preview-placeholder h3 {
  color: #333;

  margin-bottom: 8px;
}

.preview-placeholder p {
  font-size: 13px;

  max-width: 300px;

  line-height: 1.5;
}

#previewFrame {
  display: none;

  width: 100%;

  height: 520px;

  border: none;

  background: #fff;
}


/* FOOTER */

footer {
  text-align: center;

  padding: 20px;

  color: #888;

  font-size: 12px;
}


/* MOBILE */

@media (max-width: 850px) {

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

  .topbar {
    padding: 0 18px;
  }

  .secure {
    display: none;
  }

}


@media (max-width: 500px) {

  .composer,
  .preview-section {
    padding: 20px;
  }

  .dashboard {
    margin-top: 20px;
  }

  .actions {
    flex-direction: column;
  }

}