:root {
  color-scheme: light;
  --ink: #172539;
  --muted: #566578;
  --subtle: #667487;
  --line: #e1e6ee;
  --paper: #fff;
  --canvas: #f5f7fa;
  --blue: #264bdc;
  --blue-dark: #1936b1;
  --light-blue: #ecf1ff;
  --green: #086c52;
  --amber: #7d510e;
  --red: #ab3143;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6d8aff; outline-offset: 3px; }
:disabled { cursor: not-allowed; opacity: .53; }
p { margin: 0; color: var(--muted); line-height: 1.65; }
h1, h2, h3 { margin: 0; line-height: 1.27; font-weight: 720; }

.topbar { background: white; border-bottom: 1px solid var(--line); }
.top-inner { width: min(1120px, calc(100% - 48px)); margin: auto; min-height: 74px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; gap: 10px; align-items: center; flex-shrink: 0; font-size: 17px; font-weight: 760; letter-spacing: .018em; }
.brand small { display: block; margin-top: 2px; color: var(--subtle); font-size: 10px; font-weight: 580; letter-spacing: .075em; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--blue); position: relative; display: block; box-shadow: 0 3px 8px #264bdc25; }
.brand-mark i { position: absolute; width: 10px; height: 10px; border-radius: 100%; background: #fff; left: 15px; top: 9px; }
.brand-mark i:nth-child(2) { left: 9px; top: 21px; }
.brand-mark i:nth-child(3) { left: 21px; top: 21px; background: #a7bdff; }
nav { min-height: 74px; display: flex; align-items: stretch; gap: 24px; }
.nav-button { border: 0; border-top: 2px solid transparent; border-bottom: 2px solid transparent; padding: 0 1px; color: var(--muted); background: transparent; white-space: nowrap; font-size: 14px; }
.nav-button[aria-current] { border-bottom-color: var(--blue); color: var(--blue-dark); font-weight: 690; }
.nav-button:hover { color: var(--blue-dark); }
.account { margin-left: auto; display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--light-blue); color: var(--blue-dark); font-weight: 720; }

.shell { width: min(1120px, calc(100% - 48px)); margin: 38px auto 70px; }
main[tabindex="-1"]:focus { outline: none; }
.loading { padding: 45px 0; text-align: center; color: var(--muted); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, 1fr); min-height: 446px; margin: min(6vh, 60px) auto; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--paper); }
.login-cover { padding: clamp(32px, 5vw, 65px); display: flex; flex-direction: column; justify-content: center; gap: 19px; background: linear-gradient(152deg, #eef2ff 0%, #e4ebff 65%, #d7e5ff 100%); }
.login-cover h1 { font-size: clamp(38px, 5.3vw, 67px); letter-spacing: -.055em; }
.login-cover p { max-width: 30em; line-height: 1.8; }
.login-form { padding: clamp(27px, 4vw, 55px); display: flex; justify-content: center; flex-direction: column; gap: 16px; }
.login-form h2 { font-size: 26px; }
.login-form .button { align-self: flex-start; }
.login-form .otp-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.login-form .otp-fields .button { min-height: 40px; align-self: end; }
.form-feedback { font-size: 13px; }

.hero { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(200px, 1fr); min-height: 230px; background: #152341; border-radius: 19px; align-items: stretch; color: white; }
.hero-copy { padding: 35px 39px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hero-copy h1 { font-size: clamp(27px, 4.5vw, 43px); letter-spacing: -.035em; }
.hero-copy p { color: #d3ddf2; }
.hero-copy .button { align-self: flex-start; margin-top: 3px; }
.hero-art { position: relative; align-self: stretch; min-height: 145px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at 60% 50%, #304f9a 0%, #152341 65%); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; width: 235px; height: 114px; transform: rotate(-24deg); border: 1px solid #6888ed5c; border-radius: 50%; }
.hero-art::after { width: 290px; height: 150px; opacity: .65; }
.art-core { position: relative; z-index: 1; width: 102px; height: 102px; border: 1px solid #9db4ff; border-radius: 28px; transform: rotate(-12deg); background: linear-gradient(145deg, #87a6ff, #3959db); box-shadow: 0 20px 34px #0e183b66; }
.art-core i { position: absolute; border-radius: 50%; width: 19px; height: 19px; top: 21px; left: 41px; background: #eef4ff; }
.art-core i:nth-child(2) { top: 51px; left: 25px; }
.art-core i:nth-child(3) { top: 51px; left: 56px; background: #bbccff; }
.art-star { position: absolute; top: 27%; left: 23%; color: #a6bafa; font-size: 21px; }
.art-star:last-child { top: 66%; left: 77%; font-size: 17px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 34px 0 15px; }
.section-heading:first-child { margin-top: 0; }
.section-heading h1 { font-size: clamp(27px, 4.5vw, 36px); letter-spacing: -.035em; }
.section-heading h2 { font-size: 23px; letter-spacing: -.03em; }
.section-heading p { margin-top: 5px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.panel, .card, .empty { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.panel { padding: 21px; }
.card { padding: 21px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h3 { font-size: 19px; overflow-wrap: anywhere; }
.card p { font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.card-footer { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.card-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 16px; font-weight: 720; background: #ebefff; color: #3649bc; flex-shrink: 0; }
.icon-wecom { background: #e4f6ed; color: #0c6d55; }
.icon-dingtalk { background: #e8f1ff; color: #1c52a8; }
.icon-weixin { background: #e8f7e5; color: #216937; }
.empty { padding: 28px 22px; color: var(--muted); text-align: center; }
.employee-list { display: flex; align-items: stretch; gap: 7px; overflow: auto; margin-bottom: 16px; padding: 2px; }
.employee-list button { white-space: nowrap; }
.employee-list [aria-current] { background: var(--light-blue); border-color: #bac8ff; color: var(--blue-dark); }
.employee-panel { display: flex; justify-content: space-between; gap: 15px; }
.employee-panel h2 { font-size: 24px; margin: 4px 0 7px; }
.employee-panel .actions { align-self: center; }
.employee-id { font-size: 12px; color: var(--subtle); display: block; overflow-wrap: anywhere; }
.connection-note { margin: 13px 0 0; font-size: 13px; }
.admin-list { display: grid; gap: 10px; }
.admin-row { padding: 17px 20px; display: grid; grid-template-columns: minmax(155px, 1fr) minmax(160px, .7fr) auto; align-items: center; gap: 14px; }
.admin-row h3 { overflow-wrap: anywhere; }
.admin-row p { font-size: 13px; }
.admin-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.admin-count { color: var(--muted); font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 1px solid transparent; border-radius: 7px; padding: 7px 12px; background: var(--blue); color: white; font-size: 13px; line-height: 1.4; font-weight: 690; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--blue-dark); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button.secondary:hover:not(:disabled) { border-color: #afbef2; background: #f6f8ff; }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover:not(:disabled) { background: var(--canvas); color: var(--ink); }
.button.danger { background: #fff; border-color: #f2cbd2; color: var(--red); }
.button.danger:hover:not(:disabled) { background: #fff2f4; }
.button.light { background: #edf2ff; color: #183788; }
.button.light:hover:not(:disabled) { background: white; }
.status { display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 999px; white-space: nowrap; background: #eef1f6; color: #526074; font-size: 12px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.good { background: #e6f5ee; color: var(--green); }
.status.wait { background: #fff2df; color: var(--amber); }
.status.bad { background: #ffeef0; color: var(--red); }
.error { color: var(--red); font-size: 13px; display: block; line-height: 1.55; overflow-wrap: anywhere; }

label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; color: var(--ink); }
label small { color: var(--muted); font-weight: 430; line-height: 1.55; }
input, textarea, select { width: 100%; color: var(--ink); border: 1px solid #cdd7e3; border-radius: 7px; background: var(--paper); min-height: 40px; padding: 8px 10px; }
input[readonly] { color: var(--muted); background: var(--canvas); }
textarea { resize: vertical; }
.notice { position: fixed; z-index: 5; right: 24px; bottom: 20px; max-width: min(480px, calc(100% - 48px)); border: 1px solid var(--line); border-radius: 10px; padding: 11px 15px; background: white; box-shadow: 0 10px 24px #16264526; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; pointer-events: none; }
.notice[data-error] { color: var(--red); }
dialog { width: min(520px, calc(100% - 26px)); max-height: calc(100dvh - 26px); max-width: none; margin: auto; overflow: auto; color: var(--ink); padding: 0; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 20px 50px #12234745; }
dialog::backdrop { background: #15234180; }
.modal-inner { padding: 23px; display: grid; gap: 16px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 9px; }
.modal-head h2 { font-size: 23px; }
.modal-head p { font-size: 13px; margin-top: 5px; }
.close { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; font-size: 21px; line-height: 1; }
.close:hover { background: var(--canvas); }
.modal-form { display: grid; gap: 12px; }
.modal-form .actions { margin-top: 3px; }
.form-row { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.invite-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.invite-controls .button { min-height: 40px; }
.pair-state { min-height: 48px; display: grid; gap: 7px; }
.pair-state p { font-size: 14px; }
.pair-qr { display: block; margin: 0 auto 5px; max-width: 100%; height: auto; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; }

@media (max-width: 760px) {
  .top-inner, .shell { width: calc(100% - 28px); }
  .top-inner { gap: 17px; flex-wrap: wrap; }
  .account-name { max-width: 75px; }
  .shell { margin-top: 22px; }
  .login-layout { grid-template-columns: 1fr; min-height: 0; margin-top: 25px; }
  .login-cover { gap: 9px; }
  .hero { grid-template-columns: 1fr 145px; }
  .hero-copy { padding: 24px; }
  .hero-art::before { width: 155px; height: 86px; }
  .hero-art::after { width: 181px; height: 110px; }
  .art-core { transform: scale(.71) rotate(-12deg); }
  .admin-row { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-row .admin-count { grid-row: 2; grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .top-inner { padding-top: 10px; gap: 4px; min-height: 58px; align-items: start; }
  .top-inner nav { order: 3; min-height: 36px; gap: 20px; flex: 1 1 100%; }
  .account { align-self: start; }
  .brand { font-size: 15px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
  .brand-mark i { transform: scale(.82); left: 12px; top: 6px; }
  .brand-mark i:nth-child(2) { left: 7px; top: 16px; }
  .brand-mark i:nth-child(3) { left: 17px; top: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .section-heading, .employee-panel { align-items: stretch; flex-direction: column; }
  .employee-panel .actions { align-self: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .login-form input { font-size: 16px; }
}
