:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --card: #ffffff;
  --text: #152321;
  --muted: #64746f;
  --border: #dce5e2;
  --primary: #0f766e;
  --primary-dark: #0a5f58;
  --primary-soft: #e4f4f2;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #087443;
  --success-soft: #ecfdf3;
  --shadow: 0 18px 50px rgba(23, 42, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 260px),
    var(--bg);
  color: var(--text);
  font-family:
    Tahoma,
    Arial,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 18px 14px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.form-card {
  width: min(100%, 520px);
  background: var(--card);
  border: 1px solid rgba(220, 229, 226, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px 16px 18px;
}

.page-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: 0;
}

.subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.message {
  border-radius: 8px;
  padding: 12px 13px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
}

.message.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd0ca;
}

.message.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #b7ebc6;
}

.field-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
  font-size: 14px;
}

input[type="tel"],
input[type="password"],
input[type="number"] {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

.field-hint,
.field-error {
  min-height: 20px;
  margin: 6px 1px 0;
  font-size: 13px;
}

.field-hint {
  color: var(--muted);
}

.field-error {
  color: var(--danger);
  font-weight: 700;
}

.file-input {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-box {
  min-height: 128px;
  margin: 0;
  border: 1.5px dashed #a8bdb8;
  border-radius: 8px;
  background: #fbfdfc;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.upload-box:focus-within,
.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.upload-title {
  color: var(--text);
  font-weight: 800;
}

.upload-subtitle {
  font-size: 13px;
}

.preview-wrap {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.preview-wrap img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #eef3f1;
}

.text-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
}

.submit-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.submit-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

.submit-button:hover {
  background: var(--primary-dark);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.secondary-button {
  margin-top: 12px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #c5e7e3;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit-button.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 560px) {
  .page-shell {
    align-items: center;
    padding: 36px 18px;
  }

  .form-card {
    padding: 28px 26px 24px;
  }
}
