:root {
  --bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e2e8f0;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

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

header {
  padding: 1.5rem 1rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.photo-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.photo-box {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

.photo-box label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="file"] {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

input[readonly] {
  background: #eef2f7;
  color: var(--text);
  font-weight: 600;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
}

button[type="submit"] {
  background: var(--accent);
  color: white;
  margin-top: 0.5rem;
}

button[type="submit"]:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: white;
  border: 1px solid var(--accent);
  color: var(--accent);
}

button.secondary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.status {
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.1em;
  margin: 0.1rem 0 0;
}

.hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: #16a34a;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.btn-delete {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  width: auto;
}
