:root { --navy: #0B2545; --amber: #F5A300; --steel: #46607F; --ice: #E9EFF7; --line: #d5dde8; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--navy); background: #f5f7fa; font-size: 14px; }
header { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-bottom: 3px solid var(--amber); }
.logo { height: 34px; }
.title { font-weight: 600; font-size: 16px; }
.title small { color: var(--steel); font-weight: 400; margin-left: 6px; }
main { display: grid; grid-template-columns: minmax(360px, 520px) 1fr; gap: 16px; padding: 16px; }
@media (max-width: 960px) { main { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 16px; min-width: 0; }
h2 { font-size: 14px; margin: 16px 0 8px; color: var(--navy); border-left: 3px solid var(--amber); padding-left: 8px; }
h2:first-child { margin-top: 4px; }
#map { height: 200px; border-radius: 6px; margin-bottom: 8px; }
label { display: flex; flex-direction: column; font-size: 12px; color: var(--steel); gap: 3px; }
label.check { flex-direction: row; align-items: center; gap: 4px; color: var(--navy); font-size: 13px; }
input, select { font: inherit; padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mixes { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0; font-size: 13px; }
table { border-collapse: collapse; width: 100%; }
.devices td, .devices th { padding: 2px 3px; text-align: left; font-size: 12px; color: var(--steel); }
.monthly { display: block; overflow-x: auto; }
.monthly td, .monthly th { padding: 1px; font-size: 11px; white-space: nowrap; }
.monthly input { width: 46px; padding: 3px; }
button.link { background: none; border: 0; color: var(--steel); cursor: pointer; padding: 4px 0; text-decoration: underline; }
button.primary { margin-top: 16px; width: 100%; padding: 10px; font-size: 15px; font-weight: 600; background: var(--amber); color: var(--navy); border: 0; border-radius: 6px; cursor: pointer; }
button.primary:disabled { opacity: .6; cursor: wait; }
.hint { color: var(--steel); font-size: 12px; margin: 6px 0; }
.error { color: #b3261e; }
.hand { background: var(--ice); border-radius: 6px; padding: 8px 12px; line-height: 1.8; font-size: 13px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.option { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.option.best { border: 2px solid var(--amber); }
.tag { font-size: 12px; color: var(--steel); margin-bottom: 4px; }
.config { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.config span { background: var(--navy); color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.kpi { display: flex; align-items: baseline; gap: 4px; margin: 2px 0; }
.kpi b { font-size: 18px; }
.kpi small { color: var(--steel); margin-left: 6px; }
.chart { height: 180px; margin-top: 8px; }
.chart.wide { height: 240px; }
.bom td { border-bottom: 1px solid var(--line); padding: 3px 2px; font-size: 12px; }
.bom td:last-child { text-align: right; white-space: nowrap; }
details summary { cursor: pointer; color: var(--steel); font-size: 12px; margin-top: 6px; }
.btns { display: flex; gap: 6px; }
button.small { padding: 6px 8px; font-size: 12px; background: var(--navy); color: #fff; border: 0; border-radius: 4px; cursor: pointer; white-space: nowrap; }
button.small:disabled { opacity: .6; }
.userbar { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--steel); }
.userbar a { color: var(--navy); }
button.small.word { background: var(--steel); }
.auth { max-width: 380px; margin: 60px auto; }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth .or { text-align: center; color: var(--steel); margin: 18px 0 6px; font-size: 12px; }
.admin { max-width: 1100px; margin: 16px auto; }
.admin table td, .admin table th { border-bottom: 1px solid var(--line); padding: 5px 6px; font-size: 12px; text-align: left; vertical-align: top; }
.badge { border-radius: 10px; padding: 1px 8px; font-size: 11px; background: var(--ice); }
.badge.active { background: #FFF1CC; } .badge.unused { background: #E3F4E8; } .badge.revoked, .badge.expired, .badge.finished { background: #eee; color: #888; }
.admin button.link { margin-right: 10px; }
nav.modules { display: flex; gap: 4px; }
nav.modules a { padding: 4px 10px; border-radius: 4px; color: var(--steel); text-decoration: none; font-size: 13px; }
nav.modules a.on { background: var(--navy); color: #fff; }
.cur { display: flex; gap: 12px; margin-bottom: 8px; }
.devices.ac td:first-child { width: 30%; }
.devices.ac input { min-width: 36px; padding: 4px 3px; }
.load { margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid4 .wide2 { grid-column: span 2; }
button.link.lang { border: 1px solid var(--steel); border-radius: 4px; padding: 2px 8px; text-decoration: none; }
.hand .tip { background: #FFF1CC; border-radius: 4px; padding: 4px 8px; margin: 4px 0; }
.htab td, .htab th { border-bottom: 1px solid var(--line); padding: 4px 6px; font-size: 12px; text-align: left; }
.htab th { background: var(--ice); }
.htab tr.grp td { border-top: 2px solid #c7d2df; }
.htab tr.rec td { background: #FFF6E0; font-weight: 600; }
.params .unit { color: var(--steel); font-size: 11px; }
.params label { display: flex; flex-direction: column; justify-content: space-between; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } tr.cam td { padding-top: 0; }
