:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #172c38;
  background: #f3f6f7;
  --line: #dce5e8;
  --muted: #4f6571;
  --primary: #096962;
  --primary-dark: #07554f;
  --navy: #143d50;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 14px;
  background: #fff;
  color: #173a48;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
button:hover,
a.button:hover {
  background: #f1f6f6;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}
button.quiet {
  background: transparent;
  color: #ecf7f8;
  border-color: #73929e;
}
a.secondary {
  color: var(--primary);
  border-color: #abc9c7;
}
a {
  color: var(--primary-dark);
}
:focus-visible {
  outline: 3px solid #348d88;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.shell {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}
.top {
  background: #12394b;
  color: #fff;
}
.bar {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand,
.identity,
.actions,
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  font-size: 18px;
  font-weight: 750;
  white-space: nowrap;
}
.mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #9de0ce;
  color: #133e41;
  font-size: 18px;
}
.identity {
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.identity button {
  min-height: 31px;
  padding: 4px 10px;
}
.heading,
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.heading {
  padding: 31px 0 20px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.eyebrow {
  color: #426976;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.muted,
small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.heading .muted,
.login .muted {
  margin-top: 7px;
}
.notice {
  padding: 15px 18px;
  margin-bottom: 18px;
  background: #fff8e9;
  border: 1px solid #eadbb4;
  border-left: 4px solid #c18b25;
  border-radius: 8px;
  color: #593e0c;
  font-size: 14px;
  line-height: 1.75;
}
.notice p {
  margin-top: 3px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  margin-bottom: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.login {
  max-width: 405px;
  margin: 12vh auto 24px;
  padding: 26px;
}
.login form {
  margin-top: 18px;
}
.login button {
  width: 100%;
}
form {
  display: grid;
  gap: 12px;
}
form.fields {
  grid-template-columns: 1fr 1fr;
  margin-top: 11px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
}
input,
select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #cbd9de;
  border-radius: 6px;
  background: #fff;
  color: #172c38;
  min-height: 37px;
}
.align-end {
  align-self: end;
}
.upload {
  border: 1px dashed #a1bec2;
  border-radius: 8px;
  background: #f5fafa;
  padding: 12px;
  margin: 12px 0;
  display: grid;
  gap: 7px;
}
.upload input {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 30px;
}
.upload input::file-selector-button {
  font: inherit;
  color: #144c4d;
  border: 1px solid #b3cbcc;
  border-radius: 5px;
  background: white;
  padding: 5px 10px;
  margin-right: 10px;
  cursor: pointer;
}
.error {
  color: #a12829;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
#import-error,
#admin-error {
  margin-bottom: 14px;
}
.section-head {
  align-items: flex-start;
}
.section-head .actions {
  flex-wrap: wrap;
}
.counts {
  min-height: 23px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.table-wrap {
  overflow: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  background: #edf3f5;
  color: #38535e;
  font-weight: 700;
}
td button {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 12px;
}
td.empty {
  color: var(--muted);
  padding: 18px 10px;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  white-space: nowrap;
}
.pill.ok {
  background: #dcf4e5;
  color: #1a643c;
}
.pill.bad {
  background: #fae7e6;
  color: #982a2c;
  border-color: #f0d1d0;
}
.pill.pending {
  background: #fff1d5;
  color: #765111;
  border-color: #efe0bb;
}
.pill.neutral {
  background: #ebf1f3;
  color: #385866;
}
.pagination {
  justify-content: flex-end;
  margin-top: 13px;
  font-size: 13px;
}
.pagination button {
  min-height: 30px;
  padding: 4px 9px;
}
.clean {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}
.clean li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 7px 0;
  overflow-wrap: anywhere;
}
.clean li button {
  min-height: 28px;
  padding: 4px 9px;
}
.org-filter {
  max-width: 320px;
  margin: 18px 0 10px;
}
#history {
  margin-bottom: 28px;
}
dialog {
  width: min(850px, calc(100% - 30px));
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #172c38;
  padding: 22px;
  box-shadow: 0 15px 60px #142d4155;
}
dialog::backdrop {
  background: #132e48aa;
}
dialog p {
  margin: 7px 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.preview-table {
  max-height: 45vh;
  margin-top: 12px;
}
.check {
  display: flex;
  align-items: center;
  margin: 13px 0;
}
.check input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--primary);
}
.right {
  justify-content: flex-end;
  margin-top: 12px;
}
#detail,
#renew {
  max-width: 470px;
}
#detail-content input {
  margin-bottom: 7px;
}
@media (max-width: 760px) {
  .shell {
    width: calc(100% - 26px);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 15px;
  }
  .heading {
    padding-top: 22px;
  }
  .bar {
    min-height: 60px;
  }
  .heading {
    gap: 6px;
  }
  .section-head {
    gap: 8px;
  }
  .identity #identity-name {
    display: none;
  }
}
@media (max-width: 400px) {
  form.fields {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-wrap: wrap;
  }
}

