:root {
  --ink: #122b35;
  --muted: #61757d;
  --cyan: #08aeca;
  --cyan-deep: #087f98;
  --line: rgba(13, 166, 195, 0.36);
  --glass: rgba(249, 254, 255, 0.76);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #edf9fb;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.portal-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 82% 16%, rgba(22, 196, 217, 0.27), transparent 29%),
    linear-gradient(118deg, #fbfcfc 0%, #f3fbfc 52%, #d9f3f5 100%);
}

.portal-background,
.background-veil,
.technical-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portal-background {
  z-index: -4;
}

.portal-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.015);
}

.background-veil {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(250, 252, 252, 0.98) 0%, rgba(250, 253, 253, 0.93) 42%, rgba(245, 252, 253, 0.73) 66%, rgba(220, 247, 249, 0.2) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 56%, rgba(224, 247, 249, 0.82) 100%);
}

.technical-grid {
  z-index: -2;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(9, 125, 148, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 125, 148, 0.075) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.portal-layout {
  width: min(100%, 1780px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(38px, 6.3vh, 74px) clamp(28px, 5.7vw, 104px) clamp(82px, 9.2vh, 104px);
  display: flex;
  flex-direction: column;
}

.portal-header {
  position: relative;
  width: fit-content;
  max-width: 1050px;
}

.portal-header h1 {
  margin: 0;
  color: #122832;
  font-size: clamp(24px, 2.17vw, 40px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-shadow: 0 3px 15px rgba(9, 74, 87, 0.08);
}

.accent-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: clamp(18px, 2.7vh, 28px);
}

.accent-rule span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #02b5ce, #11c7d7);
  box-shadow: 0 0 18px rgba(5, 180, 207, 0.35);
}

.accent-rule span:nth-child(1) {
  width: 48px;
}

.accent-rule span:nth-child(2) {
  width: 25px;
  opacity: 0.82;
}

.accent-rule span:nth-child(3) {
  width: 16px;
  opacity: 0.55;
}

.brand-signature {
  margin: clamp(17px, 2.3vh, 24px) 0 0;
  color: #29434d;
  font-size: clamp(18px, 1.45vw, 28px);
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.3;
}

.portal-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.45vw, 26px);
  margin-top: clamp(32px, 5vh, 58px);
}

.portal-card {
  position: relative;
  min-width: 0;
  height: clamp(330px, 39vh, 430px);
  padding: clamp(27px, 2.25vw, 40px) clamp(18px, 1.65vw, 30px) clamp(25px, 2.2vw, 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.87), rgba(228, 249, 251, 0.68)),
    var(--glass);
  box-shadow:
    0 24px 55px rgba(23, 98, 111, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.88) inset,
    0 -1px 0 rgba(6, 181, 207, 0.15) inset;
  backdrop-filter: blur(15px) saturate(1.15);
  -webkit-backdrop-filter: blur(15px) saturate(1.15);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 280ms ease, box-shadow 360ms ease, background 280ms ease;
}

.portal-card::after {
  content: "";
  position: absolute;
  right: -45%;
  bottom: -72%;
  width: 120%;
  height: 95%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 190, 211, 0.16), transparent 68%);
  transition: transform 420ms ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  z-index: 2;
  transform: translateY(-11px);
  border-color: rgba(5, 180, 207, 0.78);
  outline: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(211, 246, 249, 0.82)),
    var(--glass);
  box-shadow:
    0 33px 68px rgba(7, 111, 132, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 0 33px rgba(7, 187, 211, 0.13);
}

.portal-card:hover::after,
.portal-card:focus-visible::after {
  transform: translate(-12%, -8%) scale(1.1);
}

.card-glint {
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 188, 211, 0.82), transparent);
}

