:root {
  --bg: #fafafa;
  --topbar: #ffffff;
  --topbar-border: #d6dbe8;
  --text: #11172d;
  --muted: #5f6f92;
  --border: #d6dbe8;
  --input: #e8ebf2;
  --focus: #6c82b0;
  --success-bg: #ebf9f2;
  --success-text: #0f7a51;
  --error-bg: #fff1f2;
  --error-text: #ba1d2f;
  --button: #0b8a69;
  --button-hover: #0a765a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.topbar {
  height: 56px;
  padding: 0 24px;
  background: var(--topbar);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--topbar-border);
}

.logo {
  height: 26px;
  width: auto;
  display: block;
}

.shell {
  display: flex;
  justify-content: center;
  padding: 44px 16px 26px;
}

.panel {
  width: min(760px, 100%);
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 52px);
  letter-spacing: -0.03em;
}

.banner {
  border-radius: 10px;
  padding: 11px 12px;
  margin: 0 auto 14px;
  width: min(640px, 100%);
  line-height: 1.45;
  font-size: 14px;
}

.banner-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid #fecdd3;
}

.banner-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #bcebd8;
}

.form {
  width: min(640px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

.field textarea {
  min-height: 124px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(108, 130, 176, 0.2);
}

.hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
}

.file-input {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.dropzone {
  border: 1px dashed #b8c3da;
  border-radius: 12px;
  background: #f6f8fd;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--focus);
  background: #eef3ff;
  box-shadow: 0 0 0 2px rgba(108, 130, 176, 0.18);
}

.dropzone-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.dropzone-title span {
  color: #1f4f99;
  text-decoration: underline;
}

.dropzone-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.attachments-preview {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
}

.attachment-preview-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2fa;
  border: 1px solid #d9e0ee;
  flex-shrink: 0;
}

.attachment-preview-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eef2fa;
  border: 1px solid #d9e0ee;
  color: #41557d;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}

.attachment-preview-meta {
  min-width: 0;
  flex: 1;
}

.attachment-preview-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.attachment-preview-size {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.attachment-preview-remove {
  border: 1px solid #d5dae6;
  background: #fff;
  color: #51617f;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
}

.attachment-preview-remove:hover {
  border-color: var(--focus);
  color: var(--focus);
}

.privacy {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f8fc;
  padding: 12px;
}

.privacy-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.consent input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0b8a69;
}

.consent a {
  color: #1f4f99;
}

.captcha-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.captcha-note a {
  color: #1f4f99;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.submit {
  border: none;
  border-radius: 10px;
  background: var(--button);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 11px 28px;
  cursor: pointer;
}

.submit:hover:not(:disabled) {
  background: var(--button-hover);
}

.submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 12px 16px 24px;
}

@media (max-width: 760px) {
  .header h1 {
    font-size: 36px;
  }

  .actions {
    justify-content: stretch;
  }

  .submit {
    width: 100%;
  }
}
