:root {
    /* Colores por defecto - se sobrescribirán con la configuración */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --input-background: #3a3a3a;
    --text-color: #ffffff;
    --text-light: #b0b0b0;
    --border-color: #404040;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --header-bg: #1f1f1f;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    position: relative;
}

/* Overlay para mejorar legibilidad cuando hay imagen de fondo */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.7);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.container[style*="background-image"]::before {
    opacity: 1;
}

.container > * {
    position: relative;
    z-index: 1;
}

/* Isometric Diamond Grid Background */
.isometric-grid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    perspective-origin: center center;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.isometric-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-45deg);
    transform-style: preserve-3d;
    display: grid;
    grid-template-columns: repeat(8, 150px);
    grid-template-rows: repeat(8, 150px);
    gap: 20px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-45deg) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-45deg) translateY(-10px);
    }
}

.isometric-diamond {
    width: 150px;
    height: 150px;
    transform: rotateZ(45deg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.isometric-diamond > div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: rotateZ(-45deg) scale(1.414);
    transform-origin: center;
}

.isometric-diamond:hover {
    transform: rotateZ(45deg) translateZ(20px) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Asegurar que el contenido esté por encima del grid */
.container.isometric-background > *:not(.isometric-grid-container) {
    position: relative;
    z-index: 1;
}

/* Estilos para Gestión de Productos */
.products-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.product-inventory-item {
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
}

.product-inventory-item:hover {
    background: var(--card-background);
    box-shadow: var(--shadow);
}

.product-inventory-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-inventory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-inventory-image .no-image {
    font-size: 2.5rem;
    color: var(--text-light);
}

.product-inventory-info {
    flex: 1;
    min-width: 0;
}

.product-inventory-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 10px 0;
}

.product-inventory-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.product-inventory-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.edit-product-btn,
.delete-product-inventory-btn {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-product-btn {
    background: var(--primary-color);
    color: white;
}

.edit-product-btn:hover {
    background: var(--secondary-color);
}

.delete-product-inventory-btn {
    background: var(--danger-color);
    color: white;
}

.delete-product-inventory-btn:hover {
    background: #dc2626;
}

.add-product-inventory-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.add-product-inventory-btn:hover {
    background: var(--secondary-color);
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-image-upload-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-image-input {
    flex: 1;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: not-allowed;
}

.upload-product-image-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.upload-product-image-btn:hover {
    background: var(--secondary-color);
}

.product-image-preview {
    margin-top: 10px;
}

.product-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    object-fit: contain;
}

.form-input {
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para Historial */
.history-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.history-item {
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
}

.history-item:hover {
    background: var(--card-background);
    box-shadow: var(--shadow);
}

.history-service-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.history-service-emoji {
    font-size: 2rem;
}

.history-service-info {
    flex: 1;
    min-width: 0;
}

.history-service-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 10px 0;
}

.history-service-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}

.history-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.history-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.history-products {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.history-item-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
}

.delete-history-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.delete-history-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.05);
}

.delete-history-btn:active {
    transform: scale(0.95);
}

