/**
 * Simulador de Lentes 3D - Estilos
 * Visualização Binocular (OD + OE)
 * Responsivo: Desktop, Mobile (iPhone), Totem Vertical
 */

/* ============ Reset & Base ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --panel-width: 460px;
    --primary-color: #4a9eff;
    --secondary-color: #ff9e4a;
    --bg-dark: #0f1722;
    --bg-panel: #1a2332;
    --bg-section: #1e2a3a;
    --border-color: #2a3a4a;
    --text-color: #e0e0e0;
    --text-muted: #8a9aaa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
}

/* ============ Layout Principal ============ */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
}

/* ============ Painel de Controles ============ */
.controls-panel {
    width: var(--panel-width);
    min-width: var(--panel-width);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #2a4a6a 0%, #1a3a5a 100%);
    border-bottom: 1px solid #3a5a7a;
}

.panel-header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header p {
    font-size: 11px;
    color: #8aa;
    margin-top: 2px;
}

/* ============ Sistema de Abas ============ */
.tabs-container {
    display: flex;
    background: #151d28;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    padding: 10px 6px;
    background: transparent;
    border: none;
    color: #6a7a8a;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    text-align: center;
}

.tab-btn:hover {
    color: #aabbcc;
    background: rgba(74, 158, 255, 0.1);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(74, 158, 255, 0.1);
}

/* ============ Conteúdo das Abas ============ */
.tab-content {
    display: none;
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.tab-content.active {
    display: block;
}

/* ============ Seções OD/OE ============ */
.binocular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.eye-section {
    background: var(--bg-section);
    border-radius: 6px;
    padding: 10px;
    border: 1px solid var(--border-color);
}

.eye-section.od {
    border-left: 3px solid var(--primary-color);
}

.eye-section.oe {
    border-left: 3px solid var(--secondary-color);
}

.eye-section h3 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eye-section.od h3 { color: var(--primary-color); }
.eye-section.oe h3 { color: var(--secondary-color); }

.badge {
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: normal;
}

.eye-section.od .badge { background: rgba(74,158,255,0.2); }
.eye-section.oe .badge { background: rgba(255,158,74,0.2); }

/* ============ Campos de Input ============ */
.field-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 4px;
}

.field-row label {
    flex: 0 0 42px;
    font-size: 9px;
    color: var(--text-muted);
}

.field-row input,
.field-row select {
    flex: 1;
    padding: 4px 5px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 11px;
    text-align: right;
}

.field-row select {
    text-align: left;
    cursor: pointer;
    appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%236a7a8a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
}

.field-row input:focus,
.field-row select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.field-row .unit {
    font-size: 8px;
    color: #6a7a8a;
    width: 14px;
}

/* ============ Seção Global ============ */
.section-box {
    background: var(--bg-section);
    border-radius: 6px;
    padding: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.section-title {
    font-size: 10px;
    font-weight: 600;
    color: #8aa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.inline-field label {
    font-size: 10px;
    color: var(--text-muted);
    min-width: 90px;
}

.inline-field input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 2px;
}

.inline-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.inline-field .value {
    font-size: 10px;
    color: var(--text-color);
    min-width: 40px;
    text-align: right;
}

/* ============ Toggle/Checkbox ============ */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-row label {
    font-size: 10px;
    color: #aabbcc;
}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 16px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 16px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background: #6a7a8a;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
    background: #fff;
}

/* ============ View Mode Selector ============ */
.view-mode-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.view-mode-option {
    flex: 1;
    cursor: pointer;
}

.view-mode-option input {
    display: none;
}

.view-mode-label {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #8899aa;
    transition: all 0.2s ease;
}

.view-mode-option input:checked + .view-mode-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.view-mode-option:hover .view-mode-label {
    border-color: var(--primary-color);
}

/* ============ Botões ============ */
.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4a9eff 0%, #2a7adf 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.btn-secondary {
    background: var(--border-color);
    color: #aabbcc;
}

.btn-secondary:hover {
    background: #3a4a5a;
}

/* ============ Model Select ============ */
.model-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236a7a8a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.model-select:hover {
    border-color: var(--primary-color);
}

.model-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.model-select option {
    background: #1a2a3a;
    color: #ccc;
    padding: 8px;
}

/* ============ Input File ============ */
.file-input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--bg-dark);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    color: #6a7a8a;
    font-size: 10px;
    transition: all 0.2s;
}

