/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #00796b;
    color: #fff;
    padding: 10px 20px;
}

header .header-left button,
header .header-right h1 {
    margin: 0 10px;
}

header button {
    background-color: #004d40;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

header button:hover {
    background-color: #00695c;
}

/* Board Wrapper */
.board-wrapper {
    padding: 20px;
    overflow-x: auto; /* Habilitar desplazamiento horizontal */
    display: flex;
    justify-content: flex-start; /* Alinear columnas al inicio */
    align-items: flex-start; /* Alinear columnas en la parte superior */
    gap: 20px;
    height: auto; /* Asegurar que no haya restricción en altura */
    flex-wrap: nowrap; /* No permitir que las columnas bajen */
    white-space: nowrap; /* Evitar el salto de línea */
}

.board {
    display: flex;
    gap: 20px;
    padding: 10px;
}

/* Columns */
.column {
    background-color: #e0f2f1;
    border-radius: 10px;
    padding: 15px;
    width: 300px; /* Ancho fijo para todas las columnas */
    min-height: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0; /* Evitar que las columnas se reduzcan */
}

.column h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.column-settings {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.column-settings:hover {
    color: #00796b;
}

.column .card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: grab;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card p {
    margin: 5px 0;
}

.priority-stars {
    display: flex;
    gap: 5px;
    cursor: pointer;
}

.priority-stars .star {
    font-size: 1.2rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.priority-stars .star.selected {
    color: #ffc107;
}

.priority-stars .star.hovered {
    color: #ffecb3;
}

/* Botón "Añadir Pedido" */
.column .add-order-button {
    display: none;
    margin-top: auto;
    padding: 10px;
    background-color: #00796b;
    color: white;
    border: none;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
}

.column.empty .add-order-button {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal form {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal input,
.modal select,
.modal button {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.modal button {
    background-color: #00796b;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal button:hover {
    background-color: #004d40;
}

.modal .btn-secondary {
    background-color: #ccc;
    color: #333;
}

.modal .btn-secondary:hover {
    background-color: #aaa;
}

/* Responsiveness */
@media (max-width: 768px) {
    .board-wrapper {
        overflow-x: auto;
    }

    .board {
        flex-wrap: nowrap;
    }

    .column {
        width: 100%;
        max-width: 100%;
    }
}







.modal {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: white;
    z-index: 10;
}

.header-bar {
    background-color: #4CAF50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px ;
}

.header-bar h1 {
    font-size: 1.5em;
    margin: 0;
}

.header-bar .close-btn {
    background-color: white;
    color: #4CAF50;
    border: none;
    cursor: pointer;
}

.container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 3fr 1fr;
    gap: 10px;
    padding: 20px;
    height: calc(100vh - 60px);
    box-sizing: border-box;
}

.zone-blue {
    background-color: #e3f2fd;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
}

.zone-yellow {
    background-color: #fff9c4;
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
}

.zone-green {
    background-color: #e8f5e9;
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
    font-size: 1.1em; /* Más grande */
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
    display: flex;
    justify-content: space-evenly;
    padding: 10px 0;
}

.action-buttons button {
    margin: 0 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

.action-buttons button:hover {
    background-color: #45a049;
}


.modal {
    display: none; /* Ocultarlos por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}









/* General styling for the modal */
#orderDetailsPanel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);  /* Fondo oscuro para cubrir todo el frontend */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.order-details {
    background: white;
    width: 100%;  /* Aseguramos que ocupe toda la pantalla */
    height: 100%;  /* Aseguramos que ocupe toda la pantalla */
    border-radius: 0;  /* Sin bordes redondeados */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;  /* Sin padding para que ocupe todo el espacio */
}

/* Header styling */
.header-bar {
    background: #4CAF50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;  /* Aumento del padding para mejor visibilidad */
}

.header-bar h1 {
    font-size: 20px;  /* Aumento del tamaño del título */
    margin: 0;
}

.header-bar .close-btn {
    background: white;
    color: #4CAF50;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;  /* Aumento del tamaño del botón */
}

/* Layout styling */
.layout {
    display: flex;
    height: 100%;  /* Asegura que ocupe toda la altura de la pantalla */
    gap: 5px;  /* Espacio entre las zonas */
}

/* Blue area styling (70%) */
.blue-area {
    width: 70%;  /* Asignamos el 70% del espacio */
    background: #e6f7ff;
    padding: 30px;  /* Aumento del padding */
    overflow-y: auto;
}

.blue-area h3 {
    margin-top: 0;
    font-size: 28px;  /* Aumento del tamaño de la fuente */
}

.blue-area p {
    margin: 5px 0;
    font-size: 18px;  /* Aumento del tamaño de la fuente */
}

/* Yellow area styling (30%) */
.yellow-area {
    width: 40%;  /* Asignamos el 30% del espacio */
    background: #fff9c4;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* Los contenidos irán de arriba hacia abajo */
    padding: 100px;  /* Aumento del padding */
    height: 100%;  /* Ajustado para que la zona amarilla ocupe solo el 60% de la altura */
    overflow-y: auto;  /* Habilita el desplazamiento si el contenido es largo */
}





/* Responsividad: Ajustes para pantallas más pequeñas */
@media (max-width: 768px) {
    .layout {
        flex-direction: column; /* Apilar las áreas en pantallas pequeñas */
        gap: 5;  /* Ajuste del espacio entre las áreas */
    }

    .blue-area, .yellow-area {
        width: 100%;  /* Hacer que ambas áreas ocupen el 100% del ancho en pantallas pequeñas */
        padding: 25px;  /* Ajuste del padding */
    }

    .yellow-area .red-orange-container {
        flex-direction: column;  /* Apilar los botones en lugar de alinearlos horizontalmente */
        gap: 20px;  /* Ajuste del espacio entre los botones */
    }
}

/* Estilos para las notas */
.notes-list {
    margin-top: 20px;
    max-height: 300px;  /* Limitar la altura para que no ocupe toda la pantalla */
    overflow-y: auto;   /* Habilitar desplazamiento */
}

.note {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Estilos para las etiquetas */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    background-color: #f1f1f1;
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.remove-tag {
    margin-left: 5px;
    color: red;
    cursor: pointer;
}

.remove-tag:hover {
    text-decoration: underline;
}

/* Estilo para las notas */
textarea#noteInput {
    width: 100%;
    height: 150px;  /* Aumento de la altura del textarea */
    margin-top: 20px;  /* Aumento del margen superior */
    border: 2px solid #ccc;  /* Aumento del grosor del borde */
    border-radius: 15px;  /* Aumento del radio del borde */
    padding: 20px;  /* Aumento del padding */
    resize: none;
}

/* Add Note Button */
#addNoteButton {
    margin-top: 20px;  /* Aumento del margen superior */
    padding: 20px 30px;  /* Aumento del padding */
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 15px;  /* Aumento del borde redondeado */
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 22px;  /* Aumento del tamaño de la fuente */
}

/* Scroll styling for logs */
#logsContainer {
    overflow-y: auto;
    height: 100%;  /* Aumento de la altura del contenedor */
    padding: auto;
}

#logs p {
    font-size: 18px;  /* Aumento del tamaño de la fuente */
    margin: 15px 0;  /* Aumento del margen entre los párrafos */
}























/* Estilo del Modal para imágenes */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.image-modal .modal-content {
    max-width: 80%;
    max-height: 80%;
    display: block;
    margin: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.image-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
}

.image-modal .close-modal:hover {
    color: #f1c40f;
}














/* Contenedor de las notas fijo en la parte inferior */
#notesSection {
    position: fixed;  /* Hace que el formulario sea fijo */
    bottom: 0;        /* Lo coloca en la parte inferior de la pantalla */
    left: 0;          /* Alineado a la izquierda */
    width: 40%;      /* Ancho completo */
    z-index: 1000;    /* Asegura que el formulario quede por encima de otros elementos */
}

/* Estilo del formulario */
#addNoteForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1000px;  /* Limitar el ancho máximo */
    margin: 0 auto;     /* Centrar el formulario */
}

/* Estilo del textarea */
#noteInput {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;  /* Deshabilitar el redimensionamiento */
}

/* Estilo del input de archivo */
#fileInput {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Estilo del contenedor de la vista previa de la imagen */
#filePreviewContainer {
    margin-top: 10px;
}

/* Estilo del botón */
button[type="submit"] {
    padding: 10px 20px;
    background-color: #00796b; /* Color de fondo verde */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

/* Efecto hover para el botón */
button[type="submit"]:hover {
    background-color: #004d40; /* Color de fondo verde oscuro */
}



















#markAsWon {
    background-color: #4caf50;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}
#markAsWon:hover {
    background-color: #45a049;
}


#paymentModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#paymentModal form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}












.progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #e9ecef;
    color: #6c757d;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    border-left: 10px solid #e9ecef;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.progress-step.current {
    background-color: #007bff;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.progress-step.current:not(:last-child)::after {
    border-left-color: #007bff;
}

.progress-step .name {
    display: block;
    font-size: 1rem;
}

.progress-step .status {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}
