:root {
  --text: #f5fbff;
  --ink: #1e4767;
  --ink-soft: rgba(30, 71, 103, 0.72);
  --line: rgba(235, 246, 255, 0.54);
  --line-soft: rgba(112, 165, 205, 0.2);
  --glass: rgba(220, 238, 253, 0.72);
  --glass-strong: rgba(236, 246, 255, 0.9);
  --glass-soft: rgba(255, 255, 255, 0.28);
  --button: #4b89bd;
  --button-strong: #2f6f9f;
  --danger: #ba5b70;
  --shadow: 0 28px 72px rgba(8, 29, 49, 0.26);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0b2437;
  font-family: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  overflow-x: hidden;
}

.page-shell {
  min-height: 100vh;
  padding:
    calc(env(safe-area-inset-top, 0px) + 16px)
    18px
    calc(env(safe-area-inset-bottom, 0px) + 18px);
  background:
    linear-gradient(180deg, rgba(8, 24, 39, 0.08), rgba(8, 24, 39, 0.42)),
    url("../images/employee-bg.png") center center / cover no-repeat;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(237, 247, 255, 0.3), transparent 18%),
    radial-gradient(circle at 82% 15%, rgba(176, 214, 242, 0.24), transparent 22%),
    linear-gradient(180deg, rgba(8, 24, 39, 0.08), rgba(8, 24, 39, 0.34));
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 34px);
  margin: 0 auto;
}

.view-panel {
  width: 100%;
}

.view-panel-active {
  display: block;
}

.view-panel-hidden {
  display: none;
}

.view-panel-query {
  min-height: inherit;
}

.query-wrap {
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.query-card {
  position: relative;
  width: min(100%, 392px);
  padding: 30px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(241, 248, 255, 0.92), rgba(207, 229, 249, 0.76));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.query-card::before,
.query-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.query-card::before {
  width: 160px;
  height: 160px;
  top: -82px;
  right: -34px;
}

.query-card::after {
  width: 140px;
  height: 140px;
  left: -52px;
  bottom: -68px;
  background: radial-gradient(circle, rgba(133, 185, 227, 0.28), rgba(133, 185, 227, 0));
}

.query-head,
.query-form,
.form-message {
  position: relative;
  z-index: 1;
}

.query-head {
  margin-bottom: 18px;
  text-align: center;
  color: var(--ink);
}

.query-kicker {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.query-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.14;
  letter-spacing: 0.02em;
}

.query-tip {
  max-width: 250px;
  margin: 12px auto 0;
  color: rgba(30, 71, 103, 0.8);
  font-size: 13px;
  line-height: 1.75;
}

.query-form {
  display: grid;
  gap: 12px;
}

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

.field-label {
  color: rgba(30, 71, 103, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(90, 140, 177, 0.16);
  border-radius: var(--radius-md);
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  color: #163651;
  font-size: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.field input::placeholder {
  color: rgba(74, 113, 144, 0.66);
}

.field input:focus {
  border-color: rgba(75, 137, 189, 0.5);
  box-shadow: 0 0 0 4px rgba(115, 176, 225, 0.18);
  transform: translateY(-1px);
}

.primary-button {
  height: 54px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #79aed9 0%, #4f8bc0 56%, #2f6f9f 100%);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 16px 30px rgba(42, 87, 122, 0.24);
  cursor: pointer;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.primary-button:active {
  transform: translateY(1px) scale(0.996);
}

.primary-button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.form-message {
  min-height: 22px;
  margin: 12px 2px 0;
  color: rgba(30, 71, 103, 0.82);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-success {
  color: #2d6c55;
}

.view-panel-result {
  min-height: inherit;
}

.result-shell {
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.loading-state,
.result-card {
  width: min(100%, 470px);
}

.loading-state {
  min-height: 240px;
  padding: 28px 24px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.loading-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(75, 137, 189, 0.16);
  border-top-color: rgba(47, 111, 159, 0.96);
  animation: spin 0.82s linear infinite;
}

.result-card {
  animation: rise-in 0.38s ease;
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.result-card::-webkit-scrollbar {
  display: none;
}

.result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ghost-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.toolbar-caption {
  color: rgba(245, 251, 255, 0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.medical-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(239, 248, 255, 0.92), rgba(203, 227, 248, 0.74));
  backdrop-filter: blur(18px);
}

.medical-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.header-pill,
.region-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.44);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.region-pill-inline {
  flex: 0 0 auto;
}

.identity-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(193, 223, 246, 0.38)),
    rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.identity-kicker,
.band-kicker {
  margin: 0 0 8px;
  color: rgba(30, 71, 103, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.identity-main h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.14;
}

.identity-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.identity-subtitle {
  margin: 8px 0 0;
  color: rgba(30, 71, 103, 0.76);
  font-size: 13px;
  line-height: 1.75;
}

.contact-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.chip-label {
  color: rgba(30, 71, 103, 0.7);
  font-size: 12px;
}

.contact-chip strong {
  font-size: 18px;
  line-height: 1.5;
  word-break: break-word;
}

.band-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.band-card-soft {
  background: rgba(246, 251, 255, 0.28);
}

.band-card-timeline {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(220, 238, 253, 0.26));
}

.band-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.band-list-compact {
  grid-template-columns: 1fr;
}

.band-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.band-item-wide {
  grid-column: 1 / -1;
}

.band-item span {
  display: block;
  color: rgba(30, 71, 103, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.band-item strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  word-break: break-word;
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
}

.timeline-item + .timeline-item {
  border-top: 1px solid rgba(255, 255, 255, 0.26);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9fd0f2, #4b89bd);
  box-shadow: 0 0 0 6px rgba(150, 196, 232, 0.16);
}

.timeline-item p {
  margin: 0;
  color: rgba(30, 71, 103, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.timeline-item strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 640px) {
  .page {
    max-width: 600px;
  }

  .query-card {
    width: min(100%, 404px);
    padding: 34px 24px 24px;
  }

  .query-head h1 {
    font-size: 32px;
  }
}
