:root {
    --bg-body: #070a12;
    --bg-panel: #0f1726;
    --bg-card: #162032;
    --bg-display: #03060d;
    --accent-cyan: #00e5ff;
    --accent-green: #00e676;
    --accent-amber: #ffab00;
    --accent-red: #ff1744;
    --border-ui: #212e44;
    --text-main: #f8fafc;
    --text-dim: #74859a;
    --glow-cyan: 0 0 10px rgba(0, 229, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: linear-gradient(180deg, #162236 0%, #0c1424 100%);
    border-bottom: 2px solid var(--border-ui);
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    flex-shrink: 0;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radiation-symbol {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 75%);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    box-shadow: var(--glow-cyan);
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-title span {
    color: var(--accent-cyan);
    font-weight: 400;
}

.header-meta {
    display: flex;
    gap: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
}

.pill-badge {
    background: #060a14;
    border: 1px solid var(--border-ui);
    padding: 3px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

#lblReceptorMode {
    color: var(--accent-cyan);
}

/* Grid Workspace */
.workspace {
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    gap: 10px;
    padding: 10px;
    height: calc(100vh - 50px);
    overflow: hidden;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.panel-header {
    background: #141d2e;
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border-ui);
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

.panel-body {
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.panel-body::-webkit-scrollbar,
.guide-drawer::-webkit-scrollbar {
    width: 5px;
}

.panel-body::-webkit-scrollbar-thumb,
.guide-drawer::-webkit-scrollbar-thumb {
    background: #223249;
    border-radius: 4px;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    background: #070d18;
    border: 1px solid var(--border-ui);
    color: #fff;
    padding: 7px 9px;
    border-radius: 5px;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--accent-cyan);
}

.btn-segments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 3px;
    background: #060b14;
    padding: 3px;
    border-radius: 5px;
    border: 1px solid var(--border-ui);
}

.btn-segment {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.btn-segment.active {
    background: var(--accent-cyan);
    color: #000;
    font-weight: 700;
    box-shadow: var(--glow-cyan);
}

/* Digital Displays */
.digital-box {
    background: #0a101b;
    border: 1px solid var(--border-ui);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.display-screen {
    font-family: 'Share Tech Mono', monospace;
    background: var(--bg-display);
    border: 1px solid #1a2538;
    border-radius: 5px;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
}

.screen-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.screen-unit {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.stepper-control {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    gap: 6px;
    align-items: center;
}

.btn-step {
    background: #182334;
    border: 1px solid #2d3f5a;
    color: #fff;
    height: 30px;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-step:hover {
    background: #223249;
    border-color: var(--accent-cyan);
}

.metrics-subrow {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-dim);
    padding-top: 2px;
}

.metrics-subrow strong {
    color: #fff;
}

input[type="range"] {
    accent-color: var(--accent-cyan);
    height: 5px;
    background: #182436;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

/* Viewport Area */
.viewport-area {
    position: relative;
    background: #020408;
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewport-tools {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 15;
    pointer-events: none;
}

.tool-group {
    display: flex;
    gap: 4px;
    background: rgba(9, 15, 26, 0.9);
    backdrop-filter: blur(8px);
    padding: 3px 5px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: auto;
    align-items: center;
}

.tool-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-right: 2px;
    font-weight: 600;
}

.slider-mini {
    width: 60px;
    height: 4px;
}

.btn-tool {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-tool:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-tool.active {
    background: var(--accent-cyan);
    color: #000;
}

.canvas-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #0c1422 0%, #020408 100%);
}

#xrayCanvas {
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
    transition: filter 0.15s;
    cursor: grab;
    touch-action: none;
}

#xrayCanvas.dragging {
    cursor: grabbing;
    transition: none;
}

/* Collimator */
.collimator-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collimator-rect {
    border: 1px solid rgba(0, 229, 255, 0.4);
    position: relative;
    box-shadow: 0 0 0 3000px rgba(0, 0, 0, 0.48);
    transition: width 0.1s, height 0.1s;
}

.collimator-rect::before,
.collimator-rect::after {
    content: '';
    position: absolute;
    background: rgba(0, 229, 255, 0.45);
}

.collimator-rect::before { top: 50%; left: 0; right: 0; height: 1px; }
.collimator-rect::after { left: 50%; top: 0; bottom: 0; width: 1px; }

/* HUD Overlays */
.hud-top-left {
    position: absolute;
    top: 48px;
    left: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    pointer-events: none;
    line-height: 1.35;
}

.hud-bottom-right {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: rgba(4, 7, 14, 0.85);
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #1e2c40;
    pointer-events: none;
    line-height: 1.35;
}

/* Trigger Deck */
.trigger-deck {
    background: #080d16;
    border: 1.5px solid #1a2538;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lamp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.lamp-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1f2a3a;
    border: 1px solid #364964;
    transition: all 0.2s;
}

.lamp-led.ready { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.lamp-led.xray { background: var(--accent-amber); box-shadow: 0 0 14px var(--accent-amber); }

.btn-trigger {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff5252 0%, #b71c1c 70%, #4a0606 100%);
    border: 4px solid #24334a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.4);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.05s;
}

.btn-trigger:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.btn-trigger span {
    font-size: 0.6rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Report Card & Guide */
.report-card {
    background: #080d16;
    border: 1px solid var(--border-ui);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-badge {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-ideal { background: rgba(0, 230, 118, 0.15); color: var(--accent-green); border: 1px solid var(--accent-green); }
.badge-sub { background: rgba(255, 171, 0, 0.15); color: var(--accent-amber); border: 1px solid var(--accent-amber); }
.badge-super { background: rgba(255, 23, 68, 0.15); color: var(--accent-red); border: 1px solid var(--accent-red); }

.report-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-dim);
    border-bottom: 1px dashed #172232;
    padding-bottom: 2px;
}

.report-row span:last-child {
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
}

.btn-toggle-guide {
    background: #152236;
    border: 1px solid #263852;
    color: var(--accent-cyan);
    padding: 6px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-toggle-guide:hover {
    background: #1c2e4a;
    border-color: var(--accent-cyan);
}

.guide-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #050810;
    border-radius: 5px;
    border: 1px solid transparent;
}

.guide-drawer.open {
    max-height: 170px;
    border-color: #21324a;
    overflow-y: auto;
}

.guide-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.7rem;
    line-height: 1.35;
}

.guide-item strong {
    color: var(--accent-cyan);
}

.image-info-box {
    padding: 8px;
    border-top: 1px solid var(--border-ui);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #050810;
}

.flash-screen {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    transition: opacity 0.08s ease-out;
}

.flash-screen.active {
    opacity: 0.95;
}

@media (max-width: 1024px) {
    body {
        height: auto;
        max-height: none;
        overflow-y: auto;
    }
    .workspace {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .viewport-area {
        min-height: 460px;
    }
}



/* abaixo é so do chargelog.html */

 
