:root {
  --primary: #155a96;
  --primary-dark: #0f3b68;
  --primary-deep: #0b2d50;
  --accent: #0e9fbd;
  --accent-soft: #e5f7fb;
  --page-bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --border: #dbe4ee;
  --border-strong: #c8d5e3;
  --text: #172b3e;
  --text-secondary: #53687b;
  --text-muted: #7a8d9f;
  --success: #16835b;
  --success-bg: #e5f6ef;
  --warning: #b56713;
  --warning-bg: #fff3df;
  --danger: #bd4141;
  --danger-bg: #fdeaea;
  --notice: #9a7810;
  --notice-bg: #fff8d9;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(27, 58, 88, 0.08);
  --shadow-lg: 0 22px 55px rgba(20, 50, 78, 0.13);
  --topbar-height: 72px;
  --sidebar-width: 236px;
}

* { box-sizing: border-box; }
html { min-width: 320px; font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--page-bg); }
body { margin: 0; min-height: 100vh; font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

/* 登录页 */
.auth-body { background: var(--page-bg); }
.auth-page { min-height: 100vh; display: flex; flex-direction: column; padding: 32px 28px 20px; }
.login-shell { width: min(1100px, 100%); flex: 1; margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 42px; align-items: stretch; min-height: 620px; max-height: 760px; }
.login-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 58px 60px; color: #fff; background: var(--primary-dark); border-radius: 20px; box-shadow: var(--shadow-lg); }
.login-brand { position: absolute; top: 34px; left: 40px; display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700; color: #dcebf8; }
.login-brand-mark, .app-brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; color: #fff; background: var(--accent); font-size: 18px; font-weight: 800; box-shadow: 0 7px 18px rgba(0, 0, 0, 0.14); }
.login-intro-copy { position: relative; z-index: 1; max-width: 560px; }
.login-kicker { display: inline-flex; margin-bottom: 16px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; color: #aeeaf4; font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.login-intro h1 { margin-bottom: 22px; font-size: clamp(30px, 3vw, 44px); line-height: 1.22; letter-spacing: -.035em; }
.login-intro h2 { margin-bottom: 10px; color: #fff; font-size: 25px; }
.login-description { margin-bottom: 0; color: #c5d7e7; font-size: 17px; }
.feature-list { position: relative; z-index: 1; display: grid; gap: 15px; margin: 42px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.045); }
.feature-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(117,224,239,.38); border-radius: 10px; color: #9be2ed; font-weight: 800; }
.feature-list strong, .feature-list small { display: block; }
.feature-list li > div { min-width: 0; }
.feature-list strong { color: #fff; font-size: 15px; }
.feature-list small { margin-top: 2px; color: #aebfd0; font-size: 12px; }
.intro-geometry i { position: absolute; display: block; border: 1px solid rgba(103,211,231,.14); transform: rotate(20deg); }
.intro-geometry i:nth-child(1) { width: 230px; height: 230px; right: -90px; top: -55px; }
.intro-geometry i:nth-child(2) { width: 150px; height: 150px; right: -45px; top: 15px; }
.intro-geometry i:nth-child(3) { width: 110px; height: 110px; right: 28px; bottom: -62px; }
.login-panel { display: flex; align-items: center; }
.login-card { width: 100%; padding: 38px 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.login-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.login-card-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: #eaf2fa; color: var(--primary); font-weight: 800; }
.login-card h2 { margin-bottom: 3px; font-size: 25px; letter-spacing: -.02em; }
.login-card-head p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.field-label { display: block; margin: 19px 0 7px; color: #294359; font-size: 14px; font-weight: 700; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 50px; padding: 0 52px 0 45px; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s; }
.input-wrap input::placeholder { color: #9aa9b7; }
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,90,150,.12); }
.input-icon { position: absolute; left: 14px; top: 50%; width: 22px; transform: translateY(-50%); color: #70869a; font-size: 13px; font-weight: 700; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); height: 34px; padding: 0 9px; color: var(--primary); background: transparent; border: 0; border-radius: 7px; font-size: 13px; font-weight: 700; }
.password-toggle:hover { background: #edf4fa; }
.remember-option { display: flex; align-items: center; gap: 10px; margin-top: 17px; color: var(--text); cursor: pointer; user-select: none; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.remember-check { position: relative; flex: 0 0 20px; width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; transition: background .18s, border-color .18s, box-shadow .18s; }
.remember-option input:checked + .remember-check { background: var(--primary); border-color: var(--primary); }
.remember-option input:checked + .remember-check::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.remember-option input:focus-visible + .remember-check { box-shadow: 0 0 0 3px rgba(21,90,150,.16); }
.remember-option strong { display: block; font-size: 14px; line-height: 1.3; }
.remember-option small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.login-submit { position: relative; width: 100%; height: 50px; margin-top: 28px; color: #fff; background: var(--primary); border: 0; border-radius: 10px; font-weight: 750; box-shadow: 0 8px 18px rgba(21,90,150,.2); transition: background .18s, transform .12s; }
.login-submit:hover { background: #0f4d83; }
.login-submit:active { transform: translateY(1px); }
.login-submit.loading { color: transparent; pointer-events: none; }
.button-spinner { display: none; position: absolute; left: 50%; top: 50%; width: 19px; height: 19px; margin: -10px 0 0 -10px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-submit.loading .button-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { display: flex; align-items: center; gap: 9px; margin: -8px 0 18px; padding: 11px 13px; color: #9d3131; background: var(--danger-bg); border: 1px solid #f2cccc; border-radius: 9px; font-size: 13px; }
.form-error span { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; color: #fff; background: var(--danger); border-radius: 50%; font-weight: 800; }
.login-security-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 18px 0 0; color: var(--text-muted); font-size: 12px; }
.login-security-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.login-footer { width: min(1100px, 100%); margin: 20px auto 0; display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; }

/* 后台框架 */
.app-body { background: var(--page-bg); overflow-x: hidden; }
.app-shell { min-height: 100vh; }
.app-topbar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; color: #fff; background: var(--primary-dark); box-shadow: 0 2px 14px rgba(12,38,62,.15); }
.app-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-brand-copy strong, .app-brand-copy small { display: block; white-space: nowrap; }
.app-brand-copy strong { font-size: 16px; }
.app-brand-copy small { margin-top: 1px; color: #9fb7cc; font-size: 11px; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.account-chip { display: flex; align-items: center; gap: 9px; }
.account-chip span:last-child { line-height: 1.3; }
.account-chip small, .account-chip strong { display: block; }
.account-chip small { color: #9fb7cc; font-size: 10px; }
.account-chip strong { font-size: 13px; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; color: var(--primary-dark); background: #d7edf4; border-radius: 50%; font-size: 13px; font-weight: 800; }
.logout-button { height: 36px; padding: 0 14px; color: #dbe8f3; background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 13px; }
.logout-button:hover { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.mobile-menu-button { display: none; width: 42px; height: 40px; padding: 9px; background: transparent; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; }
.mobile-menu-button span { display: block; height: 2px; margin: 4px 0; background: #fff; border-radius: 2px; }
.app-layout { min-height: 100vh; padding-top: var(--topbar-height); }
.sidebar { position: fixed; z-index: 20; top: var(--topbar-height); bottom: 0; left: 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 16px 18px; background: var(--surface); border-right: 1px solid var(--border); }
.sidebar-label { margin: 0 12px 10px; color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; color: #41586b; border-radius: 10px; font-weight: 650; }
.sidebar-nav a:hover { background: #f0f5fa; color: var(--primary); }
.sidebar-nav a.active { color: var(--primary); background: #eaf3fb; box-shadow: inset 3px 0 0 var(--primary); }
.nav-icon { display: grid; place-items: center; width: 29px; height: 29px; color: var(--primary); background: #f0f5fa; border: 1px solid #dce7f1; border-radius: 8px; font-size: 12px; font-weight: 800; }
.sidebar-nav a.active .nav-icon { color: #fff; background: var(--primary); border-color: var(--primary); }
.sidebar-security { display: flex; align-items: flex-start; gap: 9px; margin-top: auto; padding: 14px 12px; background: var(--surface-soft); border-radius: 10px; }
.security-dot { width: 8px; height: 8px; margin-top: 6px; flex: 0 0 auto; background: var(--success); border-radius: 50%; }
.sidebar-security strong { font-size: 12px; }
.sidebar-security p { margin: 1px 0 0; color: var(--text-muted); font-size: 10px; }
.main-content { min-width: 0; margin-left: var(--sidebar-width); padding: 30px clamp(22px, 3vw, 46px) 60px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin: 0 auto 24px; max-width: 1320px; }
.page-header h1 { margin-bottom: 5px; font-size: 30px; line-height: 1.25; letter-spacing: -.025em; }
.page-header p:not(.page-eyebrow) { margin: 0; color: var(--text-secondary); }
.page-eyebrow { margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.notice { max-width: 1320px; margin: 0 auto 18px; padding: 13px 16px; color: #23613f; background: var(--success-bg); border: 1px solid #c5eadb; border-radius: 10px; }

/* 组件 */
.primary-button, .secondary-button, .outline-button, .button, button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border-radius: 9px; border: 1px solid transparent; font-weight: 700; }
.primary-button, .button, button.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.primary-button:hover, .button:hover, button.primary:hover { background: #104d82; }
.secondary-button { color: var(--primary); background: #eef5fb; border-color: #d5e5f3; }
.secondary-button:hover { background: #e3eff9; }
.outline-button { color: var(--primary); background: var(--surface); border-color: var(--border-strong); }
.outline-button:hover { border-color: var(--primary); }
.status-badge, .status { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; padding: 3px 10px; white-space: nowrap; border-radius: 99px; color: #596b7a; background: #edf1f4; font-size: 12px; font-weight: 750; }
.status-badge.success, .status.green { color: var(--success); background: var(--success-bg); }
.status-badge.warning, .status.orange { color: var(--warning); background: var(--warning-bg); }
.status-badge.notice, .status.yellow { color: var(--notice); background: var(--notice-bg); }
.status-badge.danger, .status.red { color: var(--danger); background: var(--danger-bg); }
.status-badge.neutral, .status.gray { color: #657686; background: #edf1f4; }
.count-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 11px; color: var(--primary); background: #eaf3fb; border-radius: 99px; font-size: 12px; font-weight: 750; white-space: nowrap; }

/* 查询页 */
.search-panel, .data-card, .card { max-width: 1320px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-panel { padding: 27px 28px 20px; }
.employee-search-form > label { display: block; margin-bottom: 9px; color: #294359; font-size: 13px; font-weight: 750; }
.search-control { display: grid; grid-template-columns: 30px minmax(0,1fr) 126px; align-items: center; min-height: 56px; padding-left: 15px; background: #fff; border: 1px solid var(--border-strong); border-radius: 11px; transition: border-color .18s, box-shadow .18s; }
.search-control:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,90,150,.11); }
.search-icon { position: relative; width: 17px; height: 17px; border: 2px solid #6b8195; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -5px; bottom: -3px; background: #6b8195; transform: rotate(45deg); }
.search-control input { width: 100%; height: 52px; padding: 0 12px; color: var(--text); background: transparent; border: 0; outline: none; font-size: 16px; }
.search-control input::placeholder { color: #8ea0b0; }
.search-control button { align-self: stretch; margin: 5px; color: #fff; background: var(--primary); border: 0; border-radius: 8px; font-weight: 750; }
.search-control button:hover { background: #104d82; }
.search-tips { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; color: var(--text-muted); font-size: 12px; }
.search-tips span::before { content: "•"; margin-right: 6px; color: var(--accent); }
.initial-state, .empty-state { max-width: 1320px; margin: 22px auto 0; padding: 58px 24px; text-align: center; color: var(--text-secondary); background: rgba(255,255,255,.55); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.initial-state h2, .empty-state h2 { margin: 14px 0 5px; color: var(--text); font-size: 20px; }
.initial-state p, .empty-state p { margin-bottom: 0; }
.initial-icon, .empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: auto; color: var(--primary); background: #e6f0f9; border-radius: 14px; font-weight: 800; }
.empty-state.compact { margin: 0; padding: 46px 20px; border: 0; background: transparent; }
.results-section { max-width: 1320px; margin: 24px auto 0; }
.section-heading, .data-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2, .data-card-head h2 { margin-bottom: 3px; font-size: 19px; }
.section-heading p, .data-card-head p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.employee-card-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.employee-result-card { display: block; padding: 21px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(25,58,88,.055); transition: transform .16s, border-color .16s, box-shadow .16s; }
.employee-result-card:hover { transform: translateY(-2px); border-color: #a9c5dc; box-shadow: var(--shadow); }
.employee-card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid #edf1f5; }
.employee-card-head .status-badge { margin-left: auto; }
.employee-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: #fff; background: var(--primary); border-radius: 11px; font-weight: 800; }
.employee-card-head h3 { margin: 0; font-size: 18px; }
.employee-card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 11px; }
.employee-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 24px; margin: 17px 0 0; }
.employee-fields div { min-width: 0; }
.employee-fields dt { color: var(--text-muted); font-size: 11px; }
.employee-fields dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 650; }
.view-detail { display: block; margin-top: 17px; color: var(--primary); font-size: 12px; font-weight: 750; text-align: right; }

/* 上传页 */
.upload-guidance { max-width: 1320px; margin: 0 auto 18px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #365c73; background: var(--accent-soft); border: 1px solid #c8e9f0; border-radius: 10px; }
.upload-guidance p { margin: 0; font-size: 13px; }
.guidance-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; color: #fff; background: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 800; }
.upload-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.upload-card { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.upload-card-head { display: flex; gap: 13px; min-height: 58px; }
.upload-number { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; color: var(--primary); background: #eaf3fb; border-radius: 10px; font-size: 13px; font-weight: 850; }
.upload-card h2 { margin: 0 0 3px; font-size: 18px; }
.upload-card-head p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.upload-rule { min-height: 92px; margin: 17px 0; padding: 13px; background: var(--surface-soft); border-radius: 9px; }
.upload-rule strong { color: #355168; font-size: 12px; }
.upload-rule p { margin: 5px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.65; }
.file-picker { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 11px 13px; background: #fbfcfe; border: 1px dashed #aebfce; border-radius: 10px; cursor: pointer; transition: border-color .16s, background .16s; }
.file-picker:hover { background: #f1f7fc; border-color: var(--primary); }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; color: var(--primary); background: #eaf3fb; border-radius: 9px; font-size: 20px; }
.file-picker-copy { min-width: 0; }
.file-picker-copy strong, .file-picker-copy small { display: block; }
.file-picker-copy strong { color: #365269; font-size: 13px; }
.file-picker-copy small { max-width: 205px; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.upload-actions .primary-button, .upload-actions .secondary-button { min-height: 41px; padding: 0 8px; font-size: 12px; }
.last-upload { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.last-label { color: var(--text-muted); font-size: 11px; font-weight: 750; }
.last-upload p { margin: 3px 0 5px; color: var(--text-secondary); font-size: 11px; }
.last-stats { display: flex; flex-wrap: wrap; gap: 11px; color: var(--text-secondary); font-size: 11px; }
.last-stats b { color: var(--text); }

/* 表格与详情 */
.data-card { padding: 22px; }
.data-card-head { margin-bottom: 17px; }
.responsive-table, .table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid #e9eef3; vertical-align: top; }
th { color: #53697c; background: #f5f8fb; font-size: 11px; font-weight: 800; white-space: nowrap; }
tbody tr:hover { background: #fbfdff; }
tbody tr:last-child td { border-bottom: 0; }
.table-link { color: var(--primary); font-weight: 750; }
.table-link:hover { text-decoration: underline; }
.history-detail { margin-top: 18px; }
.success-message { display: flex; align-items: center; gap: 9px; padding: 15px; color: var(--success); background: var(--success-bg); border-radius: 9px; }
.success-message span { font-weight: 900; }
details summary { color: var(--primary); cursor: pointer; font-weight: 700; }
pre { max-width: 440px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-head { max-width: 1320px; margin: 0 auto 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.detail-head h1 { margin: 7px 0 4px; font-size: 29px; }
.detail-head p { margin: 0; color: var(--text-secondary); }
.back { color: var(--primary); font-size: 13px; font-weight: 700; }
.detail-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.card { padding: 22px; }
.card h2 { font-size: 18px; }
.info { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 13px; margin: 18px 0 0; }
.info dt { color: var(--text-muted); }
.info dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.pre { white-space: pre-wrap; }
.history { max-width: 1320px; margin: 18px auto 0; }
.form-grid { max-width: 1000px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-grid label { color: #365269; font-size: 13px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea { display: block; width: 100%; min-height: 45px; margin-top: 6px; padding: 10px 12px; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 9px; outline: none; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,90,150,.1); }
.form-grid textarea { resize: vertical; }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary { color: var(--primary); background: #edf4fa; border-color: #d6e3ee; }
.required { color: var(--danger); }
.empty { max-width: 760px; margin: 40px auto; padding: 55px 24px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

@media (max-width: 1080px) {
  .login-shell { grid-template-columns: minmax(0,1fr) 390px; gap: 24px; }
  .login-intro { padding: 54px 40px; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .upload-card-head, .upload-rule, .last-upload { grid-column: 1; }
  .upload-form { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .auth-page { padding: 18px; }
  .login-shell { display: block; max-width: 580px; max-height: none; }
  .login-intro { min-height: 370px; padding: 88px 32px 32px; border-radius: 18px 18px 0 0; }
  .login-brand { top: 25px; left: 30px; }
  .login-intro h1 { font-size: 30px; }
  .feature-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 26px; }
  .feature-list li { display: block; padding: 10px; }
  .feature-icon { margin-bottom: 7px; }
  .feature-list small { display: none; }
  .login-card { border-radius: 0 0 18px 18px; box-shadow: var(--shadow-lg); }
  .login-footer { max-width: 580px; }
  .app-brand-copy small { display: none; }
  .account-chip { display: none; }
  .mobile-menu-button { display: block; }
  .sidebar { transform: translateX(-105%); box-shadow: 8px 0 24px rgba(25,55,82,.14); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 24px 18px 50px; }
  .employee-card-list { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .auth-page { padding: 0; }
  .login-shell { width: 100%; }
  .login-intro { min-height: auto; padding: 80px 22px 26px; border-radius: 0; box-shadow: none; }
  .login-brand { left: 22px; }
  .login-brand-mark { width: 36px; height: 36px; }
  .login-intro h1 { margin-bottom: 14px; font-size: 26px; }
  .login-intro h1, .feature-list strong, .feature-list small { overflow-wrap: anywhere; word-break: break-word; }
  .login-intro h2 { font-size: 20px; }
  .login-description { font-size: 14px; }
  .feature-list { grid-template-columns: 1fr; margin-top: 22px; }
  .feature-list li { display: flex; }
  .feature-icon { margin-bottom: 0; }
  .feature-list small { display: block; }
  .login-panel { display: block; }
  .login-card { padding: 28px 22px 30px; border: 0; border-radius: 0; box-shadow: none; }
  .login-footer { margin: 0; padding: 18px 20px; display: grid; gap: 4px; text-align: center; background: #fff; }
  .app-topbar { height: 64px; padding: 0 14px; }
  :root { --topbar-height: 64px; }
  .app-brand-mark { width: 35px; height: 35px; }
  .app-brand-copy strong { max-width: 185px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .logout-button { display: none; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header h1 { font-size: 26px; }
  .page-header .primary-button, .page-header .outline-button { width: 100%; }
  .search-panel { padding: 18px; }
  .search-control { grid-template-columns: 27px minmax(0,1fr); padding: 7px 9px 7px 13px; }
  .search-control input { height: 45px; padding-right: 4px; font-size: 14px; }
  .search-control button { grid-column: 1 / -1; height: 45px; margin: 3px 0 0; }
  .search-tips { gap: 7px 14px; }
  .employee-fields { grid-template-columns: 1fr; gap: 11px; }
  .employee-card-head { align-items: flex-start; flex-wrap: wrap; }
  .employee-card-head .status-badge { margin-left: 54px; }
  .upload-card { display: block; padding: 18px; }
  .upload-rule { min-height: 0; }
  .upload-actions { grid-template-columns: 1fr; }
  .data-card { padding: 15px; }
  .responsive-table { overflow: visible; border: 0; }
  .history-table { min-width: 0; }
  .history-table thead { display: none; }
  .history-table tbody, .history-table tr, .history-table td { display: block; width: 100%; }
  .history-table tr { margin-bottom: 12px; padding: 13px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
  .history-table td { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; text-align: right; border: 0; overflow-wrap: anywhere; }
  .history-table td::before { content: attr(data-label); flex: 0 0 78px; color: var(--text-muted); text-align: left; font-size: 11px; font-weight: 750; }
  .history-table td:first-child { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .detail-head .button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .info { grid-template-columns: 92px minmax(0,1fr); }
}
