:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#172033;background:#f4f7fb}
*{box-sizing:border-box}body{margin:0;background:#f4f7fb}.hidden{display:none!important}
.center-screen{min-height:100vh;display:grid;place-items:center;padding:20px}
.login-card{width:100%;max-width:390px;background:#fff;border:1px solid #e4e8ef;border-radius:18px;padding:32px;box-shadow:0 20px 50px rgba(26,38,64,.08)}
.brand-mark{width:52px;height:52px;border-radius:14px;background:#172033;color:#fff;display:grid;place-items:center;font-size:24px;font-weight:800;margin-bottom:18px}
.brand-mark.small{width:38px;height:38px;border-radius:10px;font-size:18px;margin:0}
h1,h2,h3,p{margin-top:0}.login-card h1{margin-bottom:4px}.login-card>p{color:#6b7280;margin-bottom:26px}
label{display:block;font-size:13px;font-weight:700;margin-bottom:14px;color:#42506a}
input{width:100%;padding:12px 13px;border:1px solid #dbe1ea;border-radius:9px;margin-top:6px;font:inherit;outline:none}
input:focus{border-color:#7686a5;box-shadow:0 0 0 3px rgba(118,134,165,.12)}
button{border:0;border-radius:9px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer;background:#172033;color:#fff}
.login-card button{width:100%;margin-top:6px;padding:12px}.error{color:#b42318;font-size:13px;margin-top:12px}
.app{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
aside{background:#111827;color:#fff;padding:22px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:12px;padding:2px 8px 26px}.brand div{display:flex;flex-direction:column}.brand small{color:#9ca3af;margin-top:2px}
nav{display:flex;flex-direction:column;gap:6px}.nav{background:transparent;text-align:left;color:#cbd5e1}.nav:hover,.nav.active{background:#1f2937;color:#fff}
.logout{margin-top:auto;background:#1f2937;color:#cbd5e1}
main{padding:28px 34px;min-width:0}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}header h2{margin-bottom:4px}header p{color:#7b8496;margin-bottom:0}
.status{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534;padding:8px 11px;border-radius:999px;font-size:13px;font-weight:700}.status i{width:8px;height:8px;background:#22c55e;display:inline-block;border-radius:50%;margin-right:6px}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:18px}.card,.panel{background:#fff;border:1px solid #e3e8f0;border-radius:14px;padding:20px}.card span{color:#7b8496;font-size:13px}.card strong{display:block;font-size:30px;margin-top:8px}
.panel{margin-bottom:18px}.panel h3{margin-bottom:16px}.muted{color:#7b8496;font-size:13px}
.copy-row{display:flex;align-items:center;gap:10px;background:#f7f9fc;border:1px solid #e5e9f0;border-radius:10px;padding:8px 9px}.copy-row code{overflow:auto;white-space:nowrap;flex:1;color:#334155}.copy-row button{padding:7px 10px}
.field{margin:18px 0}.field label{margin-bottom:8px}.setting{display:grid;grid-template-columns:220px 1fr auto;gap:12px;align-items:end;padding:14px 0;border-top:1px solid #eef1f5}.setting .meta{font-size:12px;color:#7b8496}.setting input{margin:0}.setting button{height:42px}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.panel-head h3{margin:0}.panel-head div{display:flex;gap:8px}.danger{background:#b42318}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf0f4;white-space:nowrap}th{color:#64748b;font-size:12px}.json-btn{padding:6px 9px;background:#eef2f7;color:#334155}
.logs{display:flex;flex-direction:column;gap:8px}.log{display:grid;grid-template-columns:80px 155px 1fr 165px;gap:10px;padding:10px 12px;background:#f8fafc;border:1px solid #edf0f4;border-radius:8px;font-size:12px}.log .level{font-weight:800}.log.ERROR .level{color:#b42318}.log.WARN .level{color:#b54708}.log.INFO .level{color:#175cd3}
dialog{width:min(760px,92vw);border:0;border-radius:14px;padding:0;box-shadow:0 30px 80px rgba(0,0,0,.22)}dialog::backdrop{background:rgba(15,23,42,.45)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e5e7eb}pre{padding:18px;margin:0;max-height:65vh;overflow:auto;background:#0f172a;color:#e2e8f0;font-size:12px}
@media(max-width:950px){.app{grid-template-columns:1fr}aside{position:static;height:auto}.brand{padding-bottom:14px}nav{flex-direction:row;overflow:auto}.logout{margin-top:12px}.cards{grid-template-columns:repeat(2,1fr)}main{padding:20px}.setting{grid-template-columns:1fr}.log{grid-template-columns:70px 120px 1fr}.log .date{display:none}}
@media(max-width:560px){.cards{grid-template-columns:1fr}header{align-items:flex-start;gap:12px}.status{white-space:nowrap}.log{grid-template-columns:60px 1fr}.log .event,.log .date{display:none}}