.card-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(7, 121, 145, 0.34);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.card-icon {
  position: relative;
  z-index: 1;
  width: clamp(72px, 5.3vw, 88px);
  height: clamp(72px, 5.3vw, 88px);
  margin-bottom: clamp(21px, 2.5vh, 28px);
  color: #08aeca;
  filter: drop-shadow(0 9px 14px rgba(3, 164, 192, 0.14));
  transition: color 280ms ease, transform 360ms ease, filter 360ms ease;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-icon .icon-dots circle {
  fill: currentColor;
  stroke: none;
}

.portal-card:hover .card-icon,
.portal-card:focus-visible .card-icon {
  color: #007f9d;
  filter: drop-shadow(0 12px 18px rgba(3, 164, 192, 0.25));
  transform: translateY(-3px) scale(1.025);
}

.card-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-copy strong {
  color: #102731;
  font-size: clamp(18px, 1.43vw, 25px);
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.card-english {
  display: flex;
  min-height: 2.65em;
  margin-top: 9px;
  flex-direction: column;
  justify-content: center;
  color: #29434d;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(18px, 1.43vw, 25px);
  font-weight: 610;
  letter-spacing: 0.015em;
  line-height: 1.22;
}

.card-copy small {
  margin-top: clamp(12px, 1.55vh, 17px);
  color: #637a83;
  font-size: clamp(10px, 0.76vw, 13px);
  line-height: 1.45;
  white-space: nowrap;
}

.card-arrow {
  position: relative;
  z-index: 1;
  width: 42px;
  margin-top: auto;
  color: #08aeca;
  transition: color 280ms ease, transform 360ms ease;
}

.card-arrow svg {
  display: block;
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-card:hover .card-arrow,
.portal-card:focus-visible .card-arrow {
  color: #007f9d;
  transform: translateX(5px);
}

.is-pending {
  cursor: default;
}

.is-pending:hover {
  transform: none;
}

.pending-label {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  padding: 3px 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: #55767e;
  background: rgba(238, 250, 251, 0.82);
  font-size: 9px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 240ms ease;
}

.is-pending:hover .pending-label {
  opacity: 1;
}

.is-pending .pending-label {
  opacity: 1;
}

.is-pending .card-arrow {
  opacity: 0.32;
}

.portal-footer {
  position: absolute;
  right: clamp(28px, 5.7vw, 104px);
  bottom: clamp(24px, 3.2vh, 38px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.filing-number {
  color: #506b75;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.055em;
  text-decoration: none;
  transition: color 220ms ease;
}

.filing-number:hover,
.filing-number:focus-visible {
  color: #007f9d;
  outline: none;
}

.admin-entry {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(7, 139, 164, 0.28);
  border-radius: 12px;
  color: #1e5967;
  background: rgba(248, 254, 255, 0.78);
  box-shadow: 0 8px 24px rgba(15, 99, 115, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color 220ms ease, border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.admin-entry svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-entry:hover,
.admin-entry:focus-visible {
  color: #007f9d;
  border-color: rgba(5, 169, 198, 0.58);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 119, 139, 0.16);
}

@media (max-width: 1260px) {
  .portal-shell {
    overflow: auto;
  }

  .portal-background img {
    object-position: 64% center;
  }

  .portal-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-card {
    height: 375px;
  }

  .portal-footer {
    position: static;
    margin-top: 38px;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    background: linear-gradient(145deg, #fbfdfd, #e3f6f8);
  }

  .portal-background {
    position: fixed;
    opacity: 0.38;
  }

  .portal-background img {
    object-position: 72% center;
  }

  .background-veil {
    position: fixed;
    background: linear-gradient(180deg, rgba(250, 253, 253, 0.97), rgba(235, 249, 250, 0.83));
  }

  .technical-grid {
    position: fixed;
    background-size: 52px 52px;
  }

  .portal-layout {
    padding: 34px 20px 30px;
  }

  .portal-header h1 {
    max-width: 12em;
    font-size: clamp(23px, 5.55vw, 30px);
    line-height: 1.12;
  }

  .brand-signature {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .portal-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 15px;
    margin-right: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .portal-cards::-webkit-scrollbar {
    display: none;
  }

  .portal-card {
    width: 100%;
    height: 330px;
    scroll-snap-align: none;
  }

  .card-copy strong,
  .card-english {
    font-size: 22px;
  }

  .card-copy small {
    font-size: 12px;
  }

  .portal-footer {
    margin-top: 14px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-height: 760px) and (min-width: 1261px) {
  .portal-layout {
    padding-top: 30px;
  }

  .portal-header h1 {
    font-size: clamp(23px, 2vw, 32px);
  }

  .brand-signature {
    margin-top: 14px;
    font-size: clamp(17px, 1.25vw, 23px);
  }

  .portal-cards {
    margin-top: 27px;
  }

  .portal-card {
    height: 345px;
    padding-top: 25px;
  }

  .card-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
