/* CONFIGURATORE FIORIERE - CSS COMPLETO */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4vw;
    width: 100%;
    overflow-x: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.header-left img {
    height: 2.16rem;
    width: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.header-logo {
    height: 1.5rem;
    width: auto;
    display: block;
    object-fit: contain;
}

.header h1 {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: bold;
    color: #374151;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.theme-toggle {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    min-width: 32px;
    min-height: 32px;
}

.theme-toggle:hover {
    background: #f3f4f6;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4vw;
    align-items: start;
}

@media (min-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.card {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.9), rgba(243, 244, 246, 0.8));
    backdrop-filter: blur(10px);
    padding: clamp(1rem, 4vw, 1.5rem);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(156, 163, 175, 0.2);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.card h2 {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 600;
    margin-bottom: clamp(1rem, 4vw, 1.5rem);
    color: #1f2937;
}

.tipo-gruppo {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
}

/* Colori fissi per le sezioni - Scala di grigi */
.tipo-gruppo.fioriere {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
    border: 2px solid #6b7280 !important;
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.15) !important;
}

.tipo-gruppo.panche {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb) !important;
    border: 2px solid #4b5563 !important;
    box-shadow: 0 2px 10px rgba(75, 85, 99, 0.15) !important;
}

.tipo-gruppo h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Colori fissi per i titoli delle sezioni */
.tipo-gruppo.fioriere h4 {
    color: #374151 !important;
}

.tipo-gruppo.panche h4 {
    color: #1f2937 !important;
}

.tipo-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    text-align: left;
}

.tipo-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tipo-btn.selected {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

.config-form {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border: 2px solid rgba(107, 114, 128, 0.3);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.7));
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dimensions-grid {
    display: grid;
    gap: 1rem;
}

.dimensions-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.dimensions-grid.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkbox-item label {
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-danger:hover {
    background: #dc2626;
}

.add-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.lista-prodotti {
    margin-top: 1.5rem;
}

.lista-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.lista-prodotto {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #f9fafb;
    position: relative;
}

.lista-prodotto h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.lista-prodotto p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.offerta-container {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.offerta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #e5e7eb;
}

.offerta-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.offerta-prodotto {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.prodotto-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.prodotto-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.prodotto-prezzo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prodotto-prezzo span {
    font-size: 1rem;
    font-weight: bold;
    color: #059669;
}

.offerta-totale {
    padding: 1.5rem;
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 0.5rem;
    text-align: center;
    margin-top: 2rem;
}

.offerta-totale div {
    margin: 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.offerta-totale .totale-finale {
    font-size: 1.5rem;
    color: #059669;
}

.note-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    margin: 1.25rem 0;
    border-radius: 0.375rem;
}

.note-box h4 {
    margin-top: 0;
    color: #856404;
}

.note-box ul {
    margin-bottom: 0;
    color: #856404;
}

/* Pianta 2D - IDENTICA alle altre sezioni */
.pianta-2d-container {
    margin-top: 2rem;
}

/* Box principale uguale a tipo-gruppo */
.pianta-header,
.pianta-controls {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 2px solid #6b7280;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.15) !important;
}

/* Titolo uguale agli altri titoli h4 */
.pianta-header h2,
.pianta-controls h2 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151 !important;
}

/* Controlli interni in bianco come config-form */
.pianta-settings {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border: 2px solid rgba(107, 114, 128, 0.3);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.7));
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.setting-group label {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    color: #374151;
    margin: 0;
}

.setting-group input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 1rem;
    text-align: center;
}

