:root {
  --navy: #13292d;
  --navy-2: #1a373b;
  --ink: #172b30;
  --muted: #718087;
  --paper: #f4f5f1;
  --white: #ffffff;
  --teal: #2f817a;
  --teal-light: #dcece8;
  --line: #dfe4df;
  --amber: #b7782b;
  --red: #a84444;
  --shadow: 0 18px 46px rgba(20, 42, 45, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.auth-page { background: var(--navy); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); align-items: center; max-width: 1240px; margin: auto; padding: 56px; gap: 90px; position: relative; overflow: hidden; }
.auth-shell::before { content: ""; position: absolute; width: 560px; height: 560px; border: 1px solid rgba(141, 207, 193, .12); border-radius: 50%; left: -260px; top: -270px; box-shadow: 0 0 0 80px rgba(141, 207, 193, .025), 0 0 0 170px rgba(141, 207, 193, .018); }
.auth-brand, .auth-card { position: relative; z-index: 1; }
.auth-logo { width: 62px; height: 62px; border-radius: 18px 18px 18px 5px; display: grid; place-items: center; color: var(--navy); background: #a8d9cc; font-family: Georgia, serif; font-size: 31px; font-weight: 700; margin-bottom: 52px; }
.eyebrow { color: #6d8184; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.auth-brand .eyebrow { color: #8dc6b9; }
.auth-brand h1 { margin: 18px 0 26px; color: white; font-family: Georgia, "Songti SC", serif; font-size: clamp(44px, 5.8vw, 78px); line-height: 1.08; letter-spacing: -.04em; font-weight: 500; }
.auth-brand p { max-width: 560px; color: #aebfc0; line-height: 1.9; font-size: 15px; }
.auth-security { display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; color: #cae1dc; font-size: 12px; letter-spacing: .04em; }
.auth-security span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(132, 203, 188, .16); color: #98d3c5; }
.auth-card { width: 100%; max-width: 500px; justify-self: end; padding: 42px; border-radius: 22px; background: #fbfcfa; box-shadow: 0 38px 95px rgba(0, 0, 0, .26); }
.auth-card-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 26px; border-bottom: 1px solid var(--line); color: var(--teal); font-weight: 800; }
.auth-card-head small { color: #9aa4a2; font-size: 10px; font-weight: 600; }
.auth-card h2 { margin: 32px 0 8px; font-size: 27px; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-form { display: grid; gap: 17px; }
.auth-form label, .employee-form label, .user-form label { display: grid; gap: 7px; color: #4f6265; font-size: 11px; font-weight: 700; }
.auth-form input, .employee-form input, .user-form input, .user-form select { width: 100%; height: 44px; border: 1px solid #d7deda; border-radius: 9px; background: white; color: var(--ink); padding: 0 12px; outline: none; }
.auth-form input:focus, .employee-form input:focus, .user-form input:focus, .user-form select:focus, .money-input:focus { border-color: #64a59c; box-shadow: 0 0 0 3px rgba(72, 144, 134, .12); }
.auth-form .primary-button { width: 100%; height: 48px; margin-top: 6px; }
.auth-foot { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); color: #8a9697; font-size: 10px; line-height: 1.7; }
.text-link { display: inline-block; margin-top: 20px; color: var(--teal); font-size: 12px; font-weight: 700; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; display: flex; flex-direction: column; z-index: 10; padding: 28px 20px 20px; color: white; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px 11px 11px 3px; display: grid; place-items: center; flex: 0 0 auto; background: #9ed1c5; color: var(--navy); font-family: Georgia, serif; font-size: 20px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .12em; }
.brand small { margin-top: 3px; color: #93a9aa; font-size: 9px; letter-spacing: .07em; }
.nav-list { display: grid; gap: 7px; margin-top: 26px; }
.nav-item { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: #9bb0b1; font-size: 12px; font-weight: 650; transition: .16s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.05); }
.nav-item.active { color: white; background: rgba(116, 192, 177, .15); box-shadow: inset 3px 0 #86cabc; }
.nav-item i { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: rgba(255,255,255,.06); color: #a5bebc; font-style: normal; font-size: 11px; }
.nav-item.active i { color: #a6ddd1; background: rgba(123, 202, 186, .14); }
.sidebar-note { display: flex; gap: 10px; align-items: flex-start; margin-top: auto; padding: 15px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.025); }
.sidebar-note > span { width: 8px; height: 8px; margin-top: 3px; flex: 0 0 auto; border-radius: 50%; background: #7bd0ad; box-shadow: 0 0 0 4px rgba(123,208,173,.1); }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { font-size: 10px; }
.sidebar-note small { margin-top: 6px; color: #82999a; font-size: 8px; line-height: 1.5; }
.sidebar-footer { padding: 16px 10px 0; color: #607b7d; font-size: 8px; }

.workspace { min-height: 100vh; margin-left: 238px; }
.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgba(250,251,248,.94); backdrop-filter: blur(12px); }
.topbar h1 { margin: 5px 0 0; font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 600; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.period-picker { display: flex; align-items: center; gap: 7px; }
.period-picker label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.period-picker input { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: white; color: var(--ink); }
.period-picker button, .account-menu button, .account-menu a { border: 0; background: transparent; color: var(--teal); font-size: 10px; font-weight: 800; cursor: pointer; }
.operator { display: flex; align-items: center; gap: 9px; padding-left: 15px; border-left: 1px solid var(--line); }
.operator > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-light); color: var(--teal); font-size: 12px; font-weight: 800; }
.operator strong, .operator small { display: block; }
.operator strong { font-size: 10px; }.operator small { margin-top: 3px; color: #929d9e; font-size: 8px; }
.account-menu { display: flex; gap: 9px; align-items: center; }
.account-menu form { margin: 0; }
.content { max-width: 1550px; margin: 0 auto; padding: 24px 30px 60px; }

.notice { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #cce3dd; border-radius: 9px; background: #eaf5f1; color: #2f6f68; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.notice.error { border-color: #ebcece; color: var(--red); background: #fff2f2; }
.notice.sensitive { border-color: #e5ceaa; color: #7e541f; background: #fff7e8; }
.auth-card .notice { margin-top: 15px; }

.run-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) 320px; gap: 26px; padding: 28px 30px; border-radius: 14px; color: white; background: linear-gradient(120deg, #163236 0%, #214d4d 58%, #2f716b 100%); box-shadow: var(--shadow); }
.run-kicker { display: flex; align-items: center; gap: 10px; color: #92bbb6; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.run-kicker b { padding: 4px 8px; border-radius: 5px; color: #c6e8df; background: rgba(137,204,189,.15); font-size: 8px; }
.run-hero h2 { margin: 13px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; }
.run-hero p { max-width: 730px; margin: 0; color: #abc3c2; font-size: 10px; line-height: 1.75; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 25px; }
.step { display: flex; align-items: center; gap: 8px; position: relative; color: #789395; }
.step::after { content: ""; height: 1px; position: absolute; left: 40px; right: 10px; top: 12px; background: rgba(255,255,255,.1); }
.step:last-child::after { display: none; }
.step i { width: 25px; height: 25px; display: grid; place-items: center; z-index: 1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: #244346; font-style: normal; font-size: 8px; }
.step span, .step small { display: block; }.step span { font-size: 9px; }.step small { margin-top: 3px; font-size: 7px; color: #6f898b; }
.step.done, .step.active { color: #d5e9e5; }.step.done i { border-color: #77c7b6; color: #173437; background: #8cd1c1; }.step.active i { border-color: #8acbbb; color: #bce4da; }
.run-action-card { align-self: stretch; padding: 21px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(8,26,29,.28); }
.run-action-card > span { color: #82aba8; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.run-action-card strong { display: block; margin: 10px 0 8px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.run-action-card p { margin-bottom: 24px; font-size: 9px; }
.button-hint { display: block; margin-top: 15px; color: #718f8e !important; font-size: 8px !important; text-transform: none !important; letter-spacing: 0 !important; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 15px 0; }
.metrics-grid article { min-height: 96px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 5px 18px rgba(24,45,47,.025); }
.metrics-grid span, .metrics-grid strong, .metrics-grid small { display: block; }
.metrics-grid span { color: var(--muted); font-size: 9px; font-weight: 700; }
.metrics-grid strong { margin: 8px 0 5px; font-family: Georgia, serif; font-size: 20px; font-weight: 600; }
.metrics-grid small { color: #9aa4a3; font-size: 8px; }

.panel { margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 10px 30px rgba(24,45,47,.035); }
.panel-heading { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-heading > div { display: flex; align-items: center; gap: 12px; }
.panel-heading h3 { margin: 0; font-size: 12px; }.panel-heading p { margin: 5px 0 0; color: #919c9d; font-size: 8px; }
.section-index { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: var(--teal-light); font-size: 8px; font-weight: 800; }
.draft-badge, .status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #8a6024; background: #f9edd9; font-size: 8px; font-weight: 800; }
.status-pill.off { color: #8c4c4c; background: #f8e1e1; }
.table-wrap { width: 100%; overflow: auto; }
.data-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.data-table th { padding: 10px 12px; text-align: left; color: #788789; background: #fafbf9; border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .03em; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #edf0ed; color: #45575a; font-size: 9px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfa; }
.data-table td strong { color: var(--ink); }
.subline { display: block; margin-top: 4px; color: #94a09f; font-size: 8px; }
.employee-cell { display: flex; align-items: center; gap: 9px; min-width: 135px; }
.employee-cell > span { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #346f69; background: #e2efec; font-weight: 800; }
.employee-cell strong, .employee-cell small { display: block; white-space: nowrap; }.employee-cell small { margin-top: 3px; color: #8b999a; font-size: 7px; }
.money-cell, .result-cell { white-space: nowrap; }.result-cell { color: #3e6f69 !important; }.result-cell.strong { font-weight: 800; }
.money-input { width: 86px; height: 31px; border: 1px solid #dce3df; border-radius: 7px; background: #fbfcfb; padding: 0 8px; color: #33474a; text-align: right; font-size: 9px; outline: none; }
.panel-actions, .policy-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 18px; border-top: 1px solid var(--line); color: #899697; font-size: 9px; }
.primary-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 0 19px; color: white; background: var(--teal); box-shadow: 0 7px 17px rgba(47,129,122,.18); font-weight: 800; font-size: 10px; cursor: pointer; }
.primary-button:hover { background: #256f69; }.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.empty-state { padding: 35px !important; text-align: center !important; color: #909c9d !important; }
.table-link { color: var(--teal); font-weight: 800; }

.form-panel { overflow: visible; }
.employee-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.employee-form .primary-button { align-self: end; }
.user-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr auto; gap: 14px; align-items: end; padding: 18px; }
.inline-actions { display: flex; align-items: center; gap: 5px; }
.inline-actions form { margin: 0; }.inline-actions button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--teal); font-size: 8px; font-weight: 800; cursor: pointer; }

.policy-banner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 25px 28px; border-radius: 13px; color: white; background: linear-gradient(120deg, #17363a, #28635f); }
.policy-banner span { color: #95c6bc; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }.policy-banner h2 { margin: 8px 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }.policy-banner p { margin: 0; color: #aac6c2; font-size: 9px; }
.policy-banner > div:last-child { min-width: 160px; padding-left: 25px; border-left: 1px solid rgba(255,255,255,.12); }.policy-banner strong, .policy-banner small, .policy-banner b { display: block; }.policy-banner strong { font-family: Georgia, serif; font-size: 28px; }.policy-banner small { color: #88aaa7; font-size: 8px; }.policy-banner b { width: fit-content; margin-top: 8px; padding: 4px 7px; border-radius: 5px; color: #e6d2a7; background: rgba(191,152,78,.18); font-size: 7px; }
.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.policy-grid .panel { margin-top: 15px; }.policy-grid .policy-actions { grid-column: 1 / -1; margin-top: 0; border: 1px solid var(--line); border-radius: 11px; background: white; }
.policy-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px; }.policy-fields label { display: grid; gap: 6px; color: #607174; font-size: 9px; font-weight: 700; }.policy-fields label span { display: flex; align-items: center; gap: 7px; }.policy-fields input { width: 100%; height: 36px; border: 1px solid #dce2df; border-radius: 7px; padding: 0 9px; text-align: right; outline: none; }

@media (max-width: 1120px) {
  .sidebar { width: 76px; padding-left: 12px; padding-right: 12px; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }.brand > span:last-child, .nav-item span, .sidebar-note, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 8px; }.workspace { margin-left: 76px; }
  .employee-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }.user-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 850px) {
  .auth-shell { grid-template-columns: 1fr; gap: 38px; padding: 36px 22px; }.auth-logo { margin-bottom: 28px; }.auth-brand h1 { font-size: 45px; }.auth-card { justify-self: stretch; max-width: none; }
  .topbar { align-items: flex-start; padding: 15px 19px; }.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }.operator { display: none; }.content { padding: 18px; }
  .run-hero { grid-template-columns: 1fr; }.metrics-grid { grid-template-columns: 1fr 1fr; }.policy-grid { grid-template-columns: 1fr; }.policy-grid .policy-actions { grid-column: auto; }.employee-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .auth-shell { padding: 30px 16px; }.auth-card { padding: 27px 22px; }.auth-brand p { font-size: 13px; }.auth-brand h1 { font-size: 39px; }
  .sidebar { inset: auto 0 0 0; width: auto; height: 64px; padding: 7px 8px; flex-direction: row; overflow-x: auto; border-top: 1px solid rgba(255,255,255,.08); }.brand { display: none; }.nav-list { display: flex; flex: 1; margin: 0; gap: 5px; }.nav-item { min-width: 54px; flex: 1; }.nav-item i { width: 32px; height: 32px; }.workspace { margin-left: 0; padding-bottom: 72px; }
  .topbar { display: block; }.topbar h1 { font-size: 19px; }.topbar-actions { justify-content: space-between; margin-top: 12px; }.account-menu { margin-left: auto; }.period-picker label { display: grid; gap: 4px; }
  .content { padding: 13px; }.run-hero { padding: 21px; }.steps { grid-template-columns: 1fr 1fr; gap: 16px; }.step:nth-child(2)::after { display: none; }.metrics-grid { grid-template-columns: 1fr; }.employee-form, .user-form, .policy-fields { grid-template-columns: 1fr; }.policy-banner { align-items: flex-start; flex-direction: column; }.policy-banner > div:last-child { border-left: 0; padding-left: 0; }
}
