/* ============================================================
   企航智联 · 设计基础
   ============================================================ */

:root {
  --brand-950: #081c33;
  --brand-900: #0c2340;
  --brand-800: #10305c;
  --brand-700: #143c77;
  --brand-600: #1b4b94;
  --brand-500: #2a5fbf;
  --brand-100: #e8eefb;
  --brand-50: #f2f6fd;

  --accent: #2f5be0;
  --accent-dark: #2449bc;

  --wa: #25d366;
  --wa-dark: #1da851;
  --wa-soft: #e7f8ee;

  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --bg: #f6f8fc;
  --card: #ffffff;

  --danger: #e5484d;
  --warn: #d97706;
  --ok: #12a150;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 50px rgba(12, 35, 64, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

/* ------------------------------- 按钮 ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #3a67ec 0%, #2f5be0 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 91, 224, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #305bdc 0%, #2549c2 100%);
}

.btn-primary:disabled {
  background: #b7c4e8;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: #cfd8ea;
  background: #fbfcfe;
}

.btn-wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.28);
}

.btn-wa:hover {
  background: var(--wa-dark);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 46px;
  padding: 0 26px;
  font-size: 15px;
  border-radius: 12px;
}

/* ------------------------------- 表单 ------------------------------- */

.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.field-label .optional {
  font-weight: 400;
  color: var(--muted-2);
  margin-left: 4px;
}

.field-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder {
  color: #a9b4c6;
}

.input:focus {
  background: #fff;
  border-color: #9fb8ec;
  box-shadow: 0 0 0 3px rgba(47, 91, 224, 0.1);
}

textarea.input {
  height: auto;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.5;
}

.field-row {
  display: flex;
  gap: 10px;
}

/* ------------------------------- 杂项 ------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2f5be0, #143c77);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(20, 60, 119, 0.28);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--brand-50);
  color: var(--brand-700);
}

.badge-ok {
  background: var(--wa-soft);
  color: var(--wa-dark);
}

.badge-warn {
  background: #fef6e7;
  color: var(--warn);
}

.badge-muted {
  background: #f1f4f9;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%) translateY(-12px);
  background: #0f172a;
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 999;
  max-width: 88vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: #b3261e;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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