:root {
  color: #15233d;
  background: #f4f6fb;
  --line: #dfe6f1;
  --muted: #52637b;
  --primary: #234ee9;
  --primary-dark: #193cc1;
  --navy: #121f44;
}

.shell {
  width: min(1200px, calc(100% - 52px));
}
.top {
  background: #fff;
  color: #15233d;
  border-bottom: 1px solid #e3e9f2;
}
.bar {
  min-height: 64px;
}
.brand {
  font-size: 17px;
  letter-spacing: 0.015em;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(150deg, #4474ff, #183dc5);
  box-shadow: 0 3px 8px #234ee935;
}
.calendar-icon {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
}
.calendar-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline: 0;
  border-top: 1.5px solid currentColor;
}
.calendar-icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 5px;
  width: 4px;
  height: 5px;
  transform: rotate(45deg);
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
}
.identity {
  gap: 13px;
  color: #344663;
}
#mode {
  background: #e0f5ef;
  color: #086a58;
  border-color: transparent;
}
button.quiet {
  background: #fff;
  color: #33476b;
  border-color: #d9e2ef;
}
button.quiet:hover,
button:hover,
a.button:hover {
  background: #f1f5ff;
}
a.secondary {
  border-color: #bac8f4;
}
:focus-visible {
  outline-color: #3462f3;
}

