@charset "UTF-8";
:root {
  --ink: #18343f;
  --muted: #77838b;
  --line: #e3e7e8;
  --paper: #fff;
  --bg: #f3f5f4;
  --teal: #23645c;
  --teal-soft: #eaf4ef;
  --amber: #936b27;
  --amber-soft: #fcf4e5;
  --red: #a4645a;
  --red-soft: #f8eeeb;
  --navy: #173d4b;
  --shadow: 0 12px 40px #203b4610;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #9bc5b9;
  outline-offset: 2px;
}
input:focus { outline: 0; }
[hidden] { display: none !important; }

.gate-topbar {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .3px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  height: 42px;
  width: 46px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 19px;
  letter-spacing: -1px;
}
.brand-mark > span { font-size: 13px; align-self: flex-start; margin-top: 6px; }
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.4px;
  font-weight: 500;
  margin-top: 5px;
  color: #859197;
}
.internal {
  font-size: 12px;
  color: #53686c;
  display: flex;
  align-items: center;
  gap: 7px;
}
.internal > span { height: 5px; width: 5px; border-radius: 100%; background: #5e9a7f; }

.gate-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 42px 22px 56px;
}
.card {
  width: min(430px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  padding: 34px 32px 28px;
}
.kicker {
  font-size: 10px;
  font-weight: 600;
  color: #7f9297;
  letter-spacing: 1.8px;
}
.card h1 {
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -.7px;
  font-weight: 600;
  margin: 13px 0 8px;
}
.card .lead {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 24px;
}
.field { margin-bottom: 17px; }
.field > label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field > label span { font-size: 10px; color: #a0aaad; font-weight: 400; }
.input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce2e3;
  border-radius: 7px;
  height: 45px;
  padding: 0 11px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: #5d8e85; box-shadow: 0 0 0 3px #477c6d0d; }
.input input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}
.input input::placeholder { color: #a3adb1; }
.code-row { display: flex; gap: 9px; }
.code-row .input { flex: 1; }
.code-row .send {
  height: 45px;
  white-space: nowrap;
  border-radius: 7px;
  border: 1px solid #dce3e3;
  background: #fff;
  color: #4b6971;
  font-size: 11px;
  padding: 0 14px;
}
.code-row .send:hover:not(:disabled) { background: #f8fbf9; border-color: #b4c9c2; }
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 46px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  transition: background .15s;
}
.primary:hover:not(:disabled) { background: #225566; }
.primary > span:last-child { font-size: 21px; font-weight: 300; }
.retry-login { justify-content: center; }

.status {
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.75;
  padding: 10px 12px;
  margin: 0 0 15px;
  border: 1px solid transparent;
}
.status.info { background: #f4f7f6; color: #5c777f; border-color: #e6ecea; }
.status.ok { background: var(--teal-soft); color: var(--teal); border-color: #d6e8de; }
.status.warn { background: var(--amber-soft); color: var(--amber); border-color: #eddfc5; }
.status.error { background: var(--red-soft); color: var(--red); border-color: #efdcd6; }

.account {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #7a8e94;
}
.account strong { color: #3e616a; font-weight: 600; }
.ghost {
  background: transparent;
  color: #8a7770;
  font-size: 11px;
  padding: 4px 0;
}
.ghost:hover { text-decoration: underline; }

.card .fineprint {
  margin: 20px 0 0;
  font-size: 10px;
  line-height: 1.85;
  color: #9aa4a8;
}
.gate-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 48px 20px;
  font-size: 9px;
  color: #a2acb0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* admin table */
.panel {
  width: min(1040px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  padding: 28px 30px 24px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.panel-head h1 { font-size: 21px; margin: 6px 0 6px; letter-spacing: -.4px; }
.panel-head p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.8; }
.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) 1fr 1fr minmax(120px, 1.4fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 16px;
  background: #fbfcfb;
}
.inline-form input, .inline-form select {
  height: 38px;
  border: 1px solid #dce2e3;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.inline-form button {
  height: 38px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  padding: 0 16px;
  white-space: nowrap;
}
.inline-form button:hover { background: #225566; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid #eef1f0; vertical-align: middle; }
th { font-size: 10px; color: #8a999e; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
td.email { font-weight: 550; word-break: break-all; }
td select {
  height: 32px;
  border: 1px solid #dce2e3;
  border-radius: 5px;
  font-size: 11px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
}
.pill { font-size: 10px; padding: 3px 7px; border-radius: 4px; }
.pill.active { background: var(--teal-soft); color: var(--teal); }
.pill.pending { background: var(--amber-soft); color: var(--amber); }
.pill.disabled { background: var(--red-soft); color: var(--red); }
.row-actions { display: flex; gap: 8px; }
.row-actions button {
  background: #f8faf9;
  border: 1px solid #e5eae7;
  border-radius: 5px;
  color: #6b8087;
  font-size: 10px;
  padding: 5px 9px;
}
.row-actions button:hover { border-color: #b4c9c2; color: var(--teal); }
.empty { padding: 34px 8px; text-align: center; color: #96a0a5; font-size: 11px; }

@media (max-width: 760px) {
  .gate-topbar { height: 70px; padding: 0 18px; }
  .internal { display: none; }
  .card { padding: 26px 22px 22px; }
  .gate-main { padding: 26px 14px 40px; }
  .gate-footer { padding: 14px 18px; flex-direction: column; gap: 6px; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .panel { padding: 22px 18px; }
  table { font-size: 11px; }
}
