body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f7f7f8;
  color: #222;
}
header {
  background: #1f3557;
  color: #fff;
  padding: 1rem 1.5rem;
}
header h1 { margin: 0 0 .35rem 0; }
header .meta {
  font-size: .9rem;
  opacity: .9;
  display: flex;
  gap: 1rem;
  margin-bottom: .6rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  margin-right: 1rem;
}
main { padding: 1.5rem; }
.card {
  background: white;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.narrow { max-width: 420px; }
.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(400px, 1fr);
  gap: 1rem;
  align-items: start;
}
.control-card { position: sticky; top: 1rem; }
.preview-stack { display: grid; gap: 1rem; }
.grid-two, .grid-three, .grid-four {
  display: grid;
  gap: .8rem;
  margin-top: .8rem;
}
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-grid { align-items: end; }
label {
  display: block;
  margin-top: .8rem;
  margin-bottom: .25rem;
  font-size: .95rem;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"] {
  width: 100%;
  padding: .7rem;
  border: 1px solid #c9c9cf;
  border-radius: 6px;
  box-sizing: border-box;
}
input[type="checkbox"] { margin-right: .45rem; }
button, .button-link {
  margin-top: 1rem;
  background: #1f3557;
  color: white;
  border: none;
  border-radius: 6px;
  padding: .7rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.button-link { line-height: 1.2; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.preview-card h3 { margin-top: 0; }
.preview-image {
  width: 100%;
  max-height: 580px;
  object-fit: contain;
  border: 1px solid #d7dae2;
  border-radius: 8px;
  background: #fff;
}
.preview-placeholder {
  color: #5b6473;
  margin: 0;
}
.message.error { color: #8c1d18; }
.message { min-height: 1.2rem; }
.help-text { color: #455064; }
.report-box {
  background: #0f172a;
  color: #d9e1f2;
  border-radius: 8px;
  padding: 1rem;
  overflow: auto;
  font-size: .85rem;
}
.hidden { display: none; }
details { margin-top: 1rem; }
summary { cursor: pointer; font-weight: 600; }
.compact-checkbox { margin-top: 1rem; }
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .control-card { position: static; }
}
@media (max-width: 760px) {
  .grid-two, .grid-three, .grid-four { grid-template-columns: 1fr; }
}
