:root{font-family:"Microsoft YaHei",system-ui,sans-serif;color:#17233a;background:#f3f6fa;font-size:14px}*{box-sizing:border-box}body{margin:0}main{max-width:1280px;margin:48px auto;padding:0 30px}header,.table-head,.form-row{display:flex;align-items:center;justify-content:space-between;gap:18px}h1{font-size:30px;margin:8px 0}h2{font-size:19px;margin:0 0 12px}.eyebrow{font-size:11px;letter-spacing:3px;color:#3466c7;font-weight:700}.muted,footer{color:#69778d;line-height:1.7}.small{font-size:12px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:28px 0}.stats article,.panel,.login{border:1px solid #dfe6ef;border-radius:14px;background:white}.stats article{padding:20px}.stats span{display:block;color:#69778d}.stats strong{font-size:32px;display:block;margin-top:8px}.panel{padding:24px;margin:20px 0}.form-row label{flex:1}label{display:block;color:#47566e;font-size:13px}input,textarea{display:block;width:100%;padding:11px 12px;margin:8px 0 14px;border:1px solid #cbd5e3;border-radius:7px;background:#fbfcfe;font:inherit;color:#17233a}textarea{font-family:Consolas,monospace;resize:vertical}button{border:0;border-radius:7px;background:#245edb;color:white;padding:11px 18px;font:inherit;cursor:pointer;white-space:nowrap}button:disabled{opacity:.5;cursor:wait}.secondary{background:#edf2fa;color:#244775}.table-head>div{display:flex;gap:10px;align-items:center}.table-head input{margin:0}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th,td{padding:15px 12px;border-bottom:1px solid #e7edf5}th{background:#f6f8fc;color:#6a788e;font-size:12px;font-weight:500}td code{display:block;font-size:11px;color:#7b879b;max-width:250px;overflow-wrap:anywhere;margin-top:8px}td:nth-child(3),td:nth-child(5){white-space:nowrap}.error{color:#c33037}.success{color:#178149}footer{font-size:12px;margin:25px 0}.login{max-width:460px;margin:12vh auto;padding:34px}.login button{width:100%}@media(max-width:800px){main{padding:0 14px;margin:20px auto}.stats{grid-template-columns:repeat(2,1fr)}header,.table-head,.form-row{align-items:stretch;flex-direction:column}.panel{padding:16px}}

/* Keep the device table readable; small screens scroll within the panel. */
table{min-width:850px}th{white-space:nowrap}td:nth-child(2),td:nth-child(4){white-space:nowrap}
/* Customer network columns and bounded, keyboard-accessible details dialog. */
.devices-table{min-width:1210px}.devices-table td:nth-child(5){white-space:normal}
.nowrap{white-space:nowrap}.ip-value{font-family:Consolas,monospace;overflow-wrap:anywhere;min-width:150px;max-width:240px}
.ip-value small{display:block;color:#69778d;font-family:"Microsoft YaHei",sans-serif;margin-top:7px;font-size:11px;white-space:nowrap}
.row-actions{min-width:125px}.row-actions button{display:block;margin:4px 0;padding:8px 12px;width:100%}
dialog{max-width:960px;width:calc(100% - 32px);max-height:85vh;border:1px solid #dfe6ef;border-radius:14px;padding:25px;color:#17233a;overflow:auto}
dialog::backdrop{background:rgba(13,29,51,.38)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.dialog-head h2{margin:0}.network-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:24px 0}
.network-summary div{min-width:0;background:#f5f8fc;border-radius:8px;padding:15px}.network-summary dt{color:#69778d;font-size:12px}
.network-summary dd{margin:10px 0 0;overflow-wrap:anywhere}.network-table{min-width:780px}
@media(max-width:700px){dialog{padding:16px}.network-summary{grid-template-columns:1fr}.devices-table{min-width:1100px}}
/* Region labels are text only; long IPv6 and ISP names wrap inside cells. */
.devices-table{min-width:1390px}.devices-table .region-value{min-width:180px;max-width:250px;white-space:normal;line-height:1.6}
.region-label{display:block;color:#596b83;font-family:"Microsoft YaHei",sans-serif;font-size:12px;line-height:1.6;white-space:normal!important;margin-top:7px}
.network-table .ip-value{max-width:220px}
