:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #192338;
  background: #f4f6fb;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1080px; min-height: 100vh; background: #f4f6fb; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px; background: radial-gradient(circle at 15% 10%, #dce5ff 0, transparent 35%), linear-gradient(135deg, #f8faff, #eef2fb); }
.login-card { width: 420px; padding: 38px; border: 1px solid #dce3f2; border-radius: 22px; background: rgba(255,255,255,.95); box-shadow: 0 25px 70px rgba(40,61,110,.15); }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px; border-radius: 15px; color: #fff; font-size: 19px; font-weight: 800; background: linear-gradient(135deg,#315ff1,#755cf8); }
.login-card h1 { margin: 0 0 7px; font-size: 25px; }
.login-card p { margin: 0 0 25px; color: #788298; font-size: 14px; }
label { display: block; margin: 0 0 7px; color: #5a657b; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid #d7deec; border-radius: 9px; background: #fff; color: #192338; outline: none; }
input, select { height: 40px; padding: 0 11px; }
textarea { padding: 10px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #4a6ff2; box-shadow: 0 0 0 3px rgba(74,111,242,.12); }
.login-card input { margin-bottom: 17px; }
button { height: 38px; padding: 0 14px; border: 1px solid #d8dfec; border-radius: 9px; background: #fff; color: #34415a; }
button:hover { border-color: #6684ef; color: #2457ed; }
button.primary { border-color: #315ff1; background: #315ff1; color: #fff; font-weight: 650; }
.login-card button { width: 100%; height: 43px; margin-top: 8px; }
.form-message { min-height: 20px; margin-top: 12px; color: #c33c3c; font-size: 13px; }
.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; background: #111b33; color: #fff; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.side-brand > span { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: linear-gradient(135deg,#426cf6,#7d60fa); font-weight: 800; }
.side-brand b, .side-brand small { display: block; }
.side-brand small { margin-top: 1px; color: #8795b5; }
nav { display: grid; gap: 7px; }
.nav-item { width: 100%; text-align: left; border: 0; background: transparent; color: #aeb8cf; }
.nav-item:hover, .nav-item.active { background: #243354; color: #fff; }
.side-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 0; border-top: 1px solid #2a3651; color: #aeb8cf; }
.side-footer button { height: 30px; border-color: #394866; background: transparent; color: #d8deed; }
.workspace { min-width: 0; }
header { height: 92px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid #e1e6f0; background: #fff; }
header h1 { margin: 0; font-size: 22px; }
header p { margin: 5px 0 0; color: #8a94a8; font-size: 13px; }
.health { display: flex; align-items: center; gap: 7px; color: #4a5670; font-size: 13px; }
.health i { width: 8px; height: 8px; border-radius: 50%; background: #25b36a; box-shadow: 0 0 0 4px rgba(37,179,106,.12); }
.page-section { display: grid; gap: 18px; padding: 26px 34px 42px; }
.panel { padding: 21px; border: 1px solid #e0e5ef; border-radius: 14px; background: #fff; box-shadow: 0 4px 15px rgba(38,52,87,.045); }
.filter-panel { display: grid; grid-template-columns: repeat(4, minmax(135px,1fr)) auto; gap: 13px; align-items: end; }
.field label { margin-bottom: 6px; }
.compact { height: 40px; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cards article { padding: 19px 20px; border: 1px solid #e0e5ef; border-radius: 13px; background: #fff; }
.cards span, .cards small { display: block; color: #8791a6; }
.cards b { display: block; margin: 7px 0 2px; color: #2457ed; font-size: 27px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head p { margin: 4px 0 0; color: #8a94a8; font-size: 12px; }
.chart { min-height: 220px; display: flex; align-items: end; gap: 10px; overflow-x: auto; padding: 15px 5px 0; border-top: 1px solid #edf0f6; }
.bar-item { min-width: 52px; flex: 1; display: grid; align-content: end; justify-items: center; gap: 7px; height: 190px; }
.bar-track { width: 28px; height: 145px; display: flex; align-items: end; border-radius: 8px 8px 3px 3px; background: #eef2fc; overflow: hidden; }
.bar-value { width: 100%; min-height: 2px; background: linear-gradient(180deg,#6d78fa,#315ff1); border-radius: 7px 7px 0 0; }
.bar-item b { color: #38455f; font-size: 12px; }
.bar-item span { color: #8a94a8; font-size: 11px; white-space: nowrap; }
.empty { width: 100%; align-self: center; color: #929caf; text-align: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 12px; color: #748097; background: #f7f8fb; text-align: left; font-weight: 600; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #edf0f5; color: #35415a; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; }
.badge.on { color: #147849; background: #eaf9f1; }
.badge.off { color: #ad3d3d; background: #fff0f0; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { height: 30px; padding: 0 9px; font-size: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.release-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; margin-bottom: 14px; }
.release-upload form > button { margin-top: 14px; }
.file-field input { padding: 7px 9px; }
.mono { max-width: 220px; overflow: hidden; color: #62708c; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; z-index: 20; right: 28px; bottom: 28px; max-width: 420px; padding: 13px 16px; border-radius: 10px; background: #17233d; color: #fff; box-shadow: 0 12px 35px rgba(24,37,67,.28); font-size: 13px; }
.toast.error { background: #b33d3d; }
@media (max-width: 1200px) {
  body { min-width: 980px; }
  .app-shell { grid-template-columns: 205px 1fr; }
  .filter-panel { grid-template-columns: repeat(2,1fr) auto; }
}
