﻿:root {
    --bg-n: #ff4d4d;
    --bg-p: #3498db;
    --bg-e: #2ecc71;
    --header-bg: #2f3542;
    --toolbar-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #dfe4ea;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.toolbar {
    background: var(--toolbar-bg);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.dashboard-container {
    display: flex;
    gap: 8px;
    padding: 8px;
    flex-grow: 1;
    overflow: hidden;
}

.status-section {
    flex: 1;
    background: #ced6e0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    border: 1px solid #a4b0be;
}

    .status-section h2 {
        font-size: 0.85em;
        padding: 8px 8px 2px 8px;
        margin: 0;
        background: var(--header-bg);
        color: white;
        text-align: center;
    }

.summary-bar {
    background: var(--header-bg);
    color: #d1d8e0;
    font-size: 0.75em;
    display: flex;
    justify-content: space-around;
    padding: 5px 0 8px 0;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.widget-grid {
    padding: 6px;
    overflow-y: auto;
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-content: start;
}

.widget {
    background: white;
    padding: 5px 8px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-left: 4px solid #ccc;
    font-size: 0.75em;
    min-height: 55px;
    transition: background-color 0.5s ease; /* Para el efecto flash */
    cursor: pointer;
}

.update-flash {
    background-color: #fff9c4 !important; /* Amarillo claro */
}

.widget-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
    margin-bottom: 3px;
}

.doc-id {
    font-weight: bold;
}

.amount {
    font-weight: bold;
    color: #118333;
}

.client-name {
    font-weight: 700;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vendedor {
    font-weight: 700;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight:700;
    color:darkblue ;
}
.comment {
    color: #747d8c;
    font-size: 0.85em;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.n {
    border-left-color: var(--bg-n);
}

.p {
    border-left-color: var(--bg-p);
}

.e {
    border-left-color: var(--bg-e);
}

@media (max-width: 1000px) {
    .widget-grid {
        grid-template-columns: 1fr;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: animatetop 0.3s;
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0;
    }

    to {
        top: 0;
        opacity: 1;
    }
}

.modal-header {
    background: var(--header-bg);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    font-size:1.4em;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

#tablaRenglones {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

    #tablaRenglones th {
        border-bottom: 2px solid #eee;
        padding: 10px;
        text-align: left;
    }

    #tablaRenglones td {
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

.close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
}

.toast {
    visibility: hidden;
    position: fixed;
    z-index: 3000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 400px;
    padding: 40px;
    border-radius: 15px;
    color: white;
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

    .toast.show {
        visibility: visible;
        opacity: 1;
    }

    .toast.success {
        background-color: #2ecc71;
        border: 5px solid #27ae60;
    }

    .toast.error {
        background-color: #f86b5d;
        border: 5px solid #c0392b;
    }

    .toast.alert {
        background-color: #db830a;
        border: 5px solid #ce7a06;
    }

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

.btn-entrega-manual {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn-entrega-manual:hover {
    background-color: #27ae60;
}

.btn-entrega-manual:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.btn-llamar {
    background-color: #f1c40f; /* Amarillo llamativo */
    color: #2c3e50;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
}
.btn-llamar:hover { background-color: #f39c12; }

.btn-cerrar {
    background-color: #605e5e;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
}
.btn-cerrar:hover { background-color: #6f6c6c; }