.file-input-wrapper:hover .file-input-label {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ============ Info da Armação ============ */
.frame-info {
    font-size: 9px;
    color: #6a8a9a;
    padding: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    margin-top: 8px;
}

.frame-info span {
    margin-right: 10px;
}

.frame-info strong {
    color: #aabbcc;
}

/* ============ Área de Renderização 3D ============ */
.render-area {
    flex: 1;
    position: relative;
    background: #0a0f16;
    min-height: 0; /* Important for flex sizing */
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#canvas-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ============ Labels dos Lados ============ */
.side-labels {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 60px;
    pointer-events: none;
    z-index: 10;
}

.side-label {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.side-label.od {
    background: rgba(74, 158, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(74, 158, 255, 0.4);
}

.side-label.oe {
    background: rgba(255, 158, 74, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(255, 158, 74, 0.4);
}

/* ============ Marca d'água ============ */
.watermark {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 100;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* ============ Toolbar Flutuante ============ */
.floating-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: rgba(26, 35, 50, 0.9);
    border: 1px solid var(--border-color);
    color: #8aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============ Info Overlay ============ */
.info-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.info-card {
    background: rgba(26, 35, 50, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 9px;
}

.info-card h4 {
    color: #8aa;
    margin-bottom: 2px;
    font-size: 8px;
    text-transform: uppercase;
}

.info-card .value {
    font-size: 12px;
    font-weight: 600;
}

.info-card.od .value { color: var(--primary-color); }
.info-card.oe .value { color: var(--secondary-color); }


/* ============ Cor da Lente ============ */
.lens-color-selector {
    margin-bottom: 8px;
}

.lens-color-selector select {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
}

.lens-color-selector select:hover {
    border-color: var(--primary-color);
}

.lens-color-selector select optgroup {
    background: var(--bg-card);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 11px;
}

.lens-color-selector select option {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4px;
}

.lens-color-info {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
}

.intensity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.intensity-row label {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 70px;
}

.intensity-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 2px;
}

.intensity-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.intensity-row .value {
    font-size: 11px;
    color: var(--text-light);
    min-width: 35px;
    text-align: right;
}

/* ============ Reflexo ============ */
.reflection-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.reflection-row label {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 70px;
}

.reflection-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 2px;
}

.reflection-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffcc44;
    cursor: pointer;
}

.reflection-row .value {
    font-size: 11px;
    color: var(--text-light);
    min-width: 35px;
    text-align: right;
}

.reflection-info {
    font-size: 10px;
    color: var(--text-muted);
    padding: 6px 8px;
    background: rgba(255, 204, 68, 0.1);
    border-radius: 4px;
    border-left: 2px solid #ffcc44;
}

/* ============ Cenário ============ */
.scene-selector {
    margin-bottom: 10px;
}

.scene-selector select {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
}

.scene-selector select:hover {
    border-color: var(--primary-color);
}

.custom-color-row,
.env-image-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.custom-color-row label,
.env-image-row label {
    font-size: 11px;
    color: var(--text-muted);
}

.custom-color-row input[type="color"] {
    width: 60px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-dark);
    cursor: pointer;
}

.custom-color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.custom-color-row input[type="color"]::-webkit-color-swatch {
    border-radius: 2px;
    border: none;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}

/* ============ Cor da Íris ============ */
.iris-section {
    margin-top: 10px;
}

.color-info {
    font-size: 9px;
    color: #6a7a8a;
    margin-top: 6px;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4a5a;
}

/* ============ Modo Tela Cheia ============ */
.fullscreen-mode .controls-panel {
    display: none !important;
}

.fullscreen-mode .render-area {
    width: 100vw;
    border: none;
}

.fullscreen-mode .side-labels {
    display: none;
}

.fullscreen-mode #btn-fullscreen {
    background: var(--primary-color);
    color: white;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

/* ============ Totem Vertical (1080x1920) e Portrait Screens ============ */
@media screen and (max-aspect-ratio: 3/4) {
    .app-container {
        flex-direction: column;
    }

    .render-area {
        order: 1;
        flex: 1;
        min-height: 40vh;
        border-bottom: 1px solid var(--border-color);
    }

    .controls-panel {
        order: 2;
        width: 100%;
        min-width: 100%;
        max-height: 60vh;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }

    .panel-header {
        padding: 10px 16px;
    }

    .panel-header h1 {
        font-size: 14px;
    }

    .side-labels {
        gap: 40px;
    }

    .info-overlay {
        bottom: 8px;
        left: 8px;
        right: 8px;
    }

    .info-card {
        padding: 6px 10px;
    }}

/* ============ Tablets e Telas Médias ============ */
@media screen and (max-width: 1024px) and (min-aspect-ratio: 3/4) {
    :root {
        --panel-width: 400px;
    }

    .tab-btn {
        font-size: 9px;
        padding: 8px 4px;
    }

    .binocular-grid {
        gap: 8px;
    }

    .eye-section {
        padding: 8px;
    }
}

/* ============ Mobile (iPhone e similares) ============ */
@media screen and (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .render-area {
        order: 1;
        flex: 0 0 45vh;
        min-height: 45vh;
        border-bottom: 1px solid var(--border-color);
    }

    .controls-panel {
        order: 2;
        width: 100%;
        min-width: 100%;
        flex: 1;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }

    .panel-header {
        padding: 8px 12px;
    }

    .panel-header h1 {
        font-size: 13px;
    }

    .panel-header p {
        font-size: 10px;
    }

    /* Abas menores no mobile */
    .tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        font-size: 9px;
        padding: 8px 4px;
        white-space: nowrap;
        min-width: 60px;
    }

    .tab-content {
        padding: 10px;
    }

    /* Grid lado a lado fica empilhado em telas muito pequenas */
    .binocular-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .eye-section {
        padding: 8px;
    }

    .eye-section h3 {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .field-row {
        margin-bottom: 5px;
    }

    .field-row label {
        flex: 0 0 38px;
        font-size: 8px;
    }

    .field-row input {
        padding: 3px 4px;
        font-size: 10px;
    }

    .section-box {
        padding: 8px;
        margin-bottom: 8px;
    }

    /* Overlay info mais compacto */
    .side-labels {
        top: 8px;
        gap: 30px;
    }

    .side-label {
        font-size: 9px;
        padding: 3px 8px;
    }

    .floating-toolbar {
        top: 8px;
        right: 8px;
    }

    .toolbar-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .info-overlay {
        bottom: 6px;
        left: 6px;
        right: 6px;
    }

    .info-card {
        padding: 5px 8px;
    }

    .info-card h4 {
        font-size: 7px;
    }

    .info-card .value {
        font-size: 10px;
    }}

/* ============ Mobile muito pequeno (iPhone SE, etc) ============ */
@media screen and (max-width: 375px) {
    .render-area {
        flex: 0 0 40vh;
        min-height: 40vh;
    }

    .binocular-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .tab-btn {
        font-size: 8px;
        min-width: 50px;
    }

    .side-labels {
        gap: 20px;
    }

    .side-label {
        font-size: 8px;
        padding: 2px 6px;
    }
}

/* ============ Landscape Mobile ============ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .app-container {
        flex-direction: row;
    }

    .render-area {
        order: 2;
        flex: 1;
        min-height: auto;
        border-bottom: none;
    }

    .controls-panel {
        order: 1;
        width: 320px;
        min-width: 320px;
        max-height: none;
        border-right: 1px solid var(--border-color);
        border-top: none;
    }

    .panel-header {
        padding: 6px 10px;
    }

    .panel-header h1 {
        font-size: 12px;
    }

    .panel-header p {
        display: none;
    }

    .tab-btn {
        padding: 6px 3px;
        font-size: 8px;
    }

    .tab-content {
        padding: 8px;
    }
}

/* ============ Desktop Grande (1920+) ============ */
@media screen and (min-width: 1920px) {
    :root {
        --panel-width: 480px;
    }

    .panel-header h1 {
        font-size: 18px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 12px 8px;
    }

    .field-row label {
        font-size: 10px;
    }

    .field-row input {
        font-size: 12px;
        padding: 5px 6px;
    }

    .eye-section h3 {
        font-size: 13px;
    }

    .section-title {
        font-size: 11px;
    }

    .side-label {
        font-size: 12px;
        padding: 6px 14px;
    }

    .info-card .value {
        font-size: 14px;
    }
}

/* ============ Totem Vertical Específico (1080x1920) ============ */
@media screen and (width: 1080px) and (height: 1920px),
       screen and (min-height: 1800px) and (max-aspect-ratio: 2/3) {
    .render-area {
        flex: 0 0 55vh;
        min-height: 55vh;
    }

    .controls-panel {
        max-height: 45vh;
    }

    .panel-header h1 {
        font-size: 20px;
    }

    .panel-header p {
        font-size: 14px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 14px 10px;
    }

    .tab-content {
        padding: 16px;
    }

    .binocular-grid {
        gap: 16px;
    }

    .eye-section {
        padding: 14px;
    }

    .eye-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .field-row {
        margin-bottom: 10px;
    }

    .field-row label {
        flex: 0 0 55px;
        font-size: 12px;
    }

    .field-row input {
        padding: 8px 10px;
        font-size: 14px;
    }

    .field-row .unit {
        font-size: 11px;
        width: 20px;
    }

    .section-box {
        padding: 14px;
        margin-bottom: 14px;
    }

    .section-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .toggle-row {
        padding: 8px 0;
    }

    .toggle-row label {
        font-size: 13px;
    }

    .toggle-switch {
        width: 44px;
        height: 22px;
    }

    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 4px;
        bottom: 4px;
    }

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(22px);
    }

    .btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    .side-labels {
        top: 20px;
        gap: 80px;
    }

    .side-label {
        font-size: 14px;
        padding: 8px 16px;
    }

    .floating-toolbar {
        top: 20px;
        right: 20px;
        gap: 10px;
    }

    .toolbar-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .info-overlay {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .info-card {
        padding: 12px 18px;
    }

    .info-card h4 {
        font-size: 11px;
    }

    .info-card .value {
        font-size: 18px;
    }
}

/* ============ Print (caso necessário) ============ */
@media print {
    .controls-panel {
        display: none;
    }

    .render-area {
        width: 100%;
    }

    .floating-toolbar {
        display: none;
    }
}

