/* =============================================
   LICZNIKI (Lista licznikow) — Meter List Page
   PX source: Liczniki_Tab_E_DEMO.px
   ============================================= */

/* Breadcrumb icon filter (same as pomiar) */
.bc-liczniki .breadcrumb-icon {
    filter: brightness(0) invert(0.5);
}

/* Submenu item needs position:relative so badge can position inside it */
.submenu-item {
    position: relative;
}

/* Subscript badge on submenu icon (PX: BoundLabel "1" at 175,225 — bold 12pt white) */
.submenu-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: white;
    line-height: 1;
    pointer-events: none;
}

/* === Scrollable content area (PX: ScrollPane viewSize 1762x1650) === */
.licz-scroll {
    position: absolute;
    left: 0;
    top: 50px;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Wewnetrzna wysokosc — kolumny sa absolute, wiec rodzic ich nie widzi.
   25 wierszy + separatory + margines = ~1380px */
#tab-energy, #tab-water, #tab-gas {
    position: relative;
    min-height: 1400px;
}

.licz-scroll::-webkit-scrollbar {
    width: 8px;
}

.licz-scroll::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.licz-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

/* === Layout: left gauge+analizator panel === */
.licz-left {
    position: absolute;
    left: 85px;
    top: 35px;
    width: 490px;
}

/* Override gauge card width when inside licz-left */
.licz-left .gauge-card {
    width: 490px;
}

/* === Analizator parametrow sieci RG2 (PX: 490x670 at 85,345) === */
.licz-analizator {
    position: relative;
    width: 490px;
    height: 670px;
    background: #262626;
    margin-top: 15px;
}

.licz-analizator .an-title {
    position: absolute;
    left: 30px;
    top: 15px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #b0aeae;
}

.licz-analizator .an-line-green {
    position: absolute;
    left: 25px;
    top: 48px;
    width: 440px;
    height: 1px;
    background: #69fe5f;
}

/* Analizator rows: label + value + chart icon */
.licz-analizator .an-row {
    position: absolute;
    left: 0;
    width: 490px;
    height: 25px;
}

.licz-analizator .an-row .an-label {
    position: absolute;
    left: 50px;
    top: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    white-space: nowrap;
}

.licz-analizator .an-row .an-value {
    position: absolute;
    left: 310px;
    top: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: white;
    white-space: nowrap;
}

.licz-analizator .an-row .an-chart {
    position: absolute;
    left: 420px;
    top: 4px;
    width: 15px;
    height: 15px;
    opacity: 0.7;
    cursor: pointer;
}

/* Vertical separator at x=410 */
.licz-analizator .an-vsep {
    position: absolute;
    left: 410px;
    width: 1px;
    background: #b0aeae;
}

/* Section title (centered full-width) */
.licz-analizator .an-section {
    position: absolute;
    left: 0;
    width: 490px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    text-align: center;
}

/* Section title (left-aligned with padding) */
.licz-analizator .an-section-left {
    position: absolute;
    left: 35px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    white-space: nowrap;
}

/* Phase gauges container (PX: 3x G_Gauge at y=200) */
.an-gauges {
    position: absolute;
    left: 0;
    top: 200px;
    width: 490px;
    height: 125px;
}

.an-gauge-box {
    position: absolute;
    width: 135px;
    height: 125px;
}

.an-gauge-box:nth-child(1) { left: 40px; }
.an-gauge-box:nth-child(2) { left: 180px; }
.an-gauge-box:nth-child(3) { left: 320px; }

/* Gauge SVG — G_Gauge.px 160x160 fitRatio in 135x125 → 125x125, centered +5px */
.an-gauge-box .an-gauge-img {
    position: absolute;
    left: 5px; top: 0;
    width: 125px; height: 125px;
    object-fit: contain;
}

/* % number overlay — PX: (32,60,82,50) × 0.78 + 5px offset = (30,47,64,39), font 45×0.78=35px */
.an-gauge-box .an-gauge-pct {
    position: absolute;
    left: 30px; top: 47px;
    width: 64px; height: 39px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 35px;
    font-weight: 300;
    color: white;
    white-space: nowrap;
    line-height: 1;
    overflow: visible;
}

