:root { font-family: "Microsoft YaHei UI", Inter, system-ui, sans-serif; color: #16213a; background: #f4f6fa; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 1060px; background: #f4f6fa; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top left, #e9efff, transparent 44%), #f7f8fb; }
.login-card { width: 390px; padding: 42px; border-radius: 22px; background: white; box-shadow: 0 24px 70px rgba(25, 39, 75, .14); }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: white; font-weight: 800; background: linear-gradient(135deg, #5a67f2, #805be7); }
.login-card h1 { margin: 22px 0 8px; font-size: 27px; }
.login-card p { color: #7a849c; margin: 0 0 28px; }
label { display: grid; gap: 8px; margin: 16px 0; color: #536079; font-size: 14px; }
input, select { height: 42px; border: 1px solid #dfe3ec; border-radius: 9px; padding: 0 12px; background: white; color: #1f2a44; outline: none; }
input:focus, select:focus { border-color: #6473f1; box-shadow: 0 0 0 3px rgba(100, 115, 241, .12); }
button { height: 42px; border: 0; border-radius: 9px; padding: 0 18px; color: white; background: #5968e8; font-weight: 600; }
button:hover { filter: brightness(.97); }
button:disabled { opacity: .45; cursor: default; }
.login-card button { width: 100%; margin-top: 12px; }
.error { min-height: 20px; margin-top: 12px; color: #df4052; font-size: 13px; text-align: center; }
.app-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
aside { position: sticky; top: 0; height: 100vh; padding: 25px 18px; background: #171d36; color: white; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 3px 10px 28px; }
.side-brand span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #6977ff, #9665f2); font-size: 13px; font-weight: 800; }
.side-brand strong { font-size: 17px; }
.nav, .logout { width: 100%; margin: 4px 0; text-align: left; background: transparent; color: #aeb7d1; }
.nav.active { color: white; background: #2b3458; }
.logout { position: absolute; bottom: 24px; left: 18px; width: calc(100% - 36px); color: #efb9c0; }
main { padding: 28px 34px 54px; overflow: hidden; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
header h1 { margin: 0; font-size: 27px; }
header p { margin: 7px 0 0; color: #8a94aa; }
#current-user { padding: 9px 14px; border-radius: 99px; background: white; color: #58637c; box-shadow: 0 4px 14px rgba(42, 53, 83, .06); }
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.summary article { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; padding: 18px 21px; border: 1px solid #e9ecf3; border-radius: 14px; background: white; }
.summary span { color: #727d95; }
.summary-name { font-weight: 600; }
.summary strong { font-size: 28px; color: #3846ad; }
.summary-details { grid-column: 1 / -1; display: flex; gap: 14px; padding-top: 9px; border-top: 1px solid #f0f2f6; font-size: 12px; }
.summary-details b { margin-left: 3px; color: #35415e; font-size: 13px; }
.panel { border: 1px solid #e6e9f1; border-radius: 14px; background: white; box-shadow: 0 7px 24px rgba(37, 48, 77, .04); }
.generate-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; margin-bottom: 16px; }
.generate-panel h2, .table-head h2, .settings-card h2 { margin: 0; font-size: 17px; }
.generate-panel p, .settings-card p { margin: 7px 0 0; color: #8a94a8; font-size: 13px; }
.generate-panel form { display: flex; gap: 9px; }
.generate-supply { display: flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; }
.generate-supply input { width: 16px; height: 16px; }
#generate-quantity { width: 92px; }
#generate-note { width: 185px; }
.toolbar { display: flex; align-items: center; gap: 9px; padding: 13px; margin-bottom: 16px; }
.toolbar input { min-width: 220px; flex: 1; }
.secondary { color: #4c5874; background: #eef1f7; }
.ghost { color: #5968e8; background: #f1f2ff; }
.table-panel { overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 19px 21px; border-bottom: 1px solid #edf0f5; }
.table-head span { color: #8993a7; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.table-panel table { min-width: 1260px; }
.date-cell { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 13px 14px; color: #788299; background: #fafbfc; text-align: left; font-weight: 600; white-space: nowrap; }
td { padding: 14px; border-top: 1px solid #f0f2f6; vertical-align: middle; }
code { font-family: Consolas, monospace; color: #2e3b67; white-space: nowrap; }
.device { max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #eef1f5; color: #667086; }
.status.unused { background: #edf2ff; color: #4e62ce; }
.status.supplied { background: #fff2d9; color: #9a6712; }
.status.supply_ready { background: #e7f2ff; color: #2466ac; }
.status.active { background: #e7f7ee; color: #258153; }
.status.expired, .status.disabled { background: #fcecef; color: #c64958; }
.link { height: auto; padding: 4px 7px; background: transparent; color: #5869d8; font-size: 12px; }
.link.danger { color: #d75462; }
.actions { white-space: nowrap; }
#licenses-view .actions, #licenses-view th:last-child { position: sticky; right: 0; min-width: 118px; background: white; box-shadow: -8px 0 12px -10px #536079; }
#licenses-view th:last-child { background: #fafbfc; }
#licenses-view td:nth-child(8) { max-width: 160px; overflow-wrap: anywhere; }
.empty { padding: 50px; color: #9aa3b4; text-align: center; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 15px 20px; border-top: 1px solid #edf0f5; }
.pagination button { height: 34px; }
.pagination span { color: #7e889d; font-size: 13px; }
#settings-view { display: grid; gap: 16px; }
.settings-card { max-width: 560px; padding: 26px; }
.log-notice { padding: 16px 20px; margin-bottom: 16px; color: #7e889f; font-size: 13px; }
.log-table td:first-child { white-space: nowrap; color: #66728b; }
.log-table td:last-child { min-width: 240px; overflow-wrap: anywhere; }
.log-table td:nth-child(2), .log-table td:nth-child(4) { overflow-wrap: anywhere; }
.settings-card form { margin-top: 23px; }
.settings-card button { margin-top: 8px; }
#supply-view { display: grid; gap: 16px; }
#supply-view .table-panel table { min-width: 1000px; }
.supply-intro, .supply-form-panel { padding: 22px; }
.supply-intro h2, .supply-form-panel h2 { margin: 0 0 10px; font-size: 17px; }
.supply-intro p { margin: 0 0 12px; color: #67738e; line-height: 1.7; }
.supply-stock { margin: 10px 0 14px; color: #344667; font-weight: 600; }
.supply-intro code { display: block; padding: 12px; border-radius: 8px; background: #f5f7fb; overflow-wrap: anywhere; white-space: normal; }
.supply-form-panel form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.supply-form-panel form > label { min-width: 180px; margin: 0; }
.supply-form-panel fieldset { display: flex; flex-wrap: wrap; gap: 8px 14px; border: 1px solid #e0e5ee; border-radius: 9px; }
.supply-form-panel fieldset label { display: flex; align-items: center; gap: 5px; margin: 0; }
.supply-form-panel input[type="checkbox"] { width: 16px; height: 16px; }
.key-reveal { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding: 15px; border-radius: 9px; background: #fff5dc; }
.key-reveal code { overflow-wrap: anywhere; white-space: normal; }
.supply-history { margin-bottom: 20px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; padding: 13px 18px; border-radius: 10px; color: white; background: #26304d; box-shadow: 0 12px 30px rgba(26, 35, 61, .24); }
.toast.error { background: #cf4354; }
@media (max-width: 1180px) { .summary { grid-template-columns: repeat(2, 1fr); } .generate-panel { align-items: flex-start; flex-direction: column; } }
