:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --ink: #25273a;
  --muted: #7c8498;
  --surface: #ffffff;
  --line: #e6e8ef;
  --purple: #6657e8;
  --purple-dark: #3b2152;
  --orange: #ed8a19;
  --yellow: #ffd84b;
  --shadow: 0 24px 70px rgba(35, 39, 73, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(102, 87, 232, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 90%, rgba(255, 184, 45, 0.16), transparent 28rem),
    #f4f6fa;
  color: var(--ink);
}

button,
a,
input {
  font: inherit;
}

.portal-account {
  position: fixed;
  z-index: 2;
  top: 28px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.portal-account button {
  padding: 8px 14px;
  border: 1px solid #d9dce7;
  border-radius: 999px;
  background: transparent;
  background: rgba(255, 255, 255, 0.7);
  color: #5f667b;
  cursor: pointer;
}

.portal-account button:hover,
.portal-account button:focus-visible {
  border-color: var(--purple);
  color: var(--purple);
  outline: none;
}

.portal-shell {
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(150px, 16.3vh, 250px) 24px 72px;
  text-align: center;
}

.portal-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 2.8vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.portal-heading p {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(22px, 1.55vw, 30px);
  line-height: 1.45;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, 255px);
  justify-content: center;
  gap: 64px;
  margin-top: clamp(92px, 8.7vh, 134px);
}

.system-grid.single-system {
  grid-template-columns: 255px;
}

.system-card {
  display: flex;
  width: 255px;
  min-height: 255px;
  padding: 47px 24px 37px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.system-card:hover,
.system-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(102, 87, 232, 0.55);
  box-shadow: 0 30px 80px rgba(35, 39, 73, 0.18);
  outline: none;
}

.system-icon {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 22px;
}

.system-card.orders .system-icon {
  background: linear-gradient(145deg, #7568f0, #5849d9);
  box-shadow: 0 12px 28px rgba(102, 87, 232, 0.28);
}

.system-card.attendance .system-icon {
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  box-shadow: 0 12px 28px rgba(237, 138, 25, 0.25);
}

.system-icon img {
  width: 47px;
  height: 47px;
  filter: brightness(0) invert(1);
}

.system-card strong {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.portal-hint {
  margin: 56px 0 0;
  color: var(--muted);
  font-size: 21px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px 24px;
}

.login-shell {
  display: grid;
  width: min(940px, 100%);
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid #e1e3ec;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(35, 39, 73, 0.15);
}

.login-brand,
.login-card {
  padding: 58px;
}

.login-brand {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(239, 91, 158, 0.24), transparent 16rem),
    linear-gradient(145deg, #211b43, #3b2152);
}

.login-brand .eyebrow {
  color: #ff76b4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-brand h1 {
  margin: 18px 0 12px;
  color: #ffffff;
  font-size: 40px;
  line-height: 1.2;
}

.login-brand p,
.login-card p {
  margin: 0;
  line-height: 1.8;
}

.login-brand p {
  color: #d8d0ed;
}

.login-card p {
  color: var(--muted);
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.login-card h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: 26px;
}

.login-card label {
  display: grid;
  gap: 9px;
  color: #555c70;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9dce7;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.login-card input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(102, 87, 232, 0.14);
}

.login-card button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--yellow), #ff9e25);
  color: #302b1d;
  box-shadow: 0 12px 28px rgba(237, 138, 25, 0.2);
  font-weight: 800;
  cursor: pointer;
}

.login-card button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-error {
  min-height: 24px;
  color: #ff9b9b !important;
}

@media (max-width: 720px) {
  .portal-account {
    top: 18px;
    right: 18px;
  }

  .portal-shell {
    padding-top: 118px;
  }

  .system-grid {
    grid-template-columns: minmax(0, 255px);
    gap: 28px;
    margin-top: 68px;
  }

  .portal-hint {
    margin-top: 42px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 42px 34px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-card {
    padding: 38px 34px 46px;
  }
}
