:root {
  --bg-deep: #091326;
  --bg-mid: #10264d;
  --brand-blue: #1d7ff2;
  --brand-cyan: #67d7ff;
  --brand-soft: #eaf4ff;
  --panel-white: rgba(255, 255, 255, 0.9);
  --line-soft: rgba(255, 255, 255, 0.18);
  --text-main: #0d183a;
  --text-soft: #5d6c87;
  --shadow-strong: 0 26px 80px rgba(6, 20, 44, 0.38);
  --shadow-soft: 0 16px 40px rgba(12, 43, 86, 0.14);
  --font-ui: "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text-main);
}

.portal-body,
.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(103, 215, 255, 0.22), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(29, 127, 242, 0.28), transparent 26%),
    linear-gradient(135deg, #081224 0%, #0d1b34 48%, #10264d 100%);
  position: relative;
  overflow: hidden;
}

.dashboard-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(103, 215, 255, 0.18), transparent 24%),
    linear-gradient(160deg, #071223 0%, #0a1830 34%, #102751 100%);
}

.portal-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.portal-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 78%);
}

.portal-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.72;
  animation: floatOrb 12s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: rgba(65, 171, 255, 0.18);
  top: -90px;
  left: -70px;
}

.orb-b {
  width: 280px;
  height: 280px;
  background: rgba(38, 104, 233, 0.24);
  right: 10%;
  top: 8%;
  animation-delay: -3s;
}

.orb-c {
  width: 420px;
  height: 420px;
  background: rgba(74, 235, 255, 0.14);
  right: -100px;
  bottom: -120px;
  animation-delay: -6s;
}

.portal-shell {
  min-height: 100vh;
  padding: 48px 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-stage {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  min-height: 680px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.stage-brand {
  position: relative;
  padding: 52px 48px 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(103, 215, 255, 0.24), rgba(29, 127, 242, 0.08)),
    linear-gradient(145deg, #0d4cbf 0%, #0d61d9 46%, #1f8ee9 100%);
}

.stage-brand::before,
.stage-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage-brand::before {
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, 0.24), transparent 18%),
    radial-gradient(circle at 72% 74%, rgba(255, 255, 255, 0.18), transparent 22%);
  mix-blend-mode: screen;
}

.stage-brand::after {
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 12px),
    linear-gradient(135deg, transparent 0 44%, rgba(255, 255, 255, 0.16) 44% 45%, transparent 45% 100%);
  opacity: 0.28;
}

.brand-topline,
.panel-eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}

.brand-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(8, 17, 41, 0.18);
}

.stage-brand h1 {
  margin: 16px 0 8px;
  font-size: 46px;
  line-height: 1.12;
}

.stage-brand > p {
  margin: 0;
  max-width: 440px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.brand-copy {
  display: grid;
  gap: 14px;
}

.feature-card {
  position: relative;
  z-index: 1;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(10, 27, 62, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.feature-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.feature-card span,
.field-note,
.steps-list,
.qr-copy p,
.portal-footer span,
.aside-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.feature-card span {
  color: rgba(255, 255, 255, 0.82);
}

.glass-panel,
.login-panel,
.admin-shell,
.content-card,
.stat-card,
.aside-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.9));
  backdrop-filter: blur(18px);
}

.login-panel {
  padding: 44px 42px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.panel-head.compact {
  margin-bottom: 24px;
}

.panel-head .panel-eyebrow {
  color: #5a7fb7;
}

.panel-head h2,
.card-head h2 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.2;
  color: var(--text-main);
}

.account-badge,
.role-pill,
.table-badge,
.tip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.account-badge,
.tip-chip {
  background: rgba(29, 127, 242, 0.1);
  color: #135ec5;
}

.login-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  width: fit-content;
  padding: 6px;
  border-radius: 999px;
  background: #eff5ff;
  gap: 8px;
  margin-bottom: 26px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: #6880aa;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.tab-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1769df, #2f94ff);
  box-shadow: 0 10px 24px rgba(24, 112, 231, 0.22);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.login-form {
  display: grid;
  gap: 18px;
}

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

.field span {
  font-size: 14px;
  font-weight: 700;
  color: #27426f;
}

.field input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(19, 94, 197, 0.14);
  border-radius: 18px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  background: #f8fbff;
  outline: none;
  transition: 180ms ease;
}

.field input:focus {
  border-color: rgba(29, 127, 242, 0.5);
  box-shadow: 0 0 0 4px rgba(29, 127, 242, 0.12);
  background: #fff;
}

.inline-tip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

