:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --border: #2d3a4f;
  --text: #e7edf5;
  --muted: #8fa3bf;
  --accent: #ff9933;
  --accent2: #138808;
  --danger: #e55353;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1b2838, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.status.ok {
  border-color: var(--accent2);
  color: #b8f0c0;
}

.status.bad {
  border-color: var(--danger);
  color: #ffb3b3;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem 2rem;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

form label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d121a;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 4rem;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.4rem;
}

.checkbox input {
  width: auto;
  margin: 0;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.top-actions {
  margin-bottom: 1rem;
}

.photo-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.8rem;
  height: 5.5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #0d121a;
  overflow: hidden;
}

.photo-preview-wrap img {
  width: auto;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), #ffb366);
  color: #1a1208;
}

button.secondary {
  background: #243247;
  color: var(--text);
  border: 1px solid var(--border);
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.preview-head h2 {
  margin: 0;
  font-size: 1rem;
}

.preview-wrap {
  position: relative;
  background: #fff;
  border-radius: 8px;
  min-height: 420px;
  overflow: auto;
}

.preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 600;
}

.hidden {
  display: none;
}
