:root {
    --ecua-blue: #0b4f8a;
    --ecua-green: #2e8b3e;
    --ecua-bg: #f3f5f8;
}
body { background: var(--ecua-bg); font-family: "Segoe UI", Roboto, Arial, sans-serif; }
.navbar-ecua { background: var(--ecua-blue); }
.navbar-ecua .navbar-brand, .navbar-ecua .nav-link { color: #fff !important; }
.navbar-ecua .nav-link.active { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.page-title { font-size: 1.4rem; font-weight: 600; margin: 0 0 12px; }
.card-ecua { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 14px 16px; margin-bottom: 16px; }
.card-ecua h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 10px; color: #333; }
.muted { color: #6b7280; font-size: .9rem; }

/* Weight display */
.weight-box { background: #111; color: #ff3b30; font-family: "Consolas", "Courier New", monospace; border-radius: 8px;
              padding: 10px 18px; text-align: right; font-size: 3.2rem; letter-spacing: 2px; min-width: 260px; }
.weight-box .unit { font-size: 1.2rem; color: #aaa; margin-left: 6px; }
.weight-flags span { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .8rem; margin-right: 4px; background: #e5e7eb; }
.weight-flags span.on { background: #f59e0b; color: #fff; }
.weight-flags span.err { background: #dc2626; color: #fff; }

/* Stop / go light */
.light { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; background: #1f2937; padding: 10px 12px;
         border-radius: 10px; }
.light .lamp { width: 54px; height: 54px; border-radius: 50%; background: #3f3f46; box-shadow: inset 0 0 8px rgba(0,0,0,.6); }
.light .light-text { color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: 1px; text-align: center; }
.light.l-Red .lamp.red, .light.l-FlashRed .lamp.red { background: #ef4444; box-shadow: 0 0 22px #ef4444; }
.light.l-Green .lamp.green { background: #22c55e; box-shadow: 0 0 22px #22c55e; }
.light.l-FlashRed .lamp.red { animation: flash 1s steps(1) infinite; }
.light.l-FlashRedGreen .lamp.red { animation: flash 1s steps(1) infinite; background: #ef4444; box-shadow: 0 0 22px #ef4444; }
.light.l-FlashRedGreen .lamp.green { animation: flash 1s steps(1) infinite reverse; background: #22c55e; box-shadow: 0 0 22px #22c55e; }
@keyframes flash { 0% { opacity: 1; } 50% { opacity: .12; } }

.status-msg { font-size: 1.25rem; font-weight: 600; }
.alert-item { border-left: 5px solid #dc2626; background: #fef2f2; padding: 8px 10px; border-radius: 4px; margin-bottom: 8px;
              display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.alert-item.k-ScaleError { border-color: #7c3aed; background: #f5f3ff; }
.alert-item.k-NotConfigured { border-color: #d97706; background: #fffbeb; }
.alert-item .when { color: #6b7280; font-size: .8rem; }
.kpi { font-size: 1.8rem; font-weight: 700; color: var(--ecua-blue); }
.kind-badge { padding: 1px 6px; border-radius: 4px; font-size: .78rem; color: #fff; background: #6b7280; }
.kind-Load { background: #2563eb; } .kind-Tare { background: #059669; } .kind-Registered { background: #0891b2; }
.kind-NotConfigured { background: #d97706; } .kind-NoRead { background: #dc2626; } .kind-ScaleError { background: #7c3aed; }
.login-box { max-width: 380px; margin: 8vh auto; }
