        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: linear-gradient(135deg, #e9eafc 0%, #f5f7fa 100%);
            margin: 0;
            padding: 0 3vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
        }
        h1 {
            color: #1a237e;
            margin-top: 40px;
            font-size: 2.4em;
            letter-spacing: 2px;
        }
        .app-title {
            font-size: 2em;
            text-align: center;
            margin-bottom: 10px;
            margin-top: 22px;
        }
        .page-footer-block {
            width: 100%;
            box-sizing: border-box;
        }
        .stats-block {
            text-align: center;
            margin-top: 20px;
            padding: 15px;
            background: rgba(26,35,126,0.05);
            border-radius: 10px;
        }
        .contact-block {
            text-align: center;
            margin: 32px 0 8px 0;
            font-size: 1em;
            color: #c5cae9;
        }
        .promo-block {
            text-align: center;
            margin: 18px 0 6px 0;
            font-size: 0.82em;
            color: #78909c;
            line-height: 1.45;
        }
        .promo-block a {
            color: #5c6bc0;
            text-decoration: none;
            font-weight: 500;
        }
        .promo-block a:hover {
            text-decoration: underline;
        }
        .calc-layout {
            display: block;
        }
        .calc-panel--output .result-box {
            margin-top: 32px;
        }
        .placa-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-top: 18px;
            flex-wrap: wrap;
        }
        .placa-label-row label {
            margin-top: 0;
        }
        .top-actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            margin: 0 0 10px;
            flex-wrap: wrap;
        }
        #install-container {
            display: none;
            margin: 0;
        }
        #btn-sugerir-placa {
            background: #5c6bc0;
            color: #fff;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.9em;
            cursor: pointer;
            font-weight: 500;
            width: auto;
            margin-top: 0;
            box-shadow: none;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        #btn-sugerir-placa:hover {
            background: #3f51b5;
            box-shadow: none;
        }
        .container {
            background: #fff;
            padding: 36px 44px 32px 44px;
            border-radius: 18px;
            box-shadow: 0 4px 24px rgba(26,35,126,0.10), 0 1.5px 6px rgba(26,35,126,0.07);
            margin-top: 30px;
            min-width: 340px;
            max-width: 420px;
            width: 100%;
        }
        label {
            display: block;
            margin-top: 18px;
            font-weight: 500;
            color: #c5cae9;
            font-size: 1.08em;
        }
        input[type="number"], select {
            width: 100%;
            padding: 10px 12px;
            margin-top: 6px;
            border: 1.5px solid #bfc6e0;
            border-radius: 7px;
            font-size: 1em;
            background: #f7f8fc;
            transition: border 0.2s, box-shadow 0.2s;
        }
        input[type="number"]:focus, select:focus {
            border: 1.5px solid #1a237e;
            outline: none;
            box-shadow: 0 0 0 2px #e3e6fa;
        }
        input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: #1a237e;
        }
        button {
            margin-top: 28px;
            padding: 12px 0;
            background: linear-gradient(90deg, #1a237e 60%, #3949ab 100%);
            color: #fff;
            border: none;
            border-radius: 7px;
            font-size: 1.15em;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
            box-shadow: 0 2px 8px rgba(26,35,126,0.08);
            transition: background 0.2s, box-shadow 0.2s;
        }
        button:hover {
            background: linear-gradient(90deg, #3949ab 60%, #1a237e 100%);
            box-shadow: 0 4px 16px rgba(26,35,126,0.13);
        }
        .placa-custom-dropdown {
            position: relative;
            width: 100%;
            margin-top: 6px;
            border: 1.5px solid #bfc6e0;
            border-radius: 7px;
            background: #f7f8fc;
            font-size: 0.95em;
        }
        .placa-custom-dropdown:focus { outline: none; border-color: #1a237e; box-shadow: 0 0 0 2px #e3e6fa; }
        .placa-trigger {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 12px;
            cursor: pointer;
            color: #c5cae9;
            min-height: 42px;
        }
        .placa-trigger .placa-col { white-space: nowrap; }
        .placa-trigger .placa-col-pitch { font-weight: 600; color: #1a237e; }
        .placa-trigger .placa-col-dims:not(:empty)::before,
        .placa-trigger .placa-col-pixels:not(:empty)::before { content: ' · '; font-weight: normal; color: #888; }
        .placa-list {
            display: none;
            position: absolute;
            left: 0;
            right: 0;
            top: 100%;
            margin-top: 2px;
            max-height: 240px;
            overflow-y: auto;
            background: #fff;
            border: 1.5px solid #bfc6e0;
            border-radius: 7px;
            box-shadow: 0 6px 20px rgba(26,35,126,0.12);
            z-index: 100;
        }
        .placa-list.open { display: block; }
        .placa-option {
            display: grid;
            grid-template-columns: 1.8fr 2fr 1.5fr;
            gap: 12px;
            padding: 10px 12px;
            cursor: pointer;
            color: #c5cae9;
            border-bottom: 1px solid #eee;
            align-items: center;
        }
        .placa-option:last-child { border-bottom: none; }
        .placa-option:hover { background: #e8eaf6; }
        .placa-option .placa-col-pitch { font-weight: 600; color: #1a237e; }
        .placa-option .placa-col { white-space: nowrap; }
        .grupo-dropdown {
            position: relative;
            width: 100%;
            margin-top: 6px;
            margin-bottom: 8px;
            border: 1.5px solid #bfc6e0;
            border-radius: 7px;
            background: #f7f8fc;
            font-size: 0.95em;
        }
        .grupo-dropdown:focus { outline: none; border-color: #1a237e; box-shadow: 0 0 0 2px #e3e6fa; }
        .grupo-trigger {
            display: flex;
            align-items: center;
            padding: 10px 12px;
            cursor: pointer;
            color: #c5cae9;
            min-height: 42px;
            font-weight: 600;
            color: #1a237e;
        }
        .grupo-list {
            display: none;
            position: absolute;
            left: 0;
            right: 0;
            top: 100%;
            margin-top: 2px;
            max-height: 240px;
            overflow-y: auto;
            background: #fff;
            border: 1.5px solid #bfc6e0;
            border-radius: 7px;
            box-shadow: 0 6px 20px rgba(26,35,126,0.12);
            z-index: 101;
        }
        .grupo-list.open { display: block; }
        .grupo-option {
            padding: 10px 12px;
            cursor: pointer;
            color: #c5cae9;
            border-bottom: 1px solid #eee;
            font-weight: 500;
        }
        .grupo-option:last-child { border-bottom: none; }
        .grupo-option:hover { background: #e8eaf6; }
        .grupo-option.selected { font-weight: 600; color: #1a237e; }
        .result-box {
            margin-top: 32px;
            background: #f7f8fc;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(26,35,126,0.07);
            padding: 24px 20px 18px 20px;
            color: #1a237e;
            font-size: 1.18em;
            font-weight: 500;
            letter-spacing: 0.2px;
        }
        .result-box b {
            color: #c5cae9;
            font-weight: 700;
        }
        .result-box .cabeamento-section {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid #d8dce8;
            font-size: 0.92em;
            line-height: 1.55;
        }
        .result-box .cabeamento-section .titulo {
            font-weight: 700;
            color: #1a237e;
            font-size: 1.05em;
        }
        .cabeamento-titulo-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 2px;
        }
        .btn-manual-rj {
            margin: 0;
            width: auto;
            padding: 5px 12px;
            font-size: 0.78em;
            font-weight: 600;
            background: #fff;
            color: #3949ab;
            border: 1.5px solid #3949ab;
            border-radius: 6px;
            cursor: pointer;
            box-shadow: none;
        }
        .btn-manual-rj:hover {
            background: #eef0f8;
        }
        .rj-manual-warn {
            color: #c62828;
            font-weight: 600;
        }
        .result-box .cabeamento-section .sub {
            color: #666;
            font-size: 0.88em;
            display: block;
            margin: 4px 0 10px 0;
        }
        .result-box .cabeamento-section .porta-item {
            margin: 6px 0;
            padding: 8px 10px;
            background: #eef0f8;
            border-radius: 6px;
            font-size: 0.95em;
        }
        .result-box .cabeamento-section .dica {
            color: #666;
            font-size: 0.85em;
            margin-top: 10px;
            display: block;
        }
        .cabeamento-grid-wrap {
            margin: 14px 0 12px 0;
            background: #fff;
            border: 1px solid #d8dce8;
            border-radius: 8px;
            padding: 10px;
            overflow-x: auto;
        }
        .cabeamento-svg {
            display: block;
            width: 100%;
            max-width: 100%;
            height: auto;
            margin: 0 auto;
        }
        .cabeamento-legenda {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 16px;
            margin-top: 10px;
            font-size: 0.88em;
        }
        .cabeamento-legenda span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .cabeamento-legenda i {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 3px;
            font-style: normal;
        }
        .cabeamento-resumo {
            margin-top: 12px;
            padding: 10px 12px;
            background: #eef0f8;
            border-radius: 6px;
            font-size: 0.92em;
            line-height: 1.8;
        }
        .btn-cabeamento-alt {
            display: block;
            width: 100%;
            margin: 12px 0 4px 0;
            padding: 10px 14px;
            background: #fff;
            color: #3949ab;
            border: 1.5px solid #3949ab;
            border-radius: 7px;
            font-size: 0.9em;
            font-weight: 600;
            cursor: pointer;
        }
        .btn-cabeamento-alt:hover {
            background: #eef0f8;
        }
        .cabeamento-badge {
            display: inline-block;
            margin-left: 8px;
            padding: 2px 8px;
            background: #e8eaf6;
            color: #3949ab;
            border-radius: 4px;
            font-size: 0.85em;
            font-weight: 600;
        }
        .eletrico-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 10px 0 8px 0;
            align-items: center;
        }
        .cab-modo-toolbar {
            flex-wrap: nowrap;
        }
        .cab-modo-toolbar .btn-eletrico,
        .cab-modo-toolbar .btn-cabeamento-alt,
        .cab-modo-toolbar .topo-livre-ctl {
            flex: 1 1 0;
            width: auto;
            margin: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            line-height: 1.25;
            white-space: normal;
        }
        .topo-livre-ctl {
            position: relative;
            display: inline-flex;
            align-items: stretch;
            min-width: 0;
        }
        .topo-livre-ctl > .btn-eletrico {
            flex: 1 1 auto;
            min-width: 0;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        .topo-help {
            flex: 0 0 28px;
            width: 28px;
            min-width: 28px;
            margin: 0 0 0 -1.5px;
            padding: 0;
            border: 1.5px solid #3949ab;
            border-radius: 0 7px 7px 0;
            background: #fff;
            color: #3949ab;
            font-weight: 700;
            font-size: 0.95em;
            line-height: 1;
            cursor: help;
            box-shadow: none;
        }
        .topo-help:hover {
            background: #eef0f8;
        }
        .topo-livre-ctl.ativo .topo-help {
            background: #3949ab;
            color: #fff;
        }
        .topo-help-pop {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            z-index: 30;
            width: min(280px, 78vw);
            padding: 10px 28px 10px 12px;
            background: #1a237e;
            color: #fff;
            border-radius: 8px;
            font-size: 0.78em;
            font-weight: 500;
            line-height: 1.45;
            text-align: left;
            white-space: normal;
            box-shadow: 0 8px 24px rgba(26,35,126,0.28);
        }
        .topo-help-x {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 22px;
            height: 22px;
            min-width: 22px;
            margin: 0;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: #ffeb3b;
            color: #1a237e;
            font-size: 16px;
            font-weight: 700;
            line-height: 22px;
            cursor: pointer;
            box-shadow: none;
        }
        .topo-help-x:hover {
            background: #fff59d;
        }
        .topo-livre-ctl:hover .topo-help-pop,
        .topo-livre-ctl.aberto .topo-help-pop {
            display: block;
        }
        .topo-livre-ctl.topo-fechado:hover .topo-help-pop {
            display: none;
        }
        .topo-livre-ctl.topo-fechado.aberto .topo-help-pop {
            display: block;
        }
        .eletrico-toolbar .btn-eletrico {
            margin: 0;
            width: auto;
            padding: 8px 12px;
            font-size: 0.85em;
            background: #fff;
            color: #3949ab;
            border: 1.5px solid #3949ab;
            border-radius: 7px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: none;
        }
        .eletrico-toolbar .btn-eletrico:hover {
            background: #eef0f8;
        }
        .eletrico-toolbar .btn-eletrico.ativo {
            background: #3949ab;
            color: #fff;
        }
        .eletrico-toolbar .btn-eletrico.danger {
            color: #c62828;
            border-color: #c62828;
        }
        .eletrico-toolbar .btn-eletrico.btn-tomada-num {
            min-width: 36px;
            padding: 8px 10px;
            font-variant-numeric: tabular-nums;
        }
        .eletrico-hint {
            color: #666;
            font-size: 0.82em;
            margin: 0 0 10px 0;
            line-height: 1.4;
        }
        .eletrico-svg rect.elec-cell {
            cursor: pointer;
        }
        .eletrico-svg rect.elec-cell:hover {
            filter: brightness(0.92);
        }
        #eletrico-grid-wrap,
        #rj-manual-grid-wrap {
            touch-action: none;
            user-select: none;
        }
        .rj-manual-svg rect.rj-cell {
            cursor: pointer;
        }
        .rj-manual-svg rect.rj-cell:hover {
            filter: brightness(0.92);
        }
        #rj-manual-grid-wrap,
        #rj-manual-grid-wrap * {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }
        .input-row {
            display: flex;
            gap: 10px;
            width: 100%;
        }
        .input-row input[type="number"] {
            width: 48%;
            min-width: 0;
            display: inline-block;
        }
        @media (min-width: 769px) {
            body {
                padding: 0 32px 40px;
            }
            h1.app-title {
                font-size: 2.4em;
                margin-top: 36px;
                margin-bottom: 16px;
            }
            .container {
                max-width: 920px;
                min-width: unset;
                width: 100%;
                padding: 40px 48px 36px;
                margin-top: 24px;
            }
            .calc-layout {
                display: grid;
                grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
                gap: 40px;
                align-items: start;
            }
            .calc-panel--output .result-box {
                margin-top: 0;
                min-height: 120px;
            }
            .calc-panel--output .result-box:empty {
                min-height: 0;
                padding: 0;
                margin: 0;
                background: transparent;
                box-shadow: none;
            }
            .page-footer-block {
                max-width: 920px;
            }
            .stats-block {
                margin-top: 28px;
                padding: 18px 24px;
            }
            .result-box {
                font-size: 1.05em;
                padding: 28px 24px 22px;
            }
            .cabeamento-grid-wrap {
                padding: 14px;
            }
            .btn-cabeamento-alt {
                width: auto;
                display: inline-block;
                margin-right: 10px;
            }
            #ios-install-banner {
                max-width: 920px;
                width: 100%;
            }
            .top-actions {
                flex-wrap: nowrap;
            }
            .top-actions #install-container {
                width: auto;
                max-width: none;
            }
        }
        .metricas {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 6px;
        }
        .metrica {
            display: inline-flex;
            align-items: baseline;
            gap: 4px;
            background: #fff;
            border: 1px solid #e3e6f5;
            border-radius: 6px;
            padding: 2px 7px;
            line-height: 1.3;
            min-width: 0;
        }
        .metrica span {
            font-size: 0.68em;
            font-weight: 600;
            color: #78909c;
        }
        .metrica b {
            font-size: 0.82em;
            color: #1a237e;
            font-weight: 700;
        }
        .metrica-destaque {
            background: #e8eaf6;
            border-color: #c5cae9;
        }
        .field-grupo label {
            margin-top: 0;
        }
        @media (max-width: 768px) {
            body {
                padding: 0 8px 12px;
            }
            h1.app-title {
                font-size: 1.25em !important;
                margin: 8px 0 4px !important;
                letter-spacing: 0.5px;
            }
            .top-actions {
                margin: 0 0 6px;
            }
        #btn-sugerir-placa,
        #btn-add-painel,
        #btn-resetar,
        #btn-pdf-evento,
        #install-button {
                padding: 4px 10px !important;
                font-size: 0.75em !important;
                margin-top: 0 !important;
                width: auto !important;
            }
            .container {
                padding: 10px 10px 12px;
                min-width: 0;
                max-width: 100%;
                width: 100%;
                margin-top: 0;
                border-radius: 12px;
                box-shadow: 0 2px 10px rgba(26,35,126,0.08);
            }
            #form-calc {
                display: grid;
                grid-template-columns: 1fr 1.15fr;
                column-gap: 8px;
                row-gap: 2px;
                align-items: start;
            }
            .field-grupo,
            #placa-section {
                min-width: 0;
            }
            #manual-inputs,
            .calc-controls {
                grid-column: 1 / -1;
            }
            label, .inline-label-select label {
                font-size: 0.72em;
                margin-top: 0;
            }
            .placa-label-row {
                margin-top: 0;
                gap: 4px;
            }
            .grupo-dropdown,
            .placa-custom-dropdown {
                margin-top: 2px;
                margin-bottom: 0;
                font-size: 0.8em;
            }
            .grupo-trigger,
            .placa-trigger {
                min-height: 32px;
                padding: 5px 8px;
                overflow: hidden;
            }
            .placa-trigger .placa-col {
                overflow: hidden;
                text-overflow: ellipsis;
            }
            input[type="number"], select {
                font-size: 0.9em;
                padding: 6px 8px;
                margin-top: 2px;
                border-radius: 6px;
            }
            .tipo-row {
                margin-top: 6px !important;
            }
            .tipo-row label {
                font-size: 0.78em !important;
            }
            .dims-and-go {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 8px;
                align-items: end;
            }
            .dims-and-go > button,
            #form-calc > button {
                margin-top: 0;
                width: auto;
                min-width: 96px;
                height: 36px;
                padding: 0 12px;
                font-size: 0.92em;
                border-radius: 7px;
                align-self: end;
            }
            #qtd-gabinetes label,
            #qtd-metros label {
                margin-top: 4px;
            }
            .input-row {
                gap: 6px;
            }
            .input-row input[type="number"] {
                width: 50%;
                font-size: 0.9em;
                padding: 6px 8px;
            }
            input[type="checkbox"] {
                width: 15px;
                height: 15px;
            }
            .result-box {
                padding: 8px;
                font-size: 0.9em;
                margin-top: 8px;
                border-radius: 8px;
                box-shadow: none;
                background: transparent;
            }
            .calc-panel--output .result-box {
                margin-top: 8px;
            }
            .calc-panel--output .result-box:empty {
                display: none;
            }
            .result-box .cabeamento-section {
                margin-top: 8px;
                padding-top: 8px;
                font-size: 0.88em;
            }
            .cabeamento-grid-wrap {
                margin: 6px 0;
                padding: 6px;
            }
            .cabeamento-legenda {
                gap: 4px 10px;
                margin-top: 6px;
                font-size: 0.8em;
            }
            .cabeamento-resumo {
                margin-top: 6px;
                padding: 6px 8px;
                line-height: 1.45;
            }
            .eletrico-toolbar {
                gap: 6px;
                margin: 6px 0;
            }
            .eletrico-toolbar .btn-eletrico {
                padding: 6px 8px;
                font-size: 0.75em;
            }
            .eletrico-hint {
                font-size: 0.75em;
                margin: 0;
            }
            .btn-cabeamento-alt {
                margin: 6px 0 2px;
                padding: 7px 10px;
                font-size: 0.82em;
            }
        }
        /* Alinhar label e select na mesma linha para 'Quantidade de:' */
        .inline-label-select {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 18px;
        }
        .inline-label-select label {
            margin: 0;
            font-weight: 500;
            color: #c5cae9;
            font-size: 1.08em;
        }
        .layout-debug {
            margin: 12px 0 28px 0;
            padding: 8px 14px;
            font-size: 0.88em;
            color: #546e7a;
            text-align: center;
        }
        .pdf-block {
            text-align: center;
            margin: 24px 0 8px 0;
            display: none;
        }
        .pdf-block.visible {
            display: block;
        }
        #btn-baixar-pdf {
            width: auto;
            min-width: 220px;
            margin-top: 0;
            padding: 12px 22px;
            background: linear-gradient(90deg, #c62828 0%, #e53935 100%);
            font-size: 1em;
        }
        #btn-baixar-pdf:hover {
            background: linear-gradient(90deg, #e53935 0%, #c62828 100%);
        }
        #form-sugerir-placa label {
            margin-top: 14px;
            font-size: 0.95em;
        }
        #form-sugerir-placa .sug-hint {
            display: block;
            margin-top: 2px;
            font-size: 0.8em;
            font-weight: 400;
            color: #607d8b;
            line-height: 1.35;
        }
        #form-sugerir-placa input[type="text"],
        #form-sugerir-placa input[type="number"] {
            width: 100%;
            box-sizing: border-box;
        }
        .sug-card {
            background: #fff;
            border-radius: 16px;
            max-width: 440px;
            width: 100%;
            max-height: min(92vh, 760px);
            overflow: auto;
            padding: 22px 22px 18px;
            box-shadow: 0 8px 32px rgba(26,35,126,0.2);
            box-sizing: border-box;
        }
        .sug-exemplo {
            background: #e8eaf6;
            color: #c5cae9;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 0.86em;
            line-height: 1.45;
            margin: 0 0 4px 0;
        }
        .sug-parecida {
            margin-top: 12px;
            padding: 12px;
            background: #fff8e1;
            border: 1px solid #ffe082;
            border-radius: 8px;
            color: #4e342e;
            font-size: 0.9em;
            line-height: 1.4;
        }
        .sug-parecida p {
            margin: 0 0 10px 0;
        }
        .sug-parecida button {
            margin-top: 8px;
            font-size: 0.92em;
        }
        #sug-parecida-sim {
            background: #2e7d32;
        }
        #sug-parecida-nao {
            background: #455a64;
        }
        .pdf-hint {
            margin: 8px 0 0 0;
            font-size: 0.85em;
            color: #666;
        }
        body {
            background: #12151c;
            color: #e8eaf6;
            color-scheme: dark;
        }
        h1, h2, .app-title { color: #e8eaf6; }
        .container, .sug-card {
            background: #1c2230;
            box-shadow: 0 8px 28px rgba(0,0,0,0.35);
        }
        label, .inline-label-select label, .contact-block { color: #c5cae9; }
        .promo-block { color: #9aa3c2; }
        .promo-block a { color: #9fa8da; }
        .stats-block { background: #1c2230; }
        input[type="number"], input[type="text"], select,
        .placa-custom-dropdown, .grupo-dropdown {
            background: #12151c;
            color: #e8eaf6;
            border-color: #3d4663;
        }
        input::placeholder { color: #7b849e; }
        input[type="number"]:focus, input[type="text"]:focus, select:focus,
        .placa-custom-dropdown:focus, .grupo-dropdown:focus {
            border-color: #7986cb;
            box-shadow: 0 0 0 2px rgba(121,134,203,0.35);
        }
        .placa-trigger, .grupo-trigger, .placa-option, .grupo-option { color: #e8eaf6; }
        .placa-trigger .placa-col-pitch,
        .placa-option .placa-col-pitch,
        .grupo-trigger,
        .grupo-option.selected,
        .result-box,
        .result-box b,
        .result-box .cabeamento-section .titulo,
        .metrica b { color: #e8eaf6; }
        .placa-list, .grupo-list {
            background: #1c2230;
            border-color: #3d4663;
        }
        .placa-option, .grupo-option { border-bottom-color: #2c3348; }
        .placa-option:hover, .grupo-option:hover { background: #2a3148; }
        .result-box { background: transparent; box-shadow: none; }
        .result-box .cabeamento-section { border-top-color: #3d4663; }
        .cabeamento-grid-wrap, .metrica {
            background: #12151c;
            border-color: #3d4663;
        }
        .metrica span, .eletrico-hint, .pdf-hint, #form-sugerir-placa .sug-hint { color: #9aa3c2; }
        .metrica-destaque {
            background: #2a3148;
            border-color: #5c6bc0;
        }
        .cabeamento-resumo, .cabeamento-badge {
            background: #2a3148;
            color: #e8eaf6;
        }
        .cabeamento-badge { color: #9fa8da; }
        .btn-manual-rj,
        .btn-cabeamento-alt,
        .eletrico-toolbar .btn-eletrico,
        .topo-help {
            background: #1c2230;
            color: #9fa8da;
            border-color: #7986cb;
        }
        .btn-manual-rj:hover,
        .btn-cabeamento-alt:hover,
        .eletrico-toolbar .btn-eletrico:hover,
        .topo-help:hover { background: #2a3148; }
        .eletrico-toolbar .btn-eletrico.ativo,
        .topo-livre-ctl.ativo .topo-help {
            background: #3949ab;
            color: #fff;
        }
        .sug-exemplo { background: #2a3148; color: #e8eaf6; }
        .sug-parecida {
            background: #3a3220;
            border-color: #8d6e2f;
            color: #ffe082;
        }
        .rj-manual-warn { color: #ef9a9a; }
        .eletrico-toolbar .btn-eletrico.danger {
            color: #ef9a9a;
            border-color: #ef9a9a;
        }
        #btn-add-painel,
        #btn-resetar,
        #btn-pdf-evento {
            background: #3949ab;
            color: #fff;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.9em;
            cursor: pointer;
            font-weight: 500;
            width: auto;
            margin-top: 0;
            box-shadow: none;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
        }
        #btn-resetar {
            background: transparent;
            color: #ef9a9a;
            border: 1.5px solid #ef9a9a;
        }
        #btn-pdf-evento { background: #c62828; }
        .app-dialog { max-width: 380px; }
        .app-dialog h2 {
            margin: 0 0 8px;
            color: #e8eaf6;
            font-size: 1.15em;
        }
        .app-dialog p {
            margin: 0;
            color: #9aa3c2;
            font-size: 0.95em;
            line-height: 1.45;
        }
        .app-dialog-acoes {
            display: flex;
            gap: 10px;
            margin-top: 18px;
        }
        .app-dialog-acoes button {
            flex: 1;
            margin-top: 0;
            width: auto;
            padding: 10px 12px;
            font-size: 0.95em;
            box-shadow: none;
        }
        #resetar-cancelar {
            background: transparent;
            color: #c5cae9;
            border: 1.5px solid #3d4663;
        }
        #resetar-cancelar:hover { background: #2a3148; }
        #resetar-confirmar { background: #c62828; }
        #resetar-confirmar:hover { background: #b71c1c; }
        #btn-add-painel[hidden],
        #btn-pdf-evento[hidden],
        #btn-resetar[hidden] { display: none !important; }
        #paineis,
        .painel-item,
        .calc-instance {
            width: 100%;
            max-width: 920px;
            min-width: 0;
            box-sizing: border-box;
        }
        .painel-item,
        .calc-instance { max-width: 100%; }
        #paineis .container,
        #paineis .page-footer-block {
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }
        .painel-linha,
        .painel-tools { display: none; }
        .painel-item.fechado .calc-instance,
        .painel-item.fechado .painel-tools,
        .painel-item.unico .painel-linha,
        .painel-item.unico .painel-tools { display: none; }
        .painel-item.fechado .painel-linha {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            margin-top: 12px;
            padding: 8px 12px;
            background: #1c2230;
            border: 1px solid #3d4663;
            border-radius: 10px;
        }
        .painel-item:not(.unico):not(.fechado) .painel-tools {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            margin-top: 12px;
        }
        .painel-linha .nome { font-weight: 700; white-space: nowrap; }
        .painel-linha .tam {
            flex: 1;
            min-width: 0;
            color: #9aa3c2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.9em;
        }
        .painel-linha button,
        .painel-tools button {
            flex: 0 0 auto;
            width: auto;
            margin: 0;
            padding: 6px 10px;
            font-size: 0.85em;
            white-space: nowrap;
            box-shadow: none;
            background: transparent;
            color: #9fa8da;
            border: 1.5px solid #7986cb;
        }
        .painel-linha button.perigo,
        .painel-tools button.perigo {
            color: #ef9a9a;
            border-color: #ef9a9a;
        }
        .painel-linha button:hover,
        .painel-tools button:hover { background: #2a3148; }