/* Estilos para productos en detalles técnicos */
.product-inventory-select {
    flex: 1;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.product-percentage-input {
    width: 120px;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.percentage-label {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0 5px;
}

/* Top Header */
.top-header {
    background-color: var(--header-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    position: relative;
    z-index: 1000 !important;
    isolation: isolate;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.business-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.nav-button {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: var(--card-background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.2rem;
}

/* Menú desplegable */
.nav-dropdown {
    position: relative;
    z-index: 10002 !important;
}

.dropdown-menu {
    display: none;
    position: fixed !important;
    top: auto !important;
    right: 30px !important;
    margin-top: 5px;
    background: var(--card-background) !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 2147483647 !important;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--input-background);
    color: var(--primary-color);
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-icon {
    font-size: 1.2rem;
}

/* Botón hamburguesa para móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10002;
    position: relative;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay para el menú móvil */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--header-bg);
        border-left: 1px solid var(--border-color);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 20px 20px 20px;
        gap: 10px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 10001;
    }
    
    .header-nav.active {
        right: 0;
    }
    
    .nav-button {
        width: 100%;
        justify-content: flex-start;
        padding: 15px 20px;
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .nav-button span:not(.nav-icon) {
        display: inline;
    }
    
    /* Ajustar el dropdown en móvil */
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown .nav-button {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static !important;
        display: none;
        width: 100%;
        margin-top: 5px;
        margin-left: 0;
        box-shadow: none;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
    
    .dropdown-item {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    /* Asegurar que el header-left no se comprima */
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .business-name {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 15px;
    }
}

/* Services Section */
.services-section {
    background: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1 !important;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .services-section {
        padding: 20px;
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1 !important;
    align-items: stretch;
}

.service-button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 200px;
    min-width: 200px;
    aspect-ratio: 1;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.service-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.service-button:active {
    transform: translateY(-1px);
}

.service-emoji {
    font-size: 5rem;
    margin-bottom: 0;
    line-height: 1;
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
}

.service-name {
    font-size: 0.95rem;
    text-align: center;
    margin-top: 5px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 0 5px;
    box-sizing: border-box;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.9;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    opacity: 0.8;
}

.rendon-logo {
    max-height: 20px;
    max-width: auto;
    opacity: 0.6;
    filter: brightness(0.8);
}

.service-image {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Modal de Configuración */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-background);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--input-background);
    color: var(--primary-color);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.services-edit-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.service-edit-item {
    background: var(--card-background);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow);
}

.service-edit-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.service-edit-icon {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
    flex-shrink: 0;
}

.service-name-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.icon-preview {
    width: 100px;
    height: 100px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.preview-emoji {
    font-size: 3.5rem;
}

.icon-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.icon-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.icon-option {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
}

.icon-option input[type="radio"] {
    cursor: pointer;
}

.service-edit-icon input[type="text"] {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    width: 100%;
    font-family: inherit;
}

.service-edit-icon input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.service-edit-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.service-edit-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-edit-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-edit-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.service-name-edit {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    font-family: inherit;
    width: 100%;
}

.service-name-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.service-name-edit:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.service-color-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.reset-service-color-btn,
.reset-gradient-color-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reset-service-color-btn:hover,
.reset-gradient-color-btn:hover {
    background: #d97706;
}

.service-color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.service-color-input {
    width: 60px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.service-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.service-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.service-color-text {
    flex: 1;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    max-width: 120px;
}

.service-color-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.service-gradient-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.gradient-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.gradient-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gradient-color-wrapper {
    margin-top: 5px;
}

.delete-service-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.delete-service-btn:hover {
    background: #dc2626;
}

.add-service-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.add-service-btn:hover {
    background: var(--secondary-color);
}

.save-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.cancel-btn {
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--input-background);
}

.reset-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #d97706;
}

/* Estilos para subida de imágenes */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.upload-image-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.upload-image-btn:hover {
    background: var(--secondary-color);
}

.upload-status {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 5px;
}

.upload-status.loading {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.upload-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.upload-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Estilos para el modal de colores */
.color-edit-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.color-edit-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.background-upload-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.background-image-input {
    flex: 1;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: not-allowed;
}

.upload-background-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.upload-background-btn:hover {
    background: var(--secondary-color);
}

.background-preview {
    margin-top: 10px;
}

.background-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    object-fit: contain;
}

.remove-background-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 10px;
}

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

.color-edit-form label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input {
    width: 80px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-text-input {
    flex: 1;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.color-text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para detalles técnicos */
.service-edit-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.technical-details-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.technical-details-btn:hover {
    background: var(--secondary-color);
}

.technical-details-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.technical-details-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.technical-details-form label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-input {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    color: var(--text-color);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.product-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-price-input,
.product-percentage-input {
    width: 120px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: inherit;
}

.product-price-input:focus,
.product-percentage-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-price-input::-webkit-inner-spin-button,
.product-price-input::-webkit-outer-spin-button,
.product-percentage-input::-webkit-inner-spin-button,
.product-percentage-input::-webkit-outer-spin-button {
    opacity: 1;
}

.product-type-select,
.product-inventory-select {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: inherit;
    cursor: pointer;
    min-width: 180px;
    flex: 1;
}

.product-type-select:focus,
.product-inventory-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-name-input {
    flex: 1;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: inherit;
}

.product-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.delete-product-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.delete-product-btn:hover {
    background: #dc2626;
}

.add-product-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
}

.add-product-btn:hover {
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .service-edit-header {
        flex-direction: column;
    }
    
    .service-edit-icon {
        min-width: 100%;
    }
    
    .service-edit-actions {
        flex-direction: column;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
    }

    .product-item {
        flex-direction: column;
        align-items: stretch;
    }

    .product-type-select,
    .product-inventory-select {
        min-width: 100%;
    }
}



/* Estilos para Reportes y Estadísticas */
.reports-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.reports-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card.highlight {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--card-background), rgba(59, 130, 246, 0.05));
}

.summary-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.reports-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.report-chart-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.report-chart-card h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.report-data-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.report-item-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.report-item-name {
    font-weight: 600;
}

.report-item-count {
    color: var(--text-light);
}

.report-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.report-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.expenses-breakdown-section {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.expenses-breakdown-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.expenses-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.expense-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.expense-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.expense-dot.electricity {
    background-color: #fbbf24;
}

.expense-dot.products {
    background-color: #10b981;
}

.expense-name {
    color: var(--text-light);
}

.expense-value {
    font-weight: 700;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .reports-details-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-value {
        font-size: 1.2rem;
    }
}

/* Estilos Avanzados para Reportes */
.reports-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.add-transaction-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 42px;
}

.add-transaction-btn:hover {
    background: var(--primary-color);
}

.reports-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.chart-container-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.chart-container-card h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.pie-charts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pie-chart-box h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    text-align: center;
}

.report-lists-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 15px;
}

.report-mini-card h3 {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* Tabla de reportes */
.transactions-table-section {
    margin-top: 30px;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.report-table th, .report-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.report-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.report-table td {
    font-size: 0.95rem;
}

.report-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.type-income { color: #10b981; font-weight: 600; }
.type-expense { color: #ef4444; font-weight: 600; }

@media (max-width: 900px) {
    .reports-charts-grid {
        grid-template-columns: 1fr;
    }
}