/* % sign — PX: (90,79) rel to pct (32,60) → (58,19) × 0.78 = (45,15), font 20×0.78=16px */
.an-gauge-pct .an-gauge-pct-sign {
    position: absolute;
    left: 45px; top: 15px;
    width: 28px; height: 23px;
    font-size: 16px;
    font-weight: 300;
    line-height: 23px;
}

/* kW value overlay — PX: (20,110,120,40) × 0.78 + 5px = (21,86,94,31), font 22×0.78=17px */
.an-gauge-box .an-gauge-kw {
    position: absolute;
    left: 21px; top: 86px;
    width: 94px; height: 31px;
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 300;
    color: white;
    text-align: center;
    white-space: nowrap;
    line-height: 31px;
}

/* Phase labels L1/L2/L3 — PX: (x,225,135,25) overlay on gauge at y=25 within box */
.an-gauge-label {
    position: absolute;
    left: 0; top: 25px;
    width: 135px; height: 25px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 16px;
    color: white;
    text-align: center;
    line-height: 25px;
}

/* Horizontal separator lines within sections */
.an-hsep {
    position: absolute;
    height: 1px;
    background: #b0aeae;
}

/* Phase measurement rows (3 columns: left/mid/right) */
.an-phase-row {
    position: absolute;
    width: 490px;
    height: 25px;
}

.an-phase-row .an-ph-label {
    position: absolute;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #b0aeae;
    text-align: right;
    width: 40px;
}

.an-phase-row .an-ph-value {
    position: absolute;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: white;
}

.an-phase-row .an-ph-chart {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0.7;
    cursor: pointer;
}

/* Summary rows at bottom */
.an-summary-row {
    position: absolute;
    left: 0;
    width: 490px;
    height: 25px;
}

.an-summary-row .an-sum-label {
    position: absolute;
    left: 50px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    white-space: nowrap;
}

.an-summary-row .an-sum-value {
    position: absolute;
    left: 330px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: white;
    white-space: nowrap;
}

.an-summary-row .an-sum-chart {
    position: absolute;
    left: 420px;
    top: 4px;
    width: 15px;
    height: 15px;
    opacity: 0.7;
    cursor: pointer;
}

/* === Meter columns (PX: x=625 left col, x=1165 right col) === */
.licz-col-l {
    position: absolute;
    left: 625px;
    top: 35px;
    width: 490px;
}

.licz-col-r {
    position: absolute;
    left: 1165px;
    top: 35px;
    width: 490px;
}

/* Separator between meter groups */
.licz-group-sep { height: 12px; }

/* === Meter row — 490x40 === */
.licz-row {
    position: relative;
    width: 490px;
    height: 40px;
    background: #262626;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

/* Bottom accent line */
.licz-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
}

.licz-row-e::after {
    background: #69fe5f;
}

.licz-row-w::after {
    background: #5fc1fe;
}

.licz-row-g::after {
    background: #fef95f;
}

/* === Meter row content elements === */

/* Energy row: full name label */
.licz-name {
    color: #b0aeae;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 14px;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

/* Energy row separator at x=195 */
.licz-name-sep {
    width: 1px;
    height: 26px;
    background: #545454;
    margin: 0 0;
    flex-shrink: 0;
    position: absolute;
    left: 195px;
}

/* Energy kW value */
.licz-kw {
    color: rgba(255,255,255,0.9);
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 14px;
    width: 70px;
    text-align: right;
    padding-right: 9px;
    flex-shrink: 0;
}

/* Energy kWh value */
.licz-kwh {
    color: rgba(255,255,255,0.9);
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 14px;
    width: 95px;
    text-align: right;
    padding-right: 5px;
    flex-shrink: 0;
}

/* Alarm checkmark icon */
.licz-alarm {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 5px;
}

/* Chart icon */
.licz-chart {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 10px;
    margin-right: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.licz-chart:hover {
    opacity: 1;
}

/* Water m3 value column (single value instead of kW+kWh) */
.licz-m3 {
    color: rgba(255,255,255,0.9);
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 14px;
    width: 145px;
    text-align: right;
    padding-right: 5px;
    flex-shrink: 0;
}

/* Water gauge card labels (PX: panel_woda 250,170/190 — 16pt Roboto Light) */
.gc-water-label1 {
    position: absolute;
    left: 250px;
    top: 170px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    white-space: nowrap;
}

.gc-water-label2 {
    position: absolute;
    left: 250px;
    top: 190px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #b0aeae;
    white-space: nowrap;
}