.setting-group span {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.btn-sm {
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
    min-width: 20px;
    min-height: 20px;
    line-height: 1;
}

.joystick-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

@media (max-width: 768px) {
    .joystick-controls {
        display: flex;
    }
}

.joystick-row {
    display: flex;
    gap: 2px;
}

.joystick-btn {
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0.25rem !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    background: #fed7aa !important;
    border: 2px solid #fdba74 !important;
    color: #9a3412 !important;
    font-weight: bold !important;
}

.joystick-btn:hover {
    background: #fdba74 !important;
    border-color: #fb923c !important;
}

.pianta-viewport {
    position: relative;
    width: 100%;
    height: clamp(250px, 50vh, 600px);
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: auto;
    background: #f9fafb;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.pianta-rulers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.ruler {
    position: absolute;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.ruler-horizontal {
    top: 0;
    left: 40px;
    height: 40px;
    border-bottom: 2px solid #6b7280;
}

.ruler-vertical {
    top: 40px;
    left: 0;
    width: 40px;
    border-right: 2px solid #6b7280;
}

.pianta-canvas {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 0;
    bottom: 0;
    overflow: hidden;
    cursor: grab;
}

.pianta-canvas.panning {
    cursor: grabbing;
}

.pianta-area {
    position: relative;
    background: white;
    border: 1px solid #d1d5db;
    background-image: 
        linear-gradient(to right, #e5e7eb 1px, transparent 1px),
        linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
    background-size: 10px 10px;
    transform-origin: 0 0;
}

.elemento-pianta {
    position: absolute;
    cursor: move;
    border: 3px solid #6b7280;
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: 0.9rem; /* Aumentato da 0.75rem */
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
    word-break: break-word;
    overflow: hidden;
}

.elemento-pianta.circolare {
    border-radius: 50%;
}

.elemento-pianta.selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
    z-index: 100;
}

.elemento-pianta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.elemento-pianta .contenuto {
    /* Stili base rimossi - gestiti via JavaScript */
}

.elemento-pianta .schienale {
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 20%;
    min-height: 8px;
    background: #e5e7eb;
    border: 3px solid #6b7280;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}

.elemento-pianta .cuscini-seduta {
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 2px;
}

.elemento-pianta .ruote {
    position: absolute;
    width: 8px;
    height: 5px;
    background: #374151;
    border-radius: 1px;
}

.elemento-pianta .ruota-tl { top: 10%; left: 15%; transform: translate(-50%, -50%); }
.elemento-pianta .ruota-tr { top: 10%; right: 15%; transform: translate(50%, -50%); }
.elemento-pianta .ruota-bl { bottom: 10%; left: 15%; transform: translate(-50%, 50%); }
.elemento-pianta .ruota-br { bottom: 10%; right: 15%; transform: translate(50%, 50%); }

/* DARK MODE STYLES */
.dark {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    color: #f9fafb;
}

.dark .header,
.dark .card,
.dark .config-form,
.dark .lista-prodotto,
.dark .offerta-container,
.dark .offerta-prodotto {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

.dark .header h1,
.dark .card h2:not(.tipo-gruppo h4),
.dark .lista-prodotto h4,
.dark .prodotto-info h4,
.dark .offerta-header h2 {
    color: #f9fafb !important;
}

.dark .tipo-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .tipo-btn:hover {
    background: #4b5563;
    border-color: #3b82f6;
}

.dark .tipo-btn.selected {
    background: #3b82f6;
    color: white;
}

.dark .form-input,
.dark .form-select {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .form-group label,
.dark .checkbox-item label {
    color: #d1d5db;
}

.dark .theme-toggle {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .theme-toggle:hover {
    background: #4b5563;
}

.dark .config-form {
    background: #374151;
    border-color: #4b5563;
}

/* Dark Mode per Pianta 2D */
.dark .pianta-viewport {
    background: #374151;
    border-color: #4b5563;
}

.dark .ruler {
    background: #1f2937;
    border-color: #4b5563;
}

.dark .pianta-area {
    background: #d1d5db;
    border-color: #4b5563;
    background-image: 
        linear-gradient(to right, #9ca3af 1px, transparent 1px),
        linear-gradient(to bottom, #9ca3af 1px, transparent 1px);
}

.dark .elemento-pianta .contenuto {
    color: #1f2937;
}

.dark .setting-group label {
    color: #d1d5db;
}

.dark .setting-group input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

/* Vista ridotta pianta in offerta */
.pianta-preview-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.pianta-preview-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.pianta-preview {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem;
    background: white;
    overflow: hidden;
}

.pianta-preview-area {
    position: relative;
    background: white;
    background-image: 
        linear-gradient(to right, #e5e7eb 1px, transparent 1px),
        linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
    background-size: 5px 5px;
}

.elemento-preview {
    position: absolute;
    border: 2px solid #6b7280;
    border-radius: 3px;
    font-size: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    overflow: hidden;
}

.elemento-preview.circolare {
    border-radius: 50%;
}

.elemento-preview .contenuto-preview {
    padding: 1px;
    color: #1f2937;
}

/* Animazioni */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Accessibilità */
.btn:focus,
.tipo-btn:focus,
.theme-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.form-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.hidden {
    display: none;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Titolo Pianta 2D separato come le altre sezioni */
    .pianta-title {
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
        border: 2px solid #6b7280 !important;
        box-shadow: 0 2px 10px rgba(107, 114, 128, 0.15) !important;
        border-radius: 0.5rem !important;
    }

    .pianta-title h2 {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #374151 !important;
        margin: 0 !important;
    }

    /* Forza separazione titolo dai controlli */
    .pianta-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
    }

    /* Titolo Pianta 2D SENZA box come le altre sezioni */
    .pianta-controls h2 {
        order: -1 !important;
        margin-bottom: 1rem !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #374151 !important;
    }

    /* Controlli in box separato */
    .pianta-settings {
        padding: 1rem !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Settings più compatti */
    .pianta-settings {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        margin: 0 !important;
        background: none !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .setting-group {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 1rem !important;
        padding: 0.5rem 0 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .setting-group label {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
        text-align: left !important;
        margin: 0 !important;
        flex: 1 !important;
    }

    .setting-group input {
        width: 70px !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        text-align: center !important;
        border: 1px solid #d1d5db !important;
        border-radius: 0.25rem !important;
        background: white !important;
    }

    .setting-group span {
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
        text-align: center !important;
        min-width: 50px !important;
    }

    /* Pulsanti zoom più piccoli e discreti */
    .setting-group:has(.btn-sm) {
        justify-content: space-between !important;
        gap: 0.5rem !important;
    }

    .setting-group:has(.btn-sm) label {
        flex: 1 !important;
        margin-right: 0.5rem !important;
    }

    .btn-sm {
        padding: 0.25rem !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        background: #f3f4f6 !important;
        color: #374151 !important;
        border: 1px solid #d1d5db !important;
        border-radius: 0.25rem !important;
    }

    .btn-sm:hover {
        background: #e5e7eb !important;
    }

    .joystick-controls {
        display: flex;
    }

    /* Altri miglioramenti mobile */
    .offerta-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .offerta-prodotto {
        flex-direction: column;
        gap: 1rem;
    }

    .prodotto-prezzo {
        justify-content: space-between;
        width: 100%;
    }

    .dimensions-grid.three-col {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dimensions-grid.two-col {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .card {
        padding: 1rem;
    }

    .config-form {
        padding: 1rem;
    }

    .form-input,
    .form-select {
        font-size: 1rem; /* Previene zoom su iOS */
    }

    .lista-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}