/* EagleIV — Live Syringe Vision (USB webcam bench) */

.lv-intro-sub {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    max-width: 900px;
}

/* ---------------- Control bar ---------------- */

.lv-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
}

.lv-ctl-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lv-ctl-spacer { flex: 1 1 auto; }

.lv-ctl-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a94a0;
}

.lv-select {
    min-width: 230px;
    padding: 7px 10px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1px solid #d8dee5;
    border-radius: 6px;
}

.lv-select-sm { min-width: 128px; }

.lv-select:focus {
    outline: none;
    border-color: #00bfa5;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.15);
}

.lv-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #445;
    background: #f2f5f7;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.lv-btn:hover:not(:disabled) { background: #e8edf1; color: #222; }

.lv-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.lv-btn-primary {
    color: #fff;
    background: #00bfa5;
    border-color: #00bfa5;
}

.lv-btn-primary:hover:not(:disabled) { background: #00a892; border-color: #00a892; }

.lv-btn-outline {
    color: #00806e;
    background: #fff;
    border-color: #00bfa5;
}

.lv-btn-outline:hover:not(:disabled) { background: #e8f5f3; }

/* ---------------- Toggle strip ---------------- */

.lv-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 14px;
}

.lv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.lv-toggle input { accent-color: #00bfa5; cursor: pointer; }

.lv-toggle-sep {
    width: 1px;
    height: 20px;
    background: #e3e8ec;
}

.lv-inline-label { margin-left: 2px; }

.lv-range { width: 110px; accent-color: #00bfa5; }

.lv-range-val {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #333;
    min-width: 30px;
}

/* ---------------- Banner ---------------- */

.lv-banner {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
    border-left: 3px solid;
}

.lv-banner-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.lv-banner-warn {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.lv-banner-info {
    background: #f0fdfa;
    border-color: #00bfa5;
    color: #0f766e;
}

/* ---------------- Main layout ---------------- */

.lv-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1180px) {
    .lv-main { grid-template-columns: minmax(0, 1fr); }
}

.lv-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0b1418;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #0b1418;
}

.lv-stage video,
.lv-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.lv-stage video { object-fit: contain; background: #0b1418; }

.lv-stage canvas { pointer-events: none; }

.lv-stage-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 24px;
    color: #7f929b;
    background: #0b1418;
}

.lv-stage-idle-icon { font-size: 30px; color: #2a3f47; }

.lv-stage-idle-title {
    font-size: 15px;
    font-weight: 600;
    color: #c6d4da;
}

.lv-stage-idle-text {
    font-size: 12.5px;
    line-height: 1.6;
    max-width: 420px;
}

.lv-stage-idle-text strong { color: #5eead4; }

/* HUD */

.lv-hud {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.lv-hud.on { opacity: 1; }

.lv-hud-item {
    padding: 3px 8px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 10.5px;
    color: #b8ccd4;
    background: rgba(6, 18, 23, 0.72);
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 4px;
}

.lv-hud-item b { color: #5eead4; font-weight: 600; }

.lv-hud-device { text-transform: uppercase; letter-spacing: 0.06em; color: #5eead4; }

/* ---------------- Side panel ---------------- */

.lv-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lv-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 18px;
}

.lv-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #6b7680;
    margin-bottom: 12px;
}

.lv-count {
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    color: #00806e;
    background: #e8f5f3;
    border-radius: 10px;
}

.lv-card-volume { border-top: 3px solid #00bfa5; }

.lv-vol-readout {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}

.lv-vol-value {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    color: #1f2d33;
    font-variant-numeric: tabular-nums;
}

/* An uncalibrated read is shown, but must not look like a measurement. */
.lv-vol-value.lv-vol-uncal {
    color: #9aa4ae;
    text-decoration: underline dotted #cbd5dd 2px;
    text-underline-offset: 6px;
}

.lv-vol-unit { font-size: 16px; font-weight: 600; color: #6b7680; }

.lv-vol-cap { margin-left: auto; font-size: 12px; color: #8a94a0; }

.lv-vol-bar {
    height: 9px;
    background: #eef2f4;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 14px;
}

.lv-vol-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00bfa5, #38e1ff);
    border-radius: 5px;
    transition: width 0.18s ease-out;
}

.lv-vol-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.lv-meta-item { display: flex; flex-direction: column; gap: 3px; }

.lv-meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9aa4ae;
}

.lv-meta-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.lv-chip {
    align-self: flex-start;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 10px;
}

.lv-chip-high { color: #065f46; background: #d1fae5; }
.lv-chip-medium { color: #92400e; background: #fef3c7; }
.lv-chip-low { color: #7f1d1d; background: #fee2e2; }
.lv-chip-idle { color: #475569; background: #e2e8f0; }
.lv-chip-drawing { color: #075985; background: #dbeafe; }
.lv-chip-injecting { color: #7c2d12; background: #ffedd5; }

.lv-vol-note {
    margin-top: 12px;
    font-size: 11.5px;
    line-height: 1.55;
    color: #8a94a0;
    min-height: 16px;
}

.lv-precise {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f4;
}

.lv-precise-hint { font-size: 11px; color: #9aa4ae; line-height: 1.5; }

.lv-precise-result {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f7f9fb;
    border-left: 3px solid #00bfa5;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    color: #445;
}

.lv-precise-result .lv-pr-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2d33;
    font-variant-numeric: tabular-nums;
}

.lv-precise-result.lv-pr-error { border-color: #ef4444; color: #991b1b; }

/* ---------------- Lists ---------------- */

.lv-track-list,
.lv-hand-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.lv-track-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #fafbfc;
    font-size: 12.5px;
}

.lv-track-swatch {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex: 0 0 auto;
}

.lv-track-label { font-weight: 600; color: #333; }

.lv-track-id {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    color: #8a94a0;
}

.lv-track-conf {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: #6b7680;
}

.lv-track-stale { color: #b45309; font-size: 10.5px; }

.lv-hand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #fafbfc;
    font-size: 12.5px;
    color: #333;
}

.lv-hand-row b { color: #1f2d33; }

.lv-contact {
    margin-left: auto;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #075985;
    background: #dbeafe;
    border-radius: 10px;
}

.lv-empty {
    padding: 10px 2px;
    font-size: 12px;
    color: #9aa4ae;
    font-style: italic;
}

