* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #eef3fb 0%, #f8fafc 45%, #edf2f7 100%);
  color: #1a202c;
  min-height: 100vh;
  line-height: 1.6;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e3a5f;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.header-brand .internal-banner {
  margin-bottom: 0;
}

.internal-banner {
  color: #e53e3e;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-logout {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
  background: #fff5f5;
  border-color: #feb2b2;
  color: #c53030;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 8px;
}

.login-brand .internal-banner {
  margin-bottom: 0;
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
}

.login-form {
  margin-top: 0;
}

.login-error {
  margin-top: 0;
  margin-bottom: 8px;
}

.login-btn {
  width: 100%;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #e6a800;
  color: #856404;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
  padding: 28px;
  margin-top: 24px;
}

.form-row {
  margin-bottom: 22px;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d3748;
}

select,
input[type="file"] {
  width: 100%;
}

select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 12px 36px 12px 14px;
  font-size: 1rem;
  color: #2d3748;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"] {
  width: 100%;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  color: #2d3748;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"]:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

select:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.upload-area {
  position: relative;
  border: 2px dashed #cbd5e0;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #3182ce;
  background: #ebf8ff;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder svg {
  color: #718096;
  margin-bottom: 8px;
}

.upload-placeholder p {
  color: #4a5568;
  margin-bottom: 6px;
}

.file-name {
  display: inline-block;
  font-size: 0.875rem;
  color: #3182ce;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #2b6cb0;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #2c5282;
}

.btn-secondary {
  background: #edf2f7;
  color: #2d3748;
  border: 1px solid #cbd5e0;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.result {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.result.hidden {
  display: none;
}

.result.success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #22543d;
}

.result.error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #742a2a;
}

.result.loading {
  background: #ebf8ff;
  border: 1px solid #90cdf4;
  color: #2a4365;
}

.result .field-list {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.875rem;
  color: #276749;
}

.footer {
  margin-top: 28px;
  text-align: center;
  color: #718096;
  font-size: 0.875rem;
}

.footer p + p {
  margin-top: 4px;
}

@media (max-width: 480px) {
  .header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-logout {
    align-self: flex-end;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