.text-link {
  color: #1c73e3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.topbar-user {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.primary-action,
.secondary-action,
.footer-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 18px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-action {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #115fd4, #35a0ff);
  box-shadow: 0 16px 34px rgba(24, 112, 231, 0.26);
}

.secondary-action,
.footer-admin-btn {
  color: #1769df;
  background: rgba(29, 127, 242, 0.1);
  border: 1px solid rgba(29, 127, 242, 0.16);
}

.primary-action:hover,
.secondary-action:hover,
.footer-admin-btn:hover,
.tab-btn:hover {
  transform: translateY(-1px);
}

.qr-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
}

.qr-card {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: var(--shadow-soft);
}

.qr-image,
.mini-qr {
  display: block;
  width: 100%;
  border-radius: 24px;
}

.qr-copy h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.steps-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.steps-list li + li {
  margin-top: 6px;
}

.portal-footer {
  margin: 28px auto 0;
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-admin-btn {
  min-width: 208px;
  background: linear-gradient(135deg, rgba(15, 100, 227, 0.9), rgba(72, 184, 255, 0.82));
  color: #fff;
  box-shadow: 0 14px 30px rgba(18, 101, 220, 0.24);
}

.admin-shell {
  width: min(980px, calc(100% - 48px));
  margin: 88px auto;
  min-height: 620px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
}

.admin-side {
  padding: 44px 38px;
  background:
    linear-gradient(180deg, rgba(103, 215, 255, 0.18), rgba(21, 68, 164, 0.06)),
    linear-gradient(160deg, #0b2144 0%, #0f3473 48%, #1769df 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-side h1 {
  margin: 10px 0 12px;
  font-size: 40px;
  line-height: 1.16;
}

.admin-side p {
  margin: 0;
  max-width: 320px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.84);
}

.admin-tags {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
}

.admin-panel {
  padding: 42px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.dashboard-aside {
  background: linear-gradient(180deg, rgba(8, 17, 40, 0.98), rgba(10, 28, 58, 0.96));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6e3ff;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.aside-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.aside-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.aside-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
  color: #c6d8ff;
  background: transparent;
  border: 1px solid transparent;
}

.nav-item.is-active,
.nav-item:hover {
  background: rgba(34, 116, 227, 0.18);
  border-color: rgba(103, 215, 255, 0.18);
}

.aside-card {
  padding: 18px 16px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.dashboard-main {
  padding: 28px 28px 36px;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-topbar h1 {
  margin: 8px 0 0;
  font-size: 34px;
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-pill {
  color: #fff;
  background: linear-gradient(135deg, #1b73e4, #41c6ff);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 20px 20px 18px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.stat-card span,
.card-head .panel-eyebrow {
  color: #7390bd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.stat-card em {
  color: var(--text-soft);
  font-size: 13px;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.content-card {
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.admin-panel-section {
  display: none;
}

.admin-panel-section.is-active {
  display: block;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table-wrap .employee-table {
  min-width: 860px;
}

.compact-card {
  padding: 20px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.employee-table {
  width: 100%;
  border-collapse: collapse;
}

.employee-table th,
.employee-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(19, 94, 197, 0.08);
  font-size: 14px;
  vertical-align: middle;
}

.employee-table th {
  color: #6b85b0;
  font-weight: 700;
}

.table-badge.active {
  color: #0a7c5b;
  background: rgba(36, 194, 141, 0.12);
}

.table-badge.pending {
  color: #c48214;
  background: rgba(255, 188, 63, 0.14);
}

.table-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(29, 127, 242, 0.18);
  background: rgba(29, 127, 242, 0.08);
  color: #1769df;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.table-action-btn + .table-action-btn {
  margin-left: 8px;
}

.sidebar-stack {
  display: grid;
  gap: 18px;
}

.bind-panel {
  display: grid;
  gap: 14px;
}

.mini-qr {
  width: 160px;
}

.employee-form {
  display: grid;
  gap: 14px;
}

.select-field {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(19, 94, 197, 0.14);
  border-radius: 18px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  background: #f8fbff;
  outline: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(7, 18, 39, 0.92);
  color: #fff;
  box-shadow: var(--shadow-strong);
  z-index: 40;
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -18px, 0); }
}

@media (max-width: 1120px) {
  .login-stage,
  .admin-shell,
  .dashboard-shell,
  .dashboard-grid,
  .stats-grid,
  .qr-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-aside {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dashboard-topbar,
  .actions-row,
  .card-head,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    padding: 24px 16px 20px;
  }

  .login-stage,
  .admin-shell {
    min-height: auto;
  }

  .stage-brand,
  .login-panel,
  .admin-side,
  .admin-panel {
    padding: 28px 22px;
  }

  .stage-brand h1,
  .admin-side h1 {
    font-size: 34px;
  }

  .panel-head h2,
  .card-head h2 {
    font-size: 24px;
  }

  .field input,
  .primary-action,
  .secondary-action {
    min-height: 48px;
  }

  .dashboard-main {
    padding: 20px 16px 28px;
  }

  .employee-table {
    display: block;
    overflow-x: auto;
  }
}
