:root {
  color-scheme: light;
  --primary: #1f6feb;
  --primary-dark: #1858b8;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #d0d7de;
  --success: #1a7f37;
  --success-bg: #ecfdf3;
  --error: #cf222e;
  --error-bg: #fff5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 16px 56px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% -20%, #e5efff, var(--bg) 55%);
}

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(31, 54, 110, 0.12);
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 22px;
  background: #eef2f8;
  border-radius: 10px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  background: var(--card);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

h1 {
  margin: 0 0 22px;
  font-size: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="date"],
select,
input[type="file"] {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

input[type="file"] {
  padding: 7px;
  background: #fafbfc;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.18);
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.submit-btn {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.progress {
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
  background: #e8eef7;
  border-radius: 999px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #49a1ff);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.message {
  margin: 18px 0 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.message:empty {
  display: none;
}

.message.is-success {
  color: var(--success);
  background: var(--success-bg);
}

.message.is-error {
  color: var(--error);
  background: var(--error-bg);
}

.message a {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  body {
    padding: 16px 12px 40px;
  }

  .container {
    padding: 22px 18px;
  }
}