.login {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  width: min(1120px, 100%);
  max-width: none;
  min-height: min(680px, calc(100svh - 88px));
  margin: max(44px, calc((100svh - 680px) / 2)) auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce4f2;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 66px #213b7320;
}
.login-brand {
  display: flex;
  align-items: flex-start;
  color: #fff;
  background-color: #071336;
  background-image:
    linear-gradient(180deg, #091539 0%, #0a17434d 35%, transparent 63%),
    url("/attendance-cover.webp");
  background-repeat: no-repeat;
  background-position:
    center,
    54% 100%;
  background-size:
    cover,
    auto 93%;
}
.login-brand-copy {
  padding: clamp(28px, 5vw, 68px);
}
.login-brand .mark {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
}
.login-brand .calendar-icon {
  transform: scale(1.22);
}
.login-brand h1 {
  font-size: clamp(30px, 4vw, 51px);
  letter-spacing: 0.018em;
}
.login-brand p {
  color: #c9d8ff;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.65;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 66px);
}
.login-content {
  width: min(360px, 100%);
}
.login-content h2 {
  font-size: 35px;
  letter-spacing: -0.02em;
}
.login form {
  margin-top: 28px;
  gap: 18px;
}
.login input,
.login button {
  min-height: 48px;
}
input::placeholder {
  color: #687990;
}

.heading {
  position: relative;
  align-items: center;
  min-height: 148px;
  margin: 25px 0 16px;
  padding: 25px 30px;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(112deg, #13234b 0%, #1d367f 100%);
  box-shadow: 0 8px 24px #1a317c1c;
}
.heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(52%, 570px);
  background:
    linear-gradient(90deg, #172b5d, #172b5d11 43%, #172b5d10),
    url("/attendance-cover.webp") center 56% / cover;
  mask-image: linear-gradient(90deg, transparent, #000 31%);
  opacity: 0.64;
}
.heading h1 {
  font-size: clamp(29px, 4vw, 39px);
}
.heading .eyebrow {
  color: #bacbff;
}
.heading .muted {
  color: #dce6ff;
}
#expiry {
  align-self: flex-end;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #ffffff50;
  border-radius: 8px;
  background: #0a1844a0;
}
.notice {
  border: 1px solid #f1deb3;
  padding: 0;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #fff7e5;
}
.notice summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  cursor: pointer;
  padding: 11px 15px;
}
.notice summary::after {
  content: "⌄";
  margin-left: -12px;
  color: #584009;
}
.notice summary span {
  margin-left: auto;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.notice[open] summary::after {
  transform: rotate(180deg);
}
.notice p {
  margin: 0;
  padding: 0 15px 12px;
}
.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.card {
  border-radius: 13px;
  box-shadow: 0 3px 11px #23396809;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.card-head h2 {
  margin-bottom: 3px;
}
.feature-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: #e9efff;
  color: #244ee1;
  font-size: 24px;
  font-weight: 700;
}
.feature-icon.mint {
  background: #dff6ef;
  color: #16745e;
}
input,
select {
  min-height: 40px;
  border-color: #d1dced;
  border-radius: 8px;
}
button,
a.button {
  min-height: 39px;
  border-radius: 8px;
  color: #30446a;
}
.upload {
  position: relative;
  place-items: center;
  gap: 5px;
  margin: 0 0 12px;
  min-height: 128px;
  padding: 15px;
  background: #f0f4ff;
  border-color: #8da9f7;
}
.upload:hover,
.upload:focus-within {
  background: #e9f0ff;
  border-color: var(--primary);
}
.upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload .file-label {
  color: #183bba;
  font-size: 14px;
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #dfe8ff;
  color: #2249d8;
  font-size: 25px;
  line-height: 1;
}
.align-end {
  width: 100%;
}
#admin .grid form > .primary,
#admin .grid .actions > .primary {
  width: 100%;
}
#admin .grid .actions {
  flex-wrap: wrap;
}
.section-head h2,
#admin .card > h2 {
  font-size: 19px;
}
.table-wrap {
  border-radius: 8px;
}
th {
  background: #edf2fa;
  color: #405676;
}
tbody tr:nth-child(even) {
  background: #f8faff;
}
tbody tr:hover {
  background: #f1f5ff;
}
dialog {
  border-radius: 15px;
}
.check input {
  accent-color: var(--primary);
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 26px);
  }
  .login {
    grid-template-columns: 1fr;
    margin: 20px auto;
    min-height: 0;
    border-radius: 17px;
  }
  .login-brand {
    min-height: 164px;
    background-image: linear-gradient(90deg, #091539 0%, #091539ed 56%, #09153938 100%), url('/attendance-cover.webp');
    background-position:
      center,
      right 61%;
    background-size:
      cover,
      auto 165%;
  }
  .login-brand-copy {
    padding: 23px;
  }
  .login-brand .mark {
    width: 35px;
    height: 35px;
    margin-bottom: 12px;
  }
  .login-brand h1 {
    font-size: 27px;
  }
  .login-brand p {
    font-size: 13px;
  }
  .login-content h2 {
    font-size: 28px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .heading {
    padding: 20px;
    margin-top: 17px;
  }
  .heading::after {
    width: 74%;
    opacity: 0.45;
  }
  .notice summary span {
    margin-left: 0;
  }
  #history thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #history table,
  #history tbody {
    display: block;
  }
  #records tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 14px;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8faff;
  }
  #records td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #records td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
  }
  #records td.empty,
  #records td[data-label="员工 UserID"] { grid-column: 1 / -1; }
  #records td[data-label="姓名"] { grid-column: 1; grid-row: 1; font-weight: 700; }
  #records td[data-label="提交状态"] { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
